Aidbox / Issues

Issue tracker for Aidbox FHIR backend by Health Samurai
7 stars 0 forks source link

[BUG] ValueSet $expand doesn't always return a display #562

Open vesnushka opened 1 year ago

vesnushka commented 1 year ago

Describe the bug

ValueSet $expand doesn't always return a display

Severity

Major

Steps to reproduce the behavior:

  1. Load terminology http://hl7.org/fhir/ValueSet/yesnodontknow
  2. In REST console try GET /ValueSet/yesnodontknow/$expand It returns the result with missing display for Y and N code
    
    ...
    name: Yes-No-Don't-Know
    resourceType: ValueSet
    expansion:
    timestamp: 2023-06-15T12:35:09.464Z
    identifier: http://hl7.org/fhir/ValueSet/yesnodontknow
    contains:
    - code: 'N'
      system: http://terminology.hl7.org/CodeSystem/v2-0532
    - code: asked-unknown
      system: http://terminology.hl7.org/CodeSystem/data-absent-reason
      display: Don't know
    - code: 'Y'
      system: http://terminology.hl7.org/CodeSystem/v2-0532
    ...
    id: yesnodontknow
    url: http://hl7.org/fhir/ValueSet/yesnodontknow
    version: 4.0.1
    _source: zen.fhir
    ...
3. Meanwhile trying `GET /ValueSet/yesnodontknow` in REST console
returns correct ValueSet with all the displays
```yaml
...
name: Yes-No-Don't-Know
resourceType: ValueSet
expansion:
  contains:
    - code: 'Y'
      system: http://terminology.hl7.org/CodeSystem/v2-0136
      display: 'Yes'
    - code: 'N'
      system: http://terminology.hl7.org/CodeSystem/v2-0136
      display: 'No'
    - code: asked-unknown
      system: http://terminology.hl7.org/CodeSystem/data-absent-reason
      display: Don't know
  timestamp: '2015-07-14T10:00:00Z'
  identifier: urn:uuid:bf99fe50-2c2b-41ad-bd63-bee6919810b4
...
id: yesnodontknow
url: http://hl7.org/fhir/ValueSet/yesnodontknow
version: 4.0.1
_source: zen.fhir

Expected behavior

Request /ValueSet/yesnodontknow/$expand has to return ValueSet with all the displays

...
name: Yes-No-Don't-Know
resourceType: ValueSet
expansion:
  ...
  contains:
    - code: 'N'
      system: http://terminology.hl7.org/CodeSystem/v2-0532
      display: 'No'
    - code: asked-unknown
      system: http://terminology.hl7.org/CodeSystem/data-absent-reason
      display: Don't know
    - code: 'Y'
      system: http://terminology.hl7.org/CodeSystem/v2-0532
      display: 'Yes'
...

Versions: