FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query

Packagehl7.fhir.uv.sdc
Resource TypeQuestionnaire
Idquestionnaire-sdc-test-fhirpath-prepop-source-query
FHIR VersionR4
Sourcehttp://hl7.org/fhir/uv/sdc/https://build.fhir.org/ig/HL7/sdc/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-source-query.html
URLhttp://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query
Version4.0.0-ballot
Statusactive
Date2025-07-14T18:38:59+00:00
NameFhirPathPrepopSourceQuery
TitleQuestionnaire Pre-Population
Realmuv
Authorityhl7
DescriptionFhirPath based prepopulation example that leverages a source query to extract data outside the launch context

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: Questionnaire questionnaire-sdc-test-fhirpath-prepop-source-query

LinkIDTextCardinalityTypeDescription & Constraintsdoco
.. FhirPathPrepopSourceQueryFhirPath based prepopulation example that leverages a source query to extract data outside the launch contextQuestionnairehttp://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-source-query#4.0.0-ballot
... grpnull0..1group
.... part-detailsParticipant details0..1group
..... participant-idParticipant ID number0..1string
..... family-nameFamily name0..1string
..... given-namesGiven name(s)0..1string
..... dobDate of birth0..1date
..... condition-countNumber of active Conditions0..1integer
.... medsMedications0..*group
..... med-nameName0..1string
..... med-statusStatus0..1string
..... med-categoryStandard Category0..*choiceValue Set: Medication request category codes

doco Documentation for this format

Contained Resources


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

Source

{
  "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-07-14T18:38:59+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"
            }
          ]
        }
      ]
    }
  ]
}