Similar medical record determination method, computer device and computer storage medium

The method employs text similarity algorithms to analyze preliminary diagnosis texts, enabling efficient and accurate identification of similar medical records through structured vector analysis, addressing the complexity of unstructured clinical data in medical diagnosis.

CN112329461BActive Publication Date: 2024-12-10汤学民
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011328910.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-24
Publication Date
2024-12-10
Estimated Expiration
2040-11-24

AI Technical Summary

Technical Problem

Current systems struggle to efficiently determine similar medical records for patient diagnosis, due to the complexity of clinical disease diagnosis and the unstructured nature of preliminary diagnosis texts, which often include multiple diagnoses and varied expressions of symptoms.

Method used

A method using text similarity algorithms to analyze preliminary diagnosis texts, calculating vector values based on paired sub-diagnosis text similarities, and applying a cosine similarity calculation to identify similar medical records.

Benefits of technology

Facilitates quick and accurate identification of similar medical records, improving the practicality and accuracy of diagnosis by leveraging structured vector analysis of unstructured medical data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112329461B_ABST
    Figure CN112329461B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method for determining similar medical records, a computer device, and a computer storage medium, which are used to determine similar medical records in order to provide a reference for the patient's treatment plan. The embodiment of the present application includes: determining at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of paired sub-diagnosis texts according to a text similarity algorithm, determining the first vector value of the first preliminary diagnosis text and the second vector value of the second preliminary diagnosis text, substituting the first vector value and the second vector value into the cosine similarity calculation formula, and calculating the first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text, and determining it as a similar medical record when the first cosine similarity meets the preset conditions. The method of the embodiment of the present application can easily and quickly determine similar medical records, reduce the difficulty of determining similar medical records, and greatly improve the practicality of the solution for determining similar medical records.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the medical field, and specifically to a method for determining similar medical records, a computer device, and a computer storage medium. Background Art

[0002] After analyzing, evaluating and synthesizing various clinical data, doctors, combined with their own medical knowledge and clinical experience, list the most likely diseases as diagnostic hypotheses. Try to use diagnostic hypotheses to explain the patient's clinical manifestations and prioritize them. Select the most likely disease that best explains all clinical findings to form a preliminary diagnosis. The preliminary diagnosis is part of the admission record. The admission record refers to the record written by the attending physician after the patient is admitted to the hospital, which summarizes and analyzes the relevant information obtained through interviews, physical examinations, and auxiliary physical examinations. After the preliminary diagnosis is made, necessary treatment and further examinations are required to verify or revise the preliminary diagnosis.

[0003] The above are the general steps of disease diagnosis. In this process, after completing the admission record, clinicians hope to take a look at similar medical records in the past to provide reference for the next step of diagnosis and treatment of the current patient. Clinicians, especially junior doctors, hope that computers can assist in completing preliminary diagnosis and differential diagnosis based on the chief complaint, current medical history, past history, physical examination, and test examinations in the admission record. At the same time, similar medical records are retrieved to understand the clinical manifestations and characteristics of such diseases, the evolution of the disease, the treatment effect, the outcome and prognosis, so that doctors can learn and refer to them, which has positive significance for differential diagnosis and treatment of diseases. It is conducive to improving the level of clinical diagnosis and reducing diagnostic and treatment errors.

[0004] At present, due to the complexity of clinical disease diagnosis and the limitation of computer level, the computer automatically makes a preliminary diagnosis based on the doctor's admission record. This work is currently difficult and difficult to put into practical application. However, under the current technical conditions, it is still of great significance to use the doctor's advanced thinking activities to make a preliminary diagnosis and find similar medical records in combination with the main symptoms. Summary of the invention

[0005] The embodiments of the present application provide a similar medical record determination method, a computer device, and a computer storage medium for determining similar medical records to provide a reference for a patient's treatment plan.

[0006] A first aspect of an embodiment of the present application provides a method for determining similar medical records, comprising:

[0007] Acquire a first preliminary diagnosis text and a second preliminary diagnosis text, wherein the first preliminary diagnosis text includes a plurality of first sub-diagnosis texts, and the second preliminary diagnosis text includes a plurality of second sub-diagnosis texts;

[0008] According to the text similarity algorithm, the second sub-diagnosis text paired with each first sub-diagnosis text is sequentially determined in the plurality of second sub-diagnosis texts to obtain at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of the paired sub-diagnosis texts;

[0009] Determine the product of the similarity of the paired sub-diagnosis text and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis text as the first vector value of the first preliminary diagnosis text, and determine the product of the similarity of the paired sub-diagnosis text and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis text as the second vector value of the second preliminary diagnosis text;

[0010] Substituting the first vector value and the second vector value into a preset cosine similarity calculation formula respectively, to calculate a first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text;

[0011] When the first cosine similarity meets a preset condition, it is determined that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records.

[0012] Preferably, the step of sequentially determining the second sub-diagnosis text paired with each first sub-diagnosis text among the plurality of second sub-diagnosis texts comprises:

[0013] According to the text similarity algorithm, calculating the similarity between the first main diagnosis text and the second main diagnosis text, the first main diagnosis text being the first sub-diagnosis text determined according to the arrangement order of the plurality of first sub-diagnosis texts, and the second main diagnosis text being the first sub-diagnosis text determined according to the arrangement order of the plurality of second sub-diagnosis texts;

[0014] If the similarity between the first main diagnosis text and the second main diagnosis text is not less than a preset threshold, determining that the first main diagnosis text and the second main diagnosis text are a pair of paired sub-diagnosis texts;

[0015] According to the text similarity algorithm, the similarity between each first sub-diagnosis text other than the first main diagnosis text and each unpaired second sub-diagnosis text in the plurality of second sub-diagnosis texts is calculated in sequence according to the arrangement order of the plurality of first sub-diagnosis texts;

[0016] The maximum similarity is determined among multiple similarities corresponding to each first sub-diagnosis text except the first main diagnosis text, and the first sub-diagnosis text and the second sub-diagnosis text corresponding to the maximum similarity are determined to be paired sub-diagnosis texts.

[0017] A second aspect of an embodiment of the present application provides a computer device, including:

[0018] An acquiring unit, configured to acquire a first preliminary diagnosis text and a second preliminary diagnosis text, wherein the first preliminary diagnosis text includes a plurality of first sub-diagnosis texts, and the second preliminary diagnosis text includes a plurality of second sub-diagnosis texts;

[0019] A first determining unit is used to determine, in the plurality of second sub-diagnostic texts, the second sub-diagnostic texts paired with each of the first sub-diagnostic texts in turn according to a text similarity algorithm, to obtain at least one pair of paired sub-diagnostic texts and the similarity corresponding to each pair of the paired sub-diagnostic texts;

[0020] a second determining unit, configured to determine the product of the similarity of the paired sub-diagnosis texts and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis texts as a first vector value of the first preliminary diagnosis text, and to determine the product of the similarity of the paired sub-diagnosis texts and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis texts as a second vector value of the second preliminary diagnosis text;

