CN116631562B - Method and device for generating discharge records of electronic medical records and electronic equipment - Google Patents
Method and device for generating discharge records of electronic medical records and electronic equipment Download PDFInfo
- Publication number
- CN116631562B CN116631562B CN202310905314.5A CN202310905314A CN116631562B CN 116631562 B CN116631562 B CN 116631562B CN 202310905314 A CN202310905314 A CN 202310905314A CN 116631562 B CN116631562 B CN 116631562B
- Authority
- CN
- China
- Prior art keywords
- record
- historical
- discharge
- language model
- electronic medical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000011282 treatment Methods 0.000 claims abstract description 141
- 208000028659 discharge Diseases 0.000 claims description 114
- 238000003745 diagnosis Methods 0.000 claims description 70
- 238000012549 training Methods 0.000 claims description 20
- 238000012360 testing method Methods 0.000 claims description 13
- QVFWZNCVPCJQOP-UHFFFAOYSA-N chloralodol Chemical compound CC(O)(C)CC(C)OC(O)C(Cl)(Cl)Cl QVFWZNCVPCJQOP-UHFFFAOYSA-N 0.000 claims description 9
- 230000002787 reinforcement Effects 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 7
- 238000002560 therapeutic procedure Methods 0.000 claims description 5
- 230000002159 abnormal effect Effects 0.000 claims description 3
- 238000010276 construction Methods 0.000 claims description 3
- 238000007689 inspection Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 abstract description 2
- 230000006698 induction Effects 0.000 abstract 1
- 206010011224 Cough Diseases 0.000 description 33
- 238000001990 intravenous administration Methods 0.000 description 32
- 230000002924 anti-infective effect Effects 0.000 description 20
- 201000010099 disease Diseases 0.000 description 14
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 14
- 238000000889 atomisation Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 13
- 210000004369 blood Anatomy 0.000 description 12
- 239000008280 blood Substances 0.000 description 12
- 239000003814 drug Substances 0.000 description 12
- 239000000443 aerosol Substances 0.000 description 11
- 208000015181 infectious disease Diseases 0.000 description 11
- 229960005264 piperacillin sodium Drugs 0.000 description 10
- WCMIIGXFCMNQDS-IDYPWDAWSA-M piperacillin sodium Chemical compound [Na+].O=C1C(=O)N(CC)CCN1C(=O)N[C@H](C=1C=CC=CC=1)C(=O)N[C@@H]1C(=O)N2[C@@H](C([O-])=O)C(C)(C)S[C@@H]21 WCMIIGXFCMNQDS-IDYPWDAWSA-M 0.000 description 10
- TYZROVQLWOKYKF-ZDUSSCGKSA-N linezolid Chemical compound O=C1O[C@@H](CNC(=O)C)CN1C(C=C1F)=CC=C1N1CCOCC1 TYZROVQLWOKYKF-ZDUSSCGKSA-N 0.000 description 9
- 229960003907 linezolid Drugs 0.000 description 9
- 208000035143 Bacterial infection Diseases 0.000 description 8
- VOVIALXJUBGFJZ-KWVAZRHASA-N Budesonide Chemical compound C1CC2=CC(=O)C=C[C@]2(C)[C@@H]2[C@@H]1[C@@H]1C[C@H]3OC(CCC)O[C@@]3(C(=O)CO)[C@@]1(C)C[C@@H]2O VOVIALXJUBGFJZ-KWVAZRHASA-N 0.000 description 8
- 208000022362 bacterial infectious disease Diseases 0.000 description 8
- 238000013276 bronchoscopy Methods 0.000 description 8
- 229960004436 budesonide Drugs 0.000 description 8
- DGAQECJNVWCQMB-PUAWFVPOSA-M Ilexoside XXIX Chemical compound C[C@@H]1CC[C@@]2(CC[C@@]3(C(=CC[C@H]4[C@]3(CC[C@@H]5[C@@]4(CC[C@@H](C5(C)C)OS(=O)(=O)[O-])C)C)[C@@H]2[C@]1(C)O)C)C(=O)O[C@H]6[C@@H]([C@H]([C@@H]([C@H](O6)CO)O)O)O.[Na+] DGAQECJNVWCQMB-PUAWFVPOSA-M 0.000 description 7
- 230000008859 change Effects 0.000 description 7
- 238000002271 resection Methods 0.000 description 7
- 229910052708 sodium Inorganic materials 0.000 description 7
- 239000011734 sodium Substances 0.000 description 7
- 238000002636 symptomatic treatment Methods 0.000 description 7
- 206010028980 Neoplasm Diseases 0.000 description 6
- 206010039101 Rhinorrhoea Diseases 0.000 description 6
- 230000009471 action Effects 0.000 description 6
- 208000010753 nasal discharge Diseases 0.000 description 6
- 210000002345 respiratory system Anatomy 0.000 description 6
- 206010002091 Anaesthesia Diseases 0.000 description 5
- PWKSKIMOESPYIA-BYPYZUCNSA-N L-N-acetyl-Cysteine Chemical compound CC(=O)N[C@@H](CS)C(O)=O PWKSKIMOESPYIA-BYPYZUCNSA-N 0.000 description 5
- 206010037660 Pyrexia Diseases 0.000 description 5
- 229960004308 acetylcysteine Drugs 0.000 description 5
- 230000037005 anaesthesia Effects 0.000 description 5
- 206010006451 bronchitis Diseases 0.000 description 5
- 238000002224 dissection Methods 0.000 description 5
- 210000001165 lymph node Anatomy 0.000 description 5
- NDIURPSCHWTXDC-UHFFFAOYSA-N 2-(4,5-dimethoxy-2-nitrophenyl)acetohydrazide Chemical compound COC1=CC(CC(=O)NN)=C([N+]([O-])=O)C=C1OC NDIURPSCHWTXDC-UHFFFAOYSA-N 0.000 description 4
- 206010006448 Bronchiolitis Diseases 0.000 description 4
- 206010008479 Chest Pain Diseases 0.000 description 4
- 239000004378 Glycyrrhizin Substances 0.000 description 4
- 230000000740 bleeding effect Effects 0.000 description 4
- 150000001875 compounds Chemical class 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000011156 evaluation Methods 0.000 description 4
- LPLVUJXQOOQHMX-UHFFFAOYSA-N glycyrrhetinic acid glycoside Natural products C1CC(C2C(C3(CCC4(C)CCC(C)(CC4C3=CC2=O)C(O)=O)C)(C)CC2)(C)C2C(C)(C)C1OC1OC(C(O)=O)C(O)C(O)C1OC1OC(C(O)=O)C(O)C(O)C1O LPLVUJXQOOQHMX-UHFFFAOYSA-N 0.000 description 4
- 229960004949 glycyrrhizic acid Drugs 0.000 description 4
- UYRUBYNTXSDKQT-UHFFFAOYSA-N glycyrrhizic acid Natural products CC1(C)C(CCC2(C)C1CCC3(C)C2C(=O)C=C4C5CC(C)(CCC5(C)CCC34C)C(=O)O)OC6OC(C(O)C(O)C6OC7OC(O)C(O)C(O)C7C(=O)O)C(=O)O UYRUBYNTXSDKQT-UHFFFAOYSA-N 0.000 description 4
- 235000019410 glycyrrhizin Nutrition 0.000 description 4
- LPLVUJXQOOQHMX-QWBHMCJMSA-N glycyrrhizinic acid Chemical compound O([C@@H]1[C@@H](O)[C@H](O)[C@H](O[C@@H]1O[C@@H]1C([C@H]2[C@]([C@@H]3[C@@]([C@@]4(CC[C@@]5(C)CC[C@@](C)(C[C@H]5C4=CC3=O)C(O)=O)C)(C)CC2)(C)CC1)(C)C)C(O)=O)[C@@H]1O[C@H](C(O)=O)[C@@H](O)[C@H](O)[C@H]1O LPLVUJXQOOQHMX-QWBHMCJMSA-N 0.000 description 4
- 239000005556 hormone Substances 0.000 description 4
- 229940088597 hormone Drugs 0.000 description 4
- 239000007788 liquid Substances 0.000 description 4
- 210000004185 liver Anatomy 0.000 description 4
- 230000001502 supplementing effect Effects 0.000 description 4
- 208000024891 symptom Diseases 0.000 description 4
- 229960000373 tazobactam sodium Drugs 0.000 description 4
- 238000002604 ultrasonography Methods 0.000 description 4
- HSRJKNPTNIJEKV-UHFFFAOYSA-N Guaifenesin Chemical compound COC1=CC=CC=C1OCC(O)CO HSRJKNPTNIJEKV-UHFFFAOYSA-N 0.000 description 3
- 150000001412 amines Chemical class 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 3
- 239000002775 capsule Substances 0.000 description 3
- 208000013116 chronic cough Diseases 0.000 description 3
- 239000012530 fluid Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000002695 general anesthesia Methods 0.000 description 3
- 229960002146 guaifenesin Drugs 0.000 description 3
- 238000001802 infusion Methods 0.000 description 3
- 238000002347 injection Methods 0.000 description 3
- 239000007924 injection Substances 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 238000013059 nephrectomy Methods 0.000 description 3
- VSZGPKBBMSAYNT-RRFJBIMHSA-N oseltamivir Chemical compound CCOC(=O)C1=C[C@@H](OC(CC)CC)[C@H](NC(C)=O)[C@@H](N)C1 VSZGPKBBMSAYNT-RRFJBIMHSA-N 0.000 description 3
- 229960003752 oseltamivir Drugs 0.000 description 3
- TUPFOYXHAYOHIB-YCAIQWGJSA-M sodium;(2s,5r,6r)-6-[[(2r)-2-[(4-ethyl-2,3-dioxopiperazine-1-carbonyl)amino]-2-phenylacetyl]amino]-3,3-dimethyl-7-oxo-4-thia-1-azabicyclo[3.2.0]heptane-2-carboxylate;(2s,3s,5r)-3-methyl-4,4,7-trioxo-3-(triazol-1-ylmethyl)-4$l^{6}-thia-1-azabicyclo[3.2.0]h Chemical compound [Na+].C([C@]1(C)S([C@H]2N(C(C2)=O)[C@H]1C(O)=O)(=O)=O)N1C=CN=N1.O=C1C(=O)N(CC)CCN1C(=O)N[C@H](C=1C=CC=CC=1)C(=O)N[C@@H]1C(=O)N2[C@@H](C([O-])=O)C(C)(C)S[C@@H]21 TUPFOYXHAYOHIB-YCAIQWGJSA-M 0.000 description 3
- 238000001356 surgical procedure Methods 0.000 description 3
- 239000006188 syrup Substances 0.000 description 3
- 235000020357 syrup Nutrition 0.000 description 3
- LITBAYYWXZOHAW-XDZRHBBOSA-N (2s,5r,6r)-6-[[(2r)-2-[(4-ethyl-2,3-dioxopiperazine-1-carbonyl)amino]-2-phenylacetyl]amino]-3,3-dimethyl-7-oxo-4-thia-1-azabicyclo[3.2.0]heptane-2-carboxylic acid;(2s,3s,5r)-3-methyl-4,4,7-trioxo-3-(triazol-1-ylmethyl)-4$l^{6}-thia-1-azabicyclo[3.2.0]hept Chemical compound C([C@]1(C)S([C@H]2N(C(C2)=O)[C@H]1C(O)=O)(=O)=O)N1C=CN=N1.O=C1C(=O)N(CC)CCN1C(=O)N[C@H](C=1C=CC=CC=1)C(=O)N[C@@H]1C(=O)N2[C@@H](C(O)=O)C(C)(C)S[C@@H]21 LITBAYYWXZOHAW-XDZRHBBOSA-N 0.000 description 2
- 206010006458 Bronchitis chronic Diseases 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 2
- 235000012766 Cannabis sativa ssp. sativa var. sativa Nutrition 0.000 description 2
- 235000012765 Cannabis sativa ssp. sativa var. spontanea Nutrition 0.000 description 2
- NCFTXMQPRQZFMZ-WERGMSTESA-M Cefoperazone sodium Chemical compound [Na+].O=C1C(=O)N(CC)CCN1C(=O)N[C@H](C=1C=CC(O)=CC=1)C(=O)N[C@@H]1C(=O)N2C(C([O-])=O)=C(CSC=3N(N=NN=3)C)CS[C@@H]21 NCFTXMQPRQZFMZ-WERGMSTESA-M 0.000 description 2
- 206010009137 Chronic sinusitis Diseases 0.000 description 2
- HTTJABKRGRZYRN-UHFFFAOYSA-N Heparin Chemical compound OC1C(NC(=O)C)C(O)OC(COS(O)(=O)=O)C1OC1C(OS(O)(=O)=O)C(O)C(OC2C(C(OS(O)(=O)=O)C(OC3C(C(O)C(O)C(O3)C(O)=O)OS(O)(=O)=O)C(CO)O2)NS(O)(=O)=O)C(C(O)=O)O1 HTTJABKRGRZYRN-UHFFFAOYSA-N 0.000 description 2
- NKZMPZCWBSWAOX-IBTYICNHSA-M Sulbactam sodium Chemical compound [Na+].O=S1(=O)C(C)(C)[C@H](C([O-])=O)N2C(=O)C[C@H]21 NKZMPZCWBSWAOX-IBTYICNHSA-M 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 230000001919 adrenal effect Effects 0.000 description 2
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 235000009120 camo Nutrition 0.000 description 2
- 201000011510 cancer Diseases 0.000 description 2
- 229960002417 cefoperazone sodium Drugs 0.000 description 2
- 235000005607 chanvre indien Nutrition 0.000 description 2
- 208000007451 chronic bronchitis Diseases 0.000 description 2
- 208000027157 chronic rhinosinusitis Diseases 0.000 description 2
- 238000005345 coagulation Methods 0.000 description 2
- 230000015271 coagulation Effects 0.000 description 2
- 239000002872 contrast media Substances 0.000 description 2
- 229940079593 drug Drugs 0.000 description 2
- 238000002565 electrocardiography Methods 0.000 description 2
- 210000003743 erythrocyte Anatomy 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000002637 fluid replacement therapy Methods 0.000 description 2
- 239000011487 hemp Substances 0.000 description 2
- 229960002897 heparin Drugs 0.000 description 2
- 229920000669 heparin Polymers 0.000 description 2
- JEIPFZHSYJVQDO-UHFFFAOYSA-N iron(III) oxide Inorganic materials O=[Fe]O[Fe]=O JEIPFZHSYJVQDO-UHFFFAOYSA-N 0.000 description 2
- 210000003734 kidney Anatomy 0.000 description 2
- JVTAAEKCZFNVCJ-UHFFFAOYSA-N lactic acid Chemical compound CC(O)C(O)=O JVTAAEKCZFNVCJ-UHFFFAOYSA-N 0.000 description 2
- 238000002350 laparotomy Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000001301 oxygen Substances 0.000 description 2
- 229910052760 oxygen Inorganic materials 0.000 description 2
- 230000000803 paradoxical effect Effects 0.000 description 2
- 230000000241 respiratory effect Effects 0.000 description 2
- 208000026425 severe pneumonia Diseases 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 229960000614 sulbactam sodium Drugs 0.000 description 2
- 239000013589 supplement Substances 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- XWTYSIMOBUGWOL-UHFFFAOYSA-N (+-)-Terbutaline Chemical compound CC(C)(C)NCC(O)C1=CC(O)=CC(O)=C1 XWTYSIMOBUGWOL-UHFFFAOYSA-N 0.000 description 1
- 208000028399 Critical Illness Diseases 0.000 description 1
- 206010012735 Diarrhoea Diseases 0.000 description 1
- 102000008857 Ferritin Human genes 0.000 description 1
- 238000008416 Ferritin Methods 0.000 description 1
- 108050000784 Ferritin Proteins 0.000 description 1
- 241000282412 Homo Species 0.000 description 1
- 206010048612 Hydrothorax Diseases 0.000 description 1
- 206010020751 Hypersensitivity Diseases 0.000 description 1
- 206010067125 Liver injury Diseases 0.000 description 1
- 208000002151 Pleural effusion Diseases 0.000 description 1
- 206010061481 Renal injury Diseases 0.000 description 1
- 210000001015 abdomen Anatomy 0.000 description 1
- 208000026935 allergic disease Diseases 0.000 description 1
- 230000000840 anti-viral effect Effects 0.000 description 1
- MQTOSJVFKKJCRP-BICOPXKESA-N azithromycin Chemical compound O([C@@H]1[C@@H](C)C(=O)O[C@@H]([C@@]([C@H](O)[C@@H](C)N(C)C[C@H](C)C[C@@](C)(O)[C@H](O[C@H]2[C@@H]([C@H](C[C@@H](C)O2)N(C)C)O)[C@H]1C)(C)O)CC)[C@H]1C[C@@](C)(OC)[C@@H](O)[C@H](C)O1 MQTOSJVFKKJCRP-BICOPXKESA-N 0.000 description 1
- 229960004099 azithromycin Drugs 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000009640 blood culture Methods 0.000 description 1
- 230000036772 blood pressure Effects 0.000 description 1
- 230000036760 body temperature Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 230000001427 coherent effect Effects 0.000 description 1
- 230000009193 crawling Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000003792 electrolyte Substances 0.000 description 1
- 230000008713 feedback mechanism Effects 0.000 description 1
- 239000007789 gas Substances 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000009610 hypersensitivity Effects 0.000 description 1
- 238000011419 induction treatment Methods 0.000 description 1
- 206010022000 influenza Diseases 0.000 description 1
- 208000037806 kidney injury Diseases 0.000 description 1
- 235000014655 lactic acid Nutrition 0.000 description 1
- 239000004310 lactic acid Substances 0.000 description 1
- 210000000265 leukocyte Anatomy 0.000 description 1
- 230000003908 liver function Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000036210 malignancy Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000002601 radiography Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 238000004062 sedimentation Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 201000009890 sinusitis Diseases 0.000 description 1
- 229960000195 terbutaline Drugs 0.000 description 1
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H10/00—ICT specially adapted for the handling or processing of patient-related medical or healthcare data
- G16H10/60—ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Health & Medical Sciences (AREA)
- Engineering & Computer Science (AREA)
- Epidemiology (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Primary Health Care (AREA)
- Public Health (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The application provides a method and device for generating an electronic medical record discharge record and electronic equipment, wherein the method comprises the following steps: constructing an electronic medical record discharge recording rule template, wherein the electronic medical record discharge recording rule template comprises discharge information and treatment passes; acquiring electronic medical record data; generating discharge information based on the electronic medical record data and the discharge recording rule template; and outputting a treatment pass based on the electronic medical record data and the pre-trained medical large language model. Through constructing high-efficient accurate rule template, draw patient information effectively, simultaneously, utilize the technique that generates based on big language model, treat through induction processing to the treatment of many days, this application can take into account rule template and model generation to provide higher quality text, promote the readability, and satisfy medical field's demand better.
Description
Technical Field
The present invention relates to the field of natural language processing, and in particular, to a method and an apparatus for generating an electronic medical record discharge record, and an electronic device.
Background
With the continuous development of medical informatization technology, automatic discharge records have become a trend of medical informatization. The automatic recording discharge records can lighten the workload of doctors, improve the normalization and accuracy of the records, and improve the quality and efficiency of medical services. Currently, automatically recorded discharge records are widely used in various hospitals and become an important component of medical informatization. The automatic discharge record can not only lighten the workload of doctors, but also improve the quality and efficiency of medical service and provide better medical service for patients. The method for automatically generating the discharge records of the electronic medical records in the prior art mainly comprises the following steps: 1. the rule-based generation method comprises the following steps: and automatically generating discharge record content according to preset rules and templates. This method is applicable to some simple discharge records, such as common outpatient discharge records. 2. The generation method based on the model comprises the following steps: new discharge record content is learned and generated from a large amount of existing discharge record data using techniques such as machine learning or deep learning. This method is applicable to complex discharge records, such as hospital discharge records.
While the method of automatically generating electronic medical record discharge records has many advantages, there are also several objective disadvantages, including: 1. rule-based generation methods require predefining a series of rules that may not cover all medical conditions, especially for complex medical passes, which may not be fully described; 2. model-based generation methods require reliance on large-scale language models to generate electronic medical record discharge records by simulating the human language generation process. Although this approach performs very well in processing natural language, in the medical field, due to the expertise of medical terms and expressions, the records they produce may present some inaccuracy problems, even in cases of serious misleading.
Disclosure of Invention
The technical aim to be achieved by the embodiment of the application is to provide a method, a device and electronic equipment for generating an electronic medical record discharge record, which are used for solving the problem that a complex diagnosis and treatment process cannot be generated by a current rule-based generation method.
In order to solve the above technical problems, an embodiment of the present application provides a method for generating an electronic medical record discharge record, including:
constructing an electronic medical record discharge recording rule template, wherein the electronic medical record discharge recording rule template comprises discharge information and treatment passes;
Acquiring electronic medical record data;
generating discharge information based on the electronic medical record data and the discharge recording rule template;
and outputting a treatment pass based on the electronic medical record data and the pre-trained medical large language model.
Optionally, the electronic medical record discharge recording rule template further comprises a diagnosis and treatment pass, wherein the diagnosis and treatment pass comprises a test result, an inspection result and the treatment pass;
the admission information comprises admission date, admission diagnosis, discharge diagnosis, admission condition, discharge condition and discharge doctor orders.
Optionally, the method further comprises:
the electronic medical record data comprises a laboratory information system report and a radiological examination report;
extracting a test list and a test result from the laboratory information system report, and reading an abnormal value to generate the test result;
reading all fields from the radiological examination report, generating the examination result.
Optionally, the outputting treatment passes based on the electronic medical record data and the pre-trained medical large language model includes:
extracting diagnostic information, ward round records and/or operation records from the electronic medical record data;
inputting the diagnostic information, the ward record, and/or the surgical record into the medical large language model to generate the treatment pass.
Optionally, before the outputting treatment passes, the electronic medical record data and the pre-trained medical large language model further comprise a trained medical large language model, and the trained medical large language model comprises:
extracting historical diagnostic information, historical ward round records and/or historical operation records;
extracting treatment passes in the historical discharge records;
training to generate a large language model by taking the historical diagnosis information, the historical ward record and/or the historical operation record as input and taking the treatment progress in the historical discharge record as output;
and fine-tuning the generated large language model in a Lora mode to obtain a fine-tuned large language model.
Optionally, the training medical large language model further includes:
taking the historical diagnosis information, the historical ward-round record and/or the historical operation record as input, constructing two treatment passes as output, sequencing the two treatment passes, and training a reward model in a Lora mode;
and performing reinforcement learning on the fine-tuning large language model based on the reward model to obtain the medical large language model.
Optionally, the reinforcement learning of the fine-tuning large language model based on the reward model to obtain the medical large language model includes:
The fine-tuning large language model comprises a first fine-tuning large language model and a second fine-tuning large language model;
inputting the historical diagnosis information, the historical ward round record and/or the historical operation record into the first fine-tuning large language model and the second fine-tuning large language model respectively to obtain a first treatment pass and a second treatment pass;
comparing the first treatment pass to the second treatment pass, calculating a penalty term for the difference;
inputting a second therapy to the reward model to obtain a scalar reward;
and adjusting the second fine-tuning large language model based on the punishment items of the differences and the scalar rewards to obtain the medical large language model.
In a second aspect, an embodiment of the present application provides an apparatus for generating an electronic medical record discharge record, including:
the rule template construction module is used for constructing an electronic medical record discharge recording rule template, wherein the electronic medical record discharge recording rule template comprises discharge information and treatment passes;
the acquisition module is used for acquiring the electronic medical record data;
the first output module is used for generating discharge information based on the electronic medical record data and the discharge record rule template;
And the second output module is used for outputting treatment passes based on the electronic medical record data and the pre-trained medical large language model.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program implementing, when executed by the processor, a method step of generating an electronic medical record discharge record according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of a method of generating an electronic medical record discharge record as described above.
Compared with the prior art, the method, the device and the electronic equipment for generating the discharge records of the electronic medical records have the following beneficial effects:
the method comprises the steps of constructing an electronic medical record discharge recording rule template, wherein the electronic medical record discharge recording rule template comprises discharge information and treatment passes; acquiring electronic medical record data; generating discharge information based on the electronic medical record data and the discharge recording rule template; and outputting a treatment pass based on the electronic medical record data and the pre-trained medical large language model. By constructing an efficient and accurate rule template, patient information is effectively extracted and filled into designated fields of the discharge records. Meanwhile, by using a technology based on large language model generation, treatment of multiple days is subjected to induction treatment to generate a clear and more accurate treatment description. The method and the device can give consideration to rule template and model generation so as to provide texts with higher quality, improve readability and better meet the requirements of the medical field.
Drawings
FIG. 1 is a flow chart of one embodiment of a method of generating an electronic medical record discharge record of the present application;
FIG. 2 is a schematic diagram of the rule and large model based generation of electronic medical record discharge records of the present application;
FIG. 3 is a flow chart of modeling of an embodiment of a method of generating an electronic medical record discharge record of the present application;
FIG. 4 is a schematic diagram of a modeling architecture of an embodiment of the present application for generating an electronic medical record discharge record;
FIG. 5 is a flow chart of modeling of yet another embodiment of a method of generating an electronic medical record discharge record of the present application;
FIG. 6 is a schematic diagram of a model building architecture of yet another embodiment of the present application for generating an electronic medical record discharge record;
fig. 7 is a block diagram of an apparatus for generating an electronic medical record discharge record according to the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Referring to fig. 1, a preferred embodiment of the present application provides a method of generating an electronic medical record discharge record for a device, such as a computer, for example, a hospital data platform, that can obtain an electronic medical record, wherein the method includes:
step S101, an electronic medical record discharge recording rule template is constructed.
The electronic medical record discharge recording rule template comprises discharge and admission information and diagnosis and treatment passes, wherein the discharge and admission information comprises discharge date, discharge diagnosis, discharge condition and discharge doctor orders; the diagnosis and treatment pass includes a test result, an examination result and a treatment pass.
Step S102, acquiring electronic medical record data.
The manner of acquiring electronic medical record data may be to directly acquire desensitized electronic medical record data from a hospital system; the electronic medical records and the electronic medical dictionary can be obtained by crawling knowledge data of a plurality of medical health websites and Chinese encyclopedia medical websites through a crawler technology, and are sorted and classified.
And step S103, generating discharge information based on the electronic medical record data and the discharge record rule template.
In one embodiment, a preset recognition model and a preset rule engine can be adopted to recognize the electronic medical record data respectively, and a first recognition result output by the preset recognition model and a second recognition result output by the preset rule engine are obtained; the preset recognition model comprises a named entity recognition model, and the named entity model is used for recognizing texts in the electronic medical record data so as to determine named entity types corresponding to each word; the preset rule engine is used for determining the named entity type corresponding to each word according to the preset context rule; and generating a target analysis result of the electronic medical record data according to the first identification result and the second identification result. Therefore, the automatic generation of the analysis result of the medical record based on the named entity recognition model and the recognition result of the rule engine is realized, and the accuracy of the analysis result of the medical record is ensured.
The named entity model is used for identifying texts in the target medical record data so as to determine named entity types corresponding to the words; named entities may refer to entities identified by names, and named entity types may refer to types to which the entities correspond, for example: symptoms, diseases, tests, examinations, medicines, surgical treatments, site and physical examinations, and the like, to which embodiments of the present invention are not limited.
The preset rule engine can be used for determining the named entity type corresponding to each word according to the preset context rule; the rule engine is developed by an inference engine and is a component embedded in an application program, which implements the separation of business decisions from application code and the writing of business decisions using predefined semantic modules. And receiving data input, interpreting the business rule, and making a business decision according to the business rule.
The preset context rule may be set according to actual situations, and the preset context rule may be used to determine a named entity type corresponding to a word/sentence based on a context of the word/sentence in the target medical record data.
In another embodiment, the method for generating the discharge and admission information based on the electronic medical record data and the discharge recording rule template may be that a medical record type and a sub-topic content block corresponding to each electronic medical record text in a specified electronic medical record text are determined according to a preset medical record type, a sub-topic classification model and the specified electronic medical record text; according to the term dictionary, a parser analyzer extracts a rule template, a medical record type and a sub-subject content block to obtain structural information corresponding to each electronic medical record text; and obtaining the disease course abstract corresponding to each electronic medical record text according to the abstract generation rule corresponding to the medical record type and the structural information corresponding to each electronic medical record text.
Specifically, referring to fig. 2, an admission date of the electronic medical record discharge record may be generated from an "admission record-admission time" field in the electronic medical record; a admission diagnosis of the electronic medical record discharge record may be generated from an "admission record-admission diagnosis/preliminary diagnosis" field in the electronic medical record; a discharge diagnosis of the discharge record of the electronic medical record may be generated from a "ward record-revision diagnosis/present diagnosis" field in the electronic medical record; the admission condition of the discharge records of the electronic medical records can be generated from the fields of the admission records/first course of disease-main complaints and current medical history in the electronic medical records; the discharge condition of the discharge record of the electronic medical record can be generated from the ' ward record-symptom and ' check body ' field in the electronic medical record; the discharge order of the discharge record of the electronic medical record can be generated from the fields of 'discharge order (medicine order) +department template' in the electronic medical record.
In the embodiment of the invention, the inspection result and the examination result can be generated based on the electronic medical record and the discharge recording rule template. In particular, the electronic medical record data includes laboratory information system reports (LIS reports) and radiological examination reports (RIS reports). Extracting a test list and a test result from the LIS report, reading an abnormal value, and generating the test result; reading all fields from the radiological examination report, generating the examination result.
According to the embodiment of the invention, the information extraction of the specific fields in the electronic medical record can be realized by designing and constructing the efficient and accurate rule template. These rule templates are based on medical expertise and criteria, and are capable of accurately identifying and extracting critical patient information, including admission diagnosis, discharge diagnosis, admission and discharge, etc. The rule templates are designed to take into account the variations of different cases and medical conditions to ensure broad applicability and accuracy of information extraction.
Step S104, based on the electronic medical record data and the pre-trained medical large language model, outputting treatment passes.
Specifically, extracting diagnosis information, ward round records and/or operation records from the electronic medical record data; and inputting the diagnosis information and the ward record or the diagnosis information and the operation record into the medical large language model to generate treatment passes, including treatment schemes, medication conditions, operation processes and the like.
In this embodiment, the Medical large language model is a Medical-LLM-Sft model, and diagnosis and ward round records or diagnosis and operation record information corresponding to the patient are used to construct a Prompt, and the Prompt is input into the Medical-LLM-Sft model to generate a treatment pass of the discharge record. For example, prompt: { diagnosis }; { ward record }, extracting medicine information recorded by ward to generate the treatment course of the current diagnosis; prompt: { diagnosis }; { surgical records }, the surgical information of the surgical records is extracted to generate the treatment pass of the current diagnosis.
In another embodiment, outputting the therapy pass further comprises training the medical large language model prior to the medical large language model based on the electronic medical record data and the pre-training. Taking Medical large language model as Medical-LLM-Sft model as an example, please refer to FIG. 3 and FIG. 4, which is a Medical-LLM-Sft model training process provided by an embodiment of the present invention.
In step S201, data is collected and preprocessed.
First, a large amount of electronic medical record data needs to be collected, cleaned, deduplicated, and normalized.
Step S202, effective information of diagnosis information, ward records and operation records of the patient is extracted to construct a Prompt, and treatment in the discharge records is extracted to construct a Target.
The effective information in the operation record and the ward record is extracted in a regular mode, for example, only the information of operation time, operation name, anesthesia mode, operation pass and the like is extracted for the operation record, and the information of treatment aspect, treatment method and the like is mainly extracted for the ward record. The following is shown:
prompt { diagnosis }; { ward round record }. And extracting medicine information recorded in the ward round to generate the treatment pass of the current diagnosis.
Diagnosis: chronic cough, bronchitis and sinusitis.
Surgical records/ward records: 2023-04-20: diagnosis and treatment plan: 1. perfecting the correlation check: such as three general, blood-qi, biochemistry, respiratory etiology, ultrasound, and electrocardiography. 2. The children with cough and yellow nasal discharge consider the bacterial infection, and the anti-infection treatment of piperacillin tazobactam is carried out;
2023-04-21: on the treatment: the children with repeated cough has longer time and nasosinusitis, and the bacterial infection is considered, and the intravenous drip anti-infection and atomization inhalation treatment of piperacillin sodium tazosulbactam sodium, 0.5g, are performed for the treatment of the paradoxical bronchoscopy.
2023-04-22: the cough and nasal discharge of the children are improved, the treatment is effective, the anti-infection and atomization inhalation treatment of piperacillin sodium and tazobactam sodium for 0.5g q8h are continued, and the follow-up is observed.
2023-04-22: on the treatment: the children with repeated cough has longer time and nasosinusitis, and the bacterial infection is considered, and the piperacillin sodium tazosulbactam sodium 0.5g q8h intravenous drip anti-infection and atomization inhalation treatment are performed, so that the children with repeated cough are observed.
2023-04-24: at present, cough and nasal discharge of the infant are improved, the treatment is effective, the infection resistance and atomization inhalation treatment of piperacillin sodium tazosulbactam sodium 0.5g q8h intravenous drip are continued, and the fiber bronchoscopy of the infant shows that: left main bronchiolitis, bronchitis, considering the possibility of external pressure, it is recommended to enhance CT-chest macroangiography to clarify the cause of left main bronchiolitis, followed by observation.
2023-04-25: after admission, perfecting the related examination, and carrying out symptomatic treatment such as aerosol inhalation and fluid replacement on piperacillin sodium tazobactam sodium 0.5g q8h intravenous drip anti-infection (4.20-4.25), wherein the process is smooth and the ward is returned by 4.21 bronchoscopy. The children with cough can be discharged from the hospital as the general condition is that the children with cough are improved and have no fever.
Target (treatment process) is to perfect the relevant examination after admission, to prevent infection by intravenous drip of piperacillin sodium tazobactam sodium 0.5g q8h (4.20-4.25), and to treat symptomatic treatment such as aerosol inhalation and fluid infusion, 4.21 bronchoscopy, smooth process and ward return. The children with cough can be discharged from the hospital as the general condition is that the children with cough are improved and have no fever.
Prompt: { diagnosis }; { ward round record }. And extracting medicine information recorded in the ward round to generate the treatment pass of the current diagnosis.
Diagnosis: 1. severe pneumonia 2. Pleural effusion.
Surgical records/ward records: 2023-03-20: diagnosis and treatment plan: 1. the infant is at risk, and oxygen saturation, blood pressure and the like are monitored; 2. perfecting blood routine, blood biochemistry, blood culture, abdomen color ultrasound, heart color ultrasound, chest CT flat scanning and other examination; 2. the infant is repeatedly heated, the cough is severe, the hemogram white blood cells are high, CRP is high, the possibility of bacterial infection is considered to be combined, the ceftioxime sodium needle and the azithromycin needle are combined with the intravenous drip anti-infection needle in the clinic, the medicine is temporarily regulated, the medicine is further used after perfecting the related examination, the oral antiviral of 75mg bid of oseltamivir capsules is continued, and the symptomatic treatment such as cough relieving is carried out by assisting with aerosol inhalation is carried out. 3. The medicine may cause liver and kidney injury, diarrhea, etc. 4. The infant has severe pneumonia, critical illness, and parents are informed to indicate knowledge. Observing the change of the illness state and treating the illness state in time.
2023-03-21: treatment: CRP of the infant is obviously increased, and considering the possibility of bacterial infection, 2.0g of Bid intravenous drip anti-infection treatment of cefoperazone sodium and sulbactam sodium is added to the infant to continue to perform 75mg oral Bid anti-influenza treatment of oseltamivir capsules until the rest treatment is the same as the previous treatment, and the illness state of the infant is changed.
2023-03-22: treatment: the anti-infection treatment of the cefoperazone sodium and sulbactam sodium with the concentration of 2.0g of Bid intravenous drip is continued, the oseltamivir capsule is used for the treatment course, the rest treatment is the same as the previous treatment, and the disease condition of the child suffering from dense disease is changed.
2023-03-22: on the treatment: the patients with frequent infant disease change are subjected to recheck blood routine, CRP, blood qi and PCT to treat infection by dripping 0.6g of linezolid for q12 h.
2023-03-24: on the treatment: the disease condition of the infant is improved, the infant is at risk for stopping the disease today, and the anti-infection treatment is continuously carried out on 0.6g of linezolid for q12 hours, so that the disease condition of the infant is closely observed.
2023-03-25: treatment: the related indexes such as blood routine + hypersensitivity CRP, biochemistry + ferritin, blood gas + electrolyte + lactic acid, coagulation spectrum and the like are reviewed so as to continue to treat infection by lynefazomine 0.6 g/time intravenous drip q12h, aerosol inhalation and respiratory tract management treatment, dense infant disease change and timely symptomatic treatment
2023-03-26: the Linesian amine is continuously used for resisting infection for 0.6 g/time of intravenous drip q12h, 20ml qd intravenous drip can be obtained, and the atomization inhalation and respiratory tract management treatment are carried out, so that the illness state change of the child suffering from dense disease is treated timely and symptomatically.
2023-03-27: treatment: continuing to treat the Linesian amine with 0.6 g/time of intravenous drip q12h for anti-infection, the Meinan 20ml qd intravenous drip, and the atomization inhalation and respiratory tract management treatment, and rechecking liver function, blood routine, CRP, blood sedimentation, coagulation spectrum, hydrothorax and chest radiography.
2023-03-28: treatment: continuing to treat the infection by means of linezolid with 0.6 g/q 12h intravenous drip, 20ml qd intravenous drip, and aerosol inhalation and respiratory tract management treatment.
2023-03-29: treatment: the Linesian amine is continuously used for resisting infection for 0.6 g/time of intravenous drip q12 hours, 20ml qd intravenous drip can be obtained, and the atomization inhalation and respiratory tract management treatment are carried out, so that the perfect of the chest watercolor is reserved.
2023-03-30: treatment: continuing to treat the infection by means of linezolid with 0.6 g/q 12h intravenous drip, 20ml qd intravenous drip, and aerosol inhalation and respiratory tract management treatment.
2023-03-31: treatment: continuing to treat the infection by orally taking 0.6g of the budesonide sitting needle to 0.3g of bid aerosol inhalation of 0.6g of budesonide tablet for q12h, 20ml of qd intravenous drip, budesonide 1mg and acetylcysteine.
2023-04-01: on the treatment: the cough of the infant is severe, the guaifenesin syrup is added for oral cough relieving, 0.6g of linezolid tablet is continuously added for oral anti-infection of q12h, the compound glycyrrhizin intravenous drip is used for protecting liver, 1mg of budesonide and 0.3g of acetylcysteine are used for performing BID aerosol inhalation treatment, the change of the illness state of the infant is closely observed, and the infant is treated in time.
2023-04-02: on the treatment: the oral anti-infection of 0.6g q12h of the linezolid tablet is continued, the compound glycyrrhizin intravenous drip protects the liver, 1mg of budesonide and 0.3g of acetylcysteine are atomized and inhaled, and the guaifenesin syrup is orally taken for relieving cough, so that the change of the illness state of the infant is closely observed and is treated in time.
2023-04-03: on the treatment: the cough of the infant is obviously improved before, 0.6g of the linezolid tablet is continuously orally taken for resisting infection for q12h, the compound glycyrrhizin intravenous drip is used for protecting liver, 1mg of budesonide and 0.3g of acetylcysteine are atomized and inhaled, the guaifenesin syrup is orally taken for relieving cough, the change of the illness state of the infant is closely observed, and the infant is treated in time.
2023-04-05: on the treatment: the cough is better than before, no obvious chest distress and chest pain are caused, and the patient can be discharged from the hospital in general.
Target (treatment pass) perfect correlation examination after admission, reporting danger and monitoring oxygen saturation, administering 75mg Bid orally (3.20-3.22), shu Pushen 2.0.0 g Bid intravenous drip anti-infection (3.21-3.22), budesonide 1 mg+terbutaline atomization 5mg Bid atomization (3.20-3.21), 3.22 thoracocentesis, extracting 220ml deep yellow chest water, and the procedure is followed. 0.6g of linezolid is added into Q12h intravenous drip (3.22:52-3.31), 0.3g of budesonide 1mg plus acetylcysteine is atomized (3.22-4.4), and 200ml of light yellow chest water is extracted during 3.24 thoracocentesis, so that the operation is smooth. 20ml of compound glycyrrhizin injection is intravenous drip qd (3.26-4.4) and 0.6g of linezolid tablet is orally taken (3.31-to-date) for Q12 h. The infant is recovered to normal body temperature from the 4 th day of admission, the cough is better than before, no obvious chest distress and chest pain are caused, and the infant can be discharged from the hospital under the general condition.
Prompt: { diagnosis }; { surgical records }. The surgical information of the surgical record is extracted to generate a current diagnostic treatment pass.
Diagnosis: left kidney malignancy.
Surgical records/ward records: 2022-07-8: surgical name: laparotomy, left retroperitoneal tumor resection, left adrenal partial resection, retroperitoneal lymph node dissection; anesthesia mode: full hemp; blood loss during surgery: 80ml intra-operative blood transfusion: 180ml of plasma, 1U of erythrocytes, 0U of platelets, other (special for intracardiac intervention) heparin doses, and contrast medium ml, the injection pressure PSI operation is performed by: the operation is smooth and the anesthesia is satisfactory.
2022-07-10: diagnosis and treatment plan: closely monitoring the illness state, stopping bleeding, supplementing liquid and treating the symptom by hormone supplement.
Target (treatment pass) was left retroperitoneal tumor resection followed by 2022.7.8 general anesthesia following surgical contraindication + left nephrectomy + left adrenalectomy + retroperitoneal lymph node dissection + parasplenectomy. The medicine is used for stopping bleeding, supplementing liquid and hormone, and treating symptomatic diseases. At present, patients are generally stable in condition and discharged from the hospital.
Step S203, training by using a generated large language model based on the constructed promt and Target, and fine tuning by a Lora mode to obtain a Medical-LLM-Sft model.
Lora is a method for fine-tuning a large language model with very low resources, adding a "side branch" on the right side of the original model, namely, firstly using a Linear layer to reduce data from d dimension to r, wherein parameters are matrix A initialized by using random Gaussian, then using a Linear layer to rise from r dimension to d dimension, parameters are matrix B initialized by using 0, d is an Embedding dimension of the large language model, generally 1024 or more, and r is a super parameter which is far smaller than d. The parameter matrix d of the large language model on the left side can be changed into A and B on the right side, and the parameter quantity is greatly reduced because r is far smaller than d. Wherein, the evaluation index of the large language model is BLEU and ROUGE. The full name of BLEU is Bilingual evaluation understudy, the score of BLEU is in the range of 0-1, the score is closer to 1, the quality of the model is higher, and the BLEU is mainly based on Precision. The full name of the ROUGE index is (Recall-Oriented Understudy for Gisting Evaluation), which is based mainly on Recall (recovery).
The disease course of the patient can be summarized and summarized by utilizing the generating capacity of the large language model and combining treatment passing information of a plurality of days. By entering medical records over multiple days, the model can learn the progress of the treatment, critical events, and the evolution of the patient's condition at different points in time. The large model-based generation technology can generate more clear, accurate and coherent treatment description, and provides more comprehensive and accurate information for discharge records.
In summary, the electronic medical record discharge record is generated by adopting the mode of rules and a large language model, so that the rule template and the model generation are compatible, and the higher-quality text is provided. By constructing an efficient and accurate rule template, we can effectively extract patient information and fill it in the designated fields of the discharge records. Meanwhile, we use a technique based on large model generation to generalize the treatment process for multiple days to generate a clear and more accurate treatment process description.
In another embodiment, the Medical-LLM-Sft model can be further optimized by training a reward model and reinforcement learning. Referring to FIG. 5, training the Medical-LLM-Sft model further includes the following steps.
Step S204, two treatment passes are constructed as output by taking the historical diagnosis information, the historical ward record and/or the historical operation record as input, and a training set is constructed.
Specifically, the training set of reward models is as follows:
prompts }; { ward round record }. And extracting medicine information recorded in the ward round to generate the treatment pass of the current diagnosis.
Diagnosis: chronic cough, bronchitis and sinusitis.
Chronic cough bronchitis sinusitis: 2023-04-20: diagnosis and treatment plan: 1. perfecting the correlation check: such as three general, blood-qi, biochemistry, respiratory etiology, ultrasound, and electrocardiography. 2. The children with cough and yellow nasal discharge consider the bacterial infection, and the anti-infection treatment of piperacillin tazobactam is carried out;
2023-04-21: on the treatment: the children with repeated cough has longer time and nasosinusitis, and the bacterial infection is considered, and the intravenous drip anti-infection and atomization inhalation treatment of piperacillin sodium tazosulbactam sodium, 0.5g, are performed for the treatment of the paradoxical bronchoscopy.
2023-04-22: the cough and nasal discharge of the children are improved, the treatment is effective, the anti-infection and atomization inhalation treatment of piperacillin sodium and tazobactam sodium for 0.5g q8h are continued, and the follow-up is observed.
2023-04-22: on the treatment: the children with repeated cough has longer time and nasosinusitis, and the bacterial infection is considered, and the piperacillin sodium tazosulbactam sodium 0.5g q8h intravenous drip anti-infection and atomization inhalation treatment are performed, so that the children with repeated cough are observed.
2023-04-24: at present, cough and nasal discharge of the infant are improved, the treatment is effective, the infection resistance and atomization inhalation treatment of piperacillin sodium tazosulbactam sodium 0.5g q8h intravenous drip are continued, and the fiber bronchoscopy of the infant shows that: left main bronchiolitis, bronchitis, considering the possibility of external pressure, it is recommended to enhance CT-chest macroangiography to clarify the cause of left main bronchiolitis, followed by observation.
2023-04-25: after admission, perfecting the related examination, and carrying out symptomatic treatment such as aerosol inhalation and fluid replacement on piperacillin sodium tazobactam sodium 0.5g q8h intravenous drip anti-infection (4.20-4.25), wherein the process is smooth and the ward is returned by 4.21 bronchoscopy. The children with cough can be discharged from the hospital as the general condition is that the children with cough are improved and have no fever.
The treatment is as follows:
the good result is that after admission, the relevant examination is perfected, the piperacillin sodium tazobactam sodium is subjected to intravenous drip anti-infection (4.20-4.25) for 0.5g q8h, symptomatic treatment such as aerosol inhalation, fluid infusion and the like is carried out, and the bronchoscopy is carried out for 4.21, so that the process is smooth and the ward is returned. The children with cough can be discharged from the hospital as the general condition is that the children with cough are improved and have no fever.
Bad results, perfect correlation examination after admission, anti-infection (4.20-4.25) of intravenous drip of piperacillin sodium and tazobactam sodium in 0.5g q8h, symptomatic treatment of aerosol inhalation, fluid infusion and the like. The children suffering from cough are improved, no fever is generated, and the patients are discharged from the hospital under the condition of stable general condition at present.
Prompts }; { surgical records }. The surgical information of the surgical record is extracted to generate a current diagnostic treatment pass.
Diagnosing malignant tumor of left kidney.
Surgical records/ward records: 2022-07-8: surgical name: laparotomy, left retroperitoneal tumor resection, left adrenal partial resection, retroperitoneal lymph node dissection; anesthesia mode: full hemp; blood loss during surgery: 80ml intra-operative blood transfusion: 180ml of plasma, 1U of erythrocytes, 0U of platelets, other (special for intracardiac intervention) heparin doses, and contrast medium ml, the injection pressure PSI operation is performed by: the operation is smooth and the anesthesia is satisfactory.
2022-07-10: diagnosis and treatment plan: closely monitoring the illness state, stopping bleeding, supplementing liquid and treating the symptom by hormone supplement.
The treatment is as follows:
good results: left post-peritoneal tumor resection followed by left nephrectomy + left adrenalectomy + retroperitoneal lymph node dissection + parasplenectomy following 2022.7.8 general anesthesia after surgical contraindication was excluded. The medicine is used for stopping bleeding, supplementing liquid and hormone, and treating symptomatic diseases. At present, patients are generally stable in condition and discharged from the hospital.
Bad results: left post-peritoneal tumor resection followed by left nephrectomy + left adrenalectomy + retroperitoneal lymph node dissection + parasplenectomy following 2022.7.8 general anesthesia after surgical contraindication was excluded. Patients can be discharged from the hospital in general.
Step S205, sorting the two treatment passes, and training a reward model in a Lora mode.
Step S206, the macro-fine language model includes a first macro-fine language model and a second macro-fine language model, and the history diagnosis information, the history ward record and/or the history operation record are respectively input into the first macro-fine language model and the second macro-fine language model, so as to obtain a first treatment pass and a second treatment pass.
Step S207, comparing the first treatment pass with the second treatment pass, and calculating a punishment term for the difference.
Step S208, inputting a second therapy to the reward model to obtain a scalar reward.
Step S209, adjusting the second fine-tuning large language model based on the penalty term and the scalar rewards to obtain the medical large language model.
For the training reward model and reinforcement learning process of steps S205-S209, please refer to fig. 6, the training reward model process is as follows: an independent Reward Model (review Model), i.e., medical-LLM-Rm Model, is trained using a dataset containing scores for multiple answers to the same query by humans, with the aim of making the score difference between the two treatments larger. The model receives a series of texts and returns a scalar reward, the numerical value of which corresponds to the preference of a person, the model is trained in a Lora mode, and the evaluation index adopts AUC. AUC (Area Under Curve) is defined as the area enclosed by the axis under the ROC curve, obviously the value of the area is not greater than 1, and since the ROC curve is generally above the line y=x, the AUC is in the range between 0.5 and 1, the closer the AUC is to 1.0, the higher the authenticity of the detection method is.
With continued reference to fig. 6, the fine-tuning large language model is specifically a Medical-LLM-Sft model, and multiple models may be trained when training the Medical-LLM-Sft model, taking Medical-LLM-Sft1 and Medical-LLM-Sft2 as examples, and taking the historical diagnostic information, the historical ward record, and/or the historical surgical record as a Prompt.
Tasks are modeled as Reinforcement Learning (RL) problems, so policies (policies), action spaces (actions profiles), and reward functions (reward functions) need to be defined. The strategy is based on Medical-LLM-Sft, and is to receive a sample as input and then output a series of texts; the action space is the arrangement and combination of all token in all output positions of the vocabulary, namely the treatment pass; the observation space is a possible input Prompt, obviously quite large, and is an arrangement combination of all token in all input positions of the vocabulary; the rewarding function is based on the Medical-LLM-Rm model trained in the last step and is matched with some policy-level constraints to conduct rewarding calculation.
In the step, a PPO algorithm is used for optimizing a large language model, PPO is mainly optimized through a reward, and the specific calculation method of the reward is as follows: a. inputting Prompt into an initial Medical-LLM-Sft1 and Medical-LLM-Sft2 to be optimized to respectively obtain a penalty term (KL divergence) for comparing and calculating differences of an output text treatment pass A and a treatment pass B, wherein the penalty term (KL divergence) is used for punishing that a RL strategy is generated in each training batch and greatly deviates from the initial model so as to ensure that the model outputs reasonably consistent texts; b. inputting the treatment to a Medical-LLM-Rm model through B to obtain a scalar rewarding report; c. and adjusting the Medical-LLM-Sft2 based on the KL divergence and the report to obtain a final Medical-LLM-Sft model, namely, a Medical large language model used for generating treatment passing.
To sum up, in order to further improve the generated discharge records, the present embodiment employs a reinforcement learning approach (Reinforcement Learning from Human Feedback, RLHF) based on a human feedback mechanism. This approach may optimize the large language model according to human preferences to generate treatment-passing text that more closely matches human preferences. By receiving feedback and guidance from human experts, we can adjust the generation strategy of the model, making the generated text more readable and smooth, and better meeting clinical needs.
Referring to fig. 7, another embodiment of the present application further provides an apparatus for generating an electronic medical record discharge record, including:
the rule template construction module 101 is configured to construct an electronic medical record discharge recording rule template, where the electronic medical record discharge recording rule template includes discharge information and treatment passes;
an acquiring module 102, configured to acquire electronic medical record data;
a first output module 103, configured to generate discharge information based on the electronic medical record data and the discharge recording rule template;
a second output module 104, configured to output a treatment pass based on the electronic medical record data and the pre-trained medical large language model.
The embodiment of the device is a device corresponding to the embodiment of the method for generating the discharge records of the electronic medical records, and all implementation means in the embodiment of the method are applicable to the embodiment of the device, so that the same technical effects can be achieved.
Yet another embodiment of the present application also provides an electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements a method step of generating an electronic medical record discharge record as described in the first aspect.
Yet another embodiment of the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a method of generating an electronic medical record discharge record as described above.
Furthermore, the present application may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprise," "include," or any other variation thereof, are intended to cover a non-exclusive inclusion.
While the foregoing is directed to the preferred embodiments of the present application, it should be noted that modifications and adaptations to those embodiments may occur to one skilled in the art and that such modifications and adaptations are intended to be comprehended within the scope of the present application without departing from the principles set forth herein.
Claims (7)
1. A method of generating an electronic medical record discharge record, comprising:
extracting historical diagnosis information and a historical ward record or historical diagnosis information and a historical operation record from the historical electronic medical record data;
extracting treatment passes in the historical discharge records;
training to generate a large language model by taking the historical diagnosis information and the historical ward record or the historical diagnosis information and the historical operation record as input and taking the treatment pass in the historical discharge record as output;
fine tuning the generated large language model in a Lora mode to obtain a fine-tuned large language model;
the fine-tuning large language model comprises a first fine-tuning large language model and a second fine-tuning large language model;
inputting the historical diagnosis information and the historical ward round record or the historical diagnosis information and the historical operation record into the first fine-tuning large language model and the second fine-tuning large language model respectively to obtain a first treatment pass and a second treatment pass;
Comparing the first treatment pass to the second treatment pass, calculating a penalty term for the difference;
inputting the second therapy to a reward model to obtain a scalar reward;
adjusting the second fine-tuning large language model based on the penalty term of the difference and the scalar rewards to obtain a medical large language model;
constructing an electronic medical record discharge recording rule template, wherein the electronic medical record discharge recording rule template comprises discharge information and treatment passes;
acquiring electronic medical record data;
generating the discharge information based on the electronic medical record data and the discharge recording rule template;
extracting diagnosis information and ward round records or diagnosis information and operation records from the electronic medical record data;
inputting the diagnosis information and the ward record or the diagnosis information and the operation record into the medical large language model to generate the treatment pass.
2. The method of claim 1, wherein the electronic medical record discharge recording rule template further comprises a medical procedure pass, the medical procedure pass comprising a test result, an inspection result, and the treatment pass;
the admission information includes admission date, admission diagnosis, discharge diagnosis, admission condition, discharge condition and discharge order.
3. The method as recited in claim 2, further comprising:
the electronic medical record data comprises a laboratory information system report and a radiological examination report;
extracting a test list and a test result from the laboratory information system report, and reading an abnormal value to generate the test result;
reading all fields from the radiological examination report, generating the examination result.
4. The method of claim 1, wherein training a medical large language model further comprises:
taking the historical diagnosis information and the historical ward-round record or the historical diagnosis information and the historical operation record as input, taking two treatment passes with different scores as output, sequencing the two treatment passes, and training a reward model in a Lora mode;
and performing reinforcement learning on the fine-tuning large language model based on the reward model to obtain the medical large language model.
5. An apparatus for generating an electronic medical record discharge record, comprising:
the rule template construction module is used for constructing an electronic medical record discharge recording rule template, wherein the electronic medical record discharge recording rule template comprises discharge information and treatment passes;
The acquisition module is used for acquiring the electronic medical record data;
the first output module is used for generating the discharge information based on the electronic medical record data and the discharge record rule template;
the second output module is also used for extracting diagnosis information and ward round records or diagnosis information and operation records from the electronic medical record data;
inputting the diagnosis information and the ward record or the diagnosis information and the operation record into a medical large language model to generate the treatment pass;
the method for constructing the medical large language model comprises the following steps: extracting historical diagnosis information and a historical ward record or historical diagnosis information and a historical operation record from the historical electronic medical record data;
extracting treatment passes in the historical discharge records;
training to generate a large language model by taking the historical diagnosis information and the historical ward record or the historical diagnosis information and the historical operation record as input and taking the treatment pass in the historical discharge record as output;
fine tuning the generated large language model in a Lora mode to obtain a fine-tuned large language model;
the fine-tuning large language model comprises a first fine-tuning large language model and a second fine-tuning large language model;
Inputting the historical diagnosis information and the historical ward round record or the historical diagnosis information and the historical operation record into the first fine-tuning large language model and the second fine-tuning large language model respectively to obtain a first treatment pass and a second treatment pass;
comparing the first treatment pass to the second treatment pass, calculating a penalty term for the difference;
inputting the second therapy to a reward model to obtain a scalar reward;
and adjusting the second fine-tuning large language model based on the punishment items of the differences and the scalar rewards to obtain the medical large language model.
6. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor performs a method step of generating an electronic medical record discharge record as claimed in any one of claims 1 to 4.
7. A readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the method steps of generating an electronic medical record discharge record as claimed in any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310905314.5A CN116631562B (en) | 2023-07-24 | 2023-07-24 | Method and device for generating discharge records of electronic medical records and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310905314.5A CN116631562B (en) | 2023-07-24 | 2023-07-24 | Method and device for generating discharge records of electronic medical records and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116631562A CN116631562A (en) | 2023-08-22 |
CN116631562B true CN116631562B (en) | 2024-02-27 |
Family
ID=87597642
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310905314.5A Active CN116631562B (en) | 2023-07-24 | 2023-07-24 | Method and device for generating discharge records of electronic medical records and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116631562B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116913450B (en) * | 2023-09-07 | 2023-12-19 | 北京左医科技有限公司 | Method and device for generating medical records in real time |
CN116994694B (en) * | 2023-09-27 | 2024-01-09 | 之江实验室 | Patient medical record data screening method, device and medium based on information extraction |
CN117709441B (en) * | 2024-02-06 | 2024-05-03 | 云南联合视觉科技有限公司 | Method for training professional medical large model through gradual migration field |
CN117809798B (en) * | 2024-03-01 | 2024-04-26 | 金堂县第一人民医院 | Verification report interpretation method, system, equipment and medium based on large model |
CN118194097B (en) * | 2024-05-13 | 2024-07-26 | 福建依时利软件股份有限公司 | Intelligent laboratory management method, device, equipment and storage medium |
CN118245810B (en) * | 2024-05-28 | 2024-08-02 | 北京壹永科技有限公司 | Method and device for training large language model and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105787253A (en) * | 2016-01-22 | 2016-07-20 | 三峡大学第临床医学院 | Electronic medical record system for integrating hospital workflows |
CN107562732A (en) * | 2017-10-26 | 2018-01-09 | 北京康夫子科技有限公司 | The processing method and system of electronic health record |
CN114530223A (en) * | 2022-01-18 | 2022-05-24 | 华南理工大学 | NLP-based cardiovascular disease medical record structuring system |
CN115472252A (en) * | 2022-09-22 | 2022-12-13 | 华侨大学 | Electronic medical record generation method, device, equipment and storage medium based on conversation |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023060087A1 (en) * | 2021-10-05 | 2023-04-13 | Pieces Technologies, Inc. | Creating multiple prioritized clinical summaries using artificial intelligence |
-
2023
- 2023-07-24 CN CN202310905314.5A patent/CN116631562B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105787253A (en) * | 2016-01-22 | 2016-07-20 | 三峡大学第临床医学院 | Electronic medical record system for integrating hospital workflows |
CN107562732A (en) * | 2017-10-26 | 2018-01-09 | 北京康夫子科技有限公司 | The processing method and system of electronic health record |
CN114530223A (en) * | 2022-01-18 | 2022-05-24 | 华南理工大学 | NLP-based cardiovascular disease medical record structuring system |
CN115472252A (en) * | 2022-09-22 | 2022-12-13 | 华侨大学 | Electronic medical record generation method, device, equipment and storage medium based on conversation |
Non-Patent Citations (1)
Title |
---|
ChatGPT: the future of discharge summaries?;Sajan B Pate等;The Lancet Digital Health;第5卷(第3期);第e107-e108页 * |
Also Published As
Publication number | Publication date |
---|---|
CN116631562A (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116631562B (en) | Method and device for generating discharge records of electronic medical records and electronic equipment | |
Van Aken et al. | Clinical outcome prediction from admission notes using self-supervised knowledge integration | |
CN109766329B (en) | Clinical data unit generation method and device supporting exchange sharing | |
Hosseini et al. | Heteromed: Heterogeneous information network for medical diagnosis | |
Revathi et al. | Early detection of cognitive decline using machine learning algorithm and cognitive ability test | |
US11915828B2 (en) | System and method of using machine learning for extraction of symptoms from electronic health records | |
Wang et al. | Overview of the BioCreative/OHNLP challenge 2018 task 2: clinical semantic textual similarity | |
Ramesh et al. | Improving radiology report generation systems by removing hallucinated references to non-existent priors | |
Miñarro-Giménez et al. | Qualitative analysis of manual annotations of clinical text with SNOMED CT | |
Yu et al. | Identification of pediatric respiratory diseases using a fine-grained diagnosis system | |
Gavrilov et al. | Feature extraction method from electronic health records in Russia | |
CN113057587A (en) | Disease early warning method and device, electronic equipment and storage medium | |
Wang et al. | Research on named entity recognition of doctor-patient question answering community based on bilstm-crf model | |
Hug | Detecting hazardous intensive care patient episodes using real-time mortality models | |
Ahmad et al. | BIR: Biomedical Information Retrieval System for Cancer Treatment in Electronic Health Record Using Transformers | |
Lin et al. | Medical Concept Embedding with Variable Temporal Scopes for Patient Similarity. | |
Hristovski et al. | Literature-based knowledge discovery using natural language processing | |
Danilatou et al. | Automated mortality prediction in critically-ill patients with thrombosis using machine learning | |
CN106354715A (en) | Method and device for medical word processing | |
Yuan et al. | Numerical Feature Transformation-Based Sequence Generation Model for Multi-Disease Diagnosis | |
González et al. | TRIALSCOPE A Unifying Causal Framework for Scaling Real-World Evidence Generation with Biomedical Language Models | |
Michalopoulos | Innovations in domain knowledge augmentation of contextual models | |
Reponen | Predicting Prescribed Medications from the MIMIC-IV Event and Measurement Data | |
CN118445419B (en) | Method, device, equipment and medium for constructing prompt automatic labeling medical text based on large model | |
CN116894685B (en) | Automatic fee measuring and calculating method and system for medical behavior fragments |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |