Stream: conformance
Topic: nesting extensions
David Hay (Jun 06 2019 at 05:05):
Has anyone created an extension that is nested more than 2 levels? In theory you can go as deep as you like, but more than 2 seems implementer unfriendly...
Grahame Grieve (Jun 06 2019 at 05:20):
right
Josh Mandel (Jun 08 2019 at 03:44):
(Frankly two is already pretty painful to work with.)
Thomas Tveit Rosenlund (Nov 01 2019 at 13:19):
Has anyone created an extension that is nested more than 2 levels? In theory you can go as deep as you like, but more than 2 seems implementer unfriendly...
I did make this, and I am not particularly proud of it:
<extension url="http://ehelse.no/fhir/StructureDefinition/gd-person-status"> <extension url="fregPersonStatus"> <valueCode value="bosatt"/> </extension> <extension url="http://ehelse.no/fhir/StructureDefinition/gd-fregmetadata"> <extension url="registeredTimestamp"> <valueDateTime value="2019-09-05T11:17:43.399+02:00"/> </extension> <extension url="currentInfo"> <valueBoolean value="true"/> </extension> <extension url="source"> <valueString value="KILDE_DSF"/> </extension> <extension url="validFrom"> <valueDateTime value="2019-09-05T11:17:43.399+02:00"/> </extension> </extension> </extension>
The big problem is that I can't make it validate. And I can't figure out why. @David Hay @Grahame Grieve
The official validator claims there is no matching slice for the nested extension "http://ehelse.no/fhir/StructureDefinition/gd-fregmetadata":
Success...validating gd-Person-04021950128-version-2.xml: error:0 warn:0 info:1 Information @ Person.extension[0].extension[1] (line 10, col78) : This element does not match any known slice for the profile http://ehelse.no/fhir/StructureDefinition/gd-person-status
The full example as well as the conformance resources are posted on GitHub: https://github.com/HL7Norway/Grunndata-profiles
Grahame Grieve (Nov 01 2019 at 20:24):
is that today? or before the upgrade?
Grahame Grieve (Nov 01 2019 at 20:25):
validating extension slices is generally a problem right now after the technical corrections - I'll be working on fixing that today
Eric Haas (Nov 02 2019 at 00:02):
(deleted)
Thomas Tveit Rosenlund (Nov 05 2019 at 08:34):
is that today? or before the upgrade?
Yes that was november 1, downloaded the new validator today v4.0.31. And still get this error on the example: https://github.com/HL7Norway/Grunndata-profiles/blob/master/examples/gd-Person-04021950128-version-2.xml
Grahame Grieve (Nov 08 2019 at 05:09):
can you add it as a test case to https://github.com/FHIR/fhir-test-cases/validator ?
Keith Boone (Nov 08 2019 at 07:02):
Has anyone created an extension that is nested more than 2 levels? In theory you can go as deep as you like, but more than 2 seems implementer unfriendly...
I did make this, and it's just as unfriendly, but generally computable and easy to generate. Not even going to try to validate it though. I use it internally to show me how something got produced when mapping from V2 to FHIR, it never goes beyond my converter.
<reference value="DiagnosticOrder/efe37c6bacb5-b8a8-4121-a12f-af41419e"> <extension url="http://ainq.com/fhir/v2/target"> <extension url="Path"> <valueUri value="#subject"></valueUri> </extension> <extension url="Source"> <extension url="Location"> <valueString value="/PATIENT_RESULT(0)/ORDER_OBSERVATION(0)/COMMON_ORDER/ORC"></valueString> </extension> <extension url="Rule"> <valueString value="ORC->DiagnosticOrder"></valueString> </extension> </extension> <extension url="Source"> <extension url="Location"> <valueString value="/PATIENT_RESULT(0)/PATIENT/PID"></valueString> </extension> <extension url="Rule"> <valueString value="PID->Patient"></valueString> </extension> </extension>
Thomas Tveit Rosenlund (Nov 11 2019 at 11:38):
can you add it as a test case to https://github.com/FHIR/fhir-test-cases/validator ?
I could do that, but I don't think it would be very helpful without all the relevant profiles that example actually relies on:
https://github.com/HL7Norway/Grunndata-profiles/tree/master/for-validation-gd-r4
Last updated: Apr 12 2022 at 19:14 UTC