[0021] A calculation unit, used for respectively substituting the first vector value and the second vector value into a preset cosine similarity calculation formula to calculate a first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text;

[0022] A third determining unit is configured to determine that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records when the first cosine similarity satisfies a preset condition.

[0023] A third aspect of the embodiments of the present application provides a computer device, including:

[0024] Processor, memory, bus, input and output devices;

[0025] The processor is connected to the memory and the input and output devices;

[0026] The bus is connected to the processor, memory and input and output devices respectively;

[0027] The processor is used to obtain a first preliminary diagnosis text and a second preliminary diagnosis text, wherein the first preliminary diagnosis text includes a plurality of first sub-diagnosis texts, and the second preliminary diagnosis text includes a plurality of second sub-diagnosis texts; according to a text similarity algorithm, the second sub-diagnosis text paired with each of the first sub-diagnosis texts is sequentially determined in the plurality of second sub-diagnosis texts to obtain at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of the paired sub-diagnosis texts; the product of the similarity of the paired sub-diagnosis texts and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis text is determined as the first vector value of the first preliminary diagnosis text, and the product of the similarity of the paired sub-diagnosis texts and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis text is determined as the second vector value of the second preliminary diagnosis text; the first vector value and the second vector value are respectively substituted into a preset cosine similarity calculation formula to calculate the first cosine similarity of the first preliminary diagnosis text and the second preliminary diagnosis text; when the first cosine similarity meets a preset condition, it is determined that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records.

[0028] A fourth aspect of an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method of the first aspect.

[0029] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0030] In the embodiment of the present application, at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of paired sub-diagnosis texts are determined according to the text similarity algorithm, and the product of the similarity of the paired sub-diagnosis texts and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis text is determined as the first vector value of the first preliminary diagnosis text, and the product of the similarity of the paired sub-diagnosis text and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis text is determined as the second vector value of the second preliminary diagnosis text, and the first vector value and the second vector value are respectively substituted into the cosine similarity calculation formula to calculate the first cosine similarity of the first preliminary diagnosis text and the second preliminary diagnosis text. When the first cosine similarity meets the preset conditions, it is determined that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records. The method of the embodiment of the present application can easily and quickly determine similar medical records, reduce the difficulty of determining similar medical records, and greatly improve the practicality of the solution for determining similar medical records. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A flowchart of a method for determining similar medical records in an embodiment of the present application;

[0032] Figure 2 This is another flowchart of the method for determining similar medical records in an embodiment of the present application;

[0033] Figure 3 This is a schematic diagram of the structure of a computer device in an embodiment of the present application;

[0034] Figure 4 This is another structural diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The embodiments of the present application provide a similar medical record determination method, a computer device, and a computer storage medium for determining similar medical records to provide a reference for a patient's treatment plan.

[0036] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] During the disease diagnosis process, the attending physician makes a preliminary diagnosis based on a comprehensive analysis of the patient's condition upon admission. Afterwards, the patient is given necessary treatment and further examinations based on the preliminary diagnosis, and the patient's medical record is formed. Therefore, the patient's medical record includes the text content of the preliminary diagnosis. During this process, the doctor may need to find medical records similar to the patient's medical record in order to refer to the corresponding diagnosis and treatment methods for similar medical records.

[0038] However, it is not easy to identify similar medical records. On the one hand, the preliminary diagnosis is an unstructured descriptive diagnosis, and its content and format are free and non-standard. Its non-standard nature is reflected in the fact that the same diagnosis has different names, such as standard name, ICD10 disease name, national clinical diagnosis disease name, Shenzhen clinical disease diagnosis name, etc. In addition, the preliminary diagnosis name also has customary names, abbreviations, English abbreviations, etc. At the same time, the preliminary diagnosis of an inpatient often includes multiple diagnoses, ranging from 2 or 3 to more than a dozen. Different diagnoses or different arrangement orders of multiple diagnoses will lead to different similarities in medical records.

[0039] On the other hand, the description of the main symptoms in the medical records is also unstructured. At present, there are 200 to 300 common clinical symptoms and 500 to 600 uncommon ones. Each symptom has different expressions, including written names, spoken words, standard words, idiomatic words, full names, abbreviations, etc. The same symptom may have completely different expressions, or two seemingly similar expressions may correspond to different symptoms.

[0040] To solve the above difficulties, the present application embodiment proposes a method for determining similar medical records. For details, please refer to Figure 1 In the embodiment of the present application, one embodiment of the method for determining similar medical records includes:

[0041] 101. Obtain a first preliminary diagnosis text and a second preliminary diagnosis text;

[0042] The method of this embodiment can be applied to a computer device, which can perform corresponding data processing, data analysis and other tasks according to a preset computer program, and its type can be a terminal, server and other device types.

[0043] The patient's medical record or the admission record of the medical record contains the text content of the patient's preliminary diagnosis, so the preliminary diagnosis text can be extracted from the medical record or the admission record. When it is necessary to determine the similarity of two resumes, the first preliminary diagnosis text is extracted from one medical record or the admission record of the medical record, and the second preliminary diagnosis text is extracted from the other medical record or the admission record of the medical record.

[0044] When a doctor makes a preliminary diagnosis of a patient, the preliminary diagnosis often includes multiple diagnoses, and the preliminary diagnosis text also includes the text corresponding to each diagnosis. Therefore, the first preliminary diagnosis text and the second preliminary diagnosis text are parsed respectively to obtain multiple first sub-diagnosis texts corresponding to the first preliminary diagnosis text and multiple second sub-diagnosis texts corresponding to the second preliminary diagnosis text.

[0045] This embodiment determines similar medical records based on the preliminary diagnosis text because the preliminary diagnosis is formed by the doctor after analyzing, evaluating and synthesizing various clinical data, combined with the doctor's medical knowledge and clinical experience. It is a high-level thinking activity and is also the overall embodiment and high concentration of the admission record in the medical record. Therefore, the preliminary diagnosis text is a very representative text in the medical record. Determining similar medical records based on the preliminary diagnosis text can obtain more accurate results.

[0046] 102. According to a text similarity algorithm, sequentially determine the second sub-diagnosis text paired with each first sub-diagnosis text in a plurality of second sub-diagnosis texts, and obtain at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of paired sub-diagnosis texts;

[0047] After obtaining the first sub-diagnostic text and the second sub-diagnostic text, the similarity between each first sub-diagnostic text and the second sub-diagnostic text is calculated according to the text similarity algorithm, and the second sub-diagnostic text paired with each first sub-diagnostic text is determined in turn among the multiple second sub-diagnostic texts to obtain at least one pair of paired sub-diagnostic texts and the similarity corresponding to each pair of paired sub-diagnostic texts.

[0048] The text similarity algorithm may be any text similarity algorithm, for example, a cosine similarity algorithm, a character-based edit distance algorithm, a word2vec algorithm based on a word embedding model, or the like.

[0049] 103. Determine the product of the similarity of the paired sub-diagnosis texts and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis texts as the first vector value of the first preliminary diagnosis text, and determine the product of the similarity of the paired sub-diagnosis texts and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis texts as the second vector value of the second preliminary diagnosis text;

[0050] After obtaining the paired sub-diagnostic texts and the similarities corresponding to each pair of paired sub-diagnostic texts, the product of the similarity of the paired sub-diagnostic texts and the preset weight of the first sub-diagnostic text in the paired sub-diagnostic texts is determined as the first vector value of the first preliminary diagnostic text, and the product of the similarity of the paired sub-diagnostic texts and the preset weight of the second sub-diagnostic text in the paired sub-diagnostic texts is determined as the second vector value of the second preliminary diagnostic text.

[0051] For example, if the preset weight of the first sub-diagnostic text A1 in a pair of paired sub-diagnostic texts is 100, then the product of the similarity of the paired sub-diagnostic text and the preset weight of the first sub-diagnostic text A1 is used as a first vector value of the first preliminary diagnostic text. If the preset weight of the second sub-diagnostic text A2 in the paired sub-diagnostic text is 50, then the product of the similarity of the paired sub-diagnostic text and the preset weight of the second sub-diagnostic text A2 is used as a second vector value of the second preliminary diagnostic text. Therefore, if it is determined according to the text similarity algorithm that there are 5 pairs of paired sub-diagnostic texts between the first preliminary diagnostic text and the second preliminary diagnostic text, then 5 first vector values ​​of the first preliminary diagnostic text and 5 second vector values ​​of the second preliminary diagnostic text can be obtained.

[0052] 104. Substituting the first vector value and the second vector value into a preset cosine similarity calculation formula respectively, to calculate a first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text;

[0053] After obtaining multiple first vector values ​​of the first preliminary diagnosis text and multiple second vector values ​​of the second preliminary diagnosis text, the first vector values ​​and the second vector values ​​are respectively substituted into the preset cosine similarity calculation formula to calculate the first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text.

[0054] Cosine similarity uses the cosine value of the angle between two vectors in the vector space to measure the size of the difference between two individuals. The closer the value of cosine similarity is to 1, the closer the angle is to 0 degrees, that is, the more similar the two vectors are. Among them, the preset cosine similarity calculation formula can be any calculation formula, as long as the cosine similarity can be calculated. In a preferred embodiment, the cosine similarity calculation formula can be the following formula:

[0055]

[0056] Among them, x i is the first vector value of the first preliminary diagnosis text; i The second vector value of the second preliminary diagnosis text.

[0057] 105. When the first cosine similarity satisfies a preset condition, determining that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records;

[0058] When the calculated first cosine similarity meets a preset condition, it is determined that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records.

[0059] In this embodiment, at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of paired sub-diagnosis texts are determined according to the text similarity algorithm, and the product of the similarity of the paired sub-diagnosis texts and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis text is determined as the first vector value of the first preliminary diagnosis text, and the product of the similarity of the paired sub-diagnosis texts and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis text is determined as the second vector value of the second preliminary diagnosis text, and the first vector value and the second vector value are respectively substituted into the cosine similarity calculation formula to calculate the first cosine similarity of the first preliminary diagnosis text and the second preliminary diagnosis text. When the first cosine similarity meets the preset condition, it is determined that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records. The method of this embodiment can easily and quickly determine similar medical records, reduce the difficulty of determining similar medical records, and greatly improve the practicality of the solution for determining similar medical records.

[0060] The following will be Figure 1 Based on the embodiment shown, the embodiment of the present application is further described in detail. Figure 2Another embodiment of the method for determining similar medical records in the embodiment of the present application includes:

[0061] 201. Obtain a first preliminary diagnosis text and a second preliminary diagnosis text;

[0062] The operations performed in this step are the same as those in the previous Figure 1 The operations performed in step 101 in the illustrated embodiment are similar and will not be described in detail here.

[0063] 202. According to a text similarity algorithm, sequentially determine the second sub-diagnosis text paired with each first sub-diagnosis text in a plurality of second sub-diagnosis texts to obtain at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of paired sub-diagnosis texts;

[0064] When calculating the similarity between the first preliminary diagnosis text and the second preliminary diagnosis text, since the preliminary diagnosis text includes multiple sub-diagnosis texts, the similarity between the sub-diagnosis texts can be calculated first. Calculating the similarity between the sub-diagnosis texts can be used to determine the paired sub-diagnosis texts.

[0065] Specifically, the method for determining the paired sub-diagnosis texts may be to calculate the similarity between the first main diagnosis text and the second main diagnosis text according to a text similarity algorithm, wherein the first main diagnosis text is the first sub-diagnosis text determined according to the arrangement order of the plurality of first sub-diagnosis texts in the first preliminary diagnosis text, and the second main diagnosis text is the first sub-diagnosis text determined according to the arrangement order of the plurality of second sub-diagnosis texts in the second preliminary diagnosis text. Preferably, the text similarity algorithm may be a cosine similarity algorithm.

[0066] Among them, the main diagnosis text is the text content of the main diagnosis in the preliminary diagnosis. The main diagnosis, also called the main diagnosis, refers to the disease that has been determined through research as the main reason for the patient's hospitalization. A patient can only have one main diagnosis for one hospitalization. Generally speaking, the first diagnosis in the preliminary diagnosis is the main diagnosis. It can be seen that the main diagnosis is the core diagnosis in the preliminary diagnosis. When the main diagnosis is inconsistent, the two preliminary diagnoses will also show a large difference. Therefore, if the similarity of the main diagnosis text is not high, there is no need to discuss the similarity of other sub-diagnosis texts; if the similarity of the main diagnosis text is high, it can also be predicted that the two preliminary diagnosis texts have certain similarities, and the similarity of other sub-diagnosis texts can be further explored.

[0067] Therefore, if the similarity between the first main diagnosis text and the second main diagnosis text is not less than a preset threshold, the first main diagnosis text and the second main diagnosis text are determined to be a pair of paired sub-diagnosis texts; if their similarity is less than the preset threshold, it indicates that there may be large differences between the first preliminary diagnosis text and the second preliminary diagnosis text, and there is no need to calculate the similarity of other sub-diagnosis texts, then the medical record corresponding to the second preliminary diagnosis text is discarded and is not included in the consideration of similar medical records.

