Medical data integration and analysis system based on intelligent template library and stateful workflow

CN122658684APending Publication Date: 2026-08-28THE PEOPLES HOSPITAL OF GUANGXI ZHUANG AUTONOMOUS REGION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610591495.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-30
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

历史数据积压于各设备本地,人工采集耗时耗力,且易出错,而且现有解析方案多为固定规则匹配,面对设备报告模板频繁升级、不同厂商格式差异时,维护成本极高,且无法处理扫描件等复杂格式

Benefits of technology

1、本发明采用模板驱动解析和状态化流程调度的双引擎架构,状态化工作流通过状态表与智能调度器,将离散的数据处理步骤组织为可追踪、可控制、可恢复的可靠流水线。双引擎架构协同实现从多源异构报告采集、自适应解析、标准化治理到服务化输出的全流程自动化、高可靠数据生产线。同时,本发明融合了标准协议接口、API调用、文件系统事件监听等多种触发机制,通过一个统一的接入层适配万物,特别是通过智能化文件夹监听与分类规则,解决了非智能设备数据自动采集分类处理的问题,配置定位策略中引入AI版面分析提升对非固定格式、扫描件的适应性,实现了规则确定性与AI灵活性的优势互补。在数据管理溯源方面,从解析环节开始就强制绑定溯源信息,使得每一条数据都有完整的溯源信息,这不仅是质量控制的基础,更是实现精准化、自动化历史数据批量修复的前提,形成了数据质量的闭环反馈。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122658684A_ABST
    Figure CN122658684A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of medical data collection, and discloses a medical data integrated analysis system based on an intelligent template library and a state working flow, which comprises the following unit modules: a multi-source data access and collection engine for uniformly processing the access of all data sources, a central intelligent template library for storing analysis templates of different device report files, an AI intelligent analysis engine for converting unstructured reports of different devices into structured data, a state working flow scheduling engine for decoupling a data processing flow into independent uploading working flows and analysis working flows, an integrated data management and fusion pipeline, a dynamic security update and batch repair unit, and a standardized data service and open interface mechanism. The application can realize the automatic collection, analysis and management of multi-source heterogeneous medical device reports, and is suitable for the intelligent integration and structured processing of medical data of different medical specialties.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical data acquisition technology, specifically relating to a medical data integration and parsing system based on an intelligent template library and a stateful workflow. Background Technology

[0002] In specialized fields, particularly clinical medicine, diagnosis and research heavily rely on multi-source, multi-modal data. These data sources include Hospital Information Systems (HIS), medical equipment from various manufacturers and models, and patient data from outside the hospital. Currently, data processing faces technical bottlenecks. On one hand, hospital HIS systems adhere to standards such as HL7, while numerous medical devices output unstructured PDF and image reports with inconsistent data interfaces. Historical data accumulates locally on various devices, requiring time-consuming, labor-intensive, and error-prone manual collection. Furthermore, existing parsing solutions often rely on fixed rule matching, leading to extremely high maintenance costs when faced with frequent upgrades to device report templates and format differences between manufacturers, and failing to handle complex formats such as scanned documents. Parsing rules are deeply coupled with business logic, lacking independent management and iteration capabilities. On the other hand, parsed data lacks effective cleaning, standardization, and terminology mapping, resulting in "dirty data." Patient identities are difficult to uniquely identify across different systems, leading to severe data silos. Data anonymization processes are not standardized, posing privacy risks. Additionally, the data flow process is opaque, making it difficult to promptly detect and intervene in failed tasks. When parsing logic is updated or repaired, gray-scale testing and rapid rollback are not possible, potentially impacting online operations. Furthermore, general data integration platforms struggle to meet the stringent requirements of medical data for accuracy, traceability, and security, while customized projects often suffer from short lifecycles and poor scalability due to a lack of flexible parsing template mechanisms and dynamic update architectures. Summary of the Invention

