Data Schema#
The Scout Rad Report Explorer is backed by Delta Lake and MinIO to store and manage HL7 radiology reports and other data and metadata. There is one main table that contains the report data. Below is a description of the report table schema and the mapping of HL7 fields to the report table columns. Note that some fields are derived from others, and some fields may not be directly mapped to HL7 fields.
Column Name |
HL7 Report Field |
Data Type |
Nullable |
Description/Notes |
|---|---|---|---|---|
|
string |
No |
The location of the report file. |
|
|
timestamp |
No |
Timestamp of the last update to the report in the Delta Lake. |
|
|
MSH-10 |
string |
Yes |
Unique identifier for the HL7 message. |
|
MSH-4 |
string |
Yes |
Facility that sent the HL7 message. |
|
MSH-12 |
string |
Yes |
HL7 version used in the message. |
|
MSH-7 |
timestamp |
Yes |
Date and time the message was created. |
|
PID-7 |
date |
Yes |
Patient’s date of birth. |
|
PID-8 |
string |
Yes |
Patient’s gender. |
|
PID-10 |
string |
Yes |
Patient’s race. |
|
PID-11.5 |
string |
Yes |
Patient’s ZIP or postal code. |
|
PID-11.6 |
string |
Yes |
Patient’s country. |
|
PID-22 |
string |
Yes |
Patient’s ethnicity. |
|
string |
Yes |
JSON representation of all patient identifiers. Patient ID columns are also created for each assigning authority (e.g., |
|
|
string |
Yes |
Patient ID from Epic system. |
|
|
ORC-2 |
string |
Yes |
Placer order number from the order control segment. |
|
OBR-2 |
string |
Yes |
Placer order number from the observation request segment. |
|
ORC-3 |
string |
Yes |
Filler order number from the order control segment. |
|
OBR-3 |
string |
Yes |
Filler order number from the observation request segment. |
|
OBR-4.1 |
string |
Yes |
Code for the service or exam. |
|
OBR-4.2 |
string |
Yes |
Name of the service or exam. |
|
OBR-4.3 |
string |
Yes |
Coding system used for the service identifier. |
|
OBR-24 |
string |
Yes |
Identifier for the diagnostic service. |
|
Derived |
string |
Yes |
Modality of the exam (e.g., CT, MRI). |
|
OBR-6 |
timestamp |
Yes |
Date and time the service was requested. |
|
OBR-7 |
timestamp |
Yes |
Date and time the observation was made. |
|
OBR-8 |
timestamp |
Yes |
Date and time the observation ended. |
|
OBR-22 |
timestamp |
Yes |
Date and time the report status changed. |
|
DG1-3.1 |
string |
Yes |
Diagnosis code. |
|
DG1-3.2 |
string |
Yes |
Description of the diagnosis. |
|
DG1-3.3 |
string |
Yes |
Coding system used for the diagnosis code. |
|
ZDS-1 |
string |
Yes |
Unique identifier for the study instance. |
|
OBX-5 |
string |
Yes |
Full text of the diagnostic report. |
|
OBX-11 |
string |
Yes |
Status of the diagnostic report. |
|
Derived |
integer |
Yes |
Year the message was created, derived from |
The patient_id_json column contains a JSON representation of all patient identifiers associated with the report.
An example of the JSON representation is shown below:
[
{
"id_number": "ABC9587720",
"assigning_authority": "ABC",
"identifier_type_code": "MR"
},
{
"id_number": "EPIC11381864",
"assigning_authority": "EPIC",
"identifier_type_code": "MRN"
}
]
The assigning authority and identifier type code are used to create separate columns for each patient ID type to
facilitate easier querying and analysis. For example, the epic_mrn column is created from the assigning authority
“EPIC” and identifier type code “MRN”. The same applies to other patient ID columns.