[0068] After determining that the first main diagnostic text and the second main diagnostic text are a pair of paired sub-diagnostic texts, continue to calculate the similarities between other sub-diagnostic texts. Specifically, according to the text similarity algorithm, in accordance with the arrangement order of the multiple first sub-diagnostic texts in the first preliminary diagnostic text, the similarities between each first sub-diagnostic text other than the first main diagnostic text and each unpaired second sub-diagnostic text in the second preliminary diagnostic text are calculated in sequence, and multiple similarities corresponding to each first sub-diagnostic text other than the first main diagnostic text can be obtained. The maximum similarity is determined among the multiple similarities corresponding to each first sub-diagnostic text other than the first main diagnostic text, and the first sub-diagnostic text and the second sub-diagnostic text corresponding to the maximum similarity are determined as paired sub-diagnostic texts.

[0069] For example, assuming that the first preliminary diagnosis text includes 5 first sub-diagnosis texts, and the second preliminary diagnosis text includes 4 second sub-diagnosis texts, for the convenience of description, the primary diagnosis text is referred to by the letter P (primary diagnosis), then P1 refers to the first preliminary diagnosis text, and P2 refers to the second preliminary diagnosis text; at the same time, the sub-diagnosis text is referred to by the letter D (diagnosis), then the 5 first sub-diagnosis texts included in P1 can be expressed as {D11, D12, D13, D14, D15}, and the 4 second sub-diagnosis texts included in P2 can be expressed as {D21, D22, D23, D24}. After determining that the first main diagnosis text in P1 (i.e., sub-diagnosis text D11) and the second main diagnosis text in P2 (i.e., sub-diagnosis text D21) are paired sub-diagnosis texts, the similarity between D12 and each unpaired sub-diagnosis text in P2 (i.e., D22, D23, and D24) is calculated according to the arrangement order of the five sub-diagnosis texts in P1, and the three similarities corresponding to D12 are obtained. The maximum similarity is determined from the three similarities (assuming that the similarity between D12 and D23 is the largest), and D12 and D23 corresponding to the maximum similarity are paired sub-diagnosis texts. Similarly, according to the arrangement order of the five sub-diagnosis texts in P1, the next step is to determine that the first sub-diagnosis text of the paired sub-diagnosis text is D13, and the second sub-diagnosis texts with which the similarity is calculated to D13 are D22 and D24. Referring to the process described above, the second sub-diagnosis texts paired with the remaining unpaired first sub-diagnosis texts can be determined respectively.

[0070] Through the above method, at least one pair of matched sub-diagnosis texts of the first preliminary diagnosis text and the second preliminary diagnosis text can be determined.

[0071] In this embodiment, there can be multiple ways to calculate the similarity between sub-diagnostic texts. In a preferred embodiment, it is determined whether the diagnostic name of the first sub-diagnostic text is the same as the diagnostic name of the second sub-diagnostic text. If they are the same, it can be directly determined that the similarity between the first sub-diagnostic text and the second sub-diagnostic text is 1; if they are not the same, it is determined whether there is a diagnostic name that is the same as the diagnostic name of the second sub-diagnostic text in the synonym library corresponding to the diagnostic name of the first sub-diagnostic text, wherein the synonym library includes diagnostic names with the same meaning as the first sub-diagnostic text. Therefore, if there is a diagnostic name that is the same as the diagnostic name of the second sub-diagnostic text, that is, the diagnostic name of the second sub-diagnostic text also exists in the synonym library corresponding to the diagnostic name of the first sub-diagnostic text, it means that the first sub-diagnostic text and the second sub-diagnostic text are synonymous diagnoses, and the similarity between the first sub-diagnostic text and the second sub-diagnostic text can be directly determined to be 1.

[0072] Among them, the synonym library corresponding to the diagnosis name of the first sub-diagnosis text can be determined according to the naming rules such as ICD10 disease name, national clinical diagnosis disease name, Shenzhen clinical disease diagnosis name, etc., and all synonymous diagnoses are collected to obtain a synonym library.

[0073] If the synonym library does not contain the same diagnosis name as the diagnosis name of the second sub-diagnosis text, the similarity between the first sub-diagnosis text and the second sub-diagnosis text is calculated according to the cosine similarity algorithm.

[0074] Specifically, when calculating the similarity between the first sub-diagnostic text and the second sub-diagnostic text, the first sub-diagnostic text is segmented to obtain the original segmentation corresponding to each segmentation position of the first sub-diagnostic text, and the synonym corresponding to the original segmentation is determined. After that, the feature vectors composed of each candidate word of each segmentation position of the first sub-diagnostic text and the candidate words of other segmentation positions and the feature vector corresponding to the second sub-diagnostic text are sequentially substituted into the cosine similarity calculation formula to obtain multiple similarity calculation results; and the candidate word corresponding to the calculation result with the largest similarity among the multiple similarity calculation results corresponding to each segmentation position is determined as the selected word of the segmentation position, and the similarity calculation result corresponding to the last determined selected word is determined as the similarity between the first sub-diagnostic text and the second sub-diagnostic text.

[0075] The word segmentation position refers to the position of each word segmentation after the first sub-diagnosis text is segmented. For example, suppose a sentence is "This leather boot is too big. That one is suitable", after segmenting it, the segmentation result is "This / leather boot / size / is / large. That / size / is / suitable", where the slash symbol separates multiple word segments, and each word segmentation corresponds to a word segmentation position.

[0076] The word segmentation corpus based on which the first sub-diagnosis text is segmented can be the "Modern Chinese 5,000 Word List for Information Processing" and a self-built electronic medical record word segmentation database, or a word segmentation corpus established in the medical field, and the specific word segmentation corpus is not limited.

[0077] The original word segmentation refers to the word segmentation from the original text of the first sub-diagnosis text. For example, the first sub-diagnosis text is represented as "left humerus fracture" (i.e., the original text), and after the word segmentation, the word segmentation result is "left humerus / fracture", then the original word segmentations of the first sub-diagnosis text are "left humerus" and "fracture".

[0078] The alternative words at the segmentation position of the first sub-diagnosis text include the original segmentation and the synonyms of the original segmentation, and each alternative word has a word frequency. The word frequency of the alternative word can be obtained by collecting all preliminary diagnosis records of all patients in the hospital within a certain period of time (for example, within three years), segmenting each preliminary diagnosis record, counting all the segmentations of all the preliminary diagnosis records and calculating the word frequency of each segmentation.

[0079] The alternative words and their frequencies can form a vector value. Therefore, the feature vector of the first sub-diagnosis text includes the alternative words at each word segmentation position and the frequency corresponding to each alternative word. Similarly, the feature vector corresponding to the second sub-diagnosis text includes each word segmentation of the second sub-diagnosis text and the frequency corresponding to each word segmentation. Therefore, by sequentially substituting the feature vectors composed of each alternative word at each word segmentation position of the first sub-diagnosis text and the alternative words at other word segmentation positions and the feature vector corresponding to the second sub-diagnosis text into the cosine similarity calculation formula, multiple similarity calculation results can be calculated.