[0003] To address the aforementioned shortcomings, this invention discloses a medical data integration and parsing system based on an intelligent template library and a stateful workflow. This system enables the automated collection, parsing, and management of reports from multi-source heterogeneous medical devices. Specifically, it includes an intelligent template library management and a stateful workflow scheduling mechanism, and is applicable to the intelligent integration and structured processing of medical data from different medical specialties (sleep medicine, neurology, rehabilitation medicine, respiratory and critical care medicine, electrocardiogram diagnosis, etc.).

[0004] This invention is achieved using the following technical solution: A medical data integration and parsing system based on an intelligent template library and a stateful workflow includes the following modules: Multi-source data access and acquisition engine: It is used to uniformly handle the access of all data sources, specifically including active push / timed pull sub-mechanism, folder / directory monitoring sub-mechanism, classified storage sub-mechanism, batch unmanned acquisition of historical data sub-mechanism, and data traceability sub-mechanism; Central Intelligent Template Library: Used to store parsing templates for report files from different devices. The parsing templates adopt a structured format and include a metadata area, a field definition area, a positioning strategy area, and a cleaning and transformation area. AI Intelligent Parsing Engine: Used to transform unstructured reports collected from different devices into structured data. Specifically, it includes a versioned intelligent template library and a format adaptive parsing mechanism. The versioned intelligent template library is an extensible parsing template library, in which each template has an independent version number and corresponds to the parsing rules of a certain device model and its report version. Stateful workflow scheduling engine: It decouples the data processing flow into independent upload and parsing workflows, and establishes a file processing status table in the relational database. The file processing status table includes file ID, file name, device source, original path, processing status, template version used, error message, number of retries, creation and update time; and adopts an intelligent polling scheduling mechanism and a dynamic sleep mechanism. Integrated Data Governance and Fusion Pipeline: After parsing, the data automatically enters the governance pipeline, which includes the following steps: S1. Cleaning and Standardization: Execute the rules defined in the template to perform unit conversion, outlier detection and marking; S2. Automated data masking: Before data is entered into the database, the configured data masking rule engine automatically masks, replaces, or encrypts sensitive fields such as name and ID number. All data masking operations are recorded in the audit log. S3. Patient Master Index Matching and Data Fusion: The system maintains a unified patient master index and uses algorithms to automatically associate and aggregate data parsed from HIS and different devices under a unique patient identifier to form a panoramic view of the patient. Dynamic security update and batch repair unit: Provides a real-time dashboard to display data access traffic, parsing success rate / failure rate, and details of the failed task queue. It provides real-time alerts for parsing failed tasks and allows one-click redirection to the manual correction interface. When a new report format cannot be parsed, a parsing template (new version) is created or adjusted in an isolated sandbox environment. After verification, it is hot-deployed to the production environment template library. New reports automatically use the new template, while old reports still use the old version, achieving compatibility. Standardized data services and open interface mechanisms: The processed structured data is provided to the outside world through a standardized data service layer. For example, the system encapsulates interfaces that conform to the HL7 FHIR R4 specification or the Restful API standard, which can be securely accessed by the hospital-level multimodal disease data platform or research platform to realize the upward aggregation and sharing of departmental data value.

[0005] Furthermore, the aforementioned proactive push / timed fetch sub-mechanism supports network-enabled devices to proactively push reports via API, or for the platform to fetch them periodically. The folder / directory monitoring sub-mechanism involves deploying a Webhook service to manage the default or specified local folders and SFTP / FTP server directories of the medical device software in real time. Once a new report file is detected, the data collection process is triggered immediately. The aforementioned classification and storage sub-mechanism is designed for situations where multiple device software coexists on the same host and has the same path. Based on file characteristics or metadata from the collection source, the system automatically classifies the reports and stores them in the corresponding device original library directory through a preset rule engine. The aforementioned unmanned batch historical data collection sub-mechanism is designed for devices that accumulate a large number of historical reports during the operation of medical equipment. The system provides task scheduling functions, creates a batch download task list, simulates or calls the device software interface, and downloads all historical reports of a specified patient according to the batch download task list without human intervention. The reports are then automatically captured and stored in the database by the listening hook. The aforementioned data traceability sub-mechanism records complete metadata during data collection for data traceability.

[0006] Furthermore, in the folder / directory listening sub-mechanism, the Webhook service specifically involves deploying a sending end on the medical device, with the server responsible for receiving. When the sending end detects a new file, it sends a request to the server, triggering the upload process.

[0007] Furthermore, in the classification storage sub-mechanism, the preset rule engine writes the data to the corresponding folder according to the time and device category attributes when the data is uploaded, and writes the attributes to the database; or it classifies the data according to the Chinese and English names of the corresponding devices and the naming characteristics of different types of reports.

[0008] Furthermore, the multi-source data access and acquisition engine is equipped with standardized system interfaces, specifically including international standard interfaces conforming to HL7 and FHIR, and RESTful API / Web Service for automatically acquiring structured data such as patient basic information, medical orders, and medical records from systems such as HIS.

[0009] Furthermore, the parsing rules include field definitions, positioning strategies, and data cleaning and transformation rules. The format-adaptive parsing mechanism matches and loads the most suitable parsing template and its version from the versioned intelligent template library based on the metadata captured during collection or the preliminary analysis of the report content. Then, it applies the positioning strategy in the template to extract target text and table data from PDF, Word, Excel, and image files. The parsing results are then persisted according to the preset structure of the original data table, i.e., each record corresponds to an original report containing all extracted fields, and data source information is forcibly associated. The data source information includes the storage path of the original report file, device model, collection time, and the name and version number of the parsing template used. Finally, for reports with a large number of fields, the parsing results can be automatically split into multiple logically related data tables with the same name to optimize database performance and management.

[0010] Furthermore, the intelligent polling scheduling mechanism parses the workflow as a timed service, queries the status table every 2 seconds for records marked as unprocessed, updates the status mark to success and records the template version upon successful execution; if execution fails, it captures the exception, updates the status mark to failure and records the error details; the dynamic sleep mechanism polls every 2 seconds when there are files to be processed; when there are no files to be processed, it automatically switches to a 60-second interval, saving resources.

[0011] Furthermore, in step S1, the built-in medical terminology standard mapping table automatically converts synonyms and abbreviations in different reports into standard terms.

[0012] Furthermore, in the dynamic security update and batch repair unit, when a logical error is found in a certain version of the template, the system automatically locates all historical original reports affected by this template version based on the source tracing information, starts a batch re-parsing task using the corrected new template, and updates the corresponding structured records in the database to achieve self-correction of historical data.

[0013] Furthermore, in the dynamic security update and batch repair unit, the sandbox update workflow includes the following steps, which aim to safely and controllably introduce new parsing templates and avoid impacting the online production environment: (1) When the system receives a new format report and there is no matching template in the existing template library, or the parsing fails, the sandbox update process is triggered; the matching is based on the device ID, report type, and file metadata; semantic version control is adopted, and the latest compatible version is matched first. If it fails, it is downgraded to the second newest version to ensure the parsing success rate. (2) In an isolated sandbox environment, clone the current production template library to generate an independent test copy. This copy contains all existing templates and their version information, but will not affect the online parsing task. (3) In the sandbox environment, create or adjust the parsing template, define the field location strategy, cleaning rules, and conversion logic; the template format adopts a structured description, including version number, device type, report format version, and field mapping rules; Regular expression matching is used to extract fixed-format fields; target values ​​are located based on the text range before and after keywords; tables, titles, and numerical areas in the report are identified based on object detection or page segmentation algorithms; and OCR recognition is performed on image reports, combined with a text correction model to improve accuracy. (4) The new template is assigned a new template version number and is bound to a specific device model and report format version; (5) In the sandbox environment, use historical original report samples to perform batch parsing tests on the new template, automatically compare the parsing results with the expected values, and evaluate the success rate and accuracy. (6) After verification, the new template will be hot-deployed to the production environment template library, but it will only be effective for newly collected reports. The old reports that have been parsed will still use the original template version. This process supports traffic gray-scale switching and can gradually expand the scope of application of the new template. (7) If the new template is used to fix historical parsing errors, the system will automatically locate all affected original reports based on the source information, start a batch re-parsing task, and use the new template to re-parse and update the structured data in the database; (8) If a problem is found during the gray-scale process, the system supports a rollback within seconds to revert the template version to the previous stable version to ensure business continuity.

[0014] Compared with existing technologies, this technical solution has the following advantages: 1. This invention employs a dual-engine architecture of template-driven parsing and stateful process scheduling. The stateful workflow, through a state table and intelligent scheduler, organizes discrete data processing steps into a traceable, controllable, and recoverable reliable pipeline. This dual-engine architecture collaboratively achieves a fully automated, highly reliable data production line, from multi-source heterogeneous report collection, adaptive parsing, standardized governance to service-oriented output. Simultaneously, this invention integrates multiple triggering mechanisms, including standard protocol interfaces, API calls, and file system event listening. It adapts to everything through a unified access layer, particularly by using intelligent folder listening and classification rules to solve the problem of automatic data collection and classification processing from non-intelligent devices. The configuration positioning strategy incorporates AI layout analysis to improve adaptability to non-fixed formats and scanned documents, achieving a complementary advantage of rule determinism and AI flexibility. Regarding data management and traceability, traceability information is forcibly bound from the parsing stage, ensuring that every piece of data has complete traceability information. This is not only the foundation of quality control but also a prerequisite for accurate and automated batch repair of historical data, forming a closed-loop feedback for data quality.

[0015] 2. This invention, from HIS integration and automatic capture of equipment reports (including batch download of historical data) to intelligent parsing, governance, and data storage, requires no manual intervention throughout the entire process, significantly reducing data collection and editing operations for medical staff and greatly improving data processing efficiency. Through a configurable template library, the access time for new equipment report formats is reduced from days to hours. An integrated process for cleaning, standardization, terminology mapping, and automated desensitization is established, producing high-quality data directly usable for scientific research analysis. A mandatory end-to-end traceability mechanism ensures data auditability, traceability, and repairability, meeting the highest standards of medical data governance. The stateful workflow scheduling engine enables real-time monitoring of the processing status of each file, allowing for rapid error location. The system described in this invention supports template gray-scale release and batch repair of historical data, with extremely low update risk. By providing open data service interfaces compliant with international / industry standards, processed specialty data can be easily and securely imported into higher-level data platforms, strongly supporting hospital-level precision medicine, clinical research, and discipline development. Attached Figure Description

[0016] Figure 1 This is the overall system architecture and stateful workflow scheduling diagram of the system described in Example 1.

[0017] Figure 2 This is the stateful workflow intelligent polling scheduling flowchart described in Example 1. Detailed Implementation

[0018] The present invention is further illustrated by the following examples, but these are not intended to limit the invention. Specific experimental conditions and methods not specified in the following examples are generally conventional methods well known to those skilled in the art.

[0019] Example 1: A medical data integration and parsing system based on an intelligent template library and stateful workflow, such as... Figure 1 The system described above uses a stateful workflow scheduling engine as its core, and coordinates the entire process of data collection, parsing, and management through a state table to achieve a traceable and controllable data pipeline. It includes the following unit modules: Multi-source data access and acquisition engine: It is used to uniformly handle the access of all data sources, and specifically includes the following sub-mechanisms: Active push / scheduled fetch sub-mechanism: Supports devices with network capabilities to actively push reports via API, or for the platform to fetch reports on a scheduled basis; Folder / directory monitoring sub-mechanism: Deploy a Webhook service to manage the default or specified local folders and SFTP / FTP server directories of the medical device software in real time. Once a new report file (PDF file) is detected, the collection process is immediately triggered. The specific process of the Webhook service is to deploy a sending end on the medical device and the server is responsible for receiving. When the sending end detects a new file, it sends a request to the server, which will trigger the upload process. Categorized Storage Sub-Mechanism: For situations where multiple device software coexists on the same host and shares the same path, the system automatically categorizes reports and stores them in the corresponding device's original library directory based on file characteristics (filename pattern and content keywords) using a preset rule engine. The preset rule engine writes data to the corresponding folder based on time and device category attributes during data upload and also writes the attributes to the database. These attributes include filename, absolute path on the server, parsing status, parsing start time, end time, text length, device name (in English and Chinese), device number, number of retries, and report time. Historical data batch unmanned collection sub-mechanism: For medical devices that have accumulated a large number of historical reports during operation, the system provides a task orchestration function to create a batch download task list, simulate or call the device software interface, and download all historical reports of a specified patient according to the batch download task list without human intervention, and hand them over to the monitoring hook for automatic capture and storage. Data traceability sub-mechanism: Record complete metadata during data collection for data traceability; The multi-source data access and acquisition engine is also equipped with standardized system interfaces, including international standard interfaces that conform to HL7 and FHIR, and RESTful API / Web Service for automatically acquiring structured data such as patient basic information, medical orders, and medical records from systems such as HIS. Central Intelligent Template Library: Used to store parsing templates for report files from different devices. The parsing templates adopt a structured format and include a metadata area, a field definition area, a positioning strategy area, and a cleaning and transformation area. AI Intelligent Parsing Engine: Used to transform unstructured reports collected from different devices into structured data. Specifically, it includes a versioned intelligent template library and a format adaptive parsing mechanism. The versioned intelligent template library is an extensible parsing template library, in which each template has an independent version number and corresponds to the parsing rules of a certain device model and its report version. The parsing rules include field definitions, comprehensive regular expressions and keyword context, and data cleaning and transformation rules. The format adaptive parsing mechanism matches and loads the most suitable parsing template and its version from the versioned intelligent template library based on the device ID and type captured in the metadata during data collection. Then, it applies the positioning strategy in the template to extract target text and table data from PDF, Word, Excel, and image files. The parsing results are then persisted according to the preset structure of the original data table, i.e., each record corresponds to an original report containing all extracted fields, and data source information is forcibly associated. The data source information includes the storage path of the original report file, device model, collection time, and the name and version number of the parsing template used. Finally, for reports with a large number of fields (such as PSG), the parsing results can be automatically split into multiple logically related data tables with the same name (such as PSG_Data_1, PSG_Data_2) to optimize database performance and management. Stateful workflow scheduling engine: It decouples the data processing flow into independent upload and parsing workflows, and establishes a file processing status table in the relational database. The file processing status table includes file ID, file name, device source, original path, processing status, template version used, error message, number of retries, creation and update time; and adopts an intelligent polling scheduling mechanism and a dynamic sleep mechanism. like Figure 2 The stateful workflow described features an intelligent polling and dynamic sleep mechanism, enabling efficient resource utilization and reliable process scheduling. The intelligent polling scheduling mechanism parses the workflow as a timed service, querying the status table every 2 seconds for records marked as unprocessed. Upon successful execution, the status is updated to success and the template version is recorded; if execution fails, the exception is captured, the status is updated to failure, and error details are recorded. The dynamic sleep mechanism polls every 2 seconds when there are pending files; when there are no pending files, it automatically switches to a 60-second interval, saving resources. Integrated Data Governance and Fusion Pipeline: After parsing, the data automatically enters the governance pipeline, which includes the following steps: S1. Cleaning and Standardization: Executes the rules defined in the template to perform unified unit conversion, outlier detection and marking, and automatically converts synonyms and abbreviations in different reports into standard terms through the built-in medical terminology standard mapping table. S2. Automated data masking: Before data is entered into the database, the configured data masking rule engine automatically masks, replaces, or encrypts sensitive fields such as name and ID number. All data masking operations are recorded in the audit log. S3. Patient Master Index Matching and Data Fusion: The system maintains a unified patient master index (EMPI). Through algorithms (such as based on ID number, name, date of birth, etc.), it automatically associates and aggregates data parsed from HIS and different devices under a unique patient identifier to form a panoramic view of the patient. Dynamic security update and batch repair unit: Provides a real-time dashboard displaying data access traffic, parsing success / failure rate, and details of failed task queues. It provides real-time alerts for failed parsing tasks and allows one-click redirection to a manual correction interface. When a new report format cannot be parsed, a parsing template (new version) is created or adjusted in an isolated sandbox environment. After verification, it is hot-deployed to the production environment template library. New reports automatically use the new template, while old reports retain the old version, achieving compatibility. When a logical error is found in a template version, the system automatically locates all historical original reports affected by this template version based on source information, initiates batch re-parsing tasks using the corrected new template, and updates the corresponding structured records in the database, achieving self-correction of historical data. Standardized data services and open interface mechanisms: The processed structured data is provided to the outside world through a standardized data service layer. For example, the system encapsulates interfaces that conform to the HL7 FHIR R4 specification or the Restful API standard, which can be securely accessed by the hospital-level multimodal disease data platform or research platform to realize the upward aggregation and sharing of departmental data value.

