FHIR Chat · Using a terminology service to validate a string/url binding · terminology

Stream: terminology

Topic: Using a terminology service to validate a string/url binding


view this post on Zulip Ewout Kramer (Jul 21 2017 at 08:29):

According to the documentation of $validate-code (https://www.hl7.org/fhir/valueset-operations.html#validate-code), I need to pass in a code + system to the operation. However, when I am validating a binding against a string or uri, I don't have the system. How would I go about doing this?

view this post on Zulip Grahame Grieve (Jul 21 2017 at 11:10):

@Ewout Kramer I call it without a system in those cases. I quickly scanned the documentation, and don't see where it says you need to pass in a system

view this post on Zulip Peter Jordan (Jul 21 2017 at 23:55):

R3 Spec...Section 4.8.16.2...Table of In Parameters for the $validate-code operation.... "Code...The code that is to be validated. If a code is provided, a system must be provided."

view this post on Zulip Robert McClure (Jul 23 2017 at 15:56):

@Ewout Kramer can you provide a real example? I'd not like to see $validate-code drop the requirement for a code system - how would we know what system to validate against? Perhaps what you are trying to do is not best handled by that operation?

view this post on Zulip Grahame Grieve (Jul 23 2017 at 23:20):

when you need to do this - validate a code, string, or uri against a value set, and there's no system at all (string, uri) or there's no immediately available system (code), it's ok for the client to not pass a system to the server, on the basis that the server will check that is has a unique set of codes to validate against (in fact, they don't even need to be unique).

view this post on Zulip Grahame Grieve (Jul 23 2017 at 23:21):

for code, it's possible for the client to root around and figure out the system for a code, based on the metadata, but that's mostly not useful for the client - it's mostly just tax.

view this post on Zulip Grahame Grieve (Jul 23 2017 at 23:22):

it is useful if the client is going to pull off the system/value pair and use it elsewhere. In this case, if the client looks up the system it thinks it's going to use, then the terminology server can check that.

view this post on Zulip Grahame Grieve (Jul 23 2017 at 23:23):

Note that in all the cases we have where a field of type code is bound to a value set, the tooling ensures that the codes are unique

view this post on Zulip Yunwei Wang (Jul 23 2017 at 23:27):

What's the use case for validating a binding against a url or string in a value set?

view this post on Zulip Robert McClure (Jul 24 2017 at 02:04):

@Grahame Grieve Let me see if I'm following: when a client sends a code and asks if the code is in the value set, all the server should have to do is see if the code (string) is in the list of expansion codes in the value set and the system doesn't matter?

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:24):

on my server, I check that there's no duplicate codes in the value set before I decide that whether to check the code valid. And there's no display if there's no system

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:24):

we use this in places like postcode, where there's a list of allowable post codes but all we have a string

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:24):

the instance validator also performs additional checks before making the call

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:25):

I think I could beef the checks up on my server and not allow this for real code systems like LOINC and SNOMED CT - it's certainly not intended for that kind of context

view this post on Zulip Robert McClure (Jul 24 2017 at 02:37):

well, I'm kinda convinced that validating a code with no code system against a value set, even with duplicates and multiple code systems may not be a bad thing. I've not thought of a reason that the server has to know the correct code system. I'd like to find a use case that requires it but don't know of one off hand. I agree about SCT and LOINC in theory but honestly can't think of why they need to be different.

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:38):

well, there's two different questions
- is this a valid code given the binding
- is this a valid concept given the binding

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:39):

in the first case, it doesn't matter what the system is, it's valid if it's valid for at least one of the possible systems

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:39):

in the second case, then it does matter. mostly. It's a case do you/I understand - where you is the tx server, and I am the client

view this post on Zulip Robert McClure (Jul 24 2017 at 02:40):

But I'm assuming that th3e second case is not in play, as a requirement. Certainly you need to allow the code system to be sent.

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:40):

I figure that if you pass a display, and ask for that to be validated to, you've definitely stepped over the line into the second question, and we want people to think in concepts whenever they can

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:40):

so we encourage sending the system

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:41):

but yes. in this case, it's not.

view this post on Zulip Robert McClure (Jul 24 2017 at 02:42):

A display would not be a code and absolutely you'd need it with a display. So my comments are for a code only.

view this post on Zulip Robert McClure (Jul 24 2017 at 02:43):

But are we off track regarding the original issue? I really don't uderstand how a uri is special - it would just be a code if sent using validate-code, right?

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:44):

yep. string and uri get mentioned here because these are bound in the absence of a system

view this post on Zulip Grahame Grieve (Jul 24 2017 at 02:44):

uri is not otherwise special

view this post on Zulip Robert McClure (Jul 24 2017 at 02:45):

but how do you do a match on a uri in a value set? would it be treated like a code is?

view this post on Zulip Michael Lawley (Nov 23 2017 at 02:07):

We always require a code system in order to expand a valueset involving that code system -- I could claim that this is because there may be errors in the valueset definition (which is true), but the main motivating factor is that it's a requirement of our implementation strategy.


Last updated: Apr 12 2022 at 19:14 UTC