Skip to navigation

export_patient_non_insurance_payer_history

A comprehensive ledger of patient non-insurance payer coverage and clinical-trial history — one row per (patient version, non-insurance payer association) pair, unlike the single current-state snapshot on export_patient.

Use valid_from and valid_to for as-of queries, and is_latest_record_for_patient = TRUE for each patient’s current associations. When a newer patient version arrives, the previous rows’ is_latest_record_for_patient changes to FALSE and their updated_at advances, so incremental pulls by updated_at pick up the change.

This includes a version that removes every non-insurance payer: the patient then has no current rows. On current rows, valid_to is the time of the latest refresh.

Primary Key: patient_non_insurance_payer_history_pk

Identifiers

patient_non_insurance_payer_history_pk
STRINGRequired

Unique ID for this (patient version, non-insurance payer) record

patient_id
STRING

Unique ID associated with the patient in the Candid system

non_insurance_payer_id
STRING

Unique ID of the non-insurance payer

Timestamps

updated_at
TIMESTAMP

Time at which this record was last updated in the database

patient_version_updated_at
TIMESTAMP

Time at which this patient version was recorded

valid_from
TIMESTAMP

Timestamp from which this record was the current state

valid_to
TIMESTAMP

Timestamp until which this record was the current state (open-ended for the latest record)

Organization

organization_id
STRING

User’s unique organization ID in the Candid system

organization_name
STRING

User’s Organization / Company Name

external_organization_id
STRING

Organization’s External ID - the ID that the organization uses to map to their own upstream system

Patient Version

patient_version
INTEGER

Version number of the patient record this row reflects

patient_version_updating_user_id
STRING

ID of the user who made this patient version update

is_patient_deactivated
BOOLEAN

Whether the patient record was deactivated as of this version

Non-Insurance Payer

non_insurance_payer_name
STRING

Name of the non-insurance payer

non_insurance_payer_category
STRING

Category of the non-insurance payer

non_insurance_payer_payer_id
STRING

X12 payer ID of the non-insurance payer

member_id
STRING

Patient’s member ID with this non-insurance payer

start_date
STRING

Start date of this non-insurance payer coverage period, if known

end_date
STRING

End date of this non-insurance payer coverage period, if known

Clinical Trials

is_associated_with_clinical_trial
BOOLEAN

Whether this non-insurance payer association is linked to a clinical trial

clinical_trials
ARRAY<STRUCT<clinical_trial_id STRING, clinical_trial_arm STRING, clinical_trial_start_date STRING, clinical_trial_end_date STRING, clinical_trial_name STRING, clinical_trial_number STRING>>

Array of clinical trial details associated with this non-insurance payer association (clinical_trial_id, clinical_trial_arm, clinical_trial_start_date, clinical_trial_end_date, clinical_trial_name, clinical_trial_number). Join on non_insurance_payer_id and clinical_trial_id to export_non_insurance_payer.clinical_trials.

Other

is_latest_record_for_patient
BOOLEAN

Whether this is the patient’s current non-insurance payer association for this payer (multiple TRUE rows per patient are possible, one per current payer)