[0020] Example 2: The medical data integration and parsing system based on intelligent template library and stateful workflow described in this example differs from the system described in Example 1 only in that, in the dynamic security update and batch repair unit, the sandbox update workflow includes the following steps, which aim to safely and controllably introduce new parsing templates and avoid impacting the online production environment: (1) When the system receives a new format report and there is no matching template in the existing template library, or the parsing fails, the sandbox update process is triggered; the matching is based on the device ID, report type, file name pattern and content characteristics; semantic version control (SemVer) is adopted, and the latest compatible version is matched first. If it fails, it is downgraded to the second newest version to ensure the parsing success rate; (2) In an isolated sandbox environment, clone the current production template library to generate an independent test copy. This copy contains all existing templates and their version information, but will not affect the online parsing task. (3) In the sandbox environment, adjust the parsing template in sequence, such as defining field positioning strategy, cleaning rules, and conversion logic; the template format adopts a structured description (such as JSON / XML), including version number, device type, report format version, and field mapping rules; The system employs regular expression matching to extract fixed-format fields; locates target values ​​based on the text range before and after keywords; identifies tables, titles, and numerical regions in reports using YOLO; improves accuracy by combining BERT-based error correction models with OCR recognition of image reports; and configures terminology mapping rules, specifically based on medical terminology mapping tables or thesaurus, to unify synonyms in different reports into standard terms, such as mapping OSA to obstructive sleep apnea. (4) The new template is assigned a new template version number (e.g., v2.0.0) and is bound to a specific device model and report format version; (5) In the sandbox environment, use historical original report samples to perform batch parsing tests on the new template, automatically compare the parsing results with the expected values, and evaluate the success rate and accuracy. (6) After verification, the new template will be hot-deployed to the production environment template library, but it will only be effective for newly collected reports. The old reports that have been parsed will still use the original template version. This process supports traffic gray-scale switching and can gradually expand the scope of application of the new template. (7) If the new template is used to fix historical parsing errors, the system will automatically locate all affected original reports based on the source information, start a batch re-parsing task, and use the new template to re-parse and update the structured data in the database; (8) If a problem is found during the gray-scale process, the system supports a rollback within seconds to revert the template version to the previous stable version to ensure business continuity.

