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_names_with_index".
The table contains the following columns:
| Name | Fhir Type | SQL Type | Collection |
|---|---|---|---|
| patient_id | string | String | |
| name_index | integer | Integer | |
| use | string | String | |
| family | string | String | |
| given | string | String |
Selection Rules:
| Item | Coll | Type | Description |
|---|---|---|---|
![]() | Patient | ||
![]() ![]() | |||
![]() ![]() ![]() | getResourceKey() | ||
![]() ![]() | for each name | ||
![]() ![]() ![]() | integer | %rowIndexThe 0-based position of this name in the patient's name array. | |
![]() ![]() ![]() | use | ||
![]() ![]() ![]() | family | ||
![]() ![]() ![]() | given.join(' ') |
This will result in a "patient_names_with_index" table that looks like this:
| patient_id | name_index | use | family | given |
| 28 | 0 | official | Vicario | Malvina Gerda |
| 28 | 1 | usual | Vicario | Mal |
| 29 | 0 | official | Bristow | Yolotzin Adel |
| 30 | 0 | official | Aarens | Jin Gomer |