Structured Data Capture
4.0.0-ballot - STU 4 ballot International flag

This page is part of the Structured Data Capture FHIR IG (v4.0.0-ballot: STU 4 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. The current version which supersedes this version is 3.0.0. For a full list of available versions, see the Directory of published versions

: Example $assemble operation response - XML Representation

Raw xml | Download


<Parameters xmlns="http://hl7.org/fhir">
  <id value="sdc-modular-root-assembled"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/uv/sdc/StructureDefinition/parameters-questionnaire-assemble-out"/>
  </meta>
  <parameter>
    <name value="return"/>
    <resource>
      <Questionnaire>
        <extension
                   url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Questionnaire.versionAlgorithm[x]">
          <valueCoding>
            <system value="http://hl7.org/fhir/version-algorithm"/>
            <code value="semver"/>
          </valueCoding>
        </extension>
        <extension
                   url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom">
          <valueCanonical
                          value="http://hl7.org/fhir/uv/sdc/Questionnaire/sdc-modular-contact|3.0"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom">
          <valueCanonical
                          value="http://hl7.org/fhir/uv/sdc/Questionnaire/sdc-modular-name|3.0"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext">
          <extension url="name">
            <valueCoding>
              <system
                      value="http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext"/>
              <code value="patient"/>
            </valueCoding>
          </extension>
          <extension url="type">
            <valueCode value="Patient"/>
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/variable">
          <valueExpression>
            <name value="person"/>
            <language value="text/fhirpath"/>
            <expression value="%patient"/>
          </valueExpression>
        </extension>
        <url
             value="http://hl7.org/fhir/uv/sdc/Questionnaire/sdc-modular-root"/>
        <name value="QuestionnaireSDCModularRoot"/>
        <title value="Example modular Questionnaire"/>
        <status value="active"/>
        <experimental value="true"/>
        <item>
          <extension url="http://hl7.org/fhir/StructureDefinition/variable">
            <valueExpression>
              <name value="linkIdPrefix"/>
              <language value="text/fhirpath"/>
              <expression value="'patientname.'"/>
            </valueExpression>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/targetConstraint">
            <extension url="key">
              <valueId value="qcontact-1"/>
            </extension>
            <extension url="severity">
              <valueCode value="error"/>
            </extension>
            <extension url="human">
              <valueString value="Must have either first or last name"/>
            </extension>
            <extension url="expression">
              <valueExpression>
                <language value="text/fhirpath"/>
                <expression
                            value="item.where(linkId=%linkIdPrefix+'1').exists() or item.where(linkId=%linkIdPrefix+'2').exists()"/>
              </valueExpression>
            </extension>
          </extension>
          <extension url="http://hl7.org/fhir/StructureDefinition/variable">
            <valueExpression>
              <name value="name"/>
              <language value="text/fhirpath"/>
              <expression
                          value="iif(%person.name.where(use='official').exists(),%person.name.where(use='official').first(),%person.name.first())"/>
            </valueExpression>
          </extension>
          <linkId value="1"/>
          <definition
                      value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.name"/>
          <text value="What is the person's official name?"/>
          <type value="group"/>
          <item>
            <extension
                       url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression">
              <valueExpression>
                <language value="text/fhirpath"/>
                <expression
                            value="%name.prefix.where($this in ('Mr.'|'Miss'|'Mrs'|'Ms.'))first()"/>
              </valueExpression>
            </extension>
            <linkId value="patientname.1"/>
            <text value="Title"/>
            <type value="string"/>
            <required value="true"/>
            <answerOption>
              <valueString value="Mr."/>
            </answerOption>
            <answerOption>
              <valueString value="Miss"/>
            </answerOption>
            <answerOption>
              <valueString value="Mrs."/>
            </answerOption>
            <answerOption>
              <valueString value="Ms."/>
            </answerOption>
          </item>
          <item>
            <extension
                       url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression">
              <valueExpression>
                <language value="text/fhirpath"/>
                <expression value="%name.given.first()"/>
              </valueExpression>
            </extension>
            <linkId value="patientname.2"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.name.first"/>
            <text value="First"/>
            <type value="string"/>
            <required value="true"/>
            <maxLength value="100"/>
          </item>
          <item>
            <extension
                       url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression">
              <valueExpression>
                <language value="text/fhirpath"/>
                <expression value="%name.family"/>
              </valueExpression>
            </extension>
            <linkId value="patientname.3"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.name.last"/>
            <text value="Last"/>
            <type value="string"/>
            <required value="true"/>
            <maxLength value="100"/>
          </item>
        </item>
        <item>
          <extension url="http://hl7.org/fhir/StructureDefinition/minValue">
            <valueDate value="1900-01-01"/>
          </extension>
          <extension url="http://hl7.org/fhir/StructureDefinition/maxValue">
            <valueDate>
              <extension
                         url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
                <valueExpression>
                  <language value="text/fhirpath"/>
                  <expression value="now() as date + 1 day"/>
                </valueExpression>
              </extension>
            </valueDate>
          </extension>
          <linkId value="2"/>
          <definition
                      value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.dob"/>
          <text value="What is this person's date of birth?"/>
          <type value="date"/>
          <required value="true"/>
        </item>
        <item>
          <linkId value="3"/>
          <definition
                      value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.sex"/>
          <text value="What is this person's gender?"/>
          <type value="choice"/>
          <required value="true"/>
          <answerValueSet
                          value="http://hl7.org/fhir/ValueSet/administrative-gender"/>
        </item>
        <item>
          <linkId value="4"/>
          <definition
                      value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.address"/>
          <text value="What is this person's current mailing address?"/>
          <type value="group"/>
          <required value="true"/>
          <item>
            <linkId value="4.1"/>
            <type value="display"/>
          </item>
          <item>
            <linkId value="4Demographics.address.street"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.address.street"/>
            <text value="Street address"/>
            <type value="string"/>
          </item>
          <item>
            <linkId value="4Demographics.address.city"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.address.city"/>
            <text value="City/Town"/>
            <type value="string"/>
          </item>
          <item>
            <linkId value="4Demographics.address.state"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.address.state"/>
            <text value="State"/>
            <type value="choice"/>
            <answerValueSet
                            value="http://hl7.org/fhir/uv/sdc/ValueSet/sdc-question-library-states"/>
          </item>
          <item>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/entryFormat">
              <valueString value="9999"/>
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/regex">
              <valueString value="[\d]{4}"/>
            </extension>
            <linkId value="4Demographics.address.postalCode"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.address.postalCode"/>
            <text value="Postal Code"/>
            <type value="string"/>
            <required value="true"/>
          </item>
        </item>
        <item>
          <extension
                     url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext">
            <valueExpression>
              <name value="person"/>
              <language value="text/fhirpath"/>
              <expression value="%patient.contact"/>
            </valueExpression>
          </extension>
          <extension url="http://hl7.org/fhir/StructureDefinition/variable">
            <valueExpression>
              <name value="linkIdPrefix"/>
              <language value="text/fhirpath"/>
              <expression value="'patientcontact.'"/>
            </valueExpression>
          </extension>
          <linkId value="5"/>
          <type value="group"/>
          <required value="true"/>
          <item>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/variable">
              <valueExpression>
                <name value="linkIdPrefix"/>
                <language value="text/fhirpath"/>
                <expression value="%linkIdPrefix + 'name.'"/>
              </valueExpression>
            </extension>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/targetConstraint">
              <extension url="key">
                <valueId value="qcontact-1"/>
              </extension>
              <extension url="severity">
                <valueCode value="error"/>
              </extension>
              <extension url="human">
                <valueString value="Must have either first or last name"/>
              </extension>
              <extension url="expression">
                <valueExpression>
                  <language value="text/fhirpath"/>
                  <expression
                              value="item.where(linkId=%linkIdPrefix+'1').exists() or item.where(linkId=%linkIdPrefix+'2').exists()"/>
                </valueExpression>
              </extension>
            </extension>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/variable">
              <valueExpression>
                <name value="name"/>
                <language value="text/fhirpath"/>
                <expression
                            value="iif(%person.name.where(use='official').exists(),%person.name.where(use='official').first(),%person.name.first())"/>
              </valueExpression>
            </extension>
            <linkId value="patientcontact.1"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.name"/>
            <text value="What is the person's official name?"/>
            <type value="group"/>
            <item>
              <extension
                         url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression">
                <valueExpression>
                  <language value="text/fhirpath"/>
                  <expression
                              value="%name.prefix.where($this in ('Mr.'|'Miss'|'Mrs'|'Ms.')).first()"/>
                </valueExpression>
              </extension>
              <linkId value="patientcontact.name.1"/>
              <type value="string"/>
              <required value="true"/>
              <answerOption>
                <valueString value="Mr."/>
              </answerOption>
              <answerOption>
                <valueString value="Miss"/>
              </answerOption>
              <answerOption>
                <valueString value="Mrs."/>
              </answerOption>
              <answerOption>
                <valueString value="Ms."/>
              </answerOption>
            </item>
            <item>
              <extension
                         url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression">
                <valueExpression>
                  <language value="text/fhirpath"/>
                  <expression value="%name.given[0]"/>
                </valueExpression>
              </extension>
              <linkId value="patientcontact.name.2"/>
              <definition
                          value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.name.first"/>
              <text value="First"/>
              <type value="string"/>
              <required value="true"/>
              <maxLength value="100"/>
            </item>
            <item>
              <extension
                         url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression">
                <valueExpression>
                  <language value="text/fhirpath"/>
                  <expression value="%name.family"/>
                </valueExpression>
              </extension>
              <linkId value="patientcontact.name.3"/>
              <definition
                          value="http://hl7.org/fhir/uv/sdc/StructureDefinition/SdcQuestionLibrary#SdcQuestionLibrary.name.last"/>
              <text value="Last"/>
              <type value="string"/>
              <required value="true"/>
              <maxLength value="100"/>
            </item>
          </item>
          <item>
            <extension
                       url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression">
              <valueExpression>
                <language value="text/fhirpath"/>
                <expression
                            value="%person.telecom.where(use='phone').first()"/>
              </valueExpression>
            </extension>
            <linkId value="patientcontact.2"/>
            <definition
                        value="http://example.org/StructureDefinition/non-existent-library#Stuff.phone"/>
            <text value="Phone number"/>
            <type value="string"/>
            <required value="true"/>
          </item>
        </item>
      </Questionnaire>
    </resource>
  </parameter>
  <parameter>
    <name value="outcome"/>
    <resource>
      <OperationOutcome>
        <text>
          <status value="empty"/>
          <div xmlns="http://www.w3.org/1999/xhtml"><ul><li>Warning: Unable to resolve element definition http://example.org/StructureDefinition/non-existent-library#Stuff.phone when assembling Questionnaire/sdc-modular-contact. Some constraints and behavior may not be represented</li><li>Unable to resolve element definition http://example.org/StructureDefinition/non-existent-library#Stuff.phone when assembling Questionnaire/sdc-modular-contact. Some constraints and behavior may not be represented</li></ul></div>
        </text>
        <issue>
          <severity value="warning"/>
          <code value="informational"/>
          <details>
            <text
                  value="Unable to resolve element definition http://example.org/StructureDefinition/non-existent-library#Stuff.phone when assembling Questionnaire/sdc-modular-contact.  Some constraints and behavior may not be represented"/>
          </details>
          <expression value="Questionnaire.item[1].definition"/>
        </issue>
        <issue>
          <severity value="warning"/>
          <code value="informational"/>
          <details>
            <text
                  value="Unable to resolve element definition http://example.org/StructureDefinition/non-existent-library#Stuff.phone when assembling Questionnaire/sdc-modular-contact.  Some constraints and behavior may not be represented"/>
          </details>
          <expression value="Questionnaire.item[1].definition"/>
        </issue>
      </OperationOutcome>
    </resource>
  </parameter>
</Parameters>