Large medical model-driven cross-department collaborative prescription generation method and system

Through the cross-department collaborative prescription generation method driven by medical big model, AI chips and knowledge graphs are used to build a collaborative prescription model, solving the problem of conflicts between multiple departments in combination of drug use, improving the efficiency and accuracy of prescription generation, and ensuring the safety and effectiveness of drug use.

CN120526953AInactive Publication Date: 2025-08-22SHANGHAI CHUDONG INTELLIGENT TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510678365.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the treatment of complex diseases, there is a risk of conflict between multiple departments and the traditional prescription generation method lacks unified standards and specifications, resulting in insufficient safety and effectiveness of medication.

Method used

A cross-department collaborative prescription generation method driven by medical big model is adopted. By obtaining patient electronic medical records and multi-department prescription data, using AI chips and knowledge graphs for transfer learning and fine-tuning, building a collaborative prescription model, identifying drug compatibility contraindications and dose risks, generating a prescription recommendation set, and dynamic corrections and multiple rounds of optimization based on feedback.

Benefits of technology

It improves the efficiency and accuracy of prescription generation, effectively avoids the risk of contraindications and dosage between drugs, provides comprehensive and scientific decision-making support, and significantly improves the safety and effectiveness of combined medications in multiple departments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120526953A_ABST
    Figure CN120526953A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent medical treatment, and discloses a medical large model driven cross-department collaborative prescription generation method and system. According to the method, electronic medical records of patients and prescription data of multiple departments are acquired, key information is structurally extracted to generate directional vectors, and transfer learning and fine adjustment are performed by using historical conflict cases and a drug knowledge graph based on a medical basic large model and an AI chip, so that a collaborative prescription model is constructed. The model can identify drug incompatibility and dosage risks among departments and generate a prescription suggestion set. A doctor can dynamically correct a prescription based on feedback, a collaborative report containing a medication time sequence, a monitoring index and an emergency scheme is generated after multiple rounds of collaborative optimization, and the safety and effectiveness of multi-department combined medication of complex diseases are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent medical technology, and in particular to a method and system for generating cross-department collaborative prescriptions driven by a large medical model. Background Art

[0002] In current medical practice, the treatment of complex diseases often involves the collaborative work of multiple departments, which requires doctors from different departments to jointly develop treatment plans, including prescription medications. However, because doctors from different departments may not be familiar with each other's professional fields, and the interactions between drugs are complex, conflicts often arise in prescription medications, posing safety risks to patients' treatment. In addition, traditional prescription generation methods mostly rely on the doctor's personal experience and judgment, lack unified standards and specifications, and also increase the risk of medication conflicts. Therefore, how to effectively resolve the problem of joint medication conflicts in complex diseases and improve the safety and effectiveness of prescription medications is a technical problem that needs to be solved urgently in the current medical field. Summary of the Invention

[0003] In response to the above-mentioned technical deficiencies, the purpose of the present invention is to provide a cross-department collaborative prescription generation method and system driven by a medical big model to solve the problem of conflicting joint medications for complex diseases in multiple departments in the existing technology.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for generating cross-department collaborative prescriptions driven by a large medical model, the method comprising: Obtain electronic medical records and multi-department prescription data for patients with complex diseases, and generate prescription vectors by structured extraction of diagnosis conclusions, drug ingredients, drug dosages, and drug time series features; Based on a large medical foundation model, AI chips were used to conduct transfer learning and fine-tuning using a dataset containing historical conflict cases and a knowledge graph covering drug metabolism and antagonism relationships to build a collaborative prescription model. Input prescription vectors into the collaborative prescription model to identify inter-departmental drug compatibility and dosage risks, and generate a prescription recommendation set containing conflict types and optimization basis; A set of prescription recommendations is pushed to the doctor's terminal, and the prescription is dynamically revised based on feedback. After multiple rounds of collaborative optimization, a collaborative report containing medication schedules, monitoring indicators and emergency plans is generated.

[0005] Preferably, in a possible implementation of the first aspect, the structured extraction of drug temporal features includes: A time series encoder was used to discretize the medication time intervals of multi-department prescriptions and model the continuous medication time window into a 24-dimensional circadian cycle vector. Each time unit was associated with the dosage distribution characteristics of the drug components. A time dependency analysis module based on bidirectional gated recurrent units is constructed to capture the temporal synergistic effect of cross-departmental drug combination, in which the dosing interval period vector and the drug component vector are feature concatenated to form a mixed time series tensor.

[0006] Preferably, in a possible implementation of the first aspect, the quantitative modeling of the drug temporal characteristics adopts the following formula:

[0007] in is the drug time series feature matrix, with dimension , To discretize the day and night time nodes, is the actual time of drug administration, For the drug dosage, is the time attenuation coefficient, is the dose sensitivity coefficient, is the number of drug types; The administration time deviation and dosage characteristics are nonlinearly fused through the formula to generate prescription vector components with time-sensitive characteristics. Its dimensionality expansion mechanism supports multi-scale time alignment of prescriptions across departments.

[0008] Preferably, in a possible implementation of the first aspect, the transfer learning and fine-tuning process includes a knowledge graph dual-channel fusion mechanism: The first channel uses a graph attention network to perform multi-hop reasoning on drug-metabolizing enzyme-target triples to generate a dynamic embedding vector of the drug antagonism relationship; The second channel constructs an adversarial training framework to convert historical conflict cases into adversarial sample injection fine-tuning datasets, where the adversarial sample generator produces synthetic conflict cases by perturbing the drug dosage dimension.

[0009] Preferably, in a possible implementation of the first aspect, the loss function of the adversarial training framework is defined as:

[0010] in is the loss function of the adversarial training framework, is the predicted distribution of synthetic samples, is the expected distribution of the real sample, is the KL divergence calculation, and is the dynamic adjustment coefficient, for dimensional original feature vector, for Dimensional adversarial perturbation vector, is the dimension of the feature vector, is the feature similarity measurement function, Tolerance threshold for counteracting disturbances; By constraining the offset boundaries of adversarial samples in the feature space through the loss function, the model can improve its ability to recognize hidden conflict patterns while maintaining its original clinical effectiveness, and adaptively change according to the proportion of conflict cases in the training set.

[0011] Preferably, in a possible implementation of the first aspect, the collaborative prescription model includes an embedding layer, a knowledge fusion layer, a risk reasoning layer, and a decision output layer, wherein: The embedding layer receives the prescription vector and uses a multi-layer perceptron to perform high-dimensional space mapping to generate a joint embedding representation of drug ingredients and temporal features; The knowledge fusion layer includes a two-channel parameterized module derived from a large medical foundation model through transfer learning and fine-tuning. The first channel dynamically encodes drug metabolism relationships based on a graph attention network, while the second channel enhances the model's sensitivity to dosage anomalies through an adversarial perturbation layer. The risk inference layer uses a multi-head attention mechanism to calculate the correlation between drug incompatibilities across departments and uses a gated recurrent unit to capture the cumulative effect of dosage risk along the medication sequence. The decision output layer integrates the output of the risk reasoning layer with the clinical guideline rule base through logical constraints to generate a prescription recommendation set that includes the probability distribution of conflict types and the optimization basis weight vector.

[0012] Preferably, in a possible implementation of the first aspect, the incompatibility association degree calculation process adopts a multimodal attention weight fusion mechanism, and its calculation formula is defined as:

[0013] in For drugs With drugs The degree of correlation between the incompatibility 、 For drugs and medications The component embedding vectors of 、 are the query matrix and key matrix in the multi-head attention mechanism, is the dimension scaling factor, 、 Indicates drug and medications The metabolic pathway encoding vector, is the activation function calculation, Calculate metabolic pathway similarity, 、 For drugs and medications The drug administration time point, is the time attenuation coefficient, is the multimodal fusion coefficient; The dose risk calculation adopts a time-series gated accumulation algorithm:

[0014] in for The cumulative dose risk value at the moment, for The cumulative dose risk value at the moment, Update the gate for risk, is the current drug dose, is the time interval since the last dose of the drug, is the dose change ladder, 、 is the weight matrix, represents feature vector concatenation, 、 is the bias term, is the Sigmoid activation function, It is an element-wise multiplication operation.

[0015] Preferably, in a possible implementation manner of the first aspect, the decision output layer is configured as follows: The incompatibility correlation matrix output by the risk inference layer and the dose risk time series are input into the clinical guideline rule base for multi-level logical constraint fusion. The clinical guideline rule base contains a drug interaction rule tree and a dose adjustment decision table. The rule engine matches the conflict type with the constraints of the clinical guideline to dynamically generate the probability distribution of the conflict type. At the same time, based on the temporal risk accumulation value output by the risk inference layer, a weighted voting mechanism is used to aggregate the optimization basis of prescriptions from multiple departments. The optimization basis weight vector is constructed by combining the guideline recommendation priority and the historical prescription adjustment frequency. Finally, the conflict type probability distribution and the optimization basis weight vector are encoded into a structured prescription recommendation set.

[0016] Preferably, in a possible implementation of the first aspect, the multi-round collaborative optimization process adopts a consensus decision algorithm: Construct a collaborative filtering mechanism between the doctor preference matrix and the model recommendation matrix, and align their latent feature spaces through singular value decomposition; Calculate the Jacobian matrix of prescription modifications in each optimization iteration, analyze the gradient impact of each drug parameter on the overall risk score, and generate an explanatory report containing key decision paths; The final collaborative report integrates a Gantt chart of medication timing, a blood drug concentration monitoring index curve, and an emergency plan deduction model based on the Markov decision process.

[0017] In a second aspect, the present invention provides a cross-department collaborative prescription generation system driven by a medical big model, the system comprising: The data acquisition module is used to obtain electronic medical records and multi-department prescription data of patients with complex diseases, and to generate prescription vectors by structured extraction of diagnosis conclusions, drug ingredients, drug dosages, and drug time series features; The model building module, based on the medical foundation model, uses AI chips to conduct transfer learning and fine-tuning using a data set containing historical conflict cases and a knowledge graph covering drug metabolism and antagonism relationships to build a collaborative prescription model; The risk reasoning module is used to input prescription vectors into the collaborative prescription model, identify inter-departmental drug compatibility and dosage risks, and generate a prescription recommendation set containing conflict types and optimization basis; The decision-making collaboration module is used to push prescription recommendation sets to the doctor's terminal and dynamically modify the prescription based on feedback. After multiple rounds of collaborative optimization, a collaborative report containing medication time sequence, monitoring indicators and emergency plans is generated.

[0018] The beneficial effect of the present invention is that by using AI chips for efficient data processing and model calculations, a cross-department collaborative prescription suggestion set can be quickly generated, greatly improving the efficiency and accuracy of prescription generation.

[0019] At the same time, it can also conduct transfer learning and fine-tuning based on historical conflict cases and knowledge graphs of drug metabolism and antagonism relationships to build a more accurate collaborative prescription model, effectively avoiding drug incompatibility and dosage risks.

[0020] In addition, by pushing a set of prescription recommendations to the doctor's terminal and performing dynamic corrections and multiple rounds of collaborative optimization based on feedback, the system ultimately generates a collaborative report that includes medication timing, monitoring indicators, and emergency plans, providing doctors with more comprehensive and scientific decision-making support.

[0021] Therefore, the implementation of the present invention can significantly improve the safety and effectiveness of multi-departmental combined medication for complex diseases, and has important clinical significance and application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 A flowchart of a cross-department collaborative prescription generation method driven by a medical big model is provided for this application.

[0024] Figure 2 A structural diagram of a cross-department collaborative prescription generation system driven by a large medical model is provided for this application.

[0025] Explanation of the accompanying figures: 1-data acquisition module, 2-model building module, 3-risk reasoning module, 4-decision-making collaboration module. DETAILED DESCRIPTION

[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0027] Example 1: Figure 1 As shown, the present invention provides a method for generating cross-department collaborative prescriptions driven by a large medical model, comprising: Obtain electronic medical records and multi-department prescription data for patients with complex diseases, and generate prescription vectors by structured extraction of diagnostic conclusions, drug ingredients, drug dosages, and drug time series features.

[0028] In this example, multi-source heterogeneous data is first acquired through a hospital information system interface. This includes electronic medical records for patients with complex diseases and prescription data from all departments, including the cardiovascular, endocrinology, and oncology departments. Complex diseases refer to clinical conditions involving multiple organ system lesions that require multidisciplinary treatment. A multimodal feature extraction framework based on medical entity recognition is used to process the unstructured text and discrete time record features present in the raw data. For the medication time series in the prescription data, a time series encoder incorporating pharmacokinetic properties is used to discretize the continuous dosing time windows of each department's prescriptions according to the circadian rhythm: the 24-hour cycle is divided into 24 equal time units, each of which is associated with the drug dosage distribution characteristics within the corresponding time period. In this process, a multi-scale time alignment module based on a dynamic time warping algorithm is used to address the challenge of temporal alignment of prescriptions across departments. By calculating the minimum curvature path between different prescription timestamps, the temporal deviation caused by the granularity of prescription time records between departments is eliminated.

[0029] In the quantitative modeling of drug time series characteristics, the quantitative modeling of drug time series characteristics adopts the formula First, the medical natural language processing model is used to extract key information such as the drug name, dosage unit, and administration time in the prescription text, and then the actual administration time is converted to the actual administration time. Mapping to the nearest discretized daytime node . Set differentiated time decay coefficients for drug categories with different metabolic characteristics :For fast-acting drugs with short half-lives Take the larger value (such as insulin ) to enhance time deviation sensitivity; for long-acting sustained-release drugs, a smaller Values ​​(such as metformin ) Weakening time strictness. Dose sensitivity coefficient According to the dynamic adjustment of drug therapeutic index, drugs with narrow therapeutic window are given greater Values ​​(such as warfarin ), while drugs with a wider safety margin confer a smaller Values ​​(such as vitamins ). The formula generated dimensional drug time series feature matrix , not only retains the nonlinear relationship between drug dosage and time deviation, but also realizes multi-scale alignment of cross-department prescriptions in the circadian cycle dimension through the matrix expansion mechanism.

[0030] In order to further improve the expressive power of temporal features, a temporal dependency analysis network consisting of three stacked GRU layers is constructed, and a temporal attention mechanism is introduced in the hidden layer. Specifically, the dosing interval period vector and the drug component vector are concatenated to form a vector with a dimension of A mixed time series tensor (d is the embedding dimension) is fed into a Bi-GRU network for bidirectional time series modeling. During forward propagation, the network captures the cumulative metabolic effects of combined drug use; backward propagation models the forward influencing factors of drug antagonism. The network output is connected to a temporal self-attention module to calculate the association weights between different time units, focusing on strengthening the feature representation of critical time periods with the risk of drug-effect overlap.

[0031] To address the issue of overlapping prescription times in complex cases, this embodiment employs a conflicting time window detection mechanism: when prescriptions from different departments include two or more drugs within the same time unit, a time replanning program based on a particle swarm optimization algorithm is initiated. This program uses minimizing the total risk value as the objective function and, in combination with drug half-life parameters, intelligently shifts the dosing time while satisfying efficacy constraints. For example, for aspirin and clopidogrel that need to be taken at the same time, the dosing interval between the two drugs is dynamically adjusted to the optimized time window with the lowest risk of metabolic conflict based on the patient's CYP2C19 genotype test results.

[0032] To ensure the reliability of feature extraction, this embodiment establishes a three-level verification mechanism: the first level uses rule-engine-based outlier detection to filter out maximum dose records that exceed the pharmacopoeia standards; the second level uses knowledge graph association verification to detect drug combinations with metabolic pathway conflicts; the third level uses a generative adversarial network to build a feature reconstruction model and perform reverse engineering verification on the extracted prescription vectors.

[0033] Based on the medical basic model, AI chips are used to perform transfer learning and fine-tuning using data sets containing historical conflict cases and knowledge graphs covering drug metabolism and antagonism relationships to build a collaborative prescription model.

[0034] In this embodiment, the transfer learning and fine-tuning process utilizes a dual-channel fusion architecture of knowledge graphs. By combining dynamic embedding with adversarial perturbations, this approach achieves dual optimization for drug metabolism relationship modeling and hidden risk identification. Specifically, an AI chip (in this embodiment, the NVIDIA A100) is used to build a dual-channel parameterized module, comprising a graph attention network and an adversarial training framework, based on the architecture of a large medical foundation model (in this embodiment, the PubMedBERT pre-trained model).

[0035] The first channel performs multi-hop reasoning on the drug metabolism pathway and uses a three-layer graph attention network to process the drug-metabolizing enzyme-target triple relationship. The node feature matrix initialization formula is:

[0036] in is the initial node feature matrix, It is the molecular fingerprint of the drug. is the enzyme activity vector, To embed the amino acid sequence of the target protein, is a vector concatenation operation. In the message passing process, Layer Node The updating formula of the eigenvector is:

[0037] In the formula For the Layer Node and nodes Edge weight coefficient based on multi-head attention, For nodes The neighbor set of node For nodes Neighbor nodes of For the The trainable weight matrix of the layer, is the LeakyReLU activation function, which is obtained by calculating the joint similarity of the topological distance of the drug metabolism pathway and the free energy of the biochemical reaction. After three layers of graph convolution, the output dynamic embedding vector , which includes a multi-scale representation of drug-antagonism relationships.

[0038] The second channel builds an adversarial training framework to enhance the robustness of the model. It converts historical conflict cases into adversarial examples and injects them into the fine-tuning dataset. The adversarial example generator generates synthetic conflict cases by perturbing the drug dosage dimension. The core of the design lies in the adversarial example generator. Using the conditional generative adversarial network architecture, the generator G receives the original drug dosage vector and liver and kidney function indicators of patients , generate the perturbation vector through a five-layer residual network The key perturbation dimension selection strategy is:

[0039] in is the risk loss function, is the total number of drug types, Indicates the The dose of the drug is determined by applying adversarial perturbations to the dose dimension with the largest risk loss gradient. The generated samples must meet the following constraints:

[0040]

[0041] is the perturbed eigenvector, is the original eigenvector, is the pharmacokinetic distribution model, where is the feature space disturbance threshold, is the upper limit of the pharmacokinetic distribution difference. The adversarial training loss function is defined as:

[0042] In the formula is the loss function of the adversarial training framework, is the predicted distribution of synthetic samples, is the expected distribution of the real sample, is the KL divergence calculation, and is the dynamic adjustment coefficient, , for dimensional original feature vector, for Dimensional adversarial perturbation vector, is the dimension of the feature vector, is the feature similarity measurement function, and this embodiment adopts , is the tolerance threshold for disturbance resistance.

[0043] The collaborative prescription model includes an embedding layer, a knowledge fusion layer, a risk reasoning layer, and a decision output layer, among which: The embedding layer receives the prescription vector and uses a multi-layer perceptron for high-dimensional space mapping. It first receives the prescription vector including the diagnosis conclusion, drug ingredients, drug dosage and drug timing characteristics, then inputs the prescription vector into a three-layer fully connected network, and finally uses the residual connection and Dropout mechanism to generate a joint embedding representation of drug ingredients and timing characteristics.

[0044] In the design of the knowledge fusion layer, a cross-modal attention mechanism is used to achieve spatial alignment between text medical record features and knowledge graph embedding. Specifically, the temporal features extracted from the electronic medical record by Bi-LSTM are Embedded with knowledge graph Perform inter-modal attention calculation:

[0045] The query matrix , bond matrix , value matrix , 、 、 is the trainable projection matrix, is the feature dimension, and the fusion feature is generated through the three-head attention mechanism .

[0046] The core of the risk reasoning layer lies in the calculation of incompatibility correlation and time-series dose risk assessment. The incompatibility correlation adopts the multimodal attention fusion formula:

[0047] in For drugs With drugs The degree of correlation between the incompatibility 、 For drugs and medications The component embedding vectors of 、 are the query matrix and key matrix in the multi-head attention mechanism, is the dimension scaling factor, 、 Indicates drug and medications The metabolic pathway encoding vector, is the activation function calculation, Calculate metabolic pathway similarity, 、 For drugs and medications The drug administration time point, is the time attenuation coefficient. In this embodiment, , is the multimodal fusion coefficient.

[0048] Dose risk assessment uses an improved sequential gating accumulation model:

[0049] in for The cumulative dose risk value at the moment, for The cumulative dose risk value at the moment, Update the gate for risk, is the current drug dose, is the time interval since the last dose of the drug, is the dose change ladder, 、 is the weight matrix, represents feature vector concatenation, 、 is the bias term, is the Sigmoid activation function, It is an element-wise multiplication operation.

[0050] The decision output layer integrates the clinical guideline rule base and risk reasoning results, and adopts a multi-level logical constraint fusion mechanism. First, a drug interaction rule tree is constructed, and its node conditions include: CYP450 metabolic competition rule: If the inhibition coefficient of drug A's metabolic enzyme is the same as drug B's, , it is marked as high risk.

[0051] Plasma protein exchange rule: An alarm is triggered when the protein binding rate of two drugs is greater than 95% and the change in free drug concentration is greater than 30%.

[0052] QTc interval prolongation synergistic effect: if multiple drugs are cumulative , a red alert is generated.

[0053] The dose adjustment decision table is constructed based on a multi-dimensional matching mechanism between the patient's individual metabolic parameters and the real-time risk accumulation value, dynamically associating key indicators such as creatinine clearance rate and blood drug concentration exceeding the standard ratio with the risk level to form a hierarchical and progressive dose adjustment strategy. ), the system automatically triggers the metabolic compensation algorithm, dynamically calculates the dose attenuation coefficient based on the drug half-life and plasma protein binding rate, and generates individualized adjustment instructions including a gradient reduction plan and an enhanced monitoring period.

[0054] The rule engine uses the Rete algorithm for fast pattern matching, and the matching results are weightedly fused with the correlation matrix output by the model. The weight is determined by the frequency of historical prescription adjustments and the level of guideline evidence.

[0055] After the collaborative prescription model obtains the cumulative value of temporal risk through the risk inference layer, it starts the multi-dimensional optimization based on the aggregation mechanism. The specific implementation process includes: first, building a ternary weighted voting system, assigning initial weights of 0.4, 0.3, and 0.3 to the guideline recommendation priority, historical prescription adjustment frequency, and temporal risk sensitivity coefficient, respectively. The improved entropy weight method is used to dynamically adjust the weight distribution, and the calculation formula is:

[0056]

[0057] In the formula Indicates the The information entropy of the indicator, For the Sample No. By calculating the information entropy difference of the three under the current case characteristics in real time, the weight distribution is dynamically modified to ensure that the temporal risk weight can be increased to above 0.5 in high-risk scenarios. Then a multi-department prescription optimization matrix is ​​established. Each row contains the drug ID, conflict type, guideline recommendation, and historical adjustment trajectory feature vector. A multi-head attention mechanism is used to calculate the optimal correlation between drugs across departments. When the correlation threshold exceeds 0.7, a collaborative optimization process is triggered to integrate the scattered department-level recommendations into a global optimal solution.

[0058] The resulting prescription suggestion set includes: Conflict type probability distribution: ; The optimization is based on the weight vector: ; Timing adjustment plan: optimization recommendations for dosing intervals based on the risk accumulation curve.

[0059] in is the metabolic conflict probability, is the probability of synergistic toxicity, is the cumulative toxicity probability, Recommended weights for clinical guidelines, Adjust frequency weights for history, Predict confidence weights for the model.

[0060] In addition, the system has a built-in feedback loop mechanism, and the doctor's correction operations on the recommendation set will be recorded and used to update the adversarial training sample library. After each prescription optimization iteration, the model calculates the Jacobian matrix Analyze parameter sensitivity and dynamically adjust the number of attention heads in the knowledge fusion layer to ensure continuous model optimization.

[0061] The prescription vector is input into the collaborative prescription model to identify drug incompatibilities and dosage risks between departments, and generate a prescription recommendation set containing conflict types and optimization basis.

[0062] In this embodiment, the prescription vector is loaded into the collaborative prescription model inference pipeline for AI chip accelerated processing through a distributed computing engine. The model first performs a high-dimensional spatial mapping of the drug components and time series features through the embedding layer to obtain a joint embedding representation of the drug components and time series features. The knowledge fusion layer simultaneously activates the dual-channel processing mechanism. The risk reasoning layer uses a spatiotemporal joint modeling strategy to analyze potential risks. For the identification of incompatibility taboos, the model calculates the multimodal correlation of each pair of cross-departmental drugs, and comprehensively evaluates the influencing factors of drug molecular structure similarity, metabolic pathway intersection probability, and time-series dosing interval. For drug combinations with the same enzyme metabolic substrates, the model dynamically adjusts the risk threshold based on the patient's liver function test indicators, and generates a high-risk warning when the metabolic competition coefficient exceeds the individualized safety range. In terms of dose risk assessment, the model constructs a time-dependent gated cumulative network to track the cumulative effect of drug concentrations in different time windows, paying special attention to the blood drug concentration change curves of drugs with narrow therapeutic windows. When the cumulative risk value exceeds the dynamically adjusted safety threshold, a dose correction recommendation is triggered.

[0063] The decision output layer conducts multi-level logical verification of the risk reasoning results with the clinical guideline rule base. The rule engine matches the contraindications in the drug interaction knowledge base and performs evidence-weighted correction on the preliminary risk score output by the model. For new drug combinations or cases that lack clear guideline basis, the analogy reasoning mechanism based on historical prescription data is activated to retrieve medication adjustment plans for similar patient groups as an auxiliary decision-making basis. The final generated prescription recommendation set uses a structured data format, which includes the conflict type, optimization basis, and specific timing adjustment plans. Each recommendation item is accompanied by a traceable decision path description, including the key risk factors triggered, the metabolic enzyme activity parameters involved, and the similarity score of historical conflict cases, providing transparent decision support.

[0064] A set of prescription recommendations is pushed to the doctor's terminal, and the prescription is dynamically revised based on feedback. After multiple rounds of collaborative optimization, a collaborative report containing medication schedules, monitoring indicators and emergency plans is generated.

[0065] In this embodiment, the system first establishes a collaborative filtering framework of the doctor preference matrix and the model recommendation matrix, where the doctor preference matrix is ​​constructed based on historical prescription adjustment records and real-time feedback data, and uses unique hot encoding to quantify the characteristics of departmental expertise, medication habits, and risk tolerance; the model recommendation matrix integrates the compatibility correlation and dose risk accumulation value of the risk reasoning layer, and represents the confidence scores of different optimization paths through a three-dimensional tensor structure. In order to achieve the alignment of the potential feature spaces of the two, the truncated singular value decomposition algorithm is used to reduce the dimensionality of the high-dimensional matrix, retaining the first k singular values ​​to capture the core decision-making pattern. The specific decomposition process is defined as:

[0066]

[0067] in 、 is the left singular vector matrix, containing the row space features of the doctor / model, 、 is a diagonal matrix that stores singular values, 、 is the transpose of the right singular vector matrix, containing the column space characteristics of the doctor / model, by calculating two right singular matrices and The cosine similarity matrix of the model is used to identify potential decision factors with strong correlation and establish feature mapping relationships across matrices. When there is a significant difference between the doctor's feedback and the model recommendation, the system activates the feature space recalibration module and dynamically adjusts the singular value truncation parameter. To optimize the information retention ratio and ensure efficient alignment while retaining more than 95% of the decision-making features.

[0068] In each round of optimization iteration, the system analyzes the gradient of the effect of drug parameters on the overall risk through the Jacobian matrix of prescription modification. In specific implementation, a multivariate risk scoring function is constructed. ,in Indicates the drug dosage, Indicates the Dosing time nodes. Calculate the total differential Jacobian matrix:

[0069] in For the risk scoring function, automatic differentiation technology is used to realize gradient calculation, focusing on monitoring key parameters with high absolute value gradients. Parameters (this example sets the threshold ), the system automatically generates a parameter sensitivity analysis report, revealing the specific pathways by which that parameter influences overall risk through mechanisms such as metabolic pathway competition, plasma protein displacement, or QT interval prolongation. The report utilizes causal diagram visualization technology to demonstrate the transmission relationships and impact weights between key decision nodes, and provides recommended adjustment ranges for each high-risk parameter based on pharmacokinetic models.

[0070] During the optimization process, the system integrates a Markov decision process to construct an emergency plan deduction model. The state space S is defined as a 128-dimensional feature vector containing real-time patient physiological indicators, blood drug concentration levels, and adverse events. The action space A covers nine clinical intervention measures, including dose adjustment, drug timing optimization, and alternative drug selection. The reward function R is designed as a multidimensional composite function:

[0071] in represents the change in risk score, is the efficacy maintenance coefficient, is the economic cost factor, weight coefficient , , Dynamic adjustments are made based on medical insurance policies. A value iteration algorithm is used to solve the optimal strategy, resulting in a set of emergency plans with a hierarchical response mechanism. This plan specifically addresses sudden adverse reactions, establishing a three-tiered response mechanism: Level 1 responds by adjusting the dosage of non-critical medications to rapidly control risk; Level 2 initiates an alternative medication switching process; and Level 3 triggers extreme measures such as multi-departmental consultation and blood purification.

[0072] The resulting collaborative report utilizes a multimodal presentation format: a medication timeline Gantt chart integrates departmental collaboration information, color-coding to differentiate between drugs with different metabolic characteristics and noting the optimal dosing window for time-sensitive medications; a dynamic correlation risk prediction model with monitoring indicator curves automatically triggers warnings when blood drug concentrations exceed individualized safety thresholds; and an emergency plan simulation model provides an interactive simulation interface, allowing physicians to observe the expected effects of different interventions through parameter adjustments. Differential privacy technology is used to desensitize sensitive medical data during the report generation phase, ensuring that key decision-making features are preserved while meeting medical data security standards.

