Skip to content

Type Profiling

chrisgrenz edited this page May 7, 2016 · 1 revision

Creating a type profile allows re-use of definition in multiple resource profiles using the element.type.profile value of an element definition.

For example, one could define a CodeableConcept profile with LOINC and SNOMED system slices of coding:

	<differential>
		<element>
			<path value="Element.coding" />
			<slicing>
				<discriminator value="system" />
				<rules value="open" />
			</slicing>
		</element>
		<element>
			<path value="Element.coding.system" />
			<name value="LOINC.system" />
			<min value="1" />
			<fixedUri value="http://loinc.org" />
		</element>
		<element>
			<path value="Element.coding.system" />
			<name value="SNOMED.system" />
			<min value="1" />
			<fixedUri value="http://snomed.info/sct" />
		</element>
	</differential>

This profile could then be applied in multiple places in a resource:

<differential>
	<element>
		<path value="Encounter.type" />
		<type>
			<code value="CodeableConcept" />
			<profile value="http://example.com/fhir/SD/codeable-with-systems" />
		</type>
	</element>
	<element>
		<path value="Encounter.priority" />
		<type>
			<code value="CodeableConcept" />
			<profile value="http://example.com/fhir/SD/codeable-with-systems" />
		</type>
	</element>
</differential>

Because of the application of the type profile, both type and priority "have" SNOMED and LOINC coding slices.

TODO: What happens when I want to specify something on type.SNOMED and priority.SNOMED?