Appearance
smart-forms/unsupported-query-embedding
error Reports a {{…}} embedding in an x-fhir-query that Smart Forms population does not fill as written.What it checks
Every {{…}} embedding in a named application/x-fhir-query variable, on the Questionnaire root or an item, that the selected Smart Forms population fetches. It reports the first problem of each embedding: population does not recognise it; the Questionnaire declares no launch context; its text is not a valid regular expression; its regular expression does not replace exactly its own embedding, in its query or in another query; the text before the first . is not a launch context; or the path references a name population does not supply there.
Example
Smart Forms fills {{%…}} only from a launch context, and practitioner is not one, so the query is sent with "undefined".
fsh
Instance: unsupported-query-embedding-not-launch-context
InstanceOf: Questionnaire
Usage: #example
* status = #draft
* extension[0].url = "http://hl7.org/fhir/StructureDefinition/variable"
* extension[=].valueExpression.name = "practitioner"
* extension[=].valueExpression.language = #text/fhirpath
* extension[=].valueExpression.expression = "%patient.generalPractitioner.first()"
* extension[+].url = "http://hl7.org/fhir/StructureDefinition/variable"
* extension[=].valueExpression.name = "conditions"
* extension[=].valueExpression.language = #application/x-fhir-query
* extension[=].valueExpression.expression = "Condition?asserter={{%practitioner.id}}"
* extension[+].url = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext"
* extension[=].extension[0].url = "name"
* extension[=].extension[=].valueCoding = http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext#patient
* extension[=].extension[+].url = "type"
* extension[=].extension[=].valueCode = #Patient1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17