[0073] The system establishes a closed-loop optimization mechanism, feeding revised prescription data from each iteration back to the adversarial training sample library, continuously updating the collaborative prescription model through incremental learning. In particular, when a new drug conflict pattern is detected, the system automatically initiates a knowledge graph expansion program. Based on molecular structure similarity analysis and metabolic pathway prediction models, it derives potential interactions between unlabeled drugs and incorporates them into the knowledge base after expert review.

[0074] Example 2: Figure 2As shown, the present invention provides a cross-department collaborative prescription generation system driven by a medical big model, comprising: Data acquisition module 1 is used to obtain electronic medical records and multi-department prescription data of patients with complex diseases, and to generate prescription vectors by structured extraction of diagnosis conclusions, drug ingredients, drug dosages, and drug time series features.

[0075] Model building module 2, based on the medical basic model, uses AI chips to use data sets containing historical conflict cases and knowledge graphs covering drug metabolism and antagonism relationships for transfer learning and fine-tuning to build a collaborative prescription model.

[0076] Risk reasoning module 3 is used to input prescription vectors into the collaborative prescription model, identify inter-departmental drug compatibility taboos and dosage risks, and generate a prescription recommendation set containing conflict types and optimization basis.

[0077] The decision-making collaborative module 4 is used to push a set of prescription recommendations to the doctor's terminal and dynamically modify the prescription based on feedback. After multiple rounds of collaborative optimization, a collaborative report containing medication time sequence, monitoring indicators and emergency plans is generated.

[0078] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A cross-department collaborative prescription generation method driven by a large medical model, characterized by: The method comprises: Obtain electronic medical records and multi-department prescription data for patients with complex diseases, and generate prescription vectors by structured extraction of diagnosis conclusions, drug ingredients, drug dosages, and drug time series features; Based on a large medical foundation model, AI chips were used to conduct transfer learning and fine-tuning using a dataset containing historical conflict cases and a knowledge graph covering drug metabolism and antagonism relationships to build a collaborative prescription model. Input prescription vectors into the collaborative prescription model to identify inter-departmental drug compatibility and dosage risks, and generate a prescription recommendation set containing conflict types and optimization basis; A set of prescription recommendations is pushed to the doctor's terminal, and the prescription is dynamically revised based on feedback. After multiple rounds of collaborative optimization, a collaborative report containing medication schedules, monitoring indicators and emergency plans is generated.

2. A method for generating cross-departmental collaborative prescriptions driven by a medical big model as claimed in claim 1, characterized in that: Structured extraction of drug time series features includes: A time series encoder was used to discretize the medication time intervals of multi-department prescriptions and model the continuous medication time window into a 24-dimensional circadian cycle vector. Each time unit was associated with the dosage distribution characteristics of the drug components. A time dependency analysis module based on bidirectional gated recurrent units is constructed to capture the temporal synergistic effect of cross-departmental drug combination, in which the dosing interval period vector and the drug component vector are feature concatenated to form a mixed time series tensor.

3. A method for generating cross-departmental collaborative prescriptions driven by a medical big model as described in claim 2, characterized in that: The quantitative modeling of the drug temporal characteristics adopts the following formula: in is the drug time series feature matrix, with dimension , To discretize the day and night time nodes, is the actual time of drug administration, For the drug dosage, is the time attenuation coefficient, is the dose sensitivity coefficient, is the number of drug types; The administration time deviation and dosage characteristics are nonlinearly fused through the formula to generate prescription vector components with time-sensitive characteristics. Its dimensionality expansion mechanism supports multi-scale time alignment of prescriptions across departments.

4. The method for generating cross-departmental collaborative prescriptions driven by a medical big model as claimed in claim 1, characterized in that: The transfer learning and fine-tuning process includes a knowledge graph dual-channel fusion mechanism: The first channel uses a graph attention network to perform multi-hop reasoning on drug-metabolizing enzyme-target triples to generate a dynamic embedding vector of the drug antagonism relationship; The second channel constructs an adversarial training framework to convert historical conflict cases into adversarial sample injection fine-tuning datasets, where the adversarial sample generator produces synthetic conflict cases by perturbing the drug dosage dimension.

5. A method for generating cross-department collaborative prescriptions driven by a medical big model as claimed in claim 4, characterized in that: The loss function of the adversarial training framework is defined as: in is the loss function of the adversarial training framework, is the predicted distribution of synthetic samples, is the expected distribution of the real sample, is the KL divergence calculation, and is the dynamic adjustment coefficient, for dimensional original feature vector, for Dimensional adversarial perturbation vector, is the dimension of the feature vector, is the feature similarity measurement function, Tolerance threshold for counteracting disturbances; By constraining the offset boundaries of adversarial samples in the feature space through the loss function, the model can improve its ability to recognize hidden conflict patterns while maintaining its original clinical effectiveness, and adaptively change according to the proportion of conflict cases in the training set.

