An example to illustrate a questionnaire regarding an end of life plan

Table View

Questionnaire.id[0]UKCore-Questionnaire-EOLPlan-Example
Questionnaire.url[0]https://example.com/base/Questionnaire/UKCore-Questionnaire-EOLPlan-Example
Questionnaire.title[0]End of Life Care Plan (Mock up)
Questionnaire.status[0]draft
Questionnaire.experimental[0]True
Questionnaire.subjectType[0]Patient
Questionnaire.date[0]2023-11-13T13:32:13+00:00
Questionnaire.description[0]This is an End of Life plan, purely for demonstration purposes
Questionnaire.code[0].system[0]http://snomed.info/sct
Questionnaire.code[0].code[0]861411000000103
Questionnaire.code[0].display[0]End of Life Care Document
Questionnaire.item[0].linkId[0]Q1
Questionnaire.item[0].text[0]Advanced Treatment Preferences
Questionnaire.item[0].type[0]group
Questionnaire.item[0].enableBehavior[0]any
Questionnaire.item[0].item[0].linkId[0]Q1.1
Questionnaire.item[0].item[0].text[0]Clinical Problems and Advised Interventions
Questionnaire.item[0].item[0].type[0]group
Questionnaire.item[0].item[0].enableBehavior[0]any
Questionnaire.item[0].item[0].repeats[0]True
Questionnaire.item[0].item[0].item[0].extension[0].url[0]http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl
Questionnaire.item[0].item[0].item[0].extension[0].value[0].coding[0].system[0]http://hl7.org/fhir/questionnaire-item-control
Questionnaire.item[0].item[0].item[0].extension[0].value[0].coding[0].code[0]autocomplete
Questionnaire.item[0].item[0].item[0].extension[0].value[0].coding[0].display[0]Auto-complete
Questionnaire.item[0].item[0].item[0].linkId[0]Q1.1g
Questionnaire.item[0].item[0].item[0].text[0]ATP Problems
Questionnaire.item[0].item[0].item[0].type[0]choice
Questionnaire.item[0].item[0].item[0].enableBehavior[0]any
Questionnaire.item[0].item[0].item[0].required[0]True
Questionnaire.item[0].item[0].item[0].answerValueSet[0]https://fhir.hl7.org.uk/ValueSet/UKCore-ConditionCode
Questionnaire.item[0].item[1].linkId[0]Q1.2
Questionnaire.item[0].item[1].text[0]Anticipatory medicines/just in case box issued
Questionnaire.item[0].item[1].type[0]string
Questionnaire.item[0].item[1].enableBehavior[0]any
Questionnaire.item[0].item[1].required[0]True
Questionnaire.item[0].item[2].linkId[0]Q1.3
Questionnaire.item[0].item[2].text[0]Advance Decision to Refuse Treatment
Questionnaire.item[0].item[2].type[0]string
Questionnaire.item[0].item[2].enableBehavior[0]any
Questionnaire.item[0].item[2].required[0]True
Questionnaire.item[1].linkId[0]Q2
Questionnaire.item[1].text[0]Consent
Questionnaire.item[1].type[0]group
Questionnaire.item[1].enableBehavior[0]any
Questionnaire.item[1].item[0].linkId[0]Q2g
Questionnaire.item[1].item[0].code[0].system[0]http://snomed.info/sct
Questionnaire.item[1].item[0].code[0].code[0]887031000000108
Questionnaire.item[1].item[0].code[0].display[0]Consent for information sharing
Questionnaire.item[1].item[0].text[0]Consent for Information Sharing
Questionnaire.item[1].item[0].type[0]date
Questionnaire.item[2].linkId[0]Q3
Questionnaire.item[2].text[0]EOL Register
Questionnaire.item[2].type[0]group
Questionnaire.item[2].enableBehavior[0]any
Questionnaire.item[2].repeats[0]False
Questionnaire.item[2].item[0].linkId[0]Q3g
Questionnaire.item[2].item[0].code[0].system[0]http://snomed.info/sct
Questionnaire.item[2].item[0].code[0].code[0]526631000000108
Questionnaire.item[2].item[0].code[0].display[0]On end of life care register
Questionnaire.item[2].item[0].text[0]On End Of Life Register
Questionnaire.item[2].item[0].type[0]dateTime

XML View

