A doctor-assisted prescription intelligent recommendation system based on patient diagnosis and treatment data

CN122800183APending Publication Date: 2026-09-22HUNAN CHUNSO VIENTIANE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610741015.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

现有系统仅基于可观测指标(如血肌酐)进行时间序列预测,缺乏从数据残差中反推出早期器官灌注不足或亚临床炎症反应等隐匿性病理状态的能力,从而低估了药物经肾排泄的毒性风险,导致后续出现不可逆的肾损伤

Benefits of technology

本发明通过数据采集模块实时采集包括生命体征指标时序数据和实验室指标时序数据的诊疗数据,并检测其中的跳跃性不连续变化,当任一指标跨越针对该指标预先设定的病理临界值时输出突变事件标志及对应的突变参数。该机制能够及时捕捉病情非线性突变拐点,相较于依赖平滑变化假设的现有系统,避免了因滞后采样导致的干预窗口错失,将响应延迟从分钟级降低至秒级。同时,突变类型和幅度为后续模块提供了差异化处理依据,例如血压骤降与血氧骤跌分别触发不同的权重调整策略。本发明显著提升了对急危重症患者病情骤变的响应时效,确保推荐处方与实际病情演化节点匹配,降低因推荐滞后造成的可预防性不良事件风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122800183A_ABST
    Figure CN122800183A_ABST
Patent Text Reader

Abstract

This invention discloses a doctor-assisted prescription intelligent recommendation system based on patient diagnosis and treatment data, specifically relating to the field of medical information decision-making technology. It collects patient diagnosis and treatment data, detects abrupt changes in indicators, and outputs abrupt event marker. By inferring latent variables from the data, it obtains the patient's complete latent state vector. Based on this, it simulates the chain effect of multiple prescriptions at future time steps, calculates long-term harm scores, and selects the optimal prescription. Combining the abrupt event, the latent state vector, and the optimal prescription, it uses real-time feedback errors to adjust strategy parameters online, generating the optimal recommended prescription. Finally, it compares the optimal prescription with historical recommendation sequences, calculates jitter penalty signals for smoothing constraints, and outputs the final recommended prescription. This invention improves the timeliness of response to sudden changes in patient condition through mutation detection, identifies hidden pathological risks through latent variable mining, predicts the harm of long causal chains through a closed-loop mechanism and adaptively adjusts online, while smoothly outputting prescriptions, achieving safe, timely, and stable dynamic recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information decision-making technology, and more specifically, to a doctor-assisted intelligent prescription recommendation system based on patient diagnosis and treatment data. Background Technology

[0002] In clinical practice, when doctors prescribe medications for patients with multiple coexisting conditions and requiring multiple medications, they typically need to comprehensively analyze a large amount of dynamically changing diagnostic and treatment data, including time-series data of vital signs (such as blood pressure, heart rate, respiratory rate, and body temperature) and time-series data of laboratory indicators (such as serum creatinine, lactate, white blood cell count, and procalcitonin). Faced with information overload and cognitive burden, researchers have proposed various intelligent recommendation systems to assist doctors in improving decision-making efficiency and reducing the risk of medication errors. Common implementation methods in existing technologies include: expert systems based on static clinical rule bases, prescription prediction models based on supervised machine learning (such as random forests and support vector machines), and dynamic recommendation methods based on time series modeling (such as recurrent neural networks and long short-term memory networks). These systems typically assume that changes in the patient's condition are smooth, continuous, and predictable, and learn the correlation between the patient's state and medication regimen through a finite-length time window (e.g., data from the past 1 to 6 hours) to output candidate prescriptions.

[0003] However, in real-world clinical scenarios, especially for high-risk patients in intensive care units or emergency departments, the evolution of their condition often exhibits significant non-linear, abrupt changes. For example, patients with septic shock may maintain normal blood pressure during the compensatory phase of tissue hypoperfusion, but once decompensation occurs, their blood pressure can plummet from normal to shock levels within minutes. This abrupt, discontinuous change exceeds the adaptability of existing smooth-change models. Existing time-series models, relying on gradient descent training and finite time-window update mechanisms, often require at least one full sampling period to incorporate new information into the hidden state in the face of such abrupt changes, resulting in recommendation lag and missed optimal intervention opportunities.

[0004] Taking early acute kidney injury as an example, before serum creatinine rises significantly, the patient's urine output has already begun to decrease or renal tubular injury markers have changed, but these hidden variables are not directly recorded in routine clinical data. Existing systems only make time-series predictions based on observable indicators (such as serum creatinine), lacking the ability to deduce hidden pathological states such as early organ insufficiency or subclinical inflammatory responses from data residuals. This leads to an underestimation of the toxic risks of drugs excreted through the kidneys, resulting in subsequent irreversible kidney damage.

[0005] Furthermore, many prescription recommendation systems only focus on improving organ function within a short time window, neglecting the chain effects of drugs across multiple time steps through metabolic pathways, organ interactions, and pharmacokinetics. For example, recommending vasoactive drugs to raise blood pressure to address hypotension may cause renal vasoconstriction, reduce glomerular filtration rate, and thus slow the clearance of drugs excreted through the kidneys, leading to a cumulative increase in blood drug concentration and ultimately inducing renal tubular necrosis and metabolic disorders. Most existing technologies use fixed-field cost functions or simple linear weighting to balance short-term efficacy with long-term risks, making it difficult to effectively predict and avoid chain reactions spanning multiple time steps. Therefore, this invention proposes a physician-assisted intelligent prescription recommendation system based on patient medical data to address the aforementioned problems. Summary of the Invention

[0006] To achieve the above objectives, the present invention provides the following technical solution: A doctor-assisted prescription intelligent recommendation system based on patient diagnosis and treatment data includes: The data acquisition module is used to collect patients' diagnosis and treatment data in real time. The diagnosis and treatment data includes time series data of vital signs indicators and laboratory indicators. It detects abrupt and discontinuous changes in the time series data of vital signs indicators and laboratory indicators. That is, when any indicator crosses the pathological threshold value set for that indicator, it outputs a mutation event flag and the corresponding mutation parameters. The mutation parameters include mutation type, mutation occurrence time point and mutation magnitude. The latent variable mining module is used to infer pathological state latent variables that are not directly observed from the diagnosis and treatment data based on mutation event markers and diagnosis and treatment data, through causal inference and residual analysis, and output the complete latent state vector of the patient containing pathological state latent variables. The hazard projection module is used to simulate the chain effect of multiple candidate recommended prescriptions in multiple consecutive time steps in the future based on the patient's complete hidden state vector. It calculates the long-term hazard score of each candidate recommended prescription through counterfactual comparison, and then selects the optimal set of recommended actions from multiple candidate recommended prescriptions based on the long-term hazard score. The prescription adjustment module is used to adjust the strategy parameters online based on the mutation event flag, the patient's complete hidden state vector, and the preferred set of recommended actions, combined with the real-time feedback error and new changes in the patient's condition at the current moment, and generate the optimal recommended prescription for the current moment based on the adjusted strategy parameters. The prescription correction module is used to apply time-series smoothing constraints to the optimal recommended prescription and the historical recommendation sequence, calculate the jitter penalty signal between the optimal recommended prescription and the most recent recommended prescription in the historical recommendation sequence. The jitter penalty signal is used to prevent the change in the recommendation result at adjacent time points from exceeding a preset jitter threshold. Based on the jitter penalty signal, the optimal recommended prescription is corrected, and the smoothed final recommended prescription is output.

[0007] In a preferred embodiment, the pathological threshold values ​​are multiple values ​​preset for different vital signs or laboratory indicators, and each value corresponds to a mutation trigger threshold for an indicator.

[0008] In a preferred embodiment, the output logic of the patient's complete hidden state vector is as follows: Using mutation event markers and clinical data as input, for multiple observed variables actually recorded in the clinical data, the residual between the actual measured value and the predicted value extrapolated from historical values ​​at two consecutive time points is calculated for each observed variable with data records. The residual is calculated as follows: assuming the actual measured value at the current time point is the current value, the predicted value is obtained by adding the value at the previous time point to the product of the rate of change per unit time and the previous moment, and the residual is obtained by subtracting the predicted value from the current value and taking the absolute value. If there is no data record for a certain observed variable at the corresponding time point, the residual calculation for that observed variable is skipped. A physiological fluctuation threshold is preset for each observed variable. When the residual of at least one observed variable with data records exceeds the corresponding preset physiological fluctuation threshold, the value of a latent variable is calculated using a causal inversion formula. The causal inversion formula is as follows: multiply the residuals of each observed variable with residuals by a pre-calibrated causal weight coefficient and sum them up, then add a random noise term that follows a normal distribution to obtain the value of the latent variable. The values ​​of the latent variables are concatenated with the current values ​​of all observed variables with existing data records to output the patient's complete latent state vector.

[0009] In a preferred embodiment, the long-term hazard score is calculated as follows: Using the multi-step cost function framework in predictive control, each candidate recommended prescription is regarded as a control action, and the patient's organ function status is regarded as the controlled object. Within a future preset time window, the window is divided into multiple discrete time steps. In each time step, the drug toxicity cost, the deviation cost of organ function deviating from the normal range, and the cross cost generated by drug interactions are calculated respectively. The drug toxicity cost is calculated using a nonlinear exponential decay function based on the drug half-life and cumulative dose. The deviation cost is calculated by converting organ function indicators into deviation degree using a fuzzy membership function. The cross cost is calculated using graph convolution based on drug metabolism pathways. The above three costs at each time step are fused according to a dynamic weight coefficient to obtain the fused cost of that time step. This dynamic weight coefficient is adjusted in real time according to the mutation event flag of the current time step. The fusion costs at each time step are discounted and summed using a discount factor to obtain a long-term hazard score.

[0010] In a preferred embodiment, the dynamic weighting coefficient is adjusted as follows: when the mutation event flag indicates a jump or discontinuous change, the weight of the drug toxicity cost is increased to a first preset value, while the weight of the deviation cost is decreased to a second preset value; when there is no mutation event flag, the default weighting ratio is maintained. The fuzzy membership function adopts a trapezoidal distribution, mapping the measured values ​​of organ function indicators to an interval from zero to one, where zero represents the normal range, one represents a serious deviation, and values ​​between zero and one represent partial deviation. The time constant of the discount factor is preset based on the patient's age and underlying disease score. That is, for every ten years increase in age or every level increase in the underlying disease score, the decay rate of the discount factor increases by a preset step.

[0011] In a preferred embodiment, the specific method for selecting the preferred set of recommended actions from multiple candidate prescriptions based on the long-term hazard score is as follows: The drug composition difference between any two candidate recommended prescriptions is calculated. The drug composition difference is calculated using the Jaccard distance, which is the number of different drugs in the two prescriptions divided by the total number of all drug types in the two prescriptions. The result is a difference value from zero to one, with a larger value indicating a greater difference in drug composition. The long-term hazard score was used as the first optimization objective, and the immediate efficacy prediction was used as the second optimization objective. The immediate efficacy prediction was calculated by simulating the change curve of organ function indicators within a preset short time window after drug administration. The three candidate prescriptions with the lowest long-term hazard scores are selected. If multiple prescriptions have the same long-term hazard score, the prescription with the highest estimated immediate efficacy is selected. All the selected prescriptions are output as the optimal recommendation action set.

[0012] In a preferred embodiment, the immediate therapeutic effect estimate is calculated as follows: The candidate recommended prescription is input into a physiological simulator based on pharmacokinetic and pharmacodynamic equations. The simulator outputs predicted values ​​of multiple preset physiological indicators for the next hour. For each predicted value, the absolute value of its deviation from the corresponding normal range median is calculated. The absolute value of the deviation is divided by the normal range half-width of the physiological indicator to obtain the normalized deviation. The normalized deviation is then subtracted from one to obtain the individual score. The product of the individual scores corresponding to multiple preset physiological indicators is used as the immediate efficacy prediction value. The value of the immediate efficacy prediction value ranges from zero to one. The larger the value, the faster the effect and the closer it is to the normal state.

[0013] In a preferred embodiment, the internal implementation process of the prescription adjustment module is as follows: The actual effect data of the patient after the last recommended prescription was implemented is obtained. The effect data includes the changes of multiple preset physiological indicators within a preset short time window after drug administration. The real-time feedback error is obtained by subtracting the expected change from the change. The expected change is calculated based on the average response rate in historical data. The recursive least squares algorithm is used to adjust the strategy parameters online. Specifically, the mutation event flag, the patient's complete hidden state vector, and each candidate prescription in the preferred recommended action set are combined into a feature vector. The current recommended score is calculated using the feature vector and the strategy parameters of the previous time step. The real-time feedback error is multiplied by the gain matrix and then added to the strategy parameters of the previous time step to obtain the updated strategy parameters. The gain matrix is ​​recursively updated based on the autocorrelation matrix of the feature vector. Each candidate prescription in the preferred recommended action set is combined with the current feature vector, and the updated policy parameters are substituted to calculate the corresponding recommendation score. The candidate prescription with the highest recommendation score is selected as the optimal recommended prescription for the current time.

[0014] In a preferred embodiment, the internal implementation process of the prescription correction module is as follows: Determine if a historical recommendation sequence exists: if it exists, obtain the most recent recommended prescription in the historical recommendation sequence; if it does not exist, generate a simulated baseline prescription based on the patient's complete hidden state vector at the current moment as the most recent recommended prescription. The simulated baseline prescription is generated by extracting the initial drug type and initial dosage that match the patient's disease diagnosis and major organ function status from standard clinical guidelines. The optimal recommended prescription is compared with the most recent recommended prescription on a drug-by-drug basis, and the changes in drug types, the changes in drug dosages, and the newly added contraindication markers are calculated respectively. The jitter penalty signal is calculated as follows: when the change in drug type exceeds a preset change threshold, a first penalty value is generated, which is equal to the change in drug type multiplied by a first penalty coefficient; when the dose change of any drug exceeds a preset dose change threshold, a second penalty value is generated, which is equal to the sum of the differences between the dose change amplitudes of all drugs exceeding the threshold and the preset dose change threshold, multiplied by a second penalty coefficient; when the newly added contraindicated drug flag is true, a third penalty value is generated, which is equal to a preset prohibition penalty constant; the sum of the first, second, and third penalty values ​​is used as the jitter penalty signal. The jitter penalty signal is subtracted from the recommendation score of the best recommended prescription to obtain the corrected recommendation score. The candidate prescription with the highest corrected recommendation score is selected from the set of preferred recommendation actions as the smoothed final recommended prescription output. If the corrected recommendation score is lower than the preset acceptance threshold, the most recent recommended prescription is retained as the final recommended prescription.

[0015] In a preferred embodiment, the simulated baseline prescription is generated as follows: The current patient's disease diagnosis name is converted into a standard diagnosis code, and the major organ function status indicators are extracted from the patient's complete hidden state vector. The standard diagnosis code and the major organ function status indicators are concatenated into a patient feature vector. A standard clinical guideline library is pre-built, which stores multiple guideline entries. Each guideline entry contains a standard diagnostic code, a set of typical organ function state index ranges, and the corresponding standard initial drug and dosage, i.e., the simulated baseline prescription. The standard diagnostic code of each guideline entry is concatenated with the median of the typical organ function state index range to form the feature vector of that guideline entry. Calculate the cosine similarity between the patient feature vector and the feature vector of each guideline entry, and select the simulated baseline prescription corresponding to the guideline entry with the highest cosine similarity.

[0016] The technical effects and advantages of this invention are as follows: This invention acquires real-time diagnostic and treatment data, including time-series data of vital signs and laboratory indicators, through a data acquisition module. It detects abrupt and discontinuous changes within the data. When any indicator crosses a pre-defined pathological threshold, it outputs a mutation event flag and corresponding mutation parameters. This mechanism can promptly capture inflection points of nonlinear mutations in the patient's condition. Compared to existing systems that rely on the assumption of smooth changes, it avoids missed intervention windows due to delayed sampling, reducing response latency from minutes to seconds. Furthermore, the mutation type and magnitude provide a basis for differentiated processing in subsequent modules; for example, a sudden drop in blood pressure and a sudden drop in blood oxygen trigger different weight adjustment strategies. This invention significantly improves the timeliness of response to sudden changes in the condition of critically ill patients, ensuring that recommended prescriptions match the actual disease evolution nodes and reducing the risk of preventable adverse events caused by recommendation lag.

[0017] This invention utilizes a latent variable mining module based on mutation event markers and clinical data. It employs causal inference and residual analysis to infer latent variables of unobserved pathological states from the clinical data, outputting a complete latent state vector for the patient containing these variables. Existing systems rely solely on observable indicators and cannot identify latent risks such as early renal insufficiency and subclinical inflammation. This invention calculates the residual between actual measurements and historical extrapolated predicted values. When the residual exceeds a preset physiological fluctuation threshold, the value of the latent variable is quantified using a causal inversion formula. This value characterizes the intensity of the latent pathological state. For example, when serum creatinine is normal but urine output is decreased, the residual change can be captured and a latent variable representing early renal injury can be generated. This latent variable participates in subsequent hazard estimation, enabling the system to proactively avoid the cumulative toxicity of drugs excreted through the kidneys. This invention achieves quantitative inference and control of latent risks, effectively reducing long-term organ damage caused by the failure to detect latent states.

[0018] This invention simulates the chain reaction of multiple candidate prescriptions in consecutive future time steps through a hazard inference module, uses counterfactual comparison to calculate long-term hazard scores, and selects the optimal action set. A prescription adjustment module combines real-time feedback errors to adjust strategy parameters online and generate the optimal recommended prescription. A prescription correction module calculates jitter penalty signals to perform temporal smoothing constraints and outputs the final recommended prescription. Hazard inference predicts long-term causal chain adverse reactions, avoiding short-sighted recommendations. Prescription adjustment uses feedback errors to adaptively update strategy parameters, adapting to individual differences and changes in patient condition. Prescription correction prevents drastic fluctuations in drug types and dosages, ensuring stable clinical workflows. This invention simultaneously solves three major problems: long-term risk prediction, online adaptive optimization, and output smoothness, achieving safe, adaptive, and stable dynamic prescription recommendation. Attached Figure Description

[0019] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings; Figure 1 This is a schematic diagram of a doctor-assisted prescription intelligent recommendation system based on patient diagnosis and treatment data, as described in this invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0021] Reference Figure 1 The following examples were obtained: Example 1: A doctor-assisted prescription intelligent recommendation system based on patient diagnosis and treatment data, comprising: The data acquisition module is used to collect patients' diagnosis and treatment data in real time. The diagnosis and treatment data includes time series data of vital signs indicators and laboratory indicators. It detects abrupt and discontinuous changes in the time series data of vital signs indicators and laboratory indicators. That is, when any indicator crosses the pathological threshold value set for that indicator, it outputs a mutation event flag and the corresponding mutation parameters. The mutation parameters include mutation type, mutation occurrence time point and mutation magnitude. The latent variable mining module is used to infer pathological state latent variables that are not directly observed from the diagnosis and treatment data based on mutation event markers and diagnosis and treatment data, through causal inference and residual analysis, and output the complete latent state vector of the patient containing pathological state latent variables. The hazard projection module is used to simulate the chain effect of multiple candidate recommended prescriptions in multiple consecutive time steps in the future based on the patient's complete hidden state vector. It calculates the long-term hazard score of each candidate recommended prescription through counterfactual comparison, and then selects the optimal set of recommended actions from multiple candidate recommended prescriptions based on the long-term hazard score. The prescription adjustment module is used to adjust the strategy parameters online based on the mutation event flag, the patient's complete hidden state vector, and the preferred set of recommended actions, combined with the real-time feedback error and new changes in the patient's condition at the current moment, and generate the optimal recommended prescription for the current moment based on the adjusted strategy parameters. The prescription correction module is used to apply time-series smoothing constraints to the optimal recommended prescription and the historical recommendation sequence, calculate the jitter penalty signal between the optimal recommended prescription and the most recent recommended prescription in the historical recommendation sequence. The jitter penalty signal is used to prevent the change in the recommendation result at adjacent time points from exceeding a preset jitter threshold. Based on the jitter penalty signal, the optimal recommended prescription is corrected, and the smoothed final recommended prescription is output.

[0022] For different vital signs or laboratory indicators, multiple pre-set values ​​are used. Each value corresponds to a mutation trigger threshold for that indicator. The specific pathological threshold value is determined based on the critical value standards in clinical guidelines, the physiological parameter alarm limits in the equipment manual, and the normal range boundaries derived from statistical analysis. For example, for systolic blood pressure, the pathological threshold is set to be below 90 mmHg or above 200 mmHg; for heart rate, it is set to be below 40 beats per minute or above 120 beats per minute; and for blood oxygen saturation, it is set to be below 90%. The threshold for each indicator is a fixed value, with typical ranges as follows: multiple gradients for systolic blood pressure between 80 and 200 mmHg, multiple gradients for heart rate between 35 and 130 beats per minute, multiple gradients for respiratory rate between 8 and 30 breaths per minute, and multiple gradients for body temperature between 35 and 40 degrees Celsius. When the real-time collected value of any indicator reaches or exceeds its corresponding pathological threshold, the system determines that a jump or discontinuous change has occurred.

[0023] The output logic for the patient's complete hidden state vector is as follows: Using mutation event markers and clinical data as input, for multiple observed variables actually recorded in the clinical data, the residuals between the actual measured values ​​and the predicted values ​​extrapolated from historical values ​​at two consecutive time points for each observed variable with data records are calculated.

[0024] The residual is calculated as follows: Assume the actual measurement value at the current time point is the current value. The predicted value is obtained by adding the value from the previous time point to the product of the rate of change per unit time and the rate of change at the previous moment. The residual is obtained by subtracting the predicted value from the current value and taking the absolute value. For example, for the heart rate observation variable, if the value at the previous time point was 80 beats per minute, the rate of change at the previous moment was 2 increases per minute, and the unit time was one minute, then the predicted value is 82 beats per minute. If the current actual measurement value is 95 beats per minute, then the residual is 13 beats per minute. If there is no data record for a certain observation variable at the corresponding time point, such as when the patient's lactate level was not measured, then the residual calculation for that observation variable is skipped.

