FHIR Chat · Organization.identifier[0].type.code Error · IG creation

Stream: IG creation

Topic: Organization.identifier[0].type.code Error


view this post on Zulip Igor Sirkovich (Dec 19 2019 at 00:14):

For the example resources where identifier.type is populated, IG Publisher generates a "Missing element 'code'" error, even though type.coding.code is populated. For example, in the following Organization example, the error path is Organization/Org45: Organization.identifier[0].type.code

{
"resourceType": "Organization",
"id": "Org45",
"identifier": [{
"type": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NPI",
"display": "National provider identifier"
}]
},
"system": "http://hl7.org/fhir/sid/us-npi",
"value": "345678"
}
],
"active": true,
"name": "Insurance XYZ"
}

view this post on Zulip Grahame Grieve (Dec 19 2019 at 00:15):

can I reproduce this?

view this post on Zulip Igor Sirkovich (Dec 19 2019 at 00:17):

I think so. Do I need to send you any additional information to help reproduce this?

view this post on Zulip Grahame Grieve (Dec 19 2019 at 00:18):

well, I'm pushed for tiem. If you just give me an IG repo, it will only take me a few minutes to reproduce it. Else I could spend hours trying to find the right combination of conditions to reproduce it. Because it's not expected behavior but I've seen it once somewhere else

view this post on Zulip Igor Sirkovich (Dec 19 2019 at 00:23):

Gotcha. It's CARIN BB. I think using one of the two Organization resources would be the easiest to reproduce this error.

view this post on Zulip Grahame Grieve (Dec 19 2019 at 02:42):

so, reproduced and understood. There's a pattern error in all the Carin profiles- an element of type CodeableConcept has a fixedValue of type Coding applied to it

So 2 changes:

  • Improve the error message about missing element to say that it's missing in regard to a fixed value, and where the fixed value comes from
  • make it an explicit error if the fixed value has an illegal type for the instance

view this post on Zulip Grahame Grieve (Dec 19 2019 at 02:43):

release with those changes on the way now

view this post on Zulip Igor Sirkovich (Dec 19 2019 at 03:06):

Thank you @Grahame Grieve! I'm going to have a look at the Carin profiles. I'm wondering what would be your recommendation for fixing the pattern error.

view this post on Zulip Grahame Grieve (Dec 19 2019 at 03:06):

change it to CodeableConcept which is what it's supposed to be

view this post on Zulip Igor Sirkovich (Dec 19 2019 at 03:18):

Thank you! Yes, I've just opened the profile and can see this "patternCoding" now.


Last updated: Apr 12 2022 at 19:14 UTC