SQL on FHIR
2.1.0-pre - 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 2.1.0-pre 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

: Active Patients - XML Representation

Page standards status: Informative

Raw xml | Download


<Library xmlns="http://hl7.org/fhir">
  <id value="ActivePatientsView"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/SQLView"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
<div>
    <table class="grid dict">
        
        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">Active Patients</td>
        </tr>
        

        
        
        <tr>
            <th scope="row"><b>Id: </b></th>
            <td style="padding-left: 4px;">ActivePatientsView</td>
        </tr>
        

        
        
        <tr>
            <th scope="row"><b>Version: </b></th>
            <td style="padding-left: 4px;">2.1.0-pre</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="Library-ActivePatientsView.html">Active Patients</a></td>
        </tr>
        

        
        <tr>
            <th scope="row">
                <b>
                    
                        
                    
                </b>
            </th>
            <td style="padding-left: 4px;">
                
                <p style="margin-bottom: 5px;">
                    <span>urn:oid:2.16.840.1.113883.4.642.40.77.28.2</span>
                </p>
                
            </td>
        </tr>
        

        

        

        

        
        <tr>
            <th scope="row"><b>Type: </b></th>
            <td style="padding-left: 4px;">
                
                    
                        
                        <p style="margin-bottom: 5px;">
                            <b>system: </b> <span><a href="CodeSystem-LibraryTypesCodes.html">http://hl7.org/fhir/uv/sql-on-fhir/CodeSystem/LibraryTypesCodes</a></span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>code: </b> <span>sql-view</span>
                        </p>
                        
                        
                    
                
                
            </td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Date: </b></th>
            <td style="padding-left: 4px;">2026-07-28 04:38:44+0000</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Publisher: </b></th>
            <td style="padding-left: 4px;">HL7 International / FHIR Infrastructure</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Description: </b></th>
            <td style="padding-left: 4px;"><div><p>Selects the identifier, name, and birth date of every active patient. Other
queries reference this view by its canonical URL and use the <code>active_patients</code>
label as a table name.</p>
<pre><code class="language-sql">SELECT
  patient_view.id AS patient_id,
  patient_view.name AS patient_name,
  patient_view.birth_date
FROM patient_view
WHERE patient_view.active = true
</code></pre>
</div></td>
        </tr>
        

        

        

        

        
        <tr>
            <th scope="row"><b>Jurisdiction: </b></th>
            <td style="padding-left: 4px;">001</td>
        </tr>
        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Related Artifacts: </b></th>
            <td style="padding-left: 4px;">
                
                
                
                <p><b>Dependencies</b></p>
                <ul>
                  
                    <li><code>https://example.org/ViewDefinition/patient_view</code></li>
                  
                </ul>
                
                
                
                
                
            </td>
        </tr>
        

        

        

        
        
        
        <tr>
          <td colspan="2">
            <table>
              <tr><th><b>Content: </b> application/sql</th></tr>
              <tr><td><pre><code>Encoded data (204 characters)</code></pre></td></tr>
            </table>
          </td>
        </tr>
        
        
    </table>
</div>
</div>
  </text>
  <url value="http://hl7.org/fhir/uv/sql-on-fhir/Library/ActivePatientsView"/>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:2.16.840.1.113883.4.642.40.77.28.2"/>
  </identifier>
  <version value="2.1.0-pre"/>
  <name value="ActivePatientsView"/>
  <title value="Active Patients"/>
  <status value="active"/>
  <type>
    <coding>
      <system
              value="http://hl7.org/fhir/uv/sql-on-fhir/CodeSystem/LibraryTypesCodes"/>
      <code value="sql-view"/>
    </coding>
  </type>
  <date value="2026-07-28T04:38:44+00:00"/>
  <publisher value="HL7 International / FHIR Infrastructure"/>
  <contact>
    <name value="HL7 International / FHIR Infrastructure"/>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/fiwg"/>
    </telecom>
  </contact>
  <description
               value="Selects the identifier, name, and birth date of every active patient. Other
queries reference this view by its canonical URL and use the `active_patients`
label as a table name.

```sql
SELECT
  patient_view.id AS patient_id,
  patient_view.name AS patient_name,
  patient_view.birth_date
FROM patient_view
WHERE patient_view.active = true
```"/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <relatedArtifact>
    <type value="depends-on"/>
    <label value="patient_view"/>
    <resource value="https://example.org/ViewDefinition/patient_view"/>
  </relatedArtifact>
  <content>
    <extension
               url="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/sql-text">
      <valueString
                   value="SELECT
  patient_view.id AS patient_id,
  patient_view.name AS patient_name,
  patient_view.birth_date
FROM patient_view
WHERE patient_view.active = true"/>
    </extension>
    <contentType value="application/sql"/>
    <data
          value="U0VMRUNUCiAgcGF0aWVudF92aWV3LmlkIEFTIHBhdGllbnRfaWQsCiAgcGF0aWVudF92aWV3Lm5hbWUgQVMgcGF0aWVudF9uYW1lLAogIHBhdGllbnRfdmlldy5iaXJ0aF9kYXRlCkZST00gcGF0aWVudF92aWV3CldIRVJFIHBhdGllbnRfdmlldy5hY3RpdmUgPSB0cnVl"/>
  </content>
</Library>