R4 Ballot #2 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.5.0: R4 Ballot #2). 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: R4B R4

Questionnaire-cqf-example.xml

FHIR Infrastructure Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Not linked to any defined compartments

Raw XML (canonical form + also see XML Format Specification)

Jump past Narrative

Questionnaire used to define the questions involved in the PHQ-9 health questionnaire (id = "phq-9-questionnaire")

<?xml version="1.0" encoding="UTF-8"?>

<Questionnaire xmlns="http://hl7.org/fhir">
  <id value="phq-9-questionnaire"/> 
  <meta> 
    <profile value="http://hl7.org/fhir/StructureDefinition/cqf-questionnaire"/> 
  </meta> 
  <text> 
    <status value="generated"/> 
    <div xmlns="http://www.w3.org/1999/xhtml">PHQ-9 Questionnaire with dynamic logic</div> 
  </text> 
  <extension url="http://hl7.org/fhir/StructureDefinition/cqf-library">
    <valueCanonical value="Library/phq-9-logic"/> 
  </extension> 
  <identifier> 
    <use value="official"/> 
    <value value="phq-9"/> 
  </identifier> 
  <version value="1.0.0"/> 
  <title value="Patient Health Questionnaire (PHQ-9)"/> 
  <status value="draft"/> 
  <subjectType value="Patient"/> 
  <code> 
    <system value="http://loinc.org"/> 
    <code value="44249-1"/> 
    <display value="PHQ-9 quick depression assessment panel:-:Pt:^Patient:-:Report.PHQ-9"/> 
  </code> 
  <item> 
    <linkId value="LittleInterest"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44250-9"/> 
    </code> 
    <text value="Little interest or pleasure in doing things"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <linkId value="FeelingDown"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44255-8"/> 
    </code> 
    <text value="Feeling down, depressed, or hopeless"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <linkId value="TroubleSleeping"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44259-0"/> 
    </code> 
    <text value="Trouble falling or staying asleep"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <linkId value="FeelingTired"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44254-1"/> 
    </code> 
    <text value="Feeling tired or having little energy"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <linkId value="BadAppetite"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44251-7"/> 
    </code> 
    <text value="Poor appetite or overeating"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <linkId value="FeelingBadAboutSelf"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44258-2"/> 
    </code> 
    <text value="Feeling bad about yourself - or that you are a failure or have let yourself or your family
     down"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <linkId value="TroubleConcentrating"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44252-5"/> 
    </code> 
    <text value="Trouble concentrating on things, such as reading the newspaper or watching television"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <linkId value="MovingSpeaking"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44253-3"/> 
    </code> 
    <text value="Moving or speaking so slowly that other people could have noticed. Or the opposite - being
     so fidgety or restless that you have been moving around a lot more than usual"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
  <item> 
    <extension url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
      <valueExpression> 
        <language value="text/cql"/> 
        <expression value="CalculateTotalScore"/> 
      </valueExpression> 
    </extension> 
    <linkId value="TotalScore"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44261-6"/> 
    </code> 
    <text value="Total score"/> 
    <type value="integer"/> 
    <required value="true"/> 
  </item> 
  <item> 
    <linkId value="Difficulty"/> 
    <code> 
      <system value="http://loinc.org"/> 
      <code value="44256-6"/> 
    </code> 
    <text value="If you checked off any problems, how difficult have these problems made it for you to
     do your work, take care of things at home, or get along with other people"/> 
    <type value="choice"/> 
    <required value="true"/> 
    <answerValueSet value="http://loinc.org/vs/LL358-3"/> 
  </item> 
</Questionnaire> 

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.