📣 We have moved! All of the most up-to-date information on WebPT Products can be found in its new home on WebPT Discover.

SQL Logic: Revflow_Ins_Code_to_Name_to_Class

The data model for our insurance information is broken into insurance codes and insurance classes. This will help you understand how best to navigate, for example, from a charge record to the insurance class for that charge.

select distinct dc.from_ins_code as "code from patient_credit", --this can be any ins_code on d_charge, d_payment_adjustment, etc.
       ic.insurance_code_id as "matches code on patient_credit",
       ic.ins_name as "ins_name",
       ic.ins_class_id as "bridge to insurance class table",
       icl.insurance_class_id as "matches id on insurance_code",
       icl.ins_class_code as "insurance_class",
       icl.ins_class_desc as "ins_class_desc"
FROM public.SVW_REVFLOW_D_PATIENT_CREDIT dc
LEFT JOIN public.svw_revflow_c_insurance_code ic ON (ic.insurance_code_id = dc.from_ins_code)
LEFT JOIN public.svw_revflow_c_insurance_class icl ON (icl.insurance_class_id = ic.ins_class_id)
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.