Stream: implementers
Topic: Validation error - MedicationStatement.medication[x] slice
Rob Eastwood (Jun 03 2019 at 01:45):
The HL7 Australia profile for MedicationStatement has a slice on the medication[x] element to define a slice for the 2 choice types - ie if supplying as a CodeableConcept then do it this way, or if supplying a reference, do it this other way.
As the medication[x] element is 1..1 in the base resource, when the IG publisher builds the profile, both of the slices get a corresponding 1..1 - which is not the design intent. The intent is to have either of the choices, not both.
When examples are created to comply with this profile (using a meta.profile value) with the intent to supply just one of the medication[x] choices , the following errors are generated in the QA report:
Profile http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/medicationstatement-summary-1, Element 'MedicationStatement.medicationCodeableConcept[medicationCoded]': minimum required = 1, but only found 0 Profile http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/medicationstatement-summary-1, Element 'MedicationStatement.medicationReference[medicationReference]': minimum required = 1, but only found 0
Note that we are using a profile derived from the above HL7 AU profile that only adds a must support on this element.
The MedicationStatement example supplies this content (among other bits left out for brevity):
<medicationCodeableConcept> <coding> <system value="http://snomed.info/sct"/> <code value="23358011000036102"/> <display value="metformin hydrochloride 500 mg tablet"/> </coding> <text value="Metformin 500mg"/> </medicationCodeableConcept>
Q: is this a problem with the profile somewhere or something in the validation process?
Grahame Grieve (Jun 03 2019 at 07:42):
sounds like a problem in the snapshot generation in the ig pbulisher - this is in au base?
Rob Eastwood (Jun 04 2019 at 00:26):
sounds like a problem in the snapshot generation in the ig pbulisher - this is in au base?
@Grahame Grieve - yes that is correct; AU Base MedicationStatement here http://build.fhir.org/ig/hl7au/au-fhir-base/StructureDefinition-au-medicationstatement.html
thank you
Grahame Grieve (Jun 04 2019 at 04:10):
well, this is another case of slicing a non-repeating element. We have a methodology failure here - sharp disagreement in the team, which we are discussing at DevDays next week
Rob Eastwood (Jun 04 2019 at 04:41):
Thanks @Grahame Grieve
Last updated: Apr 12 2022 at 19:14 UTC