A method, system, device and medium for intelligent management of clinical pharmacy

By obtaining and analyzing hospital medical record information, building a disease identification model, eliminating expired drugs, and formulating drug procurement forms, the problems of high quality requirements, poor applicability and single functions of the clinical pharmacy management system are solved, and efficient drug management and effective medication use are achieved sex.

CN118888079BActive Publication Date: 2025-01-07THE FIRST PEOPLES HOSPITAL OF CHANGZHOU
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411375442.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-07
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The existing clinical pharmacy management system has problems such as high personnel quality requirements, poor applicability and single functions, which leads to low drug management efficiency and data silos, affecting data integration and analysis.

Method used

By obtaining the medical record information of the target hospital, extracting and summarizing patient information, disease information and medication information, building a medical record, extracting general drugs and standard BMI indexes based on the medical record, building a disease identification model, eliminating expired drugs, and formulating drug procurement forms. And determine the diagnostic report based on the patient's examination report to improve the efficiency of drug management and the effectiveness of medication.

Benefits of technology

It has achieved auxiliary clinical decision-making, improved drug management efficiency, ensured the effectiveness of patients' medication, reduced manual operation and medication risks, and promoted the development of the medical industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118888079B_ABST
    Figure CN118888079B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, device and medium for intelligent management of clinical pharmacy, which belongs to the field of drug management and solves the problem of low drug management efficiency. The specific method is as follows: Step S1: Obtain medical record information and extract drug matching information for each disease; Step S2: Construct a disease recognition model; Eliminate expired drugs and formulate a drug purchase list in combination with drug matching information; Step S3: Obtain the patient's examination report, determine the patient's disease, reference medication and reference medication dosage according to the disease recognition model, and obtain a diagnosis report; Step S4: Feedback the diagnosis report and the drug purchase list to the physician; The present invention obtains drug matching information and disease information for each disease by performing data mining on the medical record information of the target hospital, formulates a drug purchase plan based on the drug matching information, and pre-diagnoses the patient based on the disease information, thereby improving the physician's drug dispensing efficiency and drug management efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention discloses a method, system, equipment and medium for intelligent management of clinical pharmacy, and relates to the field of drug management. Background Art

[0002] The existing management methods or systems for clinical pharmacy have the following deficiencies:

[0003] High requirements for personnel quality: The operation and maintenance of the existing management system requires personnel with relevant professional knowledge and skills; however, there is a relative shortage of talents with these qualities in the market, especially in primary medical institutions; at the same time, in order to improve the medical staff's ability to operate the management system, medical institutions need to invest a lot of time and resources in training, which to a certain extent affects the rapid promotion and application of the system.

[0004] Applicability issues: Different medical institutions differ in terms of scale, resources, and patient needs, so the applicability of existing management systems also varies. Some medical institutions need to customize or adjust the system based on their actual conditions. Although this improves the medical institutions' targeting of local specific diseases, it also reduces the effectiveness of the medical institutions for wide-area diseases and increases the complexity and cost of the system.

[0005] Single function: The existing management system focuses on drug inventory management, ignoring other equally important functions such as pathology summary, drug summary, medication guidance, etc. These functions can significantly improve the safety and effectiveness of patients' medication; some systems have incomplete or missing coverage of this function, resulting in medical institutions relying on multiple systems to meet different drug management needs, which not only increases operational complexity, but also leads to data silos, affecting data integration and analysis. Summary of the invention

[0006] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method, system, equipment and medium for intelligent management of clinical pharmacy, aiming to solve the problem of low efficiency of drug management.

[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0008] A method for intelligent management of clinical pharmacy includes:

[0009] Step S1: Obtain the medical record information of the target hospital; extract and summarize the patient information, disease information and medication information of each disease in the medical record information to obtain a medical record table; extract the common medicine and main disease of each disease in turn based on the medical record table, extract the common medicine dosage and standard BMI index, and obtain the drug matching information corresponding to each disease;

[0010] Step S2: extract the disease information of each disease in the medical record information; build a disease recognition model based on the disease information; obtain the inventory information of the purchased drugs of the target hospital, and eliminate expired drugs according to the inventory information; extract the medical record information of the target hospital in the past three years as reference medical record information; analyze the incidence rate of the target area based on the reference medical record information, and formulate a drug purchase table in combination with the inventory information and drug matching information;

[0011] Step S3: Obtain the patient's examination report; extract the patient's lesion picture and symptoms in the examination report as input to the disease recognition model to determine the patient's disease and reference medication; then extract the patient's gender, age and BMI index in the examination report to determine the dosage of the reference medication and obtain a diagnosis report;

[0012] Step S4: Summarize the diagnosis report and drug purchase list and feed back to the physician.

[0013] Furthermore, the specific steps of step S1 are as follows:

[0014] Step S11: Obtain all medical record information in the target hospital; extract patient information, disease information and medication information corresponding to each medical record information;

[0015] Patient information includes: patient identity information, gender, age, and BMI index;

[0016] Disease information includes: disease name, lesion picture, symptoms, and onset time;

[0017] Medication information includes: medication name and dosage;

[0018] Step S12: Construct a medical record table with patient information, disease information and medication information. The patient identity information is the primary key of the medical record table. The corresponding SQL statement is as follows:

[0019] Medical history form:

[0020] Create table medical records(

[0021] Patient identity information String, patient gender String, patient age String, patient BMI index String,

[0022] Disease name String, lesion image BLOB, symptoms CLOB, onset time DATE,

[0023] Medication name String, medication dosage Double,

[0024] primary key (patient identification information);

[0025] Step S13: Count the total number of all symptoms in the medical record information, recorded as bn; count the number of medical records corresponding to the 1st to bnth symptoms, recorded as fb1, fb2~fb bn ;

[0026] Step S14: In the medical record table, use SQL statement a to summarize all medical record information corresponding to the first disease to obtain medical record table 1'; SQL statement a is as follows:

[0027] select * from medical records where disease name = 'the first disease';

[0028] Based on the medical record table 1`, the main symptoms and common drugs corresponding to the first symptom are counted, and the common drug dosages and standard BMI indexes corresponding to the first symptom in different genders and age groups are counted to obtain the drug matching information of the first symptom;

[0029] Step S15: Change the first disease in SQL statement a to the second to bn-th diseases, and execute SQL statement a to obtain medical record tables 2` to bn`; based on medical record tables 2` to bn`, repeat the same steps to obtain the drug matching information for the first disease, obtain the drug matching information for the second to bn-th diseases, and enter step S2.

[0030] Furthermore, the specific steps of step S14 are as follows:

[0031] Step S141: In the medical record table 1', all the symptoms of the first disease are summarized to obtain the set il(1) to the set il(fb1);

[0032] Summarize all the names of medicines for the first disease to obtain the set me(1) to the set me(fb1);

[0033] Step S142: import the Python standard library; use the intersection operator & and the intersection() method in the Python standard library to calculate the intersection of the set il(1) to the set il(fb1) to obtain the set αil; calculate the intersection of the set me(1) to the set me(fb1) to obtain the set αme;

[0034] Step S143: read the symptoms in the set αil as the main symptoms of the first disease; read the names of the medicines in the set αme as the general medicines for the first disease;

[0035] Step S144: Count the number of medical records corresponding to the first to fourth age groups in the medical record table 1', and record them as fp1, fp2, fp3, fp4;

[0036] fp1, fp2, fp3, fp4 and fb1 satisfy: fp1+fp2+fp3+fp4=fb1;

[0037] In the medical record form 1`, read the BMI index and common medication dosage for the first to fourth age groups by gender;

[0038] The first age group, BMI index for men: mBⅠ1~mBⅠ fm1 ; General dosage: mMⅠ1~mMⅠ fm1 ;

[0039] BMI index for women: wBⅠ1~wBⅠ fw1 ; General dosage: wMⅠ1~wMⅠ fw1 ;

[0040] The second age group, BMI index for men: mBⅡ1~mBⅡ fm2 ; General dosage: mMⅡ1~mMⅡ fm2 ;

[0041] BMI index for women: wBⅡ1~wBⅡ fw2 ; General dosage: wMⅡ1~wMⅡ fw2 ;

[0042] The third age group, BMI index for men: mBⅢ1~mBⅢ fm3 ; General dosage: mMⅢ1~mMⅢ fm3 ;

[0043] BMⅢ index for women: wBⅢ1~wBⅢ fw3 ; General dosage: wMⅢ1~wMⅢ fw3 ;

[0044] The fourth age group, male BMI index: mBⅣ1~mBⅣ fm4 ; General dosage: mMⅣ1~mMⅣ fm4 ;

[0045] BMI index for women: wBⅣ1~wBⅣ fw4 ; General dosage: wMⅣ1~wMⅣ fw4 ;

[0046] Step S145: determining a common drug dosage and a standard BMI index for the first age group;

[0047] Calculate mBI1~mBI fm1 The average value is recorded as amBI; calculate wBI1~wBI fm1 The average value of is denoted as awBI;

[0048] Read mMⅠ1~mMⅠfm1 The mode is recorded as cmMⅠ; read wMⅠ1~wMⅠ fm1 The mode of , denoted as cwMⅠ;

[0049] The standard BMI index of males in the first age group is recorded as ΔmBI; the universal drug dosage is recorded as ΔmMⅠ;

[0050] The standard BMI index of women in the first age group is recorded as ΔwBⅠ; the universal drug dosage is recorded as ΔwMⅠ;

[0051] Step S146: define relationship expressions a1-a4, and determine the values ​​of ΔmBI, ΔmMI, ΔwBI and ΔwMI;

[0052] Relational formula a1: lim (cmBⅠ) → (cmBⅠ*amBⅠ) 1 / 2 ; If the relation a1 is satisfied, the value of ΔmBI is amBI; otherwise, the value of ΔmBI is cmBI;

[0053] Relationship a2: lim (cmMⅠ) → (cmMⅠ*amMⅠ) 1 / 2 ; If the relation a2 is satisfied, the value of ΔmMⅠ is amMⅠ; otherwise, the value of ΔmMⅠ is cmMⅠ;

[0054] Relationship a3: lim (cw BI) → (cw BI * aw BI) 1 / 2 ; If the relation a3 is satisfied, the value of ΔwBI is awBI; otherwise, the value of ΔwBI is cwBI;

[0055] Relationship a4: lim (cwMⅠ) → (cwMⅠ*awMⅠ) 1 / 2 ; If the relation a4 is satisfied, the value of ΔwMⅠ is awMⅠ; otherwise, the value of ΔwMⅠ is cwMⅠ;

[0056] Step S147: Repeat the same steps of determining the universal medication dose and the standard BMI index for the first age group, and determine the universal medication dose and the standard BMI index for the second to fourth age groups.

[0057] Furthermore, the specific steps of step S2 are as follows:

[0058] Step S21: extracting the lesion pictures corresponding to the 1st to bnth diseases in the medical history table; extracting the main symptoms of the 1st to bnth diseases;

[0059] Define the binary logical formula TT(i) {A(i), B(i)}; where the value range of i is: 1~bn; TT(i) represents the binary of the i-th disease, A(i) represents the lesion image of the i-th disease, and B(i) represents the main symptom of the i-th disease;

[0060] Use binary logical expressions to represent the pathological images and main symptoms of the first to second diseases, and obtain TT(1){A(1), B(1)}, TT(2){A(2), B(2)}~TT(bn){A(bn), B(bn)};

[0061] Step S22: constructing a disease recognition model based on TT(1) to TT(bn);

[0062] Step S23: Obtain the inventory information of the purchased drugs of the target hospital, remove expired drugs, and prepare a drug purchase list, and proceed to step S3.

[0063] Furthermore, the specific steps of step S22 are as follows:

[0064] Step S221: Assume that the image input for constructing the disease recognition model is X, and the text input is Y;

[0065] Step S222: constructing model 1;

[0066] Step S2221: First layer: input the image and back it up twice;

[0067] The convolution kernel size of the convolution layer conv1 is 5×5, the step size is 1, and the number of channels is 64;

[0068] The convolution kernel size of the pooling layer pool1 is 3×3, and the step size is 2;

[0069] The scaling factor of LRN layer norm1 is 0.001 / 9, and the exponential term is 0.75;

[0070] Step S2222: second layer; convolution kernel size of convolution layer conv2: 5×5, step size: 1, number of channels: 128;

[0071] The convolution kernel size of the pooling layer pool2 is 3×3, and the step size is 2;

[0072] The scaling factor of norm2 in the LRN layer is 0.001 / 9, and the exponential term is 0.75;

[0073] Step S2223: the third layer; the convolution kernel size of the convolution layer conv3 is 5×5, the step size is 1, and the number of channels is 64;

[0074] The convolution kernel size of the pooling layer pool3 is 3×3, and the step size is 2;

[0075] Step S2224: the fourth layer; the weight matrix size of the fully connected layer local4 is: 1024×384, and the initial value is 0.04;

[0076] The fifth layer: the weight matrix size of the fully connected layer local5 is 384×192, and the initial value is 0.1;

[0077] The weight matrix size of the Softmax layer is 192×1016, and the initial value is 0.005;

[0078] Step S2225: loss function: cross entropy loss function;

[0079] Optimization algorithm: gradient descent optimization algorithm;

[0080] Regularization term: L1 norm;

[0081] Step S223: construct model 2;

[0082] Load Metathesaurus vocabulary; import Word2Vec model;

[0083] The Metathesaurus vocabulary is used as the training set of the Word2Vec model to train the Word2Vec model and obtain model 2;

[0084] Step S224: Use A(1)~A(bn) as the training set of model 1, and B(1)~B(bn) as the training set of model 2, and train model 1 and model 2 until the outputs of model 1 and model 2 are equal.

[0085] Furthermore, the specific steps of step S23 are as follows:

[0086] Step S231: Obtaining inventory information of purchased drugs of the target hospital;

[0087] Inventory information includes: drug name, purchase time, shelf life, purchase quantity and usage;

[0088] Count the number of types of all purchased drugs, recorded as mn; the number of all purchased drugs, recorded as ms;

[0089] Sum up the quantity of each purchased drug, recorded as ms1, ms2~ms mn ; ms1, ms2~ms mn And ms satisfies: ms1 + ms2 + ~ + ms mn =ms;

[0090] Step S232: Process the first purchased drug, calculate the purchase amount am(1) of the first purchased drug; record the first purchased drug as the processed drug;

[0091] The shelf life of the processed drugs is summarized and recorded as Yt(1)~Yt(ms1);

[0092] Get the current time, recorded as nt;

[0093] Step S2321: define the relational expression b1: (Yt(i)≥nt)∩(lim(nt)→Yt(i)); wherein the value range of i is 1 to ms1, and Yt(i) represents the shelf life of the i-th processed drug;

[0094] Substitute Yt(1)~Yt(ms1) into relational expression b1, extract the processed drugs that satisfy relational expression b1 as expired drugs; calculate the number of expired drugs, recorded as nnm;

[0095] Extract the treatment drugs that do not satisfy the relational expression b1 as available drugs; calculate the number of available drugs, recorded as yym;

[0096] Among them, the relationship between nnm, yym and ms1 satisfies: nnm+yym=ms1;

[0097] Step S2322: (from the medical record table) extract the diseases treated with the treatment drugs as the judgment diseases; (corresponding SQL statement: select disease name from medical record table where medication name = 'treatment drugs';) count the number of judgment diseases, recorded as yin;

[0098] Step S2323: sequentially calculating the cumulative usage of the treatment drugs corresponding to the first to the yinth determined symptoms, recorded as mb(1), mb(2) to mb(yin);

[0099] Among them, mb(1) represents the cumulative amount of treatment drugs used for the first type of disease; mb(2) represents the cumulative amount of treatment drugs used for the second type of disease; and so on, mb(yin) represents the cumulative amount of treatment drugs used for the yinth type of disease;

[0100] Arrange mb(1)~mb(yin) in descending order to obtain sequence B;

[0101] Read the judgment disease corresponding to the first item in sequence B as the matching disease of the treatment drug, recorded as disease α;

[0102] Step S2324: Obtain the total number of residents in the target area, recorded as pn; read the number of medical records of disease α in the past three years (excluding this year) (from the medical record table), recorded as bα(1), bα(2) and bα(3);

[0103] Read the purchase and usage of treatment drugs in the past three years;

[0104] In the first year, the purchase amount is om1 and the usage amount is im1;

[0105] In the second year, the purchase amount is om2 and the use amount is im2;

[0106] In the third year, the purchase amount is om3 and the usage amount is im3;

[0107] Step S2325: Based on the data in step S2324, determine the purchase quantity of the treatment drug;

[0108] Step S233: Repeat the same steps of processing the first purchased drug, remove expired drugs from the second to the mn-th purchased drugs, and calculate the purchase quantities of the second to the mn-th purchased drugs am(2) to am(mn);

[0109] Step S234: Summarize the purchase quantities of the 1st to mnth purchased drugs, am(1)~am(mn), to obtain a drug purchase table.

[0110] Furthermore, the specific steps of step S2325 are as follows:

[0111] Step S23251: Calculate the input and output ratios io1, io2 and io3 of the drugs processed in the past three years; io1 = im1 / om1; io2 = im2 / om2; io3 = im3 / om3;

[0112] Calculate the incidence of disease α in the past three years, recorded as pi1, pi2 and pi3; pi1 = bα (1) / pn; pi2 = bα (2) / pn; pi3 = bα (3) / pn;

[0113] Step S23252: Calculate the incidence change rate of disease α (in the past three years), recorded as pi 1-2 and pi 2-2 ;

[0114] pi 1-2 = (pi2-pi1) / pi1; pi 2-3 = (pi3-pi2) / pi2;

[0115] Construct a state transfer matrix, denoted as matrix j; matrix j is as follows:

[0116] ; Where n represents the number of iterations of matrix j, × represents matrix multiplication; n is a natural number, and its initial value is 1; each time matrix j is iterated, n is increased by 1 on the original basis;

[0117] Use the NumPy library function to iterate the matrix j and obtain the steady-state transfer matrix, which is recorded as matrix j1;

[0118] Step S23253: define a 3×1 matrix of (1 / 3, 1 / 3, 1 / 3) as parameter matrix 1; calculate the result of multiplying matrix j1 by parameter matrix 1, recorded as matrix j2;

[0119] Read the outputs in matrix j2 in sequence, denoted as upi1 and upi2 respectively;

[0120] Calculate the average of upi1 and upi2, denoted as api;

[0121] Step S23254: (in the medical record table) read the number of medical records of disease α this year, recorded as bα`; calculate the incidence rate of the current disease α, recorded as pi`; pi` = bα` / pn;

[0122] The purchase volume of processed drugs is recorded as am(1), am(1) = (|api-pi`| / api)*yym.

[0123] A smart management system for clinical pharmacy includes:

[0124] Medical record mining module: used to obtain the medical record information of the target hospital; extract and summarize the patient information, disease information and medication information of each disease in the medical record information to obtain the medical record table; extract the common medicine and main disease of each disease in turn based on the medical record table, extract the common medicine dosage and standard BMI index, and obtain the drug matching information corresponding to each disease;

[0125] The comprehensive summary module includes: disease extraction submodule and drug management submodule;

[0126] Disease extraction submodule: used to extract the disease information of each disease in the medical record information; build a disease recognition model based on the disease information;

[0127] Drug management submodule: used to obtain the inventory information of the purchased drugs of the target hospital, and eliminate expired drugs according to the inventory information; extract the medical record information of the target hospital in the past three years as reference medical record information; analyze the incidence rate of the target area based on the reference medical record information, and formulate a drug purchase table in combination with the inventory information and drug matching information;

[0128] Drug recommendation module: used to obtain the patient's examination report; extract the patient's lesion pictures and symptoms in the examination report as the input of the disease recognition model to determine the patient's disease and reference medication; then extract the patient's gender, age and BMI index in the examination report, determine the dosage of the reference medication, and obtain a diagnosis report;

[0129] Physician interaction module: used to summarize diagnosis reports and drug purchase forms and provide feedback to physicians.

[0130] An electronic device comprises: a processor and a memory; the intelligent management device stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of a method for clinical pharmacy intelligent management as described in any one of the above items are executed.

[0131] A storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in a method for intelligent management of clinical pharmacy as described in any one of the above items are executed.

[0132] Compared with the prior art, the present invention has the following beneficial effects:

[0133] Assisting clinical decision-making: The present invention can collect a large amount of clinical data and mine valuable information through big data analysis technology, such as the common medicine (name), common medicine dosage and main symptoms for each disease; these data can not only assist doctors in prescribing medicines, but also be used in medical research and development to provide a scientific basis for clinical decision-making and promote the development of the medical industry.

[0134] Improve drug management efficiency: The present invention not only has the ability to manage drugs and eliminate expired drugs in traditional drug management systems, but also draws up drug purchase lists for doctors based on the actual medical conditions of the target hospital and the actual incidence rate of the target area, which not only reduces the tediousness of manual operations, but also provides a basis for the hospital's drug procurement work, improves drug management efficiency, and avoids drug shortages or expiration waste.

[0135] Ensure the effectiveness of patients' medication: The present invention recommends medications to patients based on their illnesses and identity conditions, making it easier for doctors to supervise and guide medication. In addition, the present invention's intelligent processing method of dispensing medications based on patients' pathologies and physical needs can reduce the risks of medication caused by human errors and improve the effectiveness of medications. BRIEF DESCRIPTION OF THE DRAWINGS

[0136] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0137] Figure 1 It is a schematic diagram of the method of the present invention;

[0138] Figure 2 It is a schematic diagram of the system of the present invention;

[0139] Figure 3 It is a data schematic diagram of the present invention;

[0140] Figure 4 It is a data schematic diagram of the present invention;

[0141] Figure 5 This is a schematic diagram of the image processing part of the disease recognition model of the present invention. DETAILED DESCRIPTION

[0142] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0143] Embodiment 1

[0144] See also Figure 1 , a method for intelligent management of clinical pharmacy includes:

[0145] Step S1: Obtain (all) medical record information of the target hospital; extract and summarize the patient information, disease information and medication information of each disease in the medical record information to obtain a medical record table; extract the main symptoms and common drugs (names) of each disease in turn based on the medical record table, extract the common drug dosage (corresponding to each disease in different genders and different age groups) and the standard BMI index, and obtain the drug matching information corresponding to each disease;

[0146] It should be noted that the "target hospital" in the present invention refers to the hospital that uses the present invention (a method, system, equipment and medium for intelligent management of clinical pharmacy); the "target area" refers to the municipal area where the "target hospital" is located.

[0147] See also Figure 3 and Figure 4 , the specific steps of step S1 are as follows:

[0148] Step S11: Obtain all medical record information in the target hospital; extract patient information, disease information and medication information corresponding to each medical record information;

[0149] Patient information includes: patient identity information, gender, age, and BMI index;

[0150] Disease information includes: disease name, lesion picture, symptoms, and onset time;

[0151] Medication information includes: medication name and dosage;

[0152] It should be noted that the "BMI index" in the present invention refers to the "body mass index", which is a standard for "measuring the degree of fatness and health of the human body"; the normal range of the BMI index is between 18.5 and 23.9 kg / m² (or 18.5 and 24.9 kg / m²);

[0153] "Patient's identity information" refers to information that can uniquely indicate the patient's personal identity, such as the patient's name, ID number, mobile phone number, etc.

[0154] Step S12: Construct a medical record table with the patient information, disease information and medication information (corresponding to each medical record information), and the patient identity information is the primary key of the medical record table; the corresponding SQL statement is as follows:

[0155] Medical Records Form:

[0156] Create table medical records(

[0157] Patient identity information String, patient gender String, patient age String, patient BMI index String, onset time DATA,

[0158] Disease name String, lesion image BLOB, symptoms CLOB,

[0159] Medication name String, medication dosage Double,

[0160] primary key (patient identification information);

[0161] Step S13: (Using SQL statement 1) counting the total number of all symptoms in the medical record information, recorded as bn; SQL statement 1 is as follows:

[0162] select count(distinct disease name) as bn from medical record;

[0163] (Using SQL statement 2) Count the number of medical records corresponding to the 1st to bnth diseases respectively, recorded as fb1, fb2~fb bn ;

[0164] SQL statement 2 is as follows:

[0165] select disease name, count(*) as number of medical records from medical records group by disease name;

[0166] The output of SQL statement 2 is the number of medical records corresponding to the 1st to bnth diseases;

[0167] It should be noted that the "first symptom" in the present invention refers to the disease corresponding to the "first symptom name"; the "second symptom" refers to the disease corresponding to the "second symptom name"; and so on, the "dnth symptom" refers to the disease corresponding to the "dnth symptom name".

[0168] Step S14: In the medical record table, use SQL statement a to summarize all medical record information corresponding to the first disease to obtain medical record table 1' (i.e., the representation scope of medical record table 1: medical record information of the first disease); SQL statement a is as follows:

[0169] select * from medical records where disease name = 'the first disease';

[0170] Based on medical record table 1`, the main symptoms and common drugs (names) corresponding to the first symptom are counted, and the common drug dosages and standard BMI indexes corresponding to the first symptom in different genders and age groups are counted to obtain drug matching information for the first symptom;

[0171] Step S141: In the medical record table 1', use SQL statement b to summarize all the "symptoms" of the first disease to obtain the set il(1) to the set il(fb1); SQL statement b is as follows:

[0172] select blob_column from medical record table 1` group by patient identity information;

[0173] Use SQL statement c to collect all the "drug names" for the first disease to obtain the set me(1) to the set me(fb1); SQL statement c is as follows:

[0174] select medication name from medical record table 1` group by patient identity information;

[0175] Step S142: import the Python standard library; use the intersection operator & and the intersection() method in the Python standard library to calculate the intersection of the set il(1) to the set il(fb1) to obtain the set αil; calculate the intersection of the set me(1) to the set me(fb1) to obtain the set αme;

[0176] Step S143: read the “symptoms” in the set αil as the “main symptoms” of the first disease; read the “name of medication” in the set αme as the “common medicine (name)” of the first disease;

[0177] Step S144: Please refer to Table 1, count the number of medical records corresponding to the first to fourth age groups in the medical record table 1', and record them as fp1, fp2, fp3, fp4;

[0178] fp1, fp2, fp3, fp4 and fb1 satisfy: fp1+fp2+fp3+fp4=fb1;

[0179]

[0180] Table 1 (Age group classification table)

[0181] It should be noted that "Table 1" in the present invention is only an example demonstration, and users or relevant technical personnel can adjust the age group classification table according to actual needs.

[0182] In the medical record form 1`, read the BMI index and common medication dosage for the first to fourth age groups by gender;

[0183] The first age group, BMI index for men: mBⅠ1~mBⅠ fm1 ; General dosage: mMⅠ1~mMⅠ fm1 ; (obtain "mMⅠ1~mMⅠ fm1 "SQL statement: select medication dosage from medical record table 1` where (patient age>0 and patient age<18 or patient age=18) and (patient gender='male') and (drug name='generic medicine') groupby patient identity information);

[0184] BMI index for women: wBⅠ1~wBⅠ fw1 ; General dosage: wMⅠ1~wMⅠ fw1 ; (Get "wMⅠ1~wMⅠ fw1 "SQL statement: select medication dosage from medical record table 1` where (patient age>0 and patient age<18 or patient age=18) and (patient gender='female') and (medication name='generic medicine') group by patient identity information)

[0185] Among them, fm1 represents the number of males in the first age group in medical record table 1`; fw1 represents the number of females in the first age group in medical record table 1`; fm1, fw1 and fp1 satisfy: fm1+fw1=fp1;

[0186] The second age group, BMI index for men: mBⅡ1~mBⅡ fm2 ; General dosage: mMⅡ1~mMⅡ fm2 ; (obtain "mMⅡ1~mMⅡ fm2 "SQL statement: select medication dosage from medical record table 1` where (patient age>19 and patient age=19 and patient age<40 or patient age=40) and (patient gender='male') and (medication name='generic medicine') group by patient identity information);

[0187] BMI index for women: wBⅡ1~wBⅡ fw2 ; General dosage: wMⅡ1~wMⅡ fw2 ; (Get "wMⅡ1~wMⅡ fw2"SQL statement: select medication dosage from medical record table 1` where (patient age>19 and patient age=19 and patient age<40 or patient age=40) and (patient gender='female') and (medication name='generic medicine') group by patient identity information);

[0188] Among them, fm2 represents the number of males in the second age group in medical record table 1`; fw2 represents the number of females in the second age group in medical record table 1`; fm2, fw2 and fp2 satisfy: fm2+fw2=fp2;

[0189] The third age group, BMI index for men: mBⅢ1~mBⅢ fm3 ; General dosage: mMⅢ1~mMⅢ fm3 ; (Get "mMⅢ1~mMⅢ fm3 "SQL statement: select medication dosage from medical record table 1` where (patient age>40 and patient age=41 or patient age<18) and (patient gender='male') and (medication name='generic medicine') group by patient identity information)

[0190] BMⅢ index for women: wBⅢ1~wBⅢ fw3 ; General dosage: wMⅢ1~wMⅢ fw3 ; (Get "wMⅢ1~wMⅢ fw3 "SQL statement: select medication dosage from medical record table 1` where (patient age>40 and patient age=41 or patient age<18) and (patient gender='female') and (medication name='generic medicine') group by patient identity information)

[0191] Among them, fm3 represents the number of males in the third age group in medical record table 1`; fw3 represents the number of females in the third age group in medical record table 1`; fm3, fw3 and fp3 satisfy: fm3+fw3=fp3;

[0192] The fourth age group, male BMI index: mBⅣ1~mBⅣ fm4 ; General dosage: mMⅣ1~mMⅣ fm4 ; (obtain "mMⅣ1~mMⅣ fm4"SQL statement: select medication dosage from medical record table 1` where (patient age>60 and patient age = 60) and (patient gender = 'male') and (medication name = 'generic medicine') group by patient identity information)

[0193] BMI index for women: wBⅣ1~wBⅣ fw4 ; General dosage: wMⅣ1~wMⅣ fw4 ; (Get "wMⅣ1~wMⅣ fw1 "SQL statement: select medication dosage from medical record table 1` where (patient age>60 and patient age = 60) and (patient gender = 'female') and (medication name = 'generic medicine') group by patient identity information)

[0194] Among them, fm4 represents the number of males in the fourth age group in medical record table 1'; fw4 represents the number of females in the first age group in medical record table 1'; fm4, fw4 and fp4 satisfy: fm4 + fw4 = fp4;

[0195] Step S145: determining a common drug dosage and a standard BMI index for the first age group;

[0196] Calculate mBI1~mBI fm1 The average value is recorded as amBI; calculate wBI1~wBI fm1 The average value of is denoted as awBI;

[0197] Read mMⅠ1~mMⅠ fm1 The mode is recorded as cmMⅠ; read wMⅠ1~wMⅠ fm1 The mode of , denoted as cwMⅠ;

[0198] The standard BMI index of males in the first age group is recorded as ΔmBI; the universal drug dosage is recorded as ΔmMⅠ;

[0199] The standard BMI index of women in the first age group is recorded as ΔwBⅠ; the universal drug dosage is recorded as ΔwMⅠ;

[0200] Step S146: define relationship expressions a1-a4, and determine the values ​​of ΔmBI, ΔmMI, ΔwBI and ΔwMI;

[0201] Relational formula a1: lim (cmBⅠ) → (cmBⅠ*amBⅠ) 1 / 2 ; If the relation a1 is satisfied, the value of ΔmBI is amBI; otherwise, the value of ΔmBI is cmBI;

[0202] Relationship a2: lim (cmMⅠ) → (cmMⅠ*amMⅠ) 1 / 2 ; If the relation a2 is satisfied, the value of ΔmMⅠ is amMⅠ; otherwise, the value of ΔmMⅠ is cmMⅠ;

[0203] Relationship a3: lim (cw BI) → (cw BI * aw BI) 1 / 2 ; If the relation a3 is satisfied, the value of ΔwBI is awBI; otherwise, the value of ΔwBI is cwBI;

[0204] Relationship a4: lim (cwMⅠ) → (cwMⅠ*awMⅠ) 1 / 2 ; If the relation a4 is satisfied, the value of ΔwMⅠ is awMⅠ; otherwise, the value of ΔwMⅠ is cwMⅠ;

[0205] Step S147: Repeat the same steps of determining the universal drug dosage and the standard BMI index for the first age group (steps S145 to S146) to determine the universal drug dosage and the standard BMI index for the second to fourth age groups;

[0206] Step S15: Change the "first symptom" in SQL statement a to "second symptom to bnth symptom", execute SQL statement a to obtain "medical record table 2` to medical record table bn`"; based on medical record table 2` to medical record table bn`, repeat the same steps to obtain the drug matching information for the first symptom (step S141 to step S147), and obtain the drug matching information for the second to bnth symptoms.

[0207] Step S2: extract the disease information of each disease in the medical record information; build a disease recognition model based on the disease information; obtain the inventory information of the purchased drugs of the target hospital, and eliminate expired drugs according to the inventory information; extract the medical record information of the target hospital in the past three years as reference medical record information; analyze the incidence rate of the target area based on the reference medical record information, and formulate a drug purchase table in combination with the inventory information and drug matching information;

[0208] The specific steps of step S2 are as follows:

[0209] Step S21: extracting the “lesion pictures” corresponding to the 1st to bnth diseases in the medical history table; extracting the “main symptoms” of the 1st to bnth diseases (from the drug matching information of the 1st to bnth diseases);

[0210] Define the binary logical formula TT(i) {A(i), B(i)}; where the value range of i is: 1~bn; TT(i) represents the binary of the i-th disease, A(i) represents the "lesion picture" of the i-th disease, and B(i) represents the "main symptom" of the i-th disease;

[0211] Use binary logical expressions to represent the "lesion picture" and "main symptoms" of the first to second diseases, and obtain TT(1){A(1), B(1)}, TT(2){A(2), B(2)}~TT(bn){A(bn), B(bn)};

[0212] Step S22: constructing a disease recognition model;

[0213] Step S221: Assume that the image input for constructing the disease recognition model is X, and the text input is Y;

[0214] Step S222: Please refer to Figure 5 , build model 1 (the image processing part of the disease recognition model);

[0215] Step S2221: First layer: input the image and back it up twice;

[0216] The convolution kernel size of the convolution layer conv1 is 5×5, the step size is 1, and the number of channels is 64;

[0217] The convolution kernel size of the pooling layer pool1 is 3×3, and the step size is 2;

[0218] The scaling factor of norm1 in the LRN layer (local response normalization layer) is 0.001 / 9, and the exponential term is 0.75;

[0219] Step S2222: second layer; convolution kernel size of convolution layer conv2: 5×5, step size: 1, number of channels: 128;

[0220] The convolution kernel size of the pooling layer pool2 is 3×3, and the step size is 2;

[0221] The scaling factor of norm2 of the LRN layer (local response normalization layer) is 0.001 / 9, and the exponential term is 0.75;

[0222] Step S2223: the third layer; the convolution kernel size of the convolution layer conv3 is 5×5, the step size is 1, and the number of channels is 64;

[0223] The convolution kernel size of the pooling layer pool3 is 3×3, and the step size is 2;

[0224] Step S2224: the fourth layer; the weight matrix size of the fully connected layer local4 is: 1024×384, and the initial value is 0.04;

[0225] The fifth layer: the weight matrix size of the fully connected layer local5 is 384×192, and the initial value is 0.1;

[0226] The weight matrix size of the Softmax layer is 192×1016, and the initial value is 0.005;

[0227] Step S2225: loss function: cross entropy loss function;

[0228] Optimization algorithm: gradient descent optimization algorithm;

[0229] Regularization term: L1 norm;

[0230] Step S223: constructing model 2 (text processing part of the disease recognition model);

[0231] Load Metathesaurus; (Metathesaurus is a medical concept vocabulary used to record words or phrases related to medical concepts such as symptoms, diseases or drugs)

[0232] Import the Word2Vec model; (The Word2Vec model is a model used to calculate word vectors, which represents the semantic relationship between words)

[0233] The Metathesaurus word library is used as the training set of the Word2Vec model to train the Word2Vec model and obtain the model 2 (the text processing part of the disease recognition model);

[0234] Step S224: Use A(1)-A(bn) as the training set of model 1, and use B(1)-B(bn) as the training set of model 2, and train model 1 and model 2 until the outputs of model 1 and model 2 are equal;

[0235] Step S23: Obtain the inventory information of the purchased drugs of the target hospital, remove expired drugs, and prepare a drug purchase list;

[0236] Step S231: Obtaining inventory information of purchased drugs of the target hospital;

[0237] Inventory information includes: name of (purchased) drugs, purchase time, shelf life, quantity purchased and usage;

[0238] Count the number of types of all purchased drugs, recorded as mn; the number of all purchased drugs, recorded as ms;

[0239] Sum up the quantity of each purchased drug, recorded as ms1, ms2~ms mn ; ms1, ms2~ms mn And ms satisfies: ms1 + ms2 + ~ + ms mn =ms;

[0240] Step S232: Process the first purchased drug, calculate the purchase amount am(1) of the first purchased drug; record the first purchased drug as the processed drug;

[0241] Summarize (all) the shelf life of the processed drugs and record them as Yt(1)~Yt(ms1);

[0242] Get the current time, recorded as nt;

[0243] Step S2321: define the relational expression b1: (Yt(i)≥nt)∩(lim(nt)→Yt(i)); wherein the value range of i is 1 to ms1, and Yt(i) represents the shelf life of the i-th processed drug;

[0244] Substitute Yt(1)~Yt(ms1) into relational expression b1, extract the processed drugs that satisfy relational expression b1 as expired drugs; calculate the number of expired drugs, recorded as nnm;

[0245] Extract the treatment drugs that do not satisfy the relational expression b1 as available drugs; calculate the number of available drugs, recorded as yym;

[0246] Among them, the relationship between nnm, yym and ms1 satisfies: nnm+yym=ms1;

[0247] Step S2322: (from the medical record table) extract the disease (name) treated with the treatment drug as the judgment disease; (corresponding SQL statement: select disease name from medical record table where medication name = 'treatment drug';) count the number of judgment diseases, recorded as yin;

[0248] Step S2323: sequentially calculating the cumulative usage of the treatment drugs corresponding to the first to the yinth determined symptoms, recorded as mb(1), mb(2) to mb(yin);

[0249] Among them, mb(1) represents the cumulative amount of treatment drugs used for the first type of disease; mb(2) represents the cumulative amount of treatment drugs used for the second type of disease; and so on, mb(yin) represents the cumulative amount of treatment drugs used for the yinth type of disease;

[0250] Arrange mb(1)~mb(yin) in descending order to obtain sequence B;

[0251] Read the judgment disease corresponding to the first item in sequence B as the matching disease of the treatment drug, recorded as disease α;

[0252] Step S2324: Obtain the total number of residents in the target area, recorded as pn; read the number of medical records of disease α in the past three years (excluding this year) (from the medical record table), recorded as bα(1), bα(2) and bα(3);

[0253] Read the purchase and usage of treatment drugs in the past three years;

[0254] In the first year, the purchase amount is om1 and the usage amount is im1;

[0255] In the second year, the purchase amount is om2 and the use amount is im2;

[0256] In the third year, the purchase amount is om3 and the usage amount is im3;

[0257] Step S2325: Based on the data in step S2324, determine the purchase quantity of the treatment drug;

[0258] Step S23251: Calculate the input and output ratios io1, io2 and io3 of the drugs processed in the past three years; io1 = im1 / om1; io2 = im2 / om2; io3 = im3 / om3;

[0259] Calculate the incidence of disease α in the past three years, recorded as pi1, pi2 and pi3; pi1 = bα (1) / pn; pi2 = bα (2) / pn; pi3 = bα (3) / pn;

[0260] Step S23252: Calculate the incidence change rate of disease α (in the past three years), recorded as pi 1-2 and pi 2-2 ;

[0261] pi 1-2 = (pi2-pi1) / pi1; pi 2-3 = (pi3-pi2) / pi2;

[0262] Construct a state transfer matrix, denoted as matrix j; matrix j is as follows:

[0263] ; Where n represents the number of iterations of matrix j, × represents matrix multiplication; n is a natural number, and its initial value is 1; each time matrix j is iterated, n is increased by 1 on the original basis;

[0264] Use the NumPy library function to iterate the matrix j and obtain the steady-state transfer matrix, recorded as matrix j1 (2×3 matrix);

[0265] Step S23253: define a 3×1 matrix of (1 / 3, 1 / 3, 1 / 3) as parameter matrix 1; calculate the result of multiplying matrix j1 by parameter matrix 1, recorded as matrix j2 (2×1 matrix);

[0266] Read the outputs in matrix j2 in sequence, denoted as upi1 and upi2 respectively;

[0267] Calculate the average of upi1 and upi2, denoted as api;

[0268] Step S23254: (in the medical record table) read the number of medical records of disease α this year, recorded as bα`; calculate the incidence rate of the current disease α, recorded as pi`; pi` = bα` / pn;

[0269] The purchase amount of treatment drugs is recorded as am(1), am(1) = (|api-pi`| / api)*yym;

[0270] Step S233: repeat the same steps of “processing the first purchased drug and calculating the purchase quantity am(1) of the first purchased drug” (steps S2321 to S2325), remove expired drugs from the second to mn-th purchased drugs, and calculate the purchase quantities am(2) to am(mn) of the second to mn-th purchased drugs;

[0271] Step S234: Summarize the purchase quantities of the 1st to mnth purchased drugs, am(1)~am(mn), to obtain a drug purchase table.

[0272] Step S3: Obtain the patient's examination report; extract the patient's lesion picture and symptoms in the examination report as input to the disease recognition model to determine the patient's disease and reference medication; then extract the patient's gender, age and BMI index in the examination report to determine the dosage of the reference medication and obtain a diagnosis report;

[0273] The specific steps of step S3 are as follows:

[0274] Step S31: Obtain the patient's examination report; extract the patient's lesion picture and symptoms in the examination report as input to the disease recognition model, and obtain the patient's disease, which is recorded as the diagnosed disease;

[0275] Step S32: Read the generic drugs corresponding to the diagnosed diseases from the drug matching information of the 1st to bnth diseases and record them as reference drugs;

[0276] Step S33: Obtain the gender, age and BMI index in the patient's examination report, and record the BMI index (in the patient's examination report) as B´;

[0277] According to the patient's diagnosed disease, gender and age (in the examination report), read the standard BMI index corresponding to the diagnosed disease in the drug matching information of the 1st to bnth diseases, recorded as YB; read the dosage of the reference drug (generic drug), recorded as Ym;

[0278] Step S34: Record the patient's reference medication dosage as mm;

[0279] Define the relationship c1: lim(B´)→YB;

[0280] Step S35: determine whether the relation c1 holds true and determine the value of mm;

[0281] If the relation c1 holds, then mm = Ym;

[0282] If the relation c1 does not hold, then mm = (|B´ - YB| / YB)*Ym.

[0283] Step S4: Summarize the diagnosis report and drug purchase list and feed back to the physician.

[0284] Embodiment 2

[0285] See also Figure 2 A smart management system for clinical pharmacy includes: a medical record mining module, a comprehensive summary module, a drug recommendation module, a physician interaction module, a database and a server; wherein the medical record acquisition module, the comprehensive summary module, the drug recommendation module and the physician interaction module are connected to the database and the server respectively.

[0286] Medical record mining module: used to obtain (all) medical record information of the target hospital; extract and summarize the patient information, disease information and medication information of each disease in the medical record information to obtain the medical record table; extract the common medicine (name) and main symptoms of each disease in turn based on the medical record table, extract the common medicine dosage and standard BMI index (for each disease in different genders and age groups), and obtain the drug matching information corresponding to each disease;

[0287] The comprehensive summary module includes: disease extraction submodule and drug management submodule;

[0288] Disease extraction submodule: used to extract the disease information of each disease in the medical record information; build a disease recognition model based on the disease information;

[0289] Drug management submodule: used to obtain the inventory information of the purchased drugs of the target hospital, and eliminate expired drugs according to the inventory information; extract the medical record information of the target hospital in the past three years as reference medical record information; analyze the incidence rate of the target area based on the reference medical record information, and formulate a drug purchase table in combination with the inventory information and drug matching information;

[0290] Drug recommendation module: used to obtain the patient's examination report; extract the patient's lesion pictures and symptoms in the examination report as the input of the disease recognition model to determine the patient's disease and reference medication; then extract the patient's gender, age and BMI index in the examination report, determine the dosage of the reference medication, and obtain a diagnosis report;

[0291] Physician interaction module: used to summarize diagnosis reports and drug purchase forms and provide feedback to physicians.

[0292] Embodiment 3

[0293] An electronic device includes a processor and a memory, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in any one of the above methods are executed. Through the above technical solution, the processor and the memory are interconnected and communicate with each other through a communication bus and / or other forms of connection mechanisms (not shown), and the memory stores a computer program executable by the processor. When the electronic device is running, the processor executes the computer program to execute the method in any optional implementation of the above embodiment to achieve the following functions: obtain, extract and analyze (all) medical record information of the target hospital to obtain drug matching information corresponding to each disease;

[0294] Build a disease recognition model based on medical record information, manage the purchased drugs of the target hospital, and formulate a drug procurement table;

[0295] Obtain the patient's examination report, determine the patient's symptoms, reference medications, and reference medication dosages, and obtain a diagnosis report;

[0296] Feedback diagnosis report and drug purchase form to physician.

[0297] Embodiment 4

[0298] A storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above methods are executed. Through the above technical solution, when the computer program is executed by the processor, the method in any optional implementation of the above embodiment is executed to achieve the following functions: obtain, extract and analyze (all) medical record information of the target hospital to obtain drug matching information corresponding to each disease;

[0299] Build a disease recognition model based on medical record information, manage the purchased drugs of the target hospital, and formulate a drug procurement table;

[0300] Obtain the patient's examination report, determine the patient's symptoms, reference medications, and reference medication dosages, and obtain a diagnosis report;

[0301] Feedback diagnosis report and drug purchase form to physician.

[0302] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technical personnel in this field according to actual conditions. For example, if there are weight coefficients and proportional coefficients, their set sizes are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. Regarding the size of the weight coefficient and the proportional coefficient, it is sufficient as long as it does not affect the proportional relationship between the parameter and the quantized value.

[0303] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for intelligent management of clinical pharmacy, characterized in that: Management methods include: Step S1: Obtain the medical record information of the target hospital; extract and summarize the patient information, disease information and medication information of each disease in the medical record information; Construct a medical record table based on patient information, disease information, and medication information. Based on the medical record table, summarize the common drugs and main diseases corresponding to each disease, summarize the common drug dosages and standard BMI indexes corresponding to different ages and genders, and obtain the drug matching information corresponding to each disease. Step S2: extract the lesion pictures and symptoms of each disease in the medical record information; construct a 6-layer image model based on the lesion pictures to obtain model 1; construct a text recognition model based on the symptoms and the Word2Vec model to obtain model 2; train model 1 and model 2 until the output results of model 1 and model 2 are the same, and obtain a disease recognition model; Obtain inventory information of purchased drugs at the target hospital; Get the current time and remove expired drugs according to the shelf life of purchased drugs; According to the onset time in the disease information, extract the target hospital's medical records for the past three years as reference medical records; Obtain the total number of residents in the target area, calculate the incidence of each disease in the target area in the past three years based on the reference medical record information, and count the input and output ratio of each drug in the target area in the past three years based on the drug matching information; construct a state transfer matrix based on the incidence of each disease and the input and output ratio of each drug in the target area in the past three years, and iterate to obtain a steady-state transfer matrix, and formulate a drug procurement table based on the steady-state transfer matrix; Step S3: Obtain the patient's examination report; extract the patient's lesion picture and symptoms in the examination report as input to the disease recognition model to determine the patient's disease and reference medication; then extract the patient's gender, age and BMI index in the examination report to determine the dosage of the reference medication and obtain a diagnosis report; Step S4: Summarize the diagnosis report and drug purchase form.

