2nd DSTU Draft For Comment

This page is part of the FHIR Specification (v0.4.0: DSTU 2 Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

4.27.8 Resource Questionnaire - Examples

Example Index:

General questionnaire exampleXMLJSON
Real-world lifelines questionnaire (fictively taken from the patient)XMLJSON
Neonate record from New South Wales, Australia "My Personal Health Record" exampleXMLJSON

4.27.8.1 General

XML

General questionnaire example (id = "3141")

Raw XML

<Questionnaire xmlns="http://hl7.org/fhir">
  <id value="3141"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><!-- Snipped for brevity --></div>
  </text>
  <contained>
    <ValueSet>
      <id value="yesno"/><!--    In practice you could (should?) use boolean for this sort of circumstance.  However,
       the reality is
        that many systems treat booleans as coded data    -->
      <name value="Example YesNo"/>
      <description value="Captures simple yes-no"/>
      <status value="active"/>
      <define>
        <system value="http://example.org/system/code/yesno"/>
        <caseSensitive value="true"/>
        <concept>
          <code value="1"/>
          <display value="Yes"/>
        </concept>
        <concept>
          <code value="2"/>
          <display value="No"/>
        </concept>
      </define>
    </ValueSet>
  </contained>
  <status value="draft"/>
  <date value="2012-01"/>
  <group>
    <title value="Cancer Quality Forum Questionnaire 2012"/>
    <group><!--    COMORBIDITY    --><!--    First main section of the form, questions about comorbidity    -->
      <concept>
        <system value="http://example.org/system/code/sections"/>
        <code value="COMORBIDITY"/>
      </concept><!--    section contains one question: whether there is comorbidity    -->
      <question>
        <concept>
          <system value="http://example.org/system/code/questions"/>
          <code value="COMORB"/>
        </concept>
        <type value="choice"/>
        <options>
          <reference value="#yesno"/>
        </options>
        <group><!--    COMORBIDITY/CARDIAL    --><!--    Subsection about specific comorbidity: cardial    -->
          <concept>
            <system value="http://example.org/system/code/sections"/>
            <code value="CARDIAL"/>
          </concept>
          <question>
            <concept>
              <system value="http://example.org/system/code/questions"/>
              <code value="COMORBCAR"/>
            </concept>
            <type value="choice"/>
            <options>
              <reference value="#yesno"/>
            </options>
          </question>
          <question><!--    This answer carries both the questionnaire-specific name and an equivalent SNOMED CT
             code    -->
            <concept>
              <system value="http://example.org/system/code/questions"/>
              <code value="COMCAR00"/>
              <display value="Angina Pectoris"/>
            </concept>
            <concept>
              <system value="http://snomed.info/sct"/>
              <code value="194828000"/>
              <display value="Angina (disorder)"/>
            </concept>
            <type value="choice"/>
            <options>
              <reference value="#yesno"/>
            </options>
          </question>
          <question>
            <concept>
              <system value="http://snomed.info/sct"/>
              <code value="22298006"/>
              <display value="Myocardial infarction (disorder)"/>
            </concept>
            <type value="choice"/>
            <options>
              <reference value="#yesno"/>
            </options>
          </question>
        </group>
        <group><!--    COMORBIDITY/VASCULAR    -->
          <concept>
            <system value="http://example.org/system/code/sections"/>
            <code value="VASCULAR"/>
          </concept>
        </group>
      </question>
    </group><!--    Todo: What's supposed to go here?    -->
    <group><!--    HISTOPATHOLOGY    -->
      <concept>
        <system value="http://example.org/system/code/sections"/>
        <code value="HISTOPATHOLOGY"/>
      </concept>
      <group>
        <concept>
          <system value="http://example.org/system/code/sections"/>
          <code value="ABDOMINAL"/>
        </concept>
        <question>
          <concept>
            <system value="http://example.org/system/code/questions"/>
            <code value="STADPT"/>
            <display value="pT category"/>
          </concept>
        </question>
      </group>
    </group>
  </group>
</Questionnaire>

JSON

General questionnaire example

Raw JSON (Canonical)

{
  "resourceType": "Questionnaire",
  "id": "3141",
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "contained": [
    {
      "resourceType": "ValueSet",
      "id": "yesno",
      "name": "Example YesNo",
      "description": "Captures simple yes-no",
      "status": "active",
      "define": {
        "system": "http://example.org/system/code/yesno",
        "caseSensitive": true,
        "concept": [
          {
            "code": "1",
            "display": "Yes"
          },
          {
            "code": "2",
            "display": "No"
          }
        ]
      }
    }
  ],
  "status": "draft",
  "date": "2012-01",
  "group": {
    "title": "Cancer Quality Forum Questionnaire 2012",
    "group": [
      {
        "concept": [
          {
            "system": "http://example.org/system/code/sections",
            "code": "COMORBIDITY"
          }
        ],
        "question": [
          {
            "concept": [
              {
                "system": "http://example.org/system/code/questions",
                "code": "COMORB"
              }
            ],
            "type": "choice",
            "options": {
              "reference": "#yesno"
            },
            "group": [
              {
                "concept": [
                  {
                    "system": "http://example.org/system/code/sections",
                    "code": "CARDIAL"
                  }
                ],
                "question": [
                  {
                    "concept": [
                      {
                        "system": "http://example.org/system/code/questions",
                        "code": "COMORBCAR"
                      }
                    ],
                    "type": "choice",
                    "options": {
                      "reference": "#yesno"
                    }
                  },
                  {
                    "concept": [
                      {
                        "system": "http://example.org/system/code/questions",
                        "code": "COMCAR00",
                        "display": "Angina Pectoris"
                      },
                      {
                        "system": "http://snomed.info/sct",
                        "code": "194828000",
                        "display": "Angina (disorder)"
                      }
                    ],
                    "type": "choice",
                    "options": {
                      "reference": "#yesno"
                    }
                  },
                  {
                    "concept": [
                      {
                        "system": "http://snomed.info/sct",
                        "code": "22298006",
                        "display": "Myocardial infarction (disorder)"
                      }
                    ],
                    "type": "choice",
                    "options": {
                      "reference": "#yesno"
                    }
                  }
                ]
              },
              {
                "concept": [
                  {
                    "system": "http://example.org/system/code/sections",
                    "code": "VASCULAR"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "concept": [
          {
            "system": "http://example.org/system/code/sections",
            "code": "HISTOPATHOLOGY"
          }
        ],
        "group": [
          {
            "concept": [
              {
                "system": "http://example.org/system/code/sections",
                "code": "ABDOMINAL"
              }
            ],
            "question": [
              {
                "concept": [
                  {
                    "system": "http://example.org/system/code/questions",
                    "code": "STADPT",
                    "display": "pT category"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.