[0080] For example, assuming that the word segmentation result of the first sub-diagnosis text is represented as {T1, W1; T2, W2; T3, W3}, where the letter T represents the original word segmentation of the first sub-diagnosis text, the letter W represents the word frequency of the original word segmentation, and assuming that the synonyms corresponding to the original word segmentation T1 include T1-1, T1-2, and T1-3, then the original word segmentation T1 and its synonyms are used as the candidate words at the word segmentation position corresponding to the original word segmentation T1. Substitute the feature vectors composed of the original word segmentation T1, synonyms T1-1, T1-2, T1-3 and the candidate words at other word segmentation positions into the cosine similarity calculation formula in turn with the feature vector corresponding to the second sub-diagnosis text, and multiple similarity calculation results can be calculated. Then, the candidate word corresponding to the calculation result with the largest similarity among the multiple similarity calculation results is determined as the selected word at the word segmentation position corresponding to the original word segmentation T1. Assuming that the similarity calculation result corresponding to T1-2 is the largest, T1-2 is determined as the selected word at the word segmentation position corresponding to the original word segmentation T1. By analogy, the selected words of the segmentation position corresponding to the original segmentation T2 and the selected words of the segmentation position corresponding to the original segmentation T3 can be determined respectively. When determining the selected words of other segmentation positions, since the segmentation position corresponding to the original segmentation T1 has determined the selected words (i.e., T1-2), when calculating the similarity, T1-2 and the word frequency of T1-2 are used as a vector value of the first sub-diagnosis text to calculate the similarity. When the selected words of all segmentation positions are determined, the similarity calculation result corresponding to the last determined selected word is the similarity between the first sub-diagnosis text and the second sub-diagnosis text.

[0081] Through the above steps, when the synonym library corresponding to the first sub-diagnosis text does not have the same diagnosis name as the diagnosis name of the second sub-diagnosis text, the similarity between the first sub-diagnosis text and the second sub-diagnosis text can be calculated.

[0082] In this embodiment, the method of calculating the similarity between sub-diagnosis texts is not limited, as long as the similarity between the sub-diagnosis texts can be calculated, for example, the similarity between the sub-diagnosis texts can be calculated using algorithms such as the Manhattan distance algorithm based on word vectors, the edit distance algorithm based on characters, or the Jaccard similarity coefficient algorithm based on probability statistics.

[0083] 203. Determine the product of the similarity of the paired sub-diagnosis text and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis text as the first vector value of the first preliminary diagnosis text, and determine the product of the similarity of the paired sub-diagnosis text and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis text as the second vector value of the second preliminary diagnosis text;

[0084] After the paired sub-diagnosis text is determined, the first vector value of the first preliminary diagnosis text and the second vector value of the second preliminary diagnosis text may be further determined according to this step.

[0085] In this embodiment, if there is an unmatched first sub-diagnostic text in the first preliminary diagnostic text, the preset weight of the unmatched first sub-diagnostic text is used as a vector value in the first vector value of the first preliminary diagnostic text; if there is an unmatched second sub-diagnostic text in the second preliminary diagnostic text, the unmatched second sub-diagnostic text is assigned a value of 0, and the assigned value is used as a vector value in the second vector value of the second preliminary diagnostic text.

[0086] In this embodiment, the preliminary diagnosis made by the doctor includes at least one diagnosis, and each diagnosis is arranged in order of importance. For example, the first diagnosis in the preliminary diagnosis is the main diagnosis, and the main diagnosis is the most important of all diagnoses. Other diagnoses will also be arranged in order of importance. Therefore, the preset weight of the first sub-diagnosis text can be determined according to the sorting position of the first sub-diagnosis text in the first preliminary diagnosis text. The higher the sorting position, the higher the importance of the first sub-diagnosis text, and the larger the preset weight; similarly, the preset weight of the second sub-diagnosis text can also be determined according to the sorting position of the second sub-diagnosis text in the second preliminary diagnosis text. The higher the sorting position, the higher the importance of the second sub-diagnosis text, and the larger the preset weight.

[0087] Therefore, in this embodiment, the vector value of the first preliminary diagnosis text and the vector value of the second preliminary diagnosis text are set according to the similarity of the paired sub-diagnosis texts and the preset weights of the sub-diagnosis texts, which is equivalent to setting the vector value of the first preliminary diagnosis text and the vector value of the second preliminary diagnosis text according to the importance of the sub-diagnosis texts. This can make the retrieval of similar medical records focus more on sub-diagnosis texts with higher importance, thereby improving the efficiency and accuracy of similar medical record retrieval.

[0088] 204. Substituting the first vector value and the second vector value into a preset cosine similarity calculation formula respectively, to calculate a first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text;

[0089] The operations performed in this step are the same as those in the previous Figure 1 The operations performed in step 104 in the illustrated embodiment are similar and will not be described in detail here.

[0090] 205. Obtain a first main symptom data element in the chief complaint text in the medical record corresponding to the first preliminary diagnosis text, and obtain a second main symptom data element in the chief complaint text in the medical record corresponding to the second preliminary diagnosis text;

[0091] The preliminary diagnosis text reflects most of the content of the medical record. In addition, the medical record also includes the chief complaint text, which is also an important part of the medical record. Therefore, in addition to determining similar medical records based on the preliminary diagnosis text, this embodiment can also determine similar medical records based on the main symptom data element in the chief complaint text.

[0092] Specifically, the admission record of the medical record defines various types of data elements. The main symptom data elements recorded in the chief complaint text are screened from the admission record of the medical record. The main symptom data elements are all flag-type data elements. For example, if the data element name of the main symptom data element is "tinnitus flag", the definition of this data element is "to identify whether the individual has tinnitus symptoms", and its representation format is "T / F"; if the data element name is "night sweats flag", the definition of the main symptom data element is "to identify whether the individual has night sweats symptoms", and its representation format is "T / F", and so on.

[0093] 206. Calculate the second cosine similarity between the first main symptom data element and the second main symptom data element according to the cosine similarity algorithm;

[0094] As mentioned above, the main symptom data element has a certain representation format, so the value can be taken according to the representation format of the data element, for example, the result value of the data element is set to T or F according to the representation format T / F. Furthermore, the assignment result of the data element can also be defined according to the result value of the main symptom data element, for example, when the result value is T, the assignment result is 1; when the result value is F, the assignment result is 0.

[0095] Therefore, in this embodiment, a specific way to calculate the second cosine similarity between the first main symptom data element and the second main symptom data element is that if the assignment results of the first main symptom data element and the second main symptom data element have been defined, the first main symptom data element is assigned a value according to the result value of the first main symptom data element, and the second main symptom data element is assigned a value according to the result value of the second main symptom data element. After that, the assignment result of the first main symptom data element is used as the vector value of the first main symptom data element, and the assignment result of the second main symptom data element is used as the vector value of the second main symptom data element, and they are respectively substituted into the cosine similarity calculation formula to calculate the second cosine similarity.

