A multi-source medical outpatient data comprehensive management method and platform based on RPA

By leveraging RPA and knowledge graph technologies, the inefficiency of multi-source data integration and medication anomaly detection in medical information systems has been addressed. This has enabled automated management of personalized medication optimization suggestions, improving the accuracy of data processing and the continuity of workflows.

CN120048417BActive Publication Date: 2025-11-21GUANGZHOU JIALEIYUAN NEW INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510325578.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-11-21
Estimated Expiration
2045-03-18

AI Technical Summary

Technical Problem

Existing medical information systems suffer from inefficiencies, incomplete or erroneous data, and a lack of personalized optimization capabilities in data integration, medication anomaly detection, and optimization suggestion generation. These issues are particularly difficult to address when dealing with multi-source heterogeneous data and complex medication scenarios.

Method used

A multi-source medical outpatient data integrated management method based on RPA is adopted, which combines causal inference and knowledge graph technology. Through data collection, semantic alignment, causal graph construction and graph neural network, cross-system data is automatically extracted, cleaned and standardized, and personalized medication optimization suggestions are generated.

Benefits of technology

It enables efficient and automatic integration of cross-system data, accurately identifies medication anomalies, provides personalized optimization suggestions, ensures process continuity and accuracy, and supports intelligent clinical decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120048417B_ABST
    Figure CN120048417B_ABST
Patent Text Reader

Abstract

The application provides a multi-source medical outpatient data comprehensive management method and platform based on RPA, and the method comprises the following steps: S1, a script based on robot process automation is designed to collect and store data of multiple systems; S2, a knowledge graph is constructed according to the structured data set; S3, a causal inference technology is introduced into the knowledge graph; S4, according to the abnormal marking knowledge graph, personalized medication optimization suggestions are generated by jointly learning the graph structure and node attributes; and S5, closed-loop management is realized by executing the optimization suggestions and dynamically updating system rules. The application can solve the defects of traditional methods in data integration, medication abnormality detection and optimization suggestion generation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of RPA, and particularly relates to a multi-source medical outpatient data comprehensive management method and platform based on RPA. BACKGROUND

[0002] In the medical industry, monitoring and management of clinical medication information is crucial for patient safety and medical quality. Modern medical institutions often need to integrate data from multiple medical information systems (such as electronic medical record systems, drug management systems, and laboratory testing systems) to monitor medication behavior. However, the data formats, interfaces, and standards of these systems are often incompatible, causing complexity in data integration. In addition, the design of medical information systems is more focused on meeting single functions (such as prescribing or recording medical records), lacking the ability to link data across systems. This fragmented system architecture poses many challenges for medical institutions in medication data monitoring.

[0003] Firstly, traditional manual data integration methods are inefficient, relying on manual login, query, and download of data, which not only consumes time and effort, but also easily leads to incomplete or erroneous data due to human error. At the same time, the heterogeneity of different systems increases the difficulty of data analysis. Medical staff often need to frequently switch between different platforms to extract and compare medication information, which not only reduces work efficiency, but also affects the real-time and accuracy of data. In addition, some existing automated integration tools, although they can achieve partial process automation, mostly rely on predefined fixed rules, making it difficult to cope with complex and variable medical scenarios. For example, when dealing with abnormal data or non-standardized data formats, these tools often cannot provide effective repair or processing solutions, resulting in process interruption.

[0004] Secondly, medication monitoring and anomaly detection technology also has shortcomings. Currently, many systems rely on rule-based anomaly detection methods, which cannot deeply analyze the complex relationship between medication behavior and patient characteristics. For example, adverse reactions of some drugs may only occur in specific patient groups, and rule systems often cannot capture such implicit associations. In addition, the lack of personalized medication optimization capability is also a major problem. Existing systems focus more on anomaly detection, but lack sufficient support for intelligent medication optimization suggestions, which limits the application value of the system in actual clinical decision-making.

[0005] In this context, developing an automated management system that can efficiently integrate multi-source medication data, accurately detect medication anomalies, and provide personalized optimization suggestions has become an urgent need in the medical industry. Robotic Process Automation (RPA) as a highly efficient data processing and process automation tool can automatically perform cross-system tasks and reduce human intervention. However, relying solely on RPA for process automation still cannot overcome the deep-seated problems in medication anomaly detection and optimization. SUMMARY

[0006] The purpose of the present application is to design a multi-source medical outpatient data comprehensive management method and platform based on RPA, combining causal inference and knowledge graph technology, which can solve the defects of traditional methods in data integration, abnormal drug detection and optimization suggestion generation.

[0007] In order to achieve the above purpose, in the first aspect of the present application, a multi-source medical outpatient data comprehensive management method based on RPA is provided, comprising the following steps:

[0008] S1, a script based on robot process automation is designed to collect and store data from multiple systems, then classify the data into structured, semi-structured data and unstructured text data, and perform semantic alignment and preprocessing on the structured, semi-structured data and unstructured text data to obtain a preprocessed structured data set; wherein each record in the data set contains: patient ID, drug name, dose, test index value, test time, disease name;

[0009] S2, constructing a knowledge graph KG according to the structured data set;

[0010] S3, introducing causal inference technology in the knowledge graph KG, establishing a causal graph, calculating the causal effect of drug behavior on clinical indicators, and combining the safety standards in the medical field to detect potential abnormal drugs, and updating the knowledge graph KG according to the abnormal drugs to generate an abnormal marked knowledge graph KG updated ;

[0011] S4, according to the abnormal marked knowledge graph KG updated , generate personalized drug optimization suggestions by joint learning graph structure and node attributes;

[0012] S5, taking the drug optimization suggestions and the abnormal marked knowledge graph KG updated as input, realizing closed-loop management by executing optimization suggestions and dynamically updating system rules;

[0013] Wherein, the structure of the knowledge graph KG is as follows: the node set represents the entity, the edge set represents the association relationship between entities, and each node contains a context attribute vector representing semantic features.

[0014] Preferably, for the structured and semi-structured data, a recursive parser is designed to traverse nested fields layer by layer and extract semantic related target fields; for the unstructured text data, a regular parsing module based on medical semantics is designed to extract key entities;

[0015] The semantic alignment specifically includes: unifying fields from different systems to the target semantics through a domain knowledge alignment table;

[0016] The preprocessing specifically includes:

[0017] For numeric fields, a weighted average of nearest-neighbor samples is used for filling.

[0018] Perform unit conversion on numeric fields: unify different units to the same unit.

[0019] Preferably, the step of constructing a knowledge graph (KG) based on the structured dataset specifically includes:

[0020] From each record r in the structured dataset i = <f1,f2,…,f m Extract key fields and map them to nodes v in a knowledge graph (KG). k ;

[0021] Explicit relationships are directly established based on the field logic of the structured dataset, and implicit relationships are discovered through statistical analysis of the joint distribution of entities in the structured dataset. kl ;

[0022] For each node v k Generate attribute vector x k This represents the context information of the node;

[0023] According to the implicit relationship e kl Regularly verify node v k and v l The co-occurrence probability P(v) k ,v l If the value is significantly lower than the initial threshold τ, low-quality edges are removed, and node names are clustered based on character similarity, merging nodes that represent the same entity but have different spellings.

[0024] Finally, the knowledge graph KG is output.

[0025] Preferably, the method involves discovering implicit relationships e by statistically analyzing the joint distribution of entities in the structured dataset. kl Specifically:

[0026]

[0027] Wherein, P(v k ,v l ) represents node v k and v l Co-occurrence probability; Δ kl It is a noise correction term based on domain knowledge; τ is the threshold for generating relations;

[0028] The attribute vector x of each node v is generated k The attribute vector x of each node v is generated k The context information of the node is represented by a linear embedding model, and the multi-dimensional attributes of f j are mapped to a fixed dimension.

[0029] Preferably, the causal graph is a directed acyclic graph extended on the basis of the knowledge graph KG, used to describe the causal relationship between the drug A, the patient characteristics X and the clinical test index Y; wherein the node represents a random variable, including the drug, the patient characteristics and the test index; the edge E represents the causal influence; the causal graph is constructed as follows:

[0030] Extract the explicit edge E from the knowledge graph KG to construct an initial causal graph;

[0031] Combine the medical field knowledge to supplement the implicit causal relationship edge;

[0032] To deal with unobserved confounding variables, introduce the hypothetical confounding variable U to connect the patient characteristics X and the test index Y to form the latent influence path X←U→Y.

[0033] Preferably, the influence of the drug A on the test index Y is quantified, and the expected value of the index after intervention P(Y|do(A)) is calculated:

[0034] P(Y|do(A))=∫ x P(Y|A,X=x)P(X=x)dx

[0035] Where P(Y|A,X=x) is the joint probability distribution under the condition of drug A and patient characteristics X; P(X=x) is the prior distribution of the patient characteristics, and x is the current patient x.

[0036] An innovative regularization term Δ confound is introduced to correct the bias caused by unobserved confounding variables:

[0037] P(Y|do(A))=∫ x P(Y|A,X=x)P(X=x)dx+Δ confound

[0038] Where the construction of Δ confound is based on graph structure inference and external statistical data estimation, for example, the potential influence range of unobserved confounding on Y is obtained by Bayesian inference;

[0039] Compare the calculated P(Y|do(A)) with the medical safety standard Y safe , and determine whether the drug A has caused the index to be abnormal through a binary function: 1 indicates abnormal, and 0 indicates no abnormality;

[0040] For each abnormal drug A, mark the related nodes and edges in the knowledge graph KG:

[0041] Update the attributes of nodes v A and v Y , record the source of the abnormality;

[0042] Mark the abnormal edge e aY to support subsequent reasoning optimization.

[0043] Preferably, the abnormality marked knowledge graph KG updated is used to generate personalized medication optimization suggestions by jointly learning the graph structure and node attributes, specifically including:

[0044] Obtain the abnormality marked knowledge graph KG updated ; wherein the abnormality marked knowledge graph KG updated contains a node set V and an edge set E, each node v k ∈V has a context attribute vector x k , and an abnormal edge e AY ;

[0045] Construct a graph embedding update rule for the abnormality marked knowledge graph KG updated , and jointly model the graph structure information and node attributes:

[0046]

[0047] wherein, is the embedding representation of node v k at the t-th layer, and the initial value is the node attribute vector x k ; N(v k ) represents the neighbor set of node v k ; w jk is the weight of edge e jk ; W is a shared transformation matrix, b is a bias vector, and ReLU is an activation function; the embedding update process captures the global semantic information of the graph and integrates the context characteristics of each node;

[0048] Adjust the edge weight w jk in combination with the initial edge weight;

[0049] For patient node v patient , based on its final embedding representation h patient , calculate the recommendation score with drug node v drug through the cosine similarity of embedding vectors, wherein the highest score indicates the highest recommendation priority;

[0050] Write the recommendation result R recommend back to the abnormality marked knowledge graph KG updatedupdating the recommended attributes of the drug node;

[0051] the final output recommendation result R recommend , the recommended dosage of each drug, usage precautions, and the global risk assessment result for the patient.

[0052] Preferably, the recommendation result R recommend is automatically delivered to the medical information system using a robotic process automation tool, which specifically performs the following tasks:

[0053] According to the recommendation result R recommend , the drug prescription is submitted, including the drug name, recommended dosage, and usage instructions;

[0054] The optimized recommendations are stored in the patient's medical record as "recommended solutions";

[0055] Real-time monitoring of the actual use of the recommended drug and collecting feedback data F feedback ;

[0056] Collecting feedback data F feedback and calculating the execution effect of the optimized recommendations:

[0057]

[0058] where E is the effect evaluation value, represents the actual effect of the i-th indicator; is the target value; g is the effect score function, defined as w i is the indicator weight, reflecting the importance of the indicator; range is the normal value range of the medical indicator, used for standard deviation calculation; the calculation result of E will be used as the quantitative evaluation value of the optimization effect, to guide the subsequent dynamic adjustment;

[0059] According to the effect evaluation value E and the feedback data F feedback , dynamically adjust the abnormal marking knowledge graph KG updated and the recommendation rules;

[0060] Finally, according to the abnormal marking knowledge graph KG updated and the recommendation rules, a feedback and adjustment report is automatically generated, including:

[0061] the overall execution effect evaluation value E of the optimized recommendations;

[0062] the specific content of dynamic rule updates;

[0063] the current stability evaluation, to predict whether further human intervention is needed.

[0064] Preferably, the effect evaluation value E and the feedback data F are used to dynamically adjust the abnormal marking knowledge graph KG and the recommendation rules, specifically: feedback updated and the recommendation rules, specifically:

[0065] If a drug triggers an abnormality multiple times or performs poorly, i.e., the effect evaluation value E < τ, τ being a threshold, the priority of the drug node in the graph is reduced, and its edge weight w is updated jk ;

[0066] If a drug performs excellently, its priority is increased to promote recommendation.

[0067] In a second aspect of the application, a multi-source medical outpatient data comprehensive management platform based on RPA is provided, which comprises:

[0068] An RPA data acquisition subsystem is used to design a script based on robot process automation, acquire and store data from multiple systems, then classify the data into structured, semi-structured data and unstructured text data, perform semantic alignment and preprocessing on the structured, semi-structured data and unstructured text data, and obtain a preprocessed structured data set; wherein each record in the data set contains: patient ID, drug name, dosage, test index value, test time, and disease name.

[0069] A knowledge graph construction subsystem is used to construct a knowledge graph KG according to the structured data set.

[0070] A knowledge graph updating subsystem is used to introduce causal inference technology into the knowledge graph KG, establish a causal graph, calculate the causal effect of medication behavior on clinical indicators, detect potential abnormal drugs in combination with safety standards in the medical field, and update the knowledge graph KG according to the abnormal drugs to generate an abnormal marking knowledge graph KG updated .

[0071] A medication recommendation subsystem is used to generate personalized medication optimization recommendations by jointly learning graph structure and node attributes according to the abnormal marking knowledge graph KG updated .

[0072] An RPA closed-loop management subsystem is used to take the medication optimization recommendations and the abnormal marking knowledge graph KG updated as input, dynamically update system rules by executing optimization recommendations, and realize closed-loop management.

[0073] The structure of the knowledge graph KG is as follows: the node set represents entities, the edge set represents the association relationship between entities, and each node contains a context attribute vector representing semantic features.

[0074] The application has at least the following beneficial technical effects:​

[0075] (1) The present application realizes the automatic extraction, cleaning and standardization of cross-system data through RPA technology. Compared with traditional manual integration or rule-based tools, the present application can dynamically adapt to the interfaces and data formats of different systems, solving the integration problems caused by the heterogeneity of multi-source data. In addition, the built-in anomaly detection mechanism can identify and repair abnormal data in real time during data processing, ensuring the continuity and accuracy of the process.

[0076] (2) The present application introduces causal inference technology to address the limitations of existing systems relying on rule-based methods to capture complex medication abnormalities. By building a causal model of medication behavior and patient characteristics, the system can distinguish between correlation and causality. Through causal effect calculation, the system can accurately identify implicit medication risks. For example, for the adverse reactions of a certain drug, the system can infer its potential impact based on the patient's specific signs or medical history, avoiding missed detection or misjudgment caused by a single rule.

[0077] (3) The present application builds a medication knowledge graph to integrate the complex relationships between drugs, patient characteristics and clinical data. Based on this, the graph neural network technology is applied for multi-hop reasoning to generate personalized medication optimization recommendations. For example, the system can recommend safer or more effective alternative medication plans based on the patient's current test results and medical record data, providing intelligent support for doctors' decision-making.

[0078] (4) By combining RPA with intelligent algorithms, the present application realizes the full-process automation management of data integration, anomaly detection and optimization suggestion generation. At the same time, the system can dynamically adjust the process rules based on the detection results and optimization suggestions to adapt to changing clinical scenarios. For example, when a certain drug is identified as abnormal, the system can automatically update the medication process to avoid potential risks. BRIEF DESCRIPTION OF DRAWINGS

[0079] The present application is further illustrated by the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present application. For ordinary skilled persons in the art, other drawings can be obtained without creative labor based on the following drawings.

[0080] Figure 1 A flowchart of a multi-source medical outpatient data comprehensive management method based on RPA of the present application.

[0081] Figure 2 A framework diagram of a multi-source medical outpatient data comprehensive management platform based on RPA of the present application. DETAILED DESCRIPTION

[0082] Embodiments of the present application are described below in detail with reference to the accompanying drawings, wherein like or similar elements are denoted by the same or similar reference signs throughout the drawings. The embodiments described below are exemplary only, and are not intended to limit the present application.

[0083] In one or more embodiments, as shown in Figure 1 a method for comprehensive management of multi-source medical outpatient data based on RPA is disclosed, which comprises the following steps S1-S5:

[0084] S1, a script based on robot process automation is designed to collect and store data from multiple systems, then classify the data into structured, semi-structured data and unstructured text data, and perform semantic alignment and preprocessing on the structured, semi-structured data and unstructured text data to obtain a preprocessed structured data set; wherein each record in the data set contains: patient ID, drug name, dosage, test index value, test time, and disease name.

[0085] Specifically, a script based on robot process automation (RPA) is designed to automatically log in, extract and store data from multiple systems.

[0086] Wherein, the data extraction script F i consists of the following parts:

[0087] Automatically log in to the system and obtain an authorization token.

[0088] According to the preset rules, locate the key data modules (such as drug records and test results).

[0089] Download the target data and store it in the initial data set D raw , which can be in JSON, XML or CSV format.

[0090] Further, after data collection is completed, D raw is recorded as:

[0091]

[0092] Wherein, M represents the number of data sources, S i is the i-th data source.

[0093] Further, for structured and semi-structured data (such as JSON, XML), a recursive parser is designed to traverse nested fields layer by layer and extract semantic-related target fields (such as "drug name" and "dose").

[0094] For unstructured text data, a regular parsing module based on medical semantics is designed to extract key entities. For example, from the text description "drug name: aspirin; dose: 100mg", the standard field "drug = aspirin, dose = 100mg" is mapped.

[0095] Further, through a domain knowledge alignment table, the fields in different systems are unified to the target semantics:

[0096] f j = Mapping(SourceField i )

[0097] where SourceField i represents a source field, Mapping is a semantic alignment rule, and f j is the target field.

[0098] Further, missing value filling:

[0099] For numerical fields (such as dose, test value), use adjacent sample weighted average filling:

[0100]

[0101] where k is the number of adjacent samples, w i is the weight related to the distance of the sample, x miss is the field of the sample where the missing value is located, and ∈ is a small amount to avoid zero denominator.

[0102] Further, anomaly detection:

[0103] The detection logic includes two parts:

[0104] Distribution detection: mark values that deviate from the normal distribution by more than 3 times the standard deviation.

[0105] Logical rules: for example, for the dose field, remove records that exceed the recommended upper limit of the dose.

[0106] Further, unit conversion is performed on numerical fields (such as dose): different units (such as g, mg, μg) are unified to "mg", and the conversion formula is:

[0107] x std = x·u

[0108] where x is the original numerical value and u is the unit conversion coefficient (such as u = 1000 when converting from g to mg).

[0109] For categorical fields (such as disease name), use standard coding (such as ICD-10).

[0110] The time field is uniformly formatted as ISO 8601 standard.

[0111] Further, all the normalized records are stored as a uniform dataset D cleaned Each record r i contains the following standard fields: patient ID (anonymized); drug name (normalized); dose (mg); test indicator value (numeric); test time (ISO 8601 format); disease name (ICD-10 code).

[0112] Further, the structured form of the dataset is:

[0113] D cleaned = {r1, r2, …, r n}, r i = <f1, f2, …, f m >

[0114] where f j represents the normalized field, and n is the number of records.

[0115] S2, constructing a knowledge graph KG according to the structured dataset; wherein the structure of the knowledge graph KG is as follows: the node set represents the entity, the edge set represents the association relationship between entities, and each node contains a context attribute vector representing semantic features.

[0116] Specifically, from each record r cleaned = <f1, f2, …, f i > of D m , the key fields are extracted and mapped to the node v k in the graph:

[0117] f1 (patient ID): mapped to the patient entity node.

[0118] f2 (drug name) and f3 (dose): mapped to the drug entity node and its attributes.

[0119] f4 (test indicator) and f5 (test time): mapped to the test node and its timestamp.

[0120] f6 (disease name): mapped to the disease node.

[0121] Further, multi-value fields (such as f2 containing multiple drug names) are split into multiple nodes, and the association between fields is preserved. For example, if r i contains both “aspirin” and “ibuprofen”, two drug nodes are generated respectively, and are associated with the patient node.

[0122] Preferably, a context enhancement module is designed for each node, which combines fj field information generation attribute vector, capturing the semantic characteristics of entities.

[0123] Further, direct rule relationship: according to D cleaned The field logic directly establishes explicit relationships. For example:

[0124] f1 (patient) and f6 (disease) establish a "suffering" relationship.

[0125] f2 (drug) and f6 (disease) establish a "treatment" relationship.

[0126] Further, implicit statistical relationship: through statistical analysis of the joint distribution of entities in D cleaned , the implicit relationship is found. A special correction term Δ ij is introduced to measure the influence of potential noise to ensure that the generated relationship is more accurate:

[0127]

[0128] Where P(v k ,v l ) represents the co-occurrence probability of nodes v k and v l ; Δ kl is a noise correction term based on domain knowledge; τ is the threshold for generating relationships. Δ kl Use domain prior knowledge definition, aiming to reduce the influence of entity pairs on the graph with high noise but weak semantic correlation (such as misassociation caused by spelling errors in drug names).

[0129] Further, for each node v k , generate attribute vector x k , representing the context information of the node. Adopt linear embedding model, map the multi-dimensional attributes of f j to fixed dimension:

[0130] x k = W·z + b

[0131] Where z is the combined representation of node field f j ; W is the embedding matrix; b is the bias vector. Attribute vector not only describes the original characteristics of the node, but also captures the characteristics related to the target task through field weighting. For example, for drug nodes, x k will particularly emphasize the information of dosage and administration method.

[0132] Further, graph optimization:

[0133] Relationship cleaning: for implicit relationship e kl , introduce a dynamic rejection mechanism, periodically verify P(v k ,vl ) whether it is significantly lower than the initial threshold τ to remove low-quality edges.

[0134] Node merging: clustering node names based on character similarity, merging nodes representing the same entity but with different spellings (e.g., "aspirin" and "ASPIRIN").

[0135] Further, the output knowledge graph KG=(V, E) contains the following:

[0136] The node set V represents entities such as patients, drugs, diseases, and tests.

[0137] The edge set E represents the association between entities.

[0138] Each node v k contains a context attribute vector x k , representing semantic features.

[0139] It can be understood that the noise correction term Δ kl and the context enhancement vector x k are introduced, which are specifically optimized for fuzzy relationships and entity semantics in medical data.

[0140] S3, introducing causal inference technology in the knowledge graph KG, establishing a causal graph, calculating the causal effect of medication behavior on clinical indicators, and combining with the safety standards in the medical field to detect potential abnormal drugs, and updating the knowledge graph KG according to the abnormal drugs, generating an abnormal labeled knowledge graph KG updated .

[0141] Specifically, the causal graph C graph is a directed acyclic graph (DAG) extended from the knowledge graph KG, used to describe the causal relationship between drugs, patient characteristics, and clinical test indicators:

[0142] Nodes represent random variables, including drugs (A), patient characteristics (X, such as age, medical history), and test indicators (Y, such as blood sugar, liver function).

[0143] Edges represent causal effects (e.g., the effect of drug A on indicator Y, and the regulatory effect of patient characteristic X on A).

[0144] Further, the specific construction process is as follows:

[0145] Extract explicit edges E from KG to construct an initial causal graph. For example, the "drug treatment disease" edge is mapped to the causal relationship A→Y.

[0146] Supplement the implicit causal relationship edge with medical field knowledge. For example: some drugs may affect liver function indicators through metabolic processes, this indirect relationship is defined as A→M→Y by domain experts, where M is an implicit variable (metabolic product).

[0147] To deal with unobserved confounding variables (such as lifestyle habits), introduce a hypothetical confounding variable U that connects patient characteristics X and test indicators Y to form potential impact paths X←U→Y.

[0148] Further, to quantify the impact of drug A on test indicators Y, calculate the expected value of indicators after intervention P(Y|do(A)):

[0149] P(Y|do(A)) = ∫ x P(Y|A,X=x)P(X=x)dx

[0150] Where P(Y|A,X=x) is the joint probability distribution of drug A and patient characteristics X; P(X=x) is the prior distribution of patient characteristics.

[0151] Introduce an innovative regularization term Δ confound to correct the bias caused by unobserved confounding variables:

[0152] P(Y|do(A)) = ∫ x P(Y|A,X=x)P(X=x)dx + Δ confound

[0153] Δ confound The construction is based on graph structure inference and external statistical data estimation, such as Bayesian inference to obtain the potential impact range of unobserved confounding on Y.

[0154] This correction term specifically addresses the bias problem caused by insufficient data collection in medical data, ensuring the reliability of causal effect calculation.

[0155] Further, compare the calculated P(Y|do(A)) with the medical safety standard Y safe to determine whether drug A has caused the indicator to be abnormal:

[0156]

[0157] Where Y safe is defined by domain experts or medical guidelines. For example, the normal range of blood glucose is 3.9-6.1 mmol / L. Anomaly(A) is a binary function, 1 indicates abnormal, 0 indicates no abnormal.

[0158] Further, for each abnormal drug A, mark the relevant nodes and edges in the knowledge graph KG:

[0159] Update node vA (drug) and v Y (property of the test index) record the source of the anomaly;

[0160] Label the abnormal edge e AY to support subsequent reasoning optimization.

[0161] Further, generate an updated knowledge graph KG updated , including the following extensions:

[0162] Each node (such as the drug node v A ) adds an anomaly flag field AnomalyFlag;

[0163] Abnormal edge e AY contains the causal path information that triggers the anomaly.

[0164] KG updated will be used as input for the next step of optimization reasoning, directly guiding the adjustment of drug regimen.

[0165] S4, according to the anomaly marked knowledge graph KG updated , generate personalized drug optimization recommendations by jointly learning graph structure and node attributes.

[0166] Specifically, KG updated contains a node set V (such as patients, drugs, diseases, test indexes) and an edge set E (representing the association between nodes), each node v k ∈V has a context attribute vector x k .

[0167] Further, construct a graph embedding update rule to jointly model graph structure information and node attributes:

[0168]

[0169] where, is the embedding representation of node v k at the t-th layer, and the initial value is the node attribute vector x k ; denotes the neighbor set of node v k ; w jk is the weight of edge e jk ; W is a shared transformation matrix, b is a bias vector, and ReLU is an activation function. The embedding update process captures the global semantic information of the graph and integrates the context characteristics of each node.

[0170] Further, to handle the impact of drug nodes marked as abnormal (such as v A ) on reasoning results, adjust the edge weight w jk :

[0171]

[0172] where, is the initial edge weight; AnomalyFlag e {0, 1} represents the anomaly flag; a is the correction coefficient, used to control the degree of weakening of the abnormal edge weight (e.g. a = 1.5). This correction mechanism reduces the influence of abnormal drug nodes on graph structure learning, and prioritizes the recommendation of risk-free drugs.

[0173] Further, for patient nodes v patient , based on its final embedding representation h patient , the recommendation score with drug nodes v drug is calculated:

[0174] s(v patient ,v drug ) = cos(h patient ,h drug )

[0175] where cos represents the cosine similarity of embedding vectors, and the higher the score, the higher the priority of recommendation. Sort all candidate drugs to generate a recommendation list R recommend , and combine with node attributes (such as dosage) to add specific suggestions.

[0176] Further, the recommendation result R recommend is written back to the knowledge graph KG updated , updating the recommended attributes (such as priority, recommended dosage) of the drug nodes.

[0177] The final output includes:

[0178] The medication recommendation list R recommend , sorted by priority;

[0179] The recommended dosage and precautions for each drug;

[0180] The overall risk assessment result for the patient.

[0181] S5, taking the medication optimization suggestions and anomaly flag knowledge graph KG updated as input, by executing the optimization suggestions and dynamically updating the system rules, to realize closed-loop management.

[0182] Specifically, using a robot process automation (RPA) tool, the recommendation result R recommend is automatically delivered to a medical information system (such as an electronic medical record system). The specific execution includes the following tasks:

[0183] Further, according to R recommend , submit a drug prescription, including drug name, recommended dosage and usage instructions;

[0184] The optimization suggestion is stored in the patient's medical record as a "recommended regimen".

[0185] The actual use data of the recommended drug (such as patient response, treatment effect) is monitored in real time and recovered as feedback data F feedback .

[0186] Further, F feedback , including the patient's actual medication data (such as medication dosage), the trend of test indicators (such as blood sugar level), and the doctor's manual adjustment information (such as drug replacement).

[0187] The execution effect of the optimization suggestion is calculated:

[0188]

[0189] wherein, represents the actual effect of the i-th indicator; is the target value (such as the medical standard range); g is the effect score function, defined as w i is the indicator weight, reflecting the importance of the indicator (such as the liver function weight is higher than the ordinary test indicator). The calculation result of E will be used as the quantitative evaluation value of the optimization effect, to guide the subsequent dynamic adjustment.

[0190] Further, according to the evaluation value E and the feedback data F feedback , the knowledge graph KG updated and the recommendation rules are dynamically adjusted:

[0191] If a drug triggers an abnormality or has poor effect multiple times (such as E < τ, τ is the threshold value), the priority of the drug node in the graph is reduced, and its edge weight w jk is updated:

[0192]

[0193] wherein β is the update coefficient, and PenaltyFlag ∈ {0, 1} represents the penalty flag.

[0194] If a drug performs excellently, its priority is increased to promote recommendation.

[0195] Further, after the update, the graph state is changed from KG updated to KG final to support the next optimization reasoning.

[0196] Further, a feedback and adjustment report is automatically generated, including the following contents:

[0197] The overall execution effect evaluation value E of the optimization suggestion;

[0198] the specific content of dynamic rule updates (such as which drugs are de-prioritized or promoted);

[0199] the current stability evaluation of the system, predicting whether further human intervention is needed.

[0200] In one or more embodiments, as shown in Figure 2 a multi-source medical outpatient data comprehensive management platform based on RPA is disclosed, which comprises:

[0201] An RPA data acquisition subsystem 301 is used to design scripts based on robot process automation, collect and store data from multiple systems, then classify the data into structured, semi-structured data and unstructured text data, perform semantic alignment and preprocessing on the structured, semi-structured data and unstructured text data, and obtain a preprocessed structured data set; wherein each record in the data set contains: patient ID, drug name, dosage, test index value, test time, and disease name.

[0202] A knowledge graph construction subsystem 302 is used to construct a knowledge graph KG according to the structured data set; wherein the structure of the knowledge graph KG is as follows: the node set represents entities, the edge set represents the association relationship between entities, and each node contains a context attribute vector representing semantic features.

[0203] A knowledge graph updating subsystem 303 is used to introduce causal inference technology in the knowledge graph KG, establish a causal graph, calculate the causal effect of medication behavior on clinical indicators, detect potential abnormal drugs in combination with safety standards in the medical field, and update the knowledge graph KG according to the abnormal drugs to generate an abnormal marked knowledge graph KG updated .

[0204] A medication recommendation subsystem 304 is used to generate personalized medication optimization recommendations by jointly learning the graph structure and node attributes according to the abnormal marked knowledge graph KG updated .

[0205] An RPA closed-loop management subsystem 305 is used to input the medication optimization recommendations and the abnormal marked knowledge graph KG updated , implement closed-loop management by executing the optimization recommendations and dynamically updating system rules.

[0206] The above describes the preferred embodiments of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.

Claims

1. A method for comprehensive management of multi-source medical outpatient data based on RPA, characterized in that, Includes the following steps: S1. Design a script based on robotic process automation (RPA) to collect and store data from multiple systems, then classify the data into structured, semi-structured, and unstructured text data. Perform semantic alignment and preprocessing on the structured, semi-structured, and unstructured text data to obtain a preprocessed structured dataset. Each record in the dataset includes: patient ID, drug name, dosage, test index value, test time, and disease name. S2. Construct a knowledge graph based on the structured dataset. ; S3, in the knowledge graph This paper introduces causal inference technology to establish a causal graph, calculates the causal effect of medication behavior on clinical indicators, and combines it with safety standards in the medical field to detect potential abnormal drugs and update the knowledge graph based on the abnormal drugs. Generate an anomaly tagging knowledge graph ; S4. Based on the anomaly marker knowledge graph Personalized medication optimization suggestions are generated by jointly learning graph structure and node attributes; S5. Using medication optimization suggestions and anomaly marker knowledge graphs As input, closed-loop management is achieved by executing optimization suggestions and dynamically updating system rules; Among them, the knowledge graph The structure is as follows: the node set represents entities, the edge set represents the relationships between entities, and each node contains a context attribute vector representing semantic features; Wherein, the construction of the knowledge graph based on the structured dataset Specifically, it includes: From each record in the structured dataset Extract key fields and map them to a knowledge graph. Nodes in ; Explicit relationships are established directly based on the field logic of the structured dataset, and implicit relationships are discovered through statistical analysis of the joint distribution of entities in the structured dataset. ; For each node Generate attribute vectors Attribute vector Represents the context information of a node; According to the implicit relationship Regularly verify nodes and co-occurrence probability Is it significantly lower than the initial threshold? If the quality is lower, remove low-quality edges and cluster node names based on character similarity, merging nodes that represent the same entity but have different spellings; Finally, a knowledge graph is output. ; Wherein, the step of using the anomaly marker knowledge graph By jointly learning the graph structure and node attributes, personalized medication optimization suggestions are generated, specifically including: Obtain an anomaly marker knowledge graph Among them, the anomaly labeling knowledge graph Contains a set of nodes and edge set Each node Having context attribute vectors and abnormal edges ; Constructing an anomaly labeling knowledge graph The graph embedding update rule jointly models graph structure information and node attributes: ; in, For nodes In the The layer's embedded representation, with initial values ​​being node attribute vectors. ; Represents a node The set of neighbors; For the edge The weights; To share the transformation matrix, For bias vectors, It is an activation function; the embedded update process captures the global semantic information of the graph and integrates the contextual characteristics of each node; Combine the initial edge weights with anomaly flags to adjust the edge weights. ; For patient nodes Based on its final embedding representation The cosine similarity of the embedded vectors is calculated with the drug node. The recommendation score is given, where the highest score indicates the highest recommendation priority. Recommendation results Write back to the anomaly marker knowledge graph Update the recommended attributes of the drug node; Final output recommendation results Recommended dosage and precautions for each medication, and overall risk assessment results for the patient.

2. The method for comprehensive management of multi-source medical outpatient data based on RPA according to claim 1, characterized in that, For the structured and semi-structured data, a recursive parser is designed to traverse nested fields layer by layer and extract semantically relevant target fields; For the unstructured text data, a regular expression parsing module based on medical semantics is designed to extract key entities; The semantic alignment specifically includes: unifying fields from different systems to the target semantics through a domain knowledge alignment table; The preprocessing specifically includes: For numeric fields, a weighted average of nearest-neighbor samples is used for filling. Perform unit conversion on numeric fields: unify different units to the same unit; among them, standard encoding is used for categorical fields, and time fields are uniformly formatted to the ISO8601 standard.

3. The method for comprehensive management of multi-source medical outpatient data based on RPA according to claim 1, characterized in that, The method involves statistically analyzing the joint distribution of entities in a structured dataset to discover implicit relationships. Specifically: ; in, Represents a node and The co-occurrence probability; It is a noise correction term based on domain knowledge; The threshold for generating relationships; The above for each node Generate attribute vectors This indicates that the node's context information uses a linear embedding model, and then the node fields are... Multidimensional attributes are mapped to fixed dimensions.

4. The method for comprehensive management of multi-source medical outpatient data based on RPA according to claim 1, characterized in that, The causal graph is in the knowledge graph This is an extension of the previous method, a directed acyclic graph (DAG) used to describe the causal relationships between drug A, patient characteristic X, and clinical laboratory indicator Y; where nodes represent random variables, including drugs, patient characteristics, and laboratory indicators; edges... The causal graph represents the causal influence; it is constructed as follows: From knowledge graph Extract explicit edges Construct an initial causal graph; Supplement implicit causal relationships by incorporating knowledge from the medical field; To handle unobserved confounding variables, hypothetical confounding variables are introduced. Connecting patient characteristics and test indicators Forming a potential impact path .

5. The method for comprehensive management of multi-source medical outpatient data based on RPA according to claim 4, characterized in that, Quantitative drugs For test indicators The impact of the intervention was analyzed, and the expected value of the indicators after the intervention was calculated. : ; in, It is a drug With patient characteristics Joint probability distribution under the given conditions; It is the prior distribution of patient characteristics, where x is the current patient x; Introducing innovative regularization terms Correcting for biases introduced by unobserved confounding variables: ; in, The construction is based on graph structure inference and external statistical data estimation, and unobserved confounding pairs are obtained through Bayesian inference. The potential scope of impact; Comparison of calculations and medical safety standards Drug identification using binary functions Did it trigger abnormal indicators? This indicates that an anomaly exists. This indicates no abnormalities; For each abnormal drug In knowledge graphs Mark the relevant nodes and edges: Update node and The attribute records the source of the exception; Marking abnormal edges This is to support subsequent inference optimization.

6. The method for comprehensive management of multi-source medical outpatient data based on RPA according to claim 1, characterized in that, Using robotic process automation tools, the recommendation results The automated transmission to the medical information system involves the following tasks: Based on the recommendation results Submit a prescription for medication, including the name of the medication, recommended dosage, and instructions for use; The optimization suggestions are stored in the patient's medical record and marked as "recommended plan"; Regarding the use of recommended medications, real-time monitoring of actual medication usage data is conducted and collected as feedback data. ; Collect feedback data Calculate the effect of implementing the optimization suggestions: ; in, This is the value used for performance evaluation. Indicates the first The actual effect of each indicator; The target value; The performance scoring function is defined as follows: ; The indicator weights reflect the importance of the indicators; This represents the normal range of medical indicators, used for standardization deviation calculations. The calculation results will serve as a quantitative evaluation value of the optimization effect, guiding subsequent dynamic adjustments. Based on the performance evaluation value and feedback data Dynamically adjust the anomaly marker knowledge graph and recommendation rules; Finally, based on the anomaly marker knowledge graph The recommendation rules automatically generate feedback and adjustment reports, including: The overall performance evaluation value F of the optimization recommendations; The specific details of dynamic rule updates; The current stability assessment predicts whether further human intervention is needed.

7. The method for comprehensive management of multi-source medical outpatient data based on RPA according to claim 6, characterized in that, The above is based on the effect evaluation value and feedback data Dynamically adjust the anomaly marker knowledge graph The recommendation rules are as follows: If a drug repeatedly triggers abnormalities or has poor efficacy, i.e., efficacy evaluation value , Assuming a threshold value, reduce the priority of the drug node in the graph and update its edge weights. ; If a drug performs exceptionally well, its priority is increased, and recommendations are encouraged.

8. A platform for implementing the RPA-based multi-source medical outpatient data integrated management method as described in claim 1, characterized in that, The platform includes: The RPA data acquisition subsystem is used to design scripts based on robotic process automation (RPA), collect and store data from multiple systems, and then classify the data into structured, semi-structured, and unstructured text data. Semantic alignment and preprocessing are then performed on the structured, semi-structured, and unstructured text data to obtain a preprocessed structured dataset. Each record in the dataset includes: patient ID, drug name, dosage, test result value, test time, and disease name. A knowledge graph construction subsystem is used to construct a knowledge graph based on the structured dataset. ; Knowledge graph update subsystem, used for updating the knowledge graph This paper introduces causal inference technology to establish a causal graph, calculates the causal effect of medication behavior on clinical indicators, and combines it with safety standards in the medical field to detect potential abnormal drugs and update the knowledge graph based on the abnormal drugs. Generate an anomaly tagging knowledge graph ; The medication recommendation subsystem is used to recommend medications based on the anomaly marker knowledge graph. Personalized medication optimization suggestions are generated by jointly learning graph structure and node attributes; The RPA closed-loop management subsystem is used to utilize medication optimization suggestions and anomaly marker knowledge graphs. As input, closed-loop management is achieved by executing optimization suggestions and dynamically updating system rules; Among them, the knowledge graph The structure is as follows: the node set represents entities, the edge set represents the relationships between entities, and each node contains a context attribute vector, representing semantic features.

Citation Information

Patent Citations

  • Adverse drug reaction reporting method

    CN118315082A

  • Drug combination risk management system based on knowledge graph

    CN118888078A