SQL on FHIR, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 3.0.0-ballot 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
This view acts on the Patient resource to produce a table named "patient_and_contact_addresses".
The table contains the following columns:
| Name | Fhir Type | SQL Type | Collection |
|---|---|---|---|
| resource_id | string | String | |
| street | string | String | |
| city | string | String | |
| zip | string | String | |
| is_patient | boolean | Boolean |
Selection Rules:
| Item | Coll | Type | Description |
|---|---|---|---|
![]() | Patient | ||
![]() ![]() | |||
![]() ![]() ![]() | getResourceKey() |
This will result in a "patient_and_contact_addresses" table that looks like this:
| resource_id | street | city | zip | is_patient |
| 28 | 123 Main St Apt 1 | San Diego | 92101 | 1 |
| 28 | 456 Maplewood Dve Apt 2 | New York | 10001 | 1 |
| 28 | 456 Maplewood Dve Apt 2 | New York | 10001 | 0 |
| 29 | 789 Brookside Ave Apt 3 | Los Angeles | 90001 | 1 |
| 29 | 987 Pinehurst Rd Apt 4 | Chicago | 60601 | 0 |
| 30 | 987 Pinehurst Rd Apt 4 | Chicago | 60601 | 1 |
| 30 | 654 Evergreen Tce Apt 5 | Houston | 77001 | 1 |