HL7 real-time feed · ClarityFlow pipeline
EugeneGI · HL7-Processing-Nightly
Overall nightly processing job for HL7 pipeline. This is to auto generate letters as well as apply bundles and recheck any eligibility that might need rechecking
trigger
How it's scheduled
The HL7 real-time feed arrives as a scheduled drop, so one overnight pass is enough: it ingests the day's file and works the whole batch to check eligibility, price the good-faith estimate, and send the patient letter. A tighter loop would just re-scan the same file.
| Scheduled task | Cadence | Server | State | Coordination |
|---|---|---|---|---|
\MDC\HL7 - Processing - EugeneGI - Nightly | daily at 19:34 | prod-db-1 | enabled | standalone |
shape
Against the canonical Flow spine
Every Flow pipeline is a variation on one shape. Lit stages are the ones this pipeline runs; the labels match the capability lens.
computed concepts · from the SQL
What it computes
Business concepts mined from this pipeline's SQL text — the meaning behind the typed steps. Each links to the concept lens (who else computes it).
Payers in SQLMedicare
task tree
What the pipeline 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).
HL7-Processing-Nightly
- Load VisitDeltasql
hl7_processing_nightly__load_visitdelta.sql✨ Identifies visits that have been updated since the last run and are scheduled for the future to target processing.writesVisitDelta· readsProcessLogVisitVisitDelta - BackupQuoteBeforesql
hl7_processing_nightly__backupquotebefore.sqldisabled✨ Creates a dated backup of quote records for recently updated visits before new processing begins.· readssp_executesql ▶Load-Visits-Load-Batchsub-job · 4↗
- Load TempBatchVisitsql
load_visits_load_batch__load_tempbatchvisit.sqldisabled✨ Initializes the temporary batch table by identifying visits and insurance combinations that require eligibility verification based on business rules.writesTempBatchVisit· readsDimensionMemberEligibilityTxnTransformVisitTransformVisitInsuranceTransformVisitInsuranceCoverageStatusVisit - Augment Visit Deltasql
load_visits_load_batch__augment_visit_delta.sqldisabled✨ Adds visit records requiring new insurance eligibility lookups to the change tracking table for processing.writesVisitDelta· readsTempBatchVisitVisitDelta - LoadVisitBatchLoadVisitBatchLoad scheduled visits and associated charges into the processing pipeline using custom SQL queries for pricing estimation and quote generation.writes
QuoteBatchVisitBatch· readsInsuranceMapPatientTransformVisitTransformVisitInsuranceVisitVisitDeltacustom visit queryauto charge queryauto service type querycustom coverage queryadd zero charge ▶Flow-MM-HL7-Processing-CustomPropertysub-job · 8↗
- Load Primary Coverage StatusUpdateCustomPropertyFromQuery· reads
TransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=PrimaryCoverageStatuscustom querybatch mode - Load Secondary Coverage StatusUpdateCustomPropertyFromQuery· reads
TransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=SecondaryCoverageStatuscustom querybatch mode - Load Tertiary Coverage StatusUpdateCustomPropertyFromQuery· reads
TransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=TertiaryCoverageStatuscustom querybatch mode - LoadCustomNotesCustomPropertyLoadCustomNotesCustomProperty· reads
BundleNotesMappingHL7VisitVisitBatchentity=Visitcustom property key=CustomNotescustom querybatch mode - LoadPriorAuthCustomPropertyLoadPriorAuthCustomProperty· reads
CustomPropertyMapTransformVisitInsuranceVisitbatchsourcepriorauthdetailsentity=Visitcustom property key=PriorAuthcustom querybatch mode - LoadMedicaidRolloverCustomPropertyLoadMedicaidRolloverCustomProperty· reads
CustomPropertyMapTransformVisitInsuranceVisitBatchentity=Visitcustom property key=MedicaidRollovercustom querybatch mode - Load Has Active Medicaid/Medicare InsuranceUpdateCustomPropertyFromQuery· reads
DimensionMemberTransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=HasActiveMedicaid/MedicareInsurancecustom querybatch mode - Update HasMisMatchedMemberID Custom Property after recheckUpdateCustomPropertyFromQuery· reads
BatchVisitEligibilityEligibilityTxnVisitBatchentity=Visitcustom property key=HasMismatchedMemberIDcustom querybatch mode
- LoadPatients (Update ECC)LoadPatientsdisabledUpsert patient records into the patient dimension.· reads
PatientVisitBatchauto patient queryDISABLED ▶Load-Visits-Bundlessub-job · 2↗
- AutoApplyBundlesToVisitBatchAutoApplyBundlesToVisitBatchApplies matching charge bundles to batch visits based on facility and insurance to ensure consistent pricing across service types.
- Augment TempBatchVisitsql
load_visits_bundles__augment_tempbatchvisit.sqldisabled✨ Populates the temporary batch table with visit insurance details and flags records requiring new eligibility lookups based on current status.writesTempBatchVisit· readsDimensionMemberEligibilityTxnTempBatchVisitTransformVisitTransformVisitInsuranceTransformVisitInsuranceCoverageStatusVisitVisitBatch
▶Load-Visits-Benefits-To-AutoSendsub-job · 9↗
- CheckBenefitsflowVerifies insurance eligibility and retrieves detailed benefits information for visits by making real-time API calls to insurance providers.· reads
TempBatchVisitVisitBatchcustom query - Verifies insurance eligibility and retrieves detailed benefits information for visits by making real-time API calls to insurance providers.· reads
EligibilityStatusMapEligibilityTxnTempBatchVisitVisitBatchcustom queryDISABLED - AutoApplyBenefitsAutoApplyBenefitsPopulates insurance benefits like copays and deductibles on batch visits using data from eligibility verification transactions.
- CalculateVisitsflowCompute the good-faith estimate (CalculateVisits).· reads
DimensionMemberVisitBatchcustom querycalculate chargesbatch mode - ExportBatchVisitEligibility before recheckflowPush the batch to the app / export results.· reads
EligibilityTxnvisitbatchcustom querytable name=BatchVisitEligibility - Update HasMisMatchedMemberID Custom Property after recheckUpdateCustomPropertyFromQuery· reads
BatchVisitEligibilityEligibilityTxnVisitBatchentity=Visitcustom property key=HasMismatchedMemberIDcustom querybatch mode - LogVisitChangeEventsBatchLogVisitChangeEventsBatchCompare batch visits against production records to detect and log specific property changes for auditing and compliance tracking.
- Load TransformVisitInsuranceCoverageStatussql
load_visits_benefits_to_autosend__load_transformvisitinsurancecoveragestatus.sql✨ Updates insurance coverage statuses by analyzing the latest eligibility transactions to determine if coverage is active, inactive, or errored.writesTempEligibilityStatsTransformVisitInsuranceCoverageStatus· readsTempEligibilityStatsTransformVisitInsuranceVisitBatch ▶Load-CustomProperty-CoverageStatussub-job · 4↗
- Load Primary Coverage StatusUpdateCustomPropertyFromQuery· reads
CustomPropertyMapTransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=PrimaryCoverageStatuscustom querybatch mode - Load Secondary Coverage StatusUpdateCustomPropertyFromQuery· reads
CustomPropertyMapTransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=SecondaryCoverageStatuscustom querybatch mode - Load Tertiary Coverage StatusUpdateCustomPropertyFromQuery· reads
CustomPropertyMapTransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=TertiaryCoverageStatuscustom querybatch mode - Load Has Active Medicaid/Medicare InsuranceUpdateCustomPropertyFromQuery· reads
DimensionMemberTransformVisitInsuranceCoverageStatusVisitBatchentity=Visitcustom property key=HasActiveMedicaid/MedicareInsurancecustom querybatch mode
- BackupBatchsql
hl7_processing_nightly__backupbatch.sqldisabled✨ Creates daily backup copies of visit and quote batch tables to preserve historical data before processing.· readssp_executesql - AutoSendLettersAutoSendLettersGenerates and sends patient cost estimate letters for visits in the batch table based on configured qualification and communication rules.
▶Load-Visits-Sync-To-Endsub-job · 4↗
- Sync Visits and QuotesSyncBatchSynchronizes processed data from batch staging tables to production tables, updating visits, quotes, and custom property mappings.writes
CustomPropertyMapQuoteVisitVisitChangeEvent· readsCustomPropertyMapBatchQuoteBatchVisitBatchVisitChangeEventBatchsync quotesync visitsync custom property mapsync visit change event ▶Load-Visit-Factsub-job · 1↗
- Load VisitFactsql
load_visit_fact__load_visitfact.sql✨ Refreshes the visit fact table by recalculating statuses, payment flags, and letter activity for visits with recent updates or transactions.writesVisitFact· readsEligibilityStatusMapEligibilityTxnPatientLetterPaymentTxnVisit
▶Update-Dashboard-Tablessub-job · 1↗
- UpdateDashboardTablesUpdateDashboardTablesRegenerates optimized aggregate tables for all dashboard reports and updates their definitions to reflect the latest source data.
- LoadVisitBatchAutoSendsql
load_visits_sync_to_end__loadvisitbatchautosend.sql✨ Populates the auto-send queue with visit data to facilitate automated end-of-day processing and communication.writesVisitBatchAutoSend· readsVisitBatch
- WorkqueueAssignmentWorkqueueAssignmentAssigns accounts or visits to workqueue stacks by evaluating matching criteria and updating item lists based on search terms.
- BackupQuoteAftersql
hl7_processing_nightly__backupquoteafter.sqldisabled✨ Backs up quote records linked to modified visits to maintain a snapshot of data after processing updates.· readssp_executesql
markers
Why it classified as flow
Front-of-house actions found anywhere in the tree (including nested sub-jobs).