Intelligent medical record classification method and system
By using the RoBERTa-Med model and multi-method feature selection, feature entity analysis and similarity retrieval of medical record data are achieved, solving the problems of medical record priority classification and early warning and mortality risk prediction, and optimizing clinical resource allocation and diagnosis and treatment decisions.
Patent Information
- Application Number
- CN202610084139.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-22
- Publication Date
- 2026-02-17
AI Technical Summary
Existing technologies do not incorporate feature engineering, fail to predict individual mortality risk, and lack early warning by prioritizing medical records.
The RoBERTa-Med model is used for feature entity analysis, combined with multi-method feature selection to generate urgency priority, and the medical record quality control algorithm is used for similarity retrieval to achieve priority ranking of medical record data and matching of similar medical records.
It accurately identifies key clinical entities in medical records, generates an emergency priority list, quickly identifies the most critically ill patients, optimizes the allocation of clinical resources, provides reference for treatment plans and historical outcome comparisons, and assists in the development of intervention strategies.
Smart Images

Figure CN121545658A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text classification technology, and in particular to an intelligent medical record classification method and system. Background Technology
[0002] With the development of society, economy, and technology, smart healthcare is one of the most promising scenarios. Among them, automatic diagnosis based on medical texts is a key link in smart healthcare. Usually, medical diagnosis requires doctors to manually analyze and judge based on medical texts, combining their medical knowledge and practical experience. However, this labor-intensive task is inefficient when faced with the increasing number of patients and the corresponding increase in medical text data. Therefore, the demand for using artificial intelligence technology to automatically classify medical records is growing.
[0003] Currently, Chinese invention patent application number 202510456445.9 discloses an artificial intelligence-based method for classifying and warning medical records. This invention mainly includes data collection, standardization processing, primary and secondary classification prediction, data fusion, warning judgment, and report generation. Through multi-source data fusion and a phased dynamic prediction mechanism, it solves the technical problem of real-time warning of potential hospitalization needs in medical records, effectively warning of hospitalization resource shortages. It uses historical data and model prediction, and obtains warning results based on the doctor's final decision, avoiding the influence of long-term stagnant prediction information on warnings, ensuring timely data transformation, and ensuring timely feedback on hospitalization resource risks. The entire process of this invention is recordable and traceable, providing a complete basis for manual intervention, system optimization, and subsequent model iteration.
[0004] The aforementioned technological inventions do not incorporate feature engineering, do not predict individual mortality risk, and lack early warning by prioritizing medical records. Summary of the Invention
[0005] The technical problem solved by this invention is that it does not employ feature engineering fusion, does not predict individual mortality risk, and lacks early warning for prioritizing medical records.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] Firstly, an intelligent medical record classification method includes the following steps:
[0008] Step S1: Collect medical record data within a unit time period from the hospital database and store the medical record data in a standardized manner. The medical record data includes basic patient information, medical record details, and medication usage records.
[0009] Step S2: Use the RoBERTa-Med model to perform feature entity analysis on the medical record data to generate the first data;
[0010] Step S3: Calculate the feature matrix of the first data based on multi-method feature selection to generate an emergency priority, and sort the medical record data according to the emergency priority.
[0011] Step S4: Use the medical record quality control algorithm to match the similarity between the current medical record and historical medical record data to obtain similar medical record data.
[0012] Preferably, step S1 includes the following sub-steps:
[0013] Step S11: Export the medical record data of all inpatients admitted throughout the year from the hospital information system database;
[0014] Step S12: Classify the medical record data into three-level labels according to the disease classification standard. The three-level label classification is used to divide the disease categories in the medical record data into three categories of labels. The three categories of labels include primary labels, secondary labels and tertiary labels, and are stored in the form of a dictionary. The tertiary labels belong to the secondary labels and the primary labels.
[0015] Step S13: Create a single disease mapping table, set the disease number for each disease, and map the disease number to the disease category one by one;
[0016] The medical record data includes basic patient information, medical record details, and medication usage records;
[0017] The patient's basic information includes patient number, gender, age, BMI, admission time, and current disease number;
[0018] The medical record details include present medical history, past medical history, physical examination, diagnosis results, medical progress notes, surgical records, and examination reports;
[0019] The drug usage record includes the drug name, specifications, dosage, route of administration, frequency of administration, start time of administration, and stop time of administration.
[0020] Preferably, step S2 includes the following sub-steps:
[0021] Step S21: Extract the medical record details and medication usage records from the medical record data, and perform the first word segmentation process to obtain the segmentation result. ,in The segmentation result is the effective text segmentation result in each medical record data;
[0022] Step S22: Using jieba word segmentation, perform a second word segmentation process on the effective text segmentation result to obtain the segmentation result. Each word in Calculate word segmentation exist The frequency p(w) of occurrence in the word segment is calculated based on the frequency of occurrence of each word segment. The self-information quantity, the expression for calculating the self-information quantity is:
[0023] ;
[0024] in, for The self-information value, the The self-information is negatively correlated with the frequency of occurrence. The self-information of all words in the medical record data is weighted and summed to obtain the information entropy value of each sentence in the medical record data.
[0025] Step S23: The information entropy is matched one-to-one with the medical records, and the records are grouped according to the disease number. The medical records with information entropy values higher than a set threshold in each group are extracted and saved as the first medical record data.
[0026] Step S24: Use the RoBERTa-Med model to perform structured entity analysis on the first medical record data to generate first data. The first data is used to store the feature encoding results of each word segmentation in the first medical record data.
[0027] Preferably, the processing logic for performing structured entity analysis on the first medical record data using the RoBERTa-Med model includes:
[0028] The first medical record data is input into the RoBERTa-Med model for dynamic term-aware encoding. 15% of the entities in the first medical record data are randomly selected and masked.
[0029] The masking process involves replacing the masked entity with [Mask], while retaining entities whose information entropy value is greater than the information entropy threshold without masking, and then performing weight differentiation.
[0030] The weighted differential processing logic includes: increasing the attention weight of symptom words in the first medical record data to 1.8 times the baseline value;
[0031] Based on symptom weighting, the outliers in the test reports are dynamically gained according to the normal value range. The dynamic gain calculation expression for the outliers is as follows:
[0032] ;
[0033] Where s represents the outlier detected. To normalize the range, the current entity undergoes triple embedding and fusion. Bidirectional semantic modeling is used, clinical attention gating is implemented, and a clinical bias matrix is added. Key entity focusing is performed on symptoms, outliers in tests, and medications within the medical record data entity. A gated feedforward network enhances the feature interactions of each entity, capturing entity association strength. Entities are grouped according to symptoms, medications, and tests, and max pooling is performed independently. Symptoms are embedded to generate symptom entity vectors. An online UMLS knowledge base is used to match and correct semantic ambiguities in the entity vectors, generating an entity table. This entity table is saved as the first data, which includes entity ID, symptom name, symptom data, symptom weight, test name, test data, test weight, medication name, medication dosage, medication weight, associated entity ID, information entropy value, and outliers in tests.
[0034] Preferably, step S3 includes the following sub-steps:
[0035] Step S31: Classify the first data by risk level, set an abnormal threshold, set the risk level to high risk when the abnormal value is greater than the abnormal threshold, set the risk level to low risk when the abnormal value is less than the abnormal threshold, set the risk level to medium risk when the abnormal value is within the abnormal threshold, use label coding to distinguish the current patient's death status and survival status, generate death labels, and match the death labels with the first data one by one;
[0036] Step S32: The first data is processed by feature vectorization to obtain a medical record feature matrix m*d. The number of rows m in the medical record feature matrix is used to represent the entity symptom sample of the current patient, and the number of columns d in the medical record feature matrix is used to record the entity features of the patient.
[0037] Step S33: Perform Z-score standardization on each sample feature of the medical record feature matrix to obtain a first feature matrix. Use multi-method feature selection to perform parallel feature processing on the first feature matrix to obtain an urgency priority. Sort the medical record data according to the urgency priority.
[0038] Preferably, the parallel feature scoring method includes a first scoring process and a second scoring process;
[0039] The first scoring process is used to calculate information gain using label entropy and conditional entropy;
[0040] The first data is categorized according to entity categories, and the proportion of deaths for each entity category is calculated. These entity categories include drug categories, symptom categories, and test categories. The label entropy is then calculated using this proportion of deaths, and the expression for the label entropy is as follows:
[0041] ;
[0042] in, The tag entropy, The percentage of deaths in entity death category c;
[0043] Extract the entity feature value v from the first feature matrix, and determine the conditional probability of entity death category c when entity feature value v appears in each sample. The conditional entropy is calculated using the conditional probability, and the expression for calculating the conditional entropy is:
[0044] ;
[0045] in, For conditional entropy, To obtain the information gain value, subtract the conditional entropy from the label entropy of the current entity's death category c to get the probability of occurrence of the entity feature value v. Output the information gain value as a vector to generate a feature importance value vector.
[0046] The second scoring process is used to calculate the mean, variance, and global mean of entity features across different death categories, and to calculate the score for each entity feature. The expression for calculating the score for each entity feature is as follows:
[0047] ;
[0048] in, For entity feature scores, For the number of samples in each category, Let j be the average value of feature j in death category c. Let J be the variance of feature j in death category c. The entity feature score is the global mean of the entity features. The entity feature score is then output as a vector to generate an entity feature score vector.
[0049] The entity feature score vector and the feature importance value vector are paired, and the information gain value and the entity feature score are summed and averaged to generate an urgency priority.
[0050] Preferably, the processing logic for prioritizing medical record data according to the urgency priority is as follows:
[0051] Sort all medical records according to their urgency priority from highest to lowest, and generate a sorted list of medical records. The sorted list of medical records includes the patient number, urgency priority, test number, and abnormal test values.
[0052] Preferably, step S4 specifically includes:
[0053] The medical record list and the first data are input into the quality control rule base as historical medical record data. The current medical record is screened in the quality control rule base to obtain historical medical records that match the current medical record. The Jaccard similarity coefficient between the current medical record and the historical medical record data is calculated. If the similarity coefficient is greater than the similarity threshold, a warning is triggered and the matching medical record is exported to generate similar medical record data.
[0054] Preferably, the processing logic for quality control screening of the current medical record in the quality control rule base is as follows:
[0055] The current medical record is checked for conflict with historical medical record data in the quality control rule base. The quality control rule engine scans historical medical record data with the same disease number as the current medical record as the first similar data. Conflict detection is performed on the first similar data. If the entity of the current medical record exists in the entity of the historical medical record data, the entity vector of the successfully matched entity is marked as 1. If the entity of the current medical record conflicts with the entity of the historical medical record data, the conflicting entity is marked and the entity vector of the current medical record is marked as 0, and the current disease vector is generated.
[0056] Secondly, an intelligent medical record classification system includes a medical record acquisition module, an entity analysis module, a probability scoring module, and a similarity matching module;
[0057] The medical record acquisition module is used to collect medical record data within a unit of time and store the medical record data in a standardized manner. The medical record data includes basic patient information, medical record details, and medication usage records.
[0058] The entity analysis module is used to perform feature entity analysis on the medical record data using the RoBERTa-Med model to generate the first data;
[0059] The probability scoring module is used to calculate the feature matrix of the first data based on multi-method feature selection, obtain the first feature matrix, and apply the first scoring process and the second scoring process to the first feature matrix to generate an emergency priority, and sort the medical record data according to the emergency priority.
[0060] The similarity matching module is used to use a medical record quality control algorithm to match the similarity between the current medical record and historical medical record data to obtain similar medical record data.
[0061] The beneficial effects of this invention are as follows: Through data preprocessing and feature extraction, feature entity analysis is performed using the RoBERTa-Med model. This model can deeply understand the semantic assignment of medical text, accurately identify key clinical entities such as diseases, symptoms, examinations, and drugs contained in medical records, and transform them into structured first data. Then, multi-method feature selection is used, fusing InfoGain and FisherScore to filter high-dimensional features, retaining the feature subset most relevant to the mortality outcome, generating an emergency priority, refining the mortality risk, and finally transforming it into a priority list of medical records sorted from high to low risk, thereby quickly identifying the most critically ill patients and optimizing the allocation of clinical resources. Finally, through the similar medical record retrieval function, using vectorization technology, historical similar medical records are quickly matched for current high-risk medical records, providing doctors with references for treatment plans and analogies to historical outcomes, thereby assisting in the formulation of intervention strategies for current patients. Attached Figure Description
[0062] Figure 1 A flowchart illustrating the steps of an intelligent medical record classification method according to an embodiment of the present invention;
[0063] Figure 2 This is a basic flowchart of an intelligent medical record classification system provided in one embodiment of the present invention. Detailed Implementation
[0064] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0065] Example 1, referring to Figure 1 This paper provides an intelligent medical record classification method, which includes the following steps:
[0066] Step S1: Collect medical record data within a unit time period from the hospital database and store the medical record data in a standardized manner. The medical record data includes basic patient information, medical record details, and medication usage records.
[0067] Step S2: Use the RoBERTa-Med model to perform feature entity analysis on the medical record data to generate the first data;
[0068] Step S3: Calculate the feature matrix of the first data based on multi-method feature selection to generate an emergency priority, and sort the medical record data according to the emergency priority.
[0069] Step S4: Use the medical record quality control algorithm to match the similarity between the current medical record and historical medical record data to obtain similar medical record data.
[0070] In this embodiment, through data preprocessing and feature extraction, the RoBERTa-Med model is used for feature entity analysis. This model can deeply understand the semantics of medical text, accurately identify key clinical entities such as diseases, symptoms, examinations, and drugs contained in medical records, and transform them into structured first data. Then, a multi-method feature selection is used, fusing InfoGain and FisherScore to filter high-dimensional features, retaining the feature subset most relevant to the mortality outcome, generating an emergency priority, refining the mortality risk, and finally transforming it into a priority list of medical records sorted from high to low risk, thereby quickly identifying the most critical patients and optimizing the allocation of clinical resources. Finally, through the similar medical record retrieval function, using vectorization technology, historical similar medical records are quickly matched for the current high-risk medical records, providing doctors with references for treatment plans and analogies to historical outcomes, thereby assisting in the formulation of intervention strategies for the current patients.
[0071] Step S1 includes the following sub-steps:
[0072] Step S11: Export the medical record data of all inpatients admitted throughout the year from the hospital information system database;
[0073] Step S12: Classify the medical record data into three-level labels according to the disease classification standard. The three-level label classification is used to divide the disease categories in the medical record data into three categories of labels. The three categories of labels include primary labels, secondary labels and tertiary labels, and are stored in the form of a dictionary. The tertiary labels belong to the secondary labels and the primary labels.
[0074] Step S13: Create a single disease mapping table, set the disease number for each disease, and map the disease number to the disease category one by one;
[0075] The medical record data includes basic patient information, medical record details, and medication usage records;
[0076] The patient's basic information includes patient number, gender, age, BMI, admission time, and current disease number;
[0077] The medical record details include present medical history, past medical history, physical examination, diagnosis results, medical progress notes, surgical records, and examination reports;
[0078] The drug usage record includes the drug name, specifications, dosage, route of administration, frequency of administration, start time of administration, and stop time of administration.
[0079] Using SQL queries or data interface tools, complete medical record data for all inpatients admitted in 2024 were exported from hospital information systems, electronic medical records, and other databases. Based on the ICD-10 disease classification standard, a three-level disease classification system was defined, for example, a first-level label (major category): circulatory system diseases; a second-level label (intermediate category): ischemic heart disease; and a third-level label (subcategory): acute myocardial infarction. The main diagnosis of each medical record was assigned to one of these three systems and stored in dictionary form as a three-level hierarchy, for example: {"I21.0":["circulatory system diseases", "ischemic heart disease", "acute myocardial infarction"]}. This method mainly transforms unstructured diagnostic text into machine-readable, hierarchical standard labels. Then, an independent mapping table was created containing at least two columns of data: disease code... The patient information table is set as the main table, with the patient number as the primary key. Each record includes gender, age, BMI, admission time, and the crucial current disease number. The current disease number is linked to the disease mapping table. The medical record details table is the first sub-table, which is associated with the main table through the patient number and stores unstructured or semi-structured text such as current medical history and past medical history. The medication records table is the second sub-table, which is also associated with the patient number and records each medication use event in a structured format. In this embodiment, the most core clinical information is standardized through the disease classification system and mapping table, providing effective data support for subsequent statistical description, population comparison, and risk level analysis.
[0080] Step S2 includes the following sub-steps:
[0081] Step S21: Extract the medical record details and medication usage records from the medical record data, and perform the first word segmentation process to obtain the segmentation result. ,in The segmentation result is the effective text segmentation result in each medical record data;
[0082] Step S22: Using jieba word segmentation, perform a second word segmentation process on the effective text segmentation result to obtain the segmentation result. Each word in Calculate word segmentation exist The frequency p(w) of occurrence in the word segment is calculated based on the frequency of occurrence of each word segment. The self-information quantity, the expression for calculating the self-information quantity is:
[0083] ;
[0084] in, for The self-information value, the The self-information is negatively correlated with the frequency of occurrence. The self-information of all words in the medical record data is weighted and summed to obtain the information entropy value of each sentence in the medical record data.
[0085] Step S23: The information entropy is matched one-to-one with the medical records, and the records are grouped according to the disease number. The medical records with information entropy values higher than a set threshold in each group are extracted and saved as the first medical record data.
[0086] Step S24: Use the RoBERTa-Med model to perform structured entity analysis on the first medical record data to generate first data. The first data is used to store the feature encoding results of each word segmentation in the first medical record data.
[0087] Text fields are extracted from the resulting medical record data for further word segmentation. A list of sentences corresponding to each medical record is output, representing the effective text segmentation result. Using the jieba word segmentation tool, a medical dictionary is loaded to perform fine-grained word segmentation on each sentence, resulting in a word sequence. Within a single sentence, the probability of each word w appearing in that sentence is calculated: p(w) = (number of times word w appears in the sentence) / (total number of words in the sentence). For each word in the sentence, its self-information I(w) is calculated. The lower the probability of a word appearing in a sentence, the greater the information it brings. For example, the information brought by the appearance of "amiodarone" in a sentence is much greater than that brought by the appearance of "patient". The self-information of all words in the sentence is weighted and summed according to their probabilities: H(sentence) = Σ[p(w)*I(w)] = -Σ[p(w)*log( p(w))], obtain the information entropy of the sentence. The higher the information entropy value, the more uncertain information the sentence contains and the greater the information density. The sentences with calculated information entropy are grouped according to the disease number of their respective medical records (e.g., I21.0 acute myocardial infarction). Within each disease group, the entropy values of all sentences are statistically analyzed. The threshold is not set as a fixed value, but rather the percentile method is used to retain the sentences with the top 40% of entropy values. The high information density sentences above the threshold in each disease group are saved as the first medical record data. The selected first medical record data is input into the RoBERTa-Med model. The model performs named entity recognition, identifies the clinical entities (such as diseases, symptoms, drugs, examinations, etc.) in the sentences, and gives their corresponding standard codes or types. Each sentence is converted into a feature vector and the first data is output.
[0088] In this embodiment, information entropy, a quantitative indicator in information theory, is applied to measure the value of clinical texts. By filtering through entropy values, a large number of low-value words and phrases are actively discarded, allowing subsequent analysis and computational resources to be focused on high-value texts describing changes in the patient's condition, abnormal findings, and key diagnostic and treatment behaviors.
[0089] The processing logic for performing structured entity analysis on the first medical record data using the RoBERTa-Med model includes:
[0090] The first medical record data is input into the RoBERTa-Med model for dynamic term-aware encoding. 15% of the entities in the first medical record data are randomly selected and masked.
[0091] The masking process involves replacing the masked entity with [Mask], while retaining entities whose information entropy value is greater than the information entropy threshold without masking, and then performing weight differentiation.
[0092] The weighted differential processing logic includes: increasing the attention weight of symptom words in the first medical record data to 1.8 times the baseline value;
[0093] Based on symptom weighting, the outliers in the test reports are dynamically gained according to the normal value range. The dynamic gain calculation expression for the outliers is as follows:
[0094] ;
[0095] Where s represents the outlier detected. To normalize the range, the current entity undergoes triple embedding and fusion. Bidirectional semantic modeling is used, clinical attention gating is implemented, and a clinical bias matrix is added. Key entity focusing is performed on symptoms, outliers in tests, and medications within the medical record data entity. A gated feedforward network enhances the feature interactions of each entity, capturing entity association strength. Entities are grouped according to symptoms, medications, and tests, and max pooling is performed independently. Symptoms are embedded to generate symptom entity vectors. An online UMLS knowledge base is used to match and correct semantic ambiguities in the entity vectors, generating an entity table. This entity table is saved as the first data, which includes entity ID, symptom name, symptom data, symptom weight, test name, test data, test weight, medication name, medication dosage, medication weight, associated entity ID, information entropy value, and outliers in tests.
[0096] In this embodiment, high-information-entropy entities are first retained, and 15% of the words of the remaining entities are randomly masked, making the model more inclined to learn and understand the context related to high-value entities. In the model's self-attention mechanism, the attention weight of symptom words (such as "chest pain" and "difficulty breathing") is actively increased to 1.8 times the baseline value to clarify the core clues for diagnosis. For outliers in the test report, their importance is proportional to the magnitude of deviation from the normal range. The further the test value s deviates from the normal value s_n, the larger the gain factor (1+log(1+|s-s_n|)) is, thereby amplifying the signal of the outlier in the feature vector. Triple embedding combines word embedding, position embedding, and probability embedding. The paragraph embeddings obtain rich initial representations. Then, clinical attention gating and bias moments are used. Clinical attention gating is based on clinical knowledge, allowing information highly relevant to the current task to pass through while suppressing irrelevant information. The clinical bias matrix directly injects knowledge into the model, guiding the model to focus on clinically reasonable semantic relationships. The three major entity categories of symptoms, drugs, and tests are pooled independently. The vector representations of all symptoms are max-pooled to generate a comprehensive symptom entity vector, which is output as the first data. The first data directly contains the key elements (symptoms, abnormal tests, and medication) and their importance weights required for clinical decision-making, which greatly improves the performance of downstream tasks, such as mortality risk prediction.
[0097] Step S3 includes the following sub-steps:
[0098] Step S31: Classify the first data by risk level, set an abnormal threshold, set the risk level to high risk when the abnormal value is greater than the abnormal threshold, set the risk level to low risk when the abnormal value is less than the abnormal threshold, set the risk level to medium risk when the abnormal value is within the abnormal threshold, use label coding to distinguish the current patient's death status and survival status, generate death labels, and match the death labels with the first data one by one;
[0099] Step S32: The first data is processed by feature vectorization to obtain a medical record feature matrix m*d. The number of rows m in the medical record feature matrix is used to represent the entity symptom sample of the current patient, and the number of columns d in the medical record feature matrix is used to record the entity features of the patient.
[0100] Step S33: Perform Z-score standardization on each sample feature of the medical record feature matrix to obtain a first feature matrix. Use multi-method feature selection to perform parallel feature processing on the first feature matrix to obtain an urgency priority. Sort the medical record data according to the urgency priority.
[0101] Based on the outliers in the first dataset generated by S2, a clear outlier threshold is set. According to the actual outcome of the patients, a binary death label vector y is generated, where y_i=1 represents the death of the i-th patient and y_i=0 represents survival. All structured entity features in the first dataset (such as the presence of symptoms, drug dosage, and post-gain test values) are converted into a numerical matrix with dimensions m×d. Each column (i.e., each feature) of the medical record feature matrix is standardized to eliminate the influence of differences in the scale and numerical range between different features, and to prevent features with large values from dominating the model while features with small values are ignored. The standardized first feature matrix and the death label vector y are input into the multi-method feature selection. A parallel processing strategy is adopted to simultaneously calculate information gain (InfoGain) and FisherScore. InfoGain is used to evaluate the amount of information each feature brings to predicting mortality, and FisherScore is used to evaluate the ability of each feature to distinguish between the two classes of samples: death and survival. The scores of the two indicators are normalized and then weighted and fused to obtain the comprehensive importance score of each feature. Then, the top K features with the highest scores are retained to form a simplified m×K feature matrix containing only the most relevant features. Using this simplified feature matrix and death labels, a logistic regression model is trained. This model learns the weight of each feature and can then calculate an urgency priority between 0 and 1 for new or historical patients. All medical records are sorted according to their urgency priority from highest to lowest to obtain a list of medical records. Patients at the top of the list have the highest risk of death and are most in need of priority intervention by clinicians.
[0102] The parallel feature scoring method includes a first scoring process and a second scoring process;
[0103] The first scoring process is used to calculate information gain using label entropy and conditional entropy;
[0104] The first data is categorized according to entity categories, and the proportion of deaths for each entity category is calculated. These entity categories include drug categories, symptom categories, and test categories. The label entropy is then calculated using this proportion of deaths, and the expression for the label entropy is as follows:
[0105] ;
[0106] in, The tag entropy, The percentage of deaths in entity death category c;
[0107] Extract the entity feature value v from the first feature matrix, and determine the conditional probability of entity death category c when entity feature value v appears in each sample. The conditional entropy is calculated using the conditional probability, and the expression for calculating the conditional entropy is:
[0108] ;
[0109] in, For conditional entropy, To obtain the information gain value, subtract the conditional entropy from the label entropy of the current entity's death category c to get the probability of occurrence of the entity feature value v. Output the information gain value as a vector to generate a feature importance value vector.
[0110] The second scoring process is used to calculate the mean, variance, and global mean of entity features across different death categories, and to calculate the score for each entity feature. The expression for calculating the score for each entity feature is as follows:
[0111] ;
[0112] in, For entity feature scores, For the number of samples in each category, Let j be the average value of feature j in death category c. Let J be the variance of feature j in death category c. The entity feature score is the global mean of the entity features. The entity feature score is then output as a vector to generate an entity feature score vector.
[0113] The entity feature score vector and the feature importance value vector are paired, and the information gain value and the entity feature score are summed and averaged to generate an urgency priority.
[0114] The first scoring process first measures the uncertainty of the death label itself. Based on the death label, the proportion of dead samples P(c=1) and the proportion of surviving samples P(c=0) in the entire dataset are calculated. According to the formula on the label, the label entropy is obtained. The more uniform the label distribution, the higher the entropy value and the greater the uncertainty. Then, the conditional entropy is calculated. The conditional entropy is used to measure how much the uncertainty of the label death is reduced when a certain feature X_j is known. Using the label entropy and conditional entropy, the information gain is calculated. The larger the information gain value, the more the uncertainty of judging life and death is reduced after knowing the information of feature X_j. Therefore, the more important the feature is. Information gain is used to capture the non-linear relationship between features and labels.
[0115] The second scoring process calculates inter-class and intra-class dispersion. Inter-class dispersion (numerator): Calculates the weighted sum of the squared differences between the mean μ_c of feature j and the global mean μ in the death and survival classes, with the weight being the number of samples in each class, n_c. A larger value indicates greater variation in the feature across different classes. Intra-class dispersion (denominator): Calculates the weighted sum of the variance σ²_c of feature j within each of the death and survival classes. A smaller value indicates greater concentration of samples within the same class on that feature. The FisherScore is then output.
[0116] The above process calculates an IG_j and an FS_j for each feature j, forming IG vectors and FS vectors respectively. Weighted fusion is used to calculate the final score for each feature. The emergency priority here is not the patient's final mortality risk probability, but the importance score of each feature. A more accurate expression is the mortality risk feature score based on feature importance.
[0117] The processing logic for prioritizing medical record data based on urgency is as follows:
[0118] Sort all medical records according to their urgency priority from highest to lowest, and generate a sorted list of medical records. The sorted list of medical records includes the patient number, urgency priority, test number, and abnormal test values.
[0119] In this embodiment, by identifying high-risk patients, doctors can intervene before their condition deteriorates rapidly, thereby shifting the intervention point forward and effectively reducing the mortality rate.
[0120] Step S4 specifically includes:
[0121] The medical record list and the first data are input into the quality control rule base as historical medical record data. The current medical record is screened in the quality control rule base to obtain historical medical records that match the current medical record. The Jaccard similarity coefficient between the current medical record and the historical medical record data is calculated. If the similarity coefficient is greater than the similarity threshold, a warning is triggered and the matching medical record is exported to generate similar medical record data.
[0122] In this embodiment, pattern matching is quickly completed based on the Jaccard coefficient. Patients with similar clinical manifestations may also have similar disease progression and possible responses to treatment. In addition, retrieving historical medical records can activate clinical experience (i.e., the diagnosis and treatment process and results of past cases) accumulated in historical data and push it to doctors to guide the treatment of current patients. When a current high-risk medical record is found to be highly similar to a historical medical record with a poor final outcome (such as death), it sends a strong warning signal to the doctor, indicating that extreme vigilance is needed and more aggressive intervention measures should be considered.
[0123] The processing logic for quality control screening of the current medical record in the quality control rule base is as follows:
[0124] The current medical record is checked for conflict with historical medical record data in the quality control rule base. The quality control rule engine scans historical medical record data with the same disease number as the current medical record as the first similar data. Conflict detection is performed on the first similar data. If the entity of the current medical record exists in the entity of the historical medical record data, the entity vector of the successfully matched entity is marked as 1. If the entity of the current medical record conflicts with the entity of the historical medical record data, the conflicting entity is marked and the entity vector of the current medical record is marked as 0, and the current disease vector is generated.
[0125] In this embodiment, by introducing a conflict detection mechanism, it is ensured that the similar cases recommended by the system are truly clinically relevant, thereby providing doctors with higher-value and safer decision support.
[0126] Example 2, refer to Figure 2 This paper provides an intelligent medical record classification system, including a medical record acquisition module, an entity analysis module, a probability scoring module, and a similarity matching module.
[0127] The medical record acquisition module is used to collect medical record data within a unit of time and store the medical record data in a standardized manner. The medical record data includes basic patient information, medical record details, and medication usage records.
[0128] The entity analysis module is used to perform feature entity analysis on the medical record data using the RoBERTa-Med model to generate the first data;
[0129] The probability scoring module is used to calculate the feature matrix of the first data based on multi-method feature selection, obtain the first feature matrix, and apply the first scoring process and the second scoring process to the first feature matrix to generate an emergency priority, and sort the medical record data according to the emergency priority.
[0130] The similarity matching module is used to use a medical record quality control algorithm to match the similarity between the current medical record and historical medical record data to obtain similar medical record data.
[0131] In this embodiment, an automated system for data acquisition, information processing, insight quantification, and decision support is constructed to standardize text fields in medical record data. Subsequently, the data undergoes feature engineering and first scoring (information gain) and second scoring (FisherScore) to select the most relevant feature subset. The selected features are used to train a prediction model (such as logistic regression) and calculate the urgency priority of each medical record. All medical records are sorted in descending order based on their scores. Finally, quality control rules and similarity algorithms are set to retrieve similar historical data and output similar medical record data for doctors' reference. This method automatically completes the entire process from data acquisition to risk ranking, realizing real-time risk monitoring of medical record classification and mortality probability.
[0132] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0133] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method of intelligent medical record classification, characterized by, The method comprises the following steps: Step S1, collecting medical record data in a unit time from a hospital database and standardizing storage of the medical record data, the medical record data comprising patient basic information, medical record details and drug use records; Step S2, performing feature entity analysis on the medical record data using a RoBERTa-Med model to generate first data; Step S3, performing feature matrix calculation on the first data based on multi-method feature selection to generate an emergency priority, and performing priority sorting on the medical record data according to the emergency priority; Step S4, performing similarity retrieval of the current medical record and historical medical record data using a medical record quality control algorithm to obtain similar medical record data.
2. The intelligent medical record classification method of claim 1, wherein, The step S1 comprises the following sub-steps: Step S11, exporting medical record data of all inpatients in a year through a hospital information system database; Step S12, performing three-level label classification on the medical record data according to a disease classification standard, the three-level label classification being used to classify disease categories in the medical record data into three labels, the three labels comprising a first label, a second label and a third label, and the three labels being stored in the form of a dictionary, the third label belonging to the second label and the second label belonging to the first label; Step S13, creating a single disease mapping table, setting disease numbers of various diseases, and one-to-one correspondence between the disease numbers and disease categories; The medical record data comprises patient basic information, medical record details and drug use records; The patient basic information comprises a patient number, gender, age, BMI, admission time and current disease number; The medical record details comprise a history of present illness, past medical history, physical examination, diagnosis result, course record, operation record and examination report; The drug use records comprise drug name, specification, dosage, administration route, administration frequency, administration start time and administration stop time.
3. The intelligent medical record classification method of claim 2, wherein, The step S2 comprises the following sub-steps: Step S21, extracting the medical record details and drug use records of the medical record data, and performing first word segmentation processing to obtain a segmentation result wherein the segmentation result is an effective text segmentation result in each medical record data; Step S22: Using jieba word segmentation, perform a second word segmentation process on the effective text segmentation result to obtain the segmentation result. Each word in Calculate word segmentation exist The frequency p(w) of occurrence in the word segment is calculated based on the frequency of occurrence of each word segment. The self-information, the expression for which the self-information is calculated is: ; wherein, is a self-information value, the self-information value of is negatively correlated with the frequency of occurrence, and the information entropy value of each sentence of the medical record data is obtained by weighted summing the self-information values of all the segmented words in the medical record data. Step S23, one-to-one correspondence between the information entropy and the course record, grouping according to disease numbers, extracting course records with information entropy values higher than a set threshold value in each group as first medical record data for storage; Step S24, performing structured entity analysis on the first medical record data using a RoBERTa-Med model to generate first data, the first data being used to store feature encoding results of each word segmentation in the first medical record data.
4. The intelligent medical record classification method of claim 3, wherein, The processing logic of performing structured entity analysis on the first medical record data using the RoBERTa-Med model comprises: Inputting the first medical record data into the RoBERTa-Med model for dynamic term perception coding, randomly selecting 15% of entities in the first medical record data, and performing masking processing on the 15% of entities; The masking processing method is to replace the masked entities with [Mask], while keeping entities with information entropy values greater than an information entropy threshold value unmasked, and then performing weight differentiation; The processing logic of weight differentiation comprises: increasing the weight attention of symptoms in the first medical record data to 1.8 times of a benchmark value; Based on the symptom weight reinforcement, the test abnormal value in the examination report is taken with a dynamic gain according to the normal value amplitude, and a dynamic gain calculation expression of the test abnormal value is as follows: ; Wherein s is the test abnormal value, is the normal value range, and then the current entity is triple embedded and fused, bidirectional semantic modeling is used, a clinical attention gate is set, a clinical bias matrix is added, key entities of symptoms, test abnormal values and drugs in the medical record data entity are focused, feature interaction of each entity is enhanced through a gated feedforward network, entity correlation strength is captured, entities are grouped according to symptoms, drugs and tests, maximum pooling is independently performed, symptom embedding generates a symptom entity vector, online UMLS knowledge base is used to match and correct semantic ambiguity of the entity vector, an entity table is generated, and the entity table is saved as first data. The first data includes entity number, symptom name, symptom data, symptom weight, test name, test data, test weight, drug name, drug dosage, drug weight, related entity number, information entropy value and test abnormal value.
5. The intelligent medical record classification method of claim 4, wherein, The step S3 includes the following sub-steps: In step S31, the first data is classified by risk level, an abnormal threshold is set, when the test abnormal value is greater than the abnormal threshold, the risk level is set as high risk, when the test abnormal value is less than the abnormal threshold, the risk level is set as low risk, when the test abnormal value is within the abnormal threshold, the risk level is set as medium risk, a label coding is taken to distinguish the death state and survival state of the current patient, a death label is generated, and the death label is one-to-one corresponding to the first data; In step S32, the first data is taken for feature vectorization processing to obtain a medical record feature matrix m*d, the row number m of the medical record feature matrix is used to represent the entity symptom sample of the current patient, and the column d of the medical record feature matrix is used to record the entity feature of the patient; In step S33, each sample feature of the medical record feature matrix is taken for Z-score standardization processing to obtain a first feature matrix, a multi-method feature selection is used to perform parallel feature processing on the first feature matrix to obtain an emergency priority, and the medical record data is prioritized according to the emergency priority.
6. The intelligent medical record classification method of claim 5, wherein, The parallel feature scoring method includes first scoring processing and second scoring processing; The first scoring processing is used to calculate information gain by using label entropy and conditional entropy; The first data is classified according to entity categories, the death sample proportion of the current entity category is calculated, the entity categories include drug categories, symptom categories and test categories, the label entropy is calculated by using the death sample proportion, and a calculation expression of the label entropy is as follows: ; wherein, is the label entropy, is the proportion of death samples for entity death category c. extracting entity feature values v of the first feature matrix, and calculating a conditional probability of the entity death class c when the entity feature values v appear in each sample calculating a conditional entropy by using the conditional probability, and a calculation expression of the conditional entropy is ; wherein, is the conditional entropy, is the probability of occurrence of the entity feature value v, subtracting the conditional entropy from the label entropy of the current entity death category c to obtain an information gain value, taking the information gain value as a vector output, and generating a feature importance value vector. The second scoring processing is used to calculate the mean value, variance and global mean value of the entity feature in different death categories, and each entity feature score is calculated, and a calculation expression of each entity feature score is as follows: ; wherein, is an entity feature score, is a number of class samples, is an average value of feature j in death class c, is a variance of feature j in death class c, is an entity feature global average value, the entity feature score is output as a vector, and an entity feature score vector is generated. The entity feature score vector and the feature importance value vector are two-by-two corresponding to samples, the information gain value and the entity feature score are summed and averaged to generate an emergency priority.
7. The intelligent medical record classification method of claim 6, wherein, The processing logic for prioritizing the medical record data according to the emergency priority is as follows: All medical records are sorted according to the emergency priority from high to low to generate a sorted medical record list, and the sorted medical record list includes patient numbers, emergency priorities, test numbers and test abnormal values.
8. The intelligent medical record classification method of claim 7, wherein, The step S4 specifically includes: The medical record list and the first data are input as historical medical record data into a quality control rule library, the current medical record is screened in the quality control rule library to obtain a historical medical record matched with the current medical record, a Jaccard similarity coefficient between the current medical record and the historical medical record data is calculated, if the similarity coefficient is greater than a similarity threshold, a warning is triggered and the matched medical record is exported to generate similar medical record data.
9. The intelligent medical record classification method of claim 8, wherein, The processing logic for screening the current medical record in the quality control rule library is as follows: The current medical record is checked for conflicts with historical medical record data in the quality control rule library, the quality control rule engine scans historical medical record data with the same disease number as the current medical record as first similar data, conflict detection is performed on the first similar data, if an entity of the current medical record exists in an entity of the historical medical record data, the entity vector that matches is marked as 1, if the entity of the current medical record conflicts with the entity of the historical medical record data, the conflicting entity is marked, and the entity vector of the current medical record is marked as 0, and a current disease vector is generated.
10. An intelligent medical record classification system applied to an intelligent medical record classification method as claimed in any one of claims 1-9, characterized in that, It comprises a medical record collection module, an entity analysis module, a probability score module and a similar matching module. The medical record collection module is used for collecting medical record data within a unit time and standardizing storage of the medical record data, wherein the medical record data comprises patient basic information, medical record details and drug use records. The entity analysis module is used for performing feature entity analysis on the medical record data by using a RoBERTa-Med model to generate first data. The probability score module is used for performing feature matrix calculation on the first data based on multi-method feature selection to obtain a first feature matrix, performing first scoring processing and second scoring processing on the first feature matrix to generate an emergency priority, and performing priority sorting on the medical record data according to the emergency priority. The similar matching module is used for matching the similarity of the current medical record and historical medical record data by using a medical record quality control algorithm to obtain similar medical record data.
Citation Information
Patent Citations
Medical record classification early warning method based on artificial intelligence
CN120376019A
Medical record text similarity retrieval method and system and computer equipment
CN111949759A
Personalized medical record analysis recommendation method and system based on patient portrait
CN119626572A
Quality control method and system for automatic coding of electronic medical record
CN120809045A