Skip to content

smart-forms/expression-evaluated-as-fhirpath ​

error Reports an expression Smart Forms evaluates as FHIRPath whatever its language.

What it checks ​

The Smart Forms renderer evaluates a targetConstraint and an answerOptionsToggleExpression, and population evaluates an initialExpression and an itemPopulationContext, as FHIRPath without checking the language. An expression with expression text in another language FHIR defines is reported where Smart Forms reads it: a targetConstraint with a key, an error or warning severity and a human; a toggle with an option; the first initialExpression of an item that population evaluates; and the first itemPopulationContext of a group with child items, when it has a name.

Example ​

Smart Forms population evaluates this itemPopulationContext on item "Medications" (meds) as FHIRPath although it is written in application/x-fhir-query, so the group is not prefilled.

fsh
Instance: expression-evaluated-as-fhirpath-query-population-context
InstanceOf: Questionnaire
Usage: #example
* status = #draft
* item[0].linkId = "meds"
* item[=].type = #group
* item[=].text = "Medications"
* item[=].extension.url = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext"
* item[=].extension.valueExpression.name = "med"
* item[=].extension.valueExpression.language = #application/x-fhir-query
* item[=].extension.valueExpression.expression = "MedicationStatement?patient=1"
* item[=].repeats = true
* item[=].item[0].linkId = "med-name"
* item[=].item[=].type = #string
* item[=].item[=].text = "Medication"
* item[+].linkId = "conditions"
* item[=].type = #group
* item[=].text = "Conditions"
* item[=].extension.url = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext"
* item[=].extension.valueExpression.name = "condition"
* item[=].extension.valueExpression.language = #text/x-fhir-query
* item[=].extension.valueExpression.expression = "Condition?patient=1"
* item[=].repeats = true
* item[=].item[0].linkId = "condition-name"
* item[=].item[=].type = #string
* item[=].item[=].text = "Condition"