Stream: terminology
Topic: Code System Operations
Russ Hamm (Jan 19 2017 at 17:44):
Seeking clarification on the Code System Resource.
The FHIR CodeSystem Resource specifies three operations ($lookup, $subsumes, $compose), but there is currently no way to validate that a concept code is a valid code in the code system (similar to the $validate-code operation on the ValueSet Resource).
How would one go about validating that a concept code is valid in a given code system?
One way would be to do a $lookup and looking for null result, but I don't see this specified anywhere in the specification.
Another option would be to use the implicit value set for all codes in the code system and do a Value Set $validate-code.
Have either of the above options been considered and recommended, or is a new Code System Resource Operation in order here?
Peter Jordan (Jan 19 2017 at 19:02):
Thus far, I've used the $validate-code operation on the implicit value set for the all of the codes in the larger code systems on my terminology server (e.g. SCT & LOINC).
Rob Hausam (Jan 19 2017 at 22:07):
I mentioned $validate-code on the implicit value set for "all codes" for the code system to Russ as the most likely option currently. But we might want to have a more explicit (and obvious) mechanism for this? Probably $validate-code also on CodeSystem - so that you could validate on either the value set or the code system explicitly?
Michael Lawley (Jan 19 2017 at 22:23):
I think the $validate-code option is reasonable, but also that $lookup is the more direct option. I'd prefer to avoid a proliferation of operations and instead document this use-case in the spec. The gotcha here is clearly articulating appropriate behaviour of $lookup for a composite code where the code system supports composition. E.g., language codes, UCUM, and SNOMED CT
Russ Hamm (Jan 19 2017 at 22:27):
A $validate-code operation at the Code System resource level seems to align with the CTS2 "exists" or "existsInCodeSystem" operations on the Entity Description Service which is used to determine if the specified Entity exists in the specified code system version.
In this context an Entity is analogous to a concept.
Peter Jordan (Jan 20 2017 at 02:44):
I guess that it boils down to the use case; does a user wish to validate that a code is a valid member of a value set, or a code system? If it's the later then, as Michael says, $lookup may be the more direct option.
Grahame Grieve (Jan 20 2017 at 10:19):
it would be good anyway to clarify what lookup does when there's no such code. The answer should be an OperationOutcome... so it serves to validate
Rob Hausam (Jan 20 2017 at 12:58):
@Grahame Grieve Yes, it should be an OperationPutcome. And if we clarify that behavior, then I think using $lookup would work.
Peter Jordan (Jan 20 2017 at 18:20):
Looking at the spec, the ValueSet $validate-code
operation returns a Parameters Resource with result=false if the validation fails so, unless that is incorrect, perhaps the CodeSystem $lookup
operation should behave in the same way? Maybe for R4 as there is no R3 $lookup out parameter that indicates failure?
Russ Hamm (Jan 23 2017 at 20:28):
Since Code Systems and Value Sets are distinct animals I see both use cases being of value.
For example:.
1. Is '22298006' a valid concept identifier in SNOMED?
2. Is '22298006' a valid concept identifier in the Ischemic Heart Disease Value Set?
Is it reasonable to assume that receiving a null result from a $lookup operation on a Code System implies that the conce does not exist in the code system? I would prefer to submit a $validate operation for a given code on a Code System, and if it retunres "true", then proceed with a $lookup to obtain whatever metadata I may be interested in.
Russ Hamm (Jan 23 2017 at 20:33):
I like that.
Rob Hausam (Jan 25 2017 at 18:53):
We can do this sufficiently in ValueSet $validate-code, I think - GF#12700. We may still want to enhance the behavior of the $lookup response when presented with an invalid code, as well.
Grahame Grieve (Feb 06 2017 at 02:47):
valid = false is different from validate failed with operation outcome
Grahame Grieve (Feb 06 2017 at 02:48):
$lookup should return an operation outcome - at least for DSTU3. Is there a task to make this explicit?
Rob Hausam (Feb 06 2017 at 02:55):
We voted on GF#12700 on Thursday, to add $validate-code also to CodeSystem, but it didn't address the operation outcome - so we don't currently have a task for that.
Last updated: Apr 12 2022 at 19:14 UTC