Batch / file feed · ClarityFlow pipeline
Wildflower · Flow-Processing
Overall Processing Job for Flow Pipeline
trigger
How it's scheduled
New appointments land continuously on the Batch / file 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 10 minutes to check eligibility, price the good-faith estimate, and send the patient letter within minutes of an appointment being booked, rather than waiting for an overnight batch.
| Scheduled task | Cadence | Server | State | Coordination |
|---|---|---|---|---|
\MDC\Batch - Processing - Wildflower - Flow | every 10 min (from 00:01) | prod-db-1 | disabled | 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-Processing
▶Flow-Source-ImportFilessub-job · 4↗
- DownloadDownloadDownloads files from remote FTP or SFTP servers to local directories with support for archiving and parallel transfers.server=Wildflower_ProdMirror-mdcssh-sftpremote directory=/local directory={SourceDataFolder}
▶Flow-Source-ProcessDataFilePatientsub-job · 1↗
- Process Patient FilesProcessFilewrites
ImportPatientSourcePatientfile path={FilePath}archive directory={SourceDataArchive}base table name=Patientrow terminator=Linefeedcolumn separator=Comma
▶Flow-Source-ProcessDataFileVisitsub-job · 1↗
- Process Visit FileProcessFilewrites
ImportVisitSourceVisitfile path={FilePath}archive directory={SourceDataArchive}base table name=Visitrow terminator=Linefeedcolumn separator=Comma
▶Flow-Source-ProcessDataFileVisitInsurancesub-job · 1↗
- Process VisitInsurance FileProcessFilewrites
ImportVisitInsuranceSourceVisitInsurancefile path={FilePath}archive directory={SourceDataArchive}base table name=VisitInsurancerow terminator=Linefeedcolumn separator=Comma
▶Flow-Transform-LoadTransformTablessub-job · 6↗
- Truncate VisitDeltasql
flow_transform_loadtransformtables__truncate_visitdelta.sql✨ Clears the visit delta table to prepare for a fresh set of changed records in the current pipeline run.writesVisitDelta - VisitDelta + Logssql
flow_transform_loadtransformtables__visitdelta_logs.sql✨ Identifies new or updated visit records and logs the batch process to track incremental data changes.writesBatchProcessLogVisitDelta· readsBatchProcessLogSourceVisitSourceVisitInsuranceVisitDelta↳ feeds from Truncate VisitDelta - Transform Patientsql
flow_transform_loadtransformtables__transform_patient.sql✨ Updates patient demographic information and contact details while standardizing gender values for the transformation layer.writesTransformPatient· readsBatchProcessLogSourcePatient↳ feeds from VisitDelta + Logs - Transform Visitsql
flow_transform_loadtransformtables__transform_visit.sql✨ Refreshes visit details like status, time, and provider for records identified as changed in the current batch.writesTransformVisit· readsSourceVisitVisitDelta↳ feeds from Truncate VisitDelta, VisitDelta + Logs - Transform VisitInsurancesql
flow_transform_loadtransformtables__transform_visitinsurance.sql✨ Updates insurance coverage details for changed visits by mapping source insurance identifiers to standardized internal values.writesTransformVisitInsurance· readsInsuranceMapSourceVisitInsuranceVisitDelta↳ feeds from Truncate VisitDelta, VisitDelta + Logs - Transform VisitChargesql
flow_transform_loadtransformtables__transform_visitcharge.sql✨ Calculates and updates visit charges by mapping CPT codes and modifiers to standardized service types and charge definitions.writesTransformVisitCharge· readsChargeTypeSourceVisitVisitDelta↳ feeds from Truncate VisitDelta, VisitDelta + Logs
- Execute LoadPatientsLoadPatientsUpsert patient records into the patient dimension.· reads
PatientTransformPatientcustom patient query ▶Flow-Transform-LoadDimensionMemberssub-job · 8↗
- LoadInsuranceDimensionMembersLoadInsuranceDimensionMembersSynchronize insurance-specific dimension members from the insurance table to update contract and eligibility filtering options across the application.writes
DimensionMemberload insuranceload quote insuranceload eligibility insurance - Load Time Dimensionssql
flow_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_transform_loaddimensionmembers__load_visitstatus_dimension.sql✨ Loads appointment status values into the visit status dimension to track patient encounter progress.writesDimensionMember· readsTransformVisit - Load Provider Dimensionsql
flow_transform_loaddimensionmembers__load_provider_dimension.sql✨ Updates provider and provider type dimensions to maintain a hierarchical relationship between individual clinicians and their professional categories.writesDimensionMember· readsProvider - Load Facility Dimensionssql
flow_transform_loaddimensionmembers__load_facility_dimensions.sql✨ Builds and updates facility dimension members to maintain a consistent list of healthcare locations for reporting.writesDimensionMember· readsFacility - Load VisitType Dimensionssql
flow_transform_loaddimensionmembers__load_visittype_dimensions.sql✨ Loads unique visit types into the dimension table to standardize appointment categories for downstream processing.writesDimensionMember· readsTransformVisit - Load SourceInsurance Dimensionssql
flow_transform_loaddimensionmembers__load_sourceinsurance_dimensions.sqldisabled✨ Loads source insurance and insurance parent dimensions to map specific insurance packages to their broader reporting categories.writesDimensionMember· readsAccountInsuranceDimensionMemberInsuranceMapSourcePayer - Load State Dimensionssql
flow_transform_loaddimensionmembers__load_state_dimensions.sql✨ Updates state dimensions using facility location data to allow for geographic segmentation of healthcare services and revenue.writesDimensionMember· readsFacility
▶Flow-Processing-LoadVisitssub-job · 23↗
- Load TempBatchVisitsql
flow_processing_loadvisits__load_tempbatchvisit.sql✨ Identifies upcoming visits requiring insurance eligibility verification based on service types, appointment dates, and previous coverage status.writesTempBatchVisitVisitEligServiceTypesVisitServiceTypes· readsDimensionMemberTempBatchVisitTransformVisitTransformVisitInsuranceTransformVisitInsuranceCoverageStatusVisitEligServiceTypesVisitServiceTypes↳ feeds from Load TransformVisitInsuranceCoverageStatus, WildFlower Augment TempBatchVisit - Augment Visit Deltasql
flow_processing_loadvisits__augment_visit_delta.sql✨ Updates the visit delta table by adding records flagged as requiring new insurance eligibility lookups from the batch process.writesVisitDelta· readsTempBatchVisitVisitDelta↳ feeds from Augment VisitDelta for ReprocessChangedConfig, Load TempBatchVisit, WildFlower Augment TempBatchVisit - WildFlower Augment TempBatchVisitsql
flow_processing_loadvisits__wildflower_augment_tempbatchvisit.sql✨ Augments the eligibility check batch with additional visits from specific source systems that lack recent or successful coverage verification.writesTempBatchVisit· readsDimensionMemberTempBatchVisitTransformVisitTransformVisitInsuranceTransformVisitInsuranceCoverageStatusVisitDelta↳ feeds from Augment Visit Delta, Augment VisitDelta for ReprocessChangedConfig, Load TempBatchVisit, Load TransformVisitInsuranceCoverageStatus - ReprocessChangedConfigurationsReprocessChangedConfigurationsIdentify and queue visits or accounts affected by configuration changes to ensure historical data reflects updated pricing or insurance rules.reprocess visits
- Augment VisitDelta for ReprocessChangedConfigsql
flow_processing_loadvisits__augment_visitdelta_for_reprocesschangedconfig.sql✨ Updates insurance mappings for reprocessed visits and adds them to the delta table for downstream processing.writesVisitDeltaVisitKeyLookup· readsVisitDeltaVisitKeyLookup↳ feeds from Augment Visit Delta - LoadVisitBatchLoadVisitBatchLoad scheduled visits and associated charges into the processing pipeline using custom SQL queries for pricing estimation and quote generation.writes
QuoteBatchVisitBatch· readsFacilityPatientTransformVisitTransformVisitChargeTransformVisitInsuranceVisitVisitDelta↳ feeds from Augment Visit Delta, Augment VisitDelta for ReprocessChangedConfig, Sync Visits and Quotescustom visit querycustom charge querycustom service type querycustom coverage queryadd zero charge - load-custom-propertiessub-job
- 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.· reads
TempBatchVisitVisitBatch↳ feeds from Load TempBatchVisit, LoadVisitBatch, WildFlower Augment TempBatchVisitcustom 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 - AutoSendLettersAutoSendLettersGenerates and sends patient cost estimate letters for visits in the batch table based on configured qualification and communication rules.
- LogVisitChangeEventsBatchLogVisitChangeEventsBatchCompare batch visits against production records to detect and log specific property changes for auditing and compliance tracking.
- Load TransformVisitInsuranceCoverageStatussql
flow_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 ▶Load-CustomProperty-CoverageStatussub-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 - WorkqueueAssignmentWorkqueueAssignmentAssigns accounts or visits to workqueue stacks by evaluating matching criteria and updating item lists based on search terms.
- Update Logssql
flow_processing__update_logs.sql✨ Updates the batch process log to mark the current processing cycle as successfully finished.· readsBatchProcessLog - 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).