Complex medical quality management and control index automatic calculation method based on intelligent agent

By constructing an indicator semantic model and encapsulating multi-source data semantics based on an agent-based approach, the problems of standardization and cross-system migration in the calculation of medical quality control indicators are solved, realizing automated calculation and result traceability of medical quality control indicators, and improving calculation efficiency and result consistency.

CN121687355APending Publication Date: 2026-03-17WONDERS INFORMATION +1

Patent Information

Application Number
CN202511874873.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

The calculation of medical quality control indicators lacks standardized processing procedures, resulting in a lack of machine-understandable structured representation of indicator semantics. Heterogeneous data lacks a unified semantic mapping and decoupling mechanism, and the end-to-end automation and traceability are insufficient, making it difficult to achieve cross-system migration and reuse.

Method used

By adopting an agent-based approach, an indicator semantic model is constructed, which transforms medical quality management indicators defined in natural language into a structured semantic model. Cross-system access is achieved through multi-source data semantic encapsulation and MCP service abstraction mechanism. Semantic matching and dynamic binding mechanisms are introduced to automatically complete the mapping between indicator semantic elements and underlying data services, establish a flexible semantic-to-data access link, and realize fully automated calculation and result verification.

Benefits of technology

It has achieved standardization, generalization, and improved reusability of medical quality control indicators, solved the problems of data dispersion and interface incompatibility, ensured the accuracy, interpretability, and traceability of results, and supported the calculation of multiple types of indicators and quality supervision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121687355A_ABST
    Figure CN121687355A_ABST
Patent Text Reader

Abstract

The invention discloses a complex medical quality management and control index automatic calculation method based on an intelligent agent. According to the index semantic model construction method provided by the invention, the automatic conversion of the medical quality control indexes from a natural language to structured semantics is realized, so that the index definition has computability and mobility, the dependence of manual analysis and script configuration is eliminated, and the standardization, generalization and reuse efficiency of the index definition is remarkably improved. Through multi-source data semantic packaging and an MCP service abstraction mechanism, semantic unification and interface standardization of multi-source heterogeneous data such as electronic medical records, inspection information, disease course records and medical advice management are achieved, and a semantic data layer capable of achieving cross-system access is constructed; the problems of data dispersion, field isomerism and interface incompatibility in a traditional system are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an automatic calculation method for complex medical quality management and control indicators based on intelligent agents, belonging to the field of artificial intelligence and medical information processing technology. Background Technology

[0002] In recent years, with the rapid improvement of medical informatization and intelligentization, medical institutions have accumulated a large amount of heterogeneous medical data from multiple sources, including electronic medical record systems, laboratory information systems, surgical and medical record systems. This data forms an important foundation for medical quality management and safety supervision, but it has not yet been systematically utilized in the calculation of quality control indicators.

[0003] The medical quality management indicator system covers dimensions such as medical safety, treatment standards, service efficiency, and patient experience. Typical indicators include inpatient mortality rate, antibiotic usage rate, and surgical site infection rate. This system provides a unified assessment basis for medical quality management; however, at the information technology implementation level, the indicator definitions are usually described in natural language, lacking a machine-understandable semantic structure, making automated calculation and unified verification difficult.

[0004] Currently, the processing of medical quality control indicators still relies primarily on manual methods. Quality control personnel need to manually parse indicator definitions, manually match fields across multiple business systems, and write query scripts to complete statistical calculations. This results in a high degree of coupling between indicator definitions and data implementation, difficulties in cross-system migration, and high maintenance costs. Due to the lack of a unified semantic model and automated computing mechanism, the manual configuration process is easily affected by subjective understanding and implementation differences, making it difficult to guarantee the repeatability and accuracy of indicator results.

[0005] Because a standardized processing procedure has not yet been established, the calculation of medical quality control indicators still faces the following prominent problems: (1) Lack of machine-understandable structured representation of indicator semantics: Most existing medical quality control indicators are defined in natural language, lacking semantic modeling and logical structure that can be parsed by machines. The system cannot automatically identify and execute calculation rules, and relies heavily on manual interpretation and configuration, resulting in insufficient automated processing capabilities.

[0006] (2) Heterogeneous data lacks a unified semantic mapping and decoupling mechanism: The data on which the indicator calculation depends is scattered across multiple heterogeneous business systems. The field naming, data structure and coding rules are not consistent between different systems, and there is a lack of standardized interfaces and semantic mapping mechanisms. At the same time, the indicator model and the specific data implementation are not effectively decoupled, resulting in the model being highly dependent on the local data environment, making it difficult to migrate and reuse across systems, and limiting both data acquisition efficiency and model universality.

[0007] (3) Insufficient full-link automation and traceability: The links such as indicator analysis, data extraction, logical calculation and result verification are isolated from each other, lacking a unified semantic framework and process execution mechanism. An end-to-end integrated, standardized and traceable automated pipeline has not yet been formed, resulting in low overall operating efficiency and high maintenance costs.

[0008] Currently, existing technologies have attempted to leverage artificial intelligence to improve the intelligence level of medical quality management. For example, Chinese patent application CN120564931A discloses an intelligent evaluation method for electronic medical records based on complex quality control indicators. This method uses semantic reasoning and knowledge graph technology to guide a large language model to analyze and evaluate complex quality control indicators in medical record text. However, this type of solution mainly relies on the large language model's reasoning on unstructured text, lacking standardized access to multi-source heterogeneous medical data and failing to achieve automatic mapping from indicator semantics to data implementation. Furthermore, its generative reasoning process lacks clear structured constraints and verifiable logical support, easily leading to evaluation results deviating from medical standards or indicator definitions, making it difficult to guarantee the consistency, certainty, and reusability of the results. Therefore, it cannot effectively support the automated calculation and cross-system reuse of complex quality control indicators. Summary of the Invention

[0009] The purpose of this invention is to solve the problems in the calculation of medical quality control indicators as pointed out in the background art, due to the lack of a standardized processing procedure.

[0010] To achieve the above objectives, the technical solution of this invention discloses an automatic calculation method for complex medical quality management and control indicators based on intelligent agents, characterized by comprising the following steps: Step 1, Indicator Semantic Model Construction and Parsing, is executed by the indicator parsing agent. This transforms the medical quality management indicators defined in natural language into a structured semantic model that can be understood and computed by machines. Specifically, it includes the following steps: Step 101: Construct an indicator parsing intelligent agent, which includes an input parsing module 1, a semantic parsing module 1, a task execution module 1, and a memory module 1; Step 102: Input parsing module one receives the natural language indicator definition text. The semantic parsing module identifies the computational intent of the indicators and extracts the corresponding mathematical structure. This completes the transformation from natural language definitions to executable computational structures; Step 103: Task execution module one calls semantic reasoning module one to define text from natural language indicators. The system automatically extracts candidate entities and attributes for computation or logical filtering, and performs semantic normalization based on the clinical terminology system to obtain a variable set. ; Step 104: Semantic parsing module 1 identifies natural language indicator definition text. The logical expressions involving inclusion criteria, eligibility restrictions, and distinction between numerators and denominators are assigned globally unique identifiers and semantic role labels to form a set of logical conditions. :

