FHIR Chat · Use a subset when codesystem is set to required · implementers

Stream: implementers

Topic: Use a subset when codesystem is set to required


view this post on Zulip Anders Almås (May 28 2018 at 10:42):

Is it allowed to create a value set and take a subset of codes, when it says in the specification that the codesystem is required? I am looking at the AllergyIntolerance - resource and the element "verificationStatus". I only need 2 of the 4 values in the code system.

view this post on Zulip Jose Costa Teixeira (May 28 2018 at 12:52):

Seems fair to constrain within the set.

view this post on Zulip Jose Costa Teixeira (May 28 2018 at 12:52):

required : To be conformant, the concept in this element SHALL be from the specified value set

view this post on Zulip Jose Costa Teixeira (May 28 2018 at 12:53):

it doesn't say that systems SHALL support all of the concepts.

view this post on Zulip Jose Costa Teixeira (May 28 2018 at 12:53):

I don't know if there is any recommendation otherwise.

view this post on Zulip Eric Haas (May 28 2018 at 18:32):

yes

view this post on Zulip John Carter (May 28 2018 at 21:13):

Is it allowed to create a value set and take a subset of codes, when it says in the specification that the codesystem is required? I am looking at the AllergyIntolerance - resource and the element "verificationStatus". I only need 2 of the 4 values in the code system.

If your system will ever receive data from others, you should be able to process all of the codes.

view this post on Zulip Grahame Grieve (May 28 2018 at 21:36):

agree with John but that's advice, not a requirement to be conformant to the specification

view this post on Zulip Michael Donnelly (Jun 05 2018 at 20:44):

I only half agree with @John Carter's point. If you read a resource from a server, you should be able to understand or at least gracefully handle any legitimate value it returns. On other other hand, if you create a resource on a server, you should be prepared to have it reject some values for any number of reasons.

view this post on Zulip Michael Donnelly (Jun 05 2018 at 20:45):

The server's internal enum might predate the advent of the verificationStatus value set, so there's no relevant concept in their database for some values in that set.

view this post on Zulip Michael Donnelly (Jun 05 2018 at 20:46):

Or there are business rules about what values a client is allowed to set. These might even be conditional.

view this post on Zulip John Carter (Jun 05 2018 at 21:19):

I only half agree with @John Carter's point. If you read a resource from a server, you should be able to understand or at least gracefully handle any legitimate value it returns. On other other hand, if you create a resource on a server, you should be prepared to have it reject some values for any number of reasons.

I'm fully in agreement with your point, @Michael Donnelly . I was only considering the first case, that the server should process all the codes in the value set when it reads resources from elsewhere. But you are certainly correct for the other sense of "receive..." that servers can set their own more restrictive rules for the resources created on them.

view this post on Zulip Simone Heckmann (Jun 07 2018 at 14:58):

Well, at least for national or domain specific profiles it's fair to say "these codes don't happen here" and if they do, the resource is not valid within the scope of this profile.


Last updated: Apr 12 2022 at 19:14 UTC