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

Library: OMOP/FHIR Patient Match with Diagnoses

Official URL: http://hl7.org/fhir/uv/sql-on-fhir/Library/OmopFhirPatientJoin Version: 3.0.0-ballot
Standards status: Informative Computable Name: OmopFhirPatientJoin
Other Identifiers: OID:2.16.840.1.113883.4.642.40.77.28.3

Uses labels to disambiguate patient views from different sources and joins patient diagnoses for downstream analytics.

SELECT
  omop_person.person_id AS omop_person_id,
  fhir_patient.id AS fhir_patient_id,
  fhir_patient.name,
  diagnoses_view.code AS diagnosis_code,
  diagnoses_view.display AS diagnosis_display
FROM omop_person
JOIN fhir_patient
  ON omop_person.person_id = fhir_patient.mrn
JOIN diagnoses_view
  ON diagnoses_view.patient_id = fhir_patient.id
WHERE omop_person.source_system = :source_system

Metadata
Title OMOP/FHIR Patient Match with Diagnoses
Version 3.0.0-ballot
Identifier urn:oid:2.16.840.1.113883.4.642.40.77.28.3
Jurisdiction World
Steward (Publisher) HL7 International / FHIR Infrastructure
Steward Contact HL7 International / FHIR Infrastructure
Description

Uses labels to disambiguate patient views from different sources and joins patient diagnoses for downstream analytics.

SELECT
  omop_person.person_id AS omop_person_id,
  fhir_patient.id AS fhir_patient_id,
  fhir_patient.name,
  diagnoses_view.code AS diagnosis_code,
  diagnoses_view.display AS diagnosis_display
FROM omop_person
JOIN fhir_patient
  ON omop_person.person_id = fhir_patient.mrn
JOIN diagnoses_view
  ON diagnoses_view.patient_id = fhir_patient.id
WHERE omop_person.source_system = :source_system
Type sql-query from http://hl7.org/fhir/uv/sql-on-fhir/CodeSystem/LibraryTypesCodes
Dependency Description: OMOP Person view
Resource: https://example.org/omop/ViewDefinition/Patient
Canonical URL: https://example.org/omop/ViewDefinition/Patient
Dependency Description: FHIR Patient view
Resource: https://example.org/fhir/ViewDefinition/Patient
Canonical URL: https://example.org/fhir/ViewDefinition/Patient
Dependency Description: Diagnosis facts view
Resource: https://example.org/ViewDefinition/diagnoses_view
Canonical URL: https://example.org/ViewDefinition/diagnoses_view
Parameters
Name Use Card. Type Documentation
source_system In 0..1 string Source system identifier for OMOP records
Library Content
application/sqlContent
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates