Intelligent pharmacy prescription safety checking method, system and device based on AI and medium

By acquiring multi-source fusion feature datasets and comparing them with AI matching models, the problem of difficulty in identifying complex prescriptions and multiple medications for first-time patients in existing technologies has been solved. This has enabled multi-dimensional intelligent verification and dynamic information integration of pharmacy prescriptions, improving medication safety and response efficiency.

CN121905422APending Publication Date: 2026-04-21DANGTU COUNTY PEOPLES HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DANGTU COUNTY PEOPLES HOSPITAL
Filing Date
2026-03-11
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing prescription risk identification technologies based on pre-trained language models are insufficient to address the complex prescriptions of first-time patients and the identification of deep safety risks in prescriptions for multiple medications. They are unable to integrate dynamic patient information in real time and cannot balance rapid response with ensuring medication safety in high-risk medication scenarios.

Method used

By acquiring multi-source fusion feature datasets, including standardized prescription data, individual patient health feature data, and standardized medical knowledge rule data, and comparing them with a pre-set AI matching model, basic review and special verification of high-risk scenarios are carried out to generate comprehensive security verification results, including risk warnings and review confirmation information.

Benefits of technology

It enables multi-dimensional intelligent verification of pharmacy prescription risks, improves the ability to identify safety risks for first-time patients and prescriptions for multiple medications, integrates dynamic patient information in real time, and balances rapid response with medication safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121905422A_ABST
    Figure CN121905422A_ABST
Patent Text Reader

Abstract

The invention relates to an AI-based intelligent pharmacy prescription safety checking method, system and device and a medium. The method comprises the following steps: acquiring a multi-source fusion feature data set; the multi-source fusion feature data set comprises standardized prescription data, patient individual health feature data and standardized medical knowledge rule data; based on the standardized prescription data and the standardized medical knowledge rule data, a preset AI matching model is combined for comparison, and a basic auditing result is obtained; performing high-risk scene special checking on the multi-source fusion feature data set to obtain a scene risk checking result; based on the basic auditing result and the scenarized risk auditing result, obtaining a prescription comprehensive safety checking result; the prescription safety checking result comprises risk prompt and checking confirmation information. By adopting the method, multi-dimensional intelligent checking of pharmacy prescription risks can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of prescription safety management technology, and in particular relates to an AI-based intelligent pharmacy prescription safety verification method, system, equipment and medium. Background Technology

[0002] With the development of technologies in the fields of medical digitalization and artificial intelligence, prescription risk identification technologies based on pre-trained language models have emerged. These technologies can rely on natural language processing capabilities to achieve intelligent retrieval and rule matching of prescription data, and can quickly complete prescription verification and basic risk screening for follow-up patients. This has led to the formation of a preliminary intelligent prescription security verification solution based on this type of technology.

[0003] The application process of prescription risk identification technology based on pre-trained language models is as follows: First, the text information of the prescription to be reviewed is structured and parsed to extract core data such as patient basic information, diagnosis and treatment, drug name and dosage; then, the pre-trained language model is called to match with the preset drug interaction knowledge base and follow-up prescription rule base; finally, a risk warning or prescription confirmation form is generated based on the matching results. The overall process focuses on simplifying the follow-up visit scenario, reducing repeated review steps through data reuse, and assisting pharmacists in improving the efficiency of prescription review.

[0004] However, current prescription risk identification technologies based on pre-trained language models have significant limitations: First, the technology is applicable to a limited range of scenarios, only meeting the basic review needs of follow-up prescriptions and unable to address the deeper safety risks in complex prescriptions for first-time patients or prescriptions containing multiple medications; second, it lacks adaptability to dynamic patient information, failing to integrate the latest patient vital signs, changes in allergy history, and progression of complications in real time, thus limiting the accuracy of the review results; third, in high-risk medication scenarios, it is difficult to balance the contradiction between rapidly responding to patient needs and ensuring medication safety, failing to achieve comprehensive risk screening for complex prescriptions or meet the efficient review requirements of large-scale online pharmacies, and unable to solve the core technical challenge of accurately identifying potential risks and balancing efficiency and safety in current pharmacy prescription safety verification. Summary of the Invention

[0005] Therefore, it is necessary to provide an AI-based intelligent pharmacy prescription security verification method, system, equipment, and medium to address the aforementioned technical issues.

[0006] Firstly, this application provides an AI-based intelligent pharmacy prescription security verification method, including:

[0007] Obtain a multi-source fusion feature dataset; the multi-source fusion feature dataset includes standardized prescription data, individual patient health characteristic data, and standardized medical knowledge rule data;

[0008] Based on standardized prescription data and standardized medical knowledge rules data, a basic review result is obtained by comparing them with a pre-set AI matching model.

[0009] A high-risk scenario-specific verification was conducted on the multi-source fusion feature dataset to obtain scenario-based risk assessment results.

[0010] Based on the basic review results and the scenario-based risk review results, a comprehensive prescription safety check result is obtained; the prescription safety check result includes risk warnings and review confirmation information.

[0011] In one embodiment, standardized prescription data and standardized medical knowledge rule data are compared using a pre-set AI matching model to obtain basic review results, including:

[0012] Based on the diagnostic information in the standardized prescription data, the corresponding clinical standard medication regimens are retrieved from the standardized medical knowledge rule data to obtain the baseline medication dataset that is appropriate for the symptoms.

[0013] Based on the information on drug names, specifications, dosages, and routes of administration in standardized prescription data, a consistency comparison is performed with the benchmark drug dataset to obtain the basic drug suitability results.

[0014] The unstructured clinical documents contained in the individual patient health feature data and the unstructured notes contained in the standardized prescription data contained in the multi-source fusion feature dataset are transformed into structured features to obtain structured clinical supplementary feature data.

