sub-job
PAA · Load-Visit-Transform-Tables
Loads transform tables for Visits - Load TransformAppointment unpivots the case# (if there is more than 1 Scheduled CPT code) Load TransformCharge is a intermidate table before loading the TransformVisitCharge that pulls together CPT codes, BaseUnits, 75th Percentile time units, UnltrasoundCPTCode, BlockCPTCode, Ultrasound $ amount, Block $ amount that is needed for Total billing amount calculation. Edgewater implementation notes No changes to 1. TransformSurgicalCPT 2. TransformVisitCharge
task tree
What the sub-job runs
Tasks in order, each with what it does — typed stepsfrom the MDClarity task docs (click to open the reference), sub-jobsyou can expand inline (▶) to reveal their own tasks, and SQL steps summarized by Gemini (✨). Every step shows the tables it writes/reads and which earlier step it feeds from(sqlglot lineage).
Load-Visit-Transform-Tables
- Load VisitDeltasql
load_visit_transform_tables__load_visitdelta.sql✨ Identifies new or updated appointments across multiple data sources to build a delta table for downstream processing.writesVisitDelta· readsVisitDelta - Load PatientDeltasql
load_visit_transform_tables__load_patientdelta.sql✨ Extracts and maps unique patient identifiers from various appointment sources to identify patient records requiring updates.writesPatientDelta· readsSourceAppointmentSourceAppointmentMeditechSourceAppointmentMobileSourceHollySpringsAppointmentSourceedgewaterAppointmentVisitDelta↳ feeds from Load VisitDelta - Load TransformAppointmentCPTUnpivotsql
load_visit_transform_tables__load_transformappointmentcptunpivot.sql✨ Unpivots and cleans procedure codes from multiple appointment sources for visits identified in the delta table.writesTransformAppointmentCPTUnpivot· readsSourceAppointmentSourceAppointmentMeditechSourceAppointmentMobileSourceHollySpringsAppointmentSourceedgewaterAppointmentVisitDelta↳ feeds from Load VisitDelta - Load TransformVisitDiagnosisCodessql
load_visit_transform_tables__load_transformvisitdiagnosiscodes.sql✨ Parses and loads cleaned diagnosis codes from appointment sources into the transformation table for updated visits.writesTransformVisitDiagnosisCodes· readsSourceAppointmentSourceAppointmentMobileVisitDelta↳ feeds from Load VisitDelta - Load TransformVisitInsurancesql
load_visit_transform_tables__load_transformvisitinsurance.sql✨ Maps and loads primary and secondary insurance details, including payor names and member IDs, for updated visit records.writesTransformVisitInsurance· readsInsuranceMapSourceAppointmentSourceAppointmentMeditechSourceAppointmentMobileSourceHollySpringsAppointmentSourceedgewaterAppointmentVisitDelta↳ feeds from Load VisitDelta - Load TransformSurgicalCPT (excluding PAA Mobile, EdgeWater)sql
load_visit_transform_tables__load_transformsurgicalcpt_excluding_paa_mobile_edgewater.sql✨ Calculates surgical CPT rates and units for standard data sources using fee schedules and bundled service logic.writesTransformSurgicalCPT· readsCPTWithModifierEndoscopyCPTSourceBundlesCombinedSourceEpicFacilityReferenceSourceEpictoBFSInsuranceMappingSourcePhygenFacilityTransformAppointmentCPTUnpivotTransformFeeSchedule↳ feeds from Load TransformAppointmentCPTUnpivot, Load TransformVisitInsurance, Load VisitDelta - Load TransformSurgicalCPT (PAA EdgeWater)sql
load_visit_transform_tables__load_transformsurgicalcpt_paa_edgewater.sql✨ Calculates surgical CPT rates and units specifically for Edgewater source data using fee schedules and bundled service logic.writesTransformSurgicalCPT· readsBFSInsuranceMapCPTWithModifierEndoscopyCPTInsuranceMapSourceBundlesCombinedSourcePhygenFacilityTransformAppointmentCPTUnpivotTransformFeeSchedule↳ feeds from Load TransformAppointmentCPTUnpivot, Load TransformVisitInsurance, Load VisitDelta - Load TransformSurgicalCPT (PAA Mobile)sql
load_visit_transform_tables__load_transformsurgicalcpt_paa_mobile.sql✨ Calculates surgical CPT rates and units for mobile source data using fee schedules and bundled service logic.writesTransformSurgicalCPT· readsBFSInsuranceMapCPTWithModifierEndoscopyCPTInsuranceMapSourceBundlesCombinedSourcePhygenFacilitySourceSelfPayMobileRatesTransformAppointmentCPTUnpivot↳ feeds from Load TransformAppointmentCPTUnpivot, Load TransformVisitInsurance, Load VisitDelta - Load TransformSurgicalCPT (Meditech)sql
load_visit_transform_tables__load_transformsurgicalcpt_meditech.sql✨ Calculates surgical CPT rates and units for Meditech source data using fee schedules and bundled service logic.writesTransformSurgicalCPT· readsCPTWithModifierEndoscopyCPTInsuranceMapSourceBundlesCombinedSourcePhygenFacilityTransformAppointmentCPTUnpivotTransformFeeScheduleTransformVisitInsurance↳ feeds from Load TransformAppointmentCPTUnpivot, Load TransformVisitInsurance, Load VisitDelta - Load TransformPatientsql
load_visit_transform_tables__load_transformpatient.sql✨ Consolidates and loads patient demographic information, including contact details and addresses, from various appointment sources into the transformation table.writesTransformPatient· readsPatientDeltaSourceAppointmentSourceAppointmentMeditechSourceAppointmentMobileSourceHollySpringsAppointmentSourceedgewaterAppointment↳ feeds from Load PatientDelta - Load TransformVisitChargesql
load_visit_transform_tables__load_transformvisitcharge.sql✨ Generates visit charges by combining surgical CPT data with diagnosis coverage flags to determine final billable units and types.writesTransformVisitChargetempTransformSurgicalCPT· readsFullyCoveredDiagnosisTempTransformSurgicalCPTTransformVisitDiagnosisCodesVisitDelta↳ feeds from Load TransformVisitDiagnosisCodes, Load VisitDelta - Load TransformVisitsql
load_visit_transform_tables__load_transformvisit.sql✨ Builds the standardized visit transformation table by consolidating appointment data from multiple source systems and mapping facility and provider details.writesTransformVisit· readsPatientDeltaSourceAppointmentSourceAppointmentMeditechSourceAppointmentMobileSourceEpicFacilityReferenceSourceHollySpringsAppointmentSourcePhygenFacilitySourcePhygenSurgeons↳ feeds from Load PatientDelta, Load VisitDelta