{"format":"hero-ehi-export","format_version":"1.0","conventions":["Each export is one .zip file containing README.txt, manifest.json, attachments.ndjson, context/ (practice, providers, locations; the whole-practice export adds staff names), data/<table>.ndjson and attachments/.","data/<table>.ndjson holds one JSON object per line, one line per database row. Every object carries _patient_id: the patient the row belongs to.","reference/<table>.ndjson holds the practice's own rows that the patient's rows point to (questionnaire definitions, form and agreement texts, visit types, outside providers, pharmacies, ...), limited to the rows actually referenced.","Identifiers are UUID strings. Columns ending in _id refer to the id of the table they are named after (for example encounter_id -> encounters.id), or to context/ for staff, providers and the practice.","Instants (date-times) are ISO 8601 in UTC with an explicit offset. Dates are YYYY-MM-DD calendar dates of the practice. Money and other exact decimals are strings. JSON columns are JSON.","Codes are stored as recorded: ICD-10-CM, SNOMED CT, LOINC, RxNorm, CPT/HCPCS, CVX, NDC and UCUM values appear in the columns named for them.","manifest.json lists every data file with its row count and SHA-256 checksum; attachments.ndjson lists every stored file with its status (included, missing, archived_retrieval_requested, unreadable) and checksum.","Rows marked is_deleted or with an 'entered in error' status are included as stored; filter them when presenting the current record.","The single-patient export leaves out psychotherapy notes and rows filed on them (45 CFR 171.102). The whole-practice export includes them.","Sign-in secrets, one-time codes, and similar values are never exported; the tables and columns left out are listed below with the reason."],"encodings":{"json":"Plain JSON value (see conventions).","zlib_text":"Stored compressed; exported as plain text.","zlib_json":"Stored compressed; exported as JSON (rich-text document).","base64":"Binary value as {\"base64\": \"...\"}.","file":"Stored inline; exported as a file in attachments/ and given here as {\"path\": \"...\"}.","attachment":"Stored file; copied into attachments/ and given here as {\"path\": \"...\"}.","sensitive_identifier":"Social Security number, exported as nine digits."},"tables":[{"table":"account_receivables","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/account_receivables.ndjson","linked_to_patient_by":["account_receivables.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"original_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"current_balance","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"patient_current_balance","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"due_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"aging_bucket","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"last_payment_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(19)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"aco_attribution_members","kind":"patient","category":"Care programs","description":"","file":"data/aco_attribution_members.ndjson","linked_to_patient_by":["aco_attribution_members.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"roster_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"mbi","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"sex","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"attributed_npi","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"attributed_tin","type":"VARCHAR(9)","nullable":true,"encoding":"json","description":""},{"name":"member_id","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"original_entitlement_code","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"dual_status_code","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"raw","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"match_status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"match_method","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"candidate_patient_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"matched_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"matched_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"review_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"apcm_billing_events","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/apcm_billing_events.ndjson","linked_to_patient_by":["apcm_billing_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_month","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"billing_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"billing_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"addon_lines","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"chronic_condition_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"qualifying_conditions","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"is_qmb","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"skip_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"generated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"generated_by","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"apcm_care_plans","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/apcm_care_plans.ndjson","linked_to_patient_by":["apcm_care_plans.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"goals","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"interventions","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"medications_reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"conditions","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"apcm_enrollments","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/apcm_enrollments.ndjson","linked_to_patient_by":["apcm_enrollments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrolled_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"care_manager_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_provider_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"consent_obtained_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"consent_method","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"consent_documented_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"consent_signature_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"consent_signature_blob","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"consent_text_version","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"consent_captured_from","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"consent_pdf_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"consent_pdf_generated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cost_share_informed","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"enrollment_source","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(15)","nullable":false,"encoding":"json","description":""},{"name":"status_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"paused_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"terminated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"consent_pending","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"current_tier","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"tier_determined_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"chronic_condition_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"is_qmb","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"initiating_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"initiating_visit_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"last_billed_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"next_billing_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"first_billable_month","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"auto_trigger_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"auto_triggered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"appeal_case_documents","kind":"patient","category":"Billing, claims and payments","description":"A file attached to a case: an uploaded EOB/payer letter (Media) or a generated packet (S3).","file":"data/appeal_case_documents.ndjson","linked_to_patient_by":["appeal_case_documents.case_id -> appeal_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"label","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"page_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"inputs_sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"evidence_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"members","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"contract_rates_shown","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"actor_kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key"]},{"table":"appeal_cases","kind":"patient","category":"Billing, claims and payments","description":"One appeal effort for a denied/underpaid claim (Hero claim or outside claim).","file":"data/appeal_cases.ndjson","linked_to_patient_by":["appeal_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_issue_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"outside_payer_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"outside_payer_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"outside_claim_number","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"outside_service_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"outside_denial_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"outside_billed_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"outside_paid_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"outside_denial_codes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"outside_lines","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"outside_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"hero_packet","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"payer_directory_key","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"reference_code","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"path","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"level","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"letter","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"evidence_selection","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"deadline","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"follow_up_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"level_deadline","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"outcome_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"closed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_actor_kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"appeal_responses","kind":"patient","category":"Billing, claims and payments","description":"What the insurance company sent back (decision, acknowledgment, records request).","file":"data/appeal_responses.ndjson","linked_to_patient_by":["appeal_responses.case_id -> appeal_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"level","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"received_on","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"respond_by","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"amount_approved","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"payer_reference","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"document_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"remittance_ref","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"extracted","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"match_method","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"match_score","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"review_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"actor_kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"appeal_sends","kind":"patient","category":"Billing, claims and payments","description":"One transmission of a packet by Hero (fax, mail) or a guided portal submission.","file":"data/appeal_sends.ndjson","linked_to_patient_by":["appeal_sends.case_id -> appeal_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"level","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"packet_document_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"recipient","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"recipient_source","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"provider","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"provider_ref","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"mail_service","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"double_sided","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"page_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"sheet_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"tracking_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"expected_delivery_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"events","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"cost_usd","type":"NUMERIC(12, 4)","nullable":true,"encoding":"json","description":""},{"name":"charge_usd","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"markup","type":"NUMERIC(8, 4)","nullable":true,"encoding":"json","description":""},{"name":"usage_recorded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"submission_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"proof_document_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"actor_kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"delivered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_polled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"appeal_submissions","kind":"patient","category":"Billing, claims and payments","description":"What the person sent to the insurance company, and when (Hero never transmits it).","file":"data/appeal_submissions.ndjson","linked_to_patient_by":["appeal_submissions.case_id -> appeal_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"level","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"method","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"submitted_on","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"payer_reference","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"packet_document_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_action_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"actor_kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"appointment_series","kind":"patient","category":"Appointments and scheduling","description":"One patient's course of recurring care with one provider.","file":"data/appointment_series.ndjson","linked_to_patient_by":["appointment_series.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"visit_type","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"duration_minutes","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"template_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"label","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"recurrence","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"start_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"planned_session_count","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"sessions_completed_before_series","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"paused_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"pause_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"resume_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"auto_completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status_changed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"max_gap_days","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"reminder_mode","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"coordinator_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"external_source","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"external_ref","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"appointment_waitlist_entries","kind":"patient","category":"Appointments and scheduling","description":"A patient's standing request for an earlier appointment slot.","file":"data/appointment_waitlist_entries.ndjson","linked_to_patient_by":["appointment_waitlist_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"visit_type_name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requested_duration_minutes","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"anchor_scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"preferred_start_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"preferred_end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"preferred_weekdays","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"preferred_time_windows","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"joined_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"last_offered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"offer_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_hero_coverage_searches","kind":"patient","category":"Billing, claims and payments","description":"One paid Stedi lookup for a patient's coverage: Insurance Discovery or the Medicare number (MBI) lookup.","file":"data/billing_hero_coverage_searches.ndjson","linked_to_patient_by":["billing_hero_coverage_searches.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"case_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"proposal_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"automatic","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"discovery_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"cob_log_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trading_partner","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"result_summary","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"stedi_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"coverages_found","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"candidates","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"errors","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_poll_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"lease_owner","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"lease_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"price_usd","type":"NUMERIC(8, 2)","nullable":false,"encoding":"json","description":""},{"name":"requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_hero_patient_first_cases","kind":"patient","category":"Billing, claims and payments","description":"One \"ask the patient first\" case: Billing Hero asked the patient itself, and when it escalates.","file":"data/billing_hero_patient_first_cases.ndjson","linked_to_patient_by":["billing_hero_patient_first_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"episode_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trigger","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"problem","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"card_on_file","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"mbi_lookup_eligible","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"channels","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"notify_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"asked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"escalate_after","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"next_appointment_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"escalated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"escalation_reason","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"escalation_detail","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"rung","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"proposal_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"escalation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"handoff","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"answered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"answered_by","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"rerun_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"closed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"close_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_hero_payer_calls","kind":"patient","category":"Billing, claims and payments","description":"One Hero call to a payer's provider line that Billing Hero asked for, and what the payer said.","file":"data/billing_hero_payer_calls.ndjson","linked_to_patient_by":["billing_hero_payer_calls.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"subject_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"proposal_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"question","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"automatic","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"call_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"payer_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"payer_phone_e164","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"payer_phone_source","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"attempt_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"called_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"phone_call_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"answer","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"stop_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"call_reference_number","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"payer_rep_name","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"failure_reason","type":"VARCHAR(300)","nullable":true,"encoding":"json","description":""},{"name":"follow_up_run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"escalation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_hero_provider_questions","kind":"patient","category":"Billing, claims and payments","description":"A structured yes/no question Billing Hero asked a claim's rendering provider (``contact_provider``).","file":"data/billing_hero_provider_questions.ndjson","linked_to_patient_by":["billing_hero_provider_questions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"proposal_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"escalation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"todo_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"provider_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"line_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"detail","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"answer","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"answered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"answered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"follow_up_run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_service_task_follow_ups","kind":"patient","category":"Billing, claims and payments","description":"One thing a Billing Queue item is waiting on (\"What we're waiting on\").","file":"data/billing_service_task_follow_ups.ndjson","linked_to_patient_by":["billing_service_task_follow_ups.task_id -> billing_service_tasks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"task_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"ref_type","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"ref_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"proposal_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"expected_by","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"outcome_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"outcome","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"next_check_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"dismiss_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"settled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"settled_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_service_task_forward_links","kind":"patient","category":"Billing, claims and payments","description":"A to-do or staff notification a forward created: finds the forward from a completed to-do.","file":"data/billing_service_task_forward_links.ndjson","linked_to_patient_by":["billing_service_task_forward_links.forward_id -> billing_service_task_forwards.task_id -> billing_service_tasks.patient_id -> patients.id"],"columns":[{"name":"forward_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"link_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"link_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_service_task_forwards","kind":"patient","category":"Billing, claims and payments","description":"An item's work sent to someone at the practice (\"Ask someone to help\").","file":"data/billing_service_task_forwards.ndjson","linked_to_patient_by":["billing_service_task_forwards.task_id -> billing_service_tasks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"task_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"recipient_type","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"recipient_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"recipient_pool_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"recipient_label","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"message","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"due_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"wait","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"expected_answer","type":"VARCHAR(300)","nullable":true,"encoding":"json","description":""},{"name":"response","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"response_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"responded_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"taken_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"error","type":"VARCHAR(300)","nullable":true,"encoding":"json","description":""},{"name":"preset_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"todo_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"chat_conversation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"chat_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notification_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_reply_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_service_task_reads","kind":"patient","category":"Billing, claims and payments","description":"When a person last opened an item; newer activity shows the list's unread dot.","file":"data/billing_service_task_reads.ndjson","linked_to_patient_by":["billing_service_task_reads.task_id -> billing_service_tasks.patient_id -> patients.id"],"columns":[{"name":"task_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"seen_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_visit_notes","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/billing_visit_notes.ndjson","linked_to_patient_by":["billing_visit_notes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"work_item_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"body_slate","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"deleted_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"booking_check_decisions","kind":"patient","category":"Appointments and scheduling","description":"","file":"data/booking_check_decisions.ndjson","linked_to_patient_by":["booking_check_decisions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trigger","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"applied","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"not_applied_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"hold_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"released_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"decision","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"facts","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"engine_version","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_episodes","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/care_episodes.ndjson","linked_to_patient_by":["care_episodes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"initiated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"message_thread_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"phone_call_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rendering_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"rendering_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"role_lane","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"window_end","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"closed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"patient_initiated","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"clinical_purpose","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"diagnoses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"established_patient_basis","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"hold_reasons","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"total_seconds","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_gap_instance_history","kind":"patient","category":"Preventive care gaps","description":"Audit trail for care gap instance changes.","file":"data/care_gap_instance_history.ndjson","linked_to_patient_by":["care_gap_instance_history.instance_id -> care_gap_instances.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"instance_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(15)","nullable":false,"encoding":"json","description":""},{"name":"from_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"to_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"evidence","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_gap_instances","kind":"patient","category":"Preventive care gaps","description":"A specific care gap instance for a patient.","file":"data/care_gap_instances.ndjson","linked_to_patient_by":["care_gap_instances.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"definition_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"problem_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"priority","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"due_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"last_seen_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"evidence","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"source_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"deferred_until","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"deferred_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_management_plans","kind":"patient","category":"Care programs","description":"The patient's comprehensive care plan, shared across care programs.","file":"data/care_management_plans.ndjson","linked_to_patient_by":["care_management_plans.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"content","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"shared_with_patient_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_plan_outcomes","kind":"patient","category":"Other patient records","description":"A health status evaluation / outcome recorded for the patient's care plan ((b)(9) Health Status Evaluations and Outcomes): recorded, changed and read back where a care plan file is made.","file":"data/care_plan_outcomes.ndjson","linked_to_patient_by":["care_plan_outcomes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"outcome_text","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"observed_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"sort_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_plan_snapshots","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/care_plan_snapshots.ndjson","linked_to_patient_by":["care_plan_snapshots.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"plan_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"service_month","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"revision","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"content","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"portal_content","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"diff","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"approved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"approved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"pdf_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"delivered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"delivery_channel","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"patient_viewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["content_hash"],"attachment_columns":[]},{"table":"care_program_billing_decisions","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/care_program_billing_decisions.ndjson","linked_to_patient_by":["care_program_billing_decisions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"period_start","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"period_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"episode_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"decision_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"choice","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"decided_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"decided_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["evidence_hash"],"attachment_columns":[]},{"table":"care_program_claim_items","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/care_program_claim_items.ndjson","linked_to_patient_by":["care_program_claim_items.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"period_start","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"period_end","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"episode_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"policy","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"code_lines","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"diagnoses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"billing_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rendering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"date_of_service","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"scheduled_submit_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"evidence","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"catalog_version","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"code_family","type":"VARCHAR(60)","nullable":false,"encoding":"json","description":""},{"name":"anchor_key","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"reopened_from_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"charge_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"hold_reasons","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"approved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"approved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"late_time","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["evidence_hash"],"attachment_columns":[]},{"table":"care_program_enrollments","kind":"patient","category":"Care programs","description":"A patient's participation in one care-management program.","file":"data/care_program_enrollments.ndjson","linked_to_patient_by":["care_program_enrollments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"consent_method","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"consent_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"consent_documented_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cost_share_informed","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"responsible_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"care_manager_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"qualifying_conditions","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"enrollment_source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"consent_evidence","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"consent_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"pcm_high_risk_attestation","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"started_on","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"ended_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"end_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"provenance","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"initiating_visit","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_program_import_rows","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/care_program_import_rows.ndjson","linked_to_patient_by":["care_program_import_rows.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"batch_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sheet","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"row_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"source_ref","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"matched_by","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"target_table","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"target_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"warnings","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"detail","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["source_row_hash"],"attachment_columns":[]},{"table":"care_program_imported_claims","kind":"patient","category":"Care programs and remote monitoring","description":"A care-program claim the previous system billed (plan §10.8).","file":"data/care_program_imported_claims.ndjson","linked_to_patient_by":["care_program_imported_claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"service_month","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"source_ref","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"import_batch_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["source_row_hash"],"attachment_columns":[]},{"table":"care_program_initiating_visit_attestations","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/care_program_initiating_visit_attestations.ndjson","linked_to_patient_by":["care_program_initiating_visit_attestations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"visit_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"visit_description","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_provider_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"attested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"attested_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"revoked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revoked_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"revoke_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_program_month_reviews","kind":"patient","category":"Care programs","description":"Month-end review decision for one patient, program and service month.","file":"data/care_program_month_reviews.ndjson","linked_to_patient_by":["care_program_month_reviews.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"service_month","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_time_entries","kind":"patient","category":"Care programs","description":"Time actually spent on a care-management program (the billing evidence).","file":"data/care_time_entries.ndjson","linked_to_patient_by":["care_time_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"actor_role","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"duration_seconds","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"service_month","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"activities","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"interactive","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"contact_type","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"spoke_with","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"patient_initiated","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"episode_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rpm_enrollment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"inferred_activities","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"source_ref","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"claim_item_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rpm_billing_event_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"hold_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"void_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"voided_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"employment_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"provenance","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"scale_results","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"cervical_screening_events","kind":"patient","category":"Gynecologic screening","description":"One discrete cervical screening / workup / treatment event.","file":"data/cervical_screening_events.ndjson","linked_to_patient_by":["cervical_screening_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"cytology_result","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"hpv_result","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"histology_result","type":"VARCHAR(6)","nullable":true,"encoding":"json","description":""},{"name":"ecc_result","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"invasion_suspected","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"margin_status","type":"VARCHAR(13)","nullable":true,"encoding":"json","description":""},{"name":"colposcopy_adequacy","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"scj_visibility","type":"VARCHAR(17)","nullable":true,"encoding":"json","description":""},{"name":"endometrial_sampling_done","type":"VARCHAR(13)","nullable":true,"encoding":"json","description":""},{"name":"management_decision","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"referral_screen_event_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"satisfies_surveillance_event_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cervix_removed","type":"VARCHAR(7)","nullable":true,"encoding":"json","description":""},{"name":"hysterectomy_indication","type":"VARCHAR(18)","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"cytology_lab_result_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"hpv_lab_result_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"entered_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"cervical_screening_recommendations","kind":"patient","category":"Gynecologic screening","description":"Insert-only ASCCP engine output; only ``is_current`` and overrides mutate.","file":"data/cervical_screening_recommendations.ndjson","linked_to_patient_by":["cervical_screening_recommendations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"action","type":"VARCHAR(27)","nullable":false,"encoding":"json","description":""},{"name":"due_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"rationale_rule_id","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"rationale_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"engine_version","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"evaluated_as_of","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"temporal_state_epoch","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"input_fingerprint","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"input_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"next_evaluation_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"computed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"computed_from_event_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"is_current","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"superseded_recommendation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"override_action","type":"VARCHAR(27)","nullable":true,"encoding":"json","description":""},{"name":"override_due_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"override_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"overridden_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"overridden_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"override_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"charges","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/charges.ndjson","linked_to_patient_by":["charges.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"charge_type","type":"VARCHAR(15)","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"due_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"due_at_utc","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"billing_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"source_billing_code","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_order_explicit","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"code_type","type":"VARCHAR(6)","nullable":true,"encoding":"json","description":""},{"name":"modifier_1","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"modifier_2","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"modifier_3","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"modifier_4","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"units","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"capture_line_uid","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"capture_position","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"suppressed_rule_modifiers","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"pricing_contract_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"split_from_charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"deposit_scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"split_intent_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"duplicate_hold","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"ndc_code","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"ndc_quantity","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"ndc_unit","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"ndc_source","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"pricing_source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"pricing_trigger","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"sales_tax_rate_percent","type":"NUMERIC(7, 4)","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"legal_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["hold_state_hash"],"attachment_columns":[]},{"table":"chart_history_ai_runs","kind":"patient","category":"Other patient records","description":"One Chart History Hero run per signed encounter version (idempotency key).","file":"data/chart_history_ai_runs.ndjson","linked_to_patient_by":["chart_history_ai_runs.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"skip_reason","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"model_key","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"action_counts","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"dropped_counts","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"error_class","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"chart_share_items","kind":"patient","category":"Records shared with others","description":"","file":"data/chart_share_items.ndjson","linked_to_patient_by":["chart_share_items.share_id -> chart_shares.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"share_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"label","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"detail","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"item_date","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"sort_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"byte_size","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"page_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"content_sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"rendered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"chart_shares","kind":"patient","category":"Records shared with others","description":"","file":"data/chart_shares.ndjson","linked_to_patient_by":["chart_shares.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recipient_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"recipient_email","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"recipient_organization","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"recipient_relationship","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"purpose","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"purpose_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"selection","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"origin","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"revoked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revoked_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"disclaimer_acknowledged_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"failed_attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"locked_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"first_unlocked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_accessed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"unlock_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"download_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"link_email_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"link_email_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"code_email_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"code_email_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"bundle_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"bundle_s3_key","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"bundle_byte_size","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"render_started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"render_completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"render_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"files_purged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["password_delivery","password_hash","password_version","token"],"attachment_columns":[]},{"table":"chat_conversations","kind":"patient","category":"Messages","description":"A staff-to-staff chat conversation, org-scoped.","file":"data/chat_conversations.ndjson","linked_to_patient_by":["chat_conversations.topic_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"type","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"title","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"topic_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direct_key","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"change_seq","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"last_message_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"is_archived","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"chat_message_attachments","kind":"patient","category":"Messages","description":"One file shared in a Care Team Chat conversation (staged until sent).","file":"data/chat_message_attachments.ndjson","linked_to_patient_by":["chat_message_attachments.filed_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"conversation_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"uploader_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"file_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"content_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"position","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"staged_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retention_class","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"filed_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"filed_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"filed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"filed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"chat_messages","kind":"patient","category":"Messages","description":"A single append-only chat message.","file":"data/chat_messages.ndjson","linked_to_patient_by":["chat_messages.conversation_id -> chat_conversations.topic_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"conversation_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sender_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"seq","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"client_msg_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"body","type":"BYTEA","nullable":false,"encoding":"zlib_text","description":""},{"name":"body_type","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"body_slate","type":"BYTEA","nullable":true,"encoding":"zlib_json","description":""},{"name":"reply_to_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"also_sent_to_conversation","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"notify_user_ids","type":"ARRAY","nullable":true,"encoding":"json","description":""},{"name":"mentions","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"mentioned_user_ids","type":"ARRAY","nullable":true,"encoding":"json","description":""},{"name":"is_urgent","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"retention_class","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"archive_pending_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"archive_batch_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"retention_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_actions","kind":"patient","category":"Billing, claims and payments","description":"Available actions for claims (appeals, resubmissions, etc.)","file":"data/claim_actions.ndjson","linked_to_patient_by":["claim_actions.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"action_type","type":"VARCHAR(15)","nullable":false,"encoding":"json","description":""},{"name":"ticket_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"ticket_type","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"ticket_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"action_deadline","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"required_documentation","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"action_description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_available","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_completed","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"completed_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completion_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_adjustments","kind":"patient","category":"Billing, claims and payments","description":"Financial adjustments to claims","file":"data/claim_adjustments.ndjson","linked_to_patient_by":["claim_adjustments.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_line_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"adjustment_type","type":"VARCHAR(21)","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"reason_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"group_code","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"reason_description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_crossover_waits","kind":"patient","category":"Billing, claims and payments","description":"One primary claim whose secondary payer gets the claim by crossover, and whether its payment arrived.","file":"data/claim_crossover_waits.ndjson","linked_to_patient_by":["claim_crossover_waits.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"primary_claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payer_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"forwarding_payer_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"carrier_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"carrier_identifier","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"claim_status_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"remark_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"match_basis","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"known_remittance_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"expected_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"follow_up_on","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"follow_up_alerted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"verification_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"verification_transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"verification_result","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"verification_payer_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_filing_fee_ledger","kind":"patient","category":"Billing, claims and payments","description":"Auditable internal accrual ledger for platform claim filing fees.","file":"data/claim_filing_fee_ledger.ndjson","linked_to_patient_by":["claim_filing_fee_ledger.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"submission_attempt_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"eob_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"era_ingestion_run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"basis_amount","type":"NUMERIC(12, 2)","nullable":false,"encoding":"json","description":""},{"name":"fee_bps","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"fee_amount","type":"NUMERIC(12, 2)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"reversal_of_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_period","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"invoice_reference","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"audit_summary","type":"JSON","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_issues","kind":"patient","category":"Billing, claims and payments","description":"Claim-level denials, pends, and other issues","file":"data/claim_issues.ndjson","linked_to_patient_by":["claim_issues.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"issue_type","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"issue_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"issue_description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"financial_impact","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"is_appealable","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"appeal_deadline","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_resolved","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"resolution_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolution_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_line_issues","kind":"patient","category":"Billing, claims and payments","description":"Line-level denials, pends, and other issues","file":"data/claim_line_issues.ndjson","linked_to_patient_by":["claim_line_issues.claim_line_id -> claim_lines.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_line_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"issue_type","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"issue_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"issue_description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"financial_impact","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"is_appealable","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"appeal_deadline","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_resolved","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"resolution_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolution_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_lines","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/claim_lines.ndjson","linked_to_patient_by":["claim_lines.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"cpt_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"line_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"quantity","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"unit_price","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"total_billed_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"modifiers","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_pointers","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_pointers_explicit","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"source_charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"ndc_code","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"ndc_quantity","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"ndc_unit","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"revenue_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"allowed_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"paid_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"patient_responsibility","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"provider_write_off_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"not_covered_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"copay","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"deductible","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"coinsurance","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"processed_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"first_service_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"last_service_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"network_status","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_remittance_remarks","kind":"patient","category":"Billing, claims and payments","description":"Non-financial RARC evidence at claim or service-line scope.","file":"data/claim_remittance_remarks.ndjson","linked_to_patient_by":["claim_remittance_remarks.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_line_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claim_status_history","kind":"patient","category":"Billing, claims and payments","description":"Immutable claim internal-status transition history.","file":"data/claim_status_history.ndjson","linked_to_patient_by":["claim_status_history.claim_id -> claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"from_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"to_status","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"changed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"changed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"change_context","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"sequence_no","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"evidence","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"writer","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"claims","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/claims.ndjson","linked_to_patient_by":["claims.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_sequence","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"previous_claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_number","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"payer_claim_number","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"payer_transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"patient_account_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"oa_claim_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"clearinghouse_claim_number","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"frequency_code","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"original_reference_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"refile_basis","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"refile_member_fingerprint","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"filed_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"allowed_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"paid_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"patient_responsibility","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"provider_write_off_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"internal_status","type":"VARCHAR(26)","nullable":false,"encoding":"json","description":""},{"name":"payer_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"payer_status_description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"submission_channel","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"submission_attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_submission_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"submission_hold_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"submission_hold_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"submission_held_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"submission_held_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"submission_hold_follow_up_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"submission_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"payer_processed_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_payer_update","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_status_poll","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"next_poll_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"next_action_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSON","nullable":false,"encoding":"json","description":""},{"name":"place_of_service","type":"VARCHAR(2)","nullable":false,"encoding":"json","description":""},{"name":"insurance_contract_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rendering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"legal_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"transmitted_billing_identity","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"payer_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"payer_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"prior_system_source","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"history_seq","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"collections_accounts","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/collections_accounts.ndjson","linked_to_patient_by":["collections_accounts.account_receivable_id -> account_receivables.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"account_receivable_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"agency_name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"agency_account_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"placement_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"original_balance","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"current_balance","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"commission_rate","type":"NUMERIC(5, 2)","nullable":true,"encoding":"json","description":""},{"name":"last_activity_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"communication_logs","kind":"patient","category":"Communications sent to the patient","description":"Log of all communications sent to patients.","file":"data/communication_logs.ndjson","linked_to_patient_by":["communication_logs.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reference_type","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"reference_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"message_type","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"template_key","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"subject","type":"VARCHAR(320)","nullable":true,"encoding":"json","description":""},{"name":"body_preview","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"delivered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"provider","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"from_number_e164","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"to_number_e164","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"to_email","type":"VARCHAR(320)","nullable":true,"encoding":"json","description":""},{"name":"recipient_relation","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"external_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"segments","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"is_manual","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"initiated_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"outbox_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"responded","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"response_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"response_action","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"confirmation_requested","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"response_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"response_channel","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"retry_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"delegated_order_alerts","kind":"patient","category":"Other patient records","description":"One alert (to-do) for one recipient about one send; never repeated.","file":"data/delegated_order_alerts.ndjson","linked_to_patient_by":["delegated_order_alerts.send_id -> delegated_order_sends.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"send_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recipient_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"todo_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"delegated_order_sends","kind":"patient","category":"Other patient records","description":"One order a staff member transmitted on a physician's order.","file":"data/delegated_order_sends.ndjson","linked_to_patient_by":["delegated_order_sends.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"order_kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"order_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"batch_key","type":"VARCHAR(160)","nullable":false,"encoding":"json","description":""},{"name":"client_request_key","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"sent_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"authorization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sender_role","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"sender_license","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"order_given_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"read_back_attested","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"protocol_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"protocol_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"criteria_confirmations","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"order_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"order_fingerprint","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_line","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"cosign_due_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"cosigned_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cosigned_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cosigned_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rejected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"rejected_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rejected_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reject_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"dispatch_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"dispatch_attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_dispatch_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"dispatched_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"dispatch_error","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"dispatch_reference","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"cancel_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"cancel_detail","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"cancel_task_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cancel_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancel_updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"overdue_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"denial_self_pay_applications","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/denial_self_pay_applications.ndjson","linked_to_patient_by":["denial_self_pay_applications.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_line_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_owner_claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"rule_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_code","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"modifier","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"patient_price","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"units","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"denied_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"patient_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"write_off_requested","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"write_off_applied","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status_reason","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"eob_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_billing_action_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"reversal_action_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"reversed_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reversed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reversed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"device_inbox_items","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/device_inbox_items.ndjson","linked_to_patient_by":["device_inbox_items.filed_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"match_basis","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"suggested_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"suggested_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_upload_key","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"staged_s3_key","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"content_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"file_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"sha256","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"sop_instance_uid","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"study_instance_uid","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"study_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"study_datetime_utc","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"parsed_metadata","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"gdt","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"source_workstation_label","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"filed_media_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"filed_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"filed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"filed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"dismissed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"dismissed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"dismissal_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"staging_deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"retired_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retired_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"dicom_instances","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/dicom_instances.ndjson","linked_to_patient_by":["dicom_instances.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"media_group_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_upload_key","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"study_instance_uid","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"series_instance_uid","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"sop_instance_uid","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"sop_class_uid","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"modality","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"series_number","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"series_description","type":"VARCHAR(1024)","nullable":true,"encoding":"json","description":""},{"name":"instance_number","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"number_of_frames","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"transfer_syntax_uid","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"study_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"study_datetime_utc","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"study_description","type":"VARCHAR(1024)","nullable":true,"encoding":"json","description":""},{"name":"accession_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"body_part_examined","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"laterality","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"view_position","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"sha256","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"demographics","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"retired_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retired_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"dicom_study_reads","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"The provider's read of one filed study: report, codes, filing and billing.","file":"data/dicom_study_reads.ndjson","linked_to_patient_by":["dicom_study_reads.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"media_group_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"worklist_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"document_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"modality","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"body_part","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"laterality","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"view_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"study_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"study_datetime_utc","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"study_description","type":"VARCHAR(1024)","nullable":true,"encoding":"json","description":""},{"name":"accession_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"read_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"billing_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"procedure_codes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"indication","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"technique","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"comparison","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"findings","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"impression","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"report_body","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"abnormal","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"reading_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"report_updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"report_updated_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"report_history","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"filed_to","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"radiology_image_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_procedure_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_mode","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"billed_line_uids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"not_billable_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"dicom_worklist_entries","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"One scheduled exam on the office's DICOM Modality Worklist.","file":"data/dicom_worklist_entries.ndjson","linked_to_patient_by":["dicom_worklist_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ordering_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"accession_number","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"study_instance_uid","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"procedure_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"procedure_description","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"body_part","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"laterality","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"modality","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"scheduled_start_utc","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"scheduled_station_ae","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"exported_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"acquired_media_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"acquired_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"direct_messages","kind":"patient","category":"Other patient records","description":"The transport record of one Direct message, sent or received.","file":"data/direct_messages.ndjson","linked_to_patient_by":["direct_messages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"VARCHAR(998)","nullable":false,"encoding":"json","description":""},{"name":"in_reply_to","type":"VARCHAR(998)","nullable":true,"encoding":"json","description":""},{"name":"from_address","type":"VARCHAR(320)","nullable":false,"encoding":"json","description":""},{"name":"to_addresses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"subject","type":"VARCHAR(998)","nullable":true,"encoding":"json","description":""},{"name":"body_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"transport","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status_detail","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"initiated_by","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"attachment_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"request_delivery_notification","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"remote_uid","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"processed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"delivered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"failed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"education_assignments","kind":"patient","category":"Other patient records","description":"","file":"data/education_assignments.ndjson","linked_to_patient_by":["education_assignments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assigned_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"material_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"attachment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"revoked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revoked_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"eligibility_check_logs","kind":"patient","category":"Billing, claims and payments","description":"Audit log for all eligibility verification attempts.","file":"data/eligibility_check_logs.ndjson","linked_to_patient_by":["eligibility_check_logs.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"trigger_type","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"trigger_reference_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"transaction_type","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"payer_key","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"member_id","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"subscriber_first_name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"subscriber_last_name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"subscriber_dob","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"group_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"payer_search_option_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"clearinghouse_source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"external_trace_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"external_control_number","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"external_payer_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"coverage_active","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"response_status","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"cost_cents","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"vendor_billable_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"request_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"response_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"identity_fingerprint","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"identity_fields","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"coverage_start_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"coverage_end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"legal_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"duration_ms","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"eligibility_failure_episodes","kind":"patient","category":"Billing, claims and payments","description":"One patient-level failure for (policy, submitted identity, org-local DOS).","file":"data/eligibility_failure_episodes.ndjson","linked_to_patient_by":["eligibility_failure_episodes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"identity_key","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"identity_fingerprint","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"identity_fields","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"clearinghouse_source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"failure_class","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"aaa_codes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"opened_by_log_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"latest_log_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"opened_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolution_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"resolved_by_log_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"resolved_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"resolution_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"patient_alerted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_alerted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billing_hero_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"encounter_billing_code_snapshots","kind":"patient","category":"Billing, claims and payments","description":"What the evaluator decided for one encounter, frozen at materialization.","file":"data/encounter_billing_code_snapshots.ndjson","linked_to_patient_by":["encounter_billing_code_snapshots.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"fingerprint","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"evaluator_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"rule_revision_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"legacy_rule_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"billing_context_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"effective_payer_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"place_of_service","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"superseded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"encounter_care_team_deliveries","kind":"patient","category":"Care team and outside providers","description":"Per-encounter choice: send the signed note to this outside provider.","file":"data/encounter_care_team_deliveries.ndjson","linked_to_patient_by":["encounter_care_team_deliveries.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"referring_provider_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"care_team_role","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"set_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"encounter_diagnoses","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"Links encounters with ICD10 diagnosis codes. Enables tracking of which diagnoses were addressed during specific encounters and distinguishes between primary and secondary diagnoses for billing purposes.","file":"data/encounter_diagnoses.ndjson","linked_to_patient_by":["encounter_diagnoses.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"icd10_code","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"is_primary","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"sequence_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"encounter_portal_restriction_states","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"Permanent concurrency row for one note and portal audience.","file":"data/encounter_portal_restriction_states.ndjson","linked_to_patient_by":["encounter_portal_restriction_states.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"audience","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"revision","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"current_restriction_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"encounter_portal_restrictions","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"One immutable restriction determination plus optional release metadata.","file":"data/encounter_portal_restrictions.ndjson","linked_to_patient_by":["encounter_portal_restrictions.state_id -> encounter_portal_restriction_states.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"state_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"reason_code","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"justification","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reason_details","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"policy_revision_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"review_notice","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"covered_note_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"restricted_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"restricted_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"released_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"release_basis","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"release_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"encounter_versions","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"Stores historical versions of encounters for audit trail.","file":"data/encounter_versions.ndjson","linked_to_patient_by":["encounter_versions.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"correction_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"archive_status","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"s3_archive_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"archived_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_job_id","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"retrieval_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_requested_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"retrieval_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_archive_key"]},{"table":"encounters","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/encounters.ndjson","linked_to_patient_by":["encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_type_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"active_editor_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"opened_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"lock_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"meta_chief_complaint","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"meta_visit_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"encounter_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"inperson_room_number","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"inperson_checkin_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"inperson_roomed_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"inperson_provider_start","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"inperson_checkout_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"phone_number","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"phone_attempts","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"phone_connected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"phone_callback_preference","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"virtual_platform","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"virtual_link","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"virtual_meeting_status","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"virtual_meeting_external_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"virtual_host_external_user_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"virtual_installation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"virtual_meeting_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"zoom_meeting_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"zoom_host_user_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"zoom_installation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"zoom_meeting_status","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"virtual_patient_joined_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"virtual_provider_joined_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"virtual_connection_issues","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"telehealth_patient_location","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"visit_delivery","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"home_arrival_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"home_departure_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"home_address_verified","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"message_thread_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"message_response_required","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"message_response_due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"encounter_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"editor_protocol_version","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"signing_fencing_epoch","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"draft_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"addendum_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"addendum_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"physician_handoff","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"cash_pay_claim_override","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"cash_pay_claim_override_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"billing_disposition","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"place_of_service","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"billing_context_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_context_contract_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_context_frozen_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billing_context_source","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"billing_context_plan_text","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"digital_signature","type":"VARCHAR(512)","nullable":true,"encoding":"json","description":""},{"name":"signature_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"referring_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"referring_provider_source","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"current_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_corrected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_corrected_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["charge_state_hash"],"attachment_columns":[]},{"table":"epcs_otp_code_attempts","kind":"patient","category":"Other patient records","description":"One try at approving a signing session with an authenticator code + password.","file":"data/epcs_otp_code_attempts.ndjson","linked_to_patient_by":["epcs_otp_code_attempts.session_id -> epcs_signing_sessions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"session_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"finished_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"epcs_otp_tokens","kind":"patient","category":"Other patient records","description":"An authenticator app or hardware OTP token a prescriber added for EPCS signing.","file":"data/epcs_otp_tokens.ndjson","linked_to_patient_by":["epcs_otp_tokens.binding_session_id -> epcs_signing_sessions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"label","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"serial_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"algorithm","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"digits","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"period_seconds","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"pending_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"confirm_attempt_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"code_verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"binding_session_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_used_step","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"activated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_used_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revoked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revoked_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"revoke_reason","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["secret_ciphertext","secret_fingerprint","secret_key_id","secret_source"],"attachment_columns":[]},{"table":"erx_transaction_messages","kind":"patient","category":"Other patient records","description":"","file":"data/erx_transaction_messages.ndjson","linked_to_patient_by":["erx_transaction_messages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"transaction","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"relates_to_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"subject_type","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"subject_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"transport_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"raw_xml","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"parsed","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"is_successful","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"sender_id","type":"VARCHAR(35)","nullable":false,"encoding":"json","description":""},{"name":"processing_state","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"applied_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"processing_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"explanation_of_benefits","kind":"patient","category":"Billing, claims and payments","description":"EOB documents received from payers","file":"data/explanation_of_benefits.ndjson","linked_to_patient_by":["explanation_of_benefits.claim_id -> claims.patient_id -> patients.id","explanation_of_benefits.insurance_policy_id -> insurance_policies.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"eob_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"eob_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"processed_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"remittance_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"transferable_patient_responsibility","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"raw_eob_data","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"external_lab_result_items","kind":"patient","category":"Laboratory orders and results","description":"","file":"data/external_lab_result_items.ndjson","linked_to_patient_by":["external_lab_result_items.matched_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"provider_id","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"external_accession","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"external_requisition_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"report_status","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"reported_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"patient_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"patient_dob","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"suggested_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"matched_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"matched_lab_order_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"fax_attachments","kind":"patient","category":"Faxes","description":"Fax attachment model for storing multiple files per fax","file":"data/fax_attachments.ndjson","linked_to_patient_by":["fax_attachments.fax_id -> faxes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"fax_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"file_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"s3_file_key","type":"VARCHAR(500)","nullable":false,"encoding":"attachment","description":""},{"name":"file_type","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"file_size_bytes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"display_order","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_file_key"]},{"table":"faxes","kind":"patient","category":"Faxes","description":"Fax model for tracking both inbound and outbound faxes","file":"data/faxes.ndjson","linked_to_patient_by":["faxes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"from_fax_number","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"to_fax_number","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"subject","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"pages","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"provider","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"provider_fax_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"provider_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"srfax_fax_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"srfax_file_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"srfax_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"srfax_response","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"s3_file_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"file_type","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"file_size_bytes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"ai_category","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"ai_category_confidence","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"ai_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"ai_requires_urgent","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"ai_urgency_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"ai_extracted_data","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"ai_triaged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ai_model_used","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"content_sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"duplicate_of_fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"triage_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"triage_category","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"triage_source","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"triage_pages_read","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"triage_text_excerpt","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"automation","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"patient_match_confidence","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"patient_match_method","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"patient_match_candidates_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"patient_match_attempted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"assigned_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assignment_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"routing_status","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"routed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reviewed_by_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"review_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"response_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"queued_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"received_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"viewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"failed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"retry_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"failure_reason","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"delivery_attempts","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"auto_resend_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"auto_resend_state","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"handled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"handled_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"handled_note","type":"VARCHAR(280)","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_file_key"]},{"table":"followup_requests","kind":"patient","category":"Appointments and scheduling","description":"Tracks follow-up appointment requests from encounter completion to scheduling.","file":"data/followup_requests.ndjson","linked_to_patient_by":["followup_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"followup_type","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"timing_value","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"timing_unit","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"instructions","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"earliest_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"latest_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"preferred_time","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"last_contact_channel","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"last_contact_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"contact_attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_contact_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_notification_due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_notification_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"processing_failure_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_processing_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"processing_failed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"responded","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"responded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"response_channel","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"declined_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"form_request_encounters","kind":"patient","category":"Forms and letters","description":"","file":"data/form_request_encounters.ndjson","linked_to_patient_by":["form_request_encounters.encounter_id -> encounters.patient_id -> patients.id","form_request_encounters.form_request_id -> form_requests.patient_id -> patients.id"],"columns":[{"name":"form_request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"form_request_events","kind":"patient","category":"Forms and letters","description":"","file":"data/form_request_events.ndjson","linked_to_patient_by":["form_request_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"form_request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"form_requests","kind":"patient","category":"Forms and letters","description":"","file":"data/form_requests.ndjson","linked_to_patient_by":["form_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"request_id","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"primary_encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_ids","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"request_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"template_used","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"initiated_by","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"letter_content","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"requested_via","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"decided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"approval_signature_mode","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"is_approved","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_read","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_flagged","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"has_currency_amount","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"additional_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"download_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"s3_key","type":"TEXT","nullable":true,"encoding":"attachment","description":""},{"name":"rejection_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"revised_form_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"revised_form_s3_key","type":"TEXT","nullable":true,"encoding":"attachment","description":""},{"name":"revised_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"encounter_info","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"all_encounters_info","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"portal_viewer_audience","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"source_encounter_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"withheld_from_portal","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"submitted_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"processing_started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"approved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"flagged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"rerun_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"rerun_download_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"rerun_s3_key","type":"TEXT","nullable":true,"encoding":"attachment","description":""},{"name":"rerun_submitted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"rerun_completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"rerun_error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"patient_signature_assignment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_signature_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"patient_signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"patient_signed_s3_key","type":"TEXT","nullable":true,"encoding":"attachment","description":""},{"name":"patient_signed_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key","revised_form_s3_key","rerun_s3_key","patient_signed_s3_key"]},{"table":"formulary_checks","kind":"patient","category":"Other patient records","description":"","file":"data/formulary_checks.ndjson","linked_to_patient_by":["formulary_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"coverage_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescriber_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cache_key","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"request_kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"parent_check_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ndcs","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"result","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"response_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"transport_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"fullscript_recommendations","kind":"patient","category":"Other patient records","description":"","file":"data/fullscript_recommendations.ndjson","linked_to_patient_by":["fullscript_recommendations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"treatment_plan_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"fullscript_variant_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"fullscript_product_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"fullscript_lab_recommendation_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"fullscript_lab_order_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"product_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"brand_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"variant_label","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"image_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"units_to_purchase","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"refill","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"take_with","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"dosage","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"sig","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"lab_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"lab_tests","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"requires_fasting","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"instructions","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"lab_state","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"medication_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"laboratory_order_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"fulfillment_status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"ordered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"fullscript_order_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"fullscript_order_number","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"quantity_ordered","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"fullscript_treatment_plans","kind":"patient","category":"Other patient records","description":"","file":"data/fullscript_treatment_plans.ndjson","linked_to_patient_by":["fullscript_treatment_plans.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by_connection_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"fullscript_treatment_plan_id","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"fullscript_patient_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"fullscript_practitioner_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"fullscript_clinic_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"resolution_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"available_at","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"activated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"invitation_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"checkout_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"practitioner_pay_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"lab_checkout_status","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"patient_lab_fields_needed","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"personal_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"treatment_plan_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"last_synced_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sync_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"group_session_attendees","kind":"patient","category":"Appointments and scheduling","description":"One patient in one session: their own visit, attendance and note part.","file":"data/group_session_attendees.ndjson","linked_to_patient_by":["group_session_attendees.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"group_session_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"attendance","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"minutes_late","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"minutes_attended","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"attendance_marked_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"attendance_marked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"individual_note","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"individual_note_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"interactive_complexity","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"needs_attention_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"medical_note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"name_guard_confirmations","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"guardian_hidden_items","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/guardian_hidden_items.ndjson","linked_to_patient_by":["guardian_hidden_items.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"item_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"item_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"hidden","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"provisional","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"import_job_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"headway_session_payments","kind":"patient","category":"Billing and payments","description":"One Headway provider appointment with its billing/payout facts (reconciliation).","file":"data/headway_session_payments.ndjson","linked_to_patient_by":["headway_session_payments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"connection_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"headway_provider_appointment_id","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"headway_event_id","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"headway_provider_id","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"headway_patient_user_id","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"submission_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"date_of_service","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"start_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billing_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"cpt_codes","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"appointment_status","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"claim_status","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_status","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_fees_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"insurance_payment_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"patient_responsibility_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"patient_payment_status","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"patient_payment_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_landing_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_open_recoup","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_in_terminal_failure","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"reconciliation_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"expected_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"variance_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"last_synced_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["raw_hash"],"attachment_columns":[]},{"table":"headway_session_submissions","kind":"patient","category":"Billing and payments","description":"The \"send to Headway\" queue: one signed Hero visit confirmed on Headway.","file":"data/headway_session_submissions.ndjson","linked_to_patient_by":["headway_session_submissions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"connection_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"headway_provider_id","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"headway_patient_user_id","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"headway_event_id","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"headway_event_virtual_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"headway_provider_appointment_id","type":"BIGINT","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"origin","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"date_of_service","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"billing_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"cpt_codes","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"payload_preview","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"missing_fields","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"attachments","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"confirmability","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"events","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_error_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"last_error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"cancel_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"queued_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"approved_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"approved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"confirmed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"canceled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"health_exchange_documents","kind":"patient","category":"Other patient records","description":"One health record file sent or received (C-CDA or another attachment).","file":"data/health_exchange_documents.ndjson","linked_to_patient_by":["health_exchange_documents.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direct_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"document_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"cda_release","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"file_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"content_type","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"size_bytes","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(1024)","nullable":true,"encoding":"attachment","description":""},{"name":"media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"import_job_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(512)","nullable":true,"encoding":"json","description":""},{"name":"document_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sender_summary","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"patient_demographics","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"match_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"match_candidates","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"validation_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"validation_report","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"error_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"warning_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"parsed_summary","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"review_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"dismiss_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"referral_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["content_digest"],"attachment_columns":["s3_key"]},{"table":"health_exchange_events","kind":"patient","category":"Other patient records","description":"The exchange ledger: one row per summary of care sent, received, or reconciled.","file":"data/health_exchange_events.ndjson","linked_to_patient_by":["health_exchange_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"referral_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"transport","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"document_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direct_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"document_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"counterpart_address","type":"VARCHAR(320)","nullable":true,"encoding":"json","description":""},{"name":"counterpart_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"reconciled_lists","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"occurred_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["content_digest"],"attachment_columns":[]},{"table":"hep_check_ins","kind":"patient","category":"Other patient records","description":"A patient's \"done\" / \"couldn't do it\" tap for one exercise on one organization-local date. ``event_id`` is the client's id (idempotent).","file":"data/hep_check_ins.ndjson","linked_to_patient_by":["hep_check_ins.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"item_key","type":"VARCHAR(48)","nullable":false,"encoding":"json","description":""},{"name":"local_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"sets_done","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"pain","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"effort","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"skip_reason","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"recorded_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"voided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"hep_program_versions","kind":"patient","category":"Other patient records","description":"One immutable publication: items with dose, provenance and the exercise content snapshot the patient saw.","file":"data/hep_program_versions.ndjson","linked_to_patient_by":["hep_program_versions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"items","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"effective_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"published_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"published_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"hep_programs","kind":"patient","category":"Other patient records","description":"At most one ACTIVE program per patient per organization; an ended program is never revived (a new program is a new row).","file":"data/hep_programs.ndjson","linked_to_patient_by":["hep_programs.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"current_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"start_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"last_published_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"last_published_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ended_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"end_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"hep_publication_issues","kind":"patient","category":"Other patient records","description":"A signed `.pt` home program that sign-time publishing could not send (another version went live, the program ended, or the feature was off). Durable and shown to the therapist; never a silent success.","file":"data/hep_publication_issues.ndjson","linked_to_patient_by":["hep_publication_issues.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"proposed_items","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["base_token"],"attachment_columns":[]},{"table":"hep_reminder_preferences","kind":"patient","category":"Other patient records","description":"The patient's own daily reminder (opt-in) at an organization-local minute.","file":"data/hep_reminder_preferences.ndjson","linked_to_patient_by":["hep_reminder_preferences.patient_id -> patients.id"],"columns":[{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"local_minutes","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"hep_reminder_sends","kind":"patient","category":"Other patient records","description":"Dedupe and send log: one row per patient per organization-local day, inserted BEFORE anything is queued (RPM-reminder style).","file":"data/hep_reminder_sends.ndjson","linked_to_patient_by":["hep_reminder_sends.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"local_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"detail","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"outbox_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"hero_mail_pieces","kind":"patient","category":"Other patient records","description":"","file":"data/hero_mail_pieces.ndjson","linked_to_patient_by":["hero_mail_pieces.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"recipient","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"sender","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"document_s3_key","type":"VARCHAR(512)","nullable":true,"encoding":"attachment","description":""},{"name":"page_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"sheet_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"color","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"double_sided","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"mail_service","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"provider","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"provider_ref","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"tracking_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"expected_delivery_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"events","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"cost_usd","type":"NUMERIC(12, 4)","nullable":true,"encoding":"json","description":""},{"name":"markup","type":"NUMERIC(8, 4)","nullable":true,"encoding":"json","description":""},{"name":"charge_usd","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"usage_recorded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"delivered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_polled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["document_s3_key"]},{"table":"homework_assignments","kind":"patient","category":"Other patient records","description":"","file":"data/homework_assignments.ndjson","linked_to_patient_by":["homework_assignments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assigned_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"practice_id","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"catalog_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"practice_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"instructions","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"target_sessions","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"sessions_per_week","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"due_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assigned_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"clinician_check_in","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"parameters","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"window_days","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"homework_check_ins","kind":"patient","category":"Other patient records","description":"","file":"data/homework_check_ins.ndjson","linked_to_patient_by":["homework_check_ins.assignment_id -> homework_assignments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assignment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"seconds","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"feeling","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"feedback","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"idr_case_attachments","kind":"patient","category":"Billing, claims and payments","description":"Selected chart or billing evidence linked to an IDR case.","file":"data/idr_case_attachments.ndjson","linked_to_patient_by":["idr_case_attachments.idr_case_id -> idr_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"idr_case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(240)","nullable":false,"encoding":"json","description":""},{"name":"source_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"packet_section","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"include_in_submission","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"attached_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"attached_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"snapshot_storage_key","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"snapshot_created_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["snapshot_hash"],"attachment_columns":[]},{"table":"idr_case_lines","kind":"patient","category":"Billing, claims and payments","description":"Snapshot of a disputed claim line inside an IDR case.","file":"data/idr_case_lines.ndjson","linked_to_patient_by":["idr_case_lines.idr_case_id -> idr_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"idr_case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_line_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cpt_hcpcs_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"modifiers","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"service_date_from","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"service_date_to","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"place_of_service","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"billed_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"allowed_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"paid_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"patient_responsibility_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"qpa_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"qpa_source","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"qpa_disclosed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"downcoded","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"downcode_explanation","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"undowncoded_qpa_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"provider_offer_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"payer_offer_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"selected_offer_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"idr_cases","kind":"patient","category":"Billing, claims and payments","description":"One independent dispute resolution case tied to one billing claim.","file":"data/idr_cases.ndjson","linked_to_patient_by":["idr_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"primary_insurance_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"eligibility_snapshot_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"workflow_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"state_code","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"funding_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"funding_type_confidence","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"funding_type_source","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"funding_type_evidence","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"current_step","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"assigned_owner_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_team_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"initial_payment_or_denial_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"open_negotiation_due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"open_negotiation_started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"open_negotiation_ends_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"idr_initiation_due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"idr_filed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"determination_received_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"payment_due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"closed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"closure_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"qpa_status","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"packet_status","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"warning_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"warnings","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"idr_documents","kind":"patient","category":"Billing, claims and payments","description":"Generated, uploaded, or imported document tied to an IDR case.","file":"data/idr_documents.ndjson","linked_to_patient_by":["idr_documents.idr_case_id -> idr_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"idr_case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"document_type","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(240)","nullable":false,"encoding":"json","description":""},{"name":"storage_key","type":"VARCHAR(1000)","nullable":true,"encoding":"attachment","description":""},{"name":"content_type","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"source_template_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_template_version","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"generated_from_packet_snapshot_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"autofill_values","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"manual_overrides","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"final_field_values","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"warnings","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["storage_key"]},{"table":"idr_packet_snapshots","kind":"patient","category":"Billing, claims and payments","description":"Structured packet payload generated for reproducible form/document output.","file":"data/idr_packet_snapshots.ndjson","linked_to_patient_by":["idr_packet_snapshots.idr_case_id -> idr_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"idr_case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"snapshot_payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"warning_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"immunization_registry_queries","kind":"patient","category":"Immunization registry exchange","description":"One QBP^Q11 sent to the registry and the RSP^K11 it produced.","file":"data/immunization_registry_queries.ndjson","linked_to_patient_by":["immunization_registry_queries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"registry_settings_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"query_profile","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"environment","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"query_tag","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"message_control_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"initiated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trigger","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"parent_query_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"response_profile","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"qak_code","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"candidate_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"staged_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"request_payload","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"response_payload","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"error_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"duration_ms","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"forecast","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"evaluated_history","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"payload_purged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"immunization_registry_submissions","kind":"patient","category":"Immunization registry exchange","description":"One VXU submission attempt-chain for one immunization.","file":"data/immunization_registry_submissions.ndjson","linked_to_patient_by":["immunization_registry_submissions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sequence","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"registry_settings_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"environment","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"immunization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"operation","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"message_control_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"message_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"hl7_payload","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"ack_code","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"zsa_code","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"ack_payload","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"error_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"late_ack_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"attempt_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"submitted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"payload_purged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"registry_immunization_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"group_leader_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["content_hash","lease_token"],"attachment_columns":[]},{"table":"inbound_referral_events","kind":"patient","category":"Referrals","description":"Append-only audit trail (submission, triage actions, views, OTP fails).","file":"data/inbound_referral_events.ndjson","linked_to_patient_by":["inbound_referral_events.inbound_referral_id -> inbound_referrals.linked_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"inbound_referral_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"actor_type","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"actor_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"metadata_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["ip_hash"],"attachment_columns":[]},{"table":"inbound_referral_updates","kind":"patient","category":"Referrals","description":"","file":"data/inbound_referral_updates.ndjson","linked_to_patient_by":["inbound_referral_updates.inbound_referral_id -> inbound_referrals.linked_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"inbound_referral_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"milestone","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"note_to_referrer","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"release_state","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"released_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"email_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sms_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"first_viewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"view_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["token_expires_at","view_token"],"attachment_columns":[]},{"table":"inbound_referrals","kind":"patient","category":"Referrals","description":"","file":"data/inbound_referrals.ndjson","linked_to_patient_by":["inbound_referrals.linked_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"referring_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"source_fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_inquiry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_voicemail_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"intake_extraction","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"referrer_name","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"referrer_practice_name","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"referrer_npi","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"referrer_fax_number","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"referrer_phone","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"patient_first_name","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"patient_last_name","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"patient_date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"patient_phone","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"patient_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"patient_sex","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"guardian_first_name","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"guardian_last_name","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"guardian_phone","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"guardian_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"urgency","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"clinical_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"insurance_payer_name","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"insurance_member_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"insurance_group_number","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"insurance_payer_mapping_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"insurance_stedi_payer_mapping_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"insurance_relationship_to_patient","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"insurance_policyholder_first_name","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"insurance_policyholder_last_name","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"insurance_policyholder_date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"insurance_eligibility_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"insurance_eligibility_checked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"insurance_eligibility_summary","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"status_updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"linked_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"accepted_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"accepted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"declined_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"seen_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"auto_updates_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"requested_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requested_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_outreach_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"source_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"submission_fingerprint","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["created_ip_hash","created_ua_hash"],"attachment_columns":[]},{"table":"inbox_auto_pend_extractions","kind":"patient","category":"Other patient records","description":"","file":"data/inbox_auto_pend_extractions.ndjson","linked_to_patient_by":["inbox_auto_pend_extractions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"thread_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sender_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"result","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"summary","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"extracted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"applied_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["claim_token"],"attachment_columns":[]},{"table":"inpatient_admission_encounters","kind":"patient","category":"Hospital stays","description":"Encounter link plus immutable claim-driving facts captured at sign.","file":"data/inpatient_admission_encounters.ndjson","linked_to_patient_by":["inpatient_admission_encounters.admission_id -> inpatient_admissions.patient_id -> patients.id","inpatient_admission_encounters.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"admission_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"visit_role","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"visit_role_locked","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_taxonomy_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"is_principal_physician","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_attending_physician","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"create_request_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"create_request_fingerprint","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_seed","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"billing_frozen_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"frozen_place_of_service","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"frozen_patient_class","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"frozen_admission_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"frozen_discharge_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"frozen_admitted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"frozen_discharged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"frozen_facility","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"frozen_authorization_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"frozen_coverage_mode","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"frozen_insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"frozen_payer_type","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"frozen_policy_coverage_start","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"frozen_policy_coverage_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"frozen_policy_valid_for_dos","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"frozen_is_principal_physician","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"frozen_is_attending_physician","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"frozen_attending_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"frozen_total_time_minutes","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"inpatient_admissions","kind":"patient","category":"Hospital stays","description":"One hospital stay grouping daily professional encounters.","file":"data/inpatient_admissions.ndjson","linked_to_patient_by":["inpatient_admissions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"hospital_facility_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"patient_class","type":"VARCHAR(21)","nullable":false,"encoding":"json","description":""},{"name":"admission_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"admitted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"discharge_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"discharged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"discharge_disposition","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"admitting_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"attending_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"rounding_role","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"admitting_diagnosis_code","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"secondary_diagnosis_codes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"coverage_mode","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"secondary_insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"authorization_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"room","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"create_request_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"create_request_fingerprint","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"discharge_request_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"discharge_request_fingerprint","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"inquiry_registration_links","kind":"patient","category":"Other patient records","description":"A new-patient registration link sent to an inquiry's sender, or why none was.","file":"data/inquiry_registration_links.ndjson","linked_to_patient_by":["inquiry_registration_links.preregistration_id -> preregistrations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"inquiry_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"preregistration_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"origin","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"recipient","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"skip_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"error","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"email_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sms_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"inquiry_sms_messages","kind":"patient","category":"Other patient records","description":"One text in an SMS inquiry conversation (a sender no chart could take).","file":"data/inquiry_sms_messages.ndjson","linked_to_patient_by":["inquiry_sms_messages.sms_webhook_event_id -> sms_webhook_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"inquiry_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"from_number_e164","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"to_number_e164","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"provider","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"provider_message_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"sms_webhook_event_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"matched_patient_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"sent_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"delivery_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"delivery_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_benefit_check_procedures","kind":"patient","category":"Patient demographics, insurance and contacts","description":"One CPT/HCPCS code asked about on a check (1 to 10 per check).","file":"data/insurance_benefit_check_procedures.ndjson","linked_to_patient_by":["insurance_benefit_check_procedures.benefit_check_id -> insurance_benefit_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"benefit_check_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"position","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"cpt_code","type":"VARCHAR(5)","nullable":false,"encoding":"json","description":""},{"name":"modifier","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"units","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"coverage_percent","type":"NUMERIC(5, 2)","nullable":true,"encoding":"json","description":""},{"name":"copay_cents","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"auth_required","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"auth_reference","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_benefit_checks","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/insurance_benefit_checks.ndjson","linked_to_patient_by":["insurance_benefit_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"date_of_service","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"place_of_service_code","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"service_facility_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"facility_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"facility_npi","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"rendering_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"extra_question","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"payer_phone_e164","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"payer_phone_source","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"called_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"payer_rep_name","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"call_reference_number","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"plan_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"in_network","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"deductible_applies","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"deductible_remaining_cents","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"oop_applies","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"oop_remaining_cents","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"estimated_patient_responsibility_cents","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"phone_call_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"attempt_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"failure_reason","type":"VARCHAR(300)","nullable":true,"encoding":"json","description":""},{"name":"ai_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_policies","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/insurance_policies.ndjson","linked_to_patient_by":["insurance_policies.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"provider_name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"policy_number","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"member_id_source","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"group_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"payer_id","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"eligibility_payer_id","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"plan_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"plan_product_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"requires_referral","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"pcp_assigned","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_bin","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_pcn","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_group","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"coordination_order","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"timely_filing_limit_days","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"prior_system_copay_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"last_verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"verification_source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"payer_mapping_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"officeally_payer_key","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"officeally_payer_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"officeally_payer_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"officeally_search_option_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"insurance_carrier_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payer_source_identifier_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"stedi_payer_mapping_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"stedi_payer_source_identifier_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payer_match_status","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"payer_match_confidence","type":"NUMERIC(5, 4)","nullable":true,"encoding":"json","description":""},{"name":"clearinghouse_hold_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"eligibility_last_transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"eligibility_coverage_active","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"eligibility_effective_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"eligibility_termination_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"eligibility_status","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_required","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_failed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_error","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_error_code","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_error_category","type":"VARCHAR(60)","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_error_retryable","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_error_recommended_action","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"cob_last_checked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cob_last_determination","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"medicare_secondary_payer_type","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"is_qmb","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"qmb_verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"qmb_verification_source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"qmb_periods","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"plan_type","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"coverage_start_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"coverage_end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_primary","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"policyholder_first_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"policyholder_last_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"policyholder_date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"policyholder_address_line1","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"policyholder_address_line2","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"policyholder_city","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"policyholder_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"policyholder_zip_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"policyholder_sex","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"relationship_to_patient","type":"VARCHAR(6)","nullable":true,"encoding":"json","description":""},{"name":"client_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"insurance_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"claims_address_line1","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"claims_address_line2","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"claims_city","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"claims_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"claims_zip_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"copay_amount","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"deductible_amount","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"card_front_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"card_back_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"pcp_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"pcp_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"provider_services_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"copay_pcp","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"copay_specialist","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"copay_er","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"copay_urgent_care","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"copay_virtual","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"deductible_out_of_network","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"oop_max_in_network","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"oop_max_out_of_network","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_policy_cob_snapshots","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/insurance_policy_cob_snapshots.ndjson","linked_to_patient_by":["insurance_policy_cob_snapshots.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"checked_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"checked_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"external_transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"trace_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"application_mode","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"classification","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"coverage_overlap","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"benefit_overlap","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"instance_exists","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"primacy_determined","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"determination","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"recommended_coordination_order","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"effective_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"termination_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"discovered_payers","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"raw_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"parsed_summary","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"order_applied_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"order_applied_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"applied_order","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_policy_eligibility_snapshots","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/insurance_policy_eligibility_snapshots.ndjson","linked_to_patient_by":["insurance_policy_eligibility_snapshots.insurance_policy_id -> insurance_policies.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"checked_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"checked_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"effective_start","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"effective_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"plan_subtype","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"copay_urgent_care","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"service_type_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"copay_primary","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"copay_specialist","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"copay_virtual","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"deductible_remaining","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"oop_remaining","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"oop_max","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"network_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"coinsurance_percent","type":"NUMERIC(5, 2)","nullable":true,"encoding":"json","description":""},{"name":"authorization_required","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"referral_required","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"telehealth_covered","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"place_of_service_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"frequency_limits","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"attachments_required","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"coordination_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"raw_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"external_transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"trace_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"parsed_summary","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_policy_previous_card_images","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/insurance_policy_previous_card_images.ndjson","linked_to_patient_by":["insurance_policy_previous_card_images.insurance_policy_id -> insurance_policies.patient_id -> patients.id","insurance_policy_previous_card_images.media_id -> media.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"side","type":"VARCHAR(5)","nullable":false,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"replaced_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"replaced_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"replaced_by_capture_session_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_policy_questionnaires","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/insurance_policy_questionnaires.ndjson","linked_to_patient_by":["insurance_policy_questionnaires.insurance_policy_id -> insurance_policies.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"questionnaire_type","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"response_data","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"collected_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"collected_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_prior_authorization_consumptions","kind":"patient","category":"Patient demographics, insurance and contacts","description":"Ledger of prior-authorization unit draw-downs, one row per (auth, encounter).","file":"data/insurance_prior_authorization_consumptions.ndjson","linked_to_patient_by":["insurance_prior_authorization_consumptions.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prior_authorization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"units","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_prior_authorizations","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/insurance_prior_authorizations.ndjson","linked_to_patient_by":["insurance_prior_authorizations.insurance_policy_id -> insurance_policies.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"authorization_number","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"request_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"decision_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"effective_start","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"effective_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"units_requested","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"units_authorized","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"units_used","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"units_used_adjustment","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"service_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"site_of_service","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"documents","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"clearinghouse_source","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"certification_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"last_transaction_type","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"optum_payer_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"external_transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"external_trace_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"external_control_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"request_summary","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"response_summary","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"last_submitted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_response_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"expiry_warning_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"follow_up_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"voided_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"void_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"intake_review_items","kind":"patient","category":"Other patient records","description":"","file":"data/intake_review_items.ndjson","linked_to_patient_by":["intake_review_items.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"visit_link","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"item_type","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"questionnaire_response_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"questionnaire_assignment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"paperwork_assignment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"review_required","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"review_reason","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"has_safety_flag","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_elevated","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"decided_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"flag_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"flagged_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"flagged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"flag_recipient_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"flag_todo_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"flag_acknowledged_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"flag_acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_back_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_back_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_back_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"replacement_questionnaire_assignment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"lab_instrument_messages","kind":"patient","category":"Laboratory orders and results","description":"One patient block of an uploaded message: the item a person may need to file.","file":"data/lab_instrument_messages.ndjson","linked_to_patient_by":["lab_instrument_messages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"upload_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"block_index","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"reason_code","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"reason_detail","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"instrument","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"connection","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"source_workstation_label","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"reported","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"matched_field","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"specimen_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"collected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"received_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"resolution","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"dismissal_reason","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["suggested_patient_id"],"attachment_columns":[]},{"table":"lab_instrument_tests","kind":"patient","category":"Laboratory orders and results","description":"One test of a patient block (one ASTM O record / one HL7 OBR group).","file":"data/lab_instrument_tests.ndjson","linked_to_patient_by":["lab_instrument_tests.message_id -> lab_instrument_messages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"test_index","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"reason_code","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"reason_detail","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"run_key","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"run_key_basis","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"assay_key","type":"VARCHAR(48)","nullable":true,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"known","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"detail","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"is_correction","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"message_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"collected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"collected_at_source","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"reportable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"laboratory_order_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"charge_lines","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"charge_ref","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"charge_state","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"supersedes_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"superseded_by_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["content_hash"],"attachment_columns":[]},{"table":"lab_requisitions","kind":"patient","category":"Laboratory orders and results","description":"","file":"data/lab_requisitions.ndjson","linked_to_patient_by":["lab_requisitions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"provider_id","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"collection_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"bill_method","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"external_account_number","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"external_requisition_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"external_order_key","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"external_patient_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(128)","nullable":false,"encoding":"json","description":""},{"name":"attempt_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_error_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"last_error_message","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"submitted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_status_check_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"requisition_document_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"laboratory_orders","kind":"patient","category":"Laboratory orders and results","description":"","file":"data/laboratory_orders.ndjson","linked_to_patient_by":["laboratory_orders.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"ordering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ordering_provider_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"draw_appointment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"lab_requisition_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"test","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"requisition_test_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requisition_template_revision","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"order_channel","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"loinc_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"order_number","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"quest_requisition_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"accession_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(18)","nullable":false,"encoding":"json","description":""},{"name":"priority","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"cancellation_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_standing_order","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"standing_order_frequency","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"standing_order_duration","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"standing_order_end_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"specimen_type","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"specimen_volume","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"specimen_collection_site","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"specimen_quality","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"specimen_rejection_reason","type":"VARCHAR(19)","nullable":true,"encoding":"json","description":""},{"name":"collection_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"collection_method","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"specimen_source","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"fasting_status","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"collection_location","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"collection_location_type","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"performing_lab","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"performing_lab_address","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"performing_lab_clia","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"order_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"received_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reported_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"results_delivery_method","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"clinical_notes","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"is_stat","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"results_summary","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"abnormal_flag","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"critical_flag","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"quest_order_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"quest_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"quest_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"quest_last_update","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"quest_report_oid","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"external_lab_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"quest_submission_mode","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"quest_patient_oid_copy","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"quest_error","type":"VARCHAR(10000)","nullable":true,"encoding":"json","description":""},{"name":"quest_error_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"insurance_preauthorization","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"abn_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"abn_signed_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billing_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"billing_codes","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"copy_to_providers","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"laboratory_results","kind":"patient","category":"Laboratory orders and results","description":"","file":"data/laboratory_results.ndjson","linked_to_patient_by":["laboratory_results.order_id -> laboratory_orders.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"order_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"test_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"test_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"test_category","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"raw_test_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"raw_panel_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"raw_panel_code","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"canonical_loinc_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"canonical_display_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"value","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"unit","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"reference_range","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"raw_unit","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"raw_reference_range","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"raw_flag","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"canonical_ucum_unit","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"normalized_numeric_value","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"interpretation","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"result_flag","type":"VARCHAR(13)","nullable":true,"encoding":"json","description":""},{"name":"normalization_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"normalization_confidence","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"normalization_method","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"normalization_candidates","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"source_page","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"source_section","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"raw_source_text","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"source_bbox","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"performed_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"critical_notification_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"notified_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notification_method","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"notification_acknowledged_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"correction_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"corrected_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"method","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"instrument","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"lab_comments","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"provider_notes","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"low_friction_bookings","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/low_friction_bookings.ndjson","linked_to_patient_by":["low_friction_bookings.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_match_status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"portal_invitation_preregistration_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"full_name","type":"VARCHAR(160)","nullable":false,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"email","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"phone_encryption_key_id","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"masked_phone","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"scheduled_datetime","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"duration_minutes","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"registration_status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"verification_challenge_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"source_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["created_ip_hash","created_ua_hash","email_normalized_hash","phone_e164_ciphertext","phone_e164_hash"],"attachment_columns":[]},{"table":"maternity_billing_episodes","kind":"patient","category":"Billing, claims and payments","description":"The billing package for one pregnancy.","file":"data/maternity_billing_episodes.ndjson","linked_to_patient_by":["maternity_billing_episodes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"pregnancy_episode_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"care_start_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"transfer_in","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"transfer_in_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"transfer_out","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"transfer_out_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"postpartum_responsibility","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"delivery_type","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"delivery_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"delivery_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"confirmed_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"package_disposition","type":"VARCHAR(21)","nullable":true,"encoding":"json","description":""},{"name":"recommended_disposition","type":"VARCHAR(21)","nullable":true,"encoding":"json","description":""},{"name":"recommendation_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"proposal_status","type":"VARCHAR(21)","nullable":false,"encoding":"json","description":""},{"name":"confirmed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"confirmed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"maternity_visit_links","kind":"patient","category":"Billing, claims and payments","description":"One completed encounter's participation in a maternity package.","file":"data/maternity_visit_links.ndjson","linked_to_patient_by":["maternity_visit_links.encounter_id -> encounters.patient_id -> patients.id","maternity_visit_links.maternity_billing_episode_id -> maternity_billing_episodes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"maternity_billing_episode_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"classification","type":"VARCHAR(18)","nullable":false,"encoding":"json","description":""},{"name":"classification_source","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"em_billable_alongside_package","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"ga_weeks_at_visit","type":"NUMERIC(4, 1)","nullable":true,"encoding":"json","description":""},{"name":"extra_visit_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"med_list_attestations","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/med_list_attestations.ndjson","linked_to_patient_by":["med_list_attestations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"attested_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"changes_submitted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"reviewed_scope","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["list_hash"],"attachment_columns":[]},{"table":"media","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/media.ndjson","linked_to_patient_by":["media.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"media_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"page_number","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"file_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"content_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(500)","nullable":false,"encoding":"attachment","description":""},{"name":"description","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"document_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"file_metadata","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key"]},{"table":"media_groups","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"Groups multiple media files (pages) into a logical document.","file":"data/media_groups.ndjson","linked_to_patient_by":["media_groups.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"group_name","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"document_type","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"document_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"author_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"facility_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"source_category","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"source_subcategory","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"search_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"page_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"ai_classification_confidence","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"ai_classification_summary","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["document_hash"],"attachment_columns":[]},{"table":"medical_note_cosign_events","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"The feedback history of one co-sign request: comments, send-backs and their withdrawal, the author's replies and revisions, version updates and the co-signature. ``note_id``/``note_version`` are the version under review at the time; ``delivery`` is what each notification channel did (``{\"team_chat\": {...}, \"todo\": {...}}``: status, ids, a plain error).","file":"data/medical_note_cosign_events.ndjson","linked_to_patient_by":["medical_note_cosign_events.request_id -> medical_note_cosign_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"note_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"delivery","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medical_note_cosign_requests","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/medical_note_cosign_requests.ndjson","linked_to_patient_by":["medical_note_cosign_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"cosigner_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assigned_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assigned_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"statement_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"statement_dot_phrase_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cosigned_note_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"rule_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rule_reason","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"bulk_batch_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"review_note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_back_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_back_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"returned_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"return_kind","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medical_note_versions","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"Historical versions of medical notes.","file":"data/medical_note_versions.ndjson","linked_to_patient_by":["medical_note_versions.note_id -> medical_notes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"content","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"archive_status","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"s3_archive_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"archived_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_job_id","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"retrieval_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_requested_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"retrieval_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"note_status","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"note_type","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"version_reason","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"version_comment","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"author_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"author_assistant_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"note_created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"note_signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_archive_key"]},{"table":"medical_notes","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/medical_notes.ndjson","linked_to_patient_by":["medical_notes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"author_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"author_assistant_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"content","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"import_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"imported_author_name","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"document_subtype","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"note_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_note_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"hidden_from_guardian_portal","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"hidden_from_patient_portal","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"psychiatry_psychotherapy_split_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"psychiatry_psychotherapy_split_role","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"guardian_visibility_updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"guardian_visibility_updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"guardian_visibility_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"previous_version_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"note_type","type":"VARCHAR(31)","nullable":false,"encoding":"json","description":""},{"name":"note_status","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"supervising_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cosigned_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cosigned_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"amendment_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"amendment_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"amendment_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"void_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"void_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"void_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_administration_charge_contributions","kind":"patient","category":"Medications given in the office","description":"One billing group of an encounter's administration charge plan (plan §5.3).","file":"data/medication_administration_charge_contributions.ndjson","linked_to_patient_by":["medication_administration_charge_contributions.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"role","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"group_key","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"units","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"modifiers","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"ndc11","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"ndc_quantity","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"ndc_unit","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"line_uids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"shares","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"plan_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_administration_components","kind":"patient","category":"Medications given in the office","description":"An injection/dose physically given within an episode (site, route, volume).","file":"data/medication_administration_components.ndjson","linked_to_patient_by":["medication_administration_components.administration_id -> medication_administrations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"administration_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sequence","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"component_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"unit","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"volume_ml","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"route","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"site","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"site_detail","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_administration_observations","kind":"patient","category":"Medications given in the office","description":"A post-dose observation check (vitals, sedation/dissociation, notes).","file":"data/medication_administration_observations.ndjson","linked_to_patient_by":["medication_administration_observations.administration_id -> medication_administrations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"administration_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"observed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"checkpoint_minutes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"vitals","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"sedation_scale","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"dissociation_scale","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"scale_name","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"recorded_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_administration_revisions","kind":"patient","category":"Medications given in the office","description":"Immutable full snapshot of an episode after each change (plan §13).","file":"data/medication_administration_revisions.ndjson","linked_to_patient_by":["medication_administration_revisions.administration_id -> medication_administrations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"administration_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"revision_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"change_kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"changed_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"changed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_administration_sources","kind":"patient","category":"Medications given in the office","description":"A lot/vial the dose was drawn from (plan §5.2).","file":"data/medication_administration_sources.ndjson","linked_to_patient_by":["medication_administration_sources.administration_id -> medication_administrations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"administration_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"lot_number","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"expiration_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"ndc11","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"inventory_lot_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"open_container_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"containers_used","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"drug_amount_drawn","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"drug_amount_unit","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"volume_ml_drawn","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"ledger_txn_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"raw_scan","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_administrations","kind":"patient","category":"Medications given in the office","description":"One administration episode (plan §5.2).","file":"data/medication_administrations.ndjson","linked_to_patient_by":["medication_administrations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"template_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"regimen_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"revision_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"signed_revision_number","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"action","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"not_given_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"not_given_reason_text","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"drug_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"generic_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"ndc11","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"ndc_product_id","type":"VARCHAR","nullable":true,"encoding":"json","description":""},{"name":"rxcui","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"dosage_form","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"strength_text","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"dea_schedule","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"manufacturer","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"dose_amount","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"dose_unit","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"dose_volume_ml","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"route","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"container_type","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"container_amount","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"container_amount_unit","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"containers_used","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"waste_amount","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"waste_volume_ml","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"waste_reason","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"waste_witness_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"waste_witness_attested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"stock_source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"administered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"administered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ordering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"supervising_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"late_entry","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"indication_icd10","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"patient_response","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"reaction_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"observation_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"observation_required_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"released_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rems_attestations","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"consent_obtained","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"education_given","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"billing_disposition","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"billing_disposition_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"admin_units","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"billing_override","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"billing_profile_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"drug_cost","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"supply_cost","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"voided_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"void_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"void_kind","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"stock_outcome","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["request_hash"],"attachment_columns":[]},{"table":"medication_change_proposals","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/medication_change_proposals.ndjson","linked_to_patient_by":["medication_change_proposals.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"medication_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"change_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"proposed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"proposed_by_patient","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"proposer_display","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"medication_updated_at_snapshot","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"review_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"applying_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_events","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/medication_events.ndjson","linked_to_patient_by":["medication_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"medication_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"event_time","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"source_event_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status_before","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"status_after","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"changed_fields","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"clinical_context","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"source_id","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"medication_name_snapshot","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"rxcui_snapshot","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"ndc_snapshot","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescription_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_refill_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"external_import_job_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_medication_review_session_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"actor_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"actor_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_history_entries","kind":"patient","category":"Other patient records","description":"","file":"data/medication_history_entries.ndjson","linked_to_patient_by":["medication_history_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_kind","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"drug_description","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"rxcui","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"ndc","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"simplified_medication_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"quantity_value","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"quantity_unit_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"days_supply","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"written_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"last_fill_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"sig_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"refills","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"diagnoses","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_ncpdp","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_phone","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_npi","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"added_medication_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"added_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"added_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"record_source","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"source_description","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"payment_type","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"rx_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"fill_number","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"refills_remaining","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"sold_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"pa_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"pa_status","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"dea_schedule","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"raw","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"group_key","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_history_requests","kind":"patient","category":"Other patient records","description":"","file":"data/medication_history_requests.ndjson","linked_to_patient_by":["medication_history_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescriber_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"consent_attested","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"period_start","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"period_end","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"transport_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"denial_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"entry_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"eligibility_check_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"coverage_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"consent_code","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"central_day","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"trigger","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"interaction","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"continuation_of_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"outcome_reason_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"outcome_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"attempt","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_reconciliations","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/medication_reconciliations.ndjson","linked_to_patient_by":["medication_reconciliations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"finalized_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"finalized_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"list_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"counts","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"submission_key","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"prep_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medication_regimens","kind":"patient","category":"Medications given in the office","description":"Recurring in-office dose tracking (plan §5.4).","file":"data/medication_regimens.ndjson","linked_to_patient_by":["medication_regimens.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"template_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"drug_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"dose_text","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"route","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"interval_value","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"interval_unit","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"due_window_before_days","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"due_window_after_days","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_due_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"next_due_override_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"override_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"last_administration_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"stop_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"responsible_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"medications","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/medications.ndjson","linked_to_patient_by":["medications.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescribing_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"medication_kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"compound_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"generic_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"simplified_medication_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"raw_patient_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"verification_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"rxcui","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"ndc_code","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"ndc_package_code","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"ndc_product_code","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"surescripts_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"drug_class","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"controlled_substance_schedule","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"strength","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"form","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"route","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"sig","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"quantity","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"days_supply","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"refills_authorized","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"refills_remaining","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"start_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"end_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"pharmacy_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_fax","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_npi","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_ncpdp","type":"VARCHAR(7)","nullable":true,"encoding":"json","description":""},{"name":"requires_prior_auth","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"prior_auth_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"prior_auth_expiration","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"eprescribe_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"eprescribe_error","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"eprescribe_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"eprescribe_reference_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"last_eprescribe_update","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_to_pharmacy_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_method","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"external_rx_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"clinical_details","type":"VARCHAR(5000)","nullable":true,"encoding":"json","description":""},{"name":"import_prescriber_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"import_epic_system","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"import_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_filled_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"next_fill_due","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_time_taken","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reconciled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reconciled_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_of_information","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"adherence_status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"adherence_reported_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"adherence_reported_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"adherence_note","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"release_class","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"release_class_source","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"therapy_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"superseded_by_medication_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"superseded_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"concurrent_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"needs_review_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"last_confirmed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_confirmed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_confirmed_coverage_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"coverage_end_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"coverage_confidence","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"coverage_refreshed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"changes_history","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"discontinuation_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"adverse_reactions","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["compound_composition_hash"],"attachment_columns":[]},{"table":"meditation_sessions","kind":"patient","category":"Other patient records","description":"","file":"data/meditation_sessions.ndjson","linked_to_patient_by":["meditation_sessions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"next_turn_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"turn_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"message_attachments","kind":"patient","category":"Messages","description":"","file":"data/message_attachments.ndjson","linked_to_patient_by":["message_attachments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"filename","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"file_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"storage_path","type":"VARCHAR(500)","nullable":false,"encoding":"attachment","description":""},{"name":"width","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"height","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"thumbnail_path","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["storage_path"]},{"table":"message_inline_uploads","kind":"patient","category":"Messages","description":"","file":"data/message_inline_uploads.ndjson","linked_to_patient_by":["message_inline_uploads.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"uploaded_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"storage_path","type":"VARCHAR(500)","nullable":false,"encoding":"attachment","description":""},{"name":"filename","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"content_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"width","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"height","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"claimed_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["storage_path"]},{"table":"messages","kind":"patient","category":"Messages","description":"","file":"data/messages.ndjson","linked_to_patient_by":["messages.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"thread_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sender_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recipient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subject","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"BYTEA","nullable":false,"encoding":"zlib_text","description":""},{"name":"body_type","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"body_slate","type":"BYTEA","nullable":true,"encoding":"zlib_json","description":""},{"name":"urgency_level","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"parent_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":true,"encoding":"json","description":""},{"name":"sender_deleted","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"recipient_deleted","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"sender_read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"recipient_read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"current_owner_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"original_recipient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"current_owner_pool_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"owner_assigned_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"backup_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"backup_pool_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"escalated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"viewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"viewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_on_behalf_of_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"routing_source","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"triage_category","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"requires_follow_up","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"follow_up_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"follow_up_completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"follow_up_completed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"followup_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trigger_email_alert","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"email_alert_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"email_alert_last_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reply_delivery_channel","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"membership_access_status","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"membership_access_reason_code","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"membership_requires_payment_update","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"membership_access_recorded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"recalled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"recalled_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"new_patient_funnel_submissions","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/new_patient_funnel_submissions.ndjson","linked_to_patient_by":["new_patient_funnel_submissions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"funnel_config_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"config_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"answers","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"masked_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"masked_phone","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"triage_outcome","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"triage_reasons","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"is_urgent","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_minor","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"safety_notice","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"response_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"inquiry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"low_friction_booking_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"embed_origin","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["email_hash","phone_ciphertext","phone_e164_hash","request_ip_hash","user_agent_hash"],"attachment_columns":[]},{"table":"note_images","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/note_images.ndjson","linked_to_patient_by":["note_images.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"uploaded_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(500)","nullable":false,"encoding":"attachment","description":""},{"name":"content_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"width","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"height","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"original_filename","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"original_file_size","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"original_content_type","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key"]},{"table":"nutrition_care_targets","kind":"patient","category":"Other patient records","description":"","file":"data/nutrition_care_targets.ndjson","linked_to_patient_by":["nutrition_care_targets.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"set_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"preset","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"targets","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"numbers_mode_floor","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"note_to_patient","type":"VARCHAR(1000)","nullable":false,"encoding":"json","description":""},{"name":"resolved_weight_kg","type":"NUMERIC(6, 2)","nullable":true,"encoding":"json","description":""},{"name":"weight_vital_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"superseded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_consents","kind":"patient","category":"Other patient records","description":"","file":"data/nutrition_consents.ndjson","linked_to_patient_by":["nutrition_consents.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scope","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"assignment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"granted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"actor_relationship","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"consent_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"revision","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_custom_foods","kind":"patient","category":"Other patient records","description":"","file":"data/nutrition_custom_foods.ndjson","linked_to_patient_by":["nutrition_custom_foods.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"brand","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"basis","type":"VARCHAR(2)","nullable":false,"encoding":"json","description":""},{"name":"nutrients","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"portions","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"serving_label","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"serving_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"gtin","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"origin","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"revision","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_day_marks","kind":"patient","category":"Other patient records","description":"","file":"data/nutrition_day_marks.ndjson","linked_to_patient_by":["nutrition_day_marks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"local_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"complete","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"revision","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"updated_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_entry_mutations","kind":"patient","category":"Other patient records","description":"Remembered mutation results so a replayed ``mutation_id`` returns the original answer. Pruned after 7 days.","file":"data/nutrition_entry_mutations.ndjson","linked_to_patient_by":["nutrition_entry_mutations.patient_id -> patients.id"],"columns":[{"name":"mutation_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"entry_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"result","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_log_entries","kind":"patient","category":"Other patient records","description":"","file":"data/nutrition_log_entries.ndjson","linked_to_patient_by":["nutrition_log_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"local_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"tz","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"logged_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"meal","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"food_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"custom_food_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"food_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(12, 3)","nullable":true,"encoding":"json","description":""},{"name":"unit","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"portion_label","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"quantity","type":"NUMERIC(10, 3)","nullable":true,"encoding":"json","description":""},{"name":"nutrients","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"estimated","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"confidence","type":"NUMERIC(4, 3)","nullable":true,"encoding":"json","description":""},{"name":"method","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"note","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"context","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"revision","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_profiles","kind":"patient","category":"Other patient records","description":"","file":"data/nutrition_profiles.ndjson","linked_to_patient_by":["nutrition_profiles.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"numbers_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"goals","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"body","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"units","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"sharing","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"sharing_changed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sharing_consent_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"revision","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"last_revision","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"tombstones_purged_through","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_saved_meals","kind":"patient","category":"Other patient records","description":"","file":"data/nutrition_saved_meals.ndjson","linked_to_patient_by":["nutrition_saved_meals.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"items","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"use_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_used_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revision","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"order_diagnosis_association_events","kind":"patient","category":"Other patient records","description":"One signed visit's (diagnosis, order) pair, counted once in the aggregate.","file":"data/order_diagnosis_association_events.ndjson","linked_to_patient_by":["order_diagnosis_association_events.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"diagnosis_code","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"order_key","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"order_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"recorded_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"order_set_visit_items","kind":"patient","category":"Other patient records","description":"A form, handout or outside order form an order set placed on a visit.","file":"data/order_set_visit_items.ndjson","linked_to_patient_by":["order_set_visit_items.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"order_set_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"order_set_name","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"source_item_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"item_type","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"diagnoses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"dedup_key","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"result_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sent_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"failure_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"order_signature_requests","kind":"patient","category":"Other patient records","description":"","file":"data/order_signature_requests.ndjson","linked_to_patient_by":["order_signature_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"order_kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"order_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"signer_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"signer_changes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"decision_reason_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"decided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"decided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"organization_not_accepted_insurance","kind":"patient","category":"Billing, claims and payments","description":"A payer (Stedi directory plan) the practice does not accept.","file":"data/organization_not_accepted_insurance.ndjson","linked_to_patient_by":["organization_not_accepted_insurance.payer_submission_hold_rule_id -> payer_submission_hold_rules.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"stedi_payer_mapping_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"payer_id","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"payer_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"action","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"payer_submission_hold_rule_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"outside_order_requisitions","kind":"patient","category":"Other patient records","description":"","file":"data/outside_order_requisitions.ndjson","linked_to_patient_by":["outside_order_requisitions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"order_kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"facility_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"facility","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"ordering_provider_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"tracking_number","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"priority","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"order_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"document_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"shared_with_patient_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"shared_with_patient_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cancellation_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["request_hash"],"attachment_columns":[]},{"table":"overpayment_cases","kind":"patient","category":"Billing, claims and payments","description":"A detected potential overpayment / credit balance, tracked to return.","file":"data/overpayment_cases.ndjson","linked_to_patient_by":["overpayment_cases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"source_key","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"payer_class","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"is_estimated","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"detected_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"identified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"identified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"deadline_at","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"resolution","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"resolution_reference","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"paperwork_assignment_documents","kind":"patient","category":"Forms, consents and signed paperwork","description":"A document sent to the patient to sign (\"Send to patient to sign\").","file":"data/paperwork_assignment_documents.ndjson","linked_to_patient_by":["paperwork_assignment_documents.patient_id -> patients.id"],"columns":[{"name":"assignment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_form_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"document_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(500)","nullable":false,"encoding":"attachment","description":""},{"name":"sha256","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"page_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"pages","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"signature_fields","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key"]},{"table":"parsed_records","kind":"patient","category":"Other patient records","description":"Individual record parsed from an external document.","file":"data/parsed_records.ndjson","linked_to_patient_by":["parsed_records.import_job_id -> external_record_import_jobs.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"import_job_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"record_type","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"sequence_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"parsed_data","type":"JSON","nullable":false,"encoding":"json","description":""},{"name":"normalized_data","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"source_page","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"source_section","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"source_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"confidence","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"is_duplicate","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"duplicate_of_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"duplicate_of_type","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"committed_record_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"committed_record_type","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"committed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"review_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"modified_data","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_address_history","kind":"patient","category":"Patient demographics, insurance and contacts","description":"A previous (or additional) address of the patient (USCDI Previous Address).","file":"data/patient_address_history.ndjson","linked_to_patient_by":["patient_address_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"use","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"address_line1","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"address_line2","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"city","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"postal_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"country","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"period_start","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"period_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_allergies","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/patient_allergies.ndjson","linked_to_patient_by":["patient_allergies.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"unii_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"ndc_package_11","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"rxnorm_code","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"snomed_code","type":"VARCHAR(18)","nullable":true,"encoding":"json","description":""},{"name":"snomed_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"allergen_name","type":"VARCHAR(600)","nullable":false,"encoding":"json","description":""},{"name":"allergen_type","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"severity","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reaction_type","type":"VARCHAR(11)","nullable":false,"encoding":"json","description":""},{"name":"reaction_description","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"onset_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"verified","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"VARCHAR(5000)","nullable":true,"encoding":"json","description":""},{"name":"allergy_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_amendment_requests","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_amendment_requests.ndjson","linked_to_patient_by":["patient_amendment_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requester_relationship","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"received_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"record_area","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"target_resource_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"target_resource_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"target_label","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"record_description","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"requested_change","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"extended_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"extension_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"extended_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"extended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"decided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"decided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"decision_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"denial_basis","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"disagreement_statement","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"disagreement_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"disagreement_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rebuttal","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"rebuttal_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"rebuttal_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_notified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"withdrawn_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"withdrawn_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_billing_actions","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_billing_actions.ndjson","linked_to_patient_by":["patient_billing_actions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"refund_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"action_type","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"action_metadata","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_billing_preferences","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_billing_preferences.ndjson","linked_to_patient_by":["patient_billing_preferences.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"bypass_card_on_file_requirement","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"bypass_booking_collection","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"auto_file_secondary","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_care_team_members","kind":"patient","category":"Care team and outside providers","description":"","file":"data/patient_care_team_members.ndjson","linked_to_patient_by":["patient_care_team_members.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"referring_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"role","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"role_label","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"is_primary","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"source_ref_type","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"source_ref_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"suggestion_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"effective_from","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"effective_to","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"confirmed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"confirmed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ended_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"end_reason","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"dismissed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"dismissed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_charge_discounts","kind":"patient","category":"Billing, claims and payments","description":"One discount given on one charge; the only discount record.","file":"data/patient_charge_discounts.ndjson","linked_to_patient_by":["patient_charge_discounts.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scope_key","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"coupon_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"coupon_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"discount_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"percent_bps","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"fixed_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"basis_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"reason_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"reason_label","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"applied_via","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"applied_action_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ended_action_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"applied_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"applied_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ended_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"end_reason","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"end_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_chart_alerts","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_chart_alerts.ndjson","linked_to_patient_by":["patient_chart_alerts.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"alert_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"severity","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"dedupe_key","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source_refs","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"resolution_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_collection_holds","kind":"patient","category":"Billing, claims and payments","description":"One persisted hold on (part of) a patient's share; open while ``released_at`` is NULL.","file":"data/patient_collection_holds.ndjson","linked_to_patient_by":["patient_collection_holds.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"placed_by","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"placed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"placed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"generation","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"release_basis","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"released_by","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"released_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"evidence","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_communication_preference_changes","kind":"patient","category":"Patient demographics, insurance and contacts","description":"One change to one communication preference: who, when, how, from -> to.","file":"data/patient_communication_preference_changes.ndjson","linked_to_patient_by":["patient_communication_preference_changes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"field","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"old_value","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"new_value","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"on_patient_request","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"request_method","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_communication_preferences","kind":"patient","category":"Patient demographics, insurance and contacts","description":"Per-patient communication settings.","file":"data/patient_communication_preferences.ndjson","linked_to_patient_by":["patient_communication_preferences.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"preferred_channels","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"sms_opt_out","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"email_care_messages_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"email_scheduling_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"email_billing_reminders_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"push_opt_out","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"voice_opt_out","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"email_marketing_opt_out","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"sms_marketing_consent","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"sms_opt_out_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"preferred_contact_times","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"do_not_disturb_start","type":"TIME","nullable":true,"encoding":"json","description":""},{"name":"do_not_disturb_end","type":"TIME","nullable":true,"encoding":"json","description":""},{"name":"reminder_days_before","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"timezone","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"preferred_language","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_contacts","kind":"patient","category":"Patient demographics, insurance and contacts","description":"One additional contact of a patient (a person, their relationship to the patient, phones and emails).","file":"data/patient_contacts.ndjson","linked_to_patient_by":["patient_contacts.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"middle_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"relationship","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"is_emergency_contact","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_parent_guardian","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_billing_responsible","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"phones","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"emails","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"sort_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"source_system","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["source_key_digest"],"attachment_columns":[]},{"table":"patient_contraception_history","kind":"patient","category":"Gynecologic and obstetric history","description":"One row per contraception method the patient has used.","file":"data/patient_contraception_history.ndjson","linked_to_patient_by":["patient_contraception_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"method","type":"VARCHAR(22)","nullable":false,"encoding":"json","description":""},{"name":"method_detail","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"start_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_current","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"discontinuation_reason","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"client_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_demographic_profiles","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_demographic_profiles.ndjson","linked_to_patient_by":["patient_demographic_profiles.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"race_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"race_null_flavor","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"ethnicity_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"ethnicity_null_flavor","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"preferred_language_code","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"preferred_language_null_flavor","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"sex_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"sex_null_flavor","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"sexual_orientation_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"sexual_orientation_null_flavor","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"sexual_orientation_other_text","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"gender_identity_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"gender_identity_null_flavor","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"gender_identity_other_text","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"sex_parameter_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"sex_parameter_comment","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"pronoun_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"pronouns_other_text","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"pronouns_null_flavor","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"name_prefix","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"name_suffix","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"date_of_death","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"tribal_affiliation_code","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"tribal_enrolled","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"occupation_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"occupation_text","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"industry_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"industry_text","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"phone_primary_use","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"phone_secondary_use","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"mirrored_legacy","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_disclosures","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_disclosures.ndjson","linked_to_patient_by":["patient_disclosures.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"disclosed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"recipient_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"recipient_detail","type":"VARCHAR(300)","nullable":true,"encoding":"json","description":""},{"name":"method","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"purpose","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"purpose_note","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"recorded_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"source_ref","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"voided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"void_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_family_history","kind":"patient","category":"Medical, family and social history","description":"","file":"data/patient_family_history.ndjson","linked_to_patient_by":["patient_family_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"relationship","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"relationship_detail","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"icd10_code","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"condition_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"snomed_code","type":"VARCHAR(18)","nullable":true,"encoding":"json","description":""},{"name":"snomed_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"suggested_icd10_code","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"suggested_icd10_confidence","type":"NUMERIC(3, 2)","nullable":true,"encoding":"json","description":""},{"name":"catalog_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"age_of_onset","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"is_deceased","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"age_at_death","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"family_member_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"client_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["suggestion_rejected_hash"],"attachment_columns":[]},{"table":"patient_goals","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/patient_goals.ndjson","linked_to_patient_by":["patient_goals.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"code_system","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"code_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"sdoh_domain","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"lifecycle_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"achievement_status","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"start_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"target_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"expressed_by","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"addresses_concern_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"addresses_problem_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"source_response_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_guardian_visibility_overrides","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_guardian_visibility_overrides.ndjson","linked_to_patient_by":["patient_guardian_visibility_overrides.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"labs","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"medications","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"diagnoses","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"vitals","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"billing","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"questionnaires","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"homework","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"questionnaire_drafts","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"teen_self_questionnaires","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"hidden_appointments","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"revision","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_health_concerns","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/patient_health_concerns.ndjson","linked_to_patient_by":["patient_health_concerns.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"snomed_code","type":"VARCHAR(18)","nullable":true,"encoding":"json","description":""},{"name":"snomed_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"icd10_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"sdoh_domain","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"onset_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"abatement_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"source_response_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_health_status_observations","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/patient_health_status_observations.ndjson","linked_to_patient_by":["patient_health_status_observations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"value_system","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"value_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"value_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"value_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"effective_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_history_ai_changes","kind":"patient","category":"Other patient records","description":"The review ledger: one row per AI-changed history record while it awaits review.","file":"data/patient_history_ai_changes.ndjson","linked_to_patient_by":["patient_history_ai_changes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"section","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"item_kind","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"record_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"change_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"previous_state","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"changed_fields","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"new_state","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"evidence","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"psych_base_revision","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"psych_ai_revision","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"status_before","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"attestation_before","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"review_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"source_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_encounter_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"source_note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_visit_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"changed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_history_category_state","kind":"patient","category":"Medical, family and social history","description":"","file":"data/patient_history_category_state.ndjson","linked_to_patient_by":["patient_history_category_state.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"attestation_status","type":"VARCHAR(15)","nullable":true,"encoding":"json","description":""},{"name":"attested_reported_by","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"attested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revision","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_history_events","kind":"patient","category":"Medical, family and social history","description":"","file":"data/patient_history_events.ndjson","linked_to_patient_by":["patient_history_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(15)","nullable":false,"encoding":"json","description":""},{"name":"record_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"changed_fields","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"actor_type","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_immunizations","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"Patient immunization/vaccination record.","file":"data/patient_immunizations.ndjson","linked_to_patient_by":["patient_immunizations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"administering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ordering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cvx_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"ndc_code","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"vaccine_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"administration_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"administration_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"not_given_reason","type":"VARCHAR(19)","nullable":true,"encoding":"json","description":""},{"name":"not_given_reason_text","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"source_system","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"lot_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"manufacturer","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"expiration_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"site","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"route","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"dose_quantity","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"dose_unit","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"dose_number","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"series_doses_recommended","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"series_complete","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"vis_publication_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"vis_presented_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"funding_source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reaction","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"route_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"site_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"mvx_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"funding_source_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"vfc_eligibility_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"vis_document_type_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"administered_at_location_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"completion_status","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"external_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"registry_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"registry_source_key","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_implantable_devices","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/patient_implantable_devices.ndjson","linked_to_patient_by":["patient_implantable_devices.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"udi_carrier","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"issuing_agency","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"device_identifier","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"lot_number","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"serial_number","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"expiration_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"manufacture_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"distinct_identification_code","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"device_description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"gmdn_pt_name","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"gmdn_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"snomed_code","type":"VARCHAR(18)","nullable":true,"encoding":"json","description":""},{"name":"brand_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"version_model","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"company_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"mri_safety_status","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"labeled_contains_nrl","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"labeled_no_nrl","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"prescription_use","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"over_the_counter","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"gudid_retrieved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"gudid_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"implant_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"status_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"status_changed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status_changed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_legal_representatives","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_legal_representatives.ndjson","linked_to_patient_by":["patient_legal_representatives.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"representative_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"full_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"relationship","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"phone","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"document_on_file","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"document_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"verification_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"verified_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"effective_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"expiration_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"dedupe_key","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_medical_history","kind":"patient","category":"Medical, family and social history","description":"One past medical history condition (the Other History \"Medical\" tab).","file":"data/patient_medical_history.ndjson","linked_to_patient_by":["patient_medical_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"condition_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"icd10_code","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"snomed_code","type":"VARCHAR(18)","nullable":true,"encoding":"json","description":""},{"name":"snomed_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"onset_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"onset_precision","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_medical_history_summary","kind":"patient","category":"Medical, family and social history","description":"One row per patient: the Medical category's state and its notes paragraph.","file":"data/patient_medical_history_summary.ndjson","linked_to_patient_by":["patient_medical_history_summary.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"attestation_status","type":"VARCHAR(15)","nullable":true,"encoding":"json","description":""},{"name":"attested_reported_by","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"attested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"attested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"revision","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"notes_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"notes_origin_channel","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"notes_reported_by","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"notes_entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes_updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"notes_verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notes_verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_membership_agreements","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_membership_agreements.ndjson","linked_to_patient_by":["patient_membership_agreements.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"plan_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subscription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"purpose","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"request_key","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"entry_channel","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"facts","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"facts_sha256","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"rendered_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"rendered_sha256","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"organization_timezone","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"signer_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"signer_role","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"signer_relationship","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"signer_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signer_account_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signer_link_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signature_consent_version","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"signed_ip","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"signed_user_agent","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"applied_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"media_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"pdf_sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"document_outbox_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"copy_outbox_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["claim_token"],"attachment_columns":[]},{"table":"patient_menopause_status","kind":"patient","category":"Gynecologic and obstetric history","description":"One row per patient — staff-recorded menopause status (never portal-visible).","file":"data/patient_menopause_status.ndjson","linked_to_patient_by":["patient_menopause_status.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(18)","nullable":false,"encoding":"json","description":""},{"name":"age_at_menopause","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"on_hrt","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_menstrual_history","kind":"patient","category":"Gynecologic and obstetric history","description":"One row per patient — the current menstrual picture.","file":"data/patient_menstrual_history.ndjson","linked_to_patient_by":["patient_menstrual_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"menarche_age","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"cycle_length_days","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"cycle_length_max_days","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"flow_duration_days","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"flow_intensity","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"cycle_regularity","type":"VARCHAR(9)","nullable":true,"encoding":"json","description":""},{"name":"lmp_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"dysmenorrhea_severity","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"dysmenorrhea_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"abnormal_bleeding_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_name_history","kind":"patient","category":"Patient demographics, insurance and contacts","description":"A previous (or other) name of the patient (USCDI Previous Name).","file":"data/patient_name_history.ndjson","linked_to_patient_by":["patient_name_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"use","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"prefix","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"middle_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"suffix","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"period_start","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"period_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_obstetric_history","kind":"patient","category":"Gynecologic and obstetric history","description":"One row per PAST pregnancy (the current one lives in ``pregnancy_episodes``).","file":"data/patient_obstetric_history.ndjson","linked_to_patient_by":["patient_obstetric_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"pregnancy_year","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"pregnancy_end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"gestational_weeks","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"plurality","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"birth_weight_grams","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"delivery_location","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"complications_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_living","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"living_count","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"client_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_pharmacy_recommendations","kind":"patient","category":"Other patient records","description":"","file":"data/patient_pharmacy_recommendations.ndjson","linked_to_patient_by":["patient_pharmacy_recommendations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"pharmacy_id","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"rank","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"distance_miles","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_photos","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_photos.ndjson","linked_to_patient_by":["patient_photos.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(500)","nullable":false,"encoding":"attachment","description":""},{"name":"byte_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"source_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"crop","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"external_source","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"external_id","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"removed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"removed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key"]},{"table":"patient_preferences","kind":"patient","category":"Other patient records","description":"","file":"data/patient_preferences.ndjson","linked_to_patient_by":["patient_preferences.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"preference_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"preference_value","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_prescription_refill_requests","kind":"patient","category":"Prescriptions","description":"Patient-portal initiated medication refill request.","file":"data/patient_prescription_refill_requests.ndjson","linked_to_patient_by":["patient_prescription_refill_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"medication_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescribing_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"medication_name_snapshot","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"rxcui_snapshot","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"ndc_snapshot","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"dea_schedule_snapshot","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"sig_snapshot","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"quantity_snapshot","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"quantity_unit_snapshot","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"days_supply_snapshot","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"refills_authorized_snapshot","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"refills_remaining_snapshot","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"last_filled_date_snapshot","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"next_fill_due_snapshot","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_name_snapshot","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_ncpdp_snapshot","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"patient_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"patient_reported_remaining_supply","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"patient_confirmed_pharmacy","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"patient_attestation","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"settings_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"eligibility_result","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"block_reason_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"block_reason_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reviewed_by_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"denial_reason_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"denial_reason_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"resulting_prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"triage_owner_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"triage_started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ready_for_provider_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"triage_completed_by_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"triage_checklist","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"patient_facing_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"prescribing_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescribing_started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"request_visit_with_prescription","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"patient_notification_state","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"patient_notified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sla_escalated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"message_isread","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"message_isflagged","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["prescribing_lease_token"],"attachment_columns":[]},{"table":"patient_procedures","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"Patient procedure record.","file":"data/patient_procedures.ndjson","linked_to_patient_by":["patient_procedures.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"performing_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ordering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"primary_code","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"primary_code_system","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"cpt_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"snomed_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"hcpcs_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"icd10_pcs_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"procedure_name","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"body_site","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"laterality","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"procedure_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"date_precision","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"procedure_end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"source_system","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"source_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"indication","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"findings","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"complications","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"result_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"follow_up_needed","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"follow_up_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"modifiers","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"quantity","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"source_claim_line_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"external_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"extra_data","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"suggested_cpt_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"suggested_cpt_confidence","type":"NUMERIC(3, 2)","nullable":true,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"client_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"catalog_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["suggestion_rejected_hash"],"attachment_columns":[]},{"table":"patient_profile_change_requests","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_profile_change_requests.ndjson","linked_to_patient_by":["patient_profile_change_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requested","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"previous","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"decided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"decided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"decision_reason","type":"VARCHAR(300)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_psychiatric_history_versions","kind":"patient","category":"Psychiatric history","description":"","file":"data/patient_psychiatric_history_versions.ndjson","linked_to_patient_by":["patient_psychiatric_history_versions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"revision","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"content","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_record_section_reviews","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patient_record_section_reviews.ndjson","linked_to_patient_by":["patient_record_section_reviews.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"section_key","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"review_kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"voided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_refill_request_activities","kind":"patient","category":"Prescriptions","description":"","file":"data/patient_refill_request_activities.ndjson","linked_to_patient_by":["patient_refill_request_activities.refill_request_id -> patient_prescription_refill_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"refill_request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"activity_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_registration_requests","kind":"patient","category":"Patient demographics, insurance and contacts","description":"PHI-minimized record of a registration transaction.","file":"data/patient_registration_requests.ndjson","linked_to_patient_by":["patient_registration_requests.created_patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"request_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"request_fingerprint","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"result_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_registry_identifiers","kind":"patient","category":"Immunization registry exchange","description":"The registry's own patient ID (PID-3 type ``SR``) for one patient.","file":"data/patient_registry_identifiers.ndjson","linked_to_patient_by":["patient_registry_identifiers.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"registry_settings_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"registry_patient_id","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"environment","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"last_seen_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_restriction_requests","kind":"patient","category":"Patient access and sharing","description":"A patient's (or representative's) request to restrict how part of their record is used or shared ((e)(1)(iii), HIPAA 164.522).","file":"data/patient_restriction_requests.ndjson","linked_to_patient_by":["patient_restriction_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requester_display_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"requester_relationship","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"data_classes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"details","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"restriction_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"recipient_description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"decided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"decided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"decision_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_result_releases","kind":"patient","category":"Other patient records","description":"","file":"data/patient_result_releases.ndjson","linked_to_patient_by":["patient_result_releases.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"held_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"auto_release_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"kept_held_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"kept_held_note","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"kept_held_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kept_held_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"released_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"release_method","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_sensitive_identifiers","kind":"patient","category":"Patient demographics, insurance and contacts","description":"Encrypted, minimized patient identifiers that must not enter ordinary demographics payloads.","file":"data/patient_sensitive_identifiers.ndjson","linked_to_patient_by":["patient_sensitive_identifiers.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"identifier_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"value_encrypted","type":"TEXT","nullable":false,"encoding":"sensitive_identifier","description":""},{"name":"last4","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_shared_health_links","kind":"patient","category":"Patient access and sharing","description":"A link to (or a reference describing where to find) health information about the patient: shared by the patient in the portal or recorded by staff ((e)(3)).","file":"data/patient_shared_health_links.ndjson","linked_to_patient_by":["patient_shared_health_links.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"url","type":"VARCHAR(2048)","nullable":true,"encoding":"json","description":""},{"name":"location_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"shared_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"shared_by_display_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"staff_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"deleted_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_social_history","kind":"patient","category":"Medical, family and social history","description":"","file":"data/patient_social_history.ndjson","linked_to_patient_by":["patient_social_history.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"tobacco_status","type":"VARCHAR(17)","nullable":true,"encoding":"json","description":""},{"name":"tobacco_types","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"cigarette_packs_per_day","type":"NUMERIC(4, 2)","nullable":true,"encoding":"json","description":""},{"name":"cigarette_years_smoked","type":"NUMERIC(4, 1)","nullable":true,"encoding":"json","description":""},{"name":"smoking_quit_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"tobacco_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"alcohol_status","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"alcohol_drinks_per_week","type":"NUMERIC(4, 1)","nullable":true,"encoding":"json","description":""},{"name":"alcohol_binge_days_per_month","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"alcohol_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"drug_use_status","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"drug_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"caffeine_beverages_per_day","type":"NUMERIC(4, 1)","nullable":true,"encoding":"json","description":""},{"name":"caffeine_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"occupation","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"occupation_status","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"living_situation","type":"VARCHAR(13)","nullable":true,"encoding":"json","description":""},{"name":"living_situation_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"marital_status","type":"VARCHAR(9)","nullable":true,"encoding":"json","description":""},{"name":"exercise_days_per_week","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"exercise_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"sexual_history_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"diet_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_social_history_domains","kind":"patient","category":"Medical, family and social history","description":"","file":"data/patient_social_history_domains.ndjson","linked_to_patient_by":["patient_social_history_domains.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"social_history_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"domain","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_subscription_discount_invoices","kind":"patient","category":"Billing, claims and payments","description":"One discounted billing period: a finalized, non-zero membership invoice the discount applied to. Unique per (discount, Stripe invoice), so duplicate and out-of-order webhooks count once. A later void releases the period (`voided_at`) while the row keeps the invoice from recounting.","file":"data/patient_subscription_discount_invoices.ndjson","linked_to_patient_by":["patient_subscription_discount_invoices.discount_id -> patient_subscription_discounts.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"discount_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"stripe_invoice_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"invoice_subtotal","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"discount_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"counted_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_subscription_discounts","kind":"patient","category":"Billing, claims and payments","description":"A time-limited discount on one membership: a plan's introductory offer or a staff discount.","file":"data/patient_subscription_discounts.ndjson","linked_to_patient_by":["patient_subscription_discounts.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subscription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"plan_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"discount_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"value","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"periods_total","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"periods_used","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"stripe_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_coupon_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_discount_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"applied_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"end_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"last_reconciled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reapply_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_subscription_events","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_subscription_events.ndjson","linked_to_patient_by":["patient_subscription_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subscription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"event_source","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"status_snapshot","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"stripe_invoice_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_event_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_subscription_invoices","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_subscription_invoices.ndjson","linked_to_patient_by":["patient_subscription_invoices.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subscription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"stripe_invoice_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"stripe_account_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"stripe_customer_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"amount_due","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"amount_paid","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"amount_remaining","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"period_start","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"period_end","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"due_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"paid_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"attempt_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"hosted_invoice_url","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"invoice_pdf","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"receipt_number","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"billing_reason","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"last_payment_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"raw_stripe_payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"first_payment_failed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_subscription_notice_preferences","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_subscription_notice_preferences.ndjson","linked_to_patient_by":["patient_subscription_notice_preferences.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subscription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"delivery_override","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"include_amount_in_email","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_subscription_notices","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_subscription_notices.ndjson","linked_to_patient_by":["patient_subscription_notices.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subscription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"invoice_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"stripe_account_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"stage","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"first_failure_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"generation","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"outbox_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"communication_log_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"template_revision","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"rendered_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"masked_recipient","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_subscription_refunds","kind":"patient","category":"Billing, claims and payments","description":"Separate from visit payments: returning dues never creates patient credit.","file":"data/patient_subscription_refunds.ndjson","linked_to_patient_by":["patient_subscription_refunds.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subscription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"invoice_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"stripe_account_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"stripe_refund_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_charge_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_payment_intent_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"request_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"provider_status","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"requested_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"accounting_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"confirmed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reconciled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["request_hash"],"attachment_columns":[]},{"table":"patient_subscriptions","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_subscriptions.ndjson","linked_to_patient_by":["patient_subscriptions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"plan_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(18)","nullable":false,"encoding":"json","description":""},{"name":"stripe_subscription_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_customer_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_price_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_subscription_item_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"default_payment_method_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"plan_name_snapshot","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"plan_description_snapshot","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"price_amount_snapshot","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"currency_snapshot","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"interval_unit_snapshot","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"interval_count_snapshot","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"trial_days_snapshot","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"signup_fee_snapshot","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"billing_starts_on_snapshot","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"benefits_start_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"terms_version","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"accepted_terms_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"accepted_terms_ip","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"accepted_terms_user_agent","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"snapshot_source","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"snapshot_needs_review","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"snapshot_backfilled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"current_period_start","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"current_period_end","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancel_at_period_end","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"pause_collection_behavior","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"pause_collection_resumes_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"canceled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"grace_period_ends_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_invoice_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"last_invoice_status","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"last_payment_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"cancellation_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"last_stripe_event_created","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_access_override_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_access_override_feature","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"staff_access_override_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"staff_access_override_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_access_override_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_substance_uses","kind":"patient","category":"Medical, family and social history","description":"","file":"data/patient_substance_uses.ndjson","linked_to_patient_by":["patient_substance_uses.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"substance","type":"VARCHAR(21)","nullable":false,"encoding":"json","description":""},{"name":"substance_other","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"route","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"frequency","type":"VARCHAR(17)","nullable":true,"encoding":"json","description":""},{"name":"years_used","type":"NUMERIC(4, 1)","nullable":true,"encoding":"json","description":""},{"name":"last_use_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"in_recovery","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"origin_channel","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reported_by","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"entered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"client_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"row_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_visit_type_billing_rates","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/patient_visit_type_billing_rates.ndjson","linked_to_patient_by":["patient_visit_type_billing_rates.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"cash_price_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_vitals","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/patient_vitals.ndjson","linked_to_patient_by":["patient_vitals.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"vital_type","type":"VARCHAR(29)","nullable":false,"encoding":"json","description":""},{"name":"value","type":"FLOAT","nullable":false,"encoding":"json","description":""},{"name":"unit","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"measurement_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"systolic","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"diastolic","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"collection_source","type":"VARCHAR(19)","nullable":true,"encoding":"json","description":""},{"name":"device_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"device_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"is_implausible","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patients","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/patients.ndjson","linked_to_patient_by":["patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"mrn","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"preferred_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"pronouns","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"middle_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"date_of_birth","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"sex","type":"VARCHAR(1)","nullable":false,"encoding":"json","description":""},{"name":"gender_identity","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"phone_primary","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"phone_secondary","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"marital_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"address_line1","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"address_line2","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"city","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"zip_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_recommendation_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_recommendation_refreshed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_recommendation_source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_recommendation_error","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"primary_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"emergency_contact_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"emergency_contact_relationship","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"emergency_contact_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"primary_insurance_provider","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"primary_insurance_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"primary_insurance_group","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"primary_insurance_carrier_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"secondary_insurance_provider","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"secondary_insurance_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"bypass_insurance_cash_pay","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"billing_type","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"billing_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"billing_type_assignment_source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"billing_type_assigned_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billing_type_assigned_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"current_photo_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"parent_first_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"parent_middle_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"parent_last_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"parent_date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"parent_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"parent_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"parent_sex","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_relationship","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"guarantor_first_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_last_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_date_of_birth","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"guarantor_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_address_line1","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_address_line2","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_city","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_zip_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_statements_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"guarantor_statements_consent_method","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_statements_consent_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"guarantor_statements_consent_recorded_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"guarantor_statements_consent_recorded_by_name","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"guarantor_statements_consent_recorded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"quest_patient_oid","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(15)","nullable":false,"encoding":"json","description":""},{"name":"portal_status","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"preferred_language","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"referral_source","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"referral_source_detail","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"self_scheduling_blocked","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"race_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"ethnicity_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"mother_maiden_last_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"mother_maiden_first_name","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"county","type":"VARCHAR(60)","nullable":true,"encoding":"json","description":""},{"name":"county_fips","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"multiple_birth_indicator","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"birth_order","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"immunization_registry_opt_out","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"immunization_registry_opt_out_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"immunization_registry_opt_out_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"primary_care_elsewhere","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"pharmacy_preferences","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["pharmacy_recommendation_address_hash","stripe_customer_id"],"attachment_columns":[]},{"table":"payment_arrangements","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/payment_arrangements.ndjson","linked_to_patient_by":["payment_arrangements.account_receivable_id -> account_receivables.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"account_receivable_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"arrangement_type","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"original_balance","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"arranged_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"installment_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"frequency","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"start_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"end_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"approval_required","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"approved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"approval_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"collection_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"autopay_status","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"autopay_stopped_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"autopay_stopped_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"autopay_stop_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"number_of_payments","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"max_installment_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"agreement_version_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"agreement_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"agreement_sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"autopay_authorized_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"autopay_authorized_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"autopay_authorization_reference","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"autopay_card_brand","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"autopay_card_last4","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"collection_day","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"collection_day_installment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_card_surcharge_refunds","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/payment_card_surcharge_refunds.ndjson","linked_to_patient_by":["payment_card_surcharge_refunds.surcharge_id -> payment_card_surcharges.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"surcharge_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"refund_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_card_surcharges","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/payment_card_surcharges.ndjson","linked_to_patient_by":["payment_card_surcharges.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"payment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"principal_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"rate_bps","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"card_funding","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"card_brand","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"card_wallet","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"payment_method_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"disclosed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payment_provider","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"provider_payment_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"provider_charge_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_plan_charges","kind":"patient","category":"Billing, claims and payments","description":"A charge an automatic plan covers (D4). Stored, never inferred.","file":"data/payment_plan_charges.ndjson","linked_to_patient_by":["payment_plan_charges.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"plan_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"amount_at_start","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_plan_installments","kind":"patient","category":"Billing, claims and payments","description":"One scheduled installment of an automatic plan (D6).","file":"data/payment_plan_installments.ndjson","linked_to_patient_by":["payment_plan_installments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"plan_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"installment_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"due_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"scheduled_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"collected_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"status_reason","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"auto_try_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"manual_try_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_try_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"last_attempted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_failure_code","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"last_failure_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"paid_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"finalized_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_plan_notices","kind":"patient","category":"Billing, claims and payments","description":"A required service notice about an automatic plan, with its delivery outcome (D9).","file":"data/payment_plan_notices.ndjson","linked_to_patient_by":["payment_plan_notices.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"plan_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"installment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"dedupe_key","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"recipient_hint","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_provider_disputes","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/payment_provider_disputes.ndjson","linked_to_patient_by":["payment_provider_disputes.payment_id -> payments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"payment_provider","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"provider_dispute_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"provider_payment_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"payment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"provider_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_location_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"evidence_due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"opened_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"provider_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_reminders","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/payment_reminders.ndjson","linked_to_patient_by":["payment_reminders.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"account_receivable_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reminder_type","type":"VARCHAR(19)","nullable":false,"encoding":"json","description":""},{"name":"scheduled_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"sent_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"cadence_day","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"cadence_key","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"delivery_channel","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"template_used","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"response","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_sales_tax_snapshots","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/payment_sales_tax_snapshots.ndjson","linked_to_patient_by":["payment_sales_tax_snapshots.charge_id -> charges.patient_id -> patients.id","payment_sales_tax_snapshots.payment_id -> payments.patient_id -> patients.id","payment_sales_tax_snapshots.sales_tax_event_id -> sales_tax_events.patient_id -> patients.id"],"columns":[{"name":"payment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sales_tax_event_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"captured_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payments","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/payments.ndjson","linked_to_patient_by":["payments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payment_type","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"payment_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"transaction_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"remittance_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"stripe_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_charge_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"payment_provider","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_charge_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_location_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_order_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_status","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"provider_idempotency_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_environment","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"pdmp_check_events","kind":"patient","category":"Prescription drug monitoring checks","description":"Append-only timeline for PDMP checks.","file":"data/pdmp_check_events.ndjson","linked_to_patient_by":["pdmp_check_events.pdmp_check_id -> pdmp_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"pdmp_check_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"metadata_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"pdmp_checks","kind":"patient","category":"Prescription drug monitoring checks","description":"One Bamboo patient request / PDMP check artifact.","file":"data/pdmp_checks.ndjson","linked_to_patient_by":["pdmp_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trigger_source","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"request_fingerprint","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"licensee_request_id","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"bamboo_request_id","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"environment","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"requested_states_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"response_destinations_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"policy_rule_ids_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"policy_decision_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"satisfies_prescription_gate","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"checked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"fresh_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"manual_report_review_required","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"report_viewed_by_clinician_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"report_viewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"narx_scores_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"mandatory_review_json","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"home_pmp_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"report_request_url_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_report_request_id","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"last_error_code","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"last_error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"last_error_source","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["report_request_url_encrypted"],"attachment_columns":[]},{"table":"persistent_dot_phrase_values","kind":"patient","category":"Other patient records","description":"","file":"data/persistent_dot_phrase_values.ndjson","linked_to_patient_by":["persistent_dot_phrase_values.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"definition_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"value_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"value_content","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"pharmacy_coverages","kind":"patient","category":"Other patient records","description":"","file":"data/pharmacy_coverages.ndjson","linked_to_patient_by":["pharmacy_coverages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"check_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"rank","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"coverage_level","type":"VARCHAR(3)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"pbm_name","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"pbm_participant_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"plan_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"insurance_type_code","type":"VARCHAR(3)","nullable":true,"encoding":"json","description":""},{"name":"plan_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"group_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"group_name","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"iin","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"pcn","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"pbm_member_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"cardholder_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"person_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"relationship_code","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"formulary_status_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"coverage_list_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"copay_list_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"alternatives_list_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"v60_file_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"benefit_types","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"contracted_providers","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"coverage_start","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"coverage_end","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"oop_amount","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"returned_demographics","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"demographics_changed","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"pharmacy_eligibility_checks","kind":"patient","category":"Other patient records","description":"","file":"data/pharmacy_eligibility_checks.ndjson","linked_to_patient_by":["pharmacy_eligibility_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescriber_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trigger","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"interaction","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prior_authorization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"central_day","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"request_isa13","type":"VARCHAR(9)","nullable":true,"encoding":"json","description":""},{"name":"request_bht03","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"response_isa13","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"received_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reuse_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"response_kind","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"rejections","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"hint","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"any_demographics_changed","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"selected_coverage_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"selected_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"selected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"transport_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["request_demographics_hash"],"attachment_columns":[]},{"table":"pharmacy_history_consents","kind":"patient","category":"Other patient records","description":"","file":"data/pharmacy_history_consents.ndjson","linked_to_patient_by":["pharmacy_history_consents.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"consent_code","type":"VARCHAR(1)","nullable":false,"encoding":"json","description":""},{"name":"recorded_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recorded_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"withdrawn_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"withdrawn_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"pharmacy_prior_authorization_attachments","kind":"patient","category":"Other patient records","description":"","file":"data/pharmacy_prior_authorization_attachments.ndjson","linked_to_patient_by":["pharmacy_prior_authorization_attachments.case_id -> pharmacy_prior_authorizations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"case_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"file_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"mime_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"size_bytes","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"storage_key","type":"VARCHAR(512)","nullable":false,"encoding":"attachment","description":""},{"name":"question_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["storage_key"]},{"table":"pharmacy_prior_authorizations","kind":"patient","category":"Other patient records","description":"","file":"data/pharmacy_prior_authorizations.ndjson","linked_to_patient_by":["pharmacy_prior_authorizations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescriber_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"medication","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"pa_reference_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"pa_case_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"question_set","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"answers","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"decision","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"deadline_for_reply","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"transport_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"eligibility_check_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"coverage_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"processor_id","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"processor_qualifier","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"appeal_case_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"priority","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"contact_phone","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"expiration_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"is_eappeal_supported","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"origin","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"rxchange_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"relates_to_rtpb_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"trigger_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"benefits_coordination","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"provider_contact","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"expiring_pa_case_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"renewal_of_case_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"question_rounds","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_notified_status","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"inbox_attention_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"inbox_is_read","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"inbox_is_flagged","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"phone_call_inbox","kind":"patient","category":"Phone calls and voicemail","description":"","file":"data/phone_call_inbox.ndjson","linked_to_patient_by":["phone_call_inbox.phone_call_id -> phone_calls.patient_id -> patients.id"],"columns":[{"name":"phone_call_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"seq","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"telnyx_event_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"actor_principal","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"request_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"engine_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"timer_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"defer_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"retry_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"occurred_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"processed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["payload_hash"],"attachment_columns":[]},{"table":"phone_call_notes","kind":"patient","category":"Phone calls and voicemail","description":"Transcript and AI summary of one recorded staff call.","file":"data/phone_call_notes.ndjson","linked_to_patient_by":["phone_call_notes.phone_call_id -> phone_calls.patient_id -> patients.id","phone_call_notes.recording_asset_id -> phone_recording_assets.patient_id -> patients.id"],"columns":[{"name":"phone_call_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recording_asset_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"transcript","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"follow_ups","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"failure_stage","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"error","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"skip_reason","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"lease_owner","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"lease_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"transcription_engine","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"transcribed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"model_key","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"used_deployment","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"phone_call_queue_entries","kind":"patient","category":"Phone calls and voicemail","description":"One caller's stay in a call queue: history and today's counts only.","file":"data/phone_call_queue_entries.ndjson","linked_to_patient_by":["phone_call_queue_entries.phone_call_id -> phone_calls.patient_id -> patients.id"],"columns":[{"name":"group_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"phone_call_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"entered_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"answered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"wait_sec","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"phone_call_transcript_meta","kind":"patient","category":"Phone calls and voicemail","description":"","file":"data/phone_call_transcript_meta.ndjson","linked_to_patient_by":["phone_call_transcript_meta.phone_call_id -> phone_calls.patient_id -> patients.id"],"columns":[{"name":"phone_call_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"last_display_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"complete","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"search_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"search_tsv","type":"TSVECTOR","nullable":true,"encoding":"json","description":""},{"name":"redaction_level","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"retention_class","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"phone_call_turns","kind":"patient","category":"Phone calls and voicemail","description":"","file":"data/phone_call_turns.ndjson","linked_to_patient_by":["phone_call_turns.phone_call_id -> phone_calls.patient_id -> patients.id"],"columns":[{"name":"phone_call_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"realtime_session_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"provider_item_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"display_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"role","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"tool_name","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"tool_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"phone_calls","kind":"patient","category":"Phone calls and voicemail","description":"","file":"data/phone_calls.ndjson","linked_to_patient_by":["phone_calls.patient_id -> patients.id"],"columns":[{"name":"phone_number_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"telnyx_session_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"from_e164","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"to_e164","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"anchor_answered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"first_handled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"state_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"state_data","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"routing_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"disposition","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"end_context","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"handled_by","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"answered_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ai_engaged","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"transfer_outcome","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"failover_routed","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"ownership_epoch","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"recording_asset_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"voicemail_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"hangup_cause","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"total_duration_sec","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"talk_duration_sec","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"ai_duration_sec","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"phone_recording_assets","kind":"patient","category":"Phone calls and voicemail","description":"","file":"data/phone_recording_assets.ndjson","linked_to_patient_by":["phone_recording_assets.patient_id -> patients.id"],"columns":[{"name":"kind","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"purpose_ref","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(1024)","nullable":true,"encoding":"attachment","description":""},{"name":"telnyx_recording_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"phone_call_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"leg_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"duration_sec","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"retention_class","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key"]},{"table":"phone_voicemails","kind":"patient","category":"Phone calls and voicemail","description":"","file":"data/phone_voicemails.ndjson","linked_to_patient_by":["phone_voicemails.phone_call_id -> phone_calls.patient_id -> patients.id","phone_voicemails.recording_asset_id -> phone_recording_assets.patient_id -> patients.id"],"columns":[{"name":"box_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"phone_call_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recording_asset_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"transcription","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"duration_sec","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"step_attempts","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"lease_owner","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"lease_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"physician_patient_notes","kind":"patient","category":"Other patient records","description":"","file":"data/physician_patient_notes.ndjson","linked_to_patient_by":["physician_patient_notes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"author_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"content","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"visibility","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"position_x","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"position_y","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"shared_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"shared_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"pregnancy_episodes","kind":"patient","category":"Pregnancy care","description":"A single pregnancy for a patient, at most one `active` per patient.","file":"data/pregnancy_episodes.ndjson","linked_to_patient_by":["pregnancy_episodes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"lmp_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"edd_by_lmp","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"edd_by_ultrasound","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"edd_method","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"edd_final","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"gravida","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"para_term","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"para_preterm","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"abortions","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"living","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"blood_type","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"outcome_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"delivery_method","type":"VARCHAR(17)","nullable":true,"encoding":"json","description":""},{"name":"dating_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"outcome_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"prenatal_flowsheet_entries","kind":"patient","category":"Pregnancy care","description":"One prenatal visit's OB observations, keyed to a single encounter.","file":"data/prenatal_flowsheet_entries.ndjson","linked_to_patient_by":["prenatal_flowsheet_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"pregnancy_episode_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"fundal_height_cm","type":"NUMERIC(4, 1)","nullable":true,"encoding":"json","description":""},{"name":"fetal_heart_rate","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"fht_method","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"urine_protein","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"urine_glucose","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"edema","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"presentation","type":"VARCHAR(12)","nullable":true,"encoding":"json","description":""},{"name":"note","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"collected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"entered_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"preregistrations","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/preregistrations.ndjson","linked_to_patient_by":["preregistrations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"phone_number","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"desired_appointment_time","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"display_quote_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"hold_expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"referral_source","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"referral_source_detail","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"verification_code","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"sms_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sms_attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"email_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"account_mode","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"teen_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"parent_guardian_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"locked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"completion_method","type":"VARCHAR(6)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["deeplink_token","display_quote_hash"],"attachment_columns":[]},{"table":"prescription_benefit_checks","kind":"patient","category":"Other patient records","description":"","file":"data/prescription_benefit_checks.ndjson","linked_to_patient_by":["prescription_benefit_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"cache_key","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"request","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"result","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"transport_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"eligibility_check_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"coverage_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"response_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"business_error","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"prescription_messages","kind":"patient","category":"Prescriptions","description":"","file":"data/prescription_messages.ndjson","linked_to_patient_by":["prescription_messages.prescription_id -> prescriptions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"message_type","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"message_id","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"relates_to_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"from_qualifier","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"from_value","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"to_qualifier","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"to_value","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"sent_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"raw_request","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"raw_response","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"parsed_request","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"parsed_response","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"is_outbound","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_successful","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"VARCHAR(10000)","nullable":true,"encoding":"json","description":""},{"name":"timestamp","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"response_timestamp","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"archive_status","type":"VARCHAR(14)","nullable":false,"encoding":"json","description":""},{"name":"s3_archive_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"archived_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_job_id","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"retrieval_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retrieval_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_archive_key"]},{"table":"prescription_pdmp_checks","kind":"patient","category":"Prescription drug monitoring checks","description":"Join table connecting prescriptions to PDMP checks or waivers.","file":"data/prescription_pdmp_checks.ndjson","linked_to_patient_by":["prescription_pdmp_checks.prescription_id -> prescriptions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"pdmp_check_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requirement_status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"waiver_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"prescription_signature_requests","kind":"patient","category":"Prescriptions","description":"","file":"data/prescription_signature_requests.ndjson","linked_to_patient_by":["prescription_signature_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"requested_by_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"signer_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"requester_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"routed_snapshot","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"signer_changes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"decision_reason_code","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"decision_reason_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"decided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"decided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"message_isread","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"message_isflagged","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"requester_acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"prescriptions","kind":"patient","category":"Prescriptions","description":"","file":"data/prescriptions.ndjson","linked_to_patient_by":["prescriptions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"prescriber_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_id","type":"VARCHAR","nullable":true,"encoding":"json","description":""},{"name":"medication_kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"compound_formula_version_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"compound_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"compound_directions_reviewed","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"signature_payload_version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"inbound_compound","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"ndc_product_code","type":"VARCHAR","nullable":true,"encoding":"json","description":""},{"name":"ndc_package_code","type":"VARCHAR","nullable":true,"encoding":"json","description":""},{"name":"rxcui","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"drug_description","type":"VARCHAR(1000)","nullable":false,"encoding":"json","description":""},{"name":"dea_schedule","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"sig","type":"VARCHAR(1000)","nullable":false,"encoding":"json","description":""},{"name":"quantity","type":"FLOAT","nullable":false,"encoding":"json","description":""},{"name":"quantity_unit","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"quantity_code_qualifier","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"quantity_unit_of_measure_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"days_supply","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"refills_authorized","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"refills_remaining","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"prescription_mode","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"dosage_value","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"dosage_unit","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"dose_form","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"route","type":"VARCHAR(13)","nullable":true,"encoding":"json","description":""},{"name":"route_description","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"frequency","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"frequency_description","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"doses_per_day","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"specific_times","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"is_prn","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"prn_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"max_doses_per_day","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"action","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"with_food","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"with_water","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"special_instructions","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"duration_value","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"duration_unit","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"application_site","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"dispense_as_written","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"substitutions_allowed","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"substitution_code","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"rx_fill_indicator","type":"VARCHAR(33)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_checked_rems","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(21)","nullable":false,"encoding":"json","description":""},{"name":"is_immutable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"made_immutable_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"made_immutable_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prescriber_agent_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"authorization_basis","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"cosigned_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cosigned_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_by_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"epcs_verification_required","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"epcs_verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"epcs_verified_by_passkey_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"epcs_device_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_dea_number","type":"VARCHAR(9)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_dea_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_dea_selection_reason","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_service_address_line_1","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_service_address_line_2","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_service_address_city","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_service_address_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_service_address_zip","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"previous_prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"superseded_by_prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"replaced_by_prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"replaces_prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"medication_intent","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"intent_target_medication_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"written_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"effective_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"expiration_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"transmission_method","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"transmission_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_status_update","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"message_isread","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"message_isflagged","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"refill_request_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"refill_response_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"refill_request_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"change_request_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"change_response_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"change_request_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"cancel_request_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancel_response_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancel_request_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"request_type","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"current_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"cancel_rx_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"related_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"prescriber_order_number","type":"VARCHAR(35)","nullable":true,"encoding":"json","description":""},{"name":"message_request_code","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"surescripts_status","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"surescripts_error","type":"VARCHAR(10000)","nullable":true,"encoding":"json","description":""},{"name":"response_dispatch","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"sent_time","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"notes_to_pharmacy","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"ai_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"last_filled_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"next_fill_due","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"total_fills_completed","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"fill_status_type","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":"Dispensed, PartiallyDispensed, Transferred, NotDispensed"},{"name":"fill_status_note","type":"TEXT","nullable":true,"encoding":"json","description":"Pharmacy notes about fill status"},{"name":"fill_status_reason_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":"Reason code for partial/not dispensed"},{"name":"quantity_dispensed","type":"FLOAT","nullable":true,"encoding":"json","description":"Actual quantity dispensed (may differ from prescribed)"},{"name":"dispensed_ndc","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":"Actual NDC dispensed (for substitutions)"},{"name":"dispensed_drug_description","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":"What was actually dispensed"},{"name":"transferred_to_pharmacy_ncpdp","type":"VARCHAR(7)","nullable":true,"encoding":"json","description":"If transferred, which pharmacy NCPDP"},{"name":"fill_status_received_at","type":"DATETIME","nullable":true,"encoding":"json","description":"When we received the fill status message"},{"name":"pharmacy_reference_number","type":"VARCHAR(35)","nullable":true,"encoding":"json","description":"RxReferenceNumber from pharmacy"},{"name":"pharmacy_coverage_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_eligibility_check_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"benefit_response_message_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["compound_composition_hash","compound_reviewed_hash","digital_signature_hash"],"attachment_columns":[]},{"table":"prior_auth_letter_reviews","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/prior_auth_letter_reviews.ndjson","linked_to_patient_by":["prior_auth_letter_reviews.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"media_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"read_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"read_attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"read_claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"read_not_before","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"extraction_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"prior_authorization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"origin","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"problem_list","kind":"patient","category":"Clinical record: visits, notes, problems, medications, allergies, vitals, documents","description":"","file":"data/problem_list.ndjson","linked_to_patient_by":["problem_list.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"icd10_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"snomed_code","type":"VARCHAR(18)","nullable":true,"encoding":"json","description":""},{"name":"snomed_display","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"severity","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"onset_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"resolution_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_assessed_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_chronic","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"assessing_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assessment_notes","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"ai_change_type","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"ai_review_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"ai_previous_state","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"ai_changed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ai_source_encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ai_reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ai_reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"problem_list_encounters","kind":"patient","category":"Other patient records","description":"","file":"data/problem_list_encounters.ndjson","linked_to_patient_by":["problem_list_encounters.encounter_id -> encounters.patient_id -> patients.id","problem_list_encounters.problem_id -> problem_list.patient_id -> patients.id"],"columns":[{"name":"problem_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"provider_running_behind_statuses","kind":"patient","category":"Appointments and scheduling","description":"One \"running behind\" estimate a provider sent.","file":"data/provider_running_behind_statuses.ndjson","linked_to_patient_by":["provider_running_behind_statuses.trigger_visit_id -> scheduled_visits.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"set_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"minutes_behind","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"trigger_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"notify_patients","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"patient_notices_queued","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"cleared_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cleared_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"clear_reason","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"public_health_case_reports","kind":"patient","category":"Public health reporting (syndromic surveillance and case reports)","description":"","file":"data/public_health_case_reports.ndjson","linked_to_patient_by":["public_health_case_reports.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"connection_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"set_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"triggers","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"last_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_document_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"rr_document_id","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"rr_received_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"rr_processing_status","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"rr_determination","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"rr_conditions","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"rr_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"first_detected_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["reported_trigger_hash","trigger_hash"],"attachment_columns":[]},{"table":"public_health_messages","kind":"patient","category":"Public health reporting (syndromic surveillance and case reports)","description":"","file":"data/public_health_messages.ndjson","linked_to_patient_by":["public_health_messages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sequence","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"connection_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"case_report_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"trigger_event","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"message_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"message_control_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"environment","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"is_test","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"attempt_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"next_attempt_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"payload","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"response_payload","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"ack_code","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"error_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"payload_purged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["content_hash","lease_token"],"attachment_columns":[]},{"table":"quality_code_dismissals","kind":"patient","category":"Care programs","description":"","file":"data/quality_code_dismissals.ndjson","linked_to_patient_by":["quality_code_dismissals.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"dismissed_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"dismissed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"quality_patients","kind":"patient","category":"Quality reporting data (quality measure inputs, incl. imported quality files)","description":"","file":"data/quality_patients.ndjson","linked_to_patient_by":["quality_patients.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"given_names","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"family_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"birth_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"sex_code","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"race_codes","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"ethnicity_codes","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"payer_codes","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"medicare_beneficiary_identifier","type":"VARCHAR(11)","nullable":true,"encoding":"json","description":""},{"name":"identity_key","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"qdm","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"providers","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"document_ids","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"identifiers","type":"ARRAY","nullable":false,"encoding":"json","description":""},{"name":"review_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"possible_duplicate_of","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_import_batch_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"chart_extracted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"questionnaire_assignment_rules","kind":"patient","category":"Questionnaires and screenings","description":"","file":"data/questionnaire_assignment_rules.ndjson","linked_to_patient_by":["questionnaire_assignment_rules.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"slug","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"owner_scope","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"owner_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"priority","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"active_start","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"active_end","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"trigger_contexts","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"conditions","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"action","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"questionnaire_assignments","kind":"patient","category":"Questionnaires and screenings","description":"","file":"data/questionnaire_assignments.ndjson","linked_to_patient_by":["questionnaire_assignments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"questionnaire_definition_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_rule_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"campaign_run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assignment_idempotency_key","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"assignment_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"assignment_source","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(11)","nullable":false,"encoding":"json","description":""},{"name":"assigned_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"opens_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"skipped_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"questionnaire_recurring_enrollments","kind":"patient","category":"Questionnaires and screenings","description":"","file":"data/questionnaire_recurring_enrollments.ndjson","linked_to_patient_by":["questionnaire_recurring_enrollments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"questionnaire_definition_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"cadence_days","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"last_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"questionnaire_responses","kind":"patient","category":"Questionnaires and screenings","description":"","file":"data/questionnaire_responses.ndjson","linked_to_patient_by":["questionnaire_responses.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assignment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"questionnaire_definition_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"responses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"total_score","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"score_interpretation","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"score_details","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"photo_analysis","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"completed_by","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"medical_note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"radiology_images","kind":"patient","category":"Imaging","description":"","file":"data/radiology_images.ndjson","linked_to_patient_by":["radiology_images.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"ordering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ordering_provider_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"modality","type":"VARCHAR(11)","nullable":false,"encoding":"json","description":""},{"name":"body_part","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"contrast","type":"VARCHAR(3)","nullable":true,"encoding":"json","description":""},{"name":"laterality","type":"VARCHAR(3)","nullable":true,"encoding":"json","description":""},{"name":"accession_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"imaging_vendor","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"study_instance_uid","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"series_instance_uid","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"image_instance_uid","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"urgency","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"cpt_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"external_order_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"image_url","type":"VARCHAR(1000)","nullable":false,"encoding":"json","description":""},{"name":"thumbnail_url","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"file_format","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"resolution","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"reason_for_study","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"clinical_notes","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"report_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"findings_summary","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"abnormal_flag","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"critical_flag","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"radiologist_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"order_date","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"image_acquired_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"report_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"vendor_metadata","type":"JSON","nullable":true,"encoding":"json","description":""},{"name":"external_system_id","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"results_delivery_method","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"referrals","kind":"patient","category":"Referrals","description":"","file":"data/referrals.ndjson","linked_to_patient_by":["referrals.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"referring_physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"referred_to_npi","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_first_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_last_name","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_credentials","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_specialty","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"referred_to_taxonomy_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_fax","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_address_line1","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_address_line2","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_city","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_postal_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"referred_to_provider_data","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"clinical_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"urgency","type":"VARCHAR(7)","nullable":false,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"include_in_patient_instructions","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"patient_instructions_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"packet_includes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"referral_form","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"referral_pdf_s3_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"referral_pdf_generated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"transmission_method","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(21)","nullable":false,"encoding":"json","description":""},{"name":"status_updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status_updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"appointment_scheduled_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"appointment_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"patient_seen_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"specialist_report_received","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"specialist_report_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"specialist_recommendations","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"valid_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"requires_authorization","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"authorization_number","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"authorization_obtained","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"authorization_obtained_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"authorization_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"authorization_requested_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"authorization_decided_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"authorization_expires_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"queued_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"send_reserved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"send_reserved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_notice_queued_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"cancellation_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_immutable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"made_immutable_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"made_immutable_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"message_isread","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"message_isflagged","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["send_reservation_token"],"attachment_columns":["referral_pdf_s3_key"]},{"table":"referring_provider_communications","kind":"patient","category":"Care team and outside providers","description":"","file":"data/referring_provider_communications.ndjson","linked_to_patient_by":["referring_provider_communications.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"referring_provider_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"inbound_referral_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"care_team_role","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"purpose","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"summary","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"attachments","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"destination","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"call_outcome","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"override_reason","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"communication_log_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"phone_call_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"idempotency_key","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"actor_type","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"delivered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"failed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"failed_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"referring_provider_messages","kind":"patient","category":"Care team and outside providers","description":"One message in the practice ↔ outside-provider thread about a patient.","file":"data/referring_provider_messages.ndjson","linked_to_patient_by":["referring_provider_messages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"referring_provider_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"inbound_referral_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"attachments","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"author_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sent_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"provider_read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"staff_read_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"refill_center_items","kind":"patient","category":"Other patient records","description":"","file":"data/refill_center_items.ndjson","linked_to_patient_by":["refill_center_items.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"medication_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status_changed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"proposal","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"assigned_prescriber_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_role","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"pend_note","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"decline_reason","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"decided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"pender_acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"prescription_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"note_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"staged_message","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"epcs_batch_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"epcs_session_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"finalize_stage","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"finalize_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"snooze_until","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"snooze_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"not_refilling_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"signoff_due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signoff_overdue_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_off_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"signed_off_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"protocol_checklist","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"protocol_authorization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_refill_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"previous_cancel_state","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"previous_cancel","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"client_request_id","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"refill_center_patient_notes","kind":"patient","category":"Other patient records","description":"","file":"data/refill_center_patient_notes.ndjson","linked_to_patient_by":["refill_center_patient_notes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"author_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"client_request_id","type":"VARCHAR(128)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"deleted_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"refill_center_safety_checks","kind":"patient","category":"Other patient records","description":"","file":"data/refill_center_safety_checks.ndjson","linked_to_patient_by":["refill_center_safety_checks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"requested_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"medication_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"input_fingerprints","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"context_fingerprint","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"safety_config_key","type":"VARCHAR(128)","nullable":false,"encoding":"json","description":""},{"name":"ai_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"results","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"refunds","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/refunds.ndjson","linked_to_patient_by":["refunds.payment_id -> payments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"payment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"refund_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"stripe_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_refund_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"payment_provider","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"provider_refund_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_payment_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_account_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_location_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_refund_status","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"provider_environment","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"provider_idempotency_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"provider_failure_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"registration_insurance_capture_sessions","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/registration_insurance_capture_sessions.ndjson","linked_to_patient_by":["registration_insurance_capture_sessions.promoted_capture_session_id -> insurance_card_capture_sessions.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_first_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"extracted_fields","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"extraction_model","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"error","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"consumed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"promoted_capture_session_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["firebase_uid","token"],"attachment_columns":[]},{"table":"remote_monitoring_alerts","kind":"patient","category":"Remote patient monitoring","description":"","file":"data/remote_monitoring_alerts.ndjson","linked_to_patient_by":["remote_monitoring_alerts.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"vital_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"alert_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"severity","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"message","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"reading_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"acknowledged_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolved_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"resolution_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"remote_monitoring_billing_events","kind":"patient","category":"Remote patient monitoring","description":"","file":"data/remote_monitoring_billing_events.ndjson","linked_to_patient_by":["remote_monitoring_billing_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"billing_month","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"period_start","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"period_end","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"date_of_service","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"units","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"billing_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"transmission_days","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"total_minutes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"interactive_communication","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"skip_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"error_message","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"claim_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"modifiers","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"generated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"generated_by","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reopened_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reopened_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reopen_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"remote_monitoring_enrollments","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/remote_monitoring_enrollments.ndjson","linked_to_patient_by":["remote_monitoring_enrollments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program_type","type":"VARCHAR(23)","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"adherence_status","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""},{"name":"enrolled_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"activated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"initial_setup_completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_data_transmission_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_communication_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_alert_generated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"readings_reviewed_through_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"readings_reviewed_through_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_clinician_touch_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_escalation_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_risk_assessed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_billing_reviewed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"assigned_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"care_coordinator_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_reviewed_by_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"device_name","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"device_identifier","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"device_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"rolling_period_start","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"rolling_period_end","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"required_transmission_days","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"transmission_days_in_period","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"requires_contact","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"urgent_alert_pending","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"billing_cycle_start","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billing_cycle_end","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"billing_last_submitted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"VARCHAR(2000)","nullable":true,"encoding":"json","description":""},{"name":"consent_pending","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"needs_reconsent","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"consent_obtained_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"consent_method","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"consent_documented_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"consent_signature_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"consent_signature_blob","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"consent_text_version","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"consent_captured_from","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"consent_pdf_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"consent_pdf_generated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"agreement_template_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"agreement_assignment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"agreement_signed_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"alert_thresholds","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"reminders_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"last_reminder_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"setup_billed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"status_reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"discharged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"time_minutes_current_month","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"latest_reading","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"open_alert_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"period_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"plan_of_care_certified_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"plan_of_care_certified_through","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"plan_of_care_certified_by_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"plan_of_care_media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"remote_monitoring_status_intervals","kind":"patient","category":"Remote patient monitoring","description":"","file":"data/remote_monitoring_status_intervals.ndjson","linked_to_patient_by":["remote_monitoring_status_intervals.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"remote_monitoring_therapy_logs","kind":"patient","category":"Remote patient monitoring","description":"","file":"data/remote_monitoring_therapy_logs.ndjson","linked_to_patient_by":["remote_monitoring_therapy_logs.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"value","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"unit","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"occurred_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"vendor_event_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"remote_monitoring_time_entries","kind":"patient","category":"Remote patient monitoring","description":"","file":"data/remote_monitoring_time_entries.ndjson","linked_to_patient_by":["remote_monitoring_time_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"activity_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"minutes","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"interactive_communication","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"occurred_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"service_month","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"billing_event_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"reputation_review_click_throughs","kind":"patient","category":"Other patient records","description":"One row per survey response per review link the patient opened (Practice Health's \"sent to a review site\"). ``record_review_click`` upserts it next to the raw ``review_clicks`` list, so double taps and retries bump ``click_count`` instead of counting the patient twice.","file":"data/reputation_review_click_throughs.ndjson","linked_to_patient_by":["reputation_review_click_throughs.invite_id -> reputation_survey_invites.patient_id -> patients.id","reputation_review_click_throughs.response_id -> reputation_survey_responses.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"response_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"invite_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"target_key","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"target_label","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"target_url","type":"VARCHAR(2048)","nullable":true,"encoding":"json","description":""},{"name":"site_key","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"target_scope","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"first_clicked_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"last_clicked_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"click_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"reschedule_requests","kind":"patient","category":"Appointments and scheduling","description":"A released appointment the patient is asked to re-book themselves.","file":"data/reschedule_requests.ndjson","linked_to_patient_by":["reschedule_requests.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"original_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"visit_type","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"duration_minutes","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"original_scheduled_datetime","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"fulfilled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reason_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"batch_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"expires_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"fulfilled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"result_forwards","kind":"patient","category":"Other patient records","description":"","file":"data/result_forwards.ndjson","linked_to_patient_by":["result_forwards.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"result_inbox_entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"forwarded_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recipient_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"note","type":"VARCHAR(2000)","nullable":true,"encoding":"json","description":""},{"name":"in_reply_to_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"todo_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"result_nurse_reviews","kind":"patient","category":"Other patient records","description":"","file":"data/result_nurse_reviews.ndjson","linked_to_patient_by":["result_nurse_reviews.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"reviewed_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"reviewed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"note","type":"VARCHAR(1000)","nullable":true,"encoding":"json","description":""},{"name":"result_completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"result_version","type":"VARCHAR(300)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"rpm_device_assignments","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/rpm_device_assignments.ndjson","linked_to_patient_by":["rpm_device_assignments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"device_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"rpm_enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"effective_from","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"effective_to","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"rpm_devices","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/rpm_devices.ndjson","linked_to_patient_by":["rpm_devices.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rpm_enrollment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"vendor","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"vendor_device_id","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"hardware_uuid","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"device_type","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"device_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"sensor_code","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"shipping_status","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"ordered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"shipped_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"delivered_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"connected_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"unlinked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_reading_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"raw","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"rpm_vendor_events","kind":"patient","category":"Care programs and remote monitoring","description":"","file":"data/rpm_vendor_events.ndjson","linked_to_patient_by":["rpm_vendor_events.assignment_id -> rpm_device_assignments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"vendor","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"dedupe_key","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"received_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"processed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"assignment_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"vital_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"running_behind_patient_notices","kind":"patient","category":"Appointments and scheduling","description":"One patient notice per visit per organization-local day (the atomic dedupe).","file":"data/running_behind_patient_notices.ndjson","linked_to_patient_by":["running_behind_patient_notices.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"local_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"outbox_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"running_behind_prompt_responses","kind":"patient","category":"Appointments and scheduling","description":"The provider answered the automatic prompt for this visit (first answer wins).","file":"data/running_behind_prompt_responses.ndjson","linked_to_patient_by":["running_behind_prompt_responses.scheduled_visit_id -> scheduled_visits.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"response","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"status_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"sales_tax_events","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/sales_tax_events.ndjson","linked_to_patient_by":["sales_tax_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sequence","type":"BIGINT","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"cause","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"rate_percent","type":"NUMERIC(7, 4)","nullable":false,"encoding":"json","description":""},{"name":"taxable_delta","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"tax_delta","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"taxable_after","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"tax_after","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"occurred_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"accounting_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"accounting_timezone","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_action_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"scheduled_messages","kind":"patient","category":"Other patient records","description":"A user-authored message queued for delivery at a future instant.","file":"data/scheduled_messages.ndjson","linked_to_patient_by":["scheduled_messages.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"conversation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"subject_preview","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"body_preview","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"send_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR","nullable":false,"encoding":"json","description":""},{"name":"claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"failure_kind","type":"VARCHAR","nullable":true,"encoding":"json","description":""},{"name":"attempts","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"sent_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"scheduled_orders","kind":"patient","category":"Other patient records","description":"Release queue: one row per pending future release of one order item.","file":"data/scheduled_orders.ndjson","linked_to_patient_by":["scheduled_orders.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"provider_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"order_set_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"order_set_item_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"order_set_name","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"pregnancy_episode_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"ga_week_min","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"ga_week_max","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"ga_milestone_key","type":"VARCHAR(60)","nullable":true,"encoding":"json","description":""},{"name":"item_type","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"diagnoses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"scheduled_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"released_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"released_order_type","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"released_order_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"failure_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_standing","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"interval_value","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"interval_unit","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"occurrences_remaining","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"series_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"scheduled_visit_billing_snapshots","kind":"patient","category":"Billing, claims and payments","description":"","file":"data/scheduled_visit_billing_snapshots.ndjson","linked_to_patient_by":["scheduled_visit_billing_snapshots.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"visit_type_billing_rule_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"patient_visit_type_billing_rate_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"visit_type_billing_rule_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"practice_payment_model","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"resolved_billing_path","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"cash_price_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"display_price_label","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"collection_policy","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"before_visit_hours","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"deposit_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"deposit_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"deposit_percent_bps","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"required_amount_at_booking","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"required_amount_before_visit","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"amount_due_at_checkin","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"amount_due_after_visit","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"balance_amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"refund_policy_scope","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"cancellation_grace_minutes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"cancellation_timing_mode","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"cancellation_deadline_days_before","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"cancellation_deadline_local_time","type":"VARCHAR(5)","nullable":true,"encoding":"json","description":""},{"name":"cancellation_deadline_timezone","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"cancellation_fee_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"cancellation_fee_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"cancellation_fee_percent_bps","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"no_show_fee_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"no_show_fee_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"no_show_fee_percent_bps","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"accepted_quote_version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"quote_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["accepted_quote_hash"],"attachment_columns":[]},{"table":"scheduled_visit_eligibility_overrides","kind":"patient","category":"Billing, claims and payments","description":"Staff booked or kept a visit despite a blocking eligibility result.","file":"data/scheduled_visit_eligibility_overrides.ndjson","linked_to_patient_by":["scheduled_visit_eligibility_overrides.scheduled_visit_id -> scheduled_visits.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"episode_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"scheduled_visit_events","kind":"patient","category":"Appointments and scheduling","description":"","file":"data/scheduled_visit_events.ndjson","linked_to_patient_by":["scheduled_visit_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"occurred_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"actor_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"actor_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"channel","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"reason_code","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"previous_scheduled_datetime","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"new_scheduled_datetime","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"previous_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"new_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"previous_location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"new_location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"previous_duration_minutes","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"new_duration_minutes","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"related_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"reschedule_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"followup_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"dedupe_key","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"details","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"scheduled_visit_intake_deadlines","kind":"patient","category":"Appointments and scheduling","description":"","file":"data/scheduled_visit_intake_deadlines.ndjson","linked_to_patient_by":["scheduled_visit_intake_deadlines.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"booked_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"deadline_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"hours","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"outcome_reason","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"resolved_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"kept_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"kept_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"scheduled_visit_prep_notes","kind":"patient","category":"Patient demographics, insurance and contacts","description":"","file":"data/scheduled_visit_prep_notes.ndjson","linked_to_patient_by":["scheduled_visit_prep_notes.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"author_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"client_request_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"deleted_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"scheduled_visits","kind":"patient","category":"Appointments and scheduling","description":"","file":"data/scheduled_visits.ndjson","linked_to_patient_by":["scheduled_visits.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"visit_type","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"physician_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"service_facility_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"scheduled_datetime","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"duration_minutes","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"visit_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"visit_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"holding_preregistration_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"hold_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"hold_reason","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"hold_detail","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"previsit_complete","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"previsit_incomplete_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"previsit_text_summary","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"previsit_completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"checked_in_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"checked_in_via","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_suggestion","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_sources","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_generated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_job_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_attempts","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_model_version","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_prompt_version","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_retrieval_ids","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"previsit_workup_context_snapshot_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"scheduling_source","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"import_metadata","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"booked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancellation_initiator","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"cancellation_reason_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"cancellation_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"previsit_auto_charge_hold","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"previsit_auto_charge_hold_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"previsit_auto_charge_held_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"previsit_auto_charge_held_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"series_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"series_makeup_for_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"department_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"schedule_resource_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"rooming_status_key","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"rooming_status_base","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"rooming_status_set_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"rooming_status_set_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"checked_out_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"checked_out_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"checkout_followup_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"additional_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"group_session_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["previsit_workup_input_hash"],"attachment_columns":[]},{"table":"signed_paperwork","kind":"patient","category":"Forms, consents and signed paperwork","description":"","file":"data/signed_paperwork.ndjson","linked_to_patient_by":["signed_paperwork.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assignment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"template_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"template_version_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"signer_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"signer_role","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"signer_relationship_text","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"patient_age_at_signing","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"patient_age_class_at_signing","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"signature_method","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"signing_context","type":"VARCHAR(12)","nullable":false,"encoding":"json","description":""},{"name":"signature_image_s3_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"field_responses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"electronic_record_consent_version","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"electronic_record_consent_accepted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"communication_preference_updates","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"user_agent","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"pdf_s3_key","type":"VARCHAR(500)","nullable":true,"encoding":"attachment","description":""},{"name":"pdf_sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"media_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"media_group_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_status","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_attempt","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_recipient","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_number","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_requested_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_finished_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"copy_fax_error","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"witnessed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"superseded_by_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"void_reason","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"voided_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["ip_hash"],"attachment_columns":["pdf_s3_key","signature_image_s3_key"]},{"table":"speedysticks_draw_appointments","kind":"patient","category":"Laboratory orders and results","description":"","file":"data/speedysticks_draw_appointments.ndjson","linked_to_patient_by":["speedysticks_draw_appointments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"ordering_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"speedysticks_patient_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"speedysticks_appointment_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"service_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"billing_type","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(11)","nullable":false,"encoding":"json","description":""},{"name":"scheduled_datetime","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"appointment_timezone","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"price","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"address","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"city","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"zip","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"serviceable","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"cancellation_reason_id","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"cancellation_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"cancelled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"cancelled_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"error_code","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"raw_response","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"last_synced_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"spravato_program_enrollments","kind":"patient","category":"Spravato and ketamine program records","description":"","file":"data/spravato_program_enrollments.ndjson","linked_to_patient_by":["spravato_program_enrollments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"program","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"stage","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"outcome","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"outcome_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"referral_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"consult_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"start_date","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"coordinator_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"payer_category","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"supply_source","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"specialty_pharmacy_name","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"pa_handled_by","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"rems_patient_id","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"rems_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"dose_mg","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"loading_dose_mg","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"loading_dose_56","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"safety_priority","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"checklist","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"closed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"spravato_program_events","kind":"patient","category":"Spravato and ketamine program records","description":"","file":"data/spravato_program_events.ndjson","linked_to_patient_by":["spravato_program_events.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"enrollment_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"changes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"author_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"spravato_session_marks","kind":"patient","category":"Spravato and ketamine program records","description":"The REMS Patient Monitoring Form for one Spravato session was submitted.","file":"data/spravato_session_marks.ndjson","linked_to_patient_by":["spravato_session_marks.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"pmf_submitted_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"pmf_submitted_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"staff_message_attachments","kind":"patient","category":"Other patient records","description":"","file":"data/staff_message_attachments.ndjson","linked_to_patient_by":["staff_message_attachments.thread_id -> staff_message_threads.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"uploader_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"thread_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"entry_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"s3_key","type":"VARCHAR(512)","nullable":false,"encoding":"attachment","description":""},{"name":"file_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"content_type","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"file_size","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"position","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"staged_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":["s3_key"]},{"table":"staff_message_entries","kind":"patient","category":"Other patient records","description":"","file":"data/staff_message_entries.ndjson","linked_to_patient_by":["staff_message_entries.thread_id -> staff_message_threads.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"thread_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"seq","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"kind","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"sender_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"event_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"event_data","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"ai_drafted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"ai_modified","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"client_msg_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"staff_message_threads","kind":"patient","category":"Other patient records","description":"","file":"data/staff_message_threads.ndjson","linked_to_patient_by":["staff_message_threads.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"subject","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"priority","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"source_type","type":"VARCHAR(32)","nullable":true,"encoding":"json","description":""},{"name":"source_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"client_msg_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"last_seq","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_message_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"message_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"sole_author_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"last_sender_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"snippet","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"has_attachments","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"chat_conversation_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"chat_message_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"chat_escalated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"chat_escalated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"chat_escalation_claimed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"staff_notifications","kind":"patient","category":"Other patient records","description":"","file":"data/staff_notifications.ndjson","linked_to_patient_by":["staff_notifications.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"recipient_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"event_key","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"event_id","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"subject_type","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"subject_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"provider_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"title","type":"VARCHAR(300)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"link_path","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"severity","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"occurred_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"show_in_inbox","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"dismissed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"deliveries","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"delivery_open","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"note_updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"supervision_physician_evaluations","kind":"patient","category":"Prescriptions","description":"","file":"data/supervision_physician_evaluations.ndjson","linked_to_patient_by":["supervision_physician_evaluations.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"evaluation_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"recorded_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"voided_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"voided_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"supervision_reminders","kind":"patient","category":"Prescriptions","description":"","file":"data/supervision_reminders.ndjson","linked_to_patient_by":["supervision_reminders.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"due_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"recipient_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"todo_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"therapy_group_members","kind":"patient","category":"Appointments and scheduling","description":"A standing member: booked into every future session of the group.","file":"data/therapy_group_members.ndjson","linked_to_patient_by":["therapy_group_members.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"group_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"joined_on","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"left_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"added_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"todo_items","kind":"patient","category":"Other patient records","description":"A soft-deletable todo owned by one organization.","file":"data/todo_items.ndjson","linked_to_patient_by":["todo_items.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"creator_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"assignee_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"delegated_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"title","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"checklist","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"priority","type":"VARCHAR","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR","nullable":false,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"surface_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reminder_acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"reminder_push_sent_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"sort_order","type":"FLOAT","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"urgent_care_queue_entries","kind":"patient","category":"Other patient records","description":"","file":"data/urgent_care_queue_entries.ndjson","linked_to_patient_by":["urgent_care_queue_entries.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"kiosk_session_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"charge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"arrival_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"ticket_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"service_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"chief_complaint_category","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"chief_complaint_text","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"acuity","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"acuity_suggested","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"red_flag_answers","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"red_flag_triggered","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"er_advice_shown_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"er_advice_acknowledged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"identity_review","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"identity_review_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_minor","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"guardian_name","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"guardian_relationship","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"self_pay","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"insurance_policy_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"eligibility_snapshot_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"eligibility_status","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"copay_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"copay_source","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"copay_status","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"copay_collected_via","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"copay_deferred_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"room_key","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"joined_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"arrived_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"triaged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"roomed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"provider_started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"discharged_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"left_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"removed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"removed_reason","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"called_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"sms_updates_opt_in","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"phone_masked","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"phone_verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"estimated_wait_low_minutes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"estimated_wait_high_minutes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"estimate_unavailable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"last_estimate_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_notified_estimate_minutes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"wait_shift_pending","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"next_up_notified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"manual_priority","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"intake_challenge_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":["phone_e164_ciphertext","phone_e164_hash","resume_token_hash","status_token_expires_at","status_token_hash"],"attachment_columns":[]},{"table":"video_visit_attendance","kind":"patient","category":"Appointments and scheduling","description":"","file":"data/video_visit_attendance.ndjson","linked_to_patient_by":["video_visit_attendance.encounter_id -> encounters.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"platform","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"external_space_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"conference_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"participant_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"started_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"ended_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"provider_seconds","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"others_seconds","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"together_seconds","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"provider_first_joined_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"others_first_joined_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"participants","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"finalized_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"last_checked_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"last_error","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"visit_paperwork_assignments","kind":"patient","category":"Forms, consents and signed paperwork","description":"","file":"data/visit_paperwork_assignments.ndjson","linked_to_patient_by":["visit_paperwork_assignments.patient_id -> patients.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"patient_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"scheduled_visit_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"encounter_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"template_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"template_version_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"assignment_idempotency_key","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"assigned_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"due_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"completed_signed_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"assigned_by","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"sent_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"copy_label","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"patient_note","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"additional_copy_key","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"recipient_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"recipient_referring_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"recipient_care_team_member_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"practice_responses","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"practice_responses_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"practice_responses_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"required_signer_role","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"required_signer_account_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"required_signer_email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"required_signer_patient_link_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signer_routing_reason","type":"VARCHAR(28)","nullable":true,"encoding":"json","description":""},{"name":"draft_payload","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"_patient_id","type":"UUID","nullable":false,"encoding":"json","description":"The patient this row belongs to."}],"columns_not_exported":[],"attachment_columns":[]},{"table":"billing_coupons","kind":"reference","category":"Practice reference data the record points to","description":"Discounts applied to the patient's charges.","file":"reference/billing_coupons.ndjson","linked_to_patient_by":["referenced by patient_charge_discounts.coupon_id -> billing_coupons.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"code_normalized","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"discount_type","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"percent_bps","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"valid_from","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"valid_through","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"max_uses","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"max_uses_per_patient","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"applies_to","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"first_visit_only","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"portal_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"deactivated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"deactivated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"care_gap_definitions","kind":"reference","category":"Practice reference data the record points to","description":"Preventive care measures named by the patient's care gaps.","file":"reference/care_gap_definitions.ndjson","linked_to_patient_by":["referenced by care_gap_instances.definition_id -> care_gap_definitions.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"slug","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"priority","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"population_logic","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"numerator_logic","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"applies_to_problem_codes","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"default_interval_months","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"sources","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"reference_links","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"default_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"owner_scope","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"visibility","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"effective_start","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"effective_end","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"compound_formula_versions","kind":"reference","category":"Practice reference data the record points to","description":"Compounded medication formulas prescribed to the patient.","file":"reference/compound_formula_versions.ndjson","linked_to_patient_by":["referenced by prescriptions.compound_formula_version_id -> compound_formula_versions.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"formula_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"definition","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"review_status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"change_note","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""}],"columns_not_exported":["composition_hash"],"attachment_columns":[]},{"table":"departments","kind":"reference","category":"Practice reference data the record points to","description":"Practice departments named by the patient's records.","file":"reference/departments.ndjson","linked_to_patient_by":["referenced by apcm_enrollments.department_id -> departments.id","referenced by appointment_series.department_id -> departments.id","referenced by appointment_waitlist_entries.department_id -> departments.id","referenced by care_program_enrollments.department_id -> departments.id","referenced by charges.department_id -> departments.id","referenced by claims.department_id -> departments.id","referenced by eligibility_check_logs.department_id -> departments.id","referenced by encounters.department_id -> departments.id","referenced by remote_monitoring_enrollments.department_id -> departments.id","referenced by reschedule_requests.department_id -> departments.id","referenced by scheduled_visits.department_id -> departments.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"short_name","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"legal_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"default_location_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"specialty","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"sms_display_name","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"logo_asset_id","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"letterhead_address_line1","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"letterhead_address_line2","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"letterhead_city","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"letterhead_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"letterhead_zip","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"letterhead_fax","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"is_default","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"sensitive_by_default","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"sort_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"start_time_grid","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"education_attachments","kind":"reference","category":"Practice reference data the record points to","description":"Education files assigned to the patient (the file itself is included).","file":"reference/education_attachments.ndjson","linked_to_patient_by":["referenced by education_assignments.attachment_id -> education_attachments.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"data","type":"BLOB","nullable":false,"encoding":"file","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"encounter_types","kind":"reference","category":"Practice reference data the record points to","description":"Visit types named by the patient's visits.","file":"reference/encounter_types.ndjson","linked_to_patient_by":["referenced by encounters.encounter_type_id -> encounter_types.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"requires_scheduling","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"requires_checkin","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"requires_documentation","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"default_duration","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"is_billable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"family_condition_catalog","kind":"reference","category":"Practice reference data the record points to","description":"Conditions named in the patient's family history.","file":"reference/family_condition_catalog.ndjson","linked_to_patient_by":["referenced by patient_family_history.catalog_entry_id -> family_condition_catalog.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"lay_term","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"synonyms","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"search_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"sort_rank","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"icd10_code","type":"VARCHAR(8)","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"fax_contacts","kind":"reference","category":"Practice reference data the record points to","description":"Outside labs and imaging facilities the patient's outside orders were sent to.","file":"reference/fax_contacts.ndjson","linked_to_patient_by":["referenced by outside_order_requisitions.facility_id -> fax_contacts.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"fax_number","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"facility_type","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"address_line1","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"address_line2","type":"VARCHAR(200)","nullable":true,"encoding":"json","description":""},{"name":"city","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"zip_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"phone","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"npi","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"contact_type","type":"VARCHAR(24)","nullable":true,"encoding":"json","description":""},{"name":"attention","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"email","type":"VARCHAR(254)","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"deleted_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"hospital_facilities","kind":"reference","category":"Practice reference data the record points to","description":"Hospitals and outside facilities named by the patient's records.","file":"reference/hospital_facilities.ndjson","linked_to_patient_by":["referenced by inpatient_admissions.hospital_facility_id -> hospital_facilities.id","referenced by insurance_benefit_checks.service_facility_id -> hospital_facilities.id","referenced by scheduled_visits.service_facility_id -> hospital_facilities.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"npi","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"npi_confirmed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"npi_confirmed_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"npi_enumeration_type","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"npi_status","type":"VARCHAR(1)","nullable":true,"encoding":"json","description":""},{"name":"address_line1","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"address_line2","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"city","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"postal_code","type":"VARCHAR(9)","nullable":true,"encoding":"json","description":""},{"name":"location_key","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"phone","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"fax","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"epic_endpoint_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"nppes_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"inquiries","kind":"reference","category":"Practice reference data the record points to","description":"Website inquiries that became the patient's referral or registration.","file":"reference/inquiries.ndjson","linked_to_patient_by":["referenced by inbound_referrals.source_inquiry_id -> inquiries.id","referenced by inquiry_registration_links.inquiry_id -> inquiries.id","referenced by inquiry_sms_messages.inquiry_id -> inquiries.id","referenced by new_patient_funnel_submissions.inquiry_id -> inquiries.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"inquirer_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"inquirer_email","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"inquirer_phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"subject","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"message","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(11)","nullable":false,"encoding":"json","description":""},{"name":"priority","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"ai_processed","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"ai_suggested_response","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"responded_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"responded_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"response_content","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"email_sent","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"source_url","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"source_channel","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"email_to_address","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"last_inbound_rfc_message_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"last_outbound_rfc_message_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"last_provider_message_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"is_flagged","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_read","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_archived","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"read_at","type":"DATETIME","nullable":true,"encoding":"json","description":""}],"columns_not_exported":["email_thread_token"],"attachment_columns":[]},{"table":"inquiry_email_messages","kind":"reference","category":"Practice reference data the record points to","description":"The inquiry email that sent the patient their registration link.","file":"reference/inquiry_email_messages.ndjson","linked_to_patient_by":["referenced by inquiry_registration_links.email_message_id -> inquiry_email_messages.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"inquiry_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"direction","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"from_email","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"to_email","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"subject","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"body","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"rfc_message_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"in_reply_to","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"references","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"provider_message_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"sent_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"delivery_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"delivery_error","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"insurance_carriers","kind":"reference","category":"Practice reference data the record points to","description":"Insurance companies on the patient's policies.","file":"reference/insurance_carriers.ndjson","linked_to_patient_by":["referenced by insurance_policies.insurance_carrier_id -> insurance_carriers.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"canonical_name","type":"VARCHAR(160)","nullable":false,"encoding":"json","description":""},{"name":"canonical_name_normalized","type":"VARCHAR(180)","nullable":false,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"brand_family","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"parent_carrier_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"carrier_type","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"naic_company_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"cms_issuer_id","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"website","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(40)","nullable":false,"encoding":"json","description":""},{"name":"confidence_score","type":"NUMERIC(5, 4)","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_popular","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"membership_agreement_versions","kind":"reference","category":"Practice reference data the record points to","description":"The membership agreement text the patient accepted.","file":"reference/membership_agreement_versions.ndjson","linked_to_patient_by":["referenced by patient_membership_agreements.version_id -> membership_agreement_versions.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"practice_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"nutrition_foods","kind":"reference","category":"Practice reference data the record points to","description":"Foods (USDA FoodData Central entries) named in the patient's food log.","file":"reference/nutrition_foods.ndjson","linked_to_patient_by":["referenced by nutrition_log_entries.food_id -> nutrition_foods.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source_id","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"source_version","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"gtin","type":"VARCHAR(14)","nullable":true,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(500)","nullable":false,"encoding":"json","description":""},{"name":"brand","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"basis","type":"VARCHAR(2)","nullable":false,"encoding":"json","description":""},{"name":"nutrients","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"portions","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"serving_label","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"serving_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"popularity","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"search_vector","type":"TSVECTOR","nullable":true,"encoding":"json","description":""},{"name":"imported_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"order_set_items","kind":"reference","category":"Practice reference data the record points to","description":"Order set items used for the patient's scheduled orders.","file":"reference/order_set_items.ndjson","linked_to_patient_by":["referenced by scheduled_orders.order_set_item_id -> order_set_items.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"order_set_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"sort_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"item_type","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"payload","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"diagnoses","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"default_selected","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"timing_mode","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"offset_value","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"offset_unit","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"is_standing","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"interval_value","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"interval_unit","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"occurrence_count","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"ga_week_min","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"ga_week_max","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"ga_milestone_key","type":"VARCHAR(60)","nullable":true,"encoding":"json","description":""},{"name":"ga_dedup_scope","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"order_sets","kind":"reference","category":"Practice reference data the record points to","description":"Order sets used for the patient's scheduled orders.","file":"reference/order_sets.ndjson","linked_to_patient_by":["referenced by order_set_visit_items.order_set_id -> order_sets.id","referenced by scheduled_orders.order_set_id -> order_sets.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(160)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"specialty","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"scope","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"owner_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"preset_key","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"usage_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"last_used_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"organization_note_types","kind":"reference","category":"Practice reference data the record points to","description":"Note types named by the patient's notes.","file":"reference/organization_note_types.ndjson","linked_to_patient_by":["referenced by medical_notes.note_type_id -> organization_note_types.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"base_note_type","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"is_default","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"sort_order","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_system","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"organization_subscription_plans","kind":"reference","category":"Practice reference data the record points to","description":"Membership plans the patient was enrolled in.","file":"reference/organization_subscription_plans.ndjson","linked_to_patient_by":["referenced by patient_membership_agreements.plan_id -> organization_subscription_plans.id","referenced by patient_subscription_discounts.plan_id -> organization_subscription_plans.id","referenced by patient_subscriptions.plan_id -> organization_subscription_plans.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"billing_entity_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"amount","type":"NUMERIC(10, 2)","nullable":false,"encoding":"json","description":""},{"name":"currency","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"interval_unit","type":"VARCHAR(5)","nullable":false,"encoding":"json","description":""},{"name":"interval_count","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"trial_days","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(9)","nullable":false,"encoding":"json","description":""},{"name":"stripe_product_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"stripe_price_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"replaced_by_plan_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"effective_from","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"effective_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"price_locked_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"display_order","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"plan_family_key","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"is_featured","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"published_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"archived_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"intro_discount_type","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"intro_discount_value","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"intro_discount_periods","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"intro_offer_starts_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"intro_offer_ends_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"intro_discount_stripe_coupon_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"signup_fee_amount","type":"NUMERIC(10, 2)","nullable":true,"encoding":"json","description":""},{"name":"signup_fee_stripe_product_id","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"billing_starts_on","type":"DATE","nullable":true,"encoding":"json","description":""},{"name":"access_before_billing_start","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"paperwork_template_versions","kind":"reference","category":"Practice reference data the record points to","description":"The exact version of each form or consent the patient was sent or signed.","file":"reference/paperwork_template_versions.ndjson","linked_to_patient_by":["referenced by signed_paperwork.template_version_id -> paperwork_template_versions.id","referenced by visit_paperwork_assignments.template_version_id -> paperwork_template_versions.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"template_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version_number","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"content","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"content_sha256","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"effective_from","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"effective_until","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"published_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"published_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"paperwork_templates","kind":"reference","category":"Practice reference data the record points to","description":"Forms and consents the patient was sent or signed.","file":"reference/paperwork_templates.ndjson","linked_to_patient_by":["referenced by remote_monitoring_enrollments.agreement_template_id -> paperwork_templates.id","referenced by signed_paperwork.template_id -> paperwork_templates.id","referenced by visit_paperwork_assignments.template_id -> paperwork_templates.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"slug","type":"VARCHAR(120)","nullable":false,"encoding":"json","description":""},{"name":"document_type","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"applies_to","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"age_scope","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"requires_adult_resign_on_age_out","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"visit_type_names","type":"ARRAY","nullable":true,"encoding":"json","description":""},{"name":"state_scope","type":"ARRAY","nullable":true,"encoding":"json","description":""},{"name":"resign_cadence","type":"VARCHAR(17)","nullable":false,"encoding":"json","description":""},{"name":"is_required","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"assign_at_registration","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"skip_imported_patients","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"first_treatment_only","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"allow_multiple_open_copies","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"signed_copy_fax_provider_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_copy_fax_contact_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_copy_fax_condition_field_id","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"signed_copy_fax_condition_value","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"enforcement_mode","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"current_version_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"patient_billing_types","kind":"reference","category":"Practice reference data the record points to","description":"The patient's billing type.","file":"reference/patient_billing_types.ndjson","linked_to_patient_by":["referenced by patients.billing_type_id -> patient_billing_types.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"code","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"payment_plan_agreement_versions","kind":"reference","category":"Practice reference data the record points to","description":"The payment plan agreement text the patient accepted.","file":"reference/payment_plan_agreement_versions.ndjson","linked_to_patient_by":["referenced by payment_arrangements.agreement_version_id -> payment_plan_agreement_versions.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"practice_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"persistent_dot_phrase_definitions","kind":"reference","category":"Practice reference data the record points to","description":"Definitions of the saved values recorded for the patient.","file":"reference/persistent_dot_phrase_definitions.ndjson","linked_to_patient_by":["referenced by persistent_dot_phrase_values.definition_id -> persistent_dot_phrase_definitions.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"owner_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"shortcut","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"shortcut_normalized","type":"VARCHAR(64)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"placeholder_label","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"template_content","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"is_system","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"pharmacies","kind":"reference","category":"Practice reference data the record points to","description":"Pharmacies the patient's prescriptions went to.","file":"reference/pharmacies.ndjson","linked_to_patient_by":["referenced by patient_pharmacy_recommendations.pharmacy_id -> pharmacies.internal_id","referenced by prescriptions.pharmacy_id -> pharmacies.internal_id"],"columns":[{"name":"internal_id","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"npi_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(255)","nullable":false,"encoding":"json","description":""},{"name":"address_line1","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"address_line2","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"city","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"zip_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"country","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"mail_address_line1","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"mail_address_line2","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"mail_city","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"mail_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"mail_zip_code","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"phone","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"fax","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"website","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"service_level","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"is_retail","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_mail_order","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_in_house_dispensing","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"dispenses_for_humans","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_24hour","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_compounding","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_dme","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_kiosk","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_long_term_care","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"is_specialty","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"supports_digital_signature","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"uses_fax_gateway","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"supports_veterinary","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"dispenses_pet_meds","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"dispenses_human_meds_for_pets","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"pharmacy_type","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"dea_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"ncpdp_number","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"latitude","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"longitude","type":"FLOAT","nullable":true,"encoding":"json","description":""},{"name":"location_id","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"active_start_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"active_end_date","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"additional_info","type":"TEXT","nullable":true,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"physician_visit_types","kind":"reference","category":"Practice reference data the record points to","description":"Appointment types named by the patient's appointments and requests.","file":"reference/physician_visit_types.ndjson","linked_to_patient_by":["referenced by appointment_series.physician_visit_type_id -> physician_visit_types.id","referenced by appointment_waitlist_entries.physician_visit_type_id -> physician_visit_types.id","referenced by inbound_referrals.requested_visit_type_id -> physician_visit_types.id","referenced by low_friction_bookings.physician_visit_type_id -> physician_visit_types.id","referenced by patient_visit_type_billing_rates.physician_visit_type_id -> physician_visit_types.id","referenced by preregistrations.physician_visit_type_id -> physician_visit_types.id","referenced by reschedule_requests.physician_visit_type_id -> physician_visit_types.id","referenced by scheduled_visit_billing_snapshots.physician_visit_type_id -> physician_visit_types.id","referenced by scheduled_visits.physician_visit_type_id -> physician_visit_types.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"physician_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"encounter_type_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"default_duration","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"color","type":"VARCHAR(7)","nullable":true,"encoding":"json","description":""},{"name":"requires_previsit","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"requires_med_rec_check","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"previsit_interview_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"previsit_paperwork_enabled","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_telehealth","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_travel_visit","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_group","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"care_setting","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"duration_mode","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"default_place_of_service","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"service_facility_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"is_default","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"max_per_day","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"buffer_time","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"hold_after_minutes","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"hold_before_minutes","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"on_call_only","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"on_call_shift_type_ids","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"on_call_weekdays","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"available_for_online","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"patient_self_schedulable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"online_booking_audience","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"online_booking_patient_list_ref","type":"VARCHAR(140)","nullable":true,"encoding":"json","description":""},{"name":"min_schedule_notice","type":"SMALLINT","nullable":false,"encoding":"json","description":""},{"name":"max_schedule_days","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"default_start_offset_value","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"default_start_offset_unit","type":"VARCHAR(8)","nullable":true,"encoding":"json","description":""},{"name":"online_booking_window_mode","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"online_booking_windows","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"date_range_availability_mode","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"availability_date_ranges","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"staff_start_time_mode","type":"VARCHAR(24)","nullable":false,"encoding":"json","description":""},{"name":"staff_start_time_interval_minutes","type":"SMALLINT","nullable":true,"encoding":"json","description":""},{"name":"staff_start_times_follow_online_windows","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"organization_visit_type_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"customized_fields","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"questionnaire_definitions","kind":"reference","category":"Practice reference data the record points to","description":"Questionnaires (questions and scoring) the patient was given or answered.","file":"reference/questionnaire_definitions.ndjson","linked_to_patient_by":["referenced by questionnaire_assignments.questionnaire_definition_id -> questionnaire_definitions.id","referenced by questionnaire_recurring_enrollments.questionnaire_definition_id -> questionnaire_definitions.id","referenced by questionnaire_responses.questionnaire_definition_id -> questionnaire_definitions.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"slug","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"display_name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"short_name","type":"VARCHAR(80)","nullable":false,"encoding":"json","description":""},{"name":"description","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"category","type":"VARCHAR(13)","nullable":false,"encoding":"json","description":""},{"name":"questions","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"scoring_config","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"estimated_minutes","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"default_frequency_days","type":"INTEGER","nullable":true,"encoding":"json","description":""},{"name":"owner_scope","type":"VARCHAR(6)","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"effective_start","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"effective_end","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"referring_providers","kind":"reference","category":"Practice reference data the record points to","description":"Outside providers on the patient's care team, referrals and messages.","file":"reference/referring_providers.ndjson","linked_to_patient_by":["referenced by encounter_care_team_deliveries.referring_provider_id -> referring_providers.id","referenced by encounters.referring_provider_id -> referring_providers.id","referenced by inbound_referrals.referring_provider_id -> referring_providers.id","referenced by patient_care_team_members.referring_provider_id -> referring_providers.id","referenced by referring_provider_communications.referring_provider_id -> referring_providers.id","referenced by referring_provider_messages.referring_provider_id -> referring_providers.id","referenced by visit_paperwork_assignments.recipient_referring_provider_id -> referring_providers.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"npi","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"nppes_snapshot","type":"JSONB","nullable":true,"encoding":"json","description":""},{"name":"first_name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"last_name","type":"VARCHAR(100)","nullable":false,"encoding":"json","description":""},{"name":"credential","type":"VARCHAR(50)","nullable":true,"encoding":"json","description":""},{"name":"specialty","type":"VARCHAR(120)","nullable":true,"encoding":"json","description":""},{"name":"practice_name","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"practice_address_line1","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"practice_address_line2","type":"VARCHAR(160)","nullable":true,"encoding":"json","description":""},{"name":"practice_city","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"practice_state","type":"VARCHAR(2)","nullable":true,"encoding":"json","description":""},{"name":"practice_postal_code","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"practice_phone","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"practice_fax","type":"VARCHAR(30)","nullable":true,"encoding":"json","description":""},{"name":"email","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"phone_encryption_key_id","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"masked_phone","type":"VARCHAR(40)","nullable":true,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(30)","nullable":false,"encoding":"json","description":""},{"name":"portal_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"portal_invited_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"portal_invited_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"portal_invite_expires_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"portal_enrolled_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"preferred_contact_method","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"office_contact_notes","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"direct_address","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"created_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"updated_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"merged_into_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verification_status","type":"VARCHAR(20)","nullable":false,"encoding":"json","description":""},{"name":"verified_by","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"verified_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"wants_updates","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"notify_by_email","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"notify_by_sms","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"last_login_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"is_deleted","type":"BOOLEAN","nullable":false,"encoding":"json","description":""}],"columns_not_exported":["enrollment_ip_hash","phone_e164_ciphertext","phone_e164_hash","portal_invite_token_hash"],"attachment_columns":[]},{"table":"remittances","kind":"reference","category":"Practice reference data the record points to","description":"Insurance payment remittances (ERA) the patient's payments and statements came from.","file":"reference/remittances.ndjson","linked_to_patient_by":["referenced by explanation_of_benefits.remittance_id -> remittances.id","referenced by payments.remittance_id -> remittances.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"source","type":"VARCHAR(32)","nullable":false,"encoding":"json","description":""},{"name":"trace_number","type":"VARCHAR(50)","nullable":false,"encoding":"json","description":""},{"name":"payer_name","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"payer_identifier","type":"VARCHAR(80)","nullable":true,"encoding":"json","description":""},{"name":"payment_method","type":"VARCHAR(10)","nullable":true,"encoding":"json","description":""},{"name":"payment_date","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"check_amount","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"originator_company_id","type":"VARCHAR(20)","nullable":true,"encoding":"json","description":""},{"name":"receiver_account_last4","type":"VARCHAR(4)","nullable":true,"encoding":"json","description":""},{"name":"source_filename","type":"VARCHAR(255)","nullable":true,"encoding":"json","description":""},{"name":"claim_payment_total","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"provider_adjustment_total","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"balance_status","type":"VARCHAR(16)","nullable":true,"encoding":"json","description":""},{"name":"balance_difference","type":"NUMERIC(12, 2)","nullable":true,"encoding":"json","description":""},{"name":"era_ingestion_run_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":["file_hash"],"attachment_columns":[]},{"table":"standing_order_protocols","kind":"reference","category":"Practice reference data the record points to","description":"Standing order protocols under which orders for the patient were sent.","file":"reference/standing_order_protocols.ndjson","linked_to_patient_by":["referenced by delegated_order_sends.protocol_id -> standing_order_protocols.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"organization_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"series_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"version","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"name","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"lab_channel","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"tests","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"diagnosis_codes","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"priority","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"instructions","type":"TEXT","nullable":true,"encoding":"json","description":""},{"name":"inclusion_criteria","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"exclusion_criteria","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"review_due_on","type":"DATE","nullable":false,"encoding":"json","description":""},{"name":"status","type":"VARCHAR(16)","nullable":false,"encoding":"json","description":""},{"name":"created_by_user_id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"signed_by_physician_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"signed_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"content_sha256","type":"VARCHAR(64)","nullable":true,"encoding":"json","description":""},{"name":"retired_at","type":"DATETIME","nullable":true,"encoding":"json","description":""},{"name":"retired_by_user_id","type":"UUID","nullable":true,"encoding":"json","description":""},{"name":"retire_reason","type":"VARCHAR(500)","nullable":true,"encoding":"json","description":""},{"name":"created_at","type":"DATETIME","nullable":false,"encoding":"json","description":""},{"name":"updated_at","type":"DATETIME","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]},{"table":"surgical_procedure_catalog","kind":"reference","category":"Practice reference data the record points to","description":"Procedures named in the patient's surgical history.","file":"reference/surgical_procedure_catalog.ndjson","linked_to_patient_by":["referenced by patient_procedures.catalog_entry_id -> surgical_procedure_catalog.id"],"columns":[{"name":"id","type":"UUID","nullable":false,"encoding":"json","description":""},{"name":"lay_term","type":"VARCHAR(200)","nullable":false,"encoding":"json","description":""},{"name":"synonyms","type":"JSONB","nullable":false,"encoding":"json","description":""},{"name":"search_text","type":"TEXT","nullable":false,"encoding":"json","description":""},{"name":"sort_rank","type":"INTEGER","nullable":false,"encoding":"json","description":""},{"name":"is_active","type":"BOOLEAN","nullable":false,"encoding":"json","description":""},{"name":"cpt_code","type":"VARCHAR(10)","nullable":false,"encoding":"json","description":""},{"name":"default_body_site","type":"VARCHAR(100)","nullable":true,"encoding":"json","description":""},{"name":"laterality_applicable","type":"BOOLEAN","nullable":false,"encoding":"json","description":""}],"columns_not_exported":[],"attachment_columns":[]}],"tables_not_exported":[{"table":"ai_call_playbook_revisions","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"ai_call_playbook_runs","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"ambient_dictation_usage","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"appointment_reminder_dispatches","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"appointment_series_alerts","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"appointment_series_operations","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"appointment_sms_reply_contexts","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"appointment_waitlist_offers","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"appointment_waitlist_opportunities","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"billing_claim_work_items","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"billing_hero_eligibility_probes","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"billing_hero_escalations","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"billing_hero_patient_requests","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"billing_hero_proposals","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"billing_hero_runs","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"billing_inbox_item_user_states","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"billing_inbox_items","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"billing_service_task_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"billing_service_tasks","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"billing_visit_work_items","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"care_gap_runs","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"care_program_claim_item_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"care_team_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"care_time_active_timers","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"cervical_screening_audit","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"charge_duplicate_ack_bindings","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"charge_duplicate_ack_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"charge_jw_jz_exemption_bindings","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"charge_jw_jz_exemption_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"charge_split_intents","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"chart_share_access_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"chat_message_reactions","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"chat_participants","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"claim_api_transactions","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"claim_eligibility_blocks","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"claim_reroute_authorizations","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"claim_submission_attempt_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"claim_submission_attempts","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"claim_submission_generations","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"claim_submission_ownerships","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"clearinghouse_claim_line_refs","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"clearinghouse_transactions","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"coding_edit_overrides","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"communication_campaign_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"communication_campaign_recipients","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"communication_outbox","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"delegate_inbox_messages","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"drug_inventory_alerts","reason":"Practice drug-stock bookkeeping; the dose given (drug, NDC, lot) is exported with the administration."},{"table":"drug_inventory_transactions","reason":"Practice drug-stock bookkeeping; the dose given (drug, NDC, lot) is exported with the administration."},{"table":"dsi_feedback","reason":"Clinicians' feedback on reminders and suggestions (practice quality improvement), not part of the patient's record."},{"table":"ehi_export_jobs","reason":"Bookkeeping of the export itself."},{"table":"encounter_audit","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"encounter_collaboration_metadata","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"encounter_collaboration_operations","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"encounter_collaboration_sessions","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"encounter_eligibility_sign_decisions","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"encounter_sign_runs","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"epcs_security_alert_events","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"epcs_security_alert_notifications","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"epcs_security_alerts","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"epcs_signing_batch_events","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"epcs_signing_session_events","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"epcs_signing_sessions","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"epic_import_jobs","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"external_record_import_jobs","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"fax_inbox_entries","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"fax_triage_audit_logs","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"fhir_bulk_export_jobs","reason":"Bookkeeping of an app's FHIR bulk export; the data it exported is exported here."},{"table":"guardian_portal_access_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"guardian_portal_invitations","reason":"Patient portal sign-in accounts, invitations and access links (who may sign in), not health information."},{"table":"guardian_visibility_policy_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"hcc_suspects","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"idr_candidates","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"idr_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"idr_tasks","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"immunization_registry_candidates","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"immunization_registry_reconciliation_items","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"inbound_email_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"inpatient_admission_audit","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"insurance_card_capture_sessions","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"intake_review_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"kiosk_checkin_sessions","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"laboratory_audit","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"llm_usage_events","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"maternity_billing_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"medical_note_copy_forward_events","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"message_email_threads","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"message_recalls","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"message_sms_threads","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"note_collaboration_metadata","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"note_embeddings","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"note_operations","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"note_sessions","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"notifications","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"online_payment_attempts","reason":"Payment-processor customer, card and attempt identifiers; the payments themselves are exported."},{"table":"paperwork_audit_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"patient_age_transition_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"patient_auth_email_challenges","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"patient_auth_sessions","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"patient_auth_trusted_devices","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"patient_document_extractions","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"patient_list_cell_values","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"patient_list_members","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"patient_phone_factors","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"patient_phone_index","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"patient_phone_otp_challenges","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"patient_portal_account_patient_links","reason":"Patient portal sign-in accounts, invitations and access links (who may sign in), not health information."},{"table":"patient_portal_identities","reason":"Patient portal sign-in accounts, invitations and access links (who may sign in), not health information."},{"table":"patient_portal_paperwork_routing","reason":"Patient portal sign-in accounts, invitations and access links (who may sign in), not health information."},{"table":"patient_record_activity","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"patient_square_cards","reason":"Payment-processor customer, card and attempt identifiers; the payments themselves are exported."},{"table":"patient_square_customers","reason":"Payment-processor customer, card and attempt identifiers; the payments themselves are exported."},{"table":"patient_stripe_customers","reason":"Payment-processor customer, card and attempt identifiers; the payments themselves are exported."},{"table":"payer_rate_observations","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"payer_submission_hold_rule_claims","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"payer_submission_hold_rule_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"payer_submission_hold_rules","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"payment_plan_collection_operations","reason":"Payment-processor customer, card and attempt identifiers; the payments themselves are exported."},{"table":"payment_plan_installment_attempts","reason":"Payment-processor customer, card and attempt identifiers; the payments themselves are exported."},{"table":"pdmp_ai_summaries","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"persistent_dot_phrase_value_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"phone_call_ai_reviews","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"phone_call_commands","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"phone_call_legs","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"phone_call_transfer_attempts","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"phone_mobile_delivery_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"phone_provider_calls","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"phone_user_reservations","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"phone_voicemail_hero_runs","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"photo_id_capture_sessions","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"physician_patient_note_audits","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"physician_recent_patients","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"portal_access_grants","reason":"Patient portal sign-in accounts, invitations and access links (who may sign in), not health information."},{"table":"portal_access_requests","reason":"Patient portal sign-in accounts, invitations and access links (who may sign in), not health information."},{"table":"portal_caregiver_invitations","reason":"Patient portal sign-in accounts, invitations and access links (who may sign in), not health information."},{"table":"pregnancy_episode_audit","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"pregnancy_order_set_applications","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"prescription_audit","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"previsit_auto_charge_hold_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"quality_measure_results","reason":"Quality measure results calculated from the record (re-calculable); the data they were calculated from is exported."},{"table":"quest_result_reconciliation_items","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"questionnaire_assignment_rule_runs","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"questionnaire_photo_capture_sessions","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"referral_audit","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"refill_center_doc_approvals","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"refill_center_group_finalizations","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"refill_center_item_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"registration_email_proofs","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."},{"table":"remote_monitoring_reminders","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"reputation_alert_notifications","reason":"Practice satisfaction-survey and reputation records, not part of the medical or billing record."},{"table":"reputation_alerts","reason":"Practice satisfaction-survey and reputation records, not part of the medical or billing record."},{"table":"reputation_survey_invites","reason":"Practice satisfaction-survey and reputation records, not part of the medical or billing record."},{"table":"reputation_survey_responses","reason":"Practice satisfaction-survey and reputation records, not part of the medical or billing record."},{"table":"result_ai_responses","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"result_inbox_entries","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"saved_payment_method_authorizations","reason":"Payment-processor customer, card and attempt identifiers; the payments themselves are exported."},{"table":"schedule_shuffle_batch_items","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"scheduled_visit_override_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"sftp_batch_claims","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"smart_authorization_requests","reason":"Which apps were authorized to read the record through the FHIR API, and their launch, sign-in and token bookkeeping (access control), not health information."},{"table":"smart_grants","reason":"Which apps were authorized to read the record through the FHIR API, and their launch, sign-in and token bookkeeping (access control), not health information."},{"table":"smart_launch_contexts","reason":"Which apps were authorized to read the record through the FHIR API, and their launch, sign-in and token bookkeeping (access control), not health information."},{"table":"smart_tokens","reason":"Which apps were authorized to read the record through the FHIR API, and their launch, sign-in and token bookkeeping (access control), not health information."},{"table":"sms_webhook_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"staff_message_participants","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"staff_message_todo_links","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"staff_message_user_states","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"todo_audit_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"todo_item_tags","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"unsigned_note_dismissals","reason":"Live note-editing operations; the saved notes and every saved version are exported."},{"table":"upload_batches","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"urgent_care_queue_events","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"user_recent_patients","reason":"Usage metering, AI working data or search indexes derived from the record."},{"table":"visit_billing_policy_events","reason":"Audit trail of who did what; reported through the practice's audit log report, not part of the record."},{"table":"visit_readiness_alert_notifications","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"visit_readiness_alert_todos","reason":"Staff work-queue, routing or delivery bookkeeping; the clinical or billing record it serves is exported."},{"table":"website_phone_verification_challenges","reason":"Sign-in, verification and session records (credentials and one-time codes), not health information."}],"references_not_exported":[{"table":"aco_attribution_rosters","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"appointment_series_templates","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"assistants","reason":"Exported in context/ (practice, providers, staff names) instead."},{"table":"billing_queue_presets","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"care_program_import_batches","reason":"Bookkeeping of a care-program history import from the previous system; the imported data is exported."},{"table":"cvx_codes","reason":"Public code system; the codes are exported in the patient's rows."},{"table":"delegated_order_authorizations","reason":"A staff member's authority to send orders for a clinician (license, who authorized it): practice credentialing, not the patient's record; the order send keeps the authorization's id."},{"table":"denial_self_pay_rules","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"dot_phrases","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"drug_inventory_lots","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"drug_inventory_open_containers","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"epcs_signing_batches","reason":"An EPCS signing batch (one phone signing request for several prescriptions, from the Refill Center or order entry's Send together; possibly several patients): signing infrastructure; the prescriptions it signed are exported."},{"table":"era_ingestion_runs","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"fullscript_user_connections","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"headway_connections","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"icd10_codes","reason":"Public code system; the codes are exported in the patient's rows."},{"table":"idr_form_templates","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"insurance_contracts","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"lab_instrument_uploads","reason":"A lab machine's message file as the machine sent it; one file can hold several patients' results. Each patient's part is exported in lab_instrument_messages / lab_instrument_tests and the filed results in laboratory_orders / laboratory_results."},{"table":"locations","reason":"Exported in context/ (practice, providers, staff names) instead."},{"table":"loinc_codes","reason":"Public code system; the codes are exported in the patient's rows."},{"table":"medication_administration_templates","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"message_pools","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"ndc_products","reason":"Public code system; the codes are exported in the patient's rows."},{"table":"new_patient_funnel_configs","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"note_cosign_supervision_rules","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"organization_billing_entities","reason":"Exported in context/ (practice, providers, staff names) instead."},{"table":"organization_documentation_policy_revisions","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"organization_immunization_registry_settings","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"organization_legal_entities","reason":"Exported in context/ (practice, providers, staff names) instead."},{"table":"organization_zoom_installations","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"organizations","reason":"Exported in context/ (practice, providers, staff names) instead."},{"table":"patient_portal_accounts","reason":"Sign-in secrets, never exported."},{"table":"payer_mappings","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"payer_source_identifiers","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"phone_numbers","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"phone_ring_groups","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"phone_voicemail_boxes","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"physicians","reason":"Exported in context/ (practice, providers, staff names) instead."},{"table":"public_health_connections","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"quality_import_batches","reason":"Bookkeeping of a quality file import; the imported data is exported."},{"table":"questionnaire_assignment_campaign_runs","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"refill_protocol_authorizations","reason":"A staff member's authority to refill under the practice's protocol (credential, license, who verified it): practice credentialing, not the patient's record; the refill keeps the authorization's id."},{"table":"schedule_resources","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"schedule_shuffle_batches","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"simplified_medications","reason":"Public code system; the codes are exported in the patient's rows."},{"table":"stedi_payer_mappings","reason":"Practice configuration, routing or contracts, not part of the patient's record."},{"table":"unii_entries","reason":"Public code system; the codes are exported in the patient's rows."},{"table":"user_passkeys","reason":"Sign-in secrets, never exported."},{"table":"users","reason":"Exported in context/ (practice, providers, staff names) instead."},{"table":"visit_type_billing_rules","reason":"Practice configuration, routing or contracts, not part of the patient's record."}]}