How can I filter the options in a questionnaire fo...
# support
o
My questionnaire has an organization resource input like so: { linkId: "insurance", text: "Insurance Provider", type: "reference", required: true, extension: [ { url: "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource", valueCode: "Organization", }, ], }, This works, the problem is that I am using "organizations" for two different purposes, 1 is for limiting practitioners to their own patients' data, and 2 is for creating insurance provider options. How can I tell it here, for example, to only show organizations where the "type" is "Payer"?
m
Hi @oscadev ! You can add a filter resources that are selected by the form, using
questionnaire-referenceFilter
, which uses search parameters to filter the options that can be selected by the dropdown. For example:
Copy code
"extension": [
            {
              "id": "reference-insurance",
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/fhir-types",
                    "display": "Organizations",
                    "code": "Organization"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter",
              "valueString": "active=true"
            }
          ]
137 Views