Stream: conformance
Topic: Publishing Profiles
Richard Kavanagh (Jul 05 2017 at 11:17):
We are attempting to make sure that when we publish our profiles we do so in a consistent way. We dont use either the core HL7 publisher or Simplifier, but we do look to them for guidance.
My question is about how to render the root element of a profile (aka StructureDefinition). Looking at the core HL7 publishing tool and Simplifier they are inconsistent, so I thought I would ask the question here.
1) What should the cardinality be? It seems to me that the root entry should not have a cardinality.
2) What is the "type" of the root element of a profile. Is it "DomainResource" or the actual resource that is being profiled.
Richard Kavanagh (Jul 05 2017 at 11:19):
Lloyd McKenzie (Jul 05 2017 at 16:24):
The cardinality of a root element should be 0..* most of the time. If tighter, it indicates that when that profile is invoked, the element invoking it must be at least as tight as the profile. Most typically this is used with profiles on Extension where constraining the upper cardinality on the base allows you to assert that "this profile can't repeat". In principle, it could also be used to state that, if referenced in a profile, the referencing element would need to be minOccurs=1 (or even higher).
Richard Kavanagh (Jul 05 2017 at 21:18):
Well if that's the case you would expect the same of resource models and complex extensions and neither of them have a cardinality at all on the root.
Richard Kavanagh (Jul 05 2017 at 21:19):
e.g. http://hl7.org/fhir/STU3/namingsystem.html and http://hl7.org/fhir/STU3/datatypes.html#Identifier
Lloyd McKenzie (Jul 05 2017 at 21:24):
Actually, it does have a cardinality on the root, we just suppress it as confusing/not relevant. (You can see it if you open up the http://hl7.org/fhir/profiles-types.xml file in an XML browser)
Richard Kavanagh (Jul 05 2017 at 21:47):
I accept the the ElementDefinition has a cardinality in that they are technically mandated. It is what is displayed that I'm interested in. So as for the second part of the question, for a profiled resource what is the type of the first element. Is it the resources that is being profiled?
Lloyd McKenzie (Jul 05 2017 at 22:07):
I believe type is prohibited on the root element.
Last updated: Apr 12 2022 at 19:14 UTC