beda-software / fhir-emr

EMR based on FHIR
MIT License
73 stars 30 forks source link

Creating a dynamic text is not possible #321

Open mlaletina95 opened 1 month ago

mlaletina95 commented 1 month ago

Some questions contain placeholders that rely on the user's previous answers.

For example:

Currently it's impossible to make item.text dynamic.

mlaletina95 commented 1 month ago

It would be helpful if this extension https://build.fhir.org/ig/HL7/sdc/examples.html#using-text-and-cqf-expression is implemented.

atuonufure commented 1 day ago

image

atuonufure commented 1 day ago

Example

  - text: What is your favorite beverage to drink?
    type: string
    linkId: beverageType

  - type: display
    linkId: result
    cqfExpression:
      language: text/fhirpath
      expression: >-
        'Your favorite drink: ' + %QuestionnaireResponse.item.where(linkId='beverageType').answer.value.string