[0025] Pre-set the physiological fluctuation threshold for each observed variable. The threshold is set based on the normal physiological fluctuation range observed in clinical practice and the statistical results of equipment measurement errors. For example, the physiological fluctuation threshold for heart rate is set to 15 beats per minute, the physiological fluctuation threshold for systolic blood pressure is set to 20 mmHg, and the physiological fluctuation threshold for blood oxygen saturation is set to 3%.

[0026] When the residual of at least one observed variable with recorded data exceeds the corresponding preset physiological fluctuation threshold, for example, the heart rate residual of thirteen beats per minute does not exceed fifteen beats per minute, but the systolic blood pressure residual of twenty-five mmHg exceeds twenty mmHg, the latent variable calculation is triggered.

[0027] The value of a latent variable is calculated using a causal inversion formula. This formula involves multiplying the residuals of each observed variable with residuals by pre-calibrated causal weighting coefficients, summing the results, and then adding a normally distributed random noise term to obtain the value of the latent variable. The pre-calibration of the causal weighting coefficients is based on statistical correlations between residuals and subsequent organ dysfunction in historical case data. For example, the weighting coefficient for the systolic blood pressure residual is 0.5, the weighting coefficient for the heart rate residual is 0.3, the weighting coefficient for the lactate residual is 0.7, and the random noise term follows a normal distribution with a mean of zero and a standard deviation of 0.1.

[0028] If the observed variables with residuals are systolic blood pressure and lactic acid, with a systolic blood pressure residual of 25 mmHg and a lactic acid residual of 2.5 mmol / L, then the value of the latent variable is equal to (25 x 0.5) plus (2.5 x 0.7) plus the random noise term, and the calculated result is approximately 14.25 plus random noise.

[0029] The latent variable values ​​are concatenated with the current values ​​of all observed variables with existing data records to output the patient's complete latent state vector. For example, if the current values ​​of observed variables with existing data records are: systolic blood pressure 110 mmHg, heart rate 95 beats per minute, and lactate 2.8 mmol / L, and the latent variable value is 14.25, then the concatenated patient's complete latent state vector is [110, 95, 2.8, 14.25].

[0030] The calculation method for the long-term hazard score is as follows: This study employs a multi-step cost function framework from predictive control, treating each candidate recommended prescription as a control action and the patient's organ function status as the controlled object. Based on the model predictive control principle in control theory, the framework's typical parameters are: a future preset time window length of six hours, a discrete time step of one hour, and a total of six time steps.

[0031] Within a predetermined time window, the window is divided into multiple discrete time steps. In each time step, the drug toxicity cost, the deviation cost of organ function deviating from the normal range, and the cross cost arising from drug interactions are calculated. The drug toxicity cost reflects the cumulative risk of damage to organs such as the liver and kidneys; the deviation cost reflects the degree to which organ function indicators deviate from the healthy range; and the cross cost reflects the additional toxicity generated through metabolic pathways when multiple drugs are used in combination.

[0032] The toxicity cost of a drug is calculated using a nonlinear exponential decay function based on the drug's half-life and cumulative dose. This function is based on the principle of drug elimination kinetics in pharmacology, which states that the concentration of a drug in the body decreases exponentially over time. Therefore, the toxicity cost decreases as the time step increases. For example, for vancomycin, with a half-life of six hours and a cumulative dose of two grams, and a baseline toxicity cost of ten, the toxicity cost at the first time step is ten times two to the power of negative one, which equals five. The toxicity cost at the second time step is ten times two to the power of negative two, which equals two point five, and so on.

[0033] The deviation cost uses a fuzzy membership function to convert organ function indicators into the degree of deviation. This function is based on the gradual change characteristics between the normal and abnormal ranges in clinical diagnosis. For example, a serum creatinine value below 110 micromoles per liter is considered normal, above 440 micromoles per liter is considered a serious deviation, and the intermediate value is considered a partial deviation. For a measured serum creatinine value of 220 micromoles per liter, the deviation degree calculated using the trapezoidal membership function is (220 - 110) divided by (440 - 110), which equals 0.33.

[0034] The cross-cost is calculated using graph convolution based on drug metabolism pathways. This graph convolutional network constructs a heterogeneous graph with drugs as nodes and common metabolic pathways and transporter relationships between drugs as edges, and is trained in a supervised manner on a large-scale drug interaction database. Specifically, known drug interactions are first extracted from a public drug database as positive samples, and drug pairs with unknown interactions are randomly sampled as negative samples. The drug pairs are input into the graph convolutional network, and after multiple layers of graph convolution operations, a predicted interaction strength value between zero and one is output. Backpropagation training is performed by minimizing the cross-entropy loss function between the predicted value and the true label until the model converges. After training, for any two given drugs, the graph convolutional network automatically performs feature propagation and aggregation on their molecular structure and metabolic pathway graphs, directly outputting the interaction strength between the two drugs as the cross-cost. The larger the value, the higher the probability that the drugs have a significant interaction through a common metabolic pathway.

[0035] The three costs mentioned above at each time step are fused according to a dynamic weighting coefficient to obtain the fusion cost for that time step. This dynamic weighting coefficient is adjusted in real time based on the mutation event flag of the current time step. The fusion operation is as follows: the fusion cost equals the drug toxicity cost multiplied by its weight, plus the deviation cost multiplied by its weight, plus the crossover cost multiplied by its weight.

[0036] The fusion costs at each time step are discounted and summed using a discount factor to obtain a long-term hazard score. The discount factor is set based on the time preference theory in economics, meaning that the further into the future the cost, the smaller its impact on the current decision. A typical discount factor is 0.9. For example, if the fusion costs for the six time steps are 5, 4, 3, 2, 1, and 0.5, and the discount factor is 0.9, then the summed discounted value is 5 x 0.9^1 + 4 x 0.9^2 + 3 x 0.9^3 + 2 x 0.9^4 + 1 x 0.9^5 + 0.5 x 0.9^6. The result is approximately 4.5 + 3.24 + 2.19 + 1.31 + 0.59 + 0.26 = 12.09. This value is the long-term hazard score of the candidate prescription.

[0037] The specific adjustment method for the dynamic weighting coefficients is as follows: When the mutation event marker indicates a jump or discontinuous change, the weight of the drug toxicity cost is increased to a first preset value, while the weight of the deviation cost is decreased to a second preset value; when there is no mutation event marker, the default weight ratio is maintained. The first preset value is set based on the statistical results of a significant increase in drug toxicity risk during the mutation period in clinical experience, with a typical value range of 0.6 to 0.8, for example, 0.7; the second preset value is set based on the judgment that organ function indicators fluctuate drastically and the reference value of deviation cost decreases within the same period, with a typical value range of 0.1 to 0.3, for example, 0.2; the default weight ratio is drug toxicity cost 0.4, deviation cost 0.4, and crossover cost 0.2. For example, when the blood pressure of a sepsis patient suddenly drops from 120 mmHg to 70 mmHg, and the mutation event marker is true, the weight of the drug toxicity cost increases from 0.4 to 0.7, the weight of the deviation cost decreases from 0.4 to 0.2, and the weight of the crossover cost remains unchanged at 0.1.

