SQL on FHIR
2.1.0-pre - release International flag

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

Example Binary: ConditionFlat

{
  "resourceType" : "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition",
  "id" : "ConditionFlat",
  "name" : "condition_flat",
  "status" : "draft",
  "resource" : "Condition",
  "select" : [
    {
      "column" : [
        {
          "path" : "getResourceKey()",
          "name" : "id"
        },
        {
          "path" : "subject.getReferenceKey(Patient)",
          "name" : "patient_id"
        },
        {
          "path" : "encounter.getReferenceKey(Encounter)",
          "name" : "encounter_id"
        },
        {
          "path" : "onset.ofType(dateTime)",
          "name" : "onset_datetime",
          "type" : "dateTime"
        }
      ]
    },
    {
      "column" : [
        {
          "path" : "system",
          "name" : "system",
          "type" : "uri"
        },
        {
          "path" : "code",
          "name" : "code"
        }
      ],
      "forEachOrNull" : "code.coding"
    },
    {
      "column" : [
        {
          "path" : "code",
          "name" : "category"
        }
      ],
      "forEachOrNull" : "category.coding"
    },
    {
      "column" : [
        {
          "path" : "code",
          "name" : "clinical_status"
        }
      ],
      "forEachOrNull" : "clinicalStatus.coding"
    },
    {
      "column" : [
        {
          "path" : "code",
          "name" : "verification_status"
        }
      ],
      "forEachOrNull" : "verificationStatus.coding"
    }
  ]
}