SQL on FHIR
3.1.0-draft - CI Build International flag

SQL on FHIR, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 3.1.0-draft built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/sql-on-fhir/ and changes regularly. See the Directory of published versions

: Patient Names with Index

Raw xml | Download


<ViewDefinition xmlns="http://hl7.org/fhir"
                resourceDefinition="http://hl7.org/fhir/StructureDefinition/ViewDefinition|3.1.0-draft">
  <id value="PatientNamesWithIndex"/>
  <language value="en"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: ViewDefinition PatientNamesWithIndex</b></p><a name="PatientNamesWithIndex"> </a><a name="hcPatientNamesWithIndex"> </a><p>This view acts on the Patient resource to produce a table named &quot;<code>patient_names_with_index</code>&quot;.</p><p>The table contains the following columns:</p><table class="grid"><tr><th>Name</th><th>Fhir Type</th><th>SQL Type</th><th>Collection</th></tr><tr><td>patient_id</td><td>string</td><td>String</td><td></td></tr><tr><td>name_index</td><td>integer</td><td>Integer</td><td></td></tr><tr><td>use</td><td>string</td><td>String</td><td></td></tr><tr><td>family</td><td>string</td><td>String</td><td></td></tr><tr><td>given</td><td>string</td><td>String</td><td></td></tr></table><p>Selection Rules:</p><table border="1" cellpadding="0" cellspacing="0" class="xhtTableBorder1"><tr class="xhtRowBorder2"><th scope="col" style="" class="hierarchy xhtCellBorder1"><span title="The linkID for the item">Item</span></th><th scope="col" style="" class="hierarchy xhtCellBorder1"><span title="Text for the item">Coll</span></th><th scope="col" style="" class="hierarchy xhtCellBorder1"><span title="Minimum and Maximum # of times the item can appear in the instance">Type</span></th><th scope="col" style="" class="hierarchy xhtCellBorder1"><span title="The type of the item">Description</span></th></tr><tr class="xhtRowBorder1 xhtRowEven"><td style="background-image: url(tbl_bck1.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_view.png" alt="" style="background-color: white; background-color: inherit" title="QuestionnaireRoot" class="hierarchy"/> patient_names_with_index</td><td style="" class="hierarchy xhtCellBorder1"></td><td style="" class="hierarchy xhtCellBorder1">Patient</td><td style="" class="hierarchy xhtCellBorder1"/></tr>
<tr class="xhtRowBorder1 xhtRowOdd"><td style="background-image: url(tbl_bck11.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_select.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Select" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">patient_names_with_index / </span>Select</td><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"/></tr>
<tr class="xhtRowBorder1 xhtRowEven"><td style="background-image: url(tbl_bck100.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_col.png" alt="" style="background-color: white; background-color: inherit" title="Column" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">patient_names_with_index / Select / </span>patient_id</td><td style="" class="hierarchy xhtCellBorder1"></td><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"><span style="font-size: 11px"><code>getResourceKey()</code></span></td></tr>
<tr class="xhtRowBorder1 xhtRowOdd"><td style="background-image: url(tbl_bck01.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_select.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Select" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">patient_names_with_index / </span>Select</td><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"><span style="font-size: 11px">for each <code>name</code></span></td></tr>
<tr class="xhtRowBorder1 xhtRowEven"><td style="background-image: url(tbl_bck010.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_col.png" alt="" style="background-color: white; background-color: inherit" title="Column" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">patient_names_with_index / Select / </span>name_index</td><td style="" class="hierarchy xhtCellBorder1"></td><td style="" class="hierarchy xhtCellBorder1">integer</td><td style="" class="hierarchy xhtCellBorder1"><span style="font-size: 11px"><code>%rowIndex</code></span><br/>The 0-based position of this name in the patient's name array.</td></tr>
<tr class="xhtRowBorder1 xhtRowOdd"><td style="background-image: url(tbl_bck010.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_col.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Column" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">patient_names_with_index / Select / </span>use</td><td style="" class="hierarchy xhtCellBorder1"></td><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"><span style="font-size: 11px"><code>use</code></span></td></tr>
<tr class="xhtRowBorder1 xhtRowEven"><td style="background-image: url(tbl_bck010.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_col.png" alt="" style="background-color: white; background-color: inherit" title="Column" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">patient_names_with_index / Select / </span>family</td><td style="" class="hierarchy xhtCellBorder1"></td><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"><span style="font-size: 11px"><code>family</code></span></td></tr>
<tr class="xhtRowBorder1 xhtRowOdd"><td style="background-image: url(tbl_bck000.png)" class="hierarchy xhtCellBorder1 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_vd_col.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Column" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">patient_names_with_index / Select / </span>given</td><td style="" class="hierarchy xhtCellBorder1"></td><td style="" class="hierarchy xhtCellBorder1"/><td style="" class="hierarchy xhtCellBorder1"><span style="font-size: 11px"><code>given.join(' ')</code></span></td></tr>
</table></div>
  </text>
  <name value="patient_names_with_index"/>
  <status value="draft"/>
  <resource value="Patient"/>
  <select>
    <column>
      <path value="getResourceKey()"/>
      <name value="patient_id"/>
    </column>
  </select>
  <select>
    <column>
      <path value="%rowIndex"/>
      <name value="name_index"/>
      <description
                   value="The 0-based position of this name in the patient's name array."/>
      <type value="integer"/>
    </column>
    <column>
      <path value="use"/>
      <name value="use"/>
    </column>
    <column>
      <path value="family"/>
      <name value="family"/>
    </column>
    <column>
      <path value="given.join(' ')"/>
      <name value="given"/>
    </column>
    <forEach value="name"/>
  </select>
</ViewDefinition>