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/FHIR/sql-on-fhir-v2/ and changes regularly. See the Directory of published versions
{
"resourceType" : "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition",
"id" : "EncounterFlat",
"name" : "encounter_flat",
"status" : "draft",
"resource" : "Encounter",
"fhirVersion" : [
"4.0"
],
"select" : [
{
"column" : [
{
"path" : "getResourceKey()",
"name" : "id"
},
{
"path" : "status",
"name" : "status"
},
{
"path" : "subject.getReferenceKey(Patient)",
"name" : "patient_id"
},
{
"path" : "serviceProvider.getReferenceKey(Organization)",
"name" : "service_org_id"
},
{
"path" : "period.start",
"name" : "period_start"
},
{
"path" : "period.end",
"name" : "period_end"
},
{
"path" : "episodeOfCare.getReferenceKey(EpisodeOfCare)",
"name" : "EpisodeOfCareId"
}
]
},
{
"column" : [
{
"path" : "system",
"name" : "type_sys"
},
{
"path" : "code",
"name" : "type_code"
}
],
"forEachOrNull" : "type.coding"
},
{
"column" : [
{
"path" : "individual.getReferenceKey(Practitioner)",
"name" : "practitioner_id"
}
],
"forEachOrNull" : "participant"
},
{
"column" : [
{
"path" : "location.getReferenceKey(Location)",
"name" : "location_id"
}
],
"forEachOrNull" : "location"
}
]
}