An example to illustrate a questionnaire response regarding an in-patient survey

Table View

QuestionnaireResponse.id[0]UKCore-QuestionnaireResponse-InpatientSurvey-Example
QuestionnaireResponse.identifier[0].value[0]6d47d8c4-2f05-4dbb-93f8-6863e6d2975b
QuestionnaireResponse.identifier[0].assigner[0].reference[0]Organization/UKCore-Organization-LeedsTeachingHospital-Example
QuestionnaireResponse.questionnaire[0]https://example.com/base/Questionnaire/UKCore-Questionnaire-InpatientSurvey-Example
QuestionnaireResponse.status[0]completed
QuestionnaireResponse.subject[0].reference[0]Patient/UKCore-Patient-RichardSmith-Example
QuestionnaireResponse.encounter[0].reference[0]Encounter/UKCore-Encounter-InpatientEncounter-Example
QuestionnaireResponse.authored[0]2021-03-18T00:00:00+00:00
QuestionnaireResponse.author[0].reference[0]Practitioner/UKCore-Practitioner-ConsultantSandraGose-Example
QuestionnaireResponse.source[0].reference[0]Patient/UKCore-Patient-RichardSmith-Example
QuestionnaireResponse.item[0].linkId[0]1
QuestionnaireResponse.item[0].text[0]Do you have allergies?
QuestionnaireResponse.item[0].answer[0].value[0]I am allergic to amoxicillin.
QuestionnaireResponse.item[1].linkId[0]2
QuestionnaireResponse.item[1].text[0]General questions
QuestionnaireResponse.item[1].item[0].linkId[0]2.1
QuestionnaireResponse.item[1].item[0].text[0]What is your gender?
QuestionnaireResponse.item[1].item[0].answer[0].value[0]male
QuestionnaireResponse.item[1].item[1].linkId[0]2.2
QuestionnaireResponse.item[1].item[1].text[0]What is your date of birth?
QuestionnaireResponse.item[1].item[1].answer[0].value[0]1970-09-11
QuestionnaireResponse.item[1].item[2].linkId[0]2.3
QuestionnaireResponse.item[1].item[2].text[0]What is your country of birth?
QuestionnaireResponse.item[1].item[2].answer[0].value[0]The United Kingdom
QuestionnaireResponse.item[1].item[3].linkId[0]2.4
QuestionnaireResponse.item[1].item[3].text[0]What is your marital status?
QuestionnaireResponse.item[1].item[3].answer[0].value[0]married
QuestionnaireResponse.item[2].linkId[0]3
QuestionnaireResponse.item[2].text[0]Intoxications
QuestionnaireResponse.item[2].item[0].linkId[0]3.1
QuestionnaireResponse.item[2].item[0].text[0]Do you smoke?
QuestionnaireResponse.item[2].item[0].answer[0].value[0]True
QuestionnaireResponse.item[2].item[1].linkId[0]3.2
QuestionnaireResponse.item[2].item[1].text[0]Do you drink alcohol?
QuestionnaireResponse.item[2].item[1].answer[0].value[0]False

XML View