[0011] In the formula, As the smallest executable logical unit, It is a globally unique alias for logical conditions. For the executable expression corresponding to the condition, The semantic role of logical conditions in computation. A natural language description of logical conditions; Task execution module one defines text based on natural language indicators. Logical connectives and hierarchical relationships in relation to sets of logical conditions Each smallest executable logic unit in the process performs Boolean structure reconstruction to generate a combinational structure with priority constraints:

[0012] In the formula: Indicates in A Boolean dependency and priority structure is established to form an executable logic combination tree; ; Input parsing module 1 defines text from natural language indicators Extract business boundary information, including statistical period, applicable scope, and statistical granularity, and standardize and encode it into a business constraint structure. ; Step 105: Unify and encapsulate the results from steps 102 to 104. Memory module one synchronously saves the parsing process and intermediate states, generating an executable Index Semantic Model (ISM).

[0013] In the formula, Define text for raw natural language indicators ; While generating the Indicator Semantic Model (ISM), the indicator parsing agent analyzes the set of variables. The semantic variables and corresponding business domain information in the data are used to automatically derive and generate semantic indicator requests (ISRs). Step 2: Referring to the data domain labels marked in Step 1, and taking the medical business semantic domain as the unit, encapsulate the underlying data resources into coarse-grained, reusable model context protocol service units, forming a standardized set of model context protocol services and a service registry. This specifically includes the following steps: Step 201: For multi-source heterogeneous data covering electronic medical record systems, laboratory information systems, medical record systems, and medical order information systems, aggregate and encapsulate the data according to the established medical business semantic domain classification standards, and abstract the heterogeneous data access capability into a model context protocol coarse-grained data service set (MCP):

[0014] In the formula, , , , These are, respectively, coarse-grained data services for the electronic medical record system model context protocol, coarse-grained data services for the laboratory information system model context protocol, coarse-grained data services for the medical record system model context protocol, and coarse-grained data services for the medical order information system model context protocol. Each Model Context Protocol coarse-grained data service in the Model Context Protocol coarse-grained data service set (MCP) declares its access capabilities in a structured semantic description form, thereby obtaining the semantic description information of each Model Context Protocol coarse-grained data service. Step 202: Register the semantic description information of each model context protocol coarse-grained data service obtained in step S201 to the service registration table to form a discoverable and reusable semantic capability catalog. Based on the semantic definition of the model context protocol, a standardized interface specification is generated for each model context protocol coarse-grained data service, specifying input parameters, return structure, and calling mode to support cross-system calls and consistent reuse, thus constructing an abstraction layer for data access. :

[0015] In the formula, This represents a collection of coarse-grained data services in the model context protocol that can be directly invoked after semantic encapsulation. Define the cross-system unified model context protocol for calling coarse-grained data services, including syntax and data structures. Step 3: Semantic matching and model context protocol service binding, based on the data access abstraction layer built in Step 2. This process, executed by the service selection agent, is used to automatically select the service that best matches the indicator variable from multiple registered model context protocol services based on semantic reasoning. This achieves dynamic binding between the indicator semantic model and the model context protocol service, generating a variable-service mapping relationship. Specifically, it includes the following steps: Step 301: Construct a service selection agent, which includes an input parsing module 2, a semantic reasoning module 2, a task execution module 2, and a memory module 2; Step 302: Input parsing module two loads the indicator semantic model and extracts the set of variables from it. As a semantic anchor, and also from the service registry Read the semantic description information of each model context protocol service; Define the variable set through semantic reasoning module two. The semantic similarity function between each variable and the model context protocol service, if the , , , Any j-th model context protocol coarse-grained data service With variable set Any i-th variable v i The semantic similarity function is expressed as Then determine v i Mappable to , will target the same variable v i The highest semantic similarity function obtained The corresponding model context protocol coarse-grained data service serves as the basis for the current variable v. i The most matching target model context protocol service object, among which, As the system threshold, realize variable v i Matching with the service recipient; Step 303: Complete the variable set After matching all variables in the data, task execution module two performs a process on all successfully matched variables v. i A unified variable-service mapping table is constructed, and a corresponding variable-service binding configuration file is generated to record the service identifier, interface path, and access parameter definition of the variable. At the same time, the memory module continuously records the intermediate results of the matching process, including the candidate service list, semantic score, and final binding result, and writes them to the matching log. Synchronize to the system traceability library to support verification and backtracking in subsequent stages; Step 4, data acquisition and preprocessing, is performed by the data acquisition agent, based on the data access abstraction layer constructed in Step 2. Based on the binding configuration, relevant data is extracted and parsed from the data interface to form a standardized variable dataset that can be directly used for indicator calculation. The specific steps include: Step 401: Construct a data extraction intelligent agent, which includes an input parsing module three, a task scheduling module three, a semantic parsing module three, and a memory module three; Step 402: Based on the variable-service binding configuration generated in Step 3, the task scheduling module 3 achieves cross-system data access by calling the protocol interface of the registered model context protocol, obtaining a coarse-grained data result set corresponding to each variable, where variable v i The corresponding coarse-grained data result set is represented as ; All coarse-grained data result sets are uniformly aggregated into a data cache pool. ; Step 403: Semantic parsing module three, based on the definition and judgment rules of each variable in the ISM indicator semantic model, processes the coarse-grained data result set. Fine-grained data parsing and semantic determination are performed to identify the type attributes of variables, and the corresponding parsing paths are selected sequentially to generate results including variable values. and its corresponding set of evidence ; The third semantic parsing module uses object identifiers as a unified index to perform structured alignment and organization of the parsing results of each variable, generating a standardized variable dataset oriented towards computation. :

[0016] In the formula, This represents a data alignment and integration function. For granularity constraints, For the object key in the ISM (Indicator Semantic Model); At the same time, the memory module synchronously records the variable parsing path, the operators used, and the evidence index, providing a complete chain of evidence for verification and backtracking in subsequent stages; Step 5, Indicator Logic Execution and Calculation, is performed by the calculation execution agent. Based on the Indicator Semantic Model (ISM), it automatically generates a calculation plan, completes the indicator logic operations, and outputs the calculation result value. Specifically, it includes the following steps: Step 501: Calculate and execute the agent to load the standardized dataset generated in step 4. Based on the structural definition of the Indicator Semantic Model (ISM), an operator execution tree is generated. The operator nodes in the operator execution tree are composed of basic computing units and are used to describe the execution path and dependencies of the indicator. During the operation, the computing execution agent schedules the execution of operator nodes from bottom to top according to the dependencies, constructs a concurrently executable scheduling plan, and then loads the data slices in the cache layer by layer according to the plan, and completes logical judgment, set construction and numerical calculation in sequence, gradually generating intermediate results and finally obtaining the indicator calculation output. Step 503: After completing the indicator calculation, the calculation execution agent encapsulates the calculation results and intermediate process records into a structured output object. Based on the Indicator Semantic Model (ISM) definition, it adds meta-information, including indicator identifier, name, calculation period, and result value, to each result, generating a structured output data object in a unified format. As a standard output of the system, it can be used for verification, interpretable demonstration and continuous monitoring in subsequent stages.

[0017] Preferably, in step 102, the mathematical structure Represented as:

[0018] In the formula: Op is the index operator; Expr is the executable computation expression. A computation expression Expr can be composed of a combination of several operators and terms, and allows semantic role aggregation of variables.

[0019] Preferably, in step 103, the variable set Represented as:

[0020] In the formula: v i Let i be the i-th variable; The variable names are described in natural language. Standard semantic tags; Use it as a data field identifier to indicate the variable v i Data source categories.

[0021] Preferably, in step 105, the Indicator Semantic Request (ISR) is a semantic requirement description derived from the Indicator Semantic Model (ISM), used to express the data domain and semantic variables required by the indicator, and is expressed as follows:

[0022] In the formula, This indicates the data domain involved in the indicator. This represents the set of variables defined in the indicator semantic model.

[0023] Preferably, in step 201, the , , , The semantic description information of any j-th model context protocol coarse-grained data service is represented as: Then we have:

[0024] In the formula, Used to identify the semantic domains covered by the service. Describe the accessible data entities and their structured attributes. Define the semantic interpretation of attribute values ​​and their conceptual mapping relationship with standard medical ontology.

[0025] Preferably, in step 302, the , , , Any j-th model context protocol coarse-grained data service With variable set Any i-th variable v i The semantic similarity function is expressed as Then we have:

[0026] In the formula, This represents the similarity calculation function.

[0027] Preferably, in step 403, when performing type attribute identification: For existence variables, the semantic parsing module 3 calls the event detection operator to determine whether the specified event or record item exists and returns a boolean result for logical condition judgment. For state variables, the semantic parsing module 3 performs multi-field logical aggregation calculations based on the combination of rule constraints and field conditions to generate compliant state values ​​that conform to semantic rules. For numerical variables, the semantic parsing module three calls arithmetic and aggregation operators to perform numerical calculations, interval extractions, or proportional calculations on the field values, generating continuous numerical results.

[0028] Preferably, in step 503, the structured output data object Represented as:

[0029] In the formula, For indicator labeling, For indicator name, For formula structure, For constraints, This is the final calculated value.

[0030] Preferably, after step 5, the method further includes: Step 6, Result Verification and Traceability Chain Construction, is executed by the result verification agent. It verifies the consistency and reasonableness of the calculation results and generates a complete computational traceability chain. This includes the following steps: Step 601: Result Verification. The intelligent agent verifies the structured output data object generated in Step 5 based on the Indicator Semantic Model (ISM) and the computation log. Perform full-dimensional consistency verification: For verification results that pass, mark them as valid and write them into the indicator result library for subsequent quality analysis and regulatory statistics; for verification failures, output an anomaly mark, save the failure status and related logs, automatically trigger the difference tracing mechanism, and perform difference comparison and step-by-step backtracking based on the existing calculation logs and tracing chain to locate the specific source of deviation; Step 602: Continuously generate and maintain the indicator calculation traceability chain throughout the entire calculation and verification process. This chain records the entire path information from semantic definition to result output. Each node in the chain contains key evidence such as variable values, service call parameters, execution operators, and result data, forming a reproducible semantic-data mapping path. When anomalies or logical inconsistencies are detected during the verification phase, difference comparison and step-by-step backtracking are performed based on the existing traceability chain to locate the source of the deviation. When verification is successful, the system also retains the complete traceability chain and log index for subsequent auditing and interpretability requirements. Step 603: The result verification agent outputs the verified indicator results and the corresponding traceability chain, realizing end-to-end traceability from the indicator semantic model to the result data, and ensuring the verifiability, interpretability and consistency of the indicator calculation.

[0031] Preferably, in step 601, the verification content includes: Formula consistency verification checks whether the calculation formula matches the definitions in the indicator semantic model. Does it correspond exactly? Verify the correctness of variable mapping to confirm the accuracy of the binding relationship between indicator variables and model context protocol services; Data source consistency verification: checking the correspondence between the data used in the calculation and the registered data domain; logical condition correctness verification: reviewing the execution path and Boolean combination rules of the numerator and denominator logic; numerical reasonableness verification: checking whether the calculation result falls within the predefined range or business threshold range.

[0032] Compared with the prior art, the present invention has the following beneficial effects: (1) The indicator semantic model construction method proposed in this invention realizes the automatic conversion of medical quality control indicators from natural language to structured semantics, making the indicator definition computable and transferable, eliminating the dependence on manual parsing and script configuration, and significantly improving the standardization, generalization and reuse efficiency of indicator definition.

[0033] (2) Through multi-source data semantic encapsulation and MCP service abstraction mechanism, this invention realizes semantic unification and interface standardization of multi-source heterogeneous data such as electronic medical records, test information, medical records, and medical order management, and constructs a semantic data layer that can be accessed across systems, effectively solving the problems of data dispersion, field heterogeneity and interface incompatibility in traditional systems.

[0034] (3) This invention introduces a semantic matching and dynamic binding mechanism based on large model reasoning, which automatically completes the intelligent mapping between indicator semantic elements and underlying data services, establishes a flexible semantic to data access link, realizes the decoupling and dynamic adaptation of indicator logic and data implementation, and significantly reduces manual maintenance and environmental dependence.

[0035] (4) The system adopts an operator execution tree-driven index logic evaluation mechanism, which realizes the full-process automated calculation from semantic parsing, data extraction to result generation. It can uniformly support the calculation of multiple types of indicators such as ratio, count, and mean, and ensure the stability, consistency and scalability of the result execution.

[0036] (5) In terms of result assurance, the present invention constructs a verification and full-link traceability mechanism to record and verify the consistency of formula execution, variable values, data sources and result generation process throughout the process, ensuring the accuracy, interpretability and traceability of indicator results, and providing reliable technical support for quality supervision and result review. Attached Figure Description

[0037] Figure 1 This is a flowchart illustrating the overall process of an automatic calculation method for complex medical quality management indicators based on intelligent agents, as described in this invention. Figure 2 The flowchart illustrates the method for constructing and parsing the semantic model of indicators in this invention, which is executed by the indicator parsing intelligent agent and transforms medical quality management indicators defined in natural language into structured semantic models that can be understood and computed by machines. Figure 3 This invention provides an abstract description of the multi-source data access interface and constructs the MCP service. This stage aims to uniformly abstract multi-source heterogeneous medical data and build a data service layer that can be automatically accessed by intelligent agents. Referring to the data domain labels marked in stage S1, the system encapsulates the underlying data resources into coarse-grained, reusable MCP service units, using the medical business semantic domain as the unit. This forms a standardized MCP service set and service registry, providing a unified interface foundation for subsequent semantic matching and data access. Figure 4 The semantic matching and MCP service binding of this invention is executed by the service selection agent. It is used to automatically select the service that best matches the indicator variable from multiple registered MCP services based on semantic reasoning, realize the dynamic binding between the indicator semantic model and the MCP service, and generate a flowchart of the variable-service mapping relationship method. Figure 5 The data acquisition and preprocessing of this invention is performed by a data acquisition agent, which extracts and parses relevant data from the MCP interface according to the binding configuration to form a standardized variable dataset that can be directly used for indicator calculation. (Flowchart of the method) Figure 6The flowchart of the method for executing and calculating the indicator logic of this invention is as follows: the calculation execution agent automatically generates a calculation plan based on the indicator semantic model, completes the indicator logic operation, and outputs the calculation result value. Figure 7 To verify the results and construct the traceability chain of this invention, the result verification agent performs consistency and rationality checks on the calculation results and generates a complete flowchart of the calculation traceability chain method. Detailed Implementation

[0038] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.

[0039] The present invention discloses an automatic calculation method for complex medical quality management and control indicators based on intelligent agents, comprising the following steps: S1. The construction and parsing of the Indicator Semantic Model (ISM) is performed by the Indicator Agent, which transforms medical quality management indicators defined in natural language into structured semantic models that can be understood and computed by machines.

[0040] In this embodiment of the invention, step S1 specifically includes the following steps: S1-1. Construction of the Indicator Analysis Agent.

[0041] The indicator parsing agent consists of an input parsing module, a semantic parsing module, a task execution module, and a memory module. These modules operate collaboratively through a shared cache and an asynchronous task queue. The functions of each module are as follows: (1) The input parsing module is responsible for receiving the indicator definition text, performing structural analysis and element identification on the statement, extracting key segments involving calculation or logical meaning and generating parsing instructions; (2) The semantic parsing module performs semantic analysis on the fragments provided by the input parsing module based on the semantic understanding capability of the large model, identifies the calculation formulas, variable relationships and logical structures, and generates intermediate semantic representations; (3) The task execution module is responsible for converting the parsing and reasoning results into structured expressions and standardized model outputs, and establishing the mapping relationship between semantic units and computable structures; (4) The memory module is used to store semantic tags, variable mappings and logical intermediate states, record parsing logs and semantic evidence, and provide support for tracing and consistency verification.

[0042] S1-2. Identification of indicator calculation structure and extraction of formula.

[0043] The input parsing module receives the natural language indicator definition text. The semantic parsing module identifies the calculation intent of the indicators (such as proportion, count, mean, etc.) and extracts the corresponding mathematical structure: (1) In formula (1), For index operators, limited to a predefined set of statistical sub-operations: (2) In formula (1), For executable computational expressions, a normalized arithmetic and logical operation structure is defined: (3) In formula (3), one Expressions can be constructed from a combination of operators and terms, and allow semantic role aggregation of variables (such as numerator, denominator).

[0044] In this embodiment of the invention, a proportional indicator is used as an example: (4) Through steps S1-2, the system completes the initial transformation from natural language definitions to executable computational structures, providing a structural foundation for variable and logical analysis.

[0045] S1-3. Variable set identification and semantic normalization.

[0046] The task execution module calls the semantic reasoning module, from The system automatically extracts candidate entities and attributes for computation or logical screening and performs semantic normalization based on the clinical terminology system. This process identifies variable references in natural language and merges synonyms, mapping variable names uniformly to standard semantic labels. This eliminates naming differences between systems and creates a universal semantic expression across systems. Simultaneously, each variable is appended with its corresponding data domain identifier. (e.g., "medical orders," "medical record summary," "laboratory data," etc.) to indicate the data source category for the variable. The generated variable set is defined as: (5) In formula (5), The set of semantic units of variables obtained after parsing the definition of a natural language indicator is the core component of the computable semantics of the indicator.

[0047] S1-4. Data filtering logic analysis and structural combination.

[0048] The semantic parsing module further analyzes the implicit logical constraints and business rules in the indicator definitions, structuring them into executable filtering logic and statistical boundary ranges. The system identifies logical expressions involving inclusion conditions, eligibility restrictions, and distinctions between numerators and denominators, assigning them globally unique identifiers and semantic role labels to form a set of logical conditions: (6) In formula (6), Represents a set of semantic logical units in natural language that involve data filtering or constraints; The smallest executable logical unit includes: A globally unique alias for a logical condition; : The executable expression corresponding to the condition; The semantic role of logical conditions in computation (e.g., numerator, denominator, filter); : Natural language description of logical conditions.

[0049] The task execution module performs tasks based on logical connectors and hierarchical relationships within the text. Each logical unit in the process performs Boolean structure reconstruction to generate a combinational structure with priority constraints: (7) In formula (7), Indicates in The system establishes Boolean dependencies and priorities, forming an executable logic combination tree. For ratio-type metrics, the system can... Based on this, denominator and numerator input chains are derived to ensure the consistency and computability of logical filtering and statistical stratification.

[0050] Finally, the input parsing module extracts business boundary information such as statistical period, applicable scope, and statistical granularity from the indicator definition text, and normalizes and encodes it into a business constraint structure. .

[0051] At this point, the indicator parsing agent encapsulates the results of steps S1-2 to S1-4 in a unified manner, and the memory module synchronously saves the parsing process and intermediate states, generating an executable indicator semantic model: (8) In formula (8), This is the original definition text. For structured mathematical formulas, For a set of variables, For logical condition set, This represents the Boolean logical combination relationship between conditions, and Business constraints such as data granularity and time window.

[0052] While generating the semantic model of the indicator, the indicator parsing agent... The semantic variables and corresponding business domain information in the ISM are used to automatically derive and generate an Indicator Semantic Request (ISR). The ISR is a semantic requirement description derived from the ISM, used to express the data domains and semantic variables required by the indicator. Its structure can be represented as follows: (9) In formula (9), This indicates the data domain involved in the indicator. This represents the set of variables defined in the semantic model of the indicator. The ISR, as a semantic request object that can be directly called by downstream modules, is used for semantic matching and service selection in the subsequent S3 stage; while the ISM, as a standardized semantic model, is stored in the memory module and used as the logical basis for service encapsulation, indicator calculation and result verification in the subsequent stages.

[0053] S2. Abstraction of Multi-Source Data Access Interfaces and Construction of Model Context Protocol (MCP) Services. This stage aims to unify the abstraction of multi-source heterogeneous medical data and construct a data service layer that can be automatically accessed by intelligent agents. Referring to the data domain labels marked in S1, the system encapsulates underlying data resources into coarse-grained, reusable MCP service units, using the medical business semantic domain as the unit. This forms a standardized set of MCP services and a service registry, providing a unified interface foundation for subsequent semantic matching and data access.

[0054] In this embodiment of the invention, step S2 specifically includes the following steps: S2-1. MCP coarse-grained service construction and semantic self-description generation.