[0021] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A medical data integration and parsing system based on an intelligent template library and stateful workflow, characterized in that: Includes the following unit modules: Multi-source data access and acquisition engine: It is used to uniformly handle the access of all data sources, specifically including active push / timed pull sub-mechanism, folder / directory monitoring sub-mechanism, classified storage sub-mechanism, batch unmanned acquisition of historical data sub-mechanism, and data traceability sub-mechanism; Central Intelligent Template Library: Used to store parsing templates for report files from different devices. The parsing templates adopt a structured format and include a metadata area, a field definition area, a positioning strategy area, and a cleaning and transformation area. AI Intelligent Parsing Engine: Used to transform unstructured reports collected from different devices into structured data. Specifically, it includes a versioned intelligent template library and a format adaptive parsing mechanism. The versioned intelligent template library is an extensible parsing template library, in which each template has an independent version number and corresponds to the parsing rules of a certain device model and its report version. Stateful workflow scheduling engine: It decouples the data processing flow into independent upload and parsing workflows, and establishes a file processing status table in the relational database. The file processing status table includes file ID, file name, device source, original path, processing status, template version used, error message, number of retries, creation and update time; and adopts an intelligent polling scheduling mechanism and a dynamic sleep mechanism. Integrated Data Governance and Fusion Pipeline: After parsing, the data automatically enters the governance pipeline, which includes the following steps: S1. Cleaning and Standardization: Execute the rules defined in the template to perform unit conversion, outlier detection and marking; S2. Automated data masking: Before data is entered into the database, the configured data masking rule engine automatically masks, replaces, or encrypts sensitive fields such as name and ID number. All data masking operations are recorded in the audit log. S3. Patient Master Index Matching and Data Fusion: The system maintains a unified patient master index and uses algorithms to automatically associate and aggregate data parsed from HIS and different devices under a unique patient identifier to form a panoramic view of the patient. Dynamic security update and batch repair unit: Provides a real-time dashboard to display data access traffic, parsing success rate / failure rate, and details of the failed task queue. It provides real-time alerts for parsing failed tasks and allows one-click redirection to the manual correction interface. When a new report format cannot be parsed, a parsing template is created or adjusted in an isolated sandbox environment. After verification, it is hot-deployed to the production environment template library. New reports automatically use the new template, while old reports still use the old version, achieving compatibility. Standardized data services and open interface mechanisms: The processed structured data is provided to the outside world through a standardized data service layer. For example, the system encapsulates interfaces that conform to the HL7 FHIR R4 specification or the Restful API standard, which can be securely accessed by the hospital-level multimodal disease data platform or research platform to realize the upward aggregation and sharing of departmental data value.

2. The medical data integration and parsing system based on an intelligent template library and stateful workflow as described in claim 1, characterized in that: The aforementioned proactive push / scheduled retrieval sub-mechanism supports network-enabled devices to proactively push reports via API, or for the platform to retrieve reports on a scheduled basis. The aforementioned folder / directory monitoring sub-mechanism deploys a Webhook service to manage the default or specified local folders and SFTP / FTP server directories of medical device software in real time. Once a new report file is detected, the collection process is immediately triggered. The aforementioned categorized storage sub-mechanism is designed for situations where multiple device software programs coexist on the same host and have the same path. Based on file characteristics or metadata from the collection source, the system automatically categorizes reports and stores them in the corresponding original device library directory using a preset rule engine. The aforementioned unmanned batch historical data collection sub-mechanism provides a task orchestration function for devices that have accumulated a large number of historical reports during the operation of medical equipment. It creates a batch download task list, simulates or calls the device software interface, and downloads all historical reports of a specified patient according to the batch download task list without human intervention. The reports are then automatically captured and stored in the database by a listening hook. The aforementioned data traceability sub-mechanism records complete metadata during data collection for data traceability.

3. The medical data integration and parsing system based on an intelligent template library and stateful workflow according to claim 2, characterized in that: In the folder / directory monitoring sub-mechanism, the Webhook service specifically involves deploying a sending end on the medical device, with the server responsible for receiving. When the sending end detects a new file, it sends a request to the server, triggering the upload process.

4. The medical data integration and parsing system based on an intelligent template library and stateful workflow according to claim 2, characterized in that: In the aforementioned classification and storage sub-mechanism, the preset rule engine writes data to the corresponding folder based on time and device category attributes during data upload, and writes the attributes to the database; or it classifies data based on the Chinese and English names of the corresponding devices and the naming characteristics of different types of reports.