6. A method for generating cross-department collaborative prescriptions driven by a medical big model as claimed in claim 5, characterized in that: The collaborative prescription model includes an embedding layer, a knowledge fusion layer, a risk reasoning layer, and a decision output layer, wherein: The embedding layer receives the prescription vector and uses a multi-layer perceptron to perform high-dimensional space mapping to generate a joint embedding representation of drug ingredients and temporal features; The knowledge fusion layer includes a two-channel parameterized module derived from a large medical foundation model through transfer learning and fine-tuning. The first channel dynamically encodes drug metabolism relationships based on a graph attention network, while the second channel enhances the model's sensitivity to dosage anomalies through an adversarial perturbation layer. The risk inference layer uses a multi-head attention mechanism to calculate the correlation between drug incompatibilities across departments and uses a gated recurrent unit to capture the cumulative effect of dosage risk along the medication sequence. The decision output layer integrates the output of the risk reasoning layer with the clinical guideline rule base through logical constraints to generate a prescription recommendation set that includes the probability distribution of conflict types and the optimization basis weight vector.

7. A method for generating cross-department collaborative prescriptions driven by a medical big model as claimed in claim 6, characterized in that: The incompatibility association calculation process adopts a multimodal attention weight fusion mechanism, and its calculation formula is defined as: in For drugs With drugs The degree of correlation between the incompatibility 、 For drugs and medications The component embedding vectors of 、 are the query matrix and key matrix in the multi-head attention mechanism, is the dimension scaling factor, 、 Indicates drug and medications The metabolic pathway encoding vector, is the activation function calculation, Calculate metabolic pathway similarity, 、 For drugs and medications The drug administration time point, is the time attenuation coefficient, is the multimodal fusion coefficient; The dose risk calculation adopts a time-series gated accumulation algorithm: in for The cumulative dose risk value at the moment, for The cumulative dose risk value at the moment, Update the gate for risk, is the current drug dose, is the time interval since the last dose of the drug, is the dose change ladder, 、 is the weight matrix, represents feature vector concatenation, 、 is the bias term, is the Sigmoid activation function, It is an element-wise multiplication operation.

8. The method for generating cross-department collaborative prescriptions driven by a medical big model as claimed in claim 6, characterized in that: The decision output layer is configured as follows: The incompatibility correlation matrix output by the risk inference layer and the dose risk time series are input into the clinical guideline rule base for multi-level logical constraint fusion. The clinical guideline rule base contains a drug interaction rule tree and a dose adjustment decision table. The rule engine matches the conflict type with the constraints of the clinical guideline to dynamically generate the probability distribution of the conflict type. At the same time, based on the temporal risk accumulation value output by the risk inference layer, a weighted voting mechanism is used to aggregate the optimization basis of prescriptions from multiple departments. The optimization basis weight vector is constructed by combining the guideline recommendation priority and the historical prescription adjustment frequency. Finally, the conflict type probability distribution and the optimization basis weight vector are encoded into a structured prescription recommendation set.

9. The method for generating cross-department collaborative prescriptions driven by a medical big model as claimed in claim 1, characterized in that: The multi-round collaborative optimization process adopts a consensus decision-making algorithm: Construct a collaborative filtering mechanism between the doctor preference matrix and the model recommendation matrix, and align their latent feature spaces through singular value decomposition; Calculate the Jacobian matrix of prescription modifications in each optimization iteration, analyze the gradient impact of each drug parameter on the overall risk score, and generate an explanatory report containing key decision paths; The final collaborative report integrates a Gantt chart of medication timing, a blood drug concentration monitoring index curve, and an emergency plan deduction model based on the Markov decision process.

10. A cross-department collaborative prescription generation system driven by a large medical model, characterized by: The system comprises: The data acquisition module is used to obtain electronic medical records and multi-department prescription data of patients with complex diseases, and to generate prescription vectors by structured extraction of diagnosis conclusions, drug ingredients, drug dosages, and drug time series features; The model building module, based on the medical foundation model, uses AI chips to conduct transfer learning and fine-tuning using a data set containing historical conflict cases and a knowledge graph covering drug metabolism and antagonism relationships to build a collaborative prescription model; The risk reasoning module is used to input prescription vectors into the collaborative prescription model, identify inter-departmental drug compatibility and dosage risks, and generate a prescription recommendation set containing conflict types and optimization basis; The decision-making collaboration module is used to push prescription recommendation sets to the doctor's terminal and dynamically modify the prescription based on feedback. After multiple rounds of collaborative optimization, a collaborative report containing medication time sequence, monitoring indicators and emergency plans is generated.

Citation Information

Cited By

  • Medical record data processing method and system based on large medical model

    CN120977606A

  • Intelligent compatibility generation method of traditional Chinese medicine tea based on knowledge graph

    CN121034563A

  • Cerebral hemorrhage perioperative period medication scheme intelligent recommendation method and system

    CN121789887A