Skip to main content

Master database — data model

The master database (rcm_master) holds cross-tenant registries: tenant metadata, platform users, payer / trading-partner / companion-guide registries, and shared reference data (NPI provider registry, X12 code sets). One master DB per environment, replicated for read scale.

Diagrams are grouped by Postgres schema. Each diagram shows table boxes with primary keys + foreign keys + status / type / code columns. Full column inventories follow each diagram. Tables outside the diagrams (e.g. NPI staging) are intentionally omitted as ETL-internal.

Table of contents​

identity + security​

Tenant lifecycle, DB-server placement, platform users and roles.

The ER diagram below shows the core tables. Several auth-related tables added in ADM_02 (security.platform_user_mfa_factor, security.platform_user_recovery_code, security.platform_webauthn_credential) and ADM_03 (security.federation_partner, security.federation_key, security.federation_partner_tenant, security.federation_nonce, security.revoked_session) are omitted from the diagram to keep it readable — they are documented in the Federation and Security & Compliance chapters.

Column inventory​

identity.db_server​

ColumnTypeNullNotes
db_server_iduuidNPK
namevarchar(100)N
pgbouncer_hostvarchar(255)N
pgbouncer_portintegerN
admin_secret_refvarchar(200)N
regionvarchar(50)Y
capacity_hintintegerY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

identity.dr_drill​

ColumnTypeNullNotes
drill_iduuidNPK
tenant_iduuidYFK
environmentvarchar(16)N
source_db_server_idvarchar(128)N
restored_db_server_idvarchar(128)N
target_pitr_attimestamptzN
started_attimestamptzN
completed_attimestamptzN
rto_secondsintegerN
rpo_secondsintegerN
post_rotation_phi_dek_kidsmallintY
outcomevarchar(16)N
detailsjsonbN
initiated_byvarchar(128)N
recorded_attimestamptzN

identity.migration_cohort_run​

ColumnTypeNullNotes
run_iduuidNPK
started_attimestamptzN
finished_attimestamptzY
total_tenantsintegerN
cohort_sizeintegerN
stagger_msintegerN
succeeded_countintegerN
failed_countintegerN
last_completed_cohortintegerN
aborted_attimestamptzY
abort_reasontextY
operatorvarchar(200)Y
migration_argsjsonbN
reportjsonbY

identity.platform_job​

ColumnTypeNullNotes
job_iduuidNPK
kindvarchar(32)N
statusvarchar(16)N
started_byuuidYFK
tenant_iduuidYFK
payloadjsonbN
resultjsonbN
error_codevarchar(64)Y
error_messagetextY
started_attimestamptzN
finished_attimestamptzY

identity.tenant​

ColumnTypeNullNotes
tenant_iduuidNPK
slugvarchar(64)N
namevarchar(200)N
db_server_refuuidNFK
db_config_refvarchar(200)N
statusenumN
provisioned_attimestamptzY
status_changed_attimestamptzY
offboarded_attimestamptzY
created_attimestamptzN
updated_attimestamptzN
preferred_regionvarchar(50)Y
phi_dek_kidsmallintN

identity.tenant_audit​

ColumnTypeNullNotes
audit_iduuidNPK
event_typevarchar(64)N
tenant_iduuidYFK
platform_user_iduuidYFK
detailsjsonbN
ip_addressinetY
user_agenttextY
occurred_attimestamptzN

identity.worker_lease​

ColumnTypeNullNotes
worker_idvarchar(200)NPK
hostnamevarchar(255)N
pidintegerN
started_attimestamptzN
last_heartbeat_attimestamptzN
generationintegerN
metadatajsonbY

security.platform_role​

ColumnTypeNullNotes
platform_role_iduuidNPK
codevarchar(50)N
descriptiontextN
created_attimestamptzN

security.platform_role_assignment​

ColumnTypeNullNotes
platform_user_iduuidNPK, FK
platform_role_iduuidNPK, FK
assigned_attimestamptzN
assigned_byuuidYFK

security.platform_user​

ColumnTypeNullNotes
platform_user_iduuidNPK
emailenumN
password_hashvarchar(255)N
full_namevarchar(200)Y
is_activebooleanN
last_login_attimestamptzY
created_attimestamptzN
updated_attimestamptzN

rcm_master — payer and EDI registry​

Payers, programs and program rules, aliases, trading partners, companion guides, submission routing.

Column inventory​

rcm_master.companion_guide​

ColumnTypeNullNotes
companion_guide_iduuidNPK
trading_partner_iduuidNFK
tx_typevarchar(10)N
guide_versionvarchar(50)N
descriptiontextY
effective_fromdateY
effective_todateY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_master.companion_guide_rule​