5. The medical data integration and parsing system based on an intelligent template library and stateful workflow according to claim 1, characterized in that: The multi-source data access and acquisition engine is equipped with standardized system interfaces, including international standard interfaces compliant with HL7 and FHIR, and RESTful APIs / Web Services for automatically acquiring structured data such as patient basic information, medical orders, and medical records from systems such as HIS.

6. The medical data integration and parsing system based on an intelligent template library and stateful workflow according to claim 1, characterized in that: The intelligent polling scheduling mechanism parses the workflow as a timed service, queries the status table every 2 seconds for records marked as unprocessed, updates the status mark to success and records the template version after successful execution; if execution fails, it captures the exception, updates the status mark to failure and records the error details; the dynamic sleep mechanism polls every 2 seconds when there are files to be processed; when there are no files to be processed, it automatically switches to a 60-second interval.

7. The medical data integration and parsing system based on an intelligent template library and stateful workflow according to claim 1, characterized in that: The parsing rules include field definitions, positioning strategies, and data cleaning and transformation rules. The format-adaptive parsing mechanism matches and loads the most suitable parsing template and its version from the versioned intelligent template library based on the metadata captured during collection or the preliminary analysis of the report content. Then, it applies the positioning strategy in the template to extract target text and table data from PDF, Word, Excel, and image files. The parsing results are then persisted according to the preset structure of the original data table, meaning each record corresponds to one original report containing all extracted fields, and data source information is forcibly associated. This data source information includes the storage path of the original report file, device model, collection time, and the name and version number of the parsing template used. Finally, for reports with a large number of fields, the parsing results can be automatically split into multiple logically related data tables with the same name to optimize database performance and management.

8. The medical data integration and parsing system based on an intelligent template library and stateful workflow according to claim 1, characterized in that: In step S1, the built-in medical terminology standard mapping table automatically converts synonyms and abbreviations in different reports into standard terms.

9. The medical data integration and parsing system based on intelligent template library and stateful workflow according to claim 1, characterized in that: In the dynamic security update and batch repair unit, when a logical error is found in a certain version of the template, the system automatically locates all historical original reports affected by this template version based on the source information, starts a batch re-parsing task using the corrected new template, and updates the corresponding structured records in the database to achieve self-correction of historical data.

10. The medical data integration and parsing system based on an intelligent template library and stateful workflow according to claim 1, characterized in that: In the dynamic security update and batch repair unit, the sandbox update workflow includes the following steps: (1) When the system receives a new format report and there is no matching template in the existing template library, or the parsing fails, the sandbox update process is triggered; the matching is based on the device ID, report type, and file metadata; semantic version control is adopted, and the latest compatible version is matched first. If it fails, it is downgraded to the second newest version to ensure the parsing success rate. (2) In an isolated sandbox environment, clone the current production template library to generate an independent test copy. This copy contains all existing templates and their version information, but will not affect the online parsing task. (3) In the sandbox environment, create or adjust the parsing template, define the field location strategy, cleaning rules, and conversion logic; the template format adopts a structured description, including version number, device type, report format version, and field mapping rules; Regular expression matching is used to extract fixed-format fields; target values ​​are located based on the text range before and after keywords; tables, titles, and numerical areas in the report are identified based on object detection or page segmentation algorithms; and OCR recognition is performed on image reports, combined with a text correction model to improve accuracy. (4) The new template is assigned a new template version number and is bound to a specific device model and report format version; (5) In the sandbox environment, use historical original report samples to perform batch parsing tests on the new template, automatically compare the parsing results with the expected values, and evaluate the success rate and accuracy. (6) After verification, the new template will be hot-deployed to the production environment template library, but it will only be effective for newly collected reports. The old reports that have been parsed will still use the original template version. This process supports traffic gray-scale switching and can gradually expand the scope of application of the new template. (7) If the new template is used to fix historical parsing errors, the system will automatically locate all affected original reports based on the source information, start a batch re-parsing task, and use the new template to re-parse and update the structured data in the database; (8) If a problem is found during the gray-scale process, the system supports a rollback within seconds to revert the template version to the previous stable version to ensure business continuity.