FHIR Chat · Is Patient.communication.language.coding mandatory in STU3? · implementers

Stream: implementers

Topic: Is Patient.communication.language.coding mandatory in STU3?


view this post on Zulip Amy Li (Feb 12 2020 at 00:19):

Our language is free-text from various source systems. So we do not want to map to any particular language code in the Patient resource. Instead we put it in the language.text as such,
<language>
<text value="French" />
</language>
When I validated my Patient resource in the validator, I got an error,
Error @ Patient.contained[2].communication[1].language (line 236, col27) : No code provided, and a code must be provided from the value set http://hl7.org/fhir/ValueSet/all-languages (max value set http://hl7.org/fhir/ValueSet/languages).

This error seems to imply coding is mandatory with or without text. The FHIR specification indicates coding and text are optional.
Can someone please confirm if coding is required regardless of the presence of text or if it's a bug in the validator?

Thanks

view this post on Zulip Lloyd McKenzie (Feb 12 2020 at 00:26):

Resource.language has a data type of code, not CodeableConcept. 'text' is only allowed in the latter. Resource.language must be a code from bcp:47 - in your case it should be <language value="fr"/>

view this post on Zulip Jean Duteau (Feb 12 2020 at 00:26):

without seeing your resource, it will be hard to debug. The error path shows that it's looking at a contained resource? That seems to me like its not validating Patient.communication.language which is a CodeableConcept, but the language element of your contained resource which is a code?

view this post on Zulip Lloyd McKenzie (Feb 12 2020 at 00:28):

Sorry, misread. Patient.communication.language does allow for CodeableConcept. However, it has a 'required' binding to AllLanguages - which means you must have a code from that value set. Bare text isn't allowed.

view this post on Zulip Jean Duteau (Feb 12 2020 at 00:39):

Sorry, misread. Patient.communication.language does allow for CodeableConcept. However, it has a 'required' binding to AllLanguages - which means you must have a code from that value set. Bare text isn't allowed.

@Lloyd McKenzie we should raise this in MnM because I suspect it is rather hard for spec readers to understand that the phrase "but limited to" is specifying a maximum value set which thus imposes a Required binding on the data element. I couldn't find any discussion of the maxValueSet extension anywhere in the spec.

view this post on Zulip Lloyd McKenzie (Feb 12 2020 at 00:48):

Agree

view this post on Zulip Jean Duteau (Feb 12 2020 at 06:03):

done #26028

view this post on Zulip Amy Li (Feb 14 2020 at 20:49):

Thank you, Jean and Lloyd for the clarification.

view this post on Zulip Amy Li (Feb 14 2020 at 22:40):

In the STU3 spec for Patient.communication.language (http://hl7.org/fhir/STU3/patient-definitions.html#Patient.communication.language), there is this comment ,
"The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type."
Based on this comment, we thought using Patient.communication.language.text would be sufficient. Now my problem is to deal with data from source systems that don't code the languages. Is there any suggestion on how I could support plain language names that are not coded?

Thanks,

Amy


Last updated: Apr 12 2022 at 19:14 UTC