[0015] By using a pre-set AI matching model, the medication information in structured clinical supplementary feature data and standardized prescription data and the medication contraindication clauses in standardized medical knowledge rule data are correlated and verified to obtain the medication contraindication screening results.

[0016] Based on the results of basic drug compatibility and drug contraindication screening, the basic review results were obtained.

[0017] In one embodiment, a preset AI matching model is used to perform correlation verification on medication information in structured clinical supplementary feature data, standardized prescription data, and medication contraindications in standardized medical knowledge rule data to obtain medication contraindication screening results, including:

[0018] By concatenating structured clinical supplementary feature data with medication information from standardized prescription data, a patient-prescription joint query vector is generated.

[0019] Based on the patient-prescription joint query vector, a search is performed in a pre-constructed heterogeneous graph database of contraindication knowledge to obtain a subgraph related to the patient-prescription joint query vector;

[0020] Based on the patient-prescription joint query vector and subgraph, all potential risk propagation paths and their corresponding comprehensive risk values ​​are obtained;

[0021] Based on potential risk transmission paths and corresponding path comprehensive risk values, medication contraindication screening results are generated; the screening results include risk items, risk values, and risk path tracing information as the basis.

[0022] In one embodiment, based on the patient-prescription joint query vector and subgraph, all potential risk propagation paths and their corresponding comprehensive risk values ​​are obtained, including:

[0023] Calculate the overall path risk value using the following formula:

[0024]

[0025] in, It is the overall risk value of the path. It is the total number of potential risk transmission paths. It is the first Risk weighting coefficients for each path It is the first The initial risk probability of each path, It is the first The propagation distance of each path, It is the risk attenuation coefficient.

[0026] In one embodiment, a high-risk scenario-specific verification is performed on the multi-source fusion feature dataset to obtain scenario-based risk assessment results, including:

[0027] Based on the multi-source fusion feature dataset, a scenario-based feature tensor is obtained, and the scenario-based feature tensor is transformed into a risk quantification vector;

[0028] The risk quantization vectors are stacked to obtain a cross-scenario risk tensor; each element in the cross-scenario risk tensor is used to represent the quantization value of a specific risk dimension in a specific scenario.

[0029] Based on cross-scenario risk tensors, scenario-based risk audit results are generated.

[0030] In one embodiment, based on a cross-scenario risk tensor, a scenario-based risk review result is generated, including:

[0031] The cross-scenario risk tensor is decoupled along the scenario dimension to obtain independent risk vectors for each target scenario. Each independent risk vector is then parsed according to the preset judgment rules to generate a list of independent risk items and levels for each scenario.

[0032] Based on the cross-scenario risk tensor, a global risk aggregation vector is obtained;

[0033] The global risk aggregation vector is decoded into specific collaborative risk warning information, and then structured and integrated with the list of independent risk items and their levels to generate scenario-based risk audit results.

[0034] In one embodiment, the method further includes:

[0035] Based on the multi-source fusion feature dataset, the dynamic data to be verified of prescriptions entered in real time at the prescription issuing terminal is extracted to obtain the real-time verification features of the prescription entry stage.

[0036] Real-time verification features are used to make immediate risk assessments, obtain pre-prescription intervention prompts, and send pre-prescription intervention prompts to the doctor's terminal; the pre-prescription intervention prompts include pre-prescription risk warning information and corresponding medication adjustment suggestions.

[0037] Secondly, this application also provides an AI-based intelligent pharmacy prescription security verification system, including:

[0038] The feature data acquisition module is used to acquire multi-source fusion feature datasets; the multi-source fusion feature datasets include standardized prescription data, individual patient health feature data, and standardized medical knowledge rule data;

[0039] The compliance review module is used to compare standardized prescription data and standardized medical knowledge rule data with a preset AI matching model to obtain basic review results.

[0040] The risk verification module is used to conduct special verification of high-risk scenarios on multi-source fusion feature datasets and obtain scenario-based risk review results.

[0041] The verification result generation module is used to obtain the comprehensive prescription safety verification result based on the basic review result and the scenario-based risk review result; the prescription safety verification result includes risk warnings and review confirmation information.

[0042] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.

[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0044] The aforementioned AI-based intelligent pharmacy prescription safety verification method, system, equipment, and medium acquire a multi-source fusion feature dataset. This dataset includes standardized prescription data, individual patient health characteristic data, and standardized medical knowledge rule data. Based on the standardized prescription data and standardized medical knowledge rule data, a comparison is performed using a pre-set AI matching model to obtain basic verification results. High-risk scenario-specific verification is then performed on the multi-source fusion feature dataset to obtain scenario-based risk verification results. Based on the basic verification results and scenario-based risk verification results, a comprehensive prescription safety verification result is obtained. The prescription safety verification result includes risk warnings and verification confirmation information. This method enables multi-dimensional intelligent verification of pharmacy prescription risks. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A flowchart illustrating an AI-based smart pharmacy prescription security verification method, provided as an exemplary embodiment of this application;

[0047] Figure 2 This is a schematic diagram of the structure of an AI-based smart pharmacy prescription security verification system provided as an exemplary embodiment of this application. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0049] The AI-based smart pharmacy prescription security verification method provided in this application embodiment can be widely applied to prescription issuance, pharmacist review, online pharmacy / Internet hospital prescription circulation, and inpatient medical order review.

[0050] In one embodiment, such as Figure 1 As shown, an AI-based intelligent pharmacy prescription security verification method is provided. This embodiment illustrates the application of this method to a verification terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and is implemented through the interaction between the verification terminal and the server. In this embodiment, the method includes the following steps:

