export_patient_non_insurance_payer_history
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
Unique ID for this (patient version, non-insurance payer) record
Unique ID associated with the patient in the Candid system
Unique ID of the non-insurance payer
Timestamps
Time at which this record was last updated in the database
Time at which this patient version was recorded
Timestamp from which this record was the current state
Timestamp until which this record was the current state (open-ended for the latest record)
Organization
User’s unique organization ID in the Candid system
User’s Organization / Company Name
Organization’s External ID - the ID that the organization uses to map to their own upstream system
Patient Version
Version number of the patient record this row reflects
ID of the user who made this patient version update
Whether the patient record was deactivated as of this version
Non-Insurance Payer
Name of the non-insurance payer
Category of the non-insurance payer
X12 payer ID of the non-insurance payer
Patient’s member ID with this non-insurance payer
Start date of this non-insurance payer coverage period, if known
End date of this non-insurance payer coverage period, if known
Clinical Trials
Whether this non-insurance payer association is linked to a clinical trial
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
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)