Questionnaire Profile¶
| Canonical | ../StructureDefinition/nexus-emr-core-questionnaire |
|---|---|
| Status | draft (experimental) · 1.26.0 |
| Base | Questionnaire (constraint) |
| Source | FSH · JSON |
A Nexus EMR form definition: what it asks, what it produces, and where its answers land in the chart.
Examples
Diabetes Annual Review Form Definition · Tobacco Use Form Definition
Diabetes Annual Review Form Definition
A form definition using BOTH of SDC's extraction spellings at once, which is the point of the example. Its fixed output rides in a contained transaction Bundle named by templateExtractBundle -- the same container a letter template and a suggested-resource task use -- with two entries, an HbA1c Observation and the recall Task that cites it by fullUrl, each carrying the entry.request that says how it is written. Its answer-dependent output is named per item instead: templateExtract on a REPEATING group, whose prototype sits directly in contained and becomes one Observation per reported episode and none if there were none. Note that the Bundle is not restricted to fixed output either -- the HbA1c entry carries a templateExtractContext, and an entry whose context finds nothing is dropped. What the item form still answers alone is a repeated prototype's identity, which is why the group carries extractAllocateId and a fullUrl expression over it
Questionnaire/nexus-emr-questionnaire-diabetes-review — claims conformance to Questionnaire Profile
{
"resourceType": "Questionnaire",
"id": "nexus-emr-questionnaire-diabetes-review",
"meta": {
"profile": [
"../StructureDefinition/nexus-emr-core-questionnaire"
]
},
"text": {
"status": "generated",
"div": "<div xmlns="http://www.w3.org/1999/xhtml"><p>Diabetes Annual Review form. Every prototype is an entry of one contained transaction Bundle. Two entries are produced whatever the answers say -- the HbA1c Observation and the recall Task that cites it by fullUrl -- and the third is produced once per reported hypoglycaemic episode, because its templateExtractContext selects a repeating item. That third entry cannot author a fullUrl, so it names one by expression over the extractAllocateId variable on the item. No prototype carries a subject, because a form is about no patient until it is answered.</p></div>"
},
"contained": [
{
"resourceType": "Bundle",
"id": "review-bundle",
"type": "transaction",
"entry": [
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-templateExtractContext",
"valueString": "item.where(linkId = 'hba1c')"
}
],
"fullUrl": "urn:uuid:6b2f1c40-0000-4000-8000-000000000001",
"resource": {
"resourceType": "Observation",
"text": {
"status": "generated",
"div": "<div xmlns="http://www.w3.org/1999/xhtml"><p>Prototype of the HbA1c result this form records.</p></div>"
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory",
"display": "Laboratory"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "4548-4",
"display": "Hemoglobin A1c/Hemoglobin.total in Blood"
}
],
"text": "HbA1c"
},
"valueQuantity": {
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-templateExtractValue",
"valueString": "answer.value"
}
]
}
},
"request": {
"method": "POST",
"url": "Observation"
}
},
{
"fullUrl": "urn:uuid:6b2f1c40-0000-4000-8000-000000000002",
"resource": {
"resourceType": "Task",
"text": {
"status": "generated",
"div": "<div xmlns="http://www.w3.org/1999/xhtml"><p>Prototype of the recall task this form always raises, focused on the HbA1c the same Bundle creates.</p></div>"
},
"status": "requested",
"intent": "order",
"description": "Recall for repeat HbA1c in three months",
"focus": {
"reference": "urn:uuid:6b2f1c40-0000-4000-8000-000000000001",
"display": "The HbA1c this review recorded"
}
},
"request": {
"method": "POST",
"url": "Task"
}
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-templateExtractContext",
"valueString": "item.where(linkId = 'hypoglycaemia')"
}
],
"_fullUrl": {
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-templateExtractValue",
"valueString": "%episodeId"
}
]
},
"resource": {
"resourceType": "Observation",
"text": {
"status": "generated",
"div": "<div xmlns="http://www.w3.org/1999/xhtml"><p>Prototype of one patient-reported hypoglycaemic episode. Its entry's context selects a repeating item, so it is instantiated once per reported episode and not at all if the patient reports none.</p></div>"
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "survey",
"display": "Survey"
}
]
}
],
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "302866003",
"display": "Hypoglycemia"
}
],
"text": "Patient-reported hypoglycaemic episode"
}
},
"request": {
"method": "POST",
"url": "Observation"
}
}
]
}
],
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-templateExtractBundle",
"valueReference": {
"reference": "#review-bundle"
}
}
],
"url": "../Questionnaire/nexus-emr-questionnaire-diabetes-review",
"version": "1.0.0",
"name": "DiabetesAnnualReview",
"title": "Diabetes Annual Review",
"status": "active",
"experimental": false,
"subjectType": [
"Patient"
],
"date": "2026-08-25T09:00:00Z",
"publisher": "Cedarbrook Family Health",
"description": "Annual diabetes review. All three prototypes are entries of one contained transaction Bundle: an HbA1c Observation and a recall Task produced every time, and one Observation per reported hypoglycaemic episode, whose entry names its fullUrl by expression because it repeats.",
"effectivePeriod": {
"start": "2026-08-25"
},
"item": [
{
"linkId": "hba1c",
"text": "Most recent HbA1c",
"type": "quantity",
"required": true,
"repeats": false,
"code": [
{
"system": "http://loinc.org",
"code": "4548-4",
"display": "Hemoglobin A1c/Hemoglobin.total in Blood"
}
],
"definition": "../StructureDefinition/nexus-emr-core-observation#Observation.value[x]"
},
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-extractAllocateId",
"valueString": "episodeId"
}
],
"linkId": "hypoglycaemia",
"text": "Episodes of low blood sugar since your last review",
"type": "group",
"required": false,
"repeats": true,
"item": [
{
"linkId": "episode-date",
"text": "When did it happen?",
"type": "date",
"required": true,
"repeats": false,
"definition": "../StructureDefinition/nexus-emr-core-observation#Observation.effective[x]"
},
{
"linkId": "episode-severity",
"text": "Did you need help from someone else to treat it?",
"type": "boolean",
"required": false,
"repeats": false,
"definition": "../StructureDefinition/nexus-emr-core-observation#Observation.value[x]"
}
]
}
]
}