Stream: implementers
Topic: CodeSystem with codes from multiple systems
Bob Pratt (Mar 01 2021 at 14:16):
In our health system we have a number of coding system that were created in house. The easy path to codify these in FHIR would be to create a code system for each of these source code systems. Ideally we would like to have 1 CodeSystem resource for all of the codes. I think this would be ok if we could guarantee that there is no duplication of a code across the source systems. Use of the Designation field could be a way to differentiate the codes, but I think there is still the issue of doing a lookup or search returning multiple codes or just not working at all. I wonder if anyone has faced this kind of scenario and has any thoughts on how avoid the multitude of code system resources.
Lloyd McKenzie (Mar 01 2021 at 14:37):
Designation is for human display, not for computable differentiation. You can't count on it being shared. It's totally fine to dump all your codes in one big code system if they're all unique (and will continue to remain unique as you continue to define new codes). However, think about how you'll define value sets that will refer to the specific subsets of codes you need. You may need to put properties on your codes or make them specializations of abstract codes to allow easy filtering with value sets. When you do a search against CodeSystem you'll always get back the full CodeSystem (with all the codes). The $lookup operation will only give you the specific code you're seeking.
Daniel Venton (Mar 02 2021 at 16:58):
Would anybody outside of your organization ever need to know your dictionary (code system) definitions? If so then a custom in-house dictionary doesn't help anybody. I'd suggest you convert all of your internal items to standards based valuesets/dictionaries. Big work I know, but pays off in the long run with the complete absence of translation processes.
Bob Pratt (Mar 03 2021 at 21:49):
Thanks for the responses. I have been leaning toward separate code systems . it really makes sense, especially since I cannot guarantee a collision of codes across source systems. However one approach would be to allow these, and designate each appropriately. the $lookup (I think but have not tested) would return both and the consumer could siphon out which one they need in their context based on the designation. This I suppose could work for building valuesets based on the code system as well. Sounds Clunky though. Thoughts ?
Lloyd McKenzie (Mar 03 2021 at 22:42):
If you do a $lookup on a code, you can only get back one code - if there were multiple matches, that'd be an error.
Last updated: Apr 12 2022 at 19:14 UTC