Hospitalization medical record quality control method and system based on knowledge graph and large language model
By constructing a medical record quality control system based on knowledge graphs and large language models, the system automates the collection, organization, and quality control of medical record information, solving the problems of low efficiency and poor accuracy of manual quality inspection. This achieves intelligent quality control of medical record management and improves the completeness and timeliness of medical record information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI HOSPITAL OF TRADITIONAL CHINESE MEDICINE
- Filing Date
- 2025-11-13
- Publication Date
- 2026-07-07
AI Technical Summary
In the existing technology, the quality inspection process of inpatient medical records relies on manual completion, which is inefficient and prone to errors, making it difficult to achieve efficient and accurate quality control of medical records.
By employing a knowledge graph and large language model-based approach, an OCR recognition layer, a semantic parsing layer, a rule engine layer, and a large model reasoning layer are constructed. Combined with pre-trained models and terminology dictionaries in the medical field, an automated medical record quality control process is achieved, including explicit error verification, data missing verification, and logical reasoning verification.
It enables intelligent full-process tracking and quality control of medical record information, improves the efficiency and accuracy of medical record management, reduces omissions and delays in manual quality inspection, and supports the improvement of medical quality and the refined management of medical insurance.
Smart Images

Figure CN122348024A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for quality control of inpatient medical records based on knowledge graphs and large language models. Background Technology
[0002] In the digital age, medical records have evolved from paper-based records into a strategic resource driving improvements in medical quality, refined management of medical insurance, medical innovation, and public health governance. Therefore, strengthening quality control of inpatient medical records is particularly important. The medical record's cover page is a condensed summary of information from the entire patient's hospitalization process, containing rich and important data, and is the most crucial core data for reconstructing hospitalization details and conducting statistical analysis.
[0003] Previously, the organization and quality inspection of inpatient medical records relied heavily on manual processes, which were inefficient and prone to errors. With the increasing volume of medical records and growing staff shortages, manual quality inspection resulted in low efficiency and a high error rate. There is an urgent need for a comprehensive automated quality inspection process to fundamentally improve medical record quality, promptly identify and correct problems, achieve end-to-end quality control in medical record management, improve work efficiency, and move from "post-event spot checks" to "intelligent in-process management."
[0004] The previous manual process was as follows: Clinical departments submit paper medical records → Clerks sort, arrange, and check for missing items → Coders assign ICD codes to the first page of the sorted paper medical records → Clinical departments submit missing items → Medical records are scanned and photographed to create digital archives → Paper medical records are shelved and stored. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method and system for quality control of inpatient medical records based on knowledge graphs and large language models.
[0006] The objective of this invention can be achieved through the following technical solutions: According to one aspect of the present invention, a method for quality control of inpatient medical records based on knowledge graphs and large language models is provided, comprising the steps of: S1. Architecture Layer Construction: The architecture consists of an OCR recognition layer, a semantic parsing layer, a rule engine layer, and a large model inference layer. The OCR recognition layer has a medical-specific character library and a pre-trained model for the medical field, and pre-stores edge detection and region segmentation algorithms as well as recognition parameters for different functional areas. The semantic parsing layer has a medical terminology dictionary. The rule engine layer provides a visual rule configuration interface for configuring the rule system, which includes explicit error verification rules, data missing verification rules, and conditional item verification rules. The large model inference layer has a large model for the medical field with medical logical knowledge. S2. Inpatient medical record collection and preprocessing: All received paper inpatient medical records are scanned to obtain inpatient medical record scan data. The inpatient medical record scan data is preprocessed and optimized, and the preprocessed scan data is automatically generated, stored in an encrypted database, and sent to the OCR recognition layer. S3, OCR recognition: First, edge detection and region segmentation algorithms are used to divide each page in the preprocessed scanned data into functional areas and optimize each functional area according to recognition parameters. Then, a pre-trained model in the medical field is used in combination with a medical-specific character library to identify and extract information from each functional area, generate a list of data names and structured data containing structured fields corresponding to each functional area under each data name, and send it to the semantic parsing layer. S4. Semantic parsing: Using a medical terminology dictionary and string matching + semantic similarity calculation technology, the terminology of each structured data under each data name is standardized to obtain the corresponding standardized text. Named entity recognition technology is used to extract key entities from the standardized text, and the relationship between entities is clarified through relation extraction algorithm to generate a knowledge graph of inpatient medical records for each data name. S5. Rule Engine Validation: Input each standardized text into the rule engine layer, use explicit error validation rules to perform explicit error validation on each structured field one by one, automatically mark explicit errors, use data missing validation rules to perform data missing validation on the generated data name list, automatically mark missing data names, use condition item validation rules to perform condition item validation between each structured data, automatically mark condition item mismatch, and output the rule engine validation results. S6. Large Model Validation: The validation results of the inpatient medical record knowledge graph and rule engine for each data name are input into the medical domain-specific large model in the large model reasoning layer. The medical domain-specific large model performs logical reasoning validation based on pre-trained medical logic knowledge and outputs results of suspected logical errors. S7. Verification Result Output: Generate an inpatient medical record verification report using the verification results from the rule engine and suspected logical error results.
[0007] Furthermore, in S1, the pre-trained model in the medical field adopts the LayoutLMv3 model based on the Transformer architecture, which has the ability to extract three-dimensional features and is used to identify and extract information of different formats in inpatient medical records. The large-scale model for the medical field adopts a Medical-LLM model based on LLaMA-2 fine-tuning. It constructs a medical-specific knowledge base, including a medical-specific character library, a medical terminology dictionary, and an existing medical knowledge base. It uses a large number of compliant inpatient medical records and a large number of inpatient medical records containing medical logical errors to construct a labeled sample dataset. The large language model is trained and learned using the constructed medical-specific knowledge base and the labeled sample dataset to obtain a large-scale model for the medical field with medical logical knowledge.
[0008] Furthermore, in S2, the inpatient medical record scan data undergoes denoising, tilt correction, and resolution normalization preprocessing optimization operations to automatically generate preprocessed scan data.
[0009] Furthermore, in S3, each structured field—field name—identified content—confidence score—sets the association between each structured field and the corresponding functional area of the corresponding page in the preprocessed scanned data. Structured fields with confidence scores below a set threshold are marked as pending manual confirmation. When there is a pending manual confirmation mark, a manual confirmation prompt is given, and subsequent operations are not performed. After manual confirmation, subsequent operations are performed.
[0010] Furthermore, the priority of explicit error validation rules is greater than that of missing data validation rules, which in turn is greater than that of condition item validation rules.
[0011] Furthermore, in S5, explicit error checking rules include: Rule 1: Compare and verify the structured fields containing the patient's name, admission / discharge date, and medical record number in the medical record cover sheet with the structured fields containing the patient's name, admission / discharge date, and medical record number in all other documents except the medical record cover sheet. Automatically mark any documents with a name that does not match the name in the medical record cover sheet, an admission or discharge date that is not within the admission / discharge dates in the medical record cover sheet, or a medical record number that does not match the medical record number in the medical record cover sheet as obviously incorrect. Rule 2, field-level validation rules, including patient ID format, diagnosis results cannot be empty, examination reports must include examination date and examination conclusion, medication dosage must conform to unit specifications, and those that do not meet the requirements will be automatically marked as obviously wrong.
[0012] Furthermore, in S5, the data missing verification rules include: Rule 1: Identify the data name as the number of days of hospitalization contained in the medical record cover page, compare and verify the list of required items matching the number of days of hospitalization with the list of data names, identify the data names that are missing from the list of required items in the list of data names, and automatically mark the missing data names. For hospital stays of no more than 24 hours, there must be a first list of required items; for hospital stays of more than 24 hours, there must be a second list of required items. Both the first and second lists of required items contain the required items listed in the document name list. Rule 2: Compare and verify the list of data names with all electronic medical records of the patient during hospitalization in the hospital's business system, identify any missing electronic medical record names in the list of data names, and automatically mark the missing data names. Among the data missing verification rules, rule one has the highest execution priority.
[0013] Furthermore, in S5, the condition item verification rule includes multiple condition items. The condition item is a one-to-one correspondence between the preset condition and the required item of the condition. The preset condition of each condition item is matched and verified with the corresponding required item of the condition. If a mismatch is found, the condition item is automatically marked as mismatched. Condition 1, Pre-set condition: The medical order contains the word "consultation". Required conditions: Consultation-related materials, including the application form and consultation record; Condition 2, Pre-set conditions: Consultation-related materials, Required condition: The doctor's order form must contain the word "consultation"; Condition 3, Pre-set condition: The surgical fee in the follow-up page of the medical record is not 0. Required conditions: Surgical related materials, including surgical informed consent form, preoperative or preoperative consultation record, preoperative discussion record, preoperative summary, surgical record, surgical nursing record sheet, surgical risk assessment form and surgical safety checklist. Condition 4, Preset Condition: Surgical related information; Required condition: Surgical fee is not 0 in the first page or subsequent pages of the medical record. Condition 5, Preset Condition: The anesthesia fee in the follow-up page of the medical record is not 0. Required conditions: Anesthesia-related materials, including the patient's agreement to voluntarily use disposable medical materials and drugs, pre-anesthesia visit record, pre-anesthesia conversation record, anesthesia recovery room record sheet, and anesthesia record; Condition 6, Preset Condition: Anesthesia-related information; Required Condition: Anesthesia fee is not 0 in the first page or follow-up page of the medical record. Condition 7, Preset Condition: The pathology diagnosis fee in the follow-up page of the medical record is not 0; Required Item: Pathology Report. Condition 8, Preset Condition: Pathology report, Required Item: The pathology diagnosis fee in the follow-up page of the medical record is not 0; Condition 9, Preset Condition: The patient's condition is "critical" as recorded on the first page of the medical record during hospitalization. Required conditions: relevant information on the critical condition, including records of critical case discussions and critical condition notification forms. Condition 10, Preset Condition: Critical illness related information, Required condition: Critical illness occurred during hospitalization as recorded on the first page of the medical record; Condition 11, Preset Condition: The patient's medical record front page indicates that a difficult case occurred during hospitalization. Required conditions: Relevant materials related to the difficult case, including records of discussions on difficult cases. Condition 12, Preset Condition: Difficult-related information, Required condition: Difficult situations occurred during hospitalization as shown on the first page of the medical record; Condition 13, Preset Condition: The patient is considered to have been in critical condition during hospitalization as stated on the first page of the medical record. Required Condition: The doctor's order must contain the words "critical condition" or "serious illness".
[0014] Furthermore, in S1, the medical-specific large model includes cross-regional association logic knowledge, temporal relationship logic knowledge, and rationality logic knowledge. Cross-regional association logic knowledge requires that the structured field content recorded in different functional areas conforms to medical knowledge logic. Temporal relationship logic knowledge requires that the recorded structured field content conforms to the disease development process in terms of time sequence. Rationality logic knowledge requires that the recorded structured field content conforms to rationality. In S6, the inpatient medical record knowledge graph and rule engine verification results for each data name are input into the medical domain-specific large model. The medical domain-specific large model performs cross-regional association logic reasoning verification, temporal relationship logic reasoning verification, and rationality logic reasoning verification based on pre-trained medical logic knowledge, and outputs suspected logical error results. Among them, cross-regional association logic reasoning verification: based on cross-regional association logic knowledge, logical reasoning verification is performed to check whether there are logical contradictions in medical knowledge between the structured field contents recorded in different functional areas; Temporal relationship logical reasoning verification: Based on the knowledge of temporal relationship logic, logical reasoning verification is performed to check whether the recorded structured field content conforms to the disease development process in terms of temporal sequence; Reasonable logic knowledge: Based on reasonable logic knowledge, perform logical reasoning to verify whether the recorded structured field content is reasonable.
[0015] Furthermore, in S6, the output format for suspected logical error results is: error type + name of the data involved / region of the data name + description of the suspected error + confidence level + reasoning basis; In S7, the inpatient medical record verification report contains multiple error entries, which are displayed in columns. Each error entry is marked with error type, the name of the data involved / the region where the data name is located, and / or confidence level / severity / cause of error, and suggested handling method. Error types include explicit errors, missing data, condition mismatch, and logical errors.
[0016] Furthermore, in S7, if an error entry in the inpatient medical record verification report is clicked, it will directly jump to the corresponding page in the preprocessed scanned data, i.e., the data name involved / the area where the data name is located.
[0017] Furthermore, after S7, it includes: S8. Manual review and feedback: Each error entry in the inpatient medical record verification report is manually reviewed. If the error entry is a real error, it is marked as a true error; if the error entry is a misjudged error, it is marked as a false positive. Feedback is then sent to the OCR recognition layer and semantic parsing layer to update the medical terminology dictionary and / or adjust the recognition parameters.
[0018] Furthermore, after S8, it includes: S9. Closed-loop management and model optimization: For error entries marked as true errors, generate rectification task sheets and assign them to the corresponding responsible departments, track the rectification progress until the inpatient medical records meet the standards and are archived, regularly statistically analyze the verification accuracy, error type distribution and manual review feedback data, supplement the medical-specific character library in the OCR recognition layer with new medical characters, update the medical terminology dictionary in the semantic parsing layer, optimize the rule logic in the rule engine layer, and fine-tune the medical-specific large model in the large model inference layer by adding labeled data.
[0019] According to another aspect of the present invention, an inpatient medical record quality control system based on knowledge graphs and large language models is provided, comprising: An architecture layer construction module is used to sequentially build an OCR recognition layer, a semantic parsing layer, a rule engine layer, and a large model inference layer. The OCR recognition layer has a built medical-specific character library and a pre-trained model for the medical field, and pre-stores edge detection and region segmentation algorithms as well as recognition parameters for different functional areas. The semantic parsing layer has a built medical terminology dictionary. The rule engine layer provides a visual rule configuration interface for configuring the rule system, which includes explicit error verification rules, data missing verification rules, and condition item verification rules. The large model inference layer has a built large model for the medical field with medical logical knowledge. A medical record acquisition and processing module is used to scan all received paper inpatient medical records to obtain inpatient medical record scan data, preprocess and optimize the inpatient medical record scan data, and automatically generate preprocessed scan data and store it in an encrypted database. An OCR recognition module is used to first divide each page of the preprocessed scanned data into functional areas using edge detection and region segmentation algorithms, and optimize each functional area according to recognition parameters. Then, it uses a pre-trained model in the medical field and combines it with a medical-specific character library to identify and extract information from each functional area, generating a list of data names and structured data containing structured fields corresponding to each functional area under each data name. A semantic parsing module is used to standardize the terminology of each structured data under each data name using a medical terminology dictionary and string matching + semantic similarity calculation technology to obtain the corresponding standardized text. Named entity recognition technology is used to extract key entities from the standardized text and clarify the relationship between entities through relation extraction algorithm to generate a knowledge graph of inpatient medical records for each data name. A rule engine validation module is used to perform explicit error validation on each structured field one by one using explicit error validation rules, automatically marking explicit errors; to perform data missing validation on the generated data name list using data missing validation rules, automatically marking missing data names; and to perform condition item validation on the condition items between each structured data using condition item validation rules, automatically marking condition item mismatches, and outputting the rule engine validation results. A large model verification module is used to input the verification results of the inpatient medical record knowledge graph and rule engine for each data name into a large medical domain model. The large medical domain model performs logical reasoning verification based on pre-trained medical logic knowledge and outputs results of suspected logical errors. A verification result output module is used to generate inpatient medical record verification reports using the verification results from the rule engine and suspected logical error results.
[0020] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0021] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0022] Compared with the prior art, the present invention has the following beneficial effects: This invention features intelligent end-to-end tracking and quality control of inpatient medical records. After a patient is discharged, the system records discharge information in real time and monitors all aspects of medical record data generation (OCR scanning), organization, and quality control, ensuring the completeness, consistency, and timeliness of medical record information. If any missing or incorrect medical record data is detected, the system automatically alerts relevant personnel to supplement, correct, or follow up promptly, effectively preventing oversights and delays in medical record management. Through intelligent technology, this invention achieves rapid organization and efficient quality control of medical record data, providing strong support for improving medical quality, refining medical insurance management, and advancing medical innovation and public health governance.
[0023] (1) Technological synergy: For the first time, OCR recognition, semantic parsing, rule engine and large model reasoning are deeply integrated. The rule engine achieves "rigid and fast" basic verification, while the large model covers "flexible and complex" logical verification, solving the pain point of "either missing judgment or misjudgment" in traditional medical record verification.
[0024] (2) Adaptability to the medical field: The entire process is customized based on medical scenarios (such as ICD-10 terminology standardization and medical logic reasoning training), which improves the accuracy by more than 30% compared with general verification technology.
[0025] (3) Scalability and ease of use: The rule engine supports visual configuration, the large model supports incremental fine-tuning, and medical record room staff can operate it without professional technical background. At the same time, it can be adapted to the medical record management standards of different hospitals (such as the difference in required materials between tertiary hospitals and community hospitals). Attached Figure Description
[0026] Figure 1 A flowchart illustrating a preferred embodiment of the inpatient medical record quality control method based on knowledge graphs and large language models of the present invention; Figure 2 This is a structural block diagram of an inpatient medical record quality control system based on knowledge graphs and large language models, which is a preferred embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] For ease of description, only the parts relevant to the present invention are shown in the accompanying drawings. The terms "first," "second," etc., used in this invention are merely for the convenience of describing the technical solutions of the invention and do not have a specific limiting effect; they are all general references and do not constitute a limitation on the technical solutions of the present invention.
[0029] like Figure 1 As shown, this embodiment of the invention provides a method for quality control of inpatient medical records based on knowledge graphs and large language models, including the following steps: Step 101: Construct the architecture layer: Based on the concept of "multi-technology synergy and integration", construct the following four technical architecture layers in sequence: OCR (Optical Character Recognition) recognition layer, semantic parsing layer, rule engine layer, and large model inference layer.
[0030] 1) The OCR recognition layer features a built-in medical-specific character library and a pre-trained medical model, pre-stored with edge detection and region segmentation algorithms, and recognition parameters for different functional areas. The medical-specific pre-trained model uses the LayoutLMv3 model based on the Transformer architecture, possessing 3D feature extraction capabilities (text content, font style, spatial layout), used to recognize and extract information in different formats in inpatient medical records (such as printed diagnostic reports, handwritten medical orders, tabular examination forms, stamped areas, etc.). The medical-specific character library integrates over 2000 special medical characters (such as "×", "↑", "↓", "mmol / L", "Type II diabetes", etc.), solving the problem of low accuracy in recognizing obscure medical terms and symbols. Recognition parameters, such as improved fuzziness tolerance in handwritten areas and enhanced row and column alignment verification in tabular areas, achieve a recognition accuracy of over 98.5%.
[0031] 2) The semantic parsing layer has a constructed medical terminology dictionary. This dictionary is built based on the International Classification of Diseases (ICD-10) and the Regulations for Medical Record Management in Medical Institutions.
[0032] 3) The rule engine layer provides a visual rule configuration interface for configuring the rule system. The rule system includes explicit error detection rules, data missing detection rules, and conditional item detection rules. The medical records department can add, modify, and delete rules in real time on the visual rule configuration interface based on policy updates (such as revisions to the "Basic Standards for Medical Record Writing") and personalized hospital needs (such as a department adding a mandatory "Informed Consent Form for Special Examinations"). This requires no modification to the underlying code and offers high flexibility.
[0033] 4) The large-scale model inference layer has a medical domain-specific large-scale model with medical logic knowledge. The medical domain-specific large-scale model adopts a Medical-LLM model based on LLaMA-2 fine-tuning and constructs a medical domain-specific knowledge base, including a medical-specific character library, a medical terminology dictionary, and existing medical knowledge bases (such as disease diagnosis and treatment knowledge base, standard surgical and medical operation classification, laboratory examination knowledge base, drug standard knowledge base, etc.). It uses a large number of compliant inpatient medical records and a large number of inpatient medical records containing medical logic errors to construct a labeled sample dataset. The large language model is trained and learned using the constructed medical domain-specific knowledge base and the labeled sample dataset to obtain the medical domain-specific large-scale model with medical logic knowledge.
[0034] The medical logic knowledge contained in the large-scale model for the medical field includes cross-regional correlation logic knowledge, temporal relationship logic knowledge, and rationality logic knowledge. Cross-regional correlation logic knowledge requires that the structured field content recorded in different functional areas conforms to medical knowledge logic. Temporal relationship logic knowledge requires that the recorded structured field content conforms to the disease development process in terms of time sequence. Rationality logic knowledge requires that the recorded structured field content conforms to rationality.
[0035] For example, collect 100,000+ compliant medical records and 50,000+ medical records containing medical logic errors (such as being diagnosed with diabetes but having no blood glucose test records, or being prescribed children's medication but the patient's age is 60 years old) to build a labeled sample dataset.
[0036] Step 102, Inpatient Medical Record Collection and Preprocessing: Scan all received paper inpatient medical records using a scanner, medical record management system interface, etc., to obtain inpatient medical record scan data (such as PDF, JPG format), preprocess and optimize the inpatient medical record scan data, automatically generate preprocessed scan data, store it in an encrypted database, and send it to the OCR recognition layer.
[0037] Preprocessing optimization: The scanned inpatient medical records are subjected to noise reduction (removing paper stains and scanning shadows), tilt correction (adjusting tilted pages to horizontal), and resolution normalization (uniformly adjusting to 300 DPI) in sequence. The preprocessed scanned data is automatically generated to improve the accuracy of subsequent OCR recognition.
[0038] Data backup: Automatically generated pre-processed scanned data is stored in an encrypted database to ensure that the original data is not lost or tampered with.
[0039] Step 103, OCR Recognition: After preprocessing, the scanned data is input into the OCR recognition layer. First, edge detection and region segmentation algorithms are used to divide each page in the preprocessed scanned data into functional areas (such as patient basic information area, diagnosis information area, examination report area, medical order area, etc.). Each functional area is optimized according to the recognition parameters. Then, a pre-trained model in the medical field is used in conjunction with a medical-specific character library to recognize and extract information from each functional area, generating a list of data names and structured data (such as JSON format) containing structured fields corresponding to each functional area under each data name. This data is then sent to the semantic parsing layer. Each structured field has the following structure: field name - recognition content - confidence score. This provides a standardized data foundation for subsequent verification. The association between each structured field and the corresponding functional area of the corresponding page in the preprocessed scanned data is set to facilitate the tracing of the original materials.
[0040] Structured fields with confidence scores below a set threshold (e.g., 90%) (such as blurry handwritten signatures) are marked as requiring manual confirmation. When a field is marked as requiring manual confirmation, a prompt is made to confirm it, and subsequent operations are not performed. After manual confirmation, subsequent operations are performed.
[0041] Step 104, Semantic Analysis: Using a medical terminology dictionary and string matching + semantic similarity calculation techniques (such as cosine similarity and BERT vector comparison), the terminology of each structured data under each data name is standardized (e.g., myocardial infarction is transformed into acute myocardial infarction) to obtain the corresponding standardized text. Named entity recognition technology is used to extract key entities (such as patient ID, diagnosis result, examination items, and medication dosage) from the standardized text, and the relationship between entities is clarified through relation extraction algorithms (such as the attribution relationship between "patient ID=123" and "diagnosis result = acute myocardial infarction"), generating a knowledge graph of inpatient medical records for each data name.
[0042] For example, inpatient medical record knowledge graph: Patient ID=789 → Basic information (age=50 years old, gender=male) → Diagnosis result (grade 2 hypertension) → Examination items (blood pressure measurement: 160 / 100mmHg) → Medication (nifedipine sustained-release tablets, 5mg / time).
[0043] The validation process consists of two layers: rule engine validation and large model validation. The order of rule engine validation → large model validation ensures comprehensive coverage of both explicit errors, missing materials, and mismatched conditions, as well as implicit logical errors. The rule engine is built on a configurable foundation to enable rapid and accurate validation of explicit errors, missing materials, and mismatched conditions, complementing the flexible reasoning capabilities of the large model.
[0044] Step 105, Rule Engine Validation: Input each standardized text into the rule engine layer, use explicit error validation rules to perform explicit error validation on each structured field one by one, automatically mark explicit errors, use data missing validation rules to perform data missing validation on the generated data name list, automatically mark missing data names, use condition item validation rules to perform condition item validation between each structured data, automatically mark condition item mismatch, and output the rule engine validation results.
[0045] Among them, the priority of explicit error verification rules is > the priority of missing data verification rules > the priority of condition item verification rules.
[0046] 1) Explicit error checking rules include: Rule 1: Compare the structured fields containing the patient's name, admission / discharge date, and medical record number in the medical record cover sheet with the structured fields containing the patient's name, admission / discharge date, and medical record number in all other documents except the medical record cover sheet. Automatically mark any documents with discrepancies between the name and the name in the medical record cover sheet, admission or discharge dates that are not within the admission / discharge dates in the medical record cover sheet, or medical record numbers that are inconsistent with the medical record number in the medical record cover sheet as obviously incorrect.
[0047] For example, if the medical record homepage shows the medical record information of He Moumou, and a nursing record with the name Zhao Moumou is identified, then the verification will find that the name is inconsistent with the name on the medical record homepage, and indicate the specific reason for failure as "name mismatch".
[0048] Rule 2, field-level validation rules, including patient ID format (e.g., must be letters + 8 digits), diagnosis results cannot be empty, examination reports must include examination date and examination conclusion, medication dosage must conform to unit specifications (e.g., mg / g / mL, etc.), and those that do not meet the requirements will be automatically marked as obviously wrong.
[0049] 2) Data missing verification rules include: Rule 1: Identify the data name as the number of days of hospitalization contained in the medical record cover page, compare and verify the list of required items matching the number of days of hospitalization with the list of data names, identify the data names that are missing from the list of required items and automatically mark the missing data names.
[0050] For hospital stays of no more than 24 hours, there must be a first list of required items; for hospital stays of more than 24 hours, there must be a second list of required items. Both the first and second lists must contain the required documents listed in the document name list.
[0051] The first mandatory items list includes the medical record cover sheet, admission and discharge records within 24 hours, doctor's orders, patient information sheet, temperature chart, admission and discharge nursing assessment form within 24 hours, health guidance form, admission information sheet, nursing document registration form, and inpatient medical record examination registration form.
[0052] The second mandatory item list includes the medical record cover sheet, discharge summary, admission record, progress notes, doctor's orders, patient information sheet, admission nursing assessment form, temperature chart, nursing record sheet, nursing classification table, health guidance table, admission information sheet, nursing document registration form, and inpatient medical record examination registration form.
[0053] Rule 2: Compare and verify the list of data names with all electronic medical records of the patient during hospitalization in the hospital's business system, identify any missing electronic medical record names in the list of data names, and automatically mark the missing data names.
[0054] Among the data missing verification rules, rule one has the highest execution priority.
[0055] 3) The condition item verification rules include: multiple condition items, which are a one-to-one correspondence between preset conditions and required items. The preset conditions of each condition item are matched and verified with the corresponding required items. If a mismatch is found, the condition item is automatically marked as mismatched.
[0056] Condition 1: Pre-set condition: The medical order contains the word "consultation". Required conditions: Consultation-related materials, including the application form and consultation record.
[0057] Condition 2, Preset Conditions: Consultation-related materials, Required Condition: The doctor's order form must contain the word "consultation".
[0058] Condition 3, Pre-set condition: The surgical fee in the follow-up page of the medical record is not 0. Required conditions: Surgical related materials, including surgical informed consent form, preoperative or preoperative consultation record, preoperative discussion record, preoperative summary, surgical record, surgical nursing record sheet, surgical risk assessment form and surgical safety checklist.
[0059] Condition 4, Preset Condition: Surgical related information, Required Item: Surgical fee is not 0 in the first page or follow-up page of the medical record.
[0060] Condition 5, Preset Condition: The anesthesia fee in the follow-up page of the medical record is not 0. Required conditions: Anesthesia-related materials, including the patient's agreement to voluntarily use disposable medical materials and drugs, pre-anesthesia visit record, pre-anesthesia conversation record, anesthesia recovery room record sheet, and anesthesia record.
[0061] Condition 6, Preset Condition: Anesthesia-related information; Required Condition: Anesthesia fee is not 0 in the first page or follow-up page of the medical record.
[0062] Condition 7, Preset Condition: The pathology diagnosis fee in the follow-up page of the medical record is not 0. Required Item: Pathology Report.
[0063] Condition 8, Preset Condition: Pathology report, Required Item: The pathology diagnosis fee in the follow-up page of the medical record is not 0.
[0064] Condition 9, Preset Condition: The patient is in critical condition during hospitalization as recorded on the first page of the medical record. Required conditions: Critical condition related information, including critical case discussion records and critical condition notification forms.
[0065] Condition 10, Preset Condition: Critical illness related information, Required condition: Critical illness must have occurred during hospitalization as recorded on the first page of the medical record.
[0066] Condition 11, Preset Condition: The patient's medical record homepage shows a difficult case during hospitalization. Required conditions: Relevant information on the difficult case, including records of discussions on difficult cases.
[0067] Condition 12, Preset Condition: Difficult-related information, Required Condition: Difficult situations occurred during hospitalization as shown on the first page of the medical record.
[0068] Condition 13, Preset Condition: The patient is considered to have been in critical condition during hospitalization as stated on the first page of the medical record. Required Condition: The doctor's order must contain the words "critical condition" or "serious illness".
[0069] Step 106, Large Model Validation: The validation results of the inpatient medical record knowledge graph and rule engine for each data name are input into the medical domain-specific large model in the large model's reasoning layer. The medical domain-specific large model performs cross-regional relational logical reasoning validation, temporal relational logical reasoning validation, and rationality logical reasoning validation based on pre-trained medical logic knowledge, outputting suspected logical error results in the following format: Error Type + Data Name Involved / Region of Data Name + Suspected Error Description + Confidence Level + Reasoning Basis. For example, [Error Type] Logical Error + [Data Name Region] Surgical Record + [Suspected Error Description] Patient age does not match surgery type + [Confidence Level] 99% + [Reasoning Basis] Prostatectomy is mainly applicable to adult males; the patient's age is 10 years old, which does not meet the common applicable population for this surgery.
[0070] Among them, cross-regional association logic reasoning verification: Based on cross-regional association logic knowledge, logical reasoning verification is performed to check whether there are logical contradictions in medical knowledge between the structured field contents recorded in different functional areas. For example, there is a logical contradiction between "the patient's basic information area shows an age of 10 years old" and "the surgical record area shows a surgery name of prostatectomy" (children rarely suffer from this disease, so there is a logical contradiction).
[0071] Temporal Relationship Logical Reasoning Verification: Based on the knowledge of temporal relationship logic, logical reasoning verification is performed to check whether the recorded structured field content conforms to the disease development process in terms of temporal sequence. For example, "discharge diagnosis is pneumonia" but "admission examination report shows no abnormalities in the lungs" and "no records of lung infection-related treatment during hospitalization" present a logical contradiction (lacking a disease development process in temporal sequence, resulting in an implicit logical contradiction).
[0072] Reasonable logic knowledge: Based on reasonable logic knowledge, the content of the recorded structured fields is checked for reasonableness through logical reasoning. For example, if "the patient is 170cm tall and weighs 80kg", but "obesity treatment drugs" are prescribed, there is a logical contradiction (BMI=27.6, which does not meet the standard for obesity, and the rationality of medication is questionable).
[0073] Error Priority Ranking: The medical-specific large model scores suspected logical errors (1-10 points) according to the "error severity" (e.g., "misattributing patient ID" is a high-risk error, "minor deviation in medication dosage" is a medium-risk error). High-scoring errors are prioritized for manual review.
[0074] Step 107, Output the verification results: Generate an inpatient medical record verification report using the verification results from the rule engine and the results of suspected logical errors.
[0075] The inpatient medical record verification report contains multiple error entries, which are displayed in columns. Each error entry is marked with error type, the name of the data involved / the region where the data name is located, and / or confidence level / severity / cause of error, and suggested handling method. Error types include explicit errors, missing data, mismatch of conditions, and logical errors.
[0076] For example: missing materials → discharge summary → need to supplement the archive, logical error → medical record cover page and surgical record → age and surgical type do not match → need to verify patient information or surgical record.
[0077] Clicking on an erroneous entry in the inpatient medical record verification report will directly redirect to the corresponding page in the preprocessed scanned data, showing the name of the relevant document or the area containing that document name. A "one-click location" function is supported; clicking on an erroneous entry in the inpatient medical record verification report will directly redirect to the corresponding page in the preprocessed scanned data, allowing staff to easily view the original information.
[0078] Step 108, Manual Review and Feedback: Manually review each error entry in the inpatient medical record verification report. If the error entry is a real error (e.g., materials are indeed missing), mark it as a true error. If the error entry is a misjudged error (e.g., an OCR recognition error leads to a misjudgment of a missing examination report, but the report actually exists in the preprocessed scan data), mark it as a false positive and feed it back to the OCR recognition layer and semantic parsing layer to update the medical terminology dictionary and / or adjust the recognition parameters.
[0079] For false positive results, record the reason for the misjudgment (e.g., OCR recognition identifies "chest CT report" as "chest CT" and fails to match "chest CT report"), and feed it back to the OCR recognition layer and semantic parsing layer for updating the terminology dictionary and adjusting recognition parameters.
[0080] Step 109, Closed-Loop Management and Model Optimization: For error entries marked as true errors, generate rectification task sheets and assign them to the corresponding responsible departments (e.g., missing materials are supplemented by clinical departments, and logical errors are corrected by doctors). Track the rectification progress until the inpatient medical records meet the standards and are archived. Regularly analyze the verification accuracy, error type distribution, and manual review feedback data. Add new medical characters to the medical-specific character library in the OCR recognition layer, update the medical terminology dictionary in the semantic parsing layer, optimize the rule logic in the rule engine layer, and fine-tune the medical-specific large model in the large model inference layer by adding labeled data, continuously improving verification efficiency and accuracy.
[0081] The innovations of this invention are as follows: 1) Technological synergy: For the first time, OCR recognition, semantic parsing, rule engine, and large model reasoning are deeply integrated. The rule engine enables "rigid and fast" basic verification, while the large model covers "flexible and complex" logical verification, solving the pain point of traditional medical record verification of "either missing judgment or misjudgment"; 2) Adaptability to the medical field: The entire process is customized based on medical scenarios (such as ICD-10 terminology standardization and medical logical reasoning training), improving accuracy by more than 30% compared to general verification technologies; 3) Scalability and ease of use: The rule engine supports visual configuration, and the large model supports incremental fine-tuning. Medical record room staff can operate it without professional technical background, and it can also adapt to the medical record management standards of different hospitals (such as the difference in required materials between tertiary hospitals and community hospitals).
[0082] like Figure 2 As shown, this embodiment of the invention also provides an inpatient medical record quality control system based on knowledge graph and large language model, including an architecture layer construction module 1, a medical record acquisition and processing module 2, an OCR recognition module 3, a semantic parsing module 4, a rule engine verification module 5, a large model verification module 6, and a verification result output module 7.
[0083] The architecture layer module 1 is used to sequentially build the OCR recognition layer, semantic parsing layer, rule engine layer, and large model inference layer. The OCR recognition layer has a built medical-specific character library and a pre-trained model for the medical field, and pre-stores edge detection and region segmentation algorithms as well as recognition parameters for different functional areas. The semantic parsing layer has a built medical terminology dictionary. The rule engine layer provides a visual rule configuration interface for configuring the rule system, which includes explicit error verification rules, data missing verification rules, and condition item verification rules. The large model inference layer has a built large model for the medical field with medical logical knowledge.
[0084] The medical record acquisition and processing module 2 is used to scan all received paper inpatient medical records to obtain inpatient medical record scan data, preprocess and optimize the inpatient medical record scan data, and automatically generate preprocessed scan data and store it in an encrypted database.
[0085] The OCR recognition module 3 first uses edge detection and region segmentation algorithms to divide each page in the preprocessed scanned data into functional areas and optimizes each functional area according to recognition parameters. Then, it uses a pre-trained model in the medical field and combines it with a medical-specific character library to identify and extract information from each functional area, generating a list of data names and structured data containing structured fields corresponding to each functional area under each data name.
[0086] The semantic parsing module 4 is used to standardize the terminology of each structured data under each data name using a medical terminology dictionary and string matching + semantic similarity calculation technology to obtain the corresponding standardized text. It uses named entity recognition technology to extract key entities from the standardized text and uses a relation extraction algorithm to clarify the relationship between entities, thereby generating a knowledge graph of inpatient medical records for each data name.
[0087] The rule engine validation module 5 is used to perform explicit error validation on each structured field one by one using explicit error validation rules, automatically marking explicit errors; to perform data missing validation on the generated data name list using data missing validation rules, automatically marking missing data names; and to perform condition item validation on the condition items between each structured data using condition item validation rules, automatically marking condition item mismatches, and outputting the rule engine validation results.
[0088] The large model verification module 6 is used to input the verification results of the inpatient medical record knowledge graph and rule engine for each data name into the medical domain-specific large model. The medical domain-specific large model performs logical reasoning verification based on pre-trained medical logic knowledge and outputs results of suspected logical errors.
[0089] The verification result output module 7 is used to generate an inpatient medical record verification report using the verification results from the rule engine and the results of suspected logical errors.
[0090] This invention also provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the aforementioned method.
[0091] This invention also provides a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the aforementioned method.
[0092] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0093] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but all such changes and modifications fall within the scope of protection of the present invention.
Claims
1. A method for quality control of inpatient medical records based on knowledge graphs and large language models, characterized in that, Including the following steps: S1. Architecture Layer Construction: The architecture consists of an OCR recognition layer, a semantic parsing layer, a rule engine layer, and a large model inference layer. The OCR recognition layer has a medical-specific character library and a pre-trained model for the medical field, and pre-stores edge detection and region segmentation algorithms as well as recognition parameters for different functional areas. The semantic parsing layer has a medical terminology dictionary. The rule engine layer provides a visual rule configuration interface for configuring the rule system, which includes explicit error verification rules, data missing verification rules, and conditional item verification rules. The large model inference layer has a large model for the medical field with medical logical knowledge. S2. Inpatient medical record collection and preprocessing: All received paper inpatient medical records are scanned to obtain inpatient medical record scan data. The inpatient medical record scan data is preprocessed and optimized, and the preprocessed scan data is automatically generated, stored in an encrypted database, and sent to the OCR recognition layer. S3, OCR recognition: First, edge detection and region segmentation algorithms are used to divide each page in the preprocessed scanned data into functional areas and optimize each functional area according to recognition parameters. Then, a pre-trained model in the medical field is used in combination with a medical-specific character library to identify and extract information from each functional area, generate a list of data names and structured data containing structured fields corresponding to each functional area under each data name, and send it to the semantic parsing layer. S4. Semantic parsing: Using a medical terminology dictionary and string matching + semantic similarity calculation technology, the terminology of each structured data under each data name is standardized to obtain the corresponding standardized text. Named entity recognition technology is used to extract key entities from the standardized text, and the relationship between entities is clarified through relation extraction algorithm to generate a knowledge graph of inpatient medical records for each data name. S5. Rule Engine Validation: Input each standardized text into the rule engine layer, use explicit error validation rules to perform explicit error validation on each structured field one by one, automatically mark explicit errors, use data missing validation rules to perform data missing validation on the generated data name list, automatically mark missing data names, use condition item validation rules to perform condition item validation between each structured data, automatically mark condition item mismatch, and output the rule engine validation results. S6. Large Model Validation: The validation results of the inpatient medical record knowledge graph and rule engine for each data name are input into the medical domain-specific large model in the large model reasoning layer. The medical domain-specific large model performs logical reasoning validation based on pre-trained medical logic knowledge and outputs results of suspected logical errors. S7. Verification Result Output: Generate an inpatient medical record verification report using the verification results from the rule engine and suspected logical error results.
2. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S1, the pre-trained model in the medical field adopts the LayoutLMv3 model based on the Transformer architecture, which has the ability to extract three-dimensional features and is used to identify and extract information of different formats in inpatient medical records. The large-scale model for the medical field adopts a Medical-LLM model based on LLaMA-2 fine-tuning. It constructs a medical-specific knowledge base, including a medical-specific character library, a medical terminology dictionary, and an existing medical knowledge base. It uses a large number of compliant inpatient medical records and a large number of inpatient medical records containing medical logical errors to construct a labeled sample dataset. The large language model is trained and learned using the constructed medical-specific knowledge base and the labeled sample dataset to obtain a large-scale model for the medical field with medical logical knowledge.
3. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S2, noise reduction, tilt correction, and resolution normalization preprocessing optimization operations are performed on the inpatient medical record scan data to automatically generate preprocessed scan data.
4. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S3, each structured field has the following structure: Field Name - Recognized Content - Confidence Score. The association between each structured field and the corresponding functional area of the corresponding page in the preprocessed scanned data is set. Structured fields with confidence scores below the set threshold are marked as pending manual confirmation. When there is a pending manual confirmation mark, a manual confirmation prompt is given, and subsequent operations are not performed. After manual confirmation, subsequent operations are performed.
5. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, The priority of explicit error validation rules is greater than that of missing data validation rules, which in turn is greater than that of conditional item validation rules.
6. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S5, explicit error checking rules include: Rule 1: Compare and verify the structured fields containing the patient's name, admission / discharge date, and medical record number in the medical record cover sheet with the structured fields containing the patient's name, admission / discharge date, and medical record number in all other documents except the medical record cover sheet. Automatically mark any documents with a name that does not match the name in the medical record cover sheet, an admission or discharge date that is not within the admission / discharge dates in the medical record cover sheet, or a medical record number that does not match the medical record number in the medical record cover sheet as obviously incorrect. Rule 2, field-level validation rules, including patient ID format, diagnosis results cannot be empty, examination reports must include examination date and examination conclusion, medication dosage must conform to unit specifications, and those that do not meet the requirements will be automatically marked as obviously wrong.
7. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S5, the data missing verification rules include: Rule 1: Identify the data name as the number of days of hospitalization contained in the medical record cover page, compare and verify the list of required items matching the number of days of hospitalization with the list of data names, identify the data names that are missing from the list of required items in the list of data names, and automatically mark the missing data names. For hospital stays of no more than 24 hours, there must be a first list of required items; for hospital stays of more than 24 hours, there must be a second list of required items. Both the first and second lists of required items contain the required items listed in the document name list. Rule 2: Compare and verify the list of data names with all electronic medical records of the patient during hospitalization in the hospital's business system, identify any missing electronic medical record names in the list of data names, and automatically mark the missing data names. Among the data missing verification rules, rule one has the highest execution priority.
8. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S5, the condition item validation rules include multiple condition items. The condition item is a one-to-one correspondence between the preset condition and the required item of the condition. The preset condition of each condition item is matched and validated with the corresponding required item of the condition. If a mismatch is found, the condition item is automatically marked as mismatched. Condition 1, Pre-set condition: The medical order contains the word "consultation". Required conditions: Consultation-related materials, including the application form and consultation record; Condition 2, Pre-set conditions: Consultation-related materials, Required condition: The doctor's order form must contain the word "consultation"; Condition 3, Pre-set condition: The surgical fee in the follow-up page of the medical record is not 0. Required conditions: Surgical related materials, including surgical informed consent form, preoperative or preoperative consultation record, preoperative discussion record, preoperative summary, surgical record, surgical nursing record sheet, surgical risk assessment form and surgical safety checklist. Condition 4, Preset Condition: Surgical related information; Required condition: Surgical fee is not 0 in the first page or subsequent pages of the medical record. Condition 5, Preset Condition: The anesthesia fee in the follow-up page of the medical record is not 0. Required conditions: Anesthesia-related materials, including the patient's agreement to voluntarily use disposable medical materials and drugs, pre-anesthesia visit record, pre-anesthesia conversation record, anesthesia recovery room record sheet, and anesthesia record; Condition 6, Preset Condition: Anesthesia-related information; Required Condition: Anesthesia fee is not 0 in the first page or follow-up page of the medical record. Condition 7, Preset Condition: The pathology diagnosis fee in the follow-up page of the medical record is not 0; Required Item: Pathology Report. Condition 8, Preset Condition: Pathology report, Required Item: The pathology diagnosis fee in the follow-up page of the medical record is not 0; Condition 9, Preset Condition: The patient's condition is "critical" as recorded on the first page of the medical record during hospitalization. Required conditions: relevant information on the critical condition, including records of critical case discussions and critical condition notification forms. Condition 10, Preset Condition: Critical illness related information, Required condition: Critical illness occurred during hospitalization as recorded on the first page of the medical record; Condition 11, Preset Condition: The patient's medical record front page indicates that a difficult case occurred during hospitalization. Required conditions: Relevant materials related to the difficult case, including records of discussions on difficult cases. Condition 12, Preset Condition: Difficult-related information, Required condition: Difficult situations occurred during hospitalization as shown on the first page of the medical record; Condition 13, Preset Condition: The patient is considered to have been in critical condition during hospitalization as stated on the first page of the medical record. Required Condition: The doctor's order must contain the words "critical condition" or "serious illness".
9. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S1, the medical-specific large model includes cross-regional association logic knowledge, temporal relationship logic knowledge, and rationality logic knowledge. Cross-regional association logic knowledge requires that the structured field content recorded in different functional areas conforms to medical knowledge logic. Temporal relationship logic knowledge requires that the recorded structured field content conforms to the disease development process in terms of time sequence. Rationality logic knowledge requires that the recorded structured field content conforms to rationality. In S6, the inpatient medical record knowledge graph and rule engine verification results for each data name are input into the medical domain-specific large model. The medical domain-specific large model performs cross-regional association logic reasoning verification, temporal relationship logic reasoning verification, and rationality logic reasoning verification based on pre-trained medical logic knowledge, and outputs suspected logical error results. Among them, cross-regional association logic reasoning verification: based on cross-regional association logic knowledge, logical reasoning verification is performed to check whether there are logical contradictions in medical knowledge between the structured field contents recorded in different functional areas; Temporal relationship logical reasoning verification: Based on the knowledge of temporal relationship logic, logical reasoning verification is performed to check whether the recorded structured field content conforms to the disease development process in terms of temporal sequence; Reasonable logic knowledge: Based on reasonable logic knowledge, perform logical reasoning to verify whether the recorded structured field content is reasonable.
10. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 1, characterized in that, In S6, the output format for suspected logical error results is: Error type + Name of the data involved / Region of the data name + Description of the suspected error + Confidence level + Reasoning basis; In S7, the inpatient medical record verification report contains multiple error entries, which are displayed in columns. Each error entry is marked with error type, the name of the data involved / the region where the data name is located, and / or confidence level / severity / cause of error, and suggested handling method. Error types include explicit errors, missing data, condition mismatch, and logical errors.
11. The inpatient medical record quality control method based on knowledge graph and large language model as described in claim 10, characterized in that, In S7, if an error entry in the inpatient medical record verification report is clicked, it will directly jump to the corresponding page in the preprocessed scanned data, i.e., the data name / the area where the data name is located.
12. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 10, characterized in that, S7 and later include: S8. Manual review and feedback: Each error entry in the inpatient medical record verification report is manually reviewed. If the error entry is a real error, it is marked as a true error; if the error entry is a misjudged error, it is marked as a false positive. Feedback is then sent to the OCR recognition layer and semantic parsing layer to update the medical terminology dictionary and / or adjust the recognition parameters.
13. The inpatient medical record quality control method based on knowledge graphs and large language models as described in claim 12, characterized in that, S8 and later include: S9. Closed-loop management and model optimization: For error entries marked as true errors, generate rectification task sheets and assign them to the corresponding responsible departments, track the rectification progress until the inpatient medical records meet the standards and are archived, regularly statistically analyze the verification accuracy, error type distribution and manual review feedback data, supplement the medical-specific character library in the OCR recognition layer with new medical characters, update the medical terminology dictionary in the semantic parsing layer, optimize the rule logic in the rule engine layer, and fine-tune the medical-specific large model in the large model inference layer by adding labeled data.
14. A quality control system for inpatient medical records based on knowledge graphs and large language models, characterized in that, include: An architecture layer construction module is used to sequentially build an OCR recognition layer, a semantic parsing layer, a rule engine layer, and a large model inference layer. The OCR recognition layer has a built medical-specific character library and a pre-trained model for the medical field, and pre-stores edge detection and region segmentation algorithms as well as recognition parameters for different functional areas. The semantic parsing layer has a built medical terminology dictionary. The rule engine layer provides a visual rule configuration interface for configuring the rule system, which includes explicit error verification rules, data missing verification rules, and condition item verification rules. The large model inference layer has a built large model for the medical field with medical logical knowledge. A medical record acquisition and processing module is used to scan all received paper inpatient medical records to obtain inpatient medical record scan data, preprocess and optimize the inpatient medical record scan data, and automatically generate preprocessed scan data and store it in an encrypted database. An OCR recognition module is used to first divide each page of the preprocessed scanned data into functional areas using edge detection and region segmentation algorithms, and optimize each functional area according to recognition parameters. Then, it uses a pre-trained model in the medical field and combines it with a medical-specific character library to identify and extract information from each functional area, generating a list of data names and structured data containing structured fields corresponding to each functional area under each data name. A semantic parsing module is used to standardize the terminology of each structured data under each data name using a medical terminology dictionary and string matching + semantic similarity calculation technology to obtain the corresponding standardized text. Named entity recognition technology is used to extract key entities from the standardized text and clarify the relationship between entities through relation extraction algorithm to generate a knowledge graph of inpatient medical records for each data name. A rule engine validation module is used to perform explicit error validation on each structured field one by one using explicit error validation rules, automatically marking explicit errors; to perform data missing validation on the generated data name list using data missing validation rules, automatically marking missing data names; and to perform condition item validation on the condition items between each structured data using condition item validation rules, automatically marking condition item mismatches, and outputting the rule engine validation results. A large model verification module is used to input the verification results of the inpatient medical record knowledge graph and rule engine for each data name into a large medical domain model. The large medical domain model performs logical reasoning verification based on pre-trained medical logic knowledge and outputs results of suspected logical errors. A verification result output module is used to generate inpatient medical record verification reports using the verification results from the rule engine and suspected logical error results.
15. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in memory to execute the method of any one of claims 1-13.
16. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When computer program instructions are executed by a processor, they implement the method of any one of claims 1-13.