FHIR Chat · Composition subject 0..1 · implementers

Stream: implementers

Topic: Composition subject 0..1


view this post on Zulip Katarina (Jan 27 2020 at 13:01):

Hi, I created a composition profile in stu3. I want the subject to be optional in this profile.
By definition in stu3 subject is 1..1. In forge it is not possible to change the cardinality from 1..1 to 0..1 (is greyed out).
But when I set the cardinality in the xml (see example) and post it to vonk I don't get any errors.
Can I do this? I think, it is not a recommended/allowed way, but why does it work?
I have Vonk.Server/3.1.1.

<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="example123" />
<url value="http://example.org/fhir/StructureDefinition/MyComposition"/>
<name value="MyComposition"/>
<status value="draft"/>
<fhirVersion value="3.0.1"/>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM Mapping"/>
</mapping>
<mapping>
<identity value="cda"/>
<uri value="http://hl7.org/v3/cda"/>
<name value="CDA (R2)"/>
</mapping>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/w5"/>
<name value="W5 Mapping"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<type value="Composition"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Composition"/>
<derivation value="constraint"/>
<differential>
<element id="Composition.subject">
<path value="Composition.subject"/>
<type>
<code value="Reference"/>
<targetProfile value="http://example.org/fhir/StructureDefinition/MyReference"/>
</type>
<min value="0" />
<max value="1" />
</element>
</differential>
</StructureDefinition>

view this post on Zulip Lloyd McKenzie (Jan 27 2020 at 16:24):

It shouldn't work - it should raise an error. Profiles can't relax constraints that are present in the base resource.

view this post on Zulip Christiaan Knaap (Jan 28 2020 at 08:34):

@Katarina Thank you for mentioning this, it indeed looks like an error.

view this post on Zulip Christiaan Knaap (Jan 28 2020 at 08:37):

It is in fact already known as an issue on the .NET FHIR API: #856, that is of course used by Vonk.


Last updated: Apr 12 2022 at 19:14 UTC