HL7 real-time feed · ClarityFlow pipeline
OrthoAlliance · Flow-34792-Processing
Overall Processing job for HL7 pipeline
trigger
How it's scheduled
New appointments land continuously on the HL7 real-time feed. Front-of-house work is time-boxed — the estimate and letter have to reach the patient before the visit — so the pipeline polls every 5 minutes to check eligibility and price the good-faith estimate within minutes of an appointment being booked, rather than waiting for an overnight batch.
| Scheduled task | Cadence | Server | State | Coordination |
|---|---|---|---|---|
\MDC\HL7 - Processing - OrthoAlliance | every 5 min (from 00:01) | 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).
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).
Flow-34792-Processing
- LoadHL7FilesLoadHL7FilesParses and imports patient demographics, visits, and charges from HL7 message files located in a specified directory.message folder path={HL7Directory}message processed folder path={HL7Archive}add timestamp to file name
- HL7ProcessLog + HL7Deltasql
flow_34792_processing__hl7processlog_hl7delta.sql✨ Identifies new scheduling messages from the archive and stages the most recent updates for processing in the delta table.writesHL7ADTBatchHL7DeltaHL7ProcessLogHL7ProcessLogArchiveKeysHL7SIUBatch· readsHL7ADTBatchHL7ArchiveHL7SIUBatchTransformPatientTransformVisit ▶Flow-34792-Transformsub-job · 9↗HL7 Transformation Layer
- TruncateOrthosVisitDeltasql
flow_34792_transform__truncateorthosvisitdelta.sql✨ Clears the visit delta table to prepare for a fresh set of changed records in the current pipeline run.writesVisitDelta - ImportHL7ADTCombinedsql
flow_34792_transform__importhl7adtcombined.sql✨ Consolidates patient demographics and insurance details from HL7 messages into a unified table for further data transformation.writesImportHL7ADTCombined - TransformPatientsql
flow_34792_transform__transformpatient.sql✨ Updates or inserts patient demographic records into the transformed patient table using the most recent HL7 message data.writesTransformPatient· readsHL7ArchiveHL7DeltaHL7VisitImportHL7ADTCombined↳ feeds from ImportHL7ADTCombined - ImportTransformPatientInsurancesql
flow_34792_transform__importtransformpatientinsurance.sql✨ Loads patient insurance coverage details into a staging table, mapping source insurance identifiers to standardized insurance records.writesImportTransformPatientInsurance· readsImportHL7ADTCombinedInsuranceMap↳ feeds from ImportHL7ADTCombined - TransformPatientInsurance+VisitDeltasql
flow_34792_transform__transformpatientinsurance_visitdelta.sql✨ Synchronizes patient insurance records and flags upcoming visits for reprocessing when insurance information changes.writesTransformPatientInsuranceVisitDelta· readsInsuranceChangesTransformVisitimporttransformpatientinsurance↳ feeds from ImportTransformPatientInsurance, MergeTransformVisit+VisitDelta - ImportTransformVisitsql
flow_34792_transform__importtransformvisit.sql✨ Extracts and stages appointment data from HL7 messages, resolving provider identifiers and facility locations for visit transformation.writesImportTransformVisit· readsHL7DeltaHL7VisitSourceProvider_34792 - MergeTransformVisit+VisitDeltasql
flow_34792_transform__mergetransformvisit_visitdelta.sql✨ Updates the transformed visit table with staged appointment data and records new or modified visits in the delta tracking table.writesTransformVisitVisitDelta· readsImportTransformVisitVisitDelta↳ feeds from ImportTransformVisit, TransformPatientInsurance+VisitDelta, TruncateOrthosVisitDelta - ImportTransformVisitInsurancesql
flow_34792_transform__importtransformvisitinsurance.sql✨ Stages insurance information for specific visits by linking patient insurance records to visits flagged for update or creation.writesImportTransformVisitInsurance· readsTransformPatientInsuranceTransformVisitVisitDelta↳ feeds from MergeTransformVisit+VisitDelta, TransformPatientInsurance+VisitDelta, TruncateOrthosVisitDelta - MergeTransformVisitInsurancesql
flow_34792_transform__mergetransformvisitinsurance.sql✨ Refreshes the visit insurance table by replacing existing records with updated insurance details from the staging table.writesTransformVisitInsurance· readsImportTransformVisitInsurance↳ feeds from ImportTransformVisitInsurance
- LoadPatientsLoadPatientsUpsert patient records into the patient dimension.· reads
PatientTransformPatientcustom patient query ▶Flow-34792-Transform-LoadDimensionMemberssub-job · 3↗
- Load Time Dimensionssql
flow_34792_transform_loaddimensionmembers__load_time_dimensions.sql✨ Builds and updates time-based dimension members for days, months, and years based on the range of scheduled appointment dates.writesDimensionMember· readsTransformVisit - Load VisitStatus Dimensionsql
flow_34792_transform_loaddimensionmembers__load_visitstatus_dimension.sql✨ Loads appointment status values into the visit status dimension to track patient encounter progress.writesDimensionMember· readsTransformVisit - Load VisitType Dimensionssql
flow_34792_transform_loaddimensionmembers__load_visittype_dimensions.sql✨ Builds and updates visit type dimension members using the most recent appointment data from HL7 visit messages.writesDimensionMember· readsHL7Visit
▶Flow-34792-Processing-LoadVisitssub-job · 17↗
- ReprocessChangedConfigurationsReprocessChangedConfigurationsIdentify and queue visits or accounts affected by configuration changes to ensure historical data reflects updated pricing or insurance rules.reprocess visits
- ReprocessChangedConfigs Updatessql
flow_34792_processing_loadvisits__reprocesschangedconfigs_updates.sql✨ Builds a lookup for visits requiring reprocessing and adds them to the change tracking table following configuration updates.writesVisitDeltaVisitKeyLookup· readsTransformVisitVisitDeltaVisitKeyLookup - LoadVisitBatchLoadVisitBatchLoad scheduled visits and associated charges into the processing pipeline using custom SQL queries for pricing estimation and quote generation.writes
QuoteBatchVisitBatch· readsFacilityInsuranceMapPatientTransformVisitTransformVisitInsuranceVisitVisitDelta↳ feeds from ReprocessChangedConfigs Updates, Sync Visits and Quotescustom visit queryauto charge querycustom service type querycustom coverage queryadd zero charge - Applies matching charge bundles to batch visits based on facility and insurance to ensure consistent pricing across service types.DISABLED
- CheckBenefitsflowVerifies insurance eligibility and retrieves detailed benefits information for visits by making real-time API calls to insurance providers.auto 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
DimensionMemberVisitBatch↳ feeds from LoadVisitBatchcustom querycalculate chargesbatch mode - LogVisitChangeEventsBatchLogVisitChangeEventsBatchCompare batch visits against production records to detect and log specific property changes for auditing and compliance tracking.
- Load TransformVisitInsuranceCoverageStatussql
flow_34792_processing_loadvisits__load_transformvisitinsurancecoveragestatus.sql✨ Loads insurance coverage status by calculating the latest eligibility transaction results for visits in the current batch.writesTempEligibilityStatsTransformVisitInsuranceCoverageStatus· readsTempEligibilityStatsTransformVisitInsuranceVisitBatch↳ feeds from LoadVisitBatch ▶Flow-34792-Processing-CustPropCoverageStatussub-job · 3↗
- 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
- Sync Visits and QuotesSyncBatchSynchronizes processed data from batch staging tables to production tables, updating visits, quotes, and custom property mappings.writes
CustomPropertyMapQuoteVisitVisitChangeEvent· readsCustomPropertyMapBatchQuoteBatchVisitBatchVisitChangeEventBatch↳ feeds from LoadVisitBatchsync quotesync visitsync custom property mapsync visit change event - ExportBatchVisitEligibilityflowdisabledPush the batch to the app / export results.· reads
EligibilityTxnVisitBatchcustom querytable name=BatchEligibility_Resultsarchive table name=BatchEligibility_ResultsArchiveDISABLED - SearchForInsuranceflowdisabledFind coverage for visits missing insurance.· reads
EligibilityTxnBatchcustom querytable name=InsuranceSearch_Resultbatch modeDISABLED ▶Load-Visit-Factsub-job · 1↗
- Load VisitFactsql
load_visit_fact__load_visitfact.sql✨ Refreshes the visit fact table by recalculating metrics for encounters with recent updates, payments, eligibility checks, or patient communications.writesVisitFact· readsEligibilityStatusMapEligibilityTxnPatientLetterPaymentTxnVisit
▶Update-Dashboard-Tablessub-job · 2↗
▶Load-Visit-Factsub-job · 1↗
- Load VisitFactsql
load_visit_fact__load_visitfact.sql✨ Refreshes the visit fact table by recalculating metrics for encounters with recent updates, payments, eligibility checks, or patient communications.writesVisitFact· readsEligibilityStatusMapEligibilityTxnPatientLetterPaymentTxnVisit
- UpdateDashboardTablesUpdateDashboardTablesRegenerates optimized aggregate tables for all dashboard reports and updates their definitions to reflect the latest source data.
- UpdateHL7ProcessLogsql
flow_34792_processing__updatehl7processlog.sql✨ Updates the process log to completed status and records the last processed archive key for future incremental runs.writesHL7ProcessLogLastArchiveKey· readsHL7DeltaHL7ProcessLogHL7ProcessLogLastArchiveKey↳ feeds from HL7ProcessLog + HL7Delta - WorkqueueAssignmentWorkqueueAssignmentAssigns accounts or visits to workqueue stacks by evaluating matching criteria and updating item lists based on search terms.
markers
Why it classified as flow
Front-of-house actions found anywhere in the tree (including nested sub-jobs).