SQL on FHIR
2.1.0-pre - release International flag

SQL on FHIR - Local Development build (v2.1.0-pre) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Example Binary: EncounterFlat

This content is an example of the View Definition Logical Model and is not a FHIR Resource

    
{
  "resourceType": "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition",
  "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"
    }
  ],
  "name": "encounter_flat",
  "status": "draft",
  "resource": "Encounter"
}