SQL on FHIR
3.0.0-ballot - STU 3 Ballot 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 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

Example ViewDefinition: Patient Addresses

This view acts on the Patient resource to produce a table named "patient_addresses".

The table contains the following columns:

NameFhir TypeSQL TypeCollectionNotes
patient_idstringString
streetstringString
usestringStringThis column is not defined as a collection, but the path statement 'use' might return multiple values for the column 'use' for some inputs
citystringStringThis column is not defined as a collection, but the path statement 'city' might return multiple values for the column 'city' for some inputs
zipstringStringThis column is not defined as a collection, but the path statement 'postalCode' might return multiple values for the column 'zip' for some inputs

Selection Rules:

ItemCollTypeDescription
.. patient_addressesPatient
... Select
.... patient_idgetResourceKey()
... Selectfor each address
.... streetline.join(' ')
The full street address, including newlines if present.
.... useuse
.... citycity
.... zippostalCode