[0055] For heterogeneous data from multiple sources, including database table structures, Excel / CSV tables, and document image parsing results (such as PDFs and image diagnostic reports), and covering multiple business systems such as Electronic Medical Record (EMR), Laboratory Information System (LIS), Progress Notes (PN), and Physician Orders Management (ORD), the system aggregates and encapsulates heterogeneous data based on established medical business semantic domain classification standards, abstracting the heterogeneous data access capability into a coarse-grained data service set of MCP. (10) Each MCP declares its access capabilities using a structured semantic description: (11) In formula (11), Used to identify the semantic domains covered by the service. Describe the accessible data entities and their structured attributes. Define the semantic interpretation of attribute values ​​and their conceptual mapping relationship with standard medical ontology.

[0056] Through step S2-1, the system maintains the diversity of data sources while achieving consistent semantic encapsulation across systems, enabling data from different business systems to be accessed and invoked with a consistent semantic structure, providing a unified structured access foundation for subsequent semantic matching and variable binding.

[0057] S2-2. Service registration and interface definition output.

[0058] The system registers the semantic description information of each MCP service constructed in step S2-1 to the service registration table, forming a discoverable and reusable semantic capability catalog: (12) Based on the MCP semantic definition, a standardized interface specification is generated for each service, which clarifies the input parameters, return structure and calling mode to support cross-system calls and consistent reuse.

[0059] The data access abstraction layer is defined as follows: (13) In formula (13), This represents a collection of coarse-grained data access services that can be directly invoked after semantic encapsulation. Define a unified calling syntax and data structure across systems. The semantic description metadata of all services is recorded. Thus, this invention establishes a coherent abstraction layer between the semantic space and the data access space, enabling multi-source medical data access capabilities to possess discoverability, reusability, and cross-system migration capabilities, providing a standardized input interface for subsequent semantic matching in stage S3 and data extraction in stage S4.

[0060] S3. Semantic matching and MCP service binding is performed by the service selection agent (MCP Selector Agent). It is used to automatically select the service that best matches the indicator variable from multiple registered MCP services based on semantic reasoning, realize the dynamic binding between the indicator semantic model and the MCP service, and generate the variable-service mapping relationship.

[0061] In this embodiment of the invention, step S3 specifically includes the following steps: S3-1. Service Selection Agent Construction.

[0062] The service selection agent consists of an input parsing module, a semantic reasoning module, a task execution module, and a memory module. Each module operates collaboratively through a shared cache and an asynchronous task queue. The functions of each module are as follows: (1) Input parsing module: used to load the indicator semantic model, extract the variable set and semantic labels, and provide the input basis for semantic matching; (2) Semantic reasoning module: used to calculate the semantic similarity between variables and MCP services based on semantic embedding and contextual information, and to realize semantic layer matching inference; (3) Task execution module: used to generate variable-service mapping table and binding configuration file according to the matching results, so as to realize the structured output of the matching results; (4) Memory module: records intermediate states, context semantics and operation logs, supporting subsequent verification and tracing.

[0063] S3-2. Semantic parsing of indicator variables and matching of candidate services.

[0064] The input parsing module loads the semantic model of the indicator and extracts the set of variables from it. As a semantic anchor. Also from the service registry. Read the semantic descriptions of each MCP service, where each All of them include domain tags, data entities, and attribute semantics.

