{
"description": "FhirPath based prepopulation example that leverages a source query to extract data outside the launch context",
"_filename": "example/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-source-query.json",
"package_name": "hl7.fhir.uv.sdc",
"subjectType": [ "Patient" ],
"date": "2022-02-16T19:40:22+11:00",
"meta": {
"profile": [ "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-pop-smap" ]
},
"publisher": "HL7 International - FHIR Infrastructure Work Group",
"jurisdiction": [ {
"coding": [ {
"code": "001",
"system": "http://unstats.un.org/unsd/methods/m49/m49.htm"
} ]
} ],
"name": "FhirPathPrepopSourceQuery",
"item": [ {
"item": [ {
"item": [ {
"text": "Participant ID number",
"type": "string",
"linkId": "participant-id"
}, {
"text": "Family name",
"type": "string",
"linkId": "family-name",
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%patient.name.first().family.first()"
}
} ]
}, {
"text": "Given name(s)",
"type": "string",
"linkId": "given-names",
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%patient.name.first().given.first()"
}
} ]
}, {
"text": "Date of birth",
"type": "date",
"linkId": "dob",
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%patient.birthDate"
}
} ]
}, {
"text": "Number of active Conditions",
"type": "integer",
"linkId": "condition-count",
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%PrePopQuery.entry.first().resource.total"
}
} ]
} ],
"text": "Participant details",
"type": "group",
"linkId": "part-details",
"repeats": false
}, {
"item": [ {
"text": "Name",
"type": "string",
"linkId": "med-name",
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%mrItem.medication.select(iif(text.exists(), text, coding.display.first()))"
}
} ]
}, {
"text": "Status",
"type": "string",
"linkId": "med-status",
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%mrItem.status.toString()"
}
} ]
}, {
"text": "Standard Category",
"type": "choice",
"linkId": "med-category",
"repeats": true,
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%mrItem.category.coding.where(system='http://terminology.hl7.org/CodeSystem/medicationrequest-category').code"
}
} ],
"answerValueSet": "http://hl7.org/fhir/ValueSet/medicationrequest-category"
} ],
"text": "Medications",
"type": "group",
"linkId": "meds",
"repeats": true,
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"name": "mrItem",
"language": "text/fhirpath",
"expression": "PrePopQuery.entry.skip(1).first().resource",
"description": "The set of MedicationRequests from the search context"
}
} ]
} ],
"type": "group",
"linkId": "grp"
} ],
"type": null,
"experimental": "true",
"resourceType": "Questionnaire",
"title": "Questionnaire Pre-Population",
"package_version": "3.0.0-preview",
"extension": [ {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
"extension": [ {
"url": "name",
"valueCoding": {
"code": "patient",
"system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
"display": "Patient"
}
}, {
"url": "type",
"valueCode": "Patient"
}, {
"url": "description",
"valueString": "The patient that is to be used to pre-populate the form"
} ]
}, {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-sourceQueries",
"valueReference": {
"reference": "#PrePopQuery"
}
}, {
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-sourceStructureMap",
"valueCanonical": "http://hl7.org/fhir/uv/sdc/StructureMap/questionnaire-population-transform"
} ],
"contained": [ {
"id": "PrePopQuery",
"type": "batch",
"entry": [ {
"fullUrl": "urn:uuid:43c8e58d-099f-425c-a219-564266a518dc",
"request": {
"url": "Patient?_id={{%37patient.id}}",
"method": "GET"
}
}, {
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"request": {
"url": "Condition?patient={{%37patient.id}}&active=true",
"method": "GET"
}
}, {
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e060",
"request": {
"url": "MedicationStatement?patient={{%37patient.id}}&active=true&_include=MedicationStatement:medication",
"method": "GET"
}
} ],
"resourceType": "Bundle"
} ],
"status": "active",
"id": "4afcf424-8762-4177-9fbb-2cf197075ea1",
"kind": null,
"url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query",
"version": "3.0.0-preview",
"contact": [ {
"telecom": [ {
"value": "http://hl7.org/Special/committees/fiwg",
"system": "url"
} ]
} ]
}