FHIR Chat · Validation of Coding · implementers

Stream: implementers

Topic: Validation of Coding


view this post on Zulip Stephan Kristiansen (Sep 14 2018 at 08:03):

Hi.

Using fhir-net-api and have an issue regarding validation. For AllergyIntolerance we have reaction.manifestation which is a CodeableConcept. Currently we don't have access to a code, only the display value and system value. This causes the validation to break.

This is the output:
<reaction>
<manifestation>
<coding>
<system value="urn:oid:2.16.578.1.12.4.1.1.7497"/>
<display value="Anafylaktisk reaksjon"/>
</coding>
</manifestation>
</reaction>

Looking at the BindingValidator (https://github.com/ewoutkramer/fhir-net-api/blob/04059d168a1e302d13cbb2edef809d26123df765/src/Hl7.Fhir.Specification/Validation/BindingValidator.cs) it seems code is mandatory. However, looking at https://www.hl7.org/fhir/datatypes.html#codesystem the cardinality is 0..1.

Any thoughts on this? Is it a bug in the validator or are we interpreting the standard the wrong way?

Thanks,
Stephan

view this post on Zulip Grahame Grieve (Sep 14 2018 at 08:22):

how can you have a display without a code?

view this post on Zulip Stephan Kristiansen (Sep 14 2018 at 08:28):

i don't know. Maybe it's just a dropdown of values selected in the user interface? Not connected to a specific code it seems like. At least not available for us. Thats beside the point here, but appreciate the question.

view this post on Zulip Grahame Grieve (Sep 14 2018 at 08:29):

well, you cannot choose a display without choosing a code. The definition of display is 'the display specified for the code in the system'. No code => no display.

view this post on Zulip Grahame Grieve (Sep 14 2018 at 08:29):

if you just have a text, you should put it in CodeableConcept.text not Coding.display

view this post on Zulip Stephan Kristiansen (Sep 14 2018 at 08:32):

Not really the definition IMO. It could be just a list of display values, with no code associated with it. The standard says 0..1 on code, so seems like it has been thought of. Maybe we have to think differently about where to put the textual description of the reaction.

view this post on Zulip Grahame Grieve (Sep 14 2018 at 09:37):

CodeableConcept.text

view this post on Zulip Lloyd McKenzie (Sep 14 2018 at 14:41):

What is the reason for code being 0..1 in Coding? I think the validator is being more assertive than the specification here. It shouldn't be. I'd be fine with a best practice warning yelling about a display with no code, but I can't see anything that would make this non-conformant.

view this post on Zulip Lloyd McKenzie (Sep 14 2018 at 14:42):

There are absolutely systems that choose to store the displays and not the codes and treat them as codes.

view this post on Zulip Grahame Grieve (Sep 15 2018 at 00:48):

treat what as codes?

view this post on Zulip Yunwei Wang (Sep 18 2018 at 23:53):

The problem here is not conformance. Validation validates code. If a system treat displays as code, then that system should have a way to validate the "code-like" display.


Last updated: Apr 12 2022 at 19:14 UTC