[0038] The fuzzy membership function uses a trapezoidal distribution to map the measured values ​​of organ function indicators to a range from zero to one, where zero represents the normal range, one represents severe deviation, and values ​​between zero and one represent partial deviation. The trapezoidal distribution is set based on the boundary values ​​of the normal, mild, and severe abnormal ranges for each organ function indicator in clinical guidelines. For example, for serum creatinine, the normal range is below 110 micromoles per liter, the starting value for mild abnormality is 110, and the starting value for severe abnormality is 440. The trapezoidal distribution is as follows: measured values ​​less than 110 are mapped to 0; values ​​between 110 and 200 are mapped to (measured value - 110) divided by 90; values ​​between 200 and 440 are mapped to (measured value - 110) divided by 330; and values ​​greater than 440 are mapped to 1. If the measured value is 300 micromoles per liter, the mapped value is (300 - 110) divided by 330, which is approximately 0.58.

[0039] The time constant of the discount factor is preset based on the patient's age and underlying disease score. Specifically, for every ten-year increase in age or every one-level increase in the underlying disease score, the decay rate of the discount factor accelerates by a preset step size. The time constant is set based on clinical observations that the long-term prognosis of elderly and critically ill patients is more easily influenced by current decisions. The preset step size is determined based on the association between age and disease progression rate in statistical regression analysis. The discount factor is calculated as e raised to the power of negative (time steps divided by the time constant), where the initial default value for the time constant is six time steps, with a typical range of three to ten time steps. For example, if the baseline time constant is six, and the patient is 65 years old (ten years older than 55), the time constant is reduced by one to five. If the underlying disease score (e.g., APACHE II score) increases from 15 to 20 points, with each five-point increase considered a level, the time constant is further reduced by one to four. The accelerated decay rate of the discount factor further reduces the fusion cost of later time steps in the long-term hazard score.

[0040] The specific method for selecting the optimal set of recommended actions from multiple candidate prescriptions based on long-term hazard scores is as follows: The drug composition difference between any two candidate prescriptions is calculated using the Jaccard distance, which is calculated by dividing the number of different drugs in the two prescriptions by the total number of drug types in both prescriptions. The result is a difference value ranging from zero to one, with a higher value indicating a greater difference in drug composition. The Jaccard distance is based on the set similarity metric in information theory and is suitable for comparing discrete drug compositions. For example, if prescription A contains drugs A, B, and C, and prescription B contains drugs A, B, and D, then there are two different drugs, C and D, and a total of four drug types (A, B, C, and D). The Jaccard distance is two divided by four, which equals 0.5.

[0041] The primary optimization objective was long-term hazard score, while the secondary optimization objective was the predicted immediate efficacy. The predicted immediate efficacy was calculated by simulating changes in organ function indicators within a pre-defined short time window after drug administration. This dual-objective screening method is based on the Pareto optimization principle, prioritizing long-term safety before considering short-term efficacy. The pre-defined short time window was set based on statistical results of the time it takes for most drugs to reach their maximum effect in pharmacodynamics, with a typical value of one hour and a range of thirty minutes to two hours.

[0042] The system selects the three candidate prescriptions with the lowest long-term hazard scores. If multiple prescriptions have the same long-term hazard score, the prescription with the highest estimated immediate efficacy is chosen. All selected prescriptions are then output as the optimal recommended action set. The number of the top three is set based on the fact that clinicians typically choose from two to four alternatives, balancing diversity and decision-making efficiency. For example, if the long-term hazard scores of five candidate prescriptions A to E are 5.2, 5.2, 6.1, 7.0, and 8.3 respectively, and A and B both have the lowest score of 5.2, their estimated immediate efficacy is compared. If A has a score of 0.85 and B has a score of 0.78, then A is selected. Next, prescription C with a score of 6.1 is selected, and the final optimal recommended action set includes prescriptions A and C.

[0043] The specific calculation method for the immediate therapeutic effect estimate is as follows: The candidate prescriptions are input into a physiological simulator based on pharmacokinetic and pharmacodynamic equations. This simulator outputs predicted values ​​for multiple preset physiological indicators for the next hour. The pharmacokinetic and pharmacodynamic equations are set according to standard pharmacological parameter manuals (such as pharmacology), and each drug has typical values ​​for its absorption rate constant, elimination half-life, apparent volume of distribution, and concentration-effect relationship (Hill equation) at the effect site. For example, for a shock patient with diastolic blood pressure below 60 mmHg, if a dopamine prescription (5 micrograms per kilogram of body weight per minute) is input, the physiological simulator, based on dopamine's distribution half-life of two minutes, elimination half-life of two hours, and a Hill coefficient of 1.5 for vasoconstriction, predicts the diastolic blood pressure value at 10-minute intervals for the next hour as follows: from 50 mmHg to 68 mmHg at 60 minutes.

[0044] For each predicted value, the absolute value of its deviation from the corresponding median of the normal range is calculated. This absolute value is then divided by the half-width of the normal range for that physiological indicator to obtain the normalized deviation. The individual score is then obtained by subtracting this normalized deviation from one. The median and half-width of the normal range are set based on the normal range of clinical laboratory tests. For example, the normal range for diastolic blood pressure is 60 to 90 mmHg, with a median of 75 mmHg and a half-width of 15 mmHg. If the predicted diastolic blood pressure is 68 mmHg, the absolute value of the deviation is 7 mmHg, the normalized deviation is 7 divided by 15 (approximately 0.467), and the individual score is 1 minus 0.467 (approximately 0.533).

[0045] The product of individual scores from multiple preset physiological indicators is used as the immediate efficacy prediction. This immediate efficacy prediction ranges from zero to one; a higher value indicates a faster onset of action and a closer approximation to normal. The product method is based on the independence assumption in probability theory, meaning that the recovery of each physiological indicator is independent of each other. The overall efficacy requires all indicators to be close to normal simultaneously; any deviation from any indicator will significantly reduce the product value. For example, considering diastolic blood pressure (single score 0.533), heart rate (single score 0.8), and blood lactate (single score 0.6), the immediate efficacy prediction is 0.533 multiplied by 0.8 multiplied by 0.6, which equals 0.256. If the predicted value of an indicator is far outside the normal range (e.g., a diastolic blood pressure of 40 mmHg results in an absolute deviation of 35, a half-width of 15, and a normalized deviation of 2.33, which becomes negative after subtracting one; in this case, the single score is forced to zero, thus the immediate efficacy prediction is zero), it indicates that the prescription is ineffective or even harmful.

[0046] The internal implementation process of the prescription adjustment module is as follows: The system obtains actual effect data of patients after the last recommended prescription was administered. The effect data includes the changes of multiple preset physiological indicators within a preset short time window after drug administration. The real-time feedback error is obtained by subtracting the expected change from the change. The expected change is calculated based on the average response rate in historical data.

[0047] The preset short time window is set based on statistical results of the onset time of most drugs in pharmacodynamics, with a typical value of 30 minutes and a range of 15 minutes to 1 hour. For example, if the previous recommended prescription was an intravenous injection of 20 mg of furosemide, and the urine output increased by 300 ml within 30 minutes after administration, while the average response rate of patients with the same condition in historical data is 8 ml per minute (the expected increase in 30 minutes is 240 ml), then the real-time feedback error is 300 minus 240, which equals 60 ml.

[0048] The recursive least squares algorithm is used to adjust the strategy parameters online. Specifically, the mutation event flag, the patient's complete hidden state vector, and each candidate prescription in the preferred recommended action set are combined into a feature vector. The current recommended score is calculated using this feature vector and the strategy parameters of the previous time step. The real-time feedback error is multiplied by the gain matrix and then added to the strategy parameters of the previous time step to obtain the updated strategy parameters. The gain matrix is ​​recursively updated based on the autocorrelation matrix of the feature vector.

[0049] The recursive least squares algorithm is based on the standard method of online parameter identification in control theory. It is suitable for adaptive control in non-stationary environments. The feature vector is composed of multiple numerical values. For example, if the mutation event flag is 1 (mutation exists), the patient's complete hidden state vector is [systolic blood pressure 110, heart rate 95, lactate 2.8, hidden variable 14.25], and the candidate prescription contains 200 mg of drug A, then the feature vector is [1, 110, 95, 2.8, 14.25, 200].

[0050] The policy parameters from the previous time step are a vector [0.1, 0.2, 0.15, -0.05, 0.01, 0.03]. The recommendation score is obtained by multiplying the feature vector by the vector and adding a bias term. For example, 0.1×1+0.2×110+0.15×95+(-0.05)×2.8+0.01×14.25+0.03×200=22.3+14.25-0.14+0.1425+6=42.5525. The real-time feedback error is +60, and the gain matrix is ​​the transpose of the column vector [0.001, 0.0005, 0.0002, 0.0001, 0.00005, 0.00001]. Then the updated policy parameters are the parameters of the previous time step plus the real-time feedback error multiplied by the gain matrix (e.g., the first dimension: 0.1+60×0.001=0.16).

[0051] The specific operation of recursively updating the gain matrix based on the autocorrelation matrix of the eigenvectors is as follows: Initially, the autocorrelation matrix is ​​set to the identity matrix multiplied by a large coefficient (e.g., 1000). At each time step, the gain matrix is ​​first calculated as the autocorrelation matrix of the previous time step multiplied by the eigenvector of the current time step, and then divided by (1 plus the transpose of the current eigenvector multiplied by the autocorrelation matrix of the previous time step multiplied by the current eigenvector) to obtain the gain matrix. Then, the autocorrelation matrix is ​​updated using the gain matrix and the current eigenvector as (identity matrix minus gain matrix multiplied by the transpose of the current eigenvector) multiplied by the autocorrelation matrix of the previous time step.

[0052] For example, if the initial autocorrelation matrix is ​​a 2×2 identity matrix multiplied by 1000 (simplified example), and the current eigenvector is [1, 2], then the intermediate variable is calculated by multiplying the previous autocorrelation matrix by the eigenvector to obtain [1000, 2000]. The denominator is 1 plus the dot product of [1, 2] and [1000, 2000] = 1 + 1000 + 4000 = 5001. The gain matrix is ​​[1000 / 5001, 2000 / 5001], approximately equal to [0.19996, 0.39992]. Next, the autocorrelation matrix is ​​updated: first, the gain matrix is ​​multiplied by the transpose of the eigenvector to obtain a 2×2 matrix; then, this matrix is ​​subtracted from the identity matrix, and then multiplied by 1000 times the identity matrix to obtain the new autocorrelation matrix. This recursive process does not require storing all historical data; it updates online only using the current eigenvector each time, allowing the strategy parameters to adapt to sudden changes in disease progression and drug response.

[0053] Each candidate prescription in the preferred recommendation action set is combined with the current feature vector, and the corresponding recommendation score is calculated by substituting it into the updated policy parameters. The candidate prescription with the highest recommendation score is selected as the optimal recommendation prescription output at the current time. For example, if the preferred recommendation action set contains three candidate prescriptions A, B, and C, which are combined into feature vectors A, B, and C respectively, and the recommendation scores are obtained after substituting them into the updated policy parameters, A is 85.3, B is 92.1, and C is 78.6, then B is selected as the optimal recommendation prescription output.

[0054] The internal implementation process of the prescription correction module is as follows: Determine if a historical recommendation sequence exists: If it exists, obtain the most recent recommended prescription from the historical recommendation sequence; if it does not exist, generate a simulated baseline prescription based on the patient's complete hidden state vector at the current moment as the most recent recommended prescription. For example, if the patient's first visit has no historical prescription record, a simulated baseline prescription will be generated according to the method described separately later; if the patient has previously received two recommendations (e.g., the first for dopamine and the second for norepinephrine), the most recent recommended prescription will be norepinephrine.

[0055] The optimal recommended prescription is compared drug-by-drug, and the changes in drug types, dosage changes, and new contraindication markers are calculated. The change in drug types is the number of different drugs in the two prescriptions. For example, if the most recent prescription contains drugs A and B, and the optimal prescription contains drugs A and C, the change is that drug B is replaced by drug C. The dosage change is the absolute value of the difference in dosage of the same drug between the two prescriptions. For example, if drug A is 5 micrograms per kilogram of body weight per minute in the most recent prescription and 8 micrograms per kilogram of body weight per minute in the optimal prescription, the change is 3 micrograms.

[0056] The newly added contraindication drug indicator is whether the optimal prescription contains any drugs that the patient has a history of allergy or are absolutely contraindicated. If so, the indicator is true. Then, a jitter penalty signal is calculated. Specifically, when the change in the number of drug types exceeds a preset change threshold, a first penalty value is generated. This first penalty value is equal to the change in the number of drug types multiplied by a first penalty coefficient. The preset change threshold is set based on the acceptable number of changes for similar drug substitutions in clinical practice, with a typical value of one and a range of 0 to 2. The first penalty coefficient is set based on empirical values, with a typical value of 5 and a range of 2 to 10. For example, if the change in the number of drug types is 2 and the threshold is 1, then the first penalty value is (2 minus 1) multiplied by 5, which equals 5.

[0057] When the dose change of any drug exceeds a preset dose change threshold, a second penalty value is generated. This second penalty value is equal to the sum of the differences between the dose changes of all drugs exceeding the threshold and the preset dose change threshold, multiplied by the second penalty coefficient. The preset dose change threshold is set according to the width of the drug safety window. For drugs with a narrow therapeutic index (such as warfarin and digoxin), the threshold is 10%, and for drugs with a wide therapeutic index (such as penicillin), the threshold is 50%, with a typical value of 20%.

[0058] The second penalty coefficient is set based on the risk level of adverse events caused by a sudden dose jump, typically set to 2, with a range of 1 to 5. For example, if the norepinephrine dose increases from 0.1 micrograms per minute per kilogram of body weight to 0.15 micrograms per minute, a jump of 0.05 micrograms (50%), and the threshold is set at 20%, the excess portion is 30% (0.03 micrograms), the second penalty value is 0.03 multiplied by 2 equals 0.06; if another drug, dopamine, exceeds the threshold by 10%, then an additional 0.02 multiplied by 2 equals 0.04, resulting in a total second penalty value of 0.1.

[0059] When the newly added contraindicated drug flag is true, a third penalty value is generated, which is equal to the preset prohibition penalty constant. The prohibition penalty constant is set according to the clinical severity, typically with a value of 100, and a range of 50 to 200, to ensure that the prescription is almost impossible to select. For example, if the optimal prescription contains penicillin, which the patient is allergic to, then the third penalty value is 100. The sum of the first, second, and third penalty values ​​is used as the jitter penalty signal. Continuing the previous example, with a first penalty value of 5, a second penalty value of 0.1, and a third penalty value of 100, the jitter penalty signal is 105.1.

[0060] The jitter penalty signal is subtracted from the recommended score of the optimal recommended prescription to obtain the corrected recommended score. The candidate prescription with the highest corrected recommended score is selected from the set of preferred recommended actions as the final recommended prescription output after smoothing. For example, if the original recommended score of the optimal recommended prescription was 85, subtracting 105.1 results in a negative 20.1, which is an extremely low score after correction. The system will then reselect from the set of preferred recommended actions.