2. A method for intelligent management of clinical pharmacy according to claim 1, characterized in that: The specific steps of step S1 are as follows: Step S11: Obtain all medical record information in the target hospital; extract patient information, disease information and medication information corresponding to each medical record information; Patient information includes: patient identity information, gender, age, and BMI index; Disease information includes: disease name, lesion picture, symptoms, and onset time; Medication information includes: medication name and dosage; Step S12: Construct a medical record table with patient information, disease information and medication information. The patient identity information is the primary key of the medical record table. The corresponding SQL statement is as follows: Medical history form: Create table medical records( Patient identity information String, patient gender String, patient age String, patient BMI index String, Disease name String, lesion image BLOB, symptoms CLOB, onset time DATE, Medication name String, medication dosage Double, primary key (patient identification information); Step S13: Count the total number of all symptoms in the medical record information, recorded as bn; count the number of medical records corresponding to the 1st to bnth symptoms, recorded as fb1, fb2~fb bn ; Step S14: In the medical record table, use SQL statement a to summarize all medical record information corresponding to the first disease to obtain medical record table 1'; SQL statement a is as follows: select * from medical records where disease name = 'the first disease'; Based on the medical record table 1`, the main symptoms and common drugs corresponding to the first symptom are counted, and the common drug dosages and standard BMI indexes corresponding to the first symptom in different genders and age groups are counted to obtain the drug matching information of the first symptom; Step S15: Change the first symptom in SQL statement a to the second to bn-th symptom, execute SQL statement a to obtain medical record tables 2` to bn`; based on medical record tables 2` to bn`, repeat the steps of obtaining drug matching information for the first symptom, obtain drug matching information for the second to bn-th symptoms, and enter step S2.

3. A method for intelligent management of clinical pharmacy according to claim 2, characterized in that: The specific steps of step S14 are as follows: Step S141: In the medical record table 1', all the symptoms of the first disease are summarized to obtain the set il(1) to the set il(fb1); Summarize all the names of medicines for the first disease to obtain the set me(1) to the set me(fb1); Step S142: import the Python standard library; use the intersection operator & and the intersection() method in the Python standard library to calculate the intersection of the set il(1) to the set il(fb1) to obtain the set αil; calculate the intersection of the set me(1) to the set me(fb1) to obtain the set αme; Step S143: read the symptoms in the set αil as the main symptoms of the first disease; read the names of the medicines in the set αme as the general medicines for the first disease; Step S144: Count the number of medical records corresponding to the first to fourth age groups in the medical record table 1', and record them as fp1, fp2, fp3, fp4; fp1, fp2, fp3, fp4 and fb1 satisfy: fp1+fp2+fp3+fp4=fb1; In the medical record form 1`, read the BMI index and common medication dosage for the first to fourth age groups by gender; The first age group, BMI index for men: mBⅠ1~mBⅠ fm1 ; General dosage: mMⅠ1~mMⅠ fm1 ; BMI index for women: wBⅠ1~wBⅠ fw1 ; General dosage: wMⅠ1~wMⅠ fw1 ; The second age group, BMI index for men: mBⅡ1~mBⅡ fm2 ; General dosage: mMⅡ1~mMⅡ fm2 ; BMI index for women: wBⅡ1~wBⅡ fw2 ; General dosage: wMⅡ1~wMⅡ fw2 ; The third age group, BMI index for men: mBⅢ1~mBⅢ fm3 ; General dosage: mMⅢ1~mMⅢ fm3 ; BMⅢ index for women: wBⅢ1~wBⅢ fw3 ; General dosage: wMⅢ1~wMⅢ fw3 ; The fourth age group, male BMI index: mBⅣ1~mBⅣ fm4 ; General dosage: mMⅣ1~mMⅣ fm4 ; BMI index for women: wBⅣ1~wBⅣ fw4 ; General dosage: wMⅣ1~wMⅣ fw4 ; Step S145: determining a common drug dosage and a standard BMI index for the first age group; Calculate mBI1~mBI fm1 The average value is recorded as amBI; calculate wBI1~wBI fm1 The average value of is denoted as awBI; Read mMⅠ1~mMⅠ fm1 The mode is recorded as cmMⅠ; read wMⅠ1~wMⅠ fm1 The mode of , denoted as cwMⅠ; The standard BMI index of males in the first age group is recorded as ΔmBI; the universal drug dosage is recorded as ΔmMⅠ; The standard BMI index of women in the first age group is recorded as ΔwBⅠ; the universal drug dosage is recorded as ΔwMⅠ; Step S146: define relationship expressions a1-a4, and determine the values ​​of ΔmBI, ΔmMI, ΔwBI and ΔwMI; Relational formula a1: lim (cmBⅠ) → (cmBⅠ*amBⅠ) 1 / 2 ; If the relation a1 is satisfied, the value of ΔmBI is amBI; otherwise, the value of ΔmBI is cmBI; Relationship a2: lim (cmMⅠ) → (cmMⅠ*amMⅠ) 1 / 2 ; If the relation a2 is satisfied, the value of ΔmMⅠ is amMⅠ; otherwise, the value of ΔmMⅠ is cmMⅠ; Relationship a3: lim (cw BI) → (cw BI * aw BI) 1 / 2 ; If the relation a3 is satisfied, the value of ΔwBI is awBI; otherwise, the value of ΔwBI is cwBI; Relationship a4: lim (cwMⅠ) → (cwMⅠ*awMⅠ) 1 / 2 ; If the relation a4 is satisfied, the value of ΔwMⅠ is awMⅠ; otherwise, the value of ΔwMⅠ is cwMⅠ; Step S147: Repeat the same steps of determining the universal medication amount and the standard BMI index for the first age group to determine the universal medication amount and the standard BMI index for the second to fourth age groups.

4. A method for intelligent management of clinical pharmacy according to claim 2, characterized in that: The specific steps of step S2 are as follows: Step S21: extracting the lesion pictures corresponding to the 1st to bnth diseases in the medical history table; extracting the main symptoms of the 1st to bnth diseases; Define the binary logical formula TT(i) {A(i), B(i)}; where the value range of i is: 1 to bn; TT(i) represents the binary of the i-th disease, A(i) represents the lesion image of the i-th disease, and B(i) represents the main symptom of the i-th disease; Use binary logical expressions to represent the pathological images and main symptoms of the first to second diseases, and obtain TT(1){A(1), B(1)}, TT(2){A(2), B(2)}~TT(bn){A(bn), B(bn)}; Step S22: constructing a disease recognition model based on TT(1) to TT(bn); Step S23: Obtain the inventory information of the purchased drugs of the target hospital, remove expired drugs, and prepare a drug purchase list.

5. A method for intelligent management of clinical pharmacy according to claim 4, characterized in that: The specific steps of step S22 are as follows: Step S221: Assume that the image input for constructing the disease recognition model is X, and the text input is Y; Step S222: constructing model 1; Step S2221: First layer: input the image and back it up twice; The convolution kernel size of the convolution layer conv1 is 5×5, the step size is 1, and the number of channels is 64; The convolution kernel size of the pooling layer pool1 is 3×3, and the step size is 2; The scaling factor of LRN layer norm1 is 0.001 / 9, and the exponential term is 0.75; Step S2222: second layer; convolution kernel size of convolution layer conv2: 5×5, step size: 1, number of channels: 128; The convolution kernel size of the pooling layer pool2 is 3×3, and the step size is 2; The scaling factor of norm2 in the LRN layer is 0.001 / 9, and the exponential term is 0.75; Step S2223: the third layer; the convolution kernel size of the convolution layer conv3 is 5×5, the step size is 1, and the number of channels is 64; The convolution kernel size of pooling layer pool3 is 3×3, and the step size is 2; Step S2224: the fourth layer; the weight matrix size of the fully connected layer local4 is: 1024×384, the initial value is 0.04; The fifth layer: the weight matrix size of the fully connected layer local5 is 384×192, and the initial value is 0.1; The weight matrix size of the Softmax layer is 192×1016, and the initial value is 0.005; Step S2225: loss function: cross entropy loss function; Optimization algorithm: gradient descent optimization algorithm; Regularization term: L1 norm; Step S223: construct model 2; Load Metathesaurus vocabulary; import Word2Vec model; The Metathesaurus vocabulary is used as the training set of the Word2Vec model to train the Word2Vec model and obtain model 2; Step S224: Use A(1)~A(bn) as the training set of model 1, and B(1)~B(bn) as the training set of model 2, and train model 1 and model 2 until the outputs of model 1 and model 2 are equal.

6. A method for intelligent management of clinical pharmacy according to claim 4, characterized in that: The specific steps of step S23 are as follows: Step S231: Obtaining inventory information of purchased drugs of the target hospital; Inventory information includes: drug name, purchase time, shelf life, purchase quantity and usage; Count the number of types of all purchased drugs, recorded as mn; the number of all purchased drugs, recorded as ms; Sum up the quantity of each purchased drug, recorded as ms1, ms2~ms mn ; ms1, ms2~ms mn And ms satisfies: ms1 + ms2 + ~ + ms mn =ms; Step S232: Process the first purchased drug, calculate the purchase amount am(1) of the first purchased drug; record the first purchased drug as the processed drug; The shelf life of the processed drugs is summarized and recorded as Yt(1)~Yt(ms1); Get the current time, recorded as nt; Step S2321: define the relational expression b1: (Yt(i)≥nt)∩(lim(nt)→Yt(i)); wherein the value range of i is 1 to ms1, and Yt(i) represents the shelf life of the i-th processed drug; Substitute Yt(1)~Yt(ms1) into relational expression b1, extract the processed drugs that satisfy relational expression b1 as expired drugs; calculate the number of expired drugs, recorded as nnm; Extract the treatment drugs that do not satisfy the relational expression b1 as available drugs; calculate the number of available drugs, recorded as yym; Among them, the relationship between nnm, yym and ms1 satisfies: nnm + yym = ms1; Step S2322: extracting the diseases treated by the treatment drugs as the judgment diseases; counting the number of the judgment diseases, recorded as yin; Step S2323: sequentially calculating the cumulative usage of the treatment drugs corresponding to the first to the yinth determined symptoms, recorded as mb(1), mb(2) to mb(yin); Arrange mb(1)~mb(yin) in descending order to obtain sequence B; Read the judgment disease corresponding to the first item in sequence B as the matching disease of the treatment drug, recorded as disease α; Step S2324: Obtain the total number of residents in the target area, recorded as pn; read the number of medical records of disease α in the past three years, recorded as bα(1), bα(2) and bα(3); Read the purchase and usage of treatment drugs in the past three years; In the first year, the purchase amount is om1 and the usage amount is im1; In the second year, the purchase amount is om2 and the use amount is im2; In the third year, the purchase amount is om3 and the usage amount is im3; Step S2325: Based on the data in step S2324, determine the purchase quantity of the treatment drug; Step S233: Repeat the same steps of processing the first purchased drug, remove expired drugs from the second to the mn-th purchased drugs, and calculate the purchase quantities of the second to the mn-th purchased drugs am(2) to am(mn); Step S234: Summarize the purchase quantities of the 1st to mnth purchased drugs, am(1)~am(mn), to obtain a drug purchase table.

7. A method for intelligent management of clinical pharmacy according to claim 6, characterized in that: The specific steps of step S2325 are as follows: Step S23251: Calculate the input and output ratios io1, io2 and io3 of the drugs processed in the past three years; io1 = im1 / om1; io2 = im2 / om2; io3 = im3 / om3; Calculate the incidence of disease α in the past three years, recorded as pi1, pi2 and pi3; pi1 = bα (1) / pn; pi2 = bα (2) / pn; pi3 = bα (3) / pn; Step S23252: Calculate the incidence rate of disease α, recorded as pi 1-2 and pi 2-3 ; best 1-2 =(pi2-pi1) / pi1;pi 2-3 =(pi3-pi2) / pi2; Construct a state transfer matrix, denoted as matrix j; matrix j is as follows: ; Where n represents the number of iterations of matrix j, × represents matrix multiplication; n is a natural number, and its initial value is 1; each time matrix j is iterated, n is increased by 1 on the original basis; Use the NumPy library function to iterate the matrix j and obtain the steady-state transfer matrix, which is recorded as matrix j1; Step S23253: define a 3×1 matrix of (1 / 3, 1 / 3, 1 / 3) as parameter matrix 1; calculate the result of multiplying matrix j1 by parameter matrix 1, recorded as matrix j2; Read the outputs in matrix j2 in sequence, denoted as upi1 and upi2 respectively; Calculate the average of upi1 and upi2, denoted as api; Step S23254: read the number of medical records of disease α this year, recorded as bα`; calculate the incidence rate of the current disease α, recorded as pi`; pi`=bα` / pn; The purchase volume of processed drugs is recorded as am(1), am(1) = (|api-pi`| / api)*yym.

8. A smart management system for clinical pharmacy, applicable to any one of claims 1-7 for smart management method for clinical pharmacy, characterized in that: The management system comprises: Medical record mining module: used to obtain the medical record information of the target hospital; extract and summarize the patient information, disease information and medication information of each disease in the medical record information to obtain the medical record table; extract the common medicine and main disease of each disease in turn based on the medical record table, extract the common medicine dosage and standard BMI index, and obtain the drug matching information corresponding to each disease; The comprehensive summary module includes: a condition extraction submodule and a drug management submodule; Disease extraction submodule: used to extract the disease information of each disease in the medical record information; build a disease recognition model based on the disease information; Drug management submodule: used to obtain the inventory information of the purchased drugs of the target hospital, and eliminate expired drugs according to the inventory information; extract the medical record information of the target hospital in the past three years as reference medical record information; analyze the incidence rate of the target area based on the reference medical record information, and formulate a drug purchase table in combination with the inventory information and drug matching information; Drug recommendation module: used to obtain the patient's examination report; extract the patient's lesion pictures and symptoms in the examination report as the input of the disease recognition model to determine the patient's disease and reference medication; then extract the patient's gender, age and BMI index in the examination report, determine the dosage of the reference medication, and obtain a diagnosis report; Physician interaction module: used to summarize diagnosis reports and drug purchase forms.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 7 are executed.

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

Citation Information

Patent Citations

  • Rheumatic immune drug recommendation method, system and device

    CN112116978A

  • Auxiliary prescription system based on medical big data

    CN114334070A