HL7 real-time feed · ClarityFlow pipeline
RIA · 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 1 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. It stands down while HL7 - Processing - RIA - Nightly runs (the heavier nightly pass).
| Scheduled task | Cadence | Server | State | Coordination |
|---|---|---|---|---|
\MDC\HL7 - Processing - RIA | every 1 min (from 00:01) | prod-db-3 | enabled | yields to HL7 - Processing - RIA - Nightly |
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=RIA_ProdMirror-abbadox-sftpremote directory=/Outbound/local directory={HL7Directory}
- 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 order messages from the archive and stages the latest updates for processing in the delta table. ▶Flow-HL7-Transform-Concisesub-job · 14↗HL7 Transformation Layer - more efficient run for 1 minute interval
- TruncateVisitDeltasql
flow_hl7_transform_concise__truncatevisitdelta.sql✨ Clears the visit delta table to prepare for a fresh set of changed records in the current pipeline run.writesVisitDelta - TransformVisitIDMapsql
flow_hl7_transform_concise__transformvisitidmap.sql✨ Builds unique source identifiers for new patient visits based on patient IDs and scheduled dates from incoming message data.writesTransformVisitIDMap· readsHL7DeltaTransformVisitIDMap - OrderSourceIDDeltasql
flow_hl7_transform_concise__ordersourceiddelta.sql✨ Updates order-level changes and identifies visits where all associated orders have been cancelled to refresh the visit status.writesOrderSourceIDDeltaTransformOrderSourceIDMap· readsHL7DeltaTransformOrderSourceIDMapTransformVisitIDMap↳ feeds from TransformVisitIDMap - ImportHL7ADTCombinedsql
flow_hl7_transform_concise__importhl7adtcombined.sql✨ Builds a consolidated table of the most recent patient demographic and insurance information from admission, discharge, and transfer messages.writesImportHL7ADTCombined· readsHL7DeltaHL7Patient - TransformPatientsql
flow_hl7_transform_concise__transformpatient.sql✨ Updates or inserts patient demographic records by merging the latest data from combined messages while ensuring only newer information is saved.writesTransformPatient· readsHL7DeltaHL7OrderImportHL7ADTCombinedPatientTransformPatient↳ feeds from ImportHL7ADTCombined - ImportTransformPatientInsurancesql
flow_hl7_transform_concise__importtransformpatientinsurance.sql✨ Builds a staging table of patient insurance updates by deduplicating coverages and mapping source insurance identifiers to standard system values.writesImportTransformPatientInsurance· readsImportHL7ADTCombinedInsuranceMap↳ feeds from ImportHL7ADTCombined - Merge TransformPatientInsurance+VisitDeltasql
flow_hl7_transform_concise__merge_transformpatientinsurance_visitdelta.sql✨ Updates patient insurance records and flags future visits for reprocessing when insurance details change.writesTransformPatientInsuranceVisitDelta· readsInsuranceChangesTransformVisitimporttransformpatientinsurance↳ feeds from ImportTransformPatientInsurance, MergeTransformVisit+VisitDelta - ImportTransformVisitsql
flow_hl7_transform_concise__importtransformvisit.sql✨ Loads visit data from HL7 orders into a staging table while mapping clinical order statuses to standardized appointment statuses.writesImportTransformVisit· readsHL7OrderOrderSourceIDDeltaTransformOrderSourceIDMap↳ feeds from OrderSourceIDDelta - MergeTransformVisit+VisitDeltasql
flow_hl7_transform_concise__mergetransformvisit_visitdelta.sql✨ Synchronizes visit details with the main transform table and tracks modified future appointments for downstream updates.writesTransformVisitVisitDelta· readsChangedVisitsVisitDelta↳ feeds from Merge TransformPatientInsurance+VisitDelta, MergeTransformVisitCharge, TruncateVisitDelta - ImportTransformVisitInsurancesql
flow_hl7_transform_concise__importtransformvisitinsurance.sql✨ Stages the most recent insurance information for specific visits by linking patient insurance records to flagged visit changes.writesImportTransformVisitInsurance· readsHL7OrderTransformOrderSourceIDMapTransformPatientInsuranceVisitDelta↳ feeds from Merge TransformPatientInsurance+VisitDelta, MergeTransformVisit+VisitDelta, MergeTransformVisitCharge, OrderSourceIDDelta, TruncateVisitDelta - MergeTransformVisitInsurancesql
flow_hl7_transform_concise__mergetransformvisitinsurance.sql✨ Updates the main insurance transformation table by replacing existing records with newly imported and mapped insurance information.writesTransformVisitInsurance· readsImportTransformVisitInsurance↳ feeds from ImportTransformVisitInsurance - Recalculate Changed Bundlessql
flow_hl7_transform_concise__recalculate_changed_bundles.sqldisabled✨ Identifies and recalculates expected charges from service bundles for future visits to ensure accurate cost estimates.writesOrderSourceIDDeltaVisitDelta· readsBundleChargeTypeHL7OrderImportTransformVisitChargeTransformInsuranceMapServiceTypeTransformOrderSourceIDMapTransformVisitTransformVisitInsurance - ImportTransformVisitChargesql
flow_hl7_transform_concise__importtransformvisitcharge.sql✨ Loads visit charges into a staging table by matching scheduled services against insurance-specific or default billing bundles.writesImportTransformVisitCharge· readsChargeTypeHL7OrderImportTransformVisitChargeOrderSourceIDDeltaTransformBundleMapTransformInsuranceMapServiceTypeTransformOrderSourceIDMapTransformVisitInsurance↳ feeds from MergeTransformVisitInsurance, OrderSourceIDDelta - MergeTransformVisitChargesql
flow_hl7_transform_concise__mergetransformvisitcharge.sql✨ Updates the master visit charge table and flags visits for recalculation when their associated billing codes or units change.writesTransformVisitChargeVisitDelta· readsChangedChargesImportTransformVisitChargeVisitDelta↳ feeds from ImportTransformVisitCharge, Merge TransformPatientInsurance+VisitDelta, MergeTransformVisit+VisitDelta, TruncateVisitDelta
- LoadPatientsLoadPatientsUpsert patient records into the patient dimension.· reads
PatientTransformPatientcustom patient query ▶Flow-HL7-Processing-Load-Entitiessub-job · 4↗Load Facility, Provider, InsuranceMap
- Load FacilityLoadEntitieswrites
Facility· readsFacilityHL7Orderentity type=Facilitycustom query - 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· readsHL7Ordermerge data source type=ThisDatabasetable name=Providermerge mode=InsertUpdatebulk copy timeout seconds=300bulk copy use table lock - Load InsuranceMapLoadEntitieswrites
InsuranceMap· readsHL7PatientInsuranceMapentity type=InsuranceMapcustom querykey prefix=IM
▶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✨ Builds and updates time-based dimension members, including days, months, and years, for reporting and analytical hierarchies.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✨ Loads facility and facility group hierarchies into the dimension table to organize location-based data for analysis.writesDimensionMember· readsDimensionMemberFacility↳ feeds from 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✨ Synchronizes visit type definitions and display names in the dimension table using data from HL7 messages and reference crosswalks.writesDimensionMember· readsHL7OrderRIACPTCrosswalk - 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 Modifier Dimensionsql
flow_hl7_processing_loaddimensionmembers__load_modifier_dimension.sqldisabled✨ Loads and updates the Modifier dimension by collecting unique modifier codes from multiple charge record fields.writesDimensionMember· readsTransformCharge - 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
▶Flow-HL7-Processing-LoadVisitssub-job · 24↗
- Load TempBatchVisitsql
flow_hl7_processing_loadvisits__load_tempbatchvisit.sqldisabled✨ Identifies visits requiring insurance eligibility checks or re-checks based on service types and proximity to the scheduled appointment date.writesTempBatchVisitVisitEligServiceTypesVisitServiceTypes· readsDimensionMemberTempBatchVisitTransformVisitTransformVisitInsTransformVisitInsuranceTransformVisitInsuranceCoverageStatusVisitEligServiceTypesVisitServiceTypes - Augment Visit Deltasql
flow_hl7_processing_loadvisits__augment_visit_delta.sqldisabled✨ Updates the change tracking table with future visits when insurance mappings change to ensure updated coverage information is processed. - Identify and queue visits or accounts affected by configuration changes to ensure historical data reflects updated pricing or insurance rules.reprocess visitsDISABLED
- ReprocessChangedConfigs-AugmentVisitDeltasql
flow_hl7_processing_loadvisits__reprocesschangedconfigs_augmentvisitdelta.sqldisabled✨ Flags visits requiring reprocessing from the queue and adds them to the change tracking table for updated data loading.writesVisitDeltaVisitKeyLookup· readsVisitDeltaVisitKeyLookup - LoadVisitBatchLoadVisitBatchLoad scheduled visits and associated charges into the processing pipeline using custom SQL queries for pricing estimation and quote generation.writes
QuoteBatchVisitBatch· readsFacilityInsuranceMapPatientTransformVisitTransformVisitChargeTransformVisitInsuranceVisitVisitDelta↳ feeds from Sync Visits and Quotes, Update Patient Email for Commercial Insurancecustom visit querycustom charge queryauto service type querycustom coverage queryadd zero charge - TEMPORARY-REMOVE WHEN PR 5672 RELEASEDsql
flow_hl7_processing_loadvisits__temporary_remove_when_pr_5672_released.sql✨ Loads missing benefit application statuses for quotes into the batch table using existing records from the live status map.writesAutoApplyBenefitsStatusMapBatch· readsAutoApplyBenefitsStatusMapAutoApplyBenefitsStatusMapBatchQuoteBatch↳ feeds from LoadVisitBatch - 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.
- Audits Good Faith Estimate compliance for batch visits and identifies records requiring resends based on federal timing regulations.DISABLED
- Update Patient Email for Commercial InsuranceUpdateEntitieswrites
Patient· readsVisitBatchpatient↳ feeds from LoadVisitBatchentity type=Patientauto query ▶Load-CustomProperty-CoverageStatussub-job · 3↗
- Load Primary Coverage StatusUpdateCustomPropertyFromQuery· reads
CustomPropertyMapEligibilityTxnVisitBatchVisitCoverageBatchentity=Visitcustom property key=PrimaryCoverageStatusauto querybatch mode - Load Secondary Coverage StatusUpdateCustomPropertyFromQuery· reads
CustomPropertyMapEligibilityTxnVisitBatchVisitCoverageBatchentity=Visitcustom property key=SecondaryCoverageStatusauto querybatch mode - Load Tertiary Coverage StatusUpdateCustomPropertyFromQuerydisabled· reads
CustomPropertyMapEligibilityTxnVisitBatchVisitCoverageBatchentity=Visitcustom property key=TertiaryCoverageStatusauto querybatch modeDISABLED
- AutoSendLettersAutoSendLettersGenerates and sends patient cost estimate letters for visits in the batch table based on configured qualification and communication rules.
- Generates and sends cost estimate letters for upcoming scheduled visits based on patient preferences and configured qualification criteria.DISABLED
- Load TransformVisitInsuranceCoverageStatussql
flow_hl7_processing_loadvisits__load_transformvisitinsurancecoveragestatus.sql✨ Updates insurance coverage statuses by analyzing recent eligibility transactions and mapping results to standardized active or inactive states.writesTempEligibilityStatsTransformVisitInsuranceCoverageStatus· readsTempEligibilityStatsTransformVisitInsuranceVisitBatch↳ feeds from LoadVisitBatch - 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 ▶Flow-HL7-Processing-LoadVisitFactsub-job · 1↗
- Load VisitFactsql
flow_hl7_processing_loadvisitfact__load_visitfact.sql✨ Updates the visit fact table with current status, letter activity, eligibility results, and payment totals for recent appointments.writesVisitFactVisitFactDelta· readsEligibilityTxnPatientLetterPaymentTxnVisitVisitCoverageVisitFactDelta
- Update HL7ProcessLogsql
flow_hl7_processing__update_hl7processlog.sql✨ Marks the processing run as finished and saves the last processed archive key to track progress.writesHL7ProcessLogLastArchiveKey· readsHL7DeltaHL7ProcessLogHL7ProcessLogLastArchiveKey - WorkqueueAssignmentWorkqueueAssignmentAssigns accounts or visits to workqueue stacks by evaluating matching criteria and updating item lists based on search terms.
- SendHL7LettersflowExports pending patient letters as HL7 messages with PDF attachments to a local directory for transmission to external systems.output file path=D:\ClientData\RIA\ORUpublish directory=D:\ClientData\RIA\ORUsending application=MDClaritysending facility=MDClarityreceiving application=Abbadox
- Generate and send ORMsExecuteProcesscommand="D:\ClientData\RIA\OutboundORM\py.bat"
markers
Why it classified as flow
Front-of-house actions found anywhere in the tree (including nested sub-jobs).