Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordinal extension not supported in contained Valueset when using compose but works on expansion #621

Open
nielmdrec opened this issue Feb 7, 2024 · 2 comments

Comments

@nielmdrec
Copy link

If the Questionnaire contains a Valueset that uses the ordinal extension within an expansion, then the SMART forms renderer is able to display it without issues.

However, if the same extension is used within a compose, the valueset causes this error:

_There was an error fetching options from the terminology server_

Details:

  1. the extension in question is:
    http://hl7.org/fhir/StructureDefinition/ordinalValue
  2. This is an example that works (using expansion):
    {
    "resourceType":"ValueSet",
    "id":"Mobility",
    "name":"Mobility",
    "title":"MobilityScore",
    "status":"draft",
    "description":"Mobility Score",
    "expansion":{
    "timestamp":"2023-09-01T11:16:50+10:00",
    "contains":[
    {
    "extension":[
    {
    "url":"http://hl7.org/fhir/StructureDefinition/ordinalValue",
    "valueDecimal":0
    }
    ],
    "system":"http://fhir.medirecords.com/CodeSystem/Mobility",
    "code":"0",
    "display":"Complete Independence and Modified Independence - may use any aid, e.g. walking stick"
    }
    ...
  3. This is is an example that causes the error (using compose):
    {
    "resourceType":"ValueSet",
    "id":"Mobility",
    "name":"Mobility",
    "title":"MobilityScore",
    "status":"draft",
    "description":"Mobility Score",
    "compose":{
    "timestamp":"2023-09-01T11:16:50+10:00",
    "include":[
    {
    "system":"http://fhir.medirecords.com/CodeSystem/Mobility",
    "concept": [
    {
    "extension":[
    {
    "url":"http://hl7.org/fhir/StructureDefinition/ordinalValue",
    "valueDecimal":0
    }
    ],
    "code":"0",
    "display":"Complete Independence and Modified Independence - may use any aid, e.g. walking stick"
    }
    ]
    }
    ...
@fongsean
Copy link
Collaborator

AFAIK, the $expand operation typically only looks at Valueset.expansion as the expansion result. Ideally, the ordinalValue extension should be included in Valueset.expansion, not the other way around (renderer looking in ValueSet.compose.include).

There is some discussion here on Zulip:
https://chat.fhir.org/#narrow/stream/179202-terminology/topic/ordinalValue.20extension
https://chat.fhir.org/#narrow/stream/179202-terminology/topic/.24expand.20with.20extensions

I'm still not sure what's the best workaround for this, perhaps we can do as you suggested at the moment. But I might wait for a bit more updates from Brian before proceeding.

Please let me know if it's a blocker.

@nielmdrec
Copy link
Author

nielmdrec commented Feb 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants