Electronic medical record in-process quality control method based on cooperation of intelligent agent and robot process automation technology
Through the collaboration between the agent and the robot process automation technology, an operation sequence and medical knowledge graph are built, which solves the problem of insufficient context perception and response lag of the electronic medical record quality control system, and achieves high-precision and real-time medical quality control.
Patent Information
- Application Number
- CN202510469468.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing electronic medical record-based quality control system has problems such as insufficient context perception, lack of behavioral sequence modeling capabilities, multi-system fragmentation and response lag, making it difficult to achieve high-precision and real-time medical quality control.
The method of collaborating between agents and robot process automation technology is adopted to generate semantic enhanced causal maps by constructing operation sequences, causal maps and medical knowledge maps, and combine multi-agent collaborative judgment and automated execution intervention to achieve real-time quality control of doctors' behavior.
It has achieved higher accuracy and stronger contextual perception capabilities, which has improved the accuracy, real-time and interpretability of medical quality control and reduced the burden on doctors.
Smart Images

Figure CN120356598A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent agent and robotic process automation technology, and in particular to an in-process quality control method for electronic medical records based on the collaboration of intelligent agent and robotic process automation technology. Background Art
[0002] In modern hospital information systems (HIS), electronic medical records (EMR) have become an important carrier for doctors' daily diagnosis and treatment operations, covering key medical processes such as admission assessment, diagnosis, examination, medication, treatment plan, and discharge summary. However, with the increasing complexity of medical record structure and the refinement of medical behavior, medical quality control (quality control) has gradually transitioned from "post-event spot checks" to a new stage of "real-time monitoring during the event." Especially in terms of medical safety, medical insurance compliance, and clinical pathway consistency, medical institutions have an increasingly urgent need for real-time intervention and dynamic review of electronic medical records.
[0003] Most of the current mainstream electronic medical record quality control solutions are based on fixed rule bases or rule engines, and realize automatic inspection by matching field values, triggering verification logic, prompting pop-up windows, etc. Although this type of method can cover some normative requirements, it has the following significant shortcomings: First, the static nature of quality control rules makes it difficult to adapt to the individualized filling process of doctors and the changing clinical situations, and the rule execution lacks context perception; second, this type of method cannot effectively model the cross-field dependency logic between the modules of the medical record, and it is difficult to capture the sequential hidden danger of "the impact of early filling content on subsequent behavior"; third, although some systems have introduced robotic process automation technology to automatically perform repetitive tasks, they often exist as separate modules, disconnected from the quality control system, and cannot be flexibly triggered according to the current behavior status of doctors, and lack intelligent decision-making capabilities for intervention behaviors.
[0004] In recent years, the development of artificial intelligence, especially agent systems, has brought new possibilities for medical quality control. Agents can simulate human cognition, have the ability to make independent judgments and select strategies, and can theoretically judge whether doctors' behavior is standardized based on the context, and actively provide intervention suggestions. However, in actual deployment, the existing agent quality control systems are mostly single-body working modes, lack multi-role and multi-perspective collaboration mechanisms, and cannot make systematic judgments in complex medical situations. In addition, whether it is a traditional rule system, a robotic process automation system or an agent system, they generally lack the ability to uniformly model "behavioral causality" and "medical knowledge semantic structure" at this stage, resulting in many potential errors that cannot be discovered or accurately located in time during the event, and it is difficult to balance quality control effects and doctor experience.
[0005] Therefore, there is an urgent need for a new system architecture that can integrate the understanding of doctor behavior sequences, semantic knowledge reasoning, multi-agent collaborative judgment, and automated execution intervention, so as to achieve the "structured, reasoning-based, intelligent" real-time quality control of electronic medical records. Only by solving the above key problems can we improve the level of medical quality control, reduce the burden on doctors, and ensure the practicality and sustainability of the system. Summary of the Invention
[0006] The object of the present invention is to design a method for real-time quality control of electronic medical records based on the collaboration of agent and robotic process automation technologies, which solves the problems of insufficient context awareness, lack of behavior sequence modeling ability, fragmentation of multiple systems, and response lag in existing real-time quality control systems for electronic medical records.
[0007] To achieve the above object, the present invention provides a method for real-time quality control of electronic medical records based on the collaboration of agent and robotic process automation technologies, and the method includes the following steps:
[0008] S1. Obtain each operation event in the electronic medical record system, construct an operation sequence, splice features of the operation sequence, generate a behavior embedding vector, and form a behavior embedding sequence; wherein, the operation event includes a module identifier where the doctor operation occurs, a specific field ID, an operation type, a value input or selected by the doctor in the field, and an operation timestamp; the behavior embedding vector includes module position information, field representation, semantic text embedding, operation type, and time features;
[0009] S2. Construct a causal graph:
[0010] Analyze the potential causal relationship between any two behavior embedding vectors, and use the edge between any two behavior embedding vectors with a potential causal relationship and an edge confidence greater than a preset threshold as the edge of the causal graph, and use the behavior embedding vector as the node of the causal graph, where one node is an entity;
[0011] S3. Construct a medical knowledge graph, and semantically enhance the causal graph according to the medical knowledge graph to generate a semantically enhanced causal graph;
[0012] S4. For each edge of the semantically enhanced causal graph, construct a task vector, traverse all agents, each agent is registered with a type of knowledge graph entity that can be processed, a type of task that the agent can handle, an agent priority, and a prerequisite task dependency. For the type of entity pair included in the type of knowledge graph entity that can be processed, determine a scheduling score through cosine similarity, select the agent with the highest score and satisfied dependencies according to the scheduling score, record the allocation relationship, and generate an agent task allocation structure according to the allocation relationship; wherein, the task allocation structure includes several tasks;
[0013] S5. Convert the intelligent agent task allocation structure into actual intervention behaviors, and let the robotic process automation module be responsible for executing the corresponding intervention behaviors to generate an intervention result table.
[0014] Furthermore, the method further includes:
[0015] Collect the feedback data for executing the intervention result table, and use the feedback data as a supervision label to form a training sample set with the corresponding task allocation vector;
[0016] Construct a feedback loss function according to the training sample set to evaluate the deviation between the scheduling result and the intervention effectiveness. Adjust the weight of task allocation or the ability vector of the intelligent agent to make the system more prefer to dispatch those intelligent agents with good historical intervention effects, and gradually approach the optimal dispatch strategy;
[0017] Collect the task vectors for each intelligent agent to successfully execute the intervention, respectively construct their historical task average embedding representations, and use the task average embedding representations as the update targets of the corresponding intelligent agent's ability vectors for evolution;
[0018] Execute a policy fine-tuning cycle when the preset time window or the cumulative sample size reaches the threshold.
[0019] Furthermore, the operation sequence includes several behavior embedding vectors;
[0020] Among them, the semantic text embedding is optimized through a semantic alignment regular term.
[0021] Furthermore, the analysis of the potential causal relationship between any two behavior embedding vectors is determined based on a causal edge score p ij The calculation is as follows:
[0022]
[0023] Among them, x i , x j respectively represent the embedding vectors of the doctor's i-th and j-th operations; (x j - x i ) 2 represents the semantic change intensity between the two operations; [||] is the vector concatenation operation; γ ij is a medical logic association coding term, defined as follows:
[0024]
[0025] Among them, are respectively the field embeddings corresponding to x i , x j ; δ mod (i, j) represents xi with x j whether it comes from different modules
[0026] Among them, the causal graph also has a loss function for the case of ineffective intervention, which is used to adjust the processing of ineffective intervention samples in model training
[0027] Furthermore, the construction of the medical knowledge graph is used to semantically enhance the causal graph according to the medical knowledge graph to generate a semantically enhanced causal graph. Specifically
[0028] Construct a medical knowledge graph, the entity set includes: diagnosis category, drug category, examination category, medical insurance rule category; the edge set T includes: dependence, prerequisite condition and exclusion
[0029] Map the field values and fields in each node in the medical knowledge graph to entities in the knowledge graph
[0030] After successfully completing the semantic mapping of each pair of causal edges in the knowledge graph, calculate the support degree of the entity pair in the knowledge graph through the embedding similarity in the knowledge graph
[0031] Output the semantically enhanced causal graph
[0032] Based on the same nodes as the causal graph, output the causal edges with support degrees greater than the preset threshold as the new edge set. Each edge is attached with two scores, namely the corresponding causal edge score and support degree. At the same time, all semantically conflicting marked edges are reserved in the risk queue
[0033] Furthermore, the mapping of the field values and fields in each node in the medical knowledge graph to entities in the knowledge graph is specifically
[0034] Segment the field values, and combine the term dictionary, fuzzy matching technology and natural language processing methods in the medical field to perform standardized matching on entities; and strengthen the limitation of fields
[0035] Furthermore, the task vector includes the type combination of entity pairs, causal strength score, support degree, difference in module IDs of the two nodes, and topological depth of the starting node in the graph
[0036] The scheduling score is designed as
[0037]
[0038] Among them, μ k is the ability vector of Agent a k , obtained by manual annotation or historical task clustering; Agent a k is the intelligent agent a K ; sim(qij , μ k ) is the cosine similarity, which measures whether the task matches the agent; is whether the dependency is satisfied. If Agent a k has an unfinished dependency, the value is 0; otherwise, it is 1. Load(a k ) is the task load of the current agent a K . λ1 and λ2 are empirical hyperparameters.
[0039] Further, the operations of the robotic process automation module include:
[0040] Pop-up windows or page labels remind the doctor to complete a certain operation. For predictable field contents, the recommended values are automatically filled. When an illegal operation is found, the last step is revoked and the fields are reset
[0041] Transforming the agent task allocation structure into actual intervention behaviors, and the robotic process automation module is responsible for executing the corresponding intervention behaviors to generate an intervention result table. Specifically:
[0042] Read each task, including: the corresponding agent, target field, adjacent fields, and task type; query the robotic process automation module and execute the corresponding template behavior to generate an intervention execution record;
[0043] After each intervention is executed, record the feedback data, including: whether the execution is successful, whether the doctor retains the intervention value or modifies or revokes it, the time from the intervention to the doctor's operation confirmation, whether the doctor manually revokes the system intervention, and optional items;
[0044] Output the target field, adjacent fields, corresponding agent, intervention execution record, and feedback content as an intervention result table.
[0045] The beneficial technical effects of the present invention are at least as follows:
[0046] In view of the problems of insufficient context perception, lack of behavior sequence modeling capabilities, multi-system fragmentation and response lag in the existing electronic medical record in-process quality control system, the present invention proposes a collaborative electronic medical record in-process quality control method that integrates intelligent system and robotic process automation technology. This method is based on the behavioral sequence of doctors in the process of electronic medical record operation, constructs a structured expression model of the dependency relationship between behaviors, and combines semantic layer information such as medical knowledge graphs to judge the diagnosis and treatment logic conflicts or compliance risks that may be caused by certain operations. On this basis, the system selectively evokes intelligent agents with different expertise (such as medical insurance review, diagnosis consistency judgment, medication logic analysis, etc.) through an intelligent agent scheduling mechanism with role perception capabilities, and when necessary, links the robotic process automation module to perform refined automatic intervention operations, such as field correction, pop-up prompts or suggested reconstruction, forming a real-time quality control closed loop of "recognition-judgment-intervention" trinity. The core of the invention is that by coupling behavioral logic reasoning with medical knowledge reasoning and introducing multi-agent collaboration and automatic execution mechanisms, a more accurate, context-aware, and more supportive in-process intervention method for doctors' behavior is achieved, thereby effectively solving the defects of existing systems in terms of accuracy, real-time performance, scalability, and interpretability. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0048] Figure 1 This is a flow chart of an in-process quality control method for electronic medical records based on the collaboration of intelligent agents and robotic process automation technologies according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0050] In one or more embodiments, Figure 1 As shown, the present invention discloses an in-process quality control method for electronic medical records based on the collaboration of intelligent agents and robotic process automation technology, and the method includes:
[0051] S1. Obtain each operation event in the electronic medical record system, construct an operation sequence, splice the features of the operation sequence to generate a behavior embedding vector, and form a behavior embedding sequence; wherein, the operation event includes the module identifier where the doctor's operation occurs, the specific field ID, the operation type, the value input or selected by the doctor in the field, and the operation timestamp; the behavior embedding vector includes module position information, field representation, semantic text embedding, operation type, and time feature.
[0052] Specifically, in the present invention, the task of the first step is to extract behavior data in real time from the operation process of doctors in the electronic medical record (EMR) system, providing structured input for subsequent causal modeling, agent scheduling, and robotic process automation intervention. Different from traditional systems that only monitor field or form data, this step innovatively constructs a structure-semantic joint embedding mechanism around "behavior" to capture the "cognitive path" of doctors, providing a high-quality starting point for causal chain construction.
[0053] For the complex behavior structure of doctors' operations in the EMR system, define each operation event e t as a five-tuple:
[0054] e t =(mod t , field t , op t , val t , t) (1)
[0055] mod t : The module identifier where the doctor's operation occurs, such as "admission record", "diagnostic information", collected by the routing information of the EMR front-end module;
[0056] field t : The specific field ID, such as "primary diagnosis", "surgery time", from the EMR field definition dictionary;
[0057] op t : The operation type (such as click, fill, modify, delete), captured by the front-end listener;
[0058] val t : The value input or selected by the doctor in the field, such as "amoxicillin", "type II diabetes", extracted by listening to the input content;
[0059] t: The operation timestamp, obtained from the system event log to ensure the behavior order.
[0060] All events constitute an operation sequence S = {e1, e2,..., e T}.
[0061] Furthermore, to support causal modeling and semantic reasoning, an operation behavior embedding vector x is designed. t , which forms a behavior embedding sequence X = {x1, x2,..., x T}:
[0062] x t = [E mod (mod t ) || E field (field t ) || E val (val t ) || E op (op t ) || φ(t)] (2)
[0063] E mod (·): Sparse coding embedding of module types, used to distinguish structural contexts;
[0064] E field (·): Sparse coding of field IDs to ensure field distinguishability;
[0065] E val (·): Semantic embedding of values, obtained by training with a medical term dictionary + named entity recognition (NER) + medical ontology mapping;
[0066] E op (·): Discrete coding of operation types (e.g., "click" = 0, "fill" = 1);
[0067] φ(t): Temporal information feature, e.g., φ(t) = log(1 + Δt) represents the interval from the previous operation, reflecting doctors' operation habits and frequencies.
[0068] Furthermore, to address the issues of medical term diversity and heterogeneity, a semantic alignment regularization term is designed for training E val :
[0069]
[0070] A set of semantically similar entity pairs, such as ("Type II diabetes", "Type 2 diabetes"), obtained by NLP + medical insurance coding similarity matching;
[0071] A set of rare or misspelled entities, sourced from entries that cannot be matched to the standard dictionary after entity recognition;
[0072] λ: Regularization term weight, controlling the convergence stability of sparse terms, usually set to 10 -2 ;
[0073] Among them, the first item is semantic neighbor aggregation, and the second item is embedding contraction to prevent non-convergence.
[0074] The output embedding sequence X will be used as the input for causal graph modeling in Step 2. In subsequent steps, a causal relationship graph G between operations will be constructed based on X c , which is used for agent judgment and intervention strategy reasoning.
[0075] S2. Construct a causal graph:
[0076] Analyze the potential causal relationships between any two behavior embedding vectors. Consider the edges between any two behavior embedding vectors with potential causal relationships and edge confidence greater than a preset threshold as the edges of the causal graph, and consider the behavior embedding vectors as the nodes of the causal graph, where one node is an entity.
[0077] Specifically, the goal of this step is to transform the doctor operation behavior sequence embedding X = {x1, x2,..., x T} extracted in Step 1 into an operation graph structure G c =(V, R) with a clear causal direction. This is the central link for the entire system to achieve "intelligent quality control during the process", because only when the system can clearly know "which operation will cause subsequent problems", can it achieve accurate, real-time, context-related intelligent agent intervention and automatic correction of robotic process automation.
[0078] It can be understood that in an electronic medical record system, doctors' operation behaviors often exhibit complex cross-module dependencies, operation path jumps, and lag errors (such as incorrect diagnosis affecting medication, which in turn affects medical insurance coding). Therefore, this step must not only focus on the operation sequence, but more importantly, identify behavior chains with potential causal structures. This solution designs a time-series-semantic fusion causal structure learning method for medical scenarios, which models, scores, and filters possible causal paths between operations through a graph model to provide structural support for subsequent intelligent intervention.
[0079] Furthermore, the input is the embedding sequence X = {x1, x2,..., x T} constructed in Step 1, and each x t is a d-dimensional vector containing:
[0080] E mod : Module location information;
[0081] E field : Field representation;
[0082] E val : Semantic text embedding;
[0083] E op : Operation type;
[0084] φ(t): Temporal feature.
[0085] Furthermore, the mapping objective is to output a causal directed graph G = (V, R) by identifying potential influence paths in the operating room, where V represents the node set (i.e., each operation x c ), and R represents the causal directed edge set (v t → v i ). j )
[0086] Furthermore, the design of the causal edge scoring function: To measure whether there is a potential causal relationship of "x i causes x j to be abnormal" between any two operations x i and x j , the following scoring mechanism is designed:
[0087]
[0088] Where:
[0089] x i , x j : Respectively represent the embedding vectors of the doctor's i-th and j-th operations;
[0090] x j - x i ) 2 : Represents the semantic "change intensity" between two operations;
[0091] ||: Vector concatenation operation;
[0092] γ ij : The medical logic association coding item specially designed for the present invention, defined as follows:
[0093]
[0094] Are respectively the field embeddings corresponding to x i , x j (such as "primary diagnosis", "medication instructions");
[0095] δ mod (i, j): Represents whether x i and x j come from different modules (such as the diagnosis module vs. the medication module);
[0096] Furthermore, this item is used to capture cross-module logical structure dependencies, which are the "cross-structure implicit causal dependencies" that are extremely common in the medical process but difficult to be modeled by traditional models.
[0097] It is understandable that in the basic semantic change discrimination structure, the structure dependence encoding γ is introduced for the first time ij , enhancing the modeling ability of the "logical path jump" behavior in causal reasoning;
[0098] Different from traditional GNNs, a differentiable nested network is used to learn the "semantic-structure joint causal score";
[0099] It is especially suitable for the actual problem of "discontinuous but logically continuous causal chains" in the electronic medical record scenario.
[0100] Furthermore, causal edge screening and graph construction:
[0101] For all operation pairs (x i , x j ) that satisfy j > i, retain the edges with p ij > τ to form the edge set R. The final graph structure is:
[0102] Node set V = {x1, x2,..., x T};
[0103] Edge set R = {(x i → x j ) | p ij > τ};
[0104] τ is the edge confidence threshold, and the empirical value is 0.7 (which can be fine-tuned according to the annotation set).
[0105] Furthermore, to further ensure the graph construction quality, especially to avoid the model misidentifying "high-frequency co-occurrence" as "true causality", the following regularization term (combined with the true historical intervention effect) is introduced:
[0106]
[0107] If the system has previously prompted quality control on x j due to x i , but the doctor did not adopt the suggestion, it indicates that the causal edge of x i → x j may be "mis-triggered"; this term encourages the model to suppress the recurrence of similar "failed causal chains" in history; it reflects the high requirements of the present invention for the "authenticity and credibility of in-process quality control".
[0108] Final output:
[0109] Directed graph G c =(V, R);
[0110] Each node is the operation embedding x t in step one;
[0111] Each edge represents a speculative causal path of "antecedent operation triggering consequent operation".
[0112] S3. Construct a medical knowledge graph, and semantically enhance the causal graph according to the medical knowledge graph to generate a semantically enhanced causal graph.
[0113] Specifically, the goal of this step is to semantically enhance the operation causal graph G c =(V, R), that is, by introducing the medical knowledge graph G k =(E, T), to provide clear medical semantic explanations and logical support judgments for the operation causal chain. This semantically enhanced graph will be used later for agent scheduling strategy judgment, role matching, and intervention rule setting. Therefore, this step is the key springboard from structural modeling to knowledge reasoning in the patent solution.
[0114] Furthermore, input alignment: Use the causal graph G c =(V, R)
[0115] where:
[0116] Each node v i comes from the embedding vector x i in step one, and contains structures such as operation fields, operation values, module IDs, etc.;
[0117] Each edge r ij =(v i →v j ) is attached with a causal inference confidence p ij .
[0118] This step will perform entity alignment processing on the operation fields i and input values carried in each node v , and establish a mapping relationship with the semantic entities in the medical knowledge graph.
[0119] Furthermore, the construction method of the knowledge graph G k =(E, T):
[0120] Construct a medical knowledge graph, and the entity set E includes:
[0121] Diagnosis categories (such as "type 2 diabetes" → ICD-10: E11);
[0122] Drug categories (such as "amoxicillin");
[0123] Examination categories (such as "head CT");
[0124] Medical insurance rule categories (such as "need to fill in indication descriptions") and so on.
[0125] The edge set T includes:
[0126] "Dependency" (e.g., "Diabetes" → "Glycated Hemoglobin Test");
[0127] "Precondition" (e.g., "Filling in the diagnosis" → "Using the medical insurance code");
[0128] "Exclusion" (e.g., "Amoxicillin" ⊥ "Ceftriaxone"), etc.
[0129] The data sources include:
[0130] The open rule database of the National Healthcare Security Administration;
[0131] ICD-10, Pharmacopoeia, Diagnostic and Treatment Pathway Standards;
[0132] Structured knowledge collation of hospital historical data.
[0133] Furthermore, the semantic mapping mechanism: operation behavior → medical entity:
[0134] The present invention defines a matching function Map(x i ), which maps each x i in and jointly to an entity in the knowledge graph
[0135] Perform word segmentation + entity standardization matching on the field value (using a term dictionary + fuzzy matching + medical NLP);
[0136] Strengthen the limitation on the field For example, if the field is "diagnosis", it is only allowed to be mapped to a disease entity;
[0137] Example: If x i is "Diagnosis field: Type 2 diabetes", then the mapping
[0138] Furthermore, the calculation of the semantic support degree of the causal edge:
[0139] After successfully completing the semantic mapping for each pair of causal edges (v i →v j ), the present invention calculates its support degree in the knowledge graph
[0140]
[0141] They are respectively the medical entities mapped by the operation nodes x i ,x j ;
[0142] Embedding similarity in the knowledge graph (e.g., cosine similarity after TransE embedding);
[0143] Whether there is an explicit semantic edge relationship;
[0144] β: Empirically set to 0.5 - 0.7 to control the balance between "structural relationship" and "semantic neighbor".
[0145] This score is used to judge whether the causal path has clinical semantic support and will be used as the core condition for agent role scheduling in the next step.
[0146] Furthermore, in the medical system, although some edges exist structurally, there are semantic conflicts (such as two mutually exclusive medications appearing consecutively in the causal path). Therefore, the present invention introduces the following regularization term to penalize paths that violate medical semantic constraints:
[0147]
[0148] T - : Represents the set of semantic conflict edges included in the knowledge graph;
[0149] If (v i →v j ) is strongly connected by the causal graph construction, but there is a semantic conflict between its entities, then the higher the p ij , the greater the penalty;
[0150] This mechanism embodies the combination of "data-driven judgment + knowledge compliance restriction" of the present invention.
[0151] Furthermore, output: Semantic-enhanced causal graph Output graph In:
[0152] The nodes are the same as G c ;
[0153] The edge set R * is a subset of R that satisfies the semantic support degree ;
[0154] Each edge is attached with two scores, p ij and , for downstream selection;
[0155] All semantically conflict-marked edges are retained in the risk queue (for subsequent agents to handle with high priority).
[0156] S4. For each edge in the semantic-enhanced causal graph, construct a task vector, traverse all agents. Each agent is registered with the types of knowledge graph entities it can process, the types of tasks the agent can handle, the agent priority, and the prerequisite task dependencies. For the types of entity pairs included in the processable knowledge graph entity types, determine the scheduling score through cosine similarity, select the agent with the highest score and satisfied dependencies according to the scheduling score, record the allocation relationship, and generate an agent task allocation structure based on the allocation relationship; wherein, the task allocation structure includes several tasks.
[0157] Specifically, the goal of this step is to model the semantic-enhanced causal graph output in Step 3 to identify potential intervention requirements in the graph and assign the most suitable agent role to each operational causal pair. Each agent represents the processing ability of a certain type of quality control task in the system, such as handling diagnostic consistency, medical insurance field compliance, drug indication matching, etc. Compared with the traditional system where the quality control logic is triggered by a single strategy or rule, the present invention proposes a multi-role agent scheduling mechanism to accurately bridge the "behavior + knowledge graph structure" to the "role task allocation" in the modeling stage.
[0158] Further, input: the graph structure output in Step 3
[0159] Each edge r ij =(v i →v j ) has the following information:
[0160] The operation embeddings of the start and end points: x i , x j (from Step 1);
[0161] The corresponding knowledge graph entity pair: (from Step 3);
[0162] The causal score p ij and the semantic score
[0163] For example, an edge (x i →x j ) means that the doctor first filled in "Diagnosis: Type 2 diabetes" and then filled in "Drug: Glibenclamide". After causal reasoning and knowledge graph verification, this path is highly likely to be a risk path (such as the drug indication relationship) and should be handed over to the "Drug Compliance Agent" for processing.
[0164] Further, assume there are K agents a1,..., a K , and each Agent a k is registered with:
[0165] C k : Processable knowledge graph entity types (such as "Diagnosis ICD", "Drug ATC", "Medical insurance description item", etc.);
[0166] T k : Task types that the Agent can handle (such as "Field missing detection", "Mutually exclusive drug judgment");
[0167] π k : Agent priority (set by hospital policy);
[0168] Dep k : Prerequisite task dependency (such as the medical insurance Agent depends on the diagnosis Agent to fill in the ICD);
[0169] Furthermore, construct the task vector q ij (Modeling by edge unit)
[0170]
[0171] Type combinations of entity pairs, such as (diagnosis, drug);
[0172] p ij : Causal edge score (numerical value such as 0.86);
[0173] Support degree (such as 0.91);
[0174] Δm ij : Difference in module IDs of two nodes;
[0175] GraphDepth ij : Topological depth of the starting node in the graph (measuring the position of the chain).
[0176] Furthermore, the present invention designs the scheduling score function as follows:
[0177]
[0178] μ k : Ability vector of Agent a k obtained by manual annotation or historical task clustering;
[0179] sim(q ij , μ k ): Cosine similarity, measuring the matching degree between the task and the Agent;
[0180] Whether the dependency is satisfied. If Agent a kIf there is an uncompleted dependency, the value is 0; otherwise, it is 1.
[0181] Load(a k ): The task load of the current Agent (such as the number of tasks to be processed).
[0182] λ1, λ2: Experience hyperparameters (e.g., λ1 = 2.0, λ2 = 0.1).
[0183] Furthermore, in the scheduling process, for each edge r ij ∈R / :
[0184] Generate q ij ;
[0185] Traverse all a k , if its C k contains 's type, calculate
[0186] Select the Agent with the highest screening score, satisfying Record the allocation relationship;
[0187] Store the scheduling task in the scheduling task pool:
[0188]
[0189] For example, assume there is the following edge r ij :
[0190] x i = "Main diagnosis: Type 2 diabetes", x j = "Drug: Glibenclamide";
[0191]
[0192] p ij = 0.82,
[0193] Match Agent: a2 (Medication compliance Agent), whose μ2 contains the task ability of the drug field;
[0194] There is no dependency conflict and the current load is low;
[0195] The scheduling score is the highest, and the task is added to <x_i: Diagnosis of Type 2 diabetes, x_j: Glibenclamide, a_2: Medication Agent, TaskType: Indication verification>
[0196] Final output: Structured scheduling task list
[0197] S5. Convert the intelligent agent task allocation structure into actual intervention behaviors, and let the robotic process automation module be responsible for executing the corresponding intervention behaviors to generate an intervention result table.
[0198] Specifically, this step aims to convert the intelligent agent task allocation structure output in step 4 into actual intervention behaviors, and let the robotic process automation module be responsible for executing the corresponding actions. At the same time, this step constructs a structured feedback mechanism for intervention behaviors to support the formation of a "judgment - execution - feedback" closed loop for the system.
[0199] Furthermore, the pre - defined robotic process automation template library of the system includes:
[0200] Prompt type: Pop - up window or page label to remind the doctor to complete a certain operation (such as filling in the diagnosis description);
[0201] Completion type: Automatically fill in the recommended value for predictable field content (such as automatically filling in the medical insurance description field according to the diagnosis suggestion);
[0202] Roll - back type: When an illegal operation is found, cancel the last step and reset the fields.
[0203] Each type of intervention template is an explicit script process and is called according to the task type TaskType.
[0204] Furthermore, task - template matching and invocation:
[0205] The system reads each task <a k ,x i ,x j ,TaskType>;
[0206] Query Find the intervention template corresponding to the task type;
[0207] Execute the template behavior and perform operations such as filling, prompting, and canceling on the field x j (target operation);
[0208] At the same time, generate an intervention execution record including field position, operation content, execution time, etc.
[0209] Example:
[0210] Task type: "Missing medical insurance field";
[0211] Find the template: "Diagnosis description completion template";
[0212] The system reads x i : The diagnosis is "Type Ⅱ diabetes";
[0213] Automatically fill in the "Medical Insurance Explanation Field" with: "Meets the medical insurance indications of E11".
[0214] Furthermore, an intervention feedback structured recording mechanism:
[0215] After each intervention is executed, record the following feedback content f ij :
[0216] Status ij : Whether the execution was successful;
[0217] Accepted ij : Whether the doctor retains the intervention value (=1) or modifies or cancels it (=0);
[0218] Time ij : The time from the intervention to the doctor's operation confirmation;
[0219] Rollback ij : Whether the doctor manually cancels the system intervention;
[0220] Satisfaction ij : Optional. Whether the doctor clicks the "Intervention is reasonable" button.
[0221] These feedback structures are collected as an intervention feedback form and provided for the system optimization logic to use.
[0222] Furthermore, the final output structure is an intervention result table:
[0223]
[0224] Actions performed by the robotic process automation;
[0225] f ij : Execution result feedback information;
[0226] Available for the hospital to use for auditing, for quality scoring, and for model retraining.
[0227] Furthermore, the method further includes:
[0228] Collect the feedback data of the intervention result table, and use the feedback data as a supervision label to form a training sample set with the corresponding task assignment vector;
[0229] Construct a feedback loss function based on the training sample set to evaluate the deviation between the scheduling result and the intervention effectiveness. Adjust the weights of task allocation or the ability vector of the agent to make the system prefer to dispatch those agents with good historical intervention effects, and gradually approach the optimal dispatch strategy;
[0230] Collect the task vectors of each agent that successfully executes the intervention, and respectively construct its historical task average embedding representation. Use the task average embedding representation as the update target of the corresponding agent's ability vector for evolution;
[0231] Execute the policy fine-tuning loop when the preset time window or the cumulative sample size reaches the threshold.
[0232] Specifically, construct the supervised feedback label structure of the intervention behavior
[0233] The present invention transforms each intervention behavior r ij into a supervised label pair (q ij , y ij ):
[0234] q ij : The task vector (constructed in step four);
[0235] y ij = Accepted ij : Whether the system intervention is successful (as a supervised label);
[0236] Combining the task vector q ij with the feedback label can form a training sample set:
[0237]
[0238] This feedback sample set will be used to improve the system behavior modeling in the following two directions:
[0239] Weight optimization of the Agent scheduling function (step four);
[0240] Task selection and execution strategy adjustment of the robotic process automation module (step five).
[0241] Furthermore, optimization of the task-ability matching function:
[0242] The present invention defines the following feedback loss function to evaluate the deviation between the scheduling result and the intervention effectiveness:
[0243]
[0244] Use the scheduling matching score (defined in step four) as the predicted value of successful intervention;
[0245] y ij : True feedback from the intervention record f ij (whether accepted by the doctor);
[0246] σ(·): Sigmoid function, used to normalize scores;
[0247] This loss function is used to feedback and adjust the weight parameters θ or the Agent vector prototype μ of the scheduling model k , making the system more prefer to dispatch those Agents with good historical intervention effects, and gradually approaching the optimal dispatch strategy.
[0248] Further, each Agent a k is equipped with a capability vector μ k (for task matching), and the following update strategy is introduced in the present invention:
[0249] Collect all task vectors q for which this Agent has successfully executed interventions ij (i.e., y ij = 1);
[0250] Construct its historical task average embedding representation
[0251]
[0252] Take as the update target of the current Agent capability vector μ k (updated by moving average or neuron memory pool structure);
[0253] This mechanism enables the agent to "remember" the types of tasks it is good at handling, forming an Agent capability evolution path with domain adaptation characteristics.
[0254] Further, when the system reaches a preset time window (such as daily / weekly) or the cumulative sample size reaches a threshold, it performs a "policy fine-tuning cycle":
[0255] Use to execute the scheduling function parameter adjustment;
[0256] Re-aggregate the successful tasks of each Agent to update μ k ;
[0257] Trigger expert review according to the task types with high failure rates (for manual quality control rule correction);
[0258] The whole process does not require re-training the large model, and only fine-tuning is performed in a small parameter space (matching function and capability vector) to maintain system stability.
[0259] These are only some preferred embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited thereby. Those of ordinary skill in the art can understand all or part of the processes of implementing the above embodiments, and the equivalent changes made according to the claims of the present invention still fall within the scope covered by the invention.
Claims
1. An in-process quality control method for electronic medical records based on the collaboration of agents and robotic process automation technology, characterized in that The method includes the following steps: S1. Obtain each operation event in the electronic medical record system, construct an operation sequence, splice features of the operation sequence to generate a behavior embedding vector, and form a behavior embedding sequence. Wherein, the operation event includes a module identifier where the doctor operation occurs, a specific field ID, an operation type, a value input or selected by the doctor in the field, and an operation timestamp. The behavior embedding vector includes module position information, field representation, semantic text embedding, operation type, and time feature. S2. Construct a causal graph: Analyze the potential causal relationship between any two behavior embedding vectors, and use the edge between any two behavior embedding vectors with a potential causal relationship and an edge confidence greater than a preset threshold as an edge of the causal graph, and use the behavior embedding vector as a node of the causal graph, where one node is an entity. S3. Construct a medical knowledge graph, and semantically enhance the causal graph according to the medical knowledge graph to generate a semantically enhanced causal graph. S4. For each edge of the semantically enhanced causal graph, construct a task vector, traverse all agents. Each agent is registered with a type of knowledge graph entity that can be processed, a type of task that the agent can handle, an agent priority, and a prerequisite task dependency. For the type of entity pair included in the type of knowledge graph entity that can be processed, determine a scheduling score through cosine similarity, select the agent with the highest score and satisfied dependencies according to the scheduling score, record the allocation relationship, and generate an agent task allocation structure according to the allocation relationship. Wherein, the task allocation structure includes several tasks. S5. Convert the agent task allocation structure into actual intervention behaviors, and the robot process automation module is responsible for executing the corresponding intervention behaviors to generate an intervention result table.
2. The method for in-process quality control of electronic medical records based on the collaboration of agent and robotic process automation technology according to claim 1, wherein The method further includes: Collect feedback data for executing the intervention result table, and use the feedback data as a supervision label to form a training sample set with the corresponding task allocation vector. Construct a feedback loss function according to the training sample set to evaluate the deviation between the scheduling result and the intervention effect, and adjust the weight of task allocation or the ability vector of the agent to make the system more prefer to dispatch those agents with good historical intervention effects, and gradually approach the optimal dispatch strategy. Collect the task vectors of each agent that successfully executes the intervention, respectively construct its historical task average embedding representation, and use the task average embedding representation as the update target of the ability vector of the corresponding agent for evolution. Execute a policy fine-tuning cycle when the preset time window or the cumulative sample size reaches the threshold.
3. The method for in-process quality control of electronic medical records based on the collaboration of agent and robotic process automation technology according to claim 1, wherein The operation sequence contains several behavior embedding vectors. Wherein, the semantic text embedding is optimized through a semantic alignment regularization term.
4. The method for in-process quality control of electronic medical records based on the collaboration between agents and robotic process automation technology according to claim 1, wherein The potential causal relationship between any two behavior embedding vectors is determined based on the causal edge score p ij which is calculated as follows: where x i , x j represent the embedding vectors of the doctor's i-th and j-th operations respectively; (x j - x i ) 2 represents the semantic change intensity between two operations; [||] vector concatenation operation; γ ij is a medical logic association coding item, defined as follows: Among them, are the field embeddings corresponding to x i , x j respectively; δ mod (i, j) indicates whether x i and x j come from different modules; Wherein, the causal graph is also provided with a loss function for the case of ineffective intervention, which is used to adjust the processing of ineffective intervention samples during model training.
5. The method for in-process quality control of electronic medical records based on the collaboration of agent and robotic process automation technology according to claim 4, wherein The construction of the medical knowledge graph, semantic enhancement of the causal graph according to the medical knowledge graph to generate a semantically enhanced causal graph is specifically: Construct a medical knowledge graph, the entity set includes: diagnosis category, drug category, examination category, medical insurance rule category; the edge set T includes: dependency, prerequisite condition, and exclusion. Map the field values and field combinations in each node of the medical knowledge graph to entities in the knowledge graph; After successfully completing the semantic mapping of each pair of causal edges in the knowledge graph, calculate the support degree of the entity pair in the knowledge graph through the embedding similarity in the knowledge graph; Output the semantic-enhanced causal graph: Based on the same nodes as the causal graph, output the causal edges with a support degree greater than the preset threshold as the new edge set. Each edge is attached with two scores, namely the corresponding causal edge score and the support degree. At the same time, all semantically conflicting marked edges are retained in the risk queue.
6. The method for in-process quality control of electronic medical records based on the collaboration of agent and robotic process automation technology according to claim 5, characterized in that The mapping of the field values and field combinations in each node of the medical knowledge graph to entities in the knowledge graph is specifically as follows: Segment the field values, and combine the term dictionary, fuzzy matching technology, and natural language processing methods in the medical field to perform standardized matching on entities; and strengthen the limitation of the fields.
7. The method for in-process quality control of electronic medical records based on the collaboration of agent and robotic process automation technology according to claim 6, wherein The task vector includes the type combination of the entity pair, the causal intensity score, the support degree, the difference in the module IDs of the two nodes, and the topological depth of the starting node in the graph; The scheduling score is designed as: Among them, μ k is the ability vector of Agent a k , which is obtained by manual annotation or historical task clustering; Agent a k is the intelligent agent a K ; sim(q ij , μ k ) is the cosine similarity, which measures whether the task matches the intelligent agent; is whether the dependency is satisfied. If there is an unfinished dependency for Agent a k , the value is 0, otherwise it is 1; Load(a k ) is the task load of the current intelligent agent a K ; λ1 and λ2 are empirical hyperparameters.
8. The method for in-process quality control of electronic medical records based on the collaboration of agent and robotic process automation technology according to claim 1, wherein The operations of the robotic process automation module include: Pop-up windows or page labels to remind the doctor to complete a certain operation, automatically fill in the recommended value for predictable field content, and when an illegal operation is found, revoke the last step and reset the field The conversion of the intelligent agent task assignment structure into actual intervention behaviors, and the robotic process automation module is responsible for executing the corresponding intervention behaviors to generate an intervention result table, specifically as follows: Read each task, including: the corresponding intelligent agent, target field, adjacent field, and task type; query the robotic process automation module and execute the corresponding template behavior to generate an intervention execution record; After each intervention is executed, record the feedback data, including: whether the execution is successful, whether the doctor retains the intervention value or modifies or revokes it, the time from the intervention to the doctor's operation confirmation, whether the doctor manually revokes the system intervention, and optional items; Output the target field, adjacent field, corresponding intelligent agent, intervention execution record, and feedback content as an intervention result table.
Citation Information
Cited By
Business processing method and device, medium and product
CN120909557A
Cardiovascular chronic disease data management method based on AI
CN121306385A
Hospital health science popularization robot service system
CN121483543A