[0051] Step S101: Obtain the multi-source fusion feature dataset; the multi-source fusion feature dataset includes standardized prescription data, individual patient health feature data, and standardized medical knowledge rule data.

[0052] Among them, the multi-source fusion feature dataset can be a unified feature set generated after standardization processing.

[0053] Standardized prescription data can be standardized data formed by structured processing after a doctor issues a prescription. It includes patient basic information (name, age, gender, medical ID, etc.), name and code of the diagnosed disease, drug-related information (generic name, brand name, specifications, dosage, frequency of use, route of administration, course of treatment, etc.), information of the prescribing doctor, and the prescription timestamp, etc.

[0054] Patient individual health characteristic data can be multi-dimensional data that reflects the individual's health status, including static basic data (past medical history, allergy history, surgical history, family medical history, etc.), dynamic monitoring data (real-time blood pressure, blood sugar, heart rate, liver and kidney function indicators, blood routine results and other recent test data), cross-institutional medical data (historical medication records, comorbidity treatment records, etc. from different medical institutions), and physiological baseline data for special populations (the degree of organ function decline in elderly patients, the pregnancy stage of pregnant women, the metabolic capacity baseline of patients with liver and kidney dysfunction, etc.).

[0055] Standardized medical knowledge rules data can be structured knowledge data built on national and industry authoritative standards, including clinical drug use guidelines (such as the National Essential Medicines Clinical Application Guidelines and Specialty Disease Diagnosis and Treatment Standards), drug-related rules (drug interaction contraindications, dosage ranges, route of administration restrictions, and drug contraindications for special populations), special drug management standards (use control requirements for narcotic drugs, psychotropic drugs, and antimicrobial drugs), and bacterial resistance databases (sensitive matching relationships between pathogens and antimicrobial drugs), etc., which are standardized data generated after rule parsing.

[0056] Specifically, the verification terminal can establish data interaction channels with hospital information systems, electronic health record platforms, and authoritative medical knowledge bases to obtain original prescription data issued by doctors, patients' full-cycle health records, and the latest medical rule documents in real time. It can then perform format normalization, redundant data removal, and data validity verification on the acquired heterogeneous data, ultimately generating a multi-source fusion feature dataset that includes standardized prescription data, individual patient health characteristic data, and standardized medical knowledge rule data.

[0057] Step S102: Based on standardized prescription data and standardized medical knowledge rule data, a comparison is made using a preset AI matching model to obtain basic review results.

[0058] The pre-defined AI matching model can be a machine learning model used to perform core prescription compliance matching tasks. Its main function is to receive structured prescription data and knowledge rule data as input and output a comprehensive compliance score and specific risk items. The pre-defined AI matching model includes a feature encoding layer and a multi-path discriminant layer; the feature encoding layer can map the input prescription features (diagnosis, drug) and rule features (standard prescription, contraindications) to a unified low-dimensional semantic vector space; the multi-path discriminant layer can be parallel sub-network branches.

[0059] The basic review results can be preliminary, structured review results generated by a pre-set AI matching model regarding the core elements of the prescription (suitability of diagnosis and medication regimen, compliance with basic contraindications).

[0060] Specifically, the verification terminal can extract standardized prescription data and standardized medical knowledge rule data from a multi-source fusion feature dataset. Then, it performs feature extraction and format regularization on the standardized prescription data and standardized medical knowledge rule data respectively to obtain structured prescription features (including core information such as diagnosis and drugs) and rule features (including standard plans, contraindications, etc.). Further, the verification terminal calls a preset AI matching model, maps the features to a unified low-dimensional semantic vector space through the model feature encoding layer, analyzes the matching degree in parallel through a multi-path discrimination layer, outputs a compliance score and specific risk items, and finally integrates to generate a structured basic review result on the suitability of diagnosis and medication and the compliance of basic contraindications.

[0061] Step S103: Conduct a special verification of high-risk scenarios on the multi-source fusion feature dataset to obtain scenario-based risk audit results.

[0062] Among them, the scenario-based risk review results can be structured review results generated after special verification for high-risk scenarios such as special populations (elderly, pregnant women, patients with liver and kidney dysfunction, etc.), multiple drug combinations, and special drugs (anesthetics, psychotropic drugs, antibacterial drugs, etc.).

[0063] Specifically, the verification terminal can extract high-risk scenario identification information from multi-source fusion feature datasets, match target scenarios such as special populations, multi-drug combination, and special drugs, call the corresponding special verification logic, and conduct targeted verification of drug suitability, dosage rationality, and risk superposition in each scenario. At the same time, it integrates scenario-specific rules from standardized medical knowledge rule data to finally generate scenario-based risk audit results.

[0064] Step S104: Based on the basic review results and the scenario-based risk review results, obtain the comprehensive prescription safety verification results; the prescription safety verification results include risk warnings and review confirmation information.

[0065] Among them, the prescription comprehensive safety verification result can be a structured and visualized verification result generated after integrating the basic review results and the scenario-based risk review results and making a comprehensive judgment.

[0066] Specifically, the verification terminal can classify and integrate basic risk items such as medication suitability and contraindication screening in the basic review results with independent and collaborative risks of high-risk scenarios in the scenario-based risk review results. Then, it can conduct a comprehensive evaluation based on preset risk level judgment rules (such as risk superposition threshold and priority weight) and finally generate a comprehensive prescription safety verification result that includes clear review and confirmation information as well as risk prompts that are classified and sorted.

[0067] The aforementioned AI-based intelligent pharmacy prescription safety verification method involves a verification terminal acquiring a multi-source fusion feature dataset. This dataset includes standardized prescription data, individual patient health characteristic data, and standardized medical knowledge rule data. Based on the standardized prescription data and standardized medical knowledge rule data, a comparison is performed using a pre-set AI matching model to obtain a basic verification result. A high-risk scenario-specific verification is then performed on the multi-source fusion feature dataset to obtain a scenario-based risk verification result. Based on the basic verification result and the scenario-based risk verification result, a comprehensive prescription safety verification result is obtained. The prescription safety verification result includes risk warnings and verification confirmation information. This method enables multi-dimensional intelligent verification of pharmacy prescription risks.

[0068] In one embodiment, the basic review result is obtained by comparing standardized prescription data and standardized medical knowledge rule data with a preset AI matching model, which may include the following steps:

[0069] Step S201: Based on the diagnostic information in the standardized prescription data, retrieve the corresponding clinical standard medication regimen in the standardized medical knowledge rule data to obtain the baseline medication dataset that matches the symptoms.

[0070] Clinical standard medication regimens can be standardized and regulated drug application guidelines that are derived from authoritative medical knowledge systems and recommended for specific diagnostic conditions.

[0071] A baseline medication dataset can be a standardized set of medication information that serves as a benchmark for compatibility comparison.

[0072] Specifically, the verification terminal can extract the diagnostic standard code from standardized prescription data. Then, the terminal sends a query request to an integrated local or cloud-based standardized medical knowledge rule database, using the diagnostic code as a key index to retrieve and obtain all clinical standard medication records explicitly associated with that diagnosis. Further, the terminal parses, deduplicates, and structures these records, transforming elements such as drug information, recommended dosage, and route of administration into standardized medication entries with a unified field format, allowing for programmed comparison. This ultimately generates a dynamic benchmark medication dataset specifically for this review.

[0073] Step S202: Based on the information of drug name, specification, dosage and route of administration in the standardized prescription data, a consistency comparison is performed with the benchmark drug dataset to obtain the basic drug suitability results.

[0074] Among them, the basic medication suitability result can be a structured result generated by verifying the consistency of core information such as drug name, specification, dosage, and route of administration in standardized prescription data with the baseline medication dataset that matches the disease.

[0075] Specifically, the verification terminal can extract core information such as drug name, specifications, dosage, and route of administration from standardized prescription data and generate standardized information entries. Subsequently, the verification terminal performs a procedural comparison of each prescription information entry with the corresponding standard drug entry in the benchmark drug dataset. The comparison dimensions include consistency of the generic drug name, compliance of dosage, and matching of the route of administration. Then, the verification terminal judges each comparison result according to preset difference tolerance rules, and summarizes and structures all comparison judgment results to finally generate a basic drug suitability result.

[0076] Step S203: Perform structured feature transformation on the unstructured clinical documents contained in the patient individual health feature data and the unstructured notes contained in the standardized prescription data in the multi-source fusion feature dataset to obtain structured clinical supplementary feature data.

[0077] Among them, structured clinical supplementary feature data can be a standardized and vectorized set of feature data that can be directly recognized and utilized by AI models after deep analysis and information extraction of unstructured text information contained in multi-source fusion feature datasets through natural language processing technology.

[0078] Specifically, the verification terminal can perform entity recognition, key information extraction, and semantic parsing on unstructured clinical documents (such as outpatient medical record descriptions and imaging report conclusions) in individual patient health characteristic data and unstructured remarks (such as special instructions for medication by doctors) in standardized prescription data. Then, the parsed information is normalized in format, coded in feature, and aligned in dimension according to preset data specifications, and finally, standardized and vectorized structured supplementary clinical feature data is generated.

[0079] Step S204: The medication information in the structured clinical supplementary feature data, the standardized prescription data, and the medication contraindication clauses in the standardized medical knowledge rule data are correlated and verified using a preset AI matching model to obtain the medication contraindication screening results.

[0080] Among them, the results of the drug contraindication screening can be a set of potential risks that may violate the contraindication rules, identified by a preset AI matching model.

[0081] Specifically, the verification terminal can concatenate structured clinical supplementary feature data, medication information vectors from standardized prescription data, and vectors of associated contraindications extracted from standardized medical knowledge rule data to generate a composite feature vector input. Subsequently, the verification terminal calls the preset AI matching model to analyze the correlation strength between patient characteristics and prescribed drugs in the multidimensional contraindication knowledge space, obtaining a risk probability prediction for each potential contraindication combination. Further, the verification terminal judges the risk probability prediction based on a preset threshold and organizes items exceeding the threshold into a structured list including risk description, risk level, triggering basis, and quantified probability—the medication contraindication screening result.

[0082] Step S205: Based on the basic medication compatibility results and the medication contraindication screening results, the basic review results are obtained.

[0083] Specifically, the verification terminal can link and integrate the basic medication suitability results with the risk items, path comprehensive risk values, and traceability information in the medication contraindication screening results. Then, it can conduct a comprehensive evaluation based on the preset basic review judgment rules (such as suitability priority and risk value threshold), eliminate duplicate risk information, classify and sort it, and finally generate basic review results including prescription basic compliance conclusions and core risk lists (including suitability differences and contraindication risk details).

[0084] In this embodiment, the verification terminal completes the construction of a disease-matching benchmark medication dataset, medication basic compatibility comparison, unstructured data structuring transformation, and multi-dimensional contraindication association verification in steps, realizing comprehensive and intelligent review of prescription basic compliance, and providing high-quality core evidence for subsequent comprehensive security verification.

[0085] In one embodiment, a preset AI matching model is used to perform correlation verification on medication information in structured clinical supplementary feature data, standardized prescription data, and medication contraindication clauses in standardized medical knowledge rule data to obtain medication contraindication screening results. This may include the following steps:

[0086] Step S301: The structured clinical supplementary feature data and the medication information in the standardized prescription data are concatenated to generate a patient-prescription joint query vector.

[0087] Among them, the patient-prescription joint query vector can refer to a high-dimensional feature vector generated by aligning the structured clinical supplementary feature data (with the medication information in the standardized prescription data (characterizing the prescription medication plan) in terms of feature dimensions and unifying the data format, and then splicing and fusing them through vector encoding technology.

[0088] Specifically, the verification terminal can unify the medication information feature dimensions in structured clinical supplementary feature data and standardized prescription data (e.g., through filling or mapping). Then, the verification terminal maps the processed structured clinical supplementary feature data and standardized prescription data into fixed-dimensional feature vectors. Finally, the verification terminal concatenates the fixed-dimensional feature vectors end-to-end along their feature dimensions using a vector concatenation operation, generating a high-dimensional patient-prescription joint query vector that includes both patient status and prescription medication semantic information.

[0089] Step S302 involves retrieving data from a pre-constructed heterogeneous graph database of contraindication knowledge based on the patient-prescription joint query vector to obtain a subgraph related to the patient-prescription joint query vector.

[0090] Among them, the pre-constructed heterogeneous knowledge graph database of contraindications can be a structured knowledge graph database built on authoritative medical knowledge systems (such as clinical drug use guidelines, drug instructions, and contraindication rule bases), with multiple types of entities as nodes and the relationships between entities as edges.

[0091] The subgraph associated with the patient-prescription joint query vector can be a local graph structure retrieved from a taboo knowledge heterogeneous graph database that has a direct or indirect association with the patient-prescription joint query vector.

[0092] Specifically, the verification terminal can call the embedded graph database query interface to calculate the similarity (e.g., cosine similarity) between the query vector and the pre-stored vectors of each node (such as disease, drug, adverse reaction) in a pre-defined taboo knowledge heterogeneous graph database, and filter out an initial set of relevant nodes whose similarity exceeds a preset threshold. Subsequently, the verification terminal uses the initial node as an anchor point to perform a multi-hop extended query in the graph database, retrieving the edges directly connected to the anchor point and nodes and the nodes they connect to, constructing a local subgraph that includes relevant entities, relationships, and their topological structure.

[0093] Step S303: Based on the patient-prescription joint query vector and subgraph, obtain all potential risk propagation paths and their corresponding comprehensive risk values.

[0094] Among them, the path comprehensive risk value can be a numerical value that represents the risk level of each potential risk transmission path, which is quantitatively calculated based on the patient-prescription joint query vector and subgraph through a preset formula.

[0095] Specifically, the verification terminal can start from the patient status node and prescription drug node most relevant to the semantics of the query vector, and perform a depth-first or breadth-first search to enumerate all directed path sequences that can reach known contraindications or high-risk nodes, which are all potential risk propagation paths. Subsequently, for each identified path, the verification terminal calls a preset risk quantification formula, and calculates a numerical value representing the overall risk level of the path, i.e., the path comprehensive risk value, based on parameters such as the weight of each edge on the path, the correlation between the patient-prescription joint query vector and the path nodes, and the path length.

[0096] Step S304: Based on the potential risk propagation path and the corresponding path comprehensive risk value, generate the drug contraindication screening results; the screening results include risk items, risk values, and risk path tracing information as the basis.

[0097] Specifically, the verification terminal can filter paths based on preset risk thresholds, retaining paths with risk values ​​exceeding the threshold. Then, for each retained path, the terminal extracts the contraindication risk type represented by its endpoint node as a risk item, the path's overall risk value as the risk value, and the complete sequence of nodes and edges traversed by the path as risk path tracing information. Finally, the terminal encapsulates all extracted risk items, risk values, and tracing information in a preset structured format to generate the final medication contraindication screening result.

[0098] In this embodiment, the verification terminal constructs a patient-prescription joint query vector and performs deep retrieval and path reasoning in the contraindication knowledge graph, thereby enabling the interpretable identification of complex medication contraindication risks that are highly correlated with the current individual patient status from massive amounts of medical knowledge.

[0099] In one embodiment, based on the patient-prescription joint query vector and subgraph, all potential risk propagation paths and their corresponding comprehensive risk values ​​are obtained, including:

[0100] Calculate the overall path risk value using the following formula:

[0101]

[0102] in, It is the overall risk value of the path. It is the total number of potential risk transmission paths. It is the first Risk weighting coefficients for each path It is the first The initial risk probability of each path, It is the first The propagation distance of each path, It is the risk attenuation coefficient.

[0103] In this embodiment, the verification terminal introduces a quantitative risk calculation formula that includes risk weight, initial probability, and path distance decay factor, thereby enabling dynamic and quantitative risk assessment of complex risk propagation paths, and allowing high-risk paths to be identified and ranked.

[0104] In one embodiment, performing a high-risk scenario-specific verification on a multi-source fusion feature dataset to obtain scenario-based risk assessment results may include the following steps:

[0105] Step S401: Based on the multi-source fusion feature dataset, obtain the scenario-based feature tensor and convert the scenario-based feature tensor into a risk quantification vector.

[0106] Among them, the scenario-based feature tensor can be a high-order tensor data generated by extracting multi-dimensional features related to high-risk scenarios (such as medication use by elderly patients, combination of multiple drugs, use of special drugs, etc.) from a multi-source fusion feature dataset and organizing them according to a preset dimension number structure.

[0107] Risk quantization vectors can be vector data generated by standardizing the original feature information in a scenario-based feature tensor, encoding the risk dimension, and quantizing it.

[0108] Specifically, the verification terminal can filter and extract feature dimensions strongly correlated with specific scenarios from a multi-source fusion feature dataset based on preset high-risk scenario classification rules (e.g., for elderly patients taking medication, extracting age, dosage, liver and kidney function indicators, and central nervous system drug identifiers). Subsequently, the verification terminal organizes these features into a multi-dimensional array structure according to scenario type, risk dimension, and feature instance, integrating them to generate a scenario-based feature tensor. Further, the verification terminal invokes a scenario feature encoder, which uses a multilayer perceptron or attention-weighted layer to fuse, reduce dimensionality, and perform nonlinear transformations on the features in the scenario-based feature tensor, ultimately obtaining a risk quantification vector.

[0109] Step S402: Stack the risk quantization vectors to obtain a cross-scenario risk tensor; each element in the cross-scenario risk tensor is used to represent the quantization value of a specific risk dimension under a specific scenario.

[0110] Among them, the cross-scenario risk tensor can be a high-order tensor data generated by stacking and integrating the risk quantification vectors corresponding to multiple high-risk scenarios (such as medication for elderly patients, multi-drug combination, and use of special drugs) according to preset rules.

[0111] Specifically, the verification terminal can obtain the stacking order of risk quantification vectors for each scenario according to a preset priority order of high-risk scenarios; at the same time, it unifies the risk dimension index of all vectors, and then stacks them along the scenario index dimension to construct a cross-scenario risk tensor. ,in, This indicates the number of high-risk scenarios. Indicates the number of risk dimensions. Represents a tensor element, used to represent the first tensor element. In the first scenario The quantitative value of risk.

[0112] Step S403: Generate scenario-based risk audit results based on cross-scenario risk tensors.

[0113] Specifically, the verification terminal can slice the cross-scenario risk tensor along the scenario dimension, generating a corresponding risk sub-tensor for each high-risk scenario. Subsequently, the verification terminal analyzes the risk dimension values ​​in each sub-tensor to generate an independent risk list including specific risk items, levels, and quantification values. Simultaneously, the verification terminal performs collaborative risk analysis on the cross-scenario risk tensor to obtain the correlation results between risks in different scenarios. For example, a collaborative risk quantification function can be used to characterize the comprehensive impact when multiple scenario risks coexist; the expression of this function is as follows:

[0114]

[0115] in, This represents the comprehensive assessment value of collaborative risks. This indicates the number of high-risk scenarios that coexist in the current prescription. Indicates the first Independent risk assessment values ​​for each high-risk scenario. Indicates the first Weighting coefficients for high-risk scenarios, This indicates the synergistic effect moderating factor.

[0116] Furthermore, the verification terminal integrates the independent risk lists of all scenarios with other related analysis results in a structured manner, and encapsulates them into scenario-based risk audit results.

[0117] In this embodiment, the verification terminal quantifies the risk characteristics of multiple scenarios into a unified tensor and performs collaborative analysis, thereby achieving systematic and quantitative risk identification and assessment of complex and high-risk medication scenarios.

[0118] In one embodiment, the method further includes:

[0119] Step S501: Based on the multi-source fusion feature dataset, extract the dynamic prescription data to be verified entered in real time by the prescription issuing terminal to obtain the real-time verification features of the prescription entry stage.

[0120] Among them, the prescription dynamic data to be verified can be dynamic data fragments and intermediate information that have not yet been finally submitted for confirmation during the real-time entry of prescriptions by doctors.

[0121] The real-time verification features in the prescription entry stage can be a set of structured features that can be directly used for immediate risk assessment, generated from the dynamic prescription data to be verified after real-time feature extraction, format standardization and key information screening.

[0122] Specifically, the verification terminal can simultaneously acquire dynamic data fragments (including patient basic information, preliminary diagnosis description, drug entry information, and other intermediate data) that have not yet been submitted during the doctor's data entry process. It can also match the associated patient health baseline and medical rule features from the multi-source fusion feature dataset, perform real-time format standardization, redundant information filtering, and key information extraction on the captured data, and screen out core elements such as patient special population identifiers, drug core attributes, and the correlation between diagnosis and medication. Finally, it generates structured real-time verification features that can be directly used for immediate risk assessment.

[0123] Step S502: Immediately assess the risk of real-time verification features, obtain pre-prescription intervention prompts, and send pre-prescription intervention prompts to the doctor's terminal; the pre-prescription intervention prompts include pre-prescription risk warning information and corresponding medication adjustment suggestions.

[0124] Among them, pre-prescription intervention prompts can be structured intervention information for doctors generated based on real-time verification features and immediate risk assessment by artificial intelligence during the prescription issuance process (before final submission); pre-prescription intervention prompts include pre-prescription risk warning information and corresponding medication adjustment suggestions.

[0125] Specifically, the verification terminal can call a preset real-time risk assessment model, input the real-time verification features from the prescription entry stage into the model, and match them in real time with contraindications and medication guidelines for special populations in standardized medical knowledge rules data. This allows for the rapid identification of potential risks such as drug allergies, dosage overdose, and contraindications to multiple drug use. The terminal generates pre-prescription risk warning information that includes the risk type and triggering basis. It also integrates alternative drugs recommended by clinical standard protocols and medication adjustment suggestions such as optimized dosage into a structured pre-prescription intervention prompt, which is then pushed to the doctor's terminal in real time through the data interaction channel. For example, the pre-defined real-time risk assessment model structure includes a feature encoding layer, a multi-path attention discrimination layer, and a risk output layer. The pre-defined real-time risk assessment model quickly matches real-time verification features with standardized medical knowledge rule data, instantly identifies explicit and potential risks in the prescription entry process, and generates actionable medication adjustment suggestions to adapt to real-time intervention scenarios in the prescription issuance stage. The input can be real-time verification features (in structured vector form) from the prescription entry stage, covering patient special population identifiers, core drug attributes, diagnostic and medication association features, medical rule matching factors, etc. The output can be a binary result, including risk assessment results (risk type code and risk probability value) and corresponding medication adjustment suggestion codes, which can be directly mapped to structured pre-prescription intervention prompts.

[0126] In this embodiment, the verification terminal captures dynamic data during the prescription entry process in real time and extracts structured verification features. It then calls the instant risk assessment model to quickly match medical rules, identify potential risks, and generate corresponding adjustment suggestions. This enables real-time risk warning and pre-emptive intervention during the prescription issuance stage, thereby improving the security and standardization of prescription issuance.

[0127] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0128] Based on the same inventive concept, this application also provides an embodiment for implementing the AI-based smart pharmacy prescription security verification system described above. The solution provided by this system is similar to the implementation scheme described in the above method; therefore, the specific limitations of one or more AI-based smart pharmacy prescription security verification system embodiments provided below can be found in the limitations of the AI-based smart pharmacy prescription security verification method described above, and will not be repeated here.

[0129] In one exemplary embodiment, such as Figure 2 As shown, an AI-based intelligent pharmacy prescription security verification system 600 is provided, including:

[0130] The feature data acquisition module 601 is used to acquire a multi-source fusion feature dataset; the multi-source fusion feature dataset includes standardized prescription data, individual patient health feature data, and standardized medical knowledge rule data.

[0131] The compliance review module 602 is used to compare standardized prescription data and standardized medical knowledge rule data with a preset AI matching model to obtain basic review results.

[0132] Risk verification module 603 is used to conduct special verification of high-risk scenarios on multi-source fusion feature datasets to obtain scenario-based risk audit results;

[0133] The verification result generation module 604 is used to obtain the comprehensive prescription safety verification result based on the basic review result and the scenario-based risk review result; the prescription safety verification result includes risk warnings and review confirmation information.

[0134] In one embodiment, the compliance audit module includes:

[0135] The dataset construction unit is used to retrieve the corresponding clinical standard medication regimens from the standardized medical knowledge rule data based on the diagnostic disease information in the standardized prescription data, so as to obtain the benchmark medication dataset that is adapted to the disease.

[0136] The compatibility comparison unit is used to compare the drug name, specifications, dosage and route of administration information in the standardized prescription data with the benchmark drug dataset to obtain the basic compatibility results of the medication.

[0137] The supplementary feature transformation unit is used to perform structured feature transformation on the unstructured clinical documents contained in the patient individual health feature data and the unstructured notes contained in the standardized prescription data in the multi-source fusion feature dataset, so as to obtain structured clinical supplementary feature data.

[0138] The association verification unit is used to perform association verification on medication information in structured clinical supplementary feature data, standardized prescription data and medication contraindication clauses in standardized medical knowledge rule data through a preset AI matching model, so as to obtain medication contraindication screening results;

[0139] The audit results integration unit is used to obtain basic audit results based on the basic drug compatibility results and the drug contraindication screening results.

[0140] In one embodiment, the association verification unit includes:

[0141] The query vector generation subunit is used to concatenate structured clinical supplementary feature data with medication information in standardized prescription data to generate a patient-prescription joint query vector.

[0142] The subgraph retrieval subunit is used to retrieve subgraphs related to the patient-prescription joint query vector from a pre-constructed heterogeneous graph database of contraindication knowledge.

[0143] The path and quantification value calculation subunit is used to obtain all potential risk propagation paths and corresponding comprehensive risk values ​​based on the patient-prescription joint query vector and subgraph.

[0144] The query results generation sub-unit is used to generate drug contraindication screening results based on potential risk propagation paths and corresponding path comprehensive risk values; the screening results include risk items, risk values, and risk path tracing information as the basis.

[0145] In one embodiment, the path and quantization value calculation subunit includes:

[0146] Calculate the overall path risk value using the following formula:

[0147]

[0148] in, It is the overall risk value of the path. It is the total number of potential risk transmission paths. It is the first Risk weighting coefficients for each path It is the first The initial risk probability of each path, It is the first The propagation distance of each path, It is the risk attenuation coefficient.

[0149] In one embodiment, the risk verification module includes:

[0150] The scenario-based risk quantification vector generation unit is used to obtain scenario-based feature tensors based on multi-source fusion feature datasets and transform the scenario-based feature tensors into risk quantification vectors.

[0151] The cross-scenario risk tensor construction unit is used to stack risk quantization vectors to obtain a cross-scenario risk tensor; each element in the cross-scenario risk tensor is used to represent the quantization value of a specific risk dimension under a specific scenario.

[0152] The scenario-based risk audit result generation unit is used to generate scenario-based risk audit results based on cross-scenario risk tensors.

[0153] In one embodiment, the scenario-based risk review result generation unit includes:

[0154] The risk analysis subunit is used to decouple the cross-scenario risk tensor along the scenario dimension to obtain the independent risk vector of each target scenario, and analyze each independent risk vector according to the preset judgment rules to generate an independent risk item list and level for each scenario.

[0155] The aggregation vector generation sub-unit is used to obtain the global risk aggregation vector based on the cross-scenario risk tensor;

[0156] The audit result integration sub-unit is used to decode the global risk aggregation vector into specific collaborative risk warning information, and to integrate it with the independent risk item list and level in a structured manner to generate scenario-based risk audit results.

[0157] In one embodiment, the system further includes:

[0158] The verification feature extraction module is used to extract the dynamic data to be verified of prescriptions entered in real time by the prescription issuing terminal based on the multi-source fusion feature dataset, so as to obtain the real-time verification features of the prescription entry stage.

[0159] The intervention prompt generation module is used to perform immediate risk assessment on real-time verification features, obtain pre-prescription intervention prompts, and send the pre-prescription intervention prompts to the doctor's terminal; the pre-prescription intervention prompts include pre-prescription risk warning information and corresponding medication adjustment suggestions.

[0160] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the AI-based intelligent pharmacy prescription security verification method described above.

[0161] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0162] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0163] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. An AI-based intelligent pharmacy prescription security verification method, characterized in that, The method includes: Obtain a multi-source fusion feature dataset; the multi-source fusion feature dataset includes standardized prescription data, individual patient health feature data, and standardized medical knowledge rule data; Based on the standardized prescription data and the standardized medical knowledge rule data, a comparison is made using a preset AI matching model to obtain basic review results; A high-risk scenario-specific verification was conducted on the multi-source fusion feature dataset to obtain scenario-based risk assessment results; Based on the basic review results and the scenario-based risk review results, a comprehensive prescription safety verification result is obtained; the prescription safety verification result includes risk warnings and review confirmation information.

2. The method according to claim 1, characterized in that, The basic review results are obtained by comparing the standardized prescription data with the standardized medical knowledge rule data using a preset AI matching model, including: Based on the diagnostic information in the standardized prescription data, the corresponding clinical standard medication regimen is retrieved from the standardized medical knowledge rule data to obtain the baseline medication dataset adapted to the symptoms. Based on the information on drug name, specifications, dosage and route of administration in the standardized prescription data, a consistency comparison is performed with the benchmark drug dataset to obtain the basic drug suitability results. The unstructured clinical documents contained in the patient individual health feature data and the unstructured notes contained in the standardized prescription data in the multi-source fusion feature dataset are transformed into structured features to obtain structured clinical supplementary feature data. The structured clinical supplementary feature data, the medication information in the standardized prescription data, and the medication contraindication clauses in the standardized medical knowledge rule data are correlated and verified by a preset AI matching model to obtain the medication contraindication screening results. Based on the basic drug compatibility results and the drug contraindication screening results, the basic review results are obtained.

3. The method according to claim 2, characterized in that, The process involves using a pre-defined AI matching model to correlate and verify the medication information in the structured clinical supplementary feature data, the standardized prescription data, and the medication contraindications in the standardized medical knowledge rule data, thereby obtaining medication contraindication screening results, including: The structured clinical supplementary feature data is concatenated with the medication information in the standardized prescription data to generate a patient-prescription joint query vector; Based on the patient-prescription joint query vector, a search is performed in a pre-constructed heterogeneous graph database of contraindication knowledge to obtain a subgraph related to the patient-prescription joint query vector; Based on the patient-prescription joint query vector and the subgraph, all potential risk propagation paths and their corresponding comprehensive risk values ​​are obtained. Based on the potential risk propagation path and the corresponding path comprehensive risk value, the drug contraindication screening result is generated; the screening result includes risk items, risk values, and risk path tracing information as the basis.

4. The method according to claim 3, characterized in that, Based on the patient-prescription joint query vector and the subgraph, all potential risk propagation paths and their corresponding comprehensive risk values ​​are obtained, including: Calculate the overall risk value of the path using the following formula: in, It is the overall risk value of the path. It is the total number of potential risk transmission paths. It is the first Risk weighting coefficients for each path It is the first The initial risk probability of each path, It is the first The propagation distance of each path, It is the risk attenuation coefficient.

5. The method according to any one of claims 1 to 4, characterized in that, The process of conducting a high-risk scenario-specific verification on the multi-source fusion feature dataset to obtain scenario-based risk assessment results includes: Based on the multi-source fusion feature dataset, a scenario-based feature tensor is obtained, and the scenario-based feature tensor is transformed into a risk quantification vector; The risk quantization vectors are stacked to obtain a cross-scenario risk tensor; each element in the cross-scenario risk tensor is used to represent the quantization value of a specific risk dimension in a specific scenario. Based on the cross-scenario risk tensor, the scenario-based risk review result is generated.

6. The method according to claim 5, characterized in that, The generation of the scenario-based risk review result based on the cross-scenario risk tensor includes: The cross-scenario risk tensor is decoupled along the scenario dimension to obtain independent risk vectors for each target scenario. Each independent risk vector is then parsed according to a preset judgment rule to generate a list of independent risk items and levels for each scenario. Based on the cross-scenario risk tensor, a global risk aggregation vector is obtained; The global risk aggregation vector is decoded into specific collaborative risk warning information, and then structurally integrated with the list of independent risk items and their levels to generate the scenario-based risk review result.

7. The method according to claim 1, characterized in that, The method further includes: Based on the multi-source fusion feature dataset, extract the dynamic data to be verified of prescriptions entered in real time by the prescription issuing terminal to obtain the real-time verification features of the prescription entry stage. The real-time verification features are used to make an immediate risk assessment, obtain a pre-prescription intervention prompt, and send the pre-prescription intervention prompt to the doctor's terminal; the pre-prescription intervention prompt includes pre-prescription risk warning information and corresponding medication adjustment suggestions.

8. An AI-based intelligent pharmacy prescription security verification system, characterized in that, The system includes: The feature data acquisition module is used to acquire a multi-source fusion feature dataset; the multi-source fusion feature dataset includes standardized prescription data, individual patient health feature data, and standardized medical knowledge rule data; The compliance review module is used to compare the standardized prescription data with the standardized medical knowledge rule data, and combine them with a preset AI matching model to obtain basic review results. The risk verification module is used to conduct high-risk scenario-specific verification on the multi-source fusion feature dataset to obtain scenario-based risk review results; The verification result generation module is used to obtain a comprehensive prescription safety verification result based on the basic review result and the scenario-based risk review result; the prescription safety verification result includes risk warnings and review confirmation information.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.