HL7 real-time feed · ClarityFlow pipeline
SWOrofacial · Flow-HL7-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 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\HL7 - Processing - SWOroFacial | every 10 min (from 00:01) | prod-db-3 | 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-HL7-Processing
- DownloadDownloadDownloads files from remote FTP or SFTP servers to local directories with support for archiving and parallel transfers.server=SWOrofacial_ProdMirror-advancedmd-sftpremote directory=/local directory={HL7Download}
- Clean and Move HL7ExecuteProcesscommand="D:\ClientData\SWOroFacial\py.bat"
- 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_hl7_processing__hl7processlog_hl7delta.sql✨ Identifies new scheduling messages from a specific source and stages the most recent updates for processing.writesHL7ADTBatchHL7DeltaHL7ProcessLogHL7ProcessLogArchiveKeysHL7SIUBatch· readsHL7ADTBatchHL7ArchiveHL7SIUBatchTransformPatientTransformVisit ▶Flow-HL7-Processing-Load-Entitiessub-job · 4↗Load Facility, Provider, InsuranceMap
- Load FacilityLoadEntitieswrites
Facility· readsFacilityHL7Visitentity type=Facilitycustom querykey prefix=F - Load Providersql
flow_hl7_processing_load_entities__load_provider.sqldisabled✨ Loads provider information from HL7 order messages into the master provider table using the most recent record available.writesProvider· readsHL7Order - Load ProviderMergeSqlwrites
Provider· readsHL7VisitProvidermerge data source type=ThisDatabasetable name=Providermerge mode=InsertUpdatebulk copy timeout seconds=300bulk copy use table lock - Load InsuranceMapLoadEntitieswrites
InsuranceMap· readsHL7PatientHL7VisitInsuranceMapentity type=InsuranceMapcustom querykey prefix=IM
▶Flow-HL7-Transformsub-job · 9↗HL7 Transformation Layer
- TruncateVisitDeltasql
flow_hl7_transform__truncatevisitdelta.sql✨ Clears the visit delta table to prepare for a fresh set of changed records in the current pipeline run.writesVisitDelta - ImportHL7ADTCombinedsql
flow_hl7_transform__importhl7adtcombined.sql✨ Builds a combined view of patient demographics and insurance by merging the latest visit and patient records from HL7 messages.writesImportHL7ADTCombined· readsHL7DeltaHL7PatientHL7Visit - Merge TransformPatientMergeSqlwrites
TransformPatient· readsImportHL7ADTCombined↳ feeds from ImportHL7ADTCombinedmerge data source type=ThisDatabasetable name=TransformPatientmerge mode=InsertUpdatebulk copy timeout seconds=300bulk copy use table lock - ImportTransformPatientInsurancesql
flow_hl7_transform__importtransformpatientinsurance.sql✨ Loads patient insurance details by unpivoting multiple coverage layers from combined HL7 data and mapping them to standardized insurance entities.writesImportTransformPatientInsurance· readsImportHL7ADTCombinedInsuranceMap↳ feeds from ImportHL7ADTCombined - TransformPatientInsurance+VisitDeltasql
flow_hl7_transform__transformpatientinsurance_visitdelta.sql✨ Updates patient insurance records and flags future visits in the delta table when insurance changes are detected.writesTransformPatientInsuranceVisitDelta· readsInsuranceChangesTransformVisitimporttransformpatientinsurance↳ feeds from ImportTransformPatientInsurance, MergeTransformVisit+VisitDelta - ImportTransformVisitsql
flow_hl7_transform__importtransformvisit.sql✨ Loads visit and appointment data from HL7 messages, determining the current status based on message type and schedule date.writesImportTransformVisit· readsFacilityHL7ArchiveHL7DeltaHL7Visit - MergeTransformVisit+VisitDeltasql
flow_hl7_transform__mergetransformvisit_visitdelta.sql✨ Updates the main visit transformation table and flags new or modified visits in the delta table for downstream processing.writesTransformVisitVisitDelta· readsImportTransformVisitVisitDelta↳ feeds from ImportTransformVisit, TransformPatientInsurance+VisitDelta, TruncateVisitDelta - ImportTransformVisitInsurancesql
flow_hl7_transform__importtransformvisitinsurance.sql✨ Loads visit-specific insurance records by joining the latest patient insurance data with visits identified in the delta table.writesImportTransformVisitInsurance· readsTransformPatientInsuranceTransformVisitVisitDelta↳ feeds from MergeTransformVisit+VisitDelta, TransformPatientInsurance+VisitDelta, TruncateVisitDelta - MergeTransformVisitInsurancesql
flow_hl7_transform__mergetransformvisitinsurance.sql✨ Updates the visit insurance transformation table by replacing existing records with the latest imported insurance data for each visit.writesTransformVisitInsurance· readsImportTransformVisitInsurance↳ feeds from ImportTransformVisitInsurance
- LoadPatientsLoadPatientsUpsert patient records into the patient dimension.· reads
PatientTransformPatientcustom patient query ▶Flow-HL7-Processing-LoadDimensionMemberssub-job · 15↗
- Load Insurance Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_insurance_dimension.sqldisabled✨ Populates the insurance dimension with unique carrier keys to enable filtering and analysis by payer.writesDimensionMember· readsInsurance - Load EligibilityInsurance Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_eligibilityinsurance_dimension.sqldisabled✨ Loads insurance members that support electronic eligibility and benefits verification via API integration.writesDimensionMember· readsDimensionMemberInsurance - Load QuoteInsurance Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_quoteinsurance_dimension.sqldisabled✨ Builds a dimension of insurance providers associated with active contracts to facilitate accurate patient cost estimates.writesDimensionMember· readsContractMapInsurance - 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_hl7_processing_loaddimensionmembers__load_time_dimensions.sql✨ Populates time dimension hierarchies for days, months, and years using appointment timestamps to support temporal data analysis.writesDimensionMember· readsTransformVisit - Load VisitStatus Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_visitstatus_dimension.sql✨ Builds the visit status dimension by extracting unique appointment statuses from transformed visit data.writesDimensionMember· readsTransformVisit - Load Provider Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_provider_dimension.sql✨ Synchronizes provider details into the dimension member table to enable provider-based filtering and grouping in reports.writesDimensionMember· readsProvider - Load Facility Dimensionssql
flow_hl7_processing_loaddimensionmembers__load_facility_dimensions.sql✨ Updates the facility dimension table by merging new or changed facility and facility group hierarchy information.writesDimensionMember· readsDimensionMemberFacility↳ feeds from FacilityType, Load Provider Dimension, Load State Dimensions, Load Time Dimensions, Load VisitStatus Dimension, Load VisitType Dimensions, LoadInsuranceDimensionMembers - Load VisitType Dimensionssql
flow_hl7_processing_loaddimensionmembers__load_visittype_dimensions.sql✨ Updates the visit type dimension table by merging unique appointment types and descriptions extracted from HL7 message data.writesDimensionMember· readsHL7Visit - Load Diagnosis Code Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_diagnosis_code_dimension.sqldisabled✨ Loads and updates the DiagnosisCode dimension by extracting unique primary, secondary, and tertiary diagnosis codes from charge data.writesDimensionMember· readsTransformCharge - Load RadioIsotopes Code Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_radioisotopes_code_dimension.sqldisabled✨ Flags and updates the RadioIsotopes dimension to indicate the presence of radioisotope codes within the source risk data.writesDimensionMember· readsSourceCareRiskRadioIsotopeCodes - Load Place of Service Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_place_of_service_dimension.sqldisabled✨ Builds and updates the PlaceOfService dimension using unique location codes extracted from charge transaction records.writesDimensionMember· readsTransformCharge - Load SourceInsurance Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_sourceinsurance_dimension.sqldisabled✨ Loads and updates the SourceInsurance dimension with mapped insurance provider details for specific data sources and active accounts.writesDimensionMember· readsAccountInsuranceInsuranceMap - Load State Dimensionssql
flow_hl7_processing_loaddimensionmembers__load_state_dimensions.sql✨ Updates state dimensions using facility location data to allow for geographic segmentation of healthcare services and revenue.writesDimensionMember· readsFacility - FacilityTypesql
flow_hl7_processing_loaddimensionmembers__facilitytype.sql✨ Loads facility type dimension members from facility records to enable standardized categorization across the revenue cycle pipeline.writesDimensionMember· readsFacility
▶Flow-HL7-Processing-LoadVisitssub-job · 21↗
- Augment Visit Deltasql
flow_hl7_processing_loadvisits__augment_visit_delta.sqldisabled✨ Updates the visit delta table by adding records flagged as requiring new insurance eligibility lookups from the batch process.writesVisitDelta· readsTempBatchVisitVisitDelta - ReprocessChangedConfigurationsReprocessChangedConfigurationsIdentify and queue visits or accounts affected by configuration changes to ensure historical data reflects updated pricing or insurance rules.reprocess visits
- Augment VisitDelta - ReprocessChangedConfigssql
flow_hl7_processing_loadvisits__augment_visitdelta_reprocesschangedconfigs.sql✨ Updates insurance mappings for queued visits and adds modified records to the change tracking table for reprocessing.writesVisitDeltaVisitKeyLookup· readsTransformVisitVisitDeltaVisitKeyLookup - LoadVisitBatchLoadVisitBatchLoad scheduled visits and associated charges into the processing pipeline using custom SQL queries for pricing estimation and quote generation.writes
QuoteBatchVisitBatch· readsInsuranceMapPatientTransformVisitTransformVisitInsuranceVisitVisitDelta↳ feeds from Augment VisitDelta - ReprocessChangedConfigs, Sync Visits and Quotescustom visit queryauto charge querycustom service type querycustom coverage queryadd zero charge - AutoApplyBundlesToVisitBatchAutoApplyBundlesToVisitBatchApplies matching charge bundles to batch visits based on facility and insurance to ensure consistent pricing across service types.
- 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 - Assigns accounts or visits to workqueue stacks by evaluating matching criteria and updating item lists based on search terms.DISABLED
- Generates and sends patient cost estimate letters for visits in the batch table based on configured qualification and communication rules.DISABLED
- LogVisitChangeEventsBatchLogVisitChangeEventsBatchCompare batch visits against production records to detect and log specific property changes for auditing and compliance tracking.
- Load TransformVisitInsuranceCoverageStatussql
flow_hl7_processing_loadvisits__load_transformvisitinsurancecoveragestatus.sql✨ Updates visit insurance coverage status by calculating the latest eligibility transaction results and mapping them to standardized status categories.writesTempEligibilityStatsTransformVisitInsuranceCoverageStatus· readsTempEligibilityStatsTransformVisitInsuranceVisitBatch↳ feeds from LoadVisitBatch ▶Flow-HL7-Processing-CustomPropertyCoverageStatussub-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
- Update HL7ProcessLogsql
flow_hl7_processing__update_hl7processlog.sql✨ Updates the HL7 process log status to completed and records the last processed archive key for tracking.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.
▶Flow-HL7-Processing-LoadVisit-Factsub-job · 1↗
- VisitFact Loadsql
flow_hl7_processing_loadvisit_fact__visitfact_load.sql✨ Updates the visit fact table by refreshing records that have recent activity in payments, eligibility checks, or patient communications.writesVisitFact· readsEligibilityStatusMapEligibilityTxnPatientLetterPaymentTxnVisit
- Exports pending patient letters as HL7 messages with PDF attachments to a local directory for transmission to external systems.output file path={HL7SendLettersOutput}publish directory={HL7SendLettersOutput}sending application=MDClaritysending facility=MDClarityreceiving application={HL7SendingApplicationName}
markers
Why it classified as flow
Front-of-house actions found anywhere in the tree (including nested sub-jobs).