offdataai
Healthcare & Life Sciences · data model template

Laboratory Information System data model

Normalized (3NF) laboratory information system (LIS). A test compendium (single tests and panels) keyed by LOINC drives orders; specimens carry chain-of-custody, results are discrete per analyte with applied reference ranges and abnormal flags, and analyzers track QC runs with Westgard rule evaluation for CLIA/CAP. PHI is classified phi and masked.

Operational clinical-laboratory data: patients, ordering providers, specimens, test orders and panels, individual analyte results, analyzers, reference ranges, and quality-control runs. Orderable tests and result analytes are coded with LOINC, specimens follow HL7 specimen terminology, and QC supports CLIA/CAP. Patient PHI is classified and masked for HIPAA. It is a normalized (3NF) relational model that mirrors the source system, suited to operational databases and to landing source data faithfully.

3NFHealthcare & Life SciencesHIPAACLIACAPHITECH
12
tables
137
columns
18
relationships
13
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: PostgreSQL). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

partiestest_catalogoperationsordering_resulting

Design decisions

  • LOINC coding for tests and results

    Orderable tests, panels, and result analytes are coded with LOINC so results are universally identifiable and comparable across instruments and institutions when exchanged via HL7.

  • Order/specimen/result separated by grain

    One order can yield multiple specimens and many discrete analyte results; modeling them as distinct tables preserves chain-of-custody and one-row-per-analyte resulting grain.

  • Reference ranges as their own table

    Normal and critical limits vary by sex and age and change over time; keeping them in a dedicated, effective-dated table lets results link to the exact interval applied at resulting time.

  • Quality control modeled for CLIA/CAP

    Regulatory accreditation requires documented QC; storing QC runs with control lots, target mean/SD, and Westgard-rule violations supports CLIA and CAP inspection and result release decisions.

  • PHI classification and masking for HIPAA

    Patient identifiers and staff names (collected/verified/performed by) are classified phi/confidential and masked (SSN fully) so the governance report enforces HIPAA controls.

Tables in the Laboratory Information System model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Tables (12)

laboratory

Grain: one row per performing laboratory / facility

ColumnTypeKeys
laboratory_keybigintPK
laboratory_idvarcharBK
namevarchar
clia_numbervarchar
cap_numbervarchar
lab_typevarchar
director_namevarcharPII
phonevarchar
address_line1varchar
cityvarchar
statevarchar
postal_codevarchar
is_activeboolean

provider

Grain: one row per ordering provider

ColumnTypeKeys
provider_keybigintPK
provider_idvarcharBK
npivarchar
first_namevarcharPII
last_namevarcharPII
specialtyvarchar
organization_namevarchar
phonevarcharPII
faxvarchar
is_activeboolean

patient

Grain: one row per patient

All PHI masked for HIPAA.

ColumnTypeKeys
patient_keybigintPK
mrnvarcharBK
ssnvarcharPII
first_namevarcharPII
last_namevarcharPII
date_of_birthdatePII
sexvarchar
racevarchar
phonevarcharPII
address_line1varcharPII
cityvarchar
statevarchar
postal_codevarchar
is_activeboolean

test_definition

Grain: one row per orderable/resultable test (LOINC)

Compendium of orderable tests keyed by LOINC.

ColumnTypeKeys
test_definition_keybigintPK
test_codevarcharBK
loinc_codevarchar
test_namevarchar
categoryvarchar
specimen_requirementvarchar
result_data_typevarchar
default_unitvarchar
methodologyvarchar
turnaround_hourssmallint
is_activeboolean

test_panel

Grain: one row per orderable panel / battery

ColumnTypeKeys
test_panel_keybigintPK
panel_codevarcharBK
loinc_codevarchar
panel_namevarchar
categoryvarchar
specimen_requirementvarchar
is_activeboolean

panel_member

Grain: one row per test within a panel (junction)

ColumnTypeKeys
panel_member_keybigintPK
test_panel_keybigint
test_definition_keybigint
display_ordersmallint
is_reflexboolean

analyzer

Grain: one row per laboratory instrument / analyzer

ColumnTypeKeys
analyzer_keybigintPK
laboratory_keybigint
analyzer_idvarcharBK
namevarchar
manufacturervarchar
modelvarchar
serial_numbervarchar
departmentvarchar
calibration_due_datedate
statusvarchar
installed_datedate

reference_range

Grain: one row per reference interval for a test

Age/sex-specific normal and critical limits.

ColumnTypeKeys
reference_range_keybigintPK
test_definition_keybigint
sexvarchar
age_low_yearsdecimal
age_high_yearsdecimal
range_lowdecimal
range_highdecimal
critical_lowdecimal
critical_highdecimal
unitvarchar
effective_datedate
is_activeboolean

test_order

Grain: one row per ordered test/panel for a patient

ColumnTypeKeys
test_order_keybigintPK
patient_keybigint
provider_keybigint
laboratory_keybigint
test_definition_keybigint
test_panel_keybigint
order_idvarcharBK
priorityvarchar
clinical_infovarchar
fasting_statusvarchar
statusvarchar
ordered_datetimetimestamp

specimen

Grain: one row per collected specimen (HL7 specimen)

Chain-of-custody specimen tracking.

ColumnTypeKeys
specimen_keybigintPK
test_order_keybigint
patient_keybigint
specimen_idvarcharBK
specimen_typevarchar
container_typevarchar
body_sitevarchar
volume_mldecimal
collection_methodvarchar
conditionvarchar
collected_datetimetimestamp
received_datetimetimestamp
collected_byvarcharPII

result

Grain: one row per resulted analyte (LOINC)

Discrete analyte results keyed by LOINC.

ColumnTypeKeys
result_keybigintPK
test_order_keybigint
test_definition_keybigint
specimen_keybigint
analyzer_keybigint
reference_range_keybigint
loinc_codevarchar
value_numericdecimal
value_textvarchar
unitvarchar
abnormal_flagvarchar
interpretationvarchar
statusvarchar
verified_byvarcharPII
resulted_datetimetimestamp
verified_datetimetimestamp

qc_run

Grain: one row per quality-control run on an analyzer

CLIA/CAP quality-control runs with Westgard evaluation.

ColumnTypeKeys
qc_run_keybigintPK
analyzer_keybigint
test_definition_keybigint
qc_run_idvarcharBK
control_lot_numbervarchar
control_levelvarchar
measured_valuedecimal
target_meandecimal
target_sddecimal
westgard_rule_violatedvarchar
result_statusvarchar
run_datetimetimestamp
performed_byvarcharPII

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • panel_member.test_panel_key → test_panel (many-to-one)
  • panel_member.test_definition_key → test_definition (many-to-one)
  • analyzer.laboratory_key → laboratory (many-to-one)
  • reference_range.test_definition_key → test_definition (many-to-one)
  • test_order.patient_key → patient (many-to-one)
  • test_order.provider_key → provider (many-to-one)
  • test_order.laboratory_key → laboratory (many-to-one)
  • test_order.test_definition_key → test_definition (many-to-one)
  • test_order.test_panel_key → test_panel (many-to-one)
  • specimen.test_order_key → test_order (many-to-one)
  • specimen.patient_key → patient (many-to-one)
  • result.test_order_key → test_order (many-to-one)
  • result.test_definition_key → test_definition (many-to-one)
  • result.specimen_key → specimen (many-to-one)
  • result.analyzer_key → analyzer (many-to-one)
  • result.reference_range_key → reference_range (many-to-one)
  • qc_run.analyzer_key → analyzer (many-to-one)
  • qc_run.test_definition_key → test_definition (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time