[0096] In another specific implementation of calculating the second cosine similarity, if the assignment results of the first main symptom data element and the second main symptom data element are not defined, the first main symptom data element and the second main symptom data element are segmented respectively to obtain multiple segmentations corresponding to the first main symptom data element and multiple segmentations corresponding to the second main symptom data element. Afterwards, the word frequency of each segmentation corresponding to the first main symptom data element is used as the vector value of the first main symptom data element, and the word frequency of each segmentation corresponding to the second main symptom data element is used as the vector value of the second main symptom data element, and they are substituted into the cosine similarity calculation formula to calculate the second cosine similarity. Among them, the word frequency can be obtained by collecting all preliminary diagnosis records of all patients in the hospital within a certain period of time (for example, within three years), and segmenting each preliminary diagnosis record, counting all segmentations of all preliminary diagnosis records and calculating the word frequency of each segmentation.

[0097] 207. When the first cosine similarity satisfies a preset condition, determining that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records;

[0098] Through the aforementioned steps 201 to 206, the first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text and the second cosine similarity between the first main symptom data element and the second main symptom data element can be obtained. When determining whether the medical records are similar, the medical record similarity can be determined based on the first cosine similarity and the second cosine similarity. Specifically, the product of the first cosine similarity and the preset preliminary diagnosis weight is added to the product of the second cosine similarity and the preset main symptom weight, and the calculation result obtained is the medical record similarity between the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text. Among them, the sum of the preliminary diagnosis weight and the main symptom weight is 1, and both are positive numbers.

[0099] When there are multiple second preliminary diagnosis texts, and each second preliminary diagnosis text corresponds to a medical record, that is, there are multiple medical records corresponding to the second preliminary diagnosis texts, the medical record similarities between the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to each second preliminary diagnosis text are calculated respectively to obtain multiple medical record similarities. Afterwards, the n medical record similarities with the greatest similarity are determined from the multiple medical record similarities, and the medical record corresponding to each medical record similarity in the n medical record similarities with the greatest similarity is determined as a similar medical record, where n is a positive integer greater than or equal to 1.

[0100] In addition to the above methods, when determining similar medical records, a threshold of medical record similarity can also be set. When the medical record similarity is greater than the threshold, the two medical records are determined to be similar; if it is less than the threshold, the two medical records are determined to be dissimilar. There is no limitation on the method of determining similar medical records based on medical record similarity.

[0101] In this embodiment, the cosine similarity calculation formula can be any calculation formula that can calculate the cosine similarity. The specific expression form of the formula is not limited. For example, it can be the aforementioned Figure 1 The formula shown in step 105 in the illustrated embodiment.

[0102] In this embodiment, the similarity of the medical records is determined by combining the similarity of the preliminary diagnosis and main symptoms of the two medical records. Compared with determining similar medical records based only on the preliminary diagnosis, the accuracy of similar medical record retrieval can be greatly improved, the matching degree of similar medical records can be improved, and the operability of the solution is stronger.

[0103] The above describes the similar medical record determination method in the embodiment of the present application. The following describes the computer device in the embodiment of the present application. Figure 3 In the embodiment of the present application, one embodiment of the computer device includes:

[0104] An acquisition unit 301 is used to acquire a first preliminary diagnosis text and a second preliminary diagnosis text, wherein the first preliminary diagnosis text includes a plurality of first sub-diagnosis texts, and the second preliminary diagnosis text includes a plurality of second sub-diagnosis texts;

[0105] The first determining unit 302 is used to determine the second sub-diagnosis text paired with each first sub-diagnosis text in the plurality of second sub-diagnosis texts in turn according to the text similarity algorithm, and obtain at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of paired sub-diagnosis texts;

[0106] The second determining unit 303 is used to determine the product of the similarity of the paired sub-diagnosis texts and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis text as the first vector value of the first preliminary diagnosis text, and to determine the product of the similarity of the paired sub-diagnosis texts and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis text as the second vector value of the second preliminary diagnosis text;

[0107] A calculation unit 304 is used to substitute the first vector value and the second vector value into a preset cosine similarity calculation formula to calculate a first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text;

[0108] The third determining unit 305 is configured to determine that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records when the first cosine similarity satisfies a preset condition.

[0109] In a preferred implementation of the present embodiment, the first determination unit 302 is specifically used to calculate the similarity between the first main diagnostic text and the second main diagnostic text according to a text similarity algorithm, the first main diagnostic text being the first sub-diagnostic text determined according to the arrangement order of the plurality of first sub-diagnostic texts, and the second main diagnostic text being the first sub-diagnostic text determined according to the arrangement order of the plurality of second sub-diagnostic texts; if the similarity between the first main diagnostic text and the second main diagnostic text is not less than a preset threshold, the first main diagnostic text and the second main diagnostic text are determined to be a pair of paired sub-diagnostic texts; according to the text similarity algorithm, the similarity between each first sub-diagnostic text other than the first main diagnostic text and each unpaired second sub-diagnostic text in the plurality of second sub-diagnostic texts is calculated in sequence according to the arrangement order of the plurality of first sub-diagnostic texts; the maximum similarity is determined among the plurality of similarities corresponding to each first sub-diagnostic text other than the first main diagnostic text, and the first sub-diagnostic text and the second sub-diagnostic text corresponding to the maximum similarity are determined to be paired sub-diagnostic texts.

[0110] In a preferred implementation of the present embodiment, the first determination unit 302 is also used to determine that the similarity between the first sub-diagnostic text and the second sub-diagnostic text is 1 when the diagnosis name of the first sub-diagnostic text is the same as the diagnosis name of the second sub-diagnostic text; when the diagnosis name of the first sub-diagnostic text is different from the diagnosis name of the second sub-diagnostic text, determine whether there is a diagnosis name that is the same as the diagnosis name of the second sub-diagnostic text in the synonym library corresponding to the diagnosis name of the first sub-diagnostic text; when there is a diagnosis name that is the same as the diagnosis name of the second sub-diagnostic text, determine that the similarity between the first sub-diagnostic text and the second sub-diagnostic text is 1; when there is no diagnosis name that is the same as the diagnosis name of the second sub-diagnostic text, calculate the similarity between the first sub-diagnostic text and the second sub-diagnostic text according to the cosine similarity algorithm.

[0111] In a preferred implementation of the present embodiment, the first determination unit 302 is specifically used to segment the first sub-diagnostic text, obtain the original segmentation corresponding to each segmentation position of the first sub-diagnostic text, and determine the synonyms corresponding to the original segmentation; sequentially substitute the feature vectors composed of each alternative word at each segmentation position of the first sub-diagnostic text and the alternative words at other segmentation positions into the cosine similarity calculation formula respectively with the feature vector corresponding to the second sub-diagnostic text, and calculate to obtain multiple similarity calculation results; wherein, the alternative words at the segmentation position include the original segmentation and the synonyms of the original segmentation, the feature vector of the first sub-diagnostic text includes the alternative words at each segmentation position and the word frequency corresponding to each alternative word, and the feature vector corresponding to the second sub-diagnostic text includes each segmentation of the second sub-diagnostic text and the word frequency corresponding to each segmentation; the alternative word corresponding to the calculation result with the largest similarity among the multiple similarity calculation results corresponding to each segmentation position is determined as the selected word at the segmentation position, and the similarity calculation result corresponding to the last determined selected word is determined as the similarity between the first sub-diagnostic text and the second sub-diagnostic text.

