FHIR Chat · hl7 validator errors · implementers

Stream: implementers

Topic: hl7 validator errors


view this post on Zulip Ardon Toonstra (Mar 26 2020 at 13:02):

Could you help me out understanding what's going wrong? Attached is an xml instance (source) and a to json converted instance (of test patients)

A nullFlavor extension is used on the .whenHandedOver element like this:
<whenHandedOver>   <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor">    <valueCode value="NI"/>   </extension> </whenHandedOver>  
This is converted to json like this:

"whenHandedOver": null,
   "_whenHandedOver": {
                    "extension": [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor",
                            "valueCode": "NI"
                        }
                    ]
                }
},

The fhir validator (FHIR Validation tool Version 4.1.60-SNAPSHOT) gives an error for the json:

Error @ Bundle.entry[1].resource.whenHandedOver (line 1, col5240) : This property must be an simple value, not a primitive property

And for XML:

Error @ Bundle.entry[1].resource.whenHandedOver (line 102, col32) : The extension http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor is not allowed to be used at this point (allowed = e:Any; this element is [[Bundle.entry.resource.whenHandedOver, BackboneElement.resource.whenHandedOver, MedicationDispense.whenHandedOver, dateTime])

I don’t know what’s going on here. Anyone an idea?

I believe the extension is used correctly.
My first attempt was to remove the null in json because that isn’t correct according to the FHIR spec. But doesn't remove the error for json and is of course not related to the xml validation error. Henegouwen.xml Henegouwen_null.json

view this post on Zulip Ardon Toonstra (Mar 26 2020 at 14:04):

One of the error's looks related to the question in this zulip chat: https://chat.fhir.org/#narrow/stream/179177-conformance/topic/Context.20for.20Normative.20Version

view this post on Zulip Lloyd McKenzie (Mar 26 2020 at 14:24):

"whenHandedOver": null is not valid. You should only have the _whenHandedOver if you don't have a 'value'.

view this post on Zulip Ardon Toonstra (Mar 26 2020 at 14:45):

I was aware that it was not valid. Validating after removing that part still produced the error's.

view this post on Zulip Grahame Grieve (Mar 27 2020 at 01:07):

@Ardon Toonstra what version of FHIR is this for? I don't get an error from the validator

view this post on Zulip Grahame Grieve (Mar 27 2020 at 02:45):

r3.0. I can fix that

view this post on Zulip Grahame Grieve (Mar 27 2020 at 02:46):

but this...

This property must be an simple value, not a primitive property

should read

This property must be an simple value, not a null

will be fixed

view this post on Zulip Ardon Toonstra (Mar 27 2020 at 08:40):

It was indeed STU3. Thnx Grahame for the confirmation.


Last updated: Apr 12 2022 at 19:14 UTC