Aidbox / Issues

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

[BUG] Conversion of the Aidbox format questionnaire into FHIR-compliant format (launchContext) #558

Open atuonufure opened 1 year ago

atuonufure commented 1 year ago

Describe the bug When converting a questionnaire from Aidbox format to FHIR, LaunchContext does not match the FHIR standard.

Severity Critical

Steps to reproduce the behavior: Sample questionnaire: https://github.com/beda-software/fhir-emr/blob/5d9f5de88c66af6201c2841ddae6320884670711/resources/seeds/Questionnaire/allergies.yaml#L15

Sample launchContext:

launchContext:
    - name:
          code: Patient
      type: 
        - Patient
    - name:
          code: Author
      type: 
        - Resource

LaunchContext in zen profile: https://github.com/beda-software/fhir-emr/blob/5d9f5de88c66af6201c2841ddae6320884670711/zenproject/zrc/questionnaire-profile.edn#L87

In Aidbox, open the questionnaire and try to convert it from Aidbox format to FHIR.

We get the questionnaire with launchContext in a format that does not conform to the FHIR standard.

Expected behavior Conversion of the Aidbox format questionnaire into FHIR-compliant format.

Versions:

ir4y commented 1 year ago

Now Aidbox converts launch context to

extension:
  - url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext
    type:
      - Patient
    extension:
      - url: name
        valueCoding:
          code: Patient

While it should be

extension:
  - url: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext
    extension:
      - url: name
        valueCoding:
          code: Patient
      - url: type
        valueCode : Patient