{ "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": "2024-12-17T01:55:34+00:00", "meta": { "profile": [ "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-pop-smap" ] }, "publisher": "HL7 International / FHIR Infrastructure", "jurisdiction": [ { "coding": [ { "code": "001", "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", "display": "World" } ] } ], "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-itemPopulationContext", "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": "4.0.0-ballot", "extension": [ { "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Questionnaire.versionAlgorithm[x]", "valueCoding": { "code": "semver", "system": "http://hl7.org/fhir/version-algorithm" } }, { "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/QuestionnairePopulationTransform" } ], "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": "8fb69dc9-05bf-4af3-909b-198a51c84aea", "kind": null, "url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query", "identifier": [ { "value": "urn:oid:2.16.840.1.113883.4.642.40.17.35.23", "system": "urn:ietf:rfc:3986" } ], "version": "4.0.0-ballot", "contact": [ { "name": "HL7 International / FHIR Infrastructure", "telecom": [ { "value": "http://www.hl7.org/Special/committees/fiwg", "system": "url" } ] }, { "telecom": [ { "value": "http://www.hl7.org/Special/committees/fiwg", "system": "url" } ] } ] }