[0112] In a preferred implementation of the present embodiment, if there is an unmatched first sub-diagnostic text in the first preliminary diagnostic text, the preset weight of the unmatched first sub-diagnostic text is used as a vector value in the first vector value of the first preliminary diagnostic text; if there is an unmatched second sub-diagnostic text in the second preliminary diagnostic text, the unmatched second sub-diagnostic text is assigned a value of 0 and used as a vector value in the second vector value of the second preliminary diagnostic text.

[0113] In a preferred implementation of the present embodiment, the preset weight of the first sub-diagnostic text is determined according to the sorting position of the first sub-diagnostic text in the first preliminary diagnostic text; the preset weight of the second sub-diagnostic text is determined according to the sorting position of the second sub-diagnostic text in the second preliminary diagnostic text.

[0114] In a preferred implementation of this embodiment, the acquisition unit 301 is further used to acquire the first main symptom data element in the chief complaint text in the medical record corresponding to the first preliminary diagnosis text, and to acquire the second main symptom data element in the chief complaint text in the medical record corresponding to the second preliminary diagnosis text;

[0115] The calculation unit 304 is further configured to calculate a second cosine similarity between the first main symptom data element and the second main symptom data element according to a cosine similarity algorithm.

[0116] In a preferred implementation of the present embodiment, the calculation unit 304 is specifically used for assigning a value to the first main symptom data element according to the result value of the first main symptom data element, and assigning a value to the second main symptom data element according to the result value of the second main symptom data element if the assignment results of the first main symptom data element and the second main symptom data element have been defined; taking the assignment result of the first main symptom data element and the assignment result of the second main symptom data element as vector values, respectively, and substituting them into the cosine similarity calculation formula, respectively, to calculate the second cosine similarity.

[0117] In a preferred implementation of the present embodiment, the calculation unit 304 is specifically used to, if the assignment results of the first main symptom data element and the second main symptom data element are both undefined, respectively perform word segmentation on the first main symptom data element and the second main symptom data element to obtain multiple word segmentations corresponding to the first main symptom data element and multiple word segmentations corresponding to the second main symptom data element; respectively use the word frequency of each word segmentation corresponding to the first main symptom data element and the word frequency of each word segmentation corresponding to the second main symptom data element as vector values, and substitute them into the cosine similarity calculation formula respectively to calculate the second cosine similarity.

[0118] In a preferred implementation of this embodiment, there are multiple second preliminary diagnosis texts, and each second preliminary diagnosis text corresponds to a medical record;

[0119] The third determination unit 305 is specifically used to add the product of the first cosine similarity and the preset preliminary diagnosis weight plus the product of the second cosine similarity and the preset main symptom weight to calculate the medical record similarity between the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text; wherein the sum of the preliminary diagnosis weight and the main symptom weight is 1; determine the n medical record similarities with the greatest similarity among multiple medical record similarities, and respectively determine the medical record corresponding to each of the n medical record similarities with the greatest similarity as a similar medical record, wherein n is a positive integer greater than or equal to 1.

[0120] In this embodiment, the operations performed by each unit in the computer device are the same as those described above. Figure 1 to Figure 2 The description in the illustrated embodiment is similar and will not be repeated here.

[0121] In this embodiment, the first determination unit 302 determines at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of paired sub-diagnosis texts according to the text similarity algorithm, the second determination unit 303 determines the product of the similarity of the paired sub-diagnosis texts and the preset weight of the first sub-diagnosis text in the paired sub-diagnosis text as the first vector value of the first preliminary diagnosis text, and determines the product of the similarity of the paired sub-diagnosis texts and the preset weight of the second sub-diagnosis text in the paired sub-diagnosis text as the second vector value of the second preliminary diagnosis text, the calculation unit 304 substitutes the first vector value and the second vector value into the cosine similarity calculation formula respectively, and calculates the first cosine similarity of the first preliminary diagnosis text and the second preliminary diagnosis text, and the third determination unit 305 determines that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records when the first cosine similarity meets the preset condition. The method of this embodiment can easily and quickly determine similar medical records, reduce the difficulty of determining similar medical records, and greatly improve the practicality of the solution for determining similar medical records.

[0122] The computer device in the embodiment of the present application is described below. Figure 4 In the embodiment of the present application, one embodiment of the computer device includes:

[0123] The computer device 400 may include one or more central processing units (CPU) 401 and a memory 405 , wherein the memory 405 stores one or more application programs or data.

[0124] The memory 405 may be a volatile storage or a persistent storage. The program stored in the memory 405 may include one or more modules, each of which may include a series of instruction operations in the computer device. Furthermore, the central processor 401 may be configured to communicate with the memory 405 and execute a series of instruction operations in the memory 405 on the computer device 400.

[0125] The computer device 400 may also include one or more power supplies 402, one or more wired or wireless network interfaces 403, one or more input and output interfaces 404, and / or one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0126] The CPU 401 can execute the aforementioned Figure 1 to Figure 2 The operations performed by the computer device in the illustrated embodiment will not be described in detail here.

[0127] The present application also provides a computer storage medium, wherein one embodiment includes: the computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the aforementioned Figure 1 to Figure 2 The operations performed by the computer device in the illustrated embodiment.

[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0129] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for determining similar medical records, characterized in that: include: Acquire a first preliminary diagnosis text and a second preliminary diagnosis text, wherein the first preliminary diagnosis text includes a plurality of first sub-diagnosis texts, and the second preliminary diagnosis text includes a plurality of second sub-diagnosis texts; According to the text similarity algorithm, the second sub-diagnosis text paired with each first sub-diagnosis text is sequentially determined in the plurality of second sub-diagnosis texts to obtain at least one pair of paired sub-diagnosis texts and the similarity corresponding to each pair of the paired sub-diagnosis texts; The product of the similarity of the paired sub-diagnostic texts and the preset weight of the first sub-diagnostic text in the paired sub-diagnostic texts is determined as the first vector value of the first preliminary diagnostic text, and the product of the similarity of the paired sub-diagnostic texts and the preset weight of the second sub-diagnostic text in the paired sub-diagnostic texts is determined as the second vector value of the second preliminary diagnostic text; the preset weight of the first sub-diagnostic text is determined according to the importance of the first sub-diagnostic text in the first preliminary diagnostic text, and the preset weight of the second sub-diagnostic text is determined according to the importance of the second sub-diagnostic text in the second preliminary diagnostic text; Substituting the first vector value and the second vector value into a preset cosine similarity calculation formula respectively, to calculate a first cosine similarity between the first preliminary diagnosis text and the second preliminary diagnosis text; When the first cosine similarity meets a preset condition, it is determined that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records.

