FHIR Chat · Device.type.text out of order · IG creation

Stream: IG creation

Topic: Device.type.text out of order


view this post on Zulip Brian Reinhold (Jan 22 2021 at 10:12):

5:20 AM
Oh man, typed something wrong and lost all my text. I hate web apps.

The PHD IG has been sitting for more than a year after being balloted and accepted. Publishing back then just never got done as covid took over. In any case to finally move forward on that the IG had to be updated to the new publisher. It was an easy task since the original IG used Lloyd's framework and the new publisher was essentially the same thing with a few shifts of directories. There was no need to change any content.

However, the QA gives new errors that were not present previously, most of which I dont understand. This is one of them - and there are many of the same type of errors reported:

StructureDefinition.where(url = 'http://hl7.org/fhir/uv/phd/StructureDefinition/PhdDevice') error The element Device.type.text is out of order (and maybe others after it)

As far as I can tell the text element is exactly where it should be - the Device.type is a CodeableConcept. So what is this error, how do I fix it, and why does it occur?

view this post on Zulip Brian Reinhold (Jan 22 2021 at 10:20):

(deleted)

view this post on Zulip ryan moehrke (Jan 22 2021 at 14:49):

usually the out of order error means just that, in xml (https://www.hl7.org/fhir/xml.html) elements are expected to be in the order that the spec defines them in, so Device.type being a codableConcept means that its two child elements, coding and text, are expected to be in that order (i.e. not text and then coding) image.png

view this post on Zulip Lloyd McKenzie (Jan 22 2021 at 15:03):

If you were typing and accidentally hit escape, your text will be saved in Zulip as a draft - just click on the 'drafts' link. (Just a note for the future @Brian Reinhold )

view this post on Zulip Brian Reinhold (Jan 22 2021 at 15:24):

ryan moehrke I have JSON and not xml but the text IS in the correct place, yet I get the error everywhere I have a CodeableConcept and a text element. For example, this one

    "type": {
        "coding": [
            {
                "system": "urn:iso:std:iso:11073:10101",
                "code": "65573"
            }
        ],
        "text": "MDC_MOC_VMS_MDS_SIMP"
    },

view this post on Zulip ryan moehrke (Jan 22 2021 at 15:42):

actually, looking at your error, is the 'out of order' error on an instance of the Device resource? or the StructureDefinition resource for the PhdDevice profile itself?

view this post on Zulip Brian Reinhold (Jan 22 2021 at 16:05):

@_**ryan moehrke
Its actually on a structure definition. However, it looks fine to me. Its like all the other codeable concepts that I do not touch (at least in the resolved displays). I don't know how to display that here.

view this post on Zulip Sarah Gaunt (Jan 22 2021 at 20:56):

Do you have a snapshot in your structuredefinition? If everything looks correct in your differential and you have a snapshot, try deleting the snapshot.

view this post on Zulip Sarah Gaunt (Jan 22 2021 at 21:11):

The other thing to mention is that that error is quite often a red herring - your missing or out of order issue will likely be before the element that it is telling you about.

view this post on Zulip Sarah Gaunt (Jan 22 2021 at 21:39):

But I think it's this in the StructureDefinition:
image.png
Device.type.text needs to be after Device.type.coding

view this post on Zulip Brian Reinhold (Jan 22 2021 at 23:03):

Sarah Gaunt
It IS after the Device.type.coding

view this post on Zulip Sarah Gaunt (Jan 22 2021 at 23:10):

But when I looked at the file in Git, it wasn't. Maybe I'm looking in the wrong place? This is the file I was looking at: https://github.com/HL7/PHD/blob/master/input/resources/PhdDevice.xml

view this post on Zulip Sarah Gaunt (Jan 22 2021 at 23:10):

Line 241

view this post on Zulip Sarah Gaunt (Jan 22 2021 at 23:12):

It looks like it's correct in the example you posted above, but it's the structuredefinition that is wrong.

view this post on Zulip Brian Reinhold (Jan 25 2021 at 10:24):

Sarah Gaunt said:

It looks like it's correct in the example you posted above, but it's the structuredefinition that is wrong.

It IS is the wrong place. I wonder why? I coded the gateway long before I ever made the structure definition. I find that all my structure definition text elements are in the wrong place though they are correct in all actual code implementations that generate resources from PHDs.


Last updated: Apr 12 2022 at 19:14 UTC