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
| Page standards status: Informative |
{
"resourceType" : "Library",
"id" : "ActivePatientsView",
"meta" : {
"profile" : [
🔗 "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/SQLView"
]
},
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n<div>\n <table class=\"grid dict\">\n \n \n <tr>\n <th scope=\"row\"><b>Title: </b></th>\n <td style=\"padding-left: 4px;\">Active Patients</td>\n </tr>\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Id: </b></th>\n <td style=\"padding-left: 4px;\">ActivePatientsView</td>\n </tr>\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Version: </b></th>\n <td style=\"padding-left: 4px;\">2.1.0-pre</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Url: </b></th>\n <td style=\"padding-left: 4px;\"><a href=\"Library-ActivePatientsView.html\">Active Patients</a></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n \n </b>\n </th>\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>urn:oid:2.16.840.1.113883.4.642.40.77.28.2</span>\n </p>\n \n </td>\n </tr>\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Type: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n \n <p style=\"margin-bottom: 5px;\">\n <b>system: </b> <span><a href=\"CodeSystem-LibraryTypesCodes.html\">http://hl7.org/fhir/uv/sql-on-fhir/CodeSystem/LibraryTypesCodes</a></span>\n </p>\n \n \n <p style=\"margin-bottom: 5px;\">\n <b>code: </b> <span>sql-view</span>\n </p>\n \n \n \n \n \n </td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Date: </b></th>\n <td style=\"padding-left: 4px;\">2026-07-28 04:38:44+0000</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Publisher: </b></th>\n <td style=\"padding-left: 4px;\">HL7 International / FHIR Infrastructure</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Description: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>Selects the identifier, name, and birth date of every active patient. Other\nqueries reference this view by its canonical URL and use the <code>active_patients</code>\nlabel as a table name.</p>\n<pre><code class=\"language-sql\">SELECT\n patient_view.id AS patient_id,\n patient_view.name AS patient_name,\n patient_view.birth_date\nFROM patient_view\nWHERE patient_view.active = true\n</code></pre>\n</div></td>\n </tr>\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Jurisdiction: </b></th>\n <td style=\"padding-left: 4px;\">001</td>\n </tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Related Artifacts: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n \n <p><b>Dependencies</b></p>\n <ul>\n \n <li><code>https://example.org/ViewDefinition/patient_view</code></li>\n \n </ul>\n \n \n \n \n \n </td>\n </tr>\n \n\n \n\n \n\n \n \n \n <tr>\n <td colspan=\"2\">\n <table>\n <tr><th><b>Content: </b> application/sql</th></tr>\n <tr><td><pre><code>Encoded data (204 characters)</code></pre></td></tr>\n </table>\n </td>\n </tr>\n \n \n </table>\n</div>\n</div>"
},
"url" : "http://hl7.org/fhir/uv/sql-on-fhir/Library/ActivePatientsView",
"identifier" : [
{
"system" : "urn:ietf:rfc:3986",
"value" : "urn:oid:2.16.840.1.113883.4.642.40.77.28.2"
}
],
"version" : "2.1.0-pre",
"name" : "ActivePatientsView",
"title" : "Active Patients",
"status" : "active",
"type" : {
"coding" : [
{
"system" : "http://hl7.org/fhir/uv/sql-on-fhir/CodeSystem/LibraryTypesCodes",
"code" : "sql-view"
}
]
},
"date" : "2026-07-28T04:38:44+00:00",
"publisher" : "HL7 International / FHIR Infrastructure",
"contact" : [
{
"name" : "HL7 International / FHIR Infrastructure",
"telecom" : [
{
"system" : "url",
"value" : "http://www.hl7.org/Special/committees/fiwg"
}
]
}
],
"description" : "Selects the identifier, name, and birth date of every active patient. Other\nqueries reference this view by its canonical URL and use the `active_patients`\nlabel as a table name.\n\n```sql\nSELECT\n patient_view.id AS patient_id,\n patient_view.name AS patient_name,\n patient_view.birth_date\nFROM patient_view\nWHERE patient_view.active = true\n```",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001",
"display" : "World"
}
]
}
],
"relatedArtifact" : [
{
"type" : "depends-on",
"label" : "patient_view",
"resource" : "https://example.org/ViewDefinition/patient_view"
}
],
"content" : [
{
"extension" : [
{
"url" : "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/sql-text",
"valueString" : "SELECT\n patient_view.id AS patient_id,\n patient_view.name AS patient_name,\n patient_view.birth_date\nFROM patient_view\nWHERE patient_view.active = true"
}
],
"contentType" : "application/sql",
"data" : "U0VMRUNUCiAgcGF0aWVudF92aWV3LmlkIEFTIHBhdGllbnRfaWQsCiAgcGF0aWVudF92aWV3Lm5hbWUgQVMgcGF0aWVudF9uYW1lLAogIHBhdGllbnRfdmlldy5iaXJ0aF9kYXRlCkZST00gcGF0aWVudF92aWV3CldIRVJFIHBhdGllbnRfdmlldy5hY3RpdmUgPSB0cnVl"
}
]
}