Structured Data Capture
3.0.0-preview - STU 3 International flag

This page is part of the Structured Data Capture FHIR IG (v3.0.0-preview: STU 3 Draft) based on FHIR R4. The current version which supercedes 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"/>
  <parameter>
    <name value="return"/>
    <resource>
      <Questionnaire>
      <!--  Put this back once R4B is out
        <contained>
          <ValueSet>
            <id value="sex"/>
            <status value="draft"/>
            <name value="SexValueSet"/>
            <compose>
              <include>
                <system value="http://terminology.hl7.org/CodeSystem/v2-0001"/>
                <concept>
                  <code value="F"/>
                  <display value="Female"/>
                </concept>
                <concept>
                  <code value="M"/>
                  <display value="Male"/>
                </concept>
              </include>
            </compose>
          </ValueSet>
        </contained> -->
        <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="draft"/>
        <experimental value="true"/>
        <item>
          <extension url="http://hl7.org/fhir/StructureDefinition/variable">
            <valueExpression>
              <name value="linkIdPrefix"/>
              <language value="text/fhirpath"/>
              <expression value="&#39;patientname.&#39;"/>
            </valueExpression>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/questionnaire-constraint">
            <extension url="key">
              <valueString 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">
              <valueString
                           value="item.where(linkId=%linkIdPrefix+&#39;1&#39;).exists() or item.where(linkId=%linkIdPrefix+&#39;2&#39;).exists()"/>
            </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=&#39;official&#39;).exists(),%person.name.where(use=&#39;official&#39;)[0],%person.name[0])"/>
            </valueExpression>
          </extension>
          <linkId value="1"/>
          <definition
                      value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-question-library#Demographics.name"/>
          <text value="What is the person&#39;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 (&#39;Mr.&#39;|&#39;Miss&#39;|&#39;Mrs&#39;|&#39;Ms.&#39;))[0]"/>
              </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[0]"/>
              </valueExpression>
            </extension>
            <linkId value="patientname.2"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-question-library#Demographics.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.last"/>
              </valueExpression>
            </extension>
            <linkId value="patientname.3"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-question-library#Demographics.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/sdc-question-library#Demographics.dob"/>
          <text value="What is this person&#39;s date of birth?"/>
          <type value="date"/>
          <required value="true"/>
        </item>
      <!--           <answerValueSet value="#sex"/> -->
        <item>
          <linkId value="3"/>
          <definition
                      value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-question-library#Demographics.sex"/>
          <text value="What is this person&#39;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/sdc-question-library#Demographics.address"/>
          <text value="What is this person&#39;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/sdc-question-library#Demographics.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/sdc-question-library#Demographics.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/sdc-question-library#Demographics.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/sdc-question-library#Demographics.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="&#39;patientcontact.&#39;"/>
            </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 + &#39;name.&#39;"/>
              </valueExpression>
            </extension>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/questionnaire-constraint">
              <extension url="key">
                <valueString 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">
                <valueString
                             value="item.where(linkId=%linkIdPrefix+&#39;1&#39;).exists() or item.where(linkId=%linkIdPrefix+&#39;2&#39;).exists()"/>
              </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=&#39;official&#39;).exists(),%person.name.where(use=&#39;official&#39;)[0],%person.name[0])"/>
              </valueExpression>
            </extension>
            <linkId value="patientcontact.1"/>
            <definition
                        value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-question-library#Demographics.name"/>
            <text value="What is the person&#39;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 (&#39;Mr.&#39;|&#39;Miss&#39;|&#39;Mrs&#39;|&#39;Ms.&#39;))[0]"/>
                </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/sdc-question-library#Demographics.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/sdc-question-library#Demographics.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[use=&#39;phone&#39;][0]"/>
              </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>
        <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>