[0061] If the revised recommendation score is lower than the preset acceptance threshold, the most recent recommended prescription is retained as the final recommended prescription. The preset acceptance threshold is set based on the minimum clinically acceptable recommendation quality, typically 10, with a range of 0 to 20. If the revised score is -20.1 (lower than 10), the optimal recommended prescription is discarded, and the most recent recommended prescription (e.g., norepinephrine 0.1 micrograms per minute per kilogram of body weight) is retained as the final recommended prescription output.

[0062] A newly added contraindicated drug flag being true means that a drug that the patient is explicitly recorded as contraindicated or allergic to appears in the optimal recommended prescription. The specific criteria for determining this flag are based on the patient's allergy history, adverse drug reaction history, and absolute contraindication list in their electronic health record. For example, if a patient's medical record explicitly states an allergy to penicillin, then any prescription containing penicillin-type drugs such as amoxicillin or ampicillin will trigger this flag to be true. Similarly, if a patient has severe renal insufficiency (estimated glomerular filtration rate less than 30 ml / min), then any drug requiring renal excretion and possessing nephrotoxicity (such as a standard dose of vancomycin) will also trigger this flag to be true. When this flag is true, the system generates a third penalty value, which is a preset contraindication penalty constant. This third penalty value is sufficiently large (typically 100) to ensure that the revised recommendation score for the prescription is far below a preset acceptance threshold, thereby ensuring that the prescription will not be output as the final recommended prescription.

[0063] The method for generating the simulated baseline prescription is as follows: The current patient's disease diagnosis name is converted into a standard diagnostic code, and the major organ function indicators are extracted from the patient's complete latent state vector. The standard diagnostic code and the major organ function indicators are concatenated into a patient feature vector. The standard diagnostic code is converted according to the International Classification of Diseases, Tenth Revision (ICD-10). For example, "acute myocardial infarction" corresponds to code I21.0, and "pneumonia" corresponds to code J15.0. The major organ function indicators are extracted from the patient's complete latent state vector, such as systolic blood pressure, heart rate, blood oxygen saturation, and lactate level. These values ​​are concatenated with the diagnostic code in sequence. For example, if the patient's diagnostic code is I21.0, and the latent state vector contains systolic blood pressure of 90 mmHg, heart rate of 110 beats per minute, blood oxygen saturation of 92%, and lactate level of 2.5 mmol / L, then the patient feature vector is [I21.0 numericalized (e.g., mapped to integer 210), 90, 110, 92, 2.5].

[0064] A standard clinical guideline library is pre-built, storing multiple guideline entries. Each entry includes a standard diagnostic code, a set of typical organ function status (TFC) ranges, and a corresponding standard initial drug and dosage, i.e., a simulated baseline prescription. The library is based on authoritative clinical guidelines, and the TFC ranges for each entry are set according to the grading standards in the guidelines. For example, for the diagnostic code I21.0 for acute myocardial infarction, the guideline entry includes a systolic blood pressure range of 80 to 100 mmHg, a heart rate range of 100 to 120 beats per minute, an oxygen saturation range of 90% to 95%, and a lactate range of 2.0 to 3.0 mmol / L. The corresponding simulated baseline prescription is 300 mg of aspirin (chewable), 180 mg of ticagrelor (oral), and 70 units of heparin (intravenous bolus) per kilogram of body weight.

[0065] The feature vector of each guideline entry is formed by concatenating the standard diagnostic code of each entry with the median value of the typical organ function status index range. The median value is calculated as the average of the upper and lower limits of the range. For example, the median value for systolic blood pressure in the range of 80 to 100 is 90, the median value for heart rate in the range of 100 to 120 is 110, the median value for blood oxygen saturation in the range of 90 to 95 is 92.5, and the median value for lactate in the range of 2.0 to 3.0 is 2.5. The feature vector of this guideline entry is [diagnostic code numerical value, 90, 110, 92.5, 2.5].

[0066] The cosine similarity between the patient feature vector and the feature vector of each guideline entry is calculated, and the simulated benchmark prescription corresponding to the guideline entry with the highest cosine similarity is selected. The cosine similarity formula is the dot product of the two vectors divided by the product of their magnitudes, with a value ranging from -1 to 1. A value closer to 1 indicates a more consistent direction. This formula is based on the similarity metric of vector space models in information retrieval and is suitable for matching multidimensional numerical features. For example, if the patient feature vector is [210, 90, 110, 92, 2.5] and the guideline entry feature vector is [210, 90, 110, 92.5, 2.5], their dot product is 210×210+90×90+110×110+92×92.5+2.5×2.5, with the magnitudes being the square roots of their respective squares. The calculated result is close to 0.999, indicating an extremely high cosine similarity.

[0067] If multiple similar entries exist in the guide library, the one with the highest cosine similarity is selected; if the maximum cosine similarity is lower than the preset matching threshold (typically 0.8, set based on empirical values ​​to ensure matching reliability), a default basic prescription (e.g., the most common initial treatment for the diagnosis) is used as the simulation baseline prescription.

[0068] The above-mentioned models or function formulas are all dimensionless and numerical calculations. The models or function formulas are obtained by software simulation based on a large amount of collected data to obtain the most recent real situation. The preset parameters in the models or function formulas are set by those skilled in the art according to the actual situation.

[0069] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0070] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0071] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0072] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A doctor-assisted prescription intelligent recommendation system based on patient diagnosis and treatment data, characterized in that, include: The data acquisition module is used to collect patients' diagnosis and treatment data in real time, including time-series data of vital signs and laboratory indicators. The system detects discontinuous changes in time-series data of vital signs and laboratory indicators. When any indicator crosses a pre-set pathological threshold, it outputs a mutation event flag and corresponding mutation parameters, including mutation type, mutation occurrence time, and mutation magnitude. The latent variable mining module is used to infer pathological state latent variables that are not directly observed from the diagnosis and treatment data based on mutation event markers and diagnosis and treatment data, through causal inference and residual analysis, and output the complete latent state vector of the patient containing pathological state latent variables. The hazard projection module is used to simulate the chain effect of multiple candidate recommended prescriptions in multiple consecutive time steps in the future based on the patient's complete hidden state vector. It calculates the long-term hazard score of each candidate recommended prescription through counterfactual comparison, and then selects the optimal set of recommended actions from multiple candidate recommended prescriptions based on the long-term hazard score. The prescription adjustment module is used to adjust the strategy parameters online based on the mutation event flag, the patient's complete hidden state vector, and the preferred set of recommended actions, combined with the real-time feedback error and new changes in the patient's condition at the current moment, and generate the optimal recommended prescription for the current moment based on the adjusted strategy parameters. The prescription correction module is used to apply time-series smoothing constraints to the optimal recommended prescription and the historical recommendation sequence, and to calculate the jitter penalty signal between the optimal recommended prescription and the most recent recommended prescription in the historical recommendation sequence. The jitter penalty signal is used to prevent the change in the recommendation result at adjacent time points from exceeding the preset jitter threshold. The optimal recommended prescription is corrected based on the jitter penalty signal, and the smoothed final recommended prescription is output.

2. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 1, characterized in that, The pathological threshold values ​​are multiple values ​​that are pre-set for different vital signs or laboratory indicators, and each value corresponds to the mutation trigger threshold of an indicator.

3. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 1, characterized in that, The output logic for the patient's complete hidden state vector is as follows: Using mutation event markers and diagnostic data as input, for multiple observed variables actually recorded in the diagnostic data, the residual between the actual measured value and the predicted value extrapolated from historical values ​​at two consecutive time points for each observed variable with data records is calculated. The residual is calculated as follows: let the actual measured value at the current time point be the current value, add the value at the previous time point to the product of the rate of change per unit time and the previous moment to obtain the predicted value, and take the absolute value after subtracting the predicted value from the current value to obtain the residual. If there is no data record for a certain observed variable at the corresponding time point, the residual calculation for that observed variable is skipped. A physiological fluctuation threshold is preset for each observed variable. When the residual of at least one observed variable with data records exceeds the corresponding preset physiological fluctuation threshold, the value of a latent variable is calculated using a causal inversion formula. The causal inversion formula is as follows: multiply the residuals of each observed variable with residuals by a pre-calibrated causal weight coefficient and sum them up, then add a random noise term that follows a normal distribution to obtain the value of the latent variable. The values ​​of the latent variables are concatenated with the current values ​​of all observed variables with existing data records to output the patient's complete latent state vector.

4. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 1, characterized in that, The calculation method for the long-term hazard score is as follows: Using the multi-step cost function framework in predictive control, each candidate recommended prescription is regarded as a control action, and the patient's organ function status is regarded as the controlled object. Within a future preset time window, the window is divided into multiple discrete time steps. In each time step, the drug toxicity cost, the deviation cost of organ function deviating from the normal range, and the cross cost generated by drug interactions are calculated respectively. The drug toxicity cost is calculated using a nonlinear exponential decay function based on the drug half-life and cumulative dose. The deviation cost is calculated by converting organ function indicators into deviation degree using a fuzzy membership function. The cross cost is calculated using graph convolution based on drug metabolism pathways. The three costs mentioned above at each time step are fused together according to a dynamic weighting coefficient to obtain the fused cost for that time step. This dynamic weighting coefficient is adjusted in real time according to the mutation event flag of the current time step. The fusion costs at each time step are discounted and summed using a discount factor to obtain a long-term hazard score.

5. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 4, characterized in that, The specific adjustment method of the dynamic weight coefficient is as follows: when the mutation event flag indicates a jump and discontinuous change, the weight of the drug toxicity cost is increased to the first preset value, while the weight of the deviation cost is decreased to the second preset value; when there is no mutation event flag, the default weight ratio is maintained. The fuzzy membership function adopts a trapezoidal distribution, mapping the measured values ​​of organ function indicators to an interval from zero to one, where zero represents the normal range, one represents a serious deviation, and values ​​between zero and one represent partial deviation. The time constant of the discount factor is preset based on the patient's age and underlying disease score. That is, for every ten years increase in age or every level increase in the underlying disease score, the decay rate of the discount factor increases by a preset step.

6. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 5, characterized in that, The specific method for selecting the optimal set of recommended actions from multiple candidate prescriptions based on long-term hazard scores is as follows: The drug composition difference between any two candidate recommended prescriptions is calculated. The drug composition difference is calculated using the Jaccard distance, which is the number of different drugs in the two prescriptions divided by the total number of all drug types in the two prescriptions, resulting in a difference value from zero to one. The long-term hazard score was used as the first optimization objective, and the immediate efficacy prediction was used as the second optimization objective. The immediate efficacy prediction was calculated by simulating the change curve of organ function indicators within a preset short time window after drug administration. The three candidate prescriptions with the lowest long-term hazard scores are selected. If multiple prescriptions have the same long-term hazard score, the prescription with the highest estimated immediate efficacy is selected. All the selected prescriptions are output as the optimal recommendation action set.

7. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 6, characterized in that, The specific calculation method for the immediate therapeutic effect estimate is as follows: The candidate recommended prescription is input into a physiological simulator based on pharmacokinetic and pharmacodynamic equations. The simulator outputs predicted values ​​of multiple preset physiological indicators for the next hour. For each predicted value, the absolute value of its deviation from the corresponding normal range median is calculated. The absolute value of the deviation is divided by the normal range half-width of the physiological indicator to obtain the normalized deviation. The normalized deviation is then subtracted from one to obtain the individual score. The product of the individual scores corresponding to multiple preset physiological indicators is used as the immediate efficacy prediction value, which ranges from zero to one.

8. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 1, characterized in that, The internal implementation process of the prescription adjustment module is as follows: The actual effect data of the patient after the last recommended prescription was implemented is obtained. The effect data includes the changes of multiple preset physiological indicators within a preset short time window after drug administration. The real-time feedback error is obtained by subtracting the expected change from the change. The expected change is calculated based on the average response rate in historical data. The recursive least squares algorithm is used to adjust the strategy parameters online. Specifically, the mutation event flag, the patient's complete hidden state vector, and each candidate prescription in the preferred recommended action set are combined into a feature vector. The current recommended score is calculated using the feature vector and the strategy parameters of the previous time step. The real-time feedback error is multiplied by the gain matrix and then added to the strategy parameters of the previous time step to obtain the updated strategy parameters. The gain matrix is ​​recursively updated based on the autocorrelation matrix of the feature vector. Each candidate prescription in the preferred recommended action set is combined with the current feature vector, and the updated policy parameters are substituted to calculate the corresponding recommendation score. The candidate prescription with the highest recommendation score is selected as the optimal recommended prescription for the current time.

9. The intelligent prescription recommendation system for doctors based on patient diagnosis and treatment data according to claim 1, characterized in that, The internal implementation process of the prescription correction module is as follows: Determine if a historical recommendation sequence exists: if it exists, obtain the most recent recommended prescription from the historical recommendation sequence; if it does not exist, generate a simulated baseline prescription based on the patient's complete hidden state vector at the current moment as the most recent recommended prescription. The optimal recommended prescription is compared with the most recent recommended prescription on a drug-by-drug basis, and the changes in drug types, the changes in drug dosages, and the newly added contraindication markers are calculated respectively. The jitter penalty signal is calculated as follows: when the change in drug type is greater than a preset change threshold, a first penalty value is generated, which is equal to the change in drug type multiplied by a first penalty coefficient; when the dose change of any drug exceeds a preset dose change threshold, a second penalty value is generated, which is equal to the sum of the difference between the dose change amplitude of all drugs exceeding the threshold and the preset dose change threshold, multiplied by a second penalty coefficient. When the newly added contraindicated drug flag is true, a third penalty value is generated, which is equal to the preset prohibition penalty constant; the sum of the first penalty value, the second penalty value and the third penalty value is used as the jitter penalty signal; The jitter penalty signal is subtracted from the recommendation score of the best recommended prescription to obtain the corrected recommendation score. The candidate prescription with the highest corrected recommendation score is selected from the set of preferred recommendation actions as the smoothed final recommended prescription output. If the corrected recommendation score is lower than the preset acceptance threshold, the most recent recommended prescription is retained as the final recommended prescription.

10. A doctor-assisted prescription intelligent recommendation system based on patient diagnosis and treatment data according to claim 9, characterized in that, The method for generating the simulated baseline prescription is as follows: The current patient's disease diagnosis name is converted into a standard diagnosis code, and the major organ function status indicators are extracted from the patient's complete hidden state vector. The standard diagnosis code and the major organ function status indicators are concatenated into a patient feature vector. A standard clinical guideline library is pre-built, which stores multiple guideline entries. Each guideline entry contains a standard diagnostic code, a set of typical organ function state index ranges, and the corresponding standard initial drug and dosage, i.e., the simulated baseline prescription. The standard diagnostic code of each guideline entry is concatenated with the median of the typical organ function state index range to form the feature vector of that guideline entry. Calculate the cosine similarity between the patient feature vector and the feature vector of each guideline entry, and select the simulated baseline prescription corresponding to the guideline entry with the highest cosine similarity.