Structured Data Capture
3.0.0 - STU 3 International flag

Structured Data Capture, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 3.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/sdc/ and changes regularly. 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/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="'patientname.'"/>
            </valueExpression>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/questionnaire-constraint">
            <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">
              <valueString
                           value="item.where(linkId=%linkIdPrefix+'1').exists() or item.where(linkId=%linkIdPrefix+'2').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='official').exists(),%person.name.where(use='official')[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'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.'))[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's date of birth?"/>
          <type value="date"/>
          <required value="true"/>
        </item>
        <item>
          <linkId value="3"/>
          <definition
                      value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-question-library#Demographics.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/sdc-question-library#Demographics.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/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="'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/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+'1').exists() or item.where(linkId=%linkIdPrefix+'2').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='official').exists(),%person.name.where(use='official')[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'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.'))[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.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>
        <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>