2. The method for determining similar medical records according to claim 1, characterized in that: The step of sequentially determining the second sub-diagnosis text paired with each of the first sub-diagnosis texts in the plurality of second sub-diagnosis texts includes: According to the text similarity algorithm, calculating the similarity between the first main diagnosis text and the second main diagnosis text, the first main diagnosis text being the first sub-diagnosis text determined according to the arrangement order of the plurality of first sub-diagnosis texts, and the second main diagnosis text being the first sub-diagnosis text determined according to the arrangement order of the plurality of second sub-diagnosis texts; If the similarity between the first main diagnosis text and the second main diagnosis text is not less than a preset threshold, determining that the first main diagnosis text and the second main diagnosis text are a pair of paired sub-diagnosis texts; According to the text similarity algorithm, the similarity between each first sub-diagnosis text other than the first main diagnosis text and each unpaired second sub-diagnosis text in the plurality of second sub-diagnosis texts is calculated in sequence according to the arrangement order of the plurality of first sub-diagnosis texts; The maximum similarity is determined among multiple similarities corresponding to each first sub-diagnosis text except the first main diagnosis text, and the first sub-diagnosis text and the second sub-diagnosis text corresponding to the maximum similarity are determined to be paired sub-diagnosis texts.

3. The method for determining similar medical records according to claim 2, characterized in that: The step of calculating the similarity between the first sub-diagnosis text and the second sub-diagnosis text includes: When the diagnosis name of the first sub-diagnosis text is the same as the diagnosis name of the second sub-diagnosis text, determining the similarity between the first sub-diagnosis text and the second sub-diagnosis text to be 1; When the diagnosis name of the first sub-diagnosis text is different from the diagnosis name of the second sub-diagnosis text, determining whether there is a diagnosis name identical to the diagnosis name of the second sub-diagnosis text in the synonym library corresponding to the diagnosis name of the first sub-diagnosis text; If so, the similarity between the first sub-diagnosis text and the second sub-diagnosis text is determined to be 1; If not, the similarity between the first sub-diagnosis text and the second sub-diagnosis text is calculated according to the cosine similarity algorithm.

4. The method for determining similar medical records according to claim 3, characterized in that: The calculating the similarity between the first sub-diagnosis text and the second sub-diagnosis text according to the cosine similarity algorithm includes: Performing word segmentation on the first sub-diagnosis text to obtain original word segmentations corresponding to each word segmentation position of the first sub-diagnosis text, and determining synonyms corresponding to the original word segmentations; Substitute the feature vectors composed of each candidate word at each segmentation position of the first sub-diagnosis text and the candidate words at other segmentation positions into the cosine similarity calculation formula respectively with the feature vector corresponding to the second sub-diagnosis text to obtain multiple similarity calculation results; The candidate words at the participle position include the original participle and the synonyms of the original participle, the feature vector of the first sub-diagnosis text includes the candidate words at each participle position and the word frequency corresponding to each candidate word, and the feature vector corresponding to the second sub-diagnosis text includes each participle of the second sub-diagnosis text and the word frequency corresponding to each participle; The candidate word corresponding to the calculation result with the greatest similarity among the multiple similarity calculation results corresponding to each segmentation position is determined as the selected word of the segmentation position, and the similarity calculation result corresponding to the last determined selected word is determined as the similarity between the first sub-diagnosis text and the second sub-diagnosis text.

5. The method for determining similar medical records according to claim 1, characterized in that: If there is an unmatched first sub-diagnostic text in the first preliminary diagnostic text, the preset weight of the unmatched first sub-diagnostic text is used as a vector value in the first vector value of the first preliminary diagnostic text; if there is an unmatched second sub-diagnostic text in the second preliminary diagnostic text, the unmatched second sub-diagnostic text is assigned a value of 0 and used as a vector value in the second vector value of the second preliminary diagnostic text.

6. The method for determining similar medical records according to claim 5, characterized in that: The preset weight of the first sub-diagnostic text is determined according to the sorting position of the first sub-diagnostic text in the first preliminary diagnostic text; the preset weight of the second sub-diagnostic text is determined according to the sorting position of the second sub-diagnostic text in the second preliminary diagnostic text.

7. The method for determining similar medical records according to any one of claims 1 to 6, characterized in that: The method further comprises: Obtaining a first main symptom data element in the chief complaint text in the medical record corresponding to the first preliminary diagnosis text, and obtaining a second main symptom data element in the chief complaint text in the medical record corresponding to the second preliminary diagnosis text; The second cosine similarity between the first main symptom data element and the second main symptom data element is calculated according to the cosine similarity algorithm.

8. The method for determining similar medical records according to claim 7, characterized in that: The calculating the second cosine similarity between the first main symptom data element and the second main symptom data element according to the cosine similarity algorithm includes: If the assignment results of the first main symptom data element and the second main symptom data element have been defined, the first main symptom data element is assigned a value according to the result value of the first main symptom data element, and the second main symptom data element is assigned a value according to the result value of the second main symptom data element; The assignment result of the first main symptom data element and the assignment result of the second main symptom data element are respectively used as vector values, and are respectively substituted into the cosine similarity calculation formula to calculate the second cosine similarity.

9. The method for determining similar medical records according to claim 7, characterized in that: The calculating the second cosine similarity between the first main symptom data element and the second main symptom data element according to the cosine similarity algorithm includes: If the assignment results of the first main symptom data element and the second main symptom data element are both undefined, segmenting the first main symptom data element and the second main symptom data element respectively to obtain a plurality of segmentations corresponding to the first main symptom data element and a plurality of segmentations corresponding to the second main symptom data element; The word frequency of each word segment corresponding to the first main symptom data element and the word frequency of each word segment corresponding to the second main symptom data element are respectively used as vector values, and are respectively substituted into the cosine similarity calculation formula to calculate the second cosine similarity.

10. The method for determining similar medical records according to claim 7, characterized in that: There are multiple second preliminary diagnosis texts, and each of the second preliminary diagnosis texts corresponds to a medical record; When the first cosine similarity satisfies a preset condition, determining that the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text are similar medical records includes: The product of the first cosine similarity and a preset preliminary diagnosis weight is added to the product of the second cosine similarity and a preset main symptom weight to calculate the medical record similarity between the medical record corresponding to the first preliminary diagnosis text and the medical record corresponding to the second preliminary diagnosis text; wherein the sum of the preliminary diagnosis weight and the main symptom weight is 1; Determine n medical record similarities with the greatest similarity among the multiple medical record similarities, and determine the medical records corresponding to each medical record similarity among the n medical record similarities with the greatest similarity as similar medical records, where n is a positive integer greater than or equal to 1.