1

I have seen in Questionnaire FHIR examples that with enableWhen it is possible to enable or not questions depending on whether the answer to another question takes a certain value or not.

 "enableWhen": [
        {
           "question": "1.1",
           "operator": "=",
           "answerCoding": {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0136",
              "code": "Y"
           }
        }
 ],

Is it possible to do this depending on a characteristic of the patient? For example: enable when the sex is female, enable when the patient is between 20 and 40 years old...

Is there a link to examples of this type that I can consult or can someone provide this kind of examples?

fdr
  • 11
  • 2

1 Answers1

1

Have a look at the FHIR SDC specification. See http://hl7.org/fhir/uv/sdc/history.html. In this case, it's worth checking out the continuous integration build version - it's about to be published as a major update

Grahame Grieve
  • 3,538
  • 3
  • 15
  • 17
  • Specifically, look at the enableExpression extension as well as the launchContext extension. The latter lets you make the 'current' Patient available to the form filler logic, while the former allows you to control the appearance of the question based on properties of the resulting %Patient object. – Lloyd McKenzie Jan 03 '22 at 05:09
  • Thanks! and where can I find a launchContext extension example? I couldn't find one in [extension-sdc-questionnaire-launchContext](http://hl7.org/fhir/uv/sdc/2019May/extension-sdc-questionnaire-launchContext.html) – fdr Jan 04 '22 at 13:21
  • See https://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-launchContext.html, which has a list of links to examples using launchContext. – Paul Lynch Feb 10 '22 at 22:02