| Package | hl7.fhir.uv.sdc |
| Resource Type | Questionnaire |
| Id | questionnaire-sdc-test-fhirpath-prepop-source-query |
| FHIR Version | R4 |
| Source | http://hl7.org/fhir/uv/sdc/https://build.fhir.org/ig/HL7/sdc/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-source-query.html |
| URL | http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query |
| Version | 4.0.0-ballot |
| Status | active |
| Date | 2025-08-07T06:58:13+00:00 |
| Name | FhirPathPrepopSourceQuery |
| Title | Questionnaire Pre-Population |
| Realm | uv |
| Authority | hl7 |
| Description | FhirPath based prepopulation example that leverages a source query to extract data outside the launch context |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Generated Narrative: Questionnaire questionnaire-sdc-test-fhirpath-prepop-source-query
| LinkID | Text | Cardinality | Type | Description & Constraints |
|---|---|---|---|---|
![]() | FhirPath based prepopulation example that leverages a source query to extract data outside the launch context | Questionnaire | http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query#4.0.0-ballot | |
![]() ![]() | null | 0..1 | group | |
![]() ![]() ![]() | Participant details | 0..1 | group | |
![]() ![]() ![]() ![]() | Participant ID number | 0..1 | string | |
![]() ![]() ![]() ![]() | Family name | 0..1 | string | |
![]() ![]() ![]() ![]() | Given name(s) | 0..1 | string | |
![]() ![]() ![]() ![]() | Date of birth | 0..1 | date | |
![]() ![]() ![]() ![]() | Number of active Conditions | 0..1 | integer | |
![]() ![]() ![]() | Medications | 0..* | group | |
![]() ![]() ![]() ![]() | Name | 0..1 | string | |
![]() ![]() ![]() ![]() | Status | 0..1 | string | |
![]() ![]() ![]() ![]() | Standard Category | 0..* | choice | Value Set: Medication request category codes |
Bundle #PrePopQuery
Bundle PrePopQuery of type batch
Entry 1 - fullUrl = urn:uuid:43c8e58d-099f-425c-a219-564266a518dc
Request:
GET Patient?_id={{%37patient.id}}
Entry 2 - fullUrl = urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059
Request:
GET Condition?patient={{%37patient.id}}&active=true
Entry 3 - fullUrl = urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e060
Request:
GET MedicationStatement?patient={{%37patient.id}}&active=true&_include=MedicationStatement:medication
{
"resourceType": "Questionnaire",
"id": "questionnaire-sdc-test-fhirpath-prepop-source-query",
"meta": {
"profile": [
"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-pop-smap"
]
},
"text": {
"status": "extensions",
"div": "<!-- snip (see above) -->"
},
"contained": [
{
"resourceType": "Bundle",
"id": "PrePopQuery",
"type": "batch",
"entry": [
{
"fullUrl": "urn:uuid:43c8e58d-099f-425c-a219-564266a518dc",
"request": {
"method": "GET",
"url": "Patient?_id={{%37patient.id}}"
}
},
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"request": {
"method": "GET",
"url": "Condition?patient={{%37patient.id}}&active=true"
}
},
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e060",
"request": {
"method": "GET",
"url": "MedicationStatement?patient={{%37patient.id}}&active=true&_include=MedicationStatement:medication"
}
}
]
}
],
"extension": [
{
"url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Questionnaire.versionAlgorithm[x]",
"valueCoding": {
"system": "http://hl7.org/fhir/version-algorithm",
"code": "semver"
}
},
{
"extension": [
{
"url": "name",
"valueCoding": {
"system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
"code": "patient",
"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-launchContext"
},
{
"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"
}
],
"url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query",
"identifier": [
{
"system": "urn:ietf:rfc:3986",
"value": "urn:oid:2.16.840.1.113883.4.642.40.17.35.23"
}
],
"version": "4.0.0-ballot",
"name": "FhirPathPrepopSourceQuery",
"title": "Questionnaire Pre-Population",
"status": "active",
"experimental": true,
"subjectType": [
"Patient"
],
"date": "2025-08-07T06:58:13+00:00",
"publisher": "HL7 International / FHIR Infrastructure",
"contact": [
{
"name": "HL7 International / FHIR Infrastructure",
"telecom": [
{
"system": "url",
"value": "http://www.hl7.org/Special/committees/fiwg"
}
]
},
{
"telecom": [
{
"system": "url",
"value": "http://www.hl7.org/Special/committees/fiwg"
}
]
}
],
"description": "FhirPath based prepopulation example that leverages a source query to extract data outside the launch context",
"jurisdiction": [
{
"coding": [
{
"system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code": "001",
"display": "World"
}
]
}
],
"item": [
{
"linkId": "grp",
"type": "group",
"item": [
{
"linkId": "part-details",
"text": "Participant details",
"type": "group",
"repeats": false,
"item": [
{
"linkId": "participant-id",
"text": "Participant ID number",
"type": "string"
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%patient.name.first().family.first()"
}
}
],
"linkId": "family-name",
"text": "Family name",
"type": "string"
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%patient.name.first().given.first()"
}
}
],
"linkId": "given-names",
"text": "Given name(s)",
"type": "string"
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%patient.birthDate"
}
}
],
"linkId": "dob",
"text": "Date of birth",
"type": "date"
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%PrePopQuery.entry.first().resource.total"
}
}
],
"linkId": "condition-count",
"text": "Number of active Conditions",
"type": "integer"
}
]
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext",
"valueExpression": {
"description": "The set of MedicationRequests from the search context",
"name": "mrItem",
"language": "text/fhirpath",
"expression": "%PrePopQuery.entry.skip(1).first().resource"
}
}
],
"linkId": "meds",
"text": "Medications",
"type": "group",
"repeats": true,
"item": [
{
"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()))"
}
}
],
"linkId": "med-name",
"text": "Name",
"type": "string"
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%mrItem.status.toString()"
}
}
],
"linkId": "med-status",
"text": "Status",
"type": "string"
},
{
"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"
}
}
],
"linkId": "med-category",
"text": "Standard Category",
"type": "choice",
"repeats": true,
"answerValueSet": "http://hl7.org/fhir/ValueSet/medicationrequest-category"
}
]
}
]
}
]
}