<QuestionnaireResponse xmlns="http://hl7.org/fhir">
    <id value="UKCore-QuestionnaireResponse-InpatientSurvey-Example" />
    <identifier>
        <value value="6d47d8c4-2f05-4dbb-93f8-6863e6d2975b" />
        <assigner>
            <reference value="Organization/UKCore-Organization-LeedsTeachingHospital-Example" />
        </assigner>
    </identifier>
    <questionnaire value="https://example.com/base/Questionnaire/UKCore-Questionnaire-InpatientSurvey-Example" />
    <status value="completed" />
    <subject>
        <reference value="Patient/UKCore-Patient-RichardSmith-Example" />
    </subject>
    <encounter>
        <reference value="Encounter/UKCore-Encounter-InpatientEncounter-Example" />
    </encounter>
    <authored value="2021-03-18T00:00:00+00:00" />
    <author>
        <reference value="Practitioner/UKCore-Practitioner-ConsultantSandraGose-Example" />
    </author>
    <source>
        <reference value="Patient/UKCore-Patient-RichardSmith-Example" />
    </source>
    <item>
        <linkId value="1" />
        <text value="Do you have allergies?" />
        <answer>
            <valueString value="I am allergic to amoxicillin." />
        </answer>
    </item>
    <item>
        <linkId value="2" />
        <text value="General questions" />
        <item>
            <linkId value="2.1" />
            <text value="What is your gender?" />
            <answer>
                <valueString value="male" />
            </answer>
        </item>
        <item>
            <linkId value="2.2" />
            <text value="What is your date of birth?" />
            <answer>
                <valueDate value="1970-09-11" />
            </answer>
        </item>
        <item>
            <linkId value="2.3" />
            <text value="What is your country of birth?" />
            <answer>
                <valueString value="The United Kingdom" />
            </answer>
        </item>
        <item>
            <linkId value="2.4" />
            <text value="What is your marital status?" />
            <answer>
                <valueString value="married" />
            </answer>
        </item>
    </item>
    <item>
        <linkId value="3" />
        <text value="Intoxications" />
        <item>
            <linkId value="3.1" />
            <text value="Do you smoke?" />
            <answer>
                <valueBoolean value="true" />
            </answer>
        </item>
        <item>
            <linkId value="3.2" />
            <text value="Do you drink alcohol?" />
            <answer>
                <valueBoolean value="false" />
            </answer>
        </item>
    </item>
</QuestionnaireResponse>

JSON View

{
    "resourceType": "QuestionnaireResponse",
    "id": "UKCore-QuestionnaireResponse-InpatientSurvey-Example",
    "identifier": {
        "value": "6d47d8c4-2f05-4dbb-93f8-6863e6d2975b",
        "assigner": {
            "reference": "Organization/UKCore-Organization-LeedsTeachingHospital-Example"
        }
    },
    "questionnaire": "https://example.com/base/Questionnaire/UKCore-Questionnaire-InpatientSurvey-Example",
    "status": "completed",
    "subject": {
        "reference": "Patient/UKCore-Patient-RichardSmith-Example"
    },
    "encounter": {
        "reference": "Encounter/UKCore-Encounter-InpatientEncounter-Example"
    },
    "authored": "2021-03-18T00:00:00+00:00",
    "author": {
        "reference": "Practitioner/UKCore-Practitioner-ConsultantSandraGose-Example"
    },
    "source": {
        "reference": "Patient/UKCore-Patient-RichardSmith-Example"
    },
    "item":  [
        {
            "linkId": "1",
            "text": "Do you have allergies?",
            "answer":  [
                {
                    "valueString": "I am allergic to amoxicillin."
                }
            ]
        },
        {
            "linkId": "2",
            "text": "General questions",
            "item":  [
                {
                    "linkId": "2.1",
                    "text": "What is your gender?",
                    "answer":  [
                        {
                            "valueString": "male"
                        }
                    ]
                },
                {
                    "linkId": "2.2",
                    "text": "What is your date of birth?",
                    "answer":  [
                        {
                            "valueDate": "1970-09-11"
                        }
                    ]
                },
                {
                    "linkId": "2.3",
                    "text": "What is your country of birth?",
                    "answer":  [
                        {
                            "valueString": "The United Kingdom"
                        }
                    ]
                },
                {
                    "linkId": "2.4",
                    "text": "What is your marital status?",
                    "answer":  [
                        {
                            "valueString": "married"
                        }
                    ]
                }
            ]
        },
        {
            "linkId": "3",
            "text": "Intoxications",
            "item":  [
                {
                    "linkId": "3.1",
                    "text": "Do you smoke?",
                    "answer":  [
                        {
                            "valueBoolean": true
                        }
                    ]
                },
                {
                    "linkId": "3.2",
                    "text": "Do you drink alcohol?",
                    "answer":  [
                        {
                            "valueBoolean": false
                        }
                    ]
                }
            ]
        }
    ]
}

back to top