Stream: implementers
Topic: Handling incomplete CodeSystems
Michael Sauer (May 23 2020 at 14:33):
Hi, I'm using SMILE CDR and I like to use a codesystem, for which I can't get all the valid codes.
So I thought it would be a good idea to define the CodeSystem to be a "fragment" (content=fragment). The valueset is described as „extensible“ - but anyway the validation throws an error:
{
"severity": "error",
"code": "processing",
"diagnostics": "Unknown code {http://fhir.uniklinik-freiburg.de/ig/appointment/CodeSystem/UkfUntersuchungenTPCS}855445 for 'http://fhir.uniklinik-freiburg.de/ig/appointment/CodeSystem/UkfUntersuchungenTPCS#855445'",
"location": [
"Appointment.serviceType[3].coding[0]",
"Line 106, Col 10"
]
},
Is there any chance, to use incomplete CodingSystems?
Thanks for your responses
Michael
Lloyd McKenzie (May 23 2020 at 14:39):
@Grahame Grieve
Grahame Grieve (May 23 2020 at 20:21):
what version is this, and how are you testing it?
James Agnew (May 23 2020 at 20:55):
@Michael Sauer - HAPI/Smile CDR's validator doesn't treat CodeSystems with a content of fragment
as meaning that codes not defined in the CodeSystem should pass validation. But I'm not actually sure I'm understanding your question- Is the idea here that code 855445
isn't actually listed in your CodeSystem resource?
Michael Sauer (May 23 2020 at 21:42):
@James Agnew That‘s exactly what I mean. The Codesystem is not under my control and I can get new codes without previously notice. So the example code 855445 is not part of the coding system. Anyway I like to check, that a new resource is conform to the implementation guide.
Michael Sauer (May 23 2020 at 21:47):
@Grahame Grieve I’m using the Koala release. I post a new resource with an unknown code.
James Agnew (May 23 2020 at 23:42):
I'm not actually sure that there is a way in FHIR to say "this code system can contain arbitrary codes" which is really what you need here. At least my understanding of content=fragment
isn't that it can be used to allow arbitrary codes..
I guess what you need here really is a way to configure the validator that "CodeSystem X shouldn't be validated" while not disabling anything else
Lloyd McKenzie (May 24 2020 at 02:01):
Fragment says that you're only exposing part of the code system - which means that any other code value not in that list could be valid and should be treated as a warning, not an error.
James Agnew (May 24 2020 at 19:29):
Thanks Lloyd.
@Michael Sauer I'm ticketing this, will see how hard it would be to make this be a warning instead of an error.
Grahame Grieve (May 25 2020 at 00:38):
the validator already does this
Last updated: Apr 12 2022 at 19:14 UTC