[0065] The semantic reasoning module defines a semantic similarity function between variables and services: (14) In formula (14), This represents a similarity calculation function based on large model semantic embedding and context comparison, used to measure the consistency between variable semantics and service attribute semantics. When ( (System threshold), decision variable This can be mapped to the corresponding MCP service. The system automatically selects the target service with the highest score: (15) In formula (15), This indicates that among all candidate service sets, the variable v is related to... i The target MCP service object that best matches semantics.

[0066] S3-3. Variable-Service Mapping Table Generation and Log Recording.

[0067] After the matching is complete, the task execution module processes all successfully matched variables v. i Construct a unified variable-service mapping table: (16) And generate the corresponding binding configuration file to record the service identifier, interface path and access parameter definition of the variable: (17) The memory module continuously records intermediate results of the matching process, including the candidate service list, semantic score, and final binding result, and writes them to the matching log. Synchronize to the system traceability library to support verification and backtracking in the S6 phase.

[0068] Through the above steps, the system establishes a dynamic binding mechanism between the indicator semantic model and the multi-source data access service, outputting a unified variable-service mapping table and binding configuration file. This result serves as input for the subsequent S4 data extraction stage, enabling automatic connection and traceable execution between semantic layer definition and data layer access.

[0069] S4. Data acquisition and preprocessing are performed by the data acquisition agent, which extracts and parses relevant data from the MCP interface according to the binding configuration to form a standardized variable dataset that can be directly used for indicator calculation.

[0070] In this embodiment of the invention, step S4 specifically includes the following steps: S4-1. Construction of the data extraction agent, which consists of an input parsing module, a task scheduling module, a semantic parsing module, and a memory module. Each module operates collaboratively through a shared cache and an asynchronous task queue. The functions of each module are as follows: (1) Input parsing module: used to load the variables – service binding configuration output from the previous stage (S3). It parses the service paths, parameter definitions, and interface specifications to generate a standardized set of access instructions; (2) Task scheduling module: Dynamically calls the MCP interface according to the instruction set to realize parallel access of multiple services and cross-system data scheduling; (3) Semantic parsing module: used to perform semantic-level parsing, type determination and standardization on the raw data results returned by the task scheduling module; (4) Memory module: Records call logs, caches intermediate data and semantic evidence, and provides context information for result tracing and consistency verification.

[0071] S4-2. Call the coarse-grained MCP interface.

[0072] The task scheduling module uses the service binding configuration, a variable generated in the S3 phase, as its basis. Cross-system data access is achieved by calling the registered MCP protocol interface: (18) In formula (18), This represents a data access function based on the MCP standard protocol, and its return result. This represents the coarse-grained data result set corresponding to the variables. The system supports parallel access to multiple MCP services and aggregates the access results into a unified data cache pool. (19) In formula (19), This represents a structured set of inputs across semantic domains. Through this step, the task scheduling module completes the mapping transformation from the semantic binding layer to the data access layer, providing a unified data foundation for subsequent variable-level extraction and preprocessing.

[0073] S4-3. Fine-grained data extraction and preprocessing.

[0074] The semantic parsing module, based on the definitions and judgment rules of each variable in the indicator semantic model, performs... Perform fine-grained data parsing and semantic determination. The agent identifies the type attributes of variables and selects the corresponding parsing path accordingly: (1) For existence variables (such as "whether to conduct preoperative discussion"), the semantic parsing module calls the event detection operator to determine whether the specified event or record item exists and returns a boolean result for logical condition judgment; (2) For state variables (such as "whether the use of inhaled drugs is standardized"), the semantic parsing module performs multi-field logical aggregation calculation based on the combination of rule constraints and field conditions to generate a compliance state value that conforms to the semantic rules; (3) For numerical variables (such as “postoperative hospital stay days” or “abnormal test ratio calculation factor”), the semantic parsing module calls arithmetic and aggregation operators to perform numerical calculations, interval extraction or ratio calculations on the field values ​​to generate continuous numerical results.

[0075] The above process can be formally expressed as: (20) In formula (20), For variable-level data parsing functions, This indicates the parsing path for automatic decision-making based on variable type. This function combines semantic tags and logical rules, and through inter-module collaboration, transforms coarse-grained data into fine-grained standardized values; the generated results include variable values. and its corresponding set of evidence (such as original fields, data fragments, and timestamp information).

[0076] Subsequently, the semantic parsing module uses object identifiers (such as patient id) as a unified index to structurally align and organize the parsing results of each variable: (twenty one) In formula (21), This represents the data alignment and integration function, based on the object key (such as patient_id), time window, and granularity constraints in the indicator semantic model. The system unifies and aligns variable values ​​across semantic and temporal dimensions to generate a standardized variable dataset for computation. This result serves as the direct input for the logical calculation of indicators in stage S5. The memory module synchronously records the variable resolution path, the operators used, and the evidence index, providing a complete chain of evidence for verification and backtracking in stage S6.

[0077] S5. Indicator logic execution and calculation is performed by the Compute Agent, which automatically generates a calculation plan based on the indicator semantic model, completes the indicator logic operation, and outputs the calculation result value.

[0078] In this embodiment of the invention, step S5 specifically includes the following steps: S5-1. Construction of the computational execution agent, wherein the execution agent consists of an input parsing module, a task scheduling module, a logic execution module, and a memory module. Each module operates collaboratively through a shared cache and an asynchronous task queue. The functions of each module are as follows: (1) Input parsing module: used to load the indicator semantic model and the standardized dataset output by the S4 stage. Calculation formulas in the analytical model Logical combination relationship With constraints Generate an executable computation task description; (2) Task scheduling module: Based on the task description generated by the input parsing module, construct the operator execution plan, determine the dependency relationship between logical evaluation and arithmetic operation, allocate the operator execution order, and coordinate the scheduling and resource allocation of multi-threaded tasks; (3) Logical execution module: Based on the execution plan generated by the task scheduling module, it processes the standardized dataset. The operator nodes are executed layer by layer to complete operations such as condition filtering, set statistics, Boolean evaluation and arithmetic aggregation, and generate intermediate and final results of the indicators. (4) Memory module: Records operator execution path, variable input, calculation log and intermediate state information, caches execution evidence and context environment, and provides a complete basis for result verification and consistency traceability.

[0079] S5-2. Execution of indicator logic calculation.

[0080] The computational agent first loads the standardized dataset from phase S4. Based on the structural definition of the Indicator Semantic Model (ISM), an operator execution tree is generated. Operator nodes consist of basic computational units, including logical operators (Filter, AND, OR, NOT), grouping operators (Group), statistical operators (Count, Sum), and proportional operators (Ratio, Mean), used to describe the execution path and dependencies of the indicator. During execution, the task scheduling module schedules operator nodes for execution from bottom to top based on dependencies, constructing a concurrently executable scheduling plan. The logical execution module loads data slices from the cache layer by layer according to this plan, sequentially performing logical judgments, set construction, and numerical calculations, gradually generating intermediate results and ultimately obtaining the indicator calculation output.

[0081] First, the system standardizes the dataset. Perform Boolean logic combinations and conditional filtering to generate a set of objects that satisfy specific logical constraints.

[0082] In this embodiment of the invention, taking proportional indicators as an example, the process can be formalized as follows: (twenty two) In formula (22), This represents a logical evaluation function. and These represent sets of objects that satisfy the logic of the numerator and denominator, respectively.

[0083] The logic execution module then follows the indicator formula. Perform arithmetic operations on the above set: (twenty three) Formula (23) is a typical calculation form for ratio indicators, where, , These represent the number of objects that satisfy the conditions in the numerator and denominator, respectively.

[0084] For count, mean, or summation indicators It can be instantiated as the corresponding arithmetic operator function, such as , or Etc. During the calculation process, the task scheduling module combines constraints. The calculation scope is automatically limited by factors such as statistical period, time window, and grouping dimension. After each operator node is executed, the logic execution module writes the intermediate results to the cache and triggers the evaluation of the upper-level operators, realizing data-driven layer-by-layer aggregation calculation. The entire calculation process is monitored and recorded in real time by the memory module, forming a complete execution chain and evidence index to support subsequent verification and tracing.

[0085] S5-3. Structured output of indicator results.

[0086] After completing the indicator calculation, the computational agent encapsulates the calculation results and intermediate process records into a structured output object. Based on the indicator semantic model definition, the system adds metadata such as indicator identifier, name, calculation period, and result value to each result, generating a structured output data object in a unified format. (twenty four) In formula (24), This represents the output object of the indicator, including the indicator identifier, name, formula structure, constraints, and final calculated result value. The system also outputs execution logs and operator paths to achieve result verification and traceable evidence storage. The final generated... As a standard system output, it is passed to the S6 stage for verification, interpretable demonstration, and continuous monitoring.

[0087] S6. Result verification and traceability chain construction are performed by the result verification agent to verify the consistency and rationality of the calculation results and generate a complete calculation traceability chain.

[0088] In this embodiment of the invention, step S6 specifically includes the following steps: S6-1. Construction of the Result Verification Agent. The verification agent consists of an input parsing module, a task scheduling module, a verification execution module, and a memory module. Each module executes collaboratively through a shared cache and an asynchronous task queue. The functions of each module are as follows: (1) Input parsing module: used to load the structured index results generated in the S5 stage. The semantic model of the indicator and the calculation log are used to analyze and verify the formula structure, variable mapping and logical conditions required for verification. (2) Task scheduling module: Based on the verification task description output by the input parsing module, generate a verification plan, organize the consistency and rationality check process, and schedule the verification execution module to execute in sequence; (3) Verification Execution Module: Responsible for performing multi-dimensional verification of indicator results, including formula consistency, variable mapping correctness, data source consistency, logical path correctness and result value rationality, and outputting verification conclusions and anomaly markers; (4) Memory module: Records verification task logs, traceability node indexes and difference comparison results, continuously maintains the traceability chain for indicator calculation, and provides evidence support for subsequent backtracking and interpretability analysis.

[0089] S6-2. Verification of consistency of indicator results.

[0090] The result verification agent first performs a full-dimensional consistency verification of the structured indicator results generated in stage S5, based on the indicator semantic model and computation logs. The verification content includes: (1) Formula consistency verification: check the calculation formula against the definitions in the indicator semantic model. Does it correspond exactly? (2) Verify the correctness of variable mapping and confirm the accuracy of the binding relationship between indicator variables and MCP services; (3) Data source consistency verification: verify the correspondence between the data used for calculation and the registered data domain; (4) Verify the correctness of logical conditions, and review the execution paths and Boolean combination rules of the numerator and denominator logic; (5) Verify the rationality of the numerical values ​​and check whether the calculation results fall within the predefined range or business threshold range.

[0091] For valid results, the system marks them as valid and writes them to the IndicatorRepository for subsequent quality analysis and regulatory statistics. For failed verification, the verification execution module first outputs an anomaly flag and writes the failure status and related logs to the memory module. Subsequently, the system automatically triggers the discrepancy tracing mechanism. The memory module, based on existing calculation logs and the tracing chain, performs discrepancy comparison and step-by-step backtracking to pinpoint the specific source of the deviation.

[0092] S6-3. Construction of the traceability chain.

[0093] The system continuously generates and maintains a traceability chain for index calculation throughout the entire calculation and verification process, recording the entire path information from semantic definition to result output. This traceability chain can be formally represented as: (25) In formula (25), each chain node contains key evidence such as variable values, service call parameters, execution operators, and result data, forming a reproducible semantic-data mapping path. When an anomaly or logical inconsistency is detected during the verification phase, the system performs difference comparison and step-by-step backtracking based on the existing traceability chain to locate the source of the deviation; when the verification is passed, the system also retains the complete traceability chain and log index for subsequent auditing and interpretability requirements.

[0094] Ultimately, the result verification agent outputs the verified indicator results and the corresponding traceability chain, achieving end-to-end traceability from the indicator semantic model to the result data, and ensuring the verifiability, interpretability and consistency of the indicator calculation.

Claims

1. An agent-based complex medical quality management and control index automatic calculation method, characterized in that, The method comprises the following steps: Step 1, index semantic model construction and analysis, executed by index analysis agent, converts medical quality management indicators defined in natural language into structured semantic models that can be understood and calculated by machines, specifically including the following steps: step 101, constructing an index analysis agent, the index analysis agent includes an input analysis module one, a semantic analysis module one, a task execution module one and a memory module one; step 102, the input analysis module one receives natural language index definition text , the semantic analysis module one identifies the calculation intention of the index and extracts the corresponding mathematical structure , completes the conversion from natural language definition to executable calculation structure; step 103, the task execution module one calls the semantic reasoning module one to automatically extract candidate entities and attributes involved in calculation or logical screening from the natural language index definition text , and performs semantic regularization according to the clinical term system to obtain a variable set ; step 104, the semantic analysis module one identifies the logical expression involving enrollment conditions, eligibility restrictions and numerator denominator distinction in the natural language index definition text , and gives it a globally unique identifier and semantic role label to form a logical condition set : , wherein is the smallest executable logic unit, is the globally unique alias of the logical condition, is the executable expression corresponding to the condition, is the semantic role of the logical condition in calculation, is the natural language description of the logical condition; the task execution module one performs Boolean structure reconstruction on each smallest executable logic unit in the logical condition set according to the logical conjunction words and hierarchical relationship in the natural language index definition text , to generate a combined structure with priority constraints: , wherein: represents establishing a Boolean dependency and priority on to form an executable logic combination tree; ; the input analysis module one extracts business boundary information including statistical period, applicable object range and statistical granularity from the natural language index definition text , and normalizes it to a business constraint structure ; step 105, the results of steps 102 to 104 are uniformly packaged, and the memory module one synchronously saves the analysis process and intermediate state to generate an executable index semantic model ISM: , wherein is the original natural language index definition text ; while generating the index semantic model ISM, the index analysis intelligent agent automatically derives and generates an index semantic request ISR according to semantic variables in the variable set and corresponding business domain information; step 2, referring to the data domain label marked in step 1, encapsulating the underlying data resource into a coarse-grained, reusable model context protocol service unit in units of medical business semantic domains, forming a standardized model context protocol service set and a service registry, specifically including the following steps: step 201, for multi-source heterogeneous data covering the electronic medical record system, the examination information system, the medical history record system, and the medical order information system, aggregating and encapsulating according to the established medical business semantic domain classification standard, abstracting heterogeneous data access capabilities into a model context protocol coarse-grained data service set MCP: , wherein 、 、 、 are the electronic medical record system model context protocol coarse-grained data service, the examination information system model context protocol coarse-grained data service, the medical history record system model context protocol coarse-grained data service, and the medical order information system model context protocol coarse-grained data service, respectively; each model context protocol coarse-grained data service in the model context protocol coarse-grained data service set MCP is declared to have access capabilities in a structured semantic description form, obtaining semantic description information of each model context protocol coarse-grained data service; step 202, registering the semantic description information of each model context protocol coarse-grained data service obtained in step S201 to the service registration table, forming a discoverable and reusable semantic capability directory , and generating a standardized interface specification for each model context protocol coarse-grained data service according to the model context protocol semantic definition, clearly defining input parameters, return structures, and calling modes to support cross-system calling and consistency reuse, and constructing a data access abstraction layer : , wherein represents a model context protocol coarse-grained data service set that can be directly called after semantic encapsulation, defines the calling syntax and data structure of the cross-system unified model context protocol coarse-grained data service; step 3, semantic matching and model context protocol service binding, based on the data access abstraction layer This process, executed by a service selection agent, automatically selects the service that best matches the indicator variables from multiple registered Model Context Protocol (MCP) services based on semantic reasoning. This achieves dynamic binding between the indicator semantic model and the MCP services, generating a variable-service mapping relationship. Specifically, it includes the following steps: Step 301: Constructing a service selection agent, which includes an input parsing module two, a semantic reasoning module two, a task execution module two, and a memory module two; Step 302: The input parsing module two loads the indicator semantic model and extracts its variable set. As a semantic anchor, and also from the service registry The semantic description information of each model context protocol service is read; the variable set is defined through the semantic reasoning module 2. The semantic similarity function between each variable and the model context protocol service, if the , , , Any j-th model context protocol coarse-grained data service With variable set Any i-th variable v i The semantic similarity function is expressed as Then determine v i Mappable to , will target the same variable v i The highest semantic similarity function obtained The corresponding model context protocol coarse-grained data service serves as the basis for the current variable v. i The most matching target model context protocol service object, among which, As the system threshold, realize variable v i Matching with service objects; Step 303, completing the variable set After matching all variables in the data, task execution module two performs a process on all successfully matched variables v. i A unified variable-service mapping table is constructed, and a corresponding variable-service binding configuration file is generated to record the service identifier, interface path, and access parameter definition of the variable. At the same time, the memory module continuously records the intermediate results of the matching process, including the candidate service list, semantic score, and final binding result, and writes them to the matching log. The data is synchronized to the system traceability library to support verification and backtracking in subsequent stages; Step 4, data acquisition and preprocessing, is executed by the data acquisition agent, based on the data access abstraction layer constructed in Step 2. , extracts and parses relevant data from the data interface according to the binding configuration, forms a standardized variable data set that can be directly used for index calculation, and specifically includes the following steps: step 401, constructing a data extraction agent, the data extraction agent including an input analysis module three, a task scheduling module three, a semantic analysis module three and a memory module three; step 402, the task scheduling module three realizes cross-system data access by calling the protocol interface of the registered model context protocol according to the variable-service binding configuration generated in step 3, obtains a coarse-grained data result set corresponding to each variable, wherein the variable v i The corresponding coarse-grained data result set is represented as ; all coarse-grained data result sets are uniformly gathered to a data cache pool ; step 403, the semantic analysis module three performs fine-grained data analysis and semantic judgment on the coarse-grained data result set based on the definition and judgment rules of each variable in the index semantic model ISM, identifies the type attribute of the variable, and sequentially selects the corresponding analysis path to generate results including variable values and its corresponding evidence set ; the semantic analysis module three uses object identification as a unified index to structure, align and organize the variable analysis results to generate a standardized variable data set for calculation : , wherein represents a data alignment and integration function, is a granularity constraint, is an object key in the index semantic model ISM; at the same time, the memory module three synchronously records the variable analysis path, the use operator and the evidence index, providing a complete basis chain for subsequent verification and backtracking; step 5, index logic execution and calculation, executed by a calculation execution agent, automatically generates a calculation plan based on the index semantic model ISM and completes index logic operation, outputs the calculation result value, and specifically includes the following steps: step 501, the calculation execution agent loads the standardized data set generated in step 4 According to the structure definition of the index semantic model ISM, an operator execution tree is generated, and an operator node in the operator execution tree is composed of a basic calculation unit, and is used for describing an execution path and a dependency relationship of the index; in a running process, the calculation execution agent schedules the operator node execution from bottom to top according to the dependency relationship, constructs a concurrent executable scheduling plan, and then loads data slices in the cache layer by layer according to the plan, sequentially completes logical judgment, set construction and numerical calculation, gradually generates an intermediate result and finally obtains an index calculation output; in step 502, after the index calculation is completed, the calculation execution agent encapsulates the calculation result and an intermediate process record into a structured output object, and according to the index semantic model ISM definition, meta information including an index identifier, a name, a calculation period and a result value is attached to each result, and a structured output data object in a unified format is generated , which is used as a system standard output and can be used for verification, interpretable display and continuous monitoring in a subsequent stage.

2. The agent-based complex medical quality management and control index automatic calculation method according to claim 1, characterized in that, In step 102, the mathematical structure is represented as: where: Op is an index operator; Expr is an executable computation expression, one computation expression Expr can be constructed from a combination of several operators and terms, and allows semantic role aggregation on variables.

3. The agent-based complex medical quality management and control index automatic calculation method according to claim 1, characterized in that, In step 103, the variable set is represented as: , where: v i is the i-th variable; is the natural language description of the variable name; is the standard semantic label; is the data field identifier to indicate the data source category of the variable v i .

4. The agent-based complex medical quality management and control index automatic calculation method according to claim 1, characterized in that, In step 105, the indicator semantic request ISR is a semantic requirement description derived from the indicator semantic model ISM, used to express the data domain and semantic variables required by the indicator, denoted as: , wherein, represents the data domain involved in the indicator, represents the variable set defined in the indicator semantic model.

5. The agent-based complex medical quality management and control indicator automatic calculation method according to claim 1, characterized in that, In step 201, the , , , The semantic description information of any jthmodel context protocol coarse-grained data service is represented as Then, we have: where is used to identify the semantic domain covered by the service, describes the accessible data entities and their structured attributes, defines the semantic interpretation of attribute values and their conceptual mapping relationship with standard medical ontologies.

6. The agent-based complex medical quality management and control indicator automatic calculation method according to claim 5, characterized in that, In step 302, the , , , Any jthmodel context protocol coarse-grained data service With a set of variables The semantic similarity function of any ithvariable v i is denoted as Then we have: where denotes the similarity computation function.

7. The agent-based complex medical quality management and control indicator automatic calculation method according to claim 1, characterized in that, In step 403, when the type attribute is identified: for the existence variable, the semantic analysis module three calls the event detection operator to judge whether the specified event or record item exists and returns a Boolean result for logical condition judgment; For the state variable, the semantic analysis module three performs multi-field logical aggregation calculation according to the rule constraint and field condition combination to generate a compliance state value conforming to the semantic rule; for the numerical variable, the semantic analysis module three calls the arithmetic and aggregation operator to perform numerical calculation, interval extraction or proportion solving on the field value to generate a continuous numerical value type result.

8. The agent-based complex medical quality management and control indicator automatic calculation method according to claim 1, characterized in that, In step 503, the structured output data object is represented as: wherein is an index identification, is an index name, is a formula structure, is a constraint condition, is a final calculation result value.

9. The agent-based complex medical quality management and control indicator automatic calculation method according to claim 1, characterized in that, After the step 5, further comprising: step 6, result verification and traceability chain construction, executed by the result verification agent, the consistency and rationality of the calculation result are checked, and a complete calculation traceability chain is generated, specifically comprising the following steps: step 601, the result verification agent verifies the structured output data object generated in step 5 according to the index semantic model ISM and the calculation log Full-dimension consistency verification is performed: for the results that pass the verification, the results are marked as valid and written into the index result library for subsequent quality analysis and regulatory statistics; for the case of verification failure, an exception mark is output, the failure state and related logs are saved, and the difference traceability mechanism is automatically triggered, based on the existing calculation log and traceability chain, difference comparison and step-by-step backtracking are performed to locate the specific deviation source; step 602, the index calculation traceability chain is continuously generated and maintained during the whole process of calculation and verification, which is used to record the whole path information from semantic definition to result output, each chain node contains variable value, service call parameter, execution operator and result data and other key evidence, forming a reproducible semantic-data mapping path; when an exception or logical inconsistency is detected in the verification phase, difference comparison and step-by-step backtracking are performed based on the existing traceability chain to locate the deviation source; when the verification is passed, the system also retains the complete traceability chain and log index for subsequent audit and explainability requirements; step 603, the result verification agent outputs the verified index result and the corresponding traceability chain, realizes end-to-end traceable guarantee from the index semantic model to the result data, and ensures the verifiability, explainability and result consistency of the index calculation.

10. The agent-based complex medical quality management and control indicator automatic calculation method according to claim 9, characterized in that, In step 601, the verification content includes: formula consistency verification, checking the calculation formula against the definitions in the indicator semantic model. Verify whether there is a complete correspondence; verify the correctness of variable mapping to confirm the accuracy of the binding relationship between indicator variables and model context protocol services; verify the consistency of data sources to check the correspondence between the data used in the calculation and the registered data domain; verify the correctness of logical conditions to review the execution path and Boolean combination rules of the numerator and denominator logic; and verify the rationality of numerical values ​​to check whether the calculation results fall within the predefined range or business threshold range.

Citation Information

Patent Citations

  • Electronic medical record intelligent evaluation method based on complex quality control indexes

    CN120564931A

Cited By

  • Medical ward round record generation method and system based on large language model

    CN122091061A