<Questionnaire xmlns="http://hl7.org/fhir">
    <id value="UKCore-Questionnaire-EOLPlan-Example" />
    <url value="https://example.com/base/Questionnaire/UKCore-Questionnaire-EOLPlan-Example" />
    <title value="End of Life Care Plan (Mock up)" />
    <status value="draft" />
    <experimental value="true" />
    <subjectType value="Patient" />
    <date value="2023-11-13T13:32:13+00:00" />
    <description value="This is an End of Life plan, purely for demonstration purposes" />
    <code>
        <system value="http://snomed.info/sct" />
        <code value="861411000000103" />
        <display value="End of Life Care Document" />
    </code>
    <item>
        <linkId value="Q1" />
        <text value="Advanced Treatment Preferences" />
        <type value="group" />
        <enableBehavior value="any" />
        <item>
            <linkId value="Q1.1" />
            <text value="Clinical Problems and Advised Interventions" />
            <type value="group" />
            <enableBehavior value="any" />
            <repeats value="true" />
            <item>
                <extension url="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl">
                    <valueCodeableConcept>
                        <coding>
                            <system value="http://hl7.org/fhir/questionnaire-item-control" />
                            <code value="autocomplete" />
                            <display value="Auto-complete" />
                        </coding>
                    </valueCodeableConcept>
                </extension>
                <linkId value="Q1.1g" />
                <text value="ATP Problems" />
                <type value="choice" />
                <enableBehavior value="any" />
                <required value="true" />
                <answerValueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-ConditionCode" />
            </item>
        </item>
        <item>
            <linkId value="Q1.2" />
            <text value="Anticipatory medicines/just in case box issued" />
            <type value="string" />
            <enableBehavior value="any" />
            <required value="true" />
        </item>
        <item>
            <linkId value="Q1.3" />
            <text value="Advance Decision to Refuse Treatment" />
            <type value="string" />
            <enableBehavior value="any" />
            <required value="true" />
        </item>
    </item>
    <item>
        <linkId value="Q2" />
        <text value="Consent" />
        <type value="group" />
        <enableBehavior value="any" />
        <item>
            <linkId value="Q2g" />
            <code>
                <system value="http://snomed.info/sct" />
                <code value="887031000000108" />
                <display value="Consent for information sharing" />
            </code>
            <text value="Consent for Information Sharing" />
            <type value="date" />
        </item>
    </item>
    <item>
        <linkId value="Q3" />
        <text value="EOL Register" />
        <type value="group" />
        <enableBehavior value="any" />
        <repeats value="false" />
        <item>
            <linkId value="Q3g" />
            <code>
                <system value="http://snomed.info/sct" />
                <code value="526631000000108" />
                <display value="On end of life care register" />
            </code>
            <text value="On End Of Life Register" />
            <type value="dateTime" />
        </item>
    </item>
</Questionnaire>

JSON View

{
    "resourceType": "Questionnaire",
    "id": "UKCore-Questionnaire-EOLPlan-Example",
    "url": "https://example.com/base/Questionnaire/UKCore-Questionnaire-EOLPlan-Example",
    "title": "End of Life Care Plan (Mock up)",
    "status": "draft",
    "experimental": true,
    "subjectType":  [
        "Patient"
    ],
    "description": "This is an End of Life plan, purely for demonstration purposes",
    "date": "2023-11-13T13:32:13+00:00",
    "code":  [
        {
            "system": "http://snomed.info/sct",
            "code": "861411000000103",
            "display": "End of Life Care Document"
        }
    ],
    "item":  [
        {
            "linkId": "Q1",
            "text": "Advanced Treatment Preferences",
            "type": "group",
            "enableBehavior": "any",
            "item":  [
                {
                    "linkId": "Q1.1",
                    "text": "Clinical Problems and Advised Interventions",
                    "type": "group",
                    "enableBehavior": "any",
                    "repeats": true,
                    "item":  [
                        {
                            "linkId": "Q1.1g",
                            "extension":  [
                                {
                                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                                    "valueCodeableConcept": {
                                        "coding":  [
                                            {
                                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                                "code": "autocomplete",
                                                "display": "Auto-complete"
                                            }
                                        ]
                                    }
                                }
                            ],
                            "text": "ATP Problems",
                            "type": "choice",
                            "enableBehavior": "any",
                            "required": true,
                            "answerValueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-ConditionCode"
                        }
                    ]
                },
                {
                    "linkId": "Q1.2",
                    "text": "Anticipatory medicines/just in case box issued",
                    "type": "string",
                    "enableBehavior": "any",
                    "required": true
                },
                {
                    "linkId": "Q1.3",
                    "text": "Advance Decision to Refuse Treatment",
                    "type": "string",
                    "enableBehavior": "any",
                    "required": true
                }
            ]
        },
        {
            "linkId": "Q2",
            "text": "Consent",
            "type": "group",
            "enableBehavior": "any",
            "item":  [
                {
                    "linkId": "Q2g",
                    "code":  [
                        {
                            "system": "http://snomed.info/sct",
                            "code": "887031000000108",
                            "display": "Consent for information sharing"
                        }
                    ],
                    "text": "Consent for Information Sharing",
                    "type": "date"
                }
            ]
        },
        {
            "linkId": "Q3",
            "text": "EOL Register",
            "type": "group",
            "enableBehavior": "any",
            "repeats": false,
            "item":  [
                {
                    "linkId": "Q3g",
                    "code":  [
                        {
                            "system": "http://snomed.info/sct",
                            "code": "526631000000108",
                            "display": "On end of life care register"
                        }
                    ],
                    "text": "On End Of Life Register",
                    "type": "dateTime"
                }
            ]
        }
    ]
}