SQL on FHIR
2.1.0-pre - release
SQL on FHIR, published by SQL on FHIR Working Group. 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
| Official URL: https://sql-on-fhir.org/ig/Library/ActivePatientAddressesQuery | Version: 2.1.0-pre | |||
| Active as of 2026-06-13 | Computable Name: ActivePatientAddressesQuery | |||
Joins the Active Patients view to patient
addresses. The active_patients label resolves to the referenced SQLView, which
the executing engine may materialise or inline.
SELECT
active_patients.patient_id,
active_patients.patient_name,
patient_address_view.city,
patient_address_view.state
FROM active_patients
JOIN patient_address_view
ON active_patients.patient_id = patient_address_view.patient_id
Profile: SQL Query Library
| Depends On | active_patients | Active Patients view | Active Patients |
| Depends On | patient_address_view | Patient address view | https://example.org/ViewDefinition/patient_address_view |
application/sql
SELECT
active_patients.patient_id,
active_patients.patient_name,
patient_address_view.city,
patient_address_view.state
FROM active_patients
JOIN patient_address_view
ON active_patients.patient_id = patient_address_view.patient_id