ColumnTypeNullNotes
rule_iduuidNPK
companion_guide_iduuidNFK
loop_idvarchar(20)Y
segment_idvarchar(10)N
element_positionintegerY
component_positionintegerY
rule_typevarchar(20)N
conditionjsonbY
value_overridetextY
value_sourcevarchar(100)Y
validation_regexvarchar(255)Y
max_lengthintegerY
notestextY
sort_orderintegerN
created_attimestamptzN

rcm_master.payer​

ColumnTypeNullNotes
payer_iduuidNPK
namevarchar(255)N
payer_codevarchar(50)Y
payer_typevarchar(50)Y
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN
short_namevarchar(100)Y
statevarchar(2)Y
address_line1varchar(255)Y
address_line2varchar(255)Y
cityvarchar(100)Y
state_addrvarchar(2)Y
zipvarchar(10)Y
phonevarchar(20)Y
websitevarchar(255)Y
electronic_payer_idvarchar(50)Y
clearinghouse_payer_idvarchar(50)Y

rcm_master.payer_alias​

ColumnTypeNullNotes
alias_iduuidNPK
payer_iduuidNFK
alias_namevarchar(255)N
alias_contextvarchar(100)Y
is_activebooleanN
created_attimestamptzN

rcm_master.payer_lob​

ColumnTypeNullNotes
lob_iduuidNPK
payer_iduuidNFK
lob_codevarchar(50)N
lob_namevarchar(255)N
statevarchar(2)Y
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_master.payer_plan​

ColumnTypeNullNotes
plan_iduuidNPK
lob_iduuidNFK
plan_codevarchar(50)N
plan_namevarchar(255)N
plan_typevarchar(50)Y
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_master.payer_submission_capability​

ColumnTypeNullNotes
capability_iduuidNPK
payer_iduuidNFK
claim_typevarchar(1)N
submission_methodvarchar(20)N
trading_partner_iduuidYFK
accepts_secondarybooleanN
accepts_correctedbooleanN
timely_filing_daysintegerY
notestextY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_master.payer_trading_partner_id​

ColumnTypeNullNotes
ptp_iduuidNPK
payer_iduuidNFK
trading_partner_iduuidNFK
external_payer_idvarchar(50)N
is_activebooleanN
created_attimestamptzN

rcm_master.program​

The only program concept customers see (#5986 — was canonical_program; the old name was kept as a compatibility view until #5993 dropped it).

ColumnTypeNullNotes
program_iduuidNPK
namevarchar(100)N
service_linestext[]Nprimary service line first
descriptiontextY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_master.program_rule​

Rates and code rules for a program in a state (#5986 — was payer_program, kept as a compatibility view until #5993 dropped it). payer_id NULL is the standard rule set, set is a payer exception; state_code NULL is national. One active rule set per (program, state, payer, payer type) over its effective dates (excl_program_rule_one_per_scope). Its code-rule children — program_rule_procedure_code, _modifier_requirement, _pos, _tob, _revenue, _taxonomy — each carry program_rule_id and are documented in docs/database/master/.

ColumnTypeNullNotes
program_rule_iduuidNPK
program_iduuidNFK → program
state_codevarchar(2)YFK → state; NULL = national
payer_iduuidYFK → payer; NULL = standard
rule_kindvarchar(20)Ygenerated: TYPED_STANDARD · STANDARD · EXCEPTION · NATIONAL · NATIONAL_EXCEPTION
namevarchar(200)N
payer_typevarchar(50)Ya typed standard: applies only to payers of this payer.payer_type; NULL = any (#6275)
service_linestext[]N
external_program_idvarchar(100)Y
effective_fromdateN
effective_todateY
effective_rangedaterangeYgenerated
requires_referring_providerbooleanN
is_institutionalbooleanN
source_documentsjsonbY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_master.schema_version​

ColumnTypeNullNotes
version_iduuidNPK
schema_namevarchar(50)N
major_versionintegerN
minor_versionintegerN
patch_versionintegerN
descriptiontextY
applied_attimestamptzN

| effective_range | daterange | Y | | | rate_amount_cents | integer | Y | |

rcm_master.submission_routing_rule​

ColumnTypeNullNotes
routing_rule_iduuidNPK
statevarchar(2)Y
payer_iduuidY
payer_typevarchar(50)Y
service_linevarchar(50)Y
claim_typevarchar(5)N
tx_typevarchar(10)N
trading_partner_iduuidNFK
companion_guide_iduuidYFK
connection_configjsonbY
priorityintegerN
effective_fromdateY
effective_todateY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_master.trading_partner​

ColumnTypeNullNotes
trading_partner_iduuidNPK
namevarchar(255)N
partner_typevarchar(50)N
partner_codevarchar(50)Y
connection_configjsonbY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN
credential_last_rotated_attimestamptzY
credential_last_rotated_byvarchar(100)Y
credential_secret_namesARRAYN

rcm_reference — code sets​

X12 code lists (CPT/HCPCS, ICD-10, modifiers, place of service, revenue, CARC/RARC), CCI/MUE edits, payer supervision rules.

Column inventory​

rcm_reference.cci_edit_pair​

ColumnTypeNullNotes
cci_edit_iduuidNPK
column_1_codevarchar(10)N
column_2_codevarchar(10)N
modifier_indicatorvarchar(1)N
effective_fromdateN
effective_todateY
ptp_edit_typevarchar(20)N
sourcevarchar(20)N
created_attimestamptzN

rcm_reference.code_set_adjustment_group​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(5)N
descriptiontextN
is_activebooleanN
created_attimestamptzN

rcm_reference.code_set_adjustment_reason​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(10)N
descriptiontextN
effective_fromdateN
effective_todateY
deactivated_datedateY
notestextY
created_attimestamptzN

rcm_reference.code_set_icd10​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(10)N
code_typevarchar(5)N
short_descriptiontextY
long_descriptiontextY
effective_fromdateN
effective_todateY
is_billablebooleanN
chaptervarchar(10)Y
created_attimestamptzN

rcm_reference.code_set_modifier​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(5)N
descriptiontextY
modifier_typevarchar(50)Y
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN

rcm_reference.code_set_place_of_service​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(2)N
namevarchar(100)N
descriptiontextY
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN

rcm_reference.code_set_procedure​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(10)N
code_typevarchar(20)N
short_descriptiontextY
long_descriptiontextY
effective_fromdateN
effective_todateY
categoryvarchar(50)Y
is_activebooleanN
created_attimestamptzN

rcm_reference.code_set_remark​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(10)N
descriptiontextN
effective_fromdateN
effective_todateY
deactivated_datedateY
notestextY
created_attimestamptzN

rcm_reference.code_set_revenue​

ColumnTypeNullNotes
code_iduuidNPK
codevarchar(4)N
descriptiontextY
categoryvarchar(100)Y
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN
accommodation_subtypevarchar(20)Y

rcm_reference.group_size_rate_adjustment​

ColumnTypeNullNotes
adjustment_iduuidNPK
state_codevarchar(2)N
service_linevarchar(32)N
payer_iduuidY
min_group_sizeintegerN
max_group_sizeintegerY
percent_multipliernumericN
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_reference.medicaid_non_covered_carc​

ColumnTypeNullNotes
rule_iduuidNPK
state_codevarchar(2)Y
carc_codevarchar(5)N
reason_descriptiontextN
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN

rcm_reference.medicare_primary_rule​

ColumnTypeNullNotes
rule_iduuidNPK
rule_codevarchar(40)N
descriptiontextN
entitlement_reasonvarchar(20)Y
age_minintegerY
age_maxintegerY
employer_size_minintegerY
esrd_coordination_activebooleanY
requires_black_lungbooleanN
primary_payer_typevarchar(20)N
evaluation_orderintegerN
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN

rcm_reference.modifier_injection_rule​

ColumnTypeNullNotes
rule_iduuidNPK
procedure_codevarchar(16)N
service_linevarchar(32)Y
state_codevarchar(2)Y
payer_iduuidY
trigger_typevarchar(32)N
trigger_valuevarchar(64)N
modifier_codevarchar(8)N
modifier_sequencesmallintN
descriptiontextY
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN

rcm_reference.mue_limit​

ColumnTypeNullNotes
mue_limit_iduuidNPK
procedure_codevarchar(10)N
mue_valueintegerN
mai_indicatorvarchar(1)N
mue_rationalevarchar(1)N
edit_typevarchar(20)N
effective_fromdateN
effective_todateY
sourcevarchar(20)N
created_attimestamptzN

rcm_reference.payer_supervision_rule​

ColumnTypeNullNotes
rule_iduuidNPK
payer_iduuidY
state_codevarchar(2)Y
service_linevarchar(32)N
supervisor_credentialvarchar(16)N
supervisee_credentialvarchar(16)N
max_ratiointegerN
severityvarchar(16)N
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN

rcm_reference.procedure_service_line​

ColumnTypeNullNotes
procedure_service_line_iduuidNPK
procedure_codevarchar(10)N
service_linevarchar(20)N
is_primarybooleanN
typical_unit_typevarchar(20)Y
notestextY
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN
updated_attimestamptzN
effective_rangedaterangeY

rcm_reference.ub04_code​

ColumnTypeNullNotes
code_iduuidNPK
kindvarchar(20)N
codevarchar(10)N
descriptiontextN
effective_fromdateN
effective_todateY
is_activebooleanN
created_attimestamptzN

npi — NPPES provider registry​

Mirror of the CMS NPPES provider registry. Refreshed monthly.

Column inventory​

npi.address​

ColumnTypeNullNotes
address_iduuidNPK
provider_iduuidNFK
address_typevarchar(30)N
sequence_nointegerY
first_linevarchar(200)Y
second_linevarchar(200)Y
cityvarchar(100)Y
statevarchar(50)Y
postal_codevarchar(20)Y
country_codevarchar(2)Y
telephone_numbervarchar(25)Y
fax_numbervarchar(25)Y
telephone_extensionvarchar(10)Y
created_attimestamptzN

npi.endpoint​

ColumnTypeNullNotes
endpoint_iduuidNPK
provider_iduuidNFK
endpoint_typevarchar(50)Y
endpoint_type_descriptionvarchar(200)Y
endpointtextY
affiliationvarchar(10)Y
affiliation_legal_business_namevarchar(300)Y
use_codevarchar(50)Y
use_descriptionvarchar(200)Y
content_typevarchar(100)Y
content_descriptionvarchar(200)Y
content_other_descriptionvarchar(500)Y
address_first_linevarchar(200)Y
address_second_linevarchar(200)Y
address_cityvarchar(100)Y
address_statevarchar(50)Y
address_postal_codevarchar(20)Y
address_country_codevarchar(2)Y
created_attimestamptzN

npi.ingestion_history​

ColumnTypeNullNotes
ingestion_iduuidNPK
file_typevarchar(20)N
file_namevarchar(500)N
file_datedateY
statusvarchar(20)N
started_attimestamptzN
completed_attimestamptzY
records_processedintegerY
records_insertedintegerY
records_updatedintegerY
records_deactivatedintegerY
records_failedintegerY
error_messagetextY
detailsjsonbY
rows_processedjsonbY

npi.other_identifier​

ColumnTypeNullNotes
other_identifier_iduuidNPK
provider_iduuidNFK
identifiervarchar(50)N
identifier_type_codevarchar(10)Y
identifier_statevarchar(2)Y
identifier_issuervarchar(100)Y
sequence_nointegerN
created_attimestamptzN

npi.other_name​

ColumnTypeNullNotes
other_name_iduuidNPK
provider_iduuidNFK
other_namevarchar(300)N
other_name_type_codevarchar(5)Y
created_attimestamptzN

npi.practice_location​

ColumnTypeNullNotes
practice_location_iduuidNPK
provider_iduuidNFK
address_line_1textY
address_line_2textY
citytextY
statetextY
postal_codetextY
country_codetextY
telephonetextY
telephone_extensiontextY
faxtextY
created_attimestamptzN

npi.provider​

ColumnTypeNullNotes
provider_iduuidNPK
npivarchar(10)N
entity_type_codesmallintY
first_namevarchar(100)Y
last_namevarchar(100)Y
middle_namevarchar(100)Y
name_prefixvarchar(10)Y
name_suffixvarchar(10)Y
credentialvarchar(50)Y
gendervarchar(1)Y
organization_namevarchar(300)Y
organization_subpartbooleanY
parent_organization_lbnvarchar(300)Y
parent_organization_tinvarchar(15)Y
authorized_officialjsonbY
enumeration_datedateY
last_update_datedateY
deactivation_datedateY
reactivation_datedateY
certification_datedateY
is_activebooleanN
is_sole_proprietorbooleanY
created_attimestamptzN
updated_attimestamptzN
replacement_npivarchar(10)Y
einvarchar(9)Y
other_organization_nametextY
other_organization_name_type_codetextY
other_last_nametextY
other_first_nametextY
other_middle_nametextY
other_name_prefixtextY
other_name_suffixtextY
other_credentialtextY
other_last_name_type_codetextY
deactivation_reason_codevarchar(2)Y
gender_codevarchar(1)Y
search_vectortsvectorY

npi.taxonomy​

ColumnTypeNullNotes
taxonomy_iduuidNPK
provider_iduuidNFK
taxonomy_codevarchar(15)N
license_numbervarchar(50)Y
license_statevarchar(2)Y
is_primarybooleanN
sequence_nointegerN
created_attimestamptzN

npi.taxonomy_code​

ColumnTypeNullNotes
codevarchar(10)NPK
groupingvarchar(100)Y
classificationvarchar(100)Y
specializationvarchar(100)Y
definitiontextY
display_namevarchar(200)Y
sectionvarchar(50)Y
search_vectortsvectorY

npi.taxonomy_group​

ColumnTypeNullNotes
taxonomy_group_iduuidNPK
provider_iduuidNFK
sequence_nointegerN
taxonomy_group_codetextY
created_attimestamptzN