FHIR Chat · Use of profile uri with a datatype · implementers

Stream: implementers

Topic: Use of profile uri with a datatype


view this post on Zulip Katie Wheatley (Dec 12 2016 at 22:49):

Please can anyone advise on how to link a profile to a datatype. The example I have is a locally customised human name profile which I plan to link using the profile uri field for Patient.name (Human name datatype) in Forge. I realise this could be done using an extension, but I wanted to examine how it can be done using a profile. Does anyone have any examples of this being done as I can't find any at this point in time.

view this post on Zulip Lloyd McKenzie (Dec 12 2016 at 22:51):

Are you wanting to declare the profile on the element in the instance (not possible) or declare that your extension is only allowed to be used in the context of Patient.name (or any HumanName)?

view this post on Zulip Katie Wheatley (Dec 13 2016 at 08:35):

I think I am attempting the former. I did wonder if what I was trying to do was impossible. The xml below for the Patient profile (Patient.name element) is what I got when adding the human name profile I have created to the Patient.name element. Can you please confirm if what I am attempting is impossible. If the answer is yes to that, then you have fully answered my initial question and I won't work on this any longer.
</element>
<element>
<path value="Patient.name" />
<name value="Patient name" />
<short value="A name associated with the patient." />
<definition value="The name provides names associated with the person who is the patient." />
<comments value="A patient may have multiple names with different uses or applicable periods. For animals, the name is a &quot;HumanName&quot; in the sense that is assigned and used by humans and has the same patterns." />
<requirements value="Need to be able to track the patient by multiple names. Examples are your official name and a partner name." />
<min value="1" />
<max value="1" />
<base>
<path value="Patient.name" />
<min value="0" />
<max value="*" />
</base>
<type>
<code value="HumanName" />
<profile value="http://fhir.nhs.net/StructureDefinition/adw-human-name-1-0" />
</type>
<mustSupport value="true" />
<isSummary value="true" />
<mapping>
<identity value="v2" />
<map value="PID-5, PID-9" />
</mapping>
<mapping>
<identity value="rim" />
<map value="name" />
</mapping>
<mapping>
<identity value="cda" />
<map value=".patient.name" />
</mapping>
</element>

view this post on Zulip Lloyd McKenzie (Dec 13 2016 at 08:49):

So essentially you'd like to see in the instance "this particular name repetition conforms to profile X"? I can't say it's totally impossible - few things are impossible when you have extensions all over the place. However, there's no "standard" way to do it and, as a rule, we haven't had use-cases presented for doing so. Can you share what your use-case is?

view this post on Zulip Michel Rutten (Dec 13 2016 at 12:26):

@Katie FHIR allows you to define constraints on an element type. So e.g. Patient.name by default has type HumanName. You can override the element type profile with a custom profile on HumanName. In Forge, navigate to Element type and type in the profile uri. If you want your profile to support multiple different datatype profiles, then you can slice the Patient.name element and individually constrain the type of each slice, e.g. with different custom type profiles.

view this post on Zulip Katie Wheatley (Dec 13 2016 at 13:44):

human_name.png

view this post on Zulip Katie Wheatley (Dec 13 2016 at 13:45):

@Michel Is this the correct way of doing this? Thanks very much for your reply.

view this post on Zulip Michel Rutten (Dec 13 2016 at 14:01):

@Katie Wheatley Correct!

view this post on Zulip Michel Rutten (Dec 13 2016 at 14:06):

Note: by default, the type profile uri is empty. Actually this implies that the element conforms to the FHIR core datatype or resource profile identified by the type.code value.

view this post on Zulip Katie Wheatley (Dec 13 2016 at 16:10):

Cheers Michel. However, how do I express this new link in an xml example for this patient e.g. within the name element?

view this post on Zulip Michel Rutten (Dec 13 2016 at 16:54):

@Katie Wheatley you don't. Element types are defined in the StructureDefinition, not in concrete instances. So you need to consult the associated profile to determine the type of an instance element.


Last updated: Apr 12 2022 at 19:14 UTC