SQL on FHIR
2.1.0-pre - release International flag

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

Library: Active Patient Addresses

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

Related Artifacts

Depends Onactive_patientsActive Patients viewActive Patients
Depends Onpatient_address_viewPatient address viewhttps://example.org/ViewDefinition/patient_address_view

Contents

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