Memory-based patient primary index rapid matching method, device and equipment
By creating list containers and nested Map containers in memory, the rapid matching of the patient's main index is achieved, and the problem of low matching efficiency in the existing technology is solved, which significantly improves the matching efficiency in the data integration process.
Patent Information
- Application Number
- CN202510078736.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The prior art has low efficiency in matching the main index of patients during data integration and summary, and cannot effectively handle the matching needs of large amounts of data.
Using the memory-based patient main index fast matching method, fast matching is achieved by creating list containers and nested Map containers in memory. The specific steps include storing the patient's main index data in memory, traversing the data and storing it into a nested Map container, obtaining the target fields in the data to be matched, matching according to the matching rules, and pointing the coordinates in the intersection to the corresponding historical patient's main index data.
By reducing I/O processing and utilizing the key-value storage method of Map containers, the efficiency of patient main index matching is significantly improved, and it can adapt to the large number of matching needs during data integration, and improve the efficiency of patient medical record data integration.
Smart Images

Figure CN119961294A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical information technology, and in particular to a method, device and equipment for quickly matching a patient's primary index based on a memory. Background Art
[0002] With the continuous advancement of the construction of regional medical centers, building a regional medical information platform, establishing a universal health record, and realizing the sharing of residents' health records and medical information resources have become important development directions of medical informationization. To achieve this goal, it is necessary to integrate and summarize the medical records of patients from all medical institutions in the region. Since the algorithms and formats of patient indexes of various medical institutions are not consistent, when summarizing patient medical record data, it is necessary to recalculate and match the medical record data of the same patient in different medical institutions to ensure the validity and integrity of the patient medical record data.
[0003] The patient master index system currently on the market is usually used in the daily operations of medical institutions. The patient master index matching in daily operations has the characteristics of discrete matching time and small matching data volume, so the matching efficiency is rarely considered at the beginning of system design.
[0004] However, the patient primary index matching in the process of data integration and aggregation is characterized by concentrated matching and large data volume. Therefore, how to improve the matching efficiency in the process of data integration and aggregation has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the above problems, the present invention is proposed to provide a memory-based patient master index fast matching method, device and equipment to overcome the above problems.
[0006] One aspect of the present invention provides a method for fast matching of a patient primary index based on a memory, the method comprising: Creating a first list container for storing patient master index data in a memory, storing historical patient master index data in the first list container, each historical patient master index data including a patient master index sequence number and a plurality of patient identity information fields; Traversing the first list container, storing the historical patient primary index data in the first list container into a nested Map container preset in the memory, wherein the nested Map container includes an outer container and an inner container, the key of the outer container is the name of the matching rule field of the preset primary index matching model, the matching rule field is a field used to identify the patient identity information, the value corresponding to the key of each outer container is an inner container, the key of the inner container is the field value of the matching rule field corresponding to the key of the outer container in the historical patient primary index data, and the value corresponding to the key of each inner container is the coordinate set of the record in the container list with the same value as the key of the inner container in the historical patient primary index data; Obtain a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model; Determine the target inner container corresponding to each target field, match the value of each target field in the corresponding target inner container to find the target key whose value is the value of the current target field, and extract the target value corresponding to each target key; The target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container is used as the patient primary index data of the patient medical record data to be matched.
[0007] Furthermore, the method further comprises: The primary index matching model is pre-constructed, and the primary index matching model includes a matching rule field for patient matching. A matching threshold is set for the primary index matching model and a weight is set for each matching rule field, so that when matching patients, the field weights of the fields in the patient's medical record data that have the same name as the matching rule field are added. If the sum of the weights is greater than the matching threshold, the patient is determined to be matched; if the sum of the weights is less than the matching threshold, the patient is not matched.
[0008] Furthermore, the step of obtaining a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model includes: Obtain the target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model and has a value; Arrange and combine the target fields to obtain a combination whose sum of field weights is greater than the matching threshold.
[0009] Further, the determining of the target inner container corresponding to each target field includes: According to the target fields contained in each combination mode, the target inner container corresponding to each target field under the current combination mode is retrieved from the nested Map container; The method of using the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container as the patient primary index data of the patient medical record data to be matched includes: The coordinate sets of each target value extracted under all combinations are intersected, and the target historical patient primary index data pointed to by the coordinates in the intersection in the first list container is used as the patient primary index data of the patient medical record data to be matched.
[0010] Furthermore, the method further comprises: If the intersection of each target value is empty, it is determined that there is no patient primary index data that matches the patient medical record data to be matched, and a new patient primary index sequence number is generated for the patient medical record data to be matched; The obtained new patient primary index sequence number is combined with the patient basic information field in the patient medical record data to be matched as the patient primary index data of the patient medical record data to be matched, and the patient primary index data is added to the first list container.
[0011] Furthermore, after taking the target historical patient primary index data pointed to by the coordinates in the intersection in the first list container as the patient primary index data of the patient medical record data to be matched, the method further includes: In the first list container, the non-empty field values of the basic patient information in the to-be-matched patient medical record data are overwritten with the corresponding fields of the target historical patient primary index data.
[0012] Furthermore, the method further comprises: The storage records of the nested Map container are updated according to the patient primary index data of the to-be-matched patient medical record data in the first list container.
[0013] Furthermore, the method further comprises: The patient primary index data of the patient medical record data to be matched is stored in a preset second list container, and the second list container is used to store the newly matched patient primary index data; When the second list container reaches a preset data length, all the patient main index data stored in the second list container are saved in batches to a preset database.
[0014] Another aspect of the present invention provides a memory-based patient primary index fast matching device, the device comprising a functional module for implementing any of the memory-based patient primary index fast matching methods described above, specifically, the device comprising: A first storage module is used to create a first list container for storing patient master index data in a memory, and store historical patient master index data in the first list container, each historical patient master index data including a patient master index sequence number and a plurality of patient identity information fields; A second storage module is used to traverse the first list container and store the historical patient primary index data in the first list container into a nested Map container preset in the memory, wherein the nested Map container includes an outer container and an inner container, the key of the outer container is the name of the matching rule field of the preset primary index matching model, the matching rule field is a field used to identify the patient identity information, the value corresponding to the key of each outer container is an inner container, the key of the inner container is the field value of the matching rule field corresponding to the key of the outer container in the historical patient primary index data, and the value corresponding to the key of each inner container is the coordinate set of the record in the container list of the same value as the inner container key in the historical patient primary index data; A first matching module is used to obtain a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model; The second matching module is used to determine the target inner container corresponding to each target field, match the target inner container corresponding to each target field according to the value of each target field to find the target key whose value is the value of the current target field, and extract the target value corresponding to each target key; The calculation module is used to use the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container as the patient primary index data of the patient medical record data to be matched.
[0015] Another aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the memory-based patient primary index fast matching method as described in any one of the above items are implemented.
[0016] The memory-based patient primary index fast matching method, device and equipment provided in the embodiments of the present invention pre-load the patient primary index data into the memory and process it into a specific structure, and complete the entire primary index matching process in the memory. First, this pure memory-based matching method reduces I / O processing and can greatly improve the primary index matching efficiency. Secondly, the key-value pair storage data method based on the Map container can directly locate the value value according to the key value, avoiding traversing the data during the search process, and can further improve the primary index matching efficiency to adapt to the requirements of concentrated matching of a large number of primary indexes in the data integration process, thereby improving the efficiency of patient medical record data integration.
[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only used for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. In the accompanying drawings: Figure 1 This is a flow chart of a method for fast matching of patient primary indexes based on memory according to an embodiment of the present invention; Figure 2 A schematic diagram of storing the patient's primary index data of a list container proposed in an embodiment of the present invention; Figure 3 A schematic diagram of the storage structure of a nested Map container proposed in an embodiment of the present invention; Figure 4 The present invention is a schematic diagram of the structure of a memory-based patient master index fast matching device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0020] Those skilled in the art will understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined.
[0021] Embodiment 1 The embodiment of the present invention provides a method for quickly matching a patient's primary index based on memory, such as Figure 1 As shown, the memory-based patient primary index fast matching method proposed by the present invention includes the following steps: S1. Create a first list container in the memory for storing patient master index data, store historical patient master index data in the first list container, each historical patient master index data includes a patient master index sequence number and multiple patient identity information fields.
[0022] The present invention pre-creates a list container for storing the historical patient master index data generated after matching calculation in the historical data processing process, and reads the matched historical patient master index data from the database into the memory and stores it in the list container. Figure 2 As shown, the master index data of any coordinate position can be directly read through the coordinates of the patient master index in the list container. There is no historical patient master index data during the first execution, and the list container is empty. Each patient master index data contains a unique patient master index serial number automatically generated by the system and several patient identity information fields, such as name, gender, age, date of birth, telephone number, etc. The patient identity information fields contained in the patient master index cover all matching rule fields in the preset master index matching model.
[0023] Among them, the main index matching model needs to be built in advance, including the matching rule fields for patient matching. The function of the main index matching model is to perform field matching on the medical record data of the patient to be matched according to the matching rule fields.
[0024] S2. Traverse the first list container and store the historical patient primary index data in the first list container into a nested Map container preset in the memory. The nested Map container includes an outer container and an inner container. The key of the outer container is the name of the matching rule field of the preset primary index matching model. The matching rule field is a field used to identify the patient's identity information. The value corresponding to the key of each outer container is an inner container. The key of the inner container is the field value of the matching rule field corresponding to the key of the outer container in the historical patient primary index data. The value corresponding to the key of each inner container is the coordinate set of the record in the container list with the same value as the inner container key in the historical patient primary index data. Among them, the matching rule field is specifically a part of the specified field in the patient medical record data that can be used to identify the patient's identity information.
[0025] The present invention traverses the first list container storing the historical patient primary index, and stores the patient primary index information in a nested Map container according to the matching rule field name of the primary index matching model, the patient primary index data field value, and the coordinates of the patient primary index data in the list container.
[0026] Specifically, the present invention pre-constructs a nested Map container. The nested Map container includes an outer container and an inner container. The Map container uses key-value pairs to store data, and can directly locate the value according to the key value, with a very fast access speed. The key of the outer Map container is the matching rule field name of the matching model, for example: name, and the value is also a Map container, namely the inner container. The key of the inner container is the value of the field corresponding to the key of the outer Map container in the patient's primary index data. For example: the key of the outer Map container is "name", and the key of the inner Map container is the patient's name "Zhang XX". The value of the inner Map container is the coordinate set of the record in the list container of the patient's primary index data with the same value as the key of the inner container. For example, the key of the inner container is "Zhang XX", and the value is the coordinate set of all the primary index data with the name "Zhang XX" in the patient's primary index list container in the list. The storage structure of the nested Map container is as follows: Figure 3 .
[0027] S3. Obtain a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model.
[0028] Specifically, the present invention performs field matching on the patient medical record data to be matched according to the matching rule field of the primary index matching model to obtain the field with the same name as the matching rule field in the patient medical record data to be matched, and obtains the target field. Specifically, the primary index matching model is read from the database in advance, the matching rule field is obtained and stored in the memory to avoid reading from the database every time a match is made.
[0029] S4. Determine the target inner container corresponding to each target field, match the value of each target field in the corresponding target inner container to find the target key whose value is the value of the current target field, and extract the target value corresponding to each target key.
[0030] Specifically, the present invention first determines the target inner container corresponding to each target field, matches the value of each target field in the corresponding target inner container to find the target key whose value is the value of the current target field, and extracts the target value corresponding to each target key.
[0031] S5. Use the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container as the patient primary index data of the patient medical record data to be matched.
[0032] Specifically, the present invention calculates the intersection of each target value, and confirms the historical patient primary index data pointed to by the coordinates in the intersection in the first list container as the target historical patient primary index data, and uses the target historical patient primary index data as the patient primary index data of the patient medical record data to be matched.
[0033] In this embodiment, when matching the patient's primary index data, the inner Map container is first located in the nested container through the matching rule field name contained in the set matching model. The coordinate set of the patient's primary index data that matches the patient's medical record data field value to be matched can be located in the list container through the value of the patient's primary index data that matches the patient's medical record data field value to be matched. The coordinate set of the matching patient's primary index data in the list container is retrieved based on the values of the matching rule field names contained in the matching model and the fields in the patient's medical record data to be matched that are the same as the matching rule field names. The result of taking the intersection of the sets is the patient's primary index record that matches the patient's medical record data to be matched.
[0034] The memory-based patient primary index fast matching method provided by the embodiment of the present invention creates a list container in the memory for storing patient primary index data, stores historical patient primary index data in the list container, and then traverses the list container to store the historical patient primary index data in the list container to a nested Map container preset in the memory; obtains the target field with the same name as the matching rule field in the patient medical record data to be matched, and matches the target inner container corresponding to each target field according to the value of each target field to find the target key whose value is the value of the current target field, and extracts the target value corresponding to each target key; uses the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container as the patient primary index data of the patient medical record data to be matched. By pre-loading the patient's primary index data into the memory and processing it into a specific structure, and completing the entire primary index matching process in the memory, this pure memory-based matching method reduces I / O processing and can greatly improve query efficiency. Secondly, the key-value pair storage data method based on the Map container can directly locate the value value according to the key value, avoiding traversing the data during the search process, and further improving the primary index matching efficiency to adapt to the requirements of concentrated matching of a large number of primary indexes in the data integration process, thereby improving the efficiency of patient medical record data integration.
[0035] The memory-based patient primary index fast matching method provided by an embodiment of the present invention also includes the step of pre-building the primary index matching model. Specifically, it includes pre-building a primary index matching model, the primary index matching model includes a matching rule field for patient matching, setting a matching threshold for the primary index matching model and setting a weight for each matching rule field, so that when matching patients, the fields in the patient medical record data with the same name as the matching rule field are added with field weights, if the weight sum is greater than the matching threshold, the patient is determined to be matched, and if the weight sum is less than the matching threshold, the patient is not matched.
[0036] Specifically, the present invention pre-initializes the main index matching model, selects the fields in the patient's medical record data that can identify the patient's identity as the matching rule fields of the matching model, such as name, mobile phone number, ID number, etc., sets a weight for each matching rule field, and the sum of the weights of all matching rule fields is 100. At the same time, a matching threshold is set for the main index matching model, and the weights of the matching fields are added when matching patients. If the result is greater than the matching threshold, the patient is determined to be matched, and if the result is less than the matching threshold, the patient is not matched. When performing a quick match of the patient's main index, the main index matching model is read from the database in advance, and the matching rule fields, field weights, and model matching thresholds are obtained and stored in the memory to avoid reading from the database every time a match is made.
[0037] Furthermore, obtaining the target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model in step S3 specifically includes: obtaining the target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model and has a value; arranging and combining the target fields to obtain a combination in which the sum of the field weights is greater than the matching threshold.
[0038] Correspondingly, determining the target inner container corresponding to each target field in step S4 includes: taking out the target inner container corresponding to each target field in the current combination mode from the nested Map container according to the target fields included in each combination mode.
[0039] Correspondingly, in step S5, the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container is used as the patient primary index data of the patient medical record data to be matched, including: taking the intersection of the coordinate sets of each target value extracted under all combinations, and using the target historical patient primary index data pointed to by the coordinates in the intersection in the first list container as the patient primary index data of the patient medical record data to be matched.
[0040] In the embodiment of the present invention, the fields in the patient medical record data to be matched that have the same name as the field of the matching model rule and have values are arranged and combined to obtain a combination method in which the sum of the field matching weights is greater than the matching threshold of the matching model. The inner layer Map is taken out from the Map container according to the fields included in the combination method, and the patient primary index data coordinate set that matches the patient medical record data to be matched is taken out according to the field value of the patient medical record data to be matched, and the intersection result of all the sets taken out by the combination method is the patient primary index data that matches the patient medical record data to be matched.
[0041] In this embodiment, when matching the patient primary index, as long as the sum of the matching field weights is greater than the matching threshold, it can be determined as the same patient. However, it is impossible to predict which fields are matched, so it is necessary to perform permutations and combinations to get all possible combinations, and then take the intersection of each combination, and determine whether there is a matching patient primary index based on the result of the intersection.
[0042] The memory-based patient primary index fast matching method provided by an embodiment of the present invention also includes: if the intersection of each target value is empty, it is determined that there is no patient primary index data that matches the patient medical record data to be matched, and a new patient primary index serial number is generated for the patient medical record data to be matched; when updating the primary index data in the primary index list container, the obtained new patient primary index serial number is merged with the patient basic information field in the patient medical record data to be matched as the patient primary index data of the patient medical record data to be matched, and the patient primary index data is added to the first list container.
[0043] In this embodiment, if the intersection results of all the combinations are empty, it means that there is no patient primary index data that matches the patient medical record data to be matched, and a new primary index sequence number needs to be generated for the patient medical record to be matched. If the existing primary index record is not matched, the basic patient information in the patient medical record data bound to the new primary index sequence number is appended to the end of the patient primary index list container. Since each data in the list container must record the coordinate position of the data for data retrieval, the present invention can directly add the basic patient information in the patient medical record data bound to the new primary index sequence number to the end of the patient primary index list container, that is, add a new coordinate position to the end of the list container, avoiding the problem of adding to other positions and causing the need to modify the original data and the coordinate position of the original data. Furthermore, after the target historical patient primary index data pointed to by the coordinates in the intersection in the first list container is used as the patient primary index data of the patient medical record data to be matched, the method also includes: in the first list container, the non-empty field value of the patient basic information in the patient medical record data to be matched is overwritten with the corresponding field of the target historical patient primary index data. That is, if an existing primary index record is matched, the non-empty field value of the patient's basic information in the patient's medical record data will overwrite the corresponding field of the original patient's primary index record to update the original patient's primary index record.
[0044] Furthermore, the memory-based patient primary index fast matching method provided by the embodiment of the present invention further includes: updating the storage records of the nested Map container according to the patient primary index data of the to-be-matched patient medical record data in the first list container.
[0045] Specifically, for newly generated primary index records, locate the inner Map container according to the matching model rule field name, and locate the primary index coordinate set stored in the inner Map container according to the value of the field whose name is consistent with the rule field of the primary index matching model in the new primary index record, and add the coordinates of the new primary index record in the list container to the coordinate set. For updated primary index records, add the coordinates of the primary index in the list container to the Map container in the manner of generating a new primary index, and delete the record of the coordinate set of the original field value in the Map container.
[0046] Furthermore, the memory-based patient primary index fast matching method provided in an embodiment of the present invention also includes: storing the patient primary index data of the patient medical record data to be matched in a preset second list container, the second list container being used to store newly matched patient primary index data; when the second list container reaches a preset data length, all patient primary index data stored in the second list container are batch saved in a preset database.
[0047] Specifically, when the matched primary index data is saved to the database, in order to avoid frequent I / O affecting the matching efficiency due to saving one by one, a list container, namely the second list container, is first created to store the matched primary index data, and then saved in batches to the database when the container reaches a certain length.
[0048] In addition, if an exception occurs during the matching process, resulting in a matching failure, the main index data in the memory is reset and step S2 is re-executed to avoid inconsistency between the main index data in the memory and the database records, thereby ensuring data consistency.
[0049] In addition, if the primary index matching model and matching rule fields need to be modified, the primary index matching model building step and the nested Map container building step are re-executed in sequence to update the primary index matching model in memory and rebuild the container.
[0050] The memory-based patient master index fast matching method proposed by the present invention improves the master index matching efficiency by pre-loading the patient master index data into the memory and processing it into a specific structure, and completing the entire master index matching process in the memory, so as to adapt to the requirements of concentrating a large number of matching master indexes in the data integration process and improve the efficiency of patient medical record data integration. When a matching error occurs or the service is down, the memory is reloaded to ensure the consistency of the memory data and the database data, taking into account the reliability of the data while ensuring efficiency.
[0051] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0052] Embodiment 2 Another embodiment of the present invention further provides a memory-based patient primary index fast matching device, which includes a functional module for implementing the memory-based patient primary index fast matching method as described in any one of the above items. Figure 4 The schematic diagram of the structure of a patient master index fast matching device based on memory according to an embodiment of the present invention is shown. Figure 4 A patient master index fast matching device based on memory in an embodiment of the present invention specifically includes a first storage module 201, a second storage module 202, a first matching module 203, a second matching module 204 and a calculation module 205, wherein: The first storage module 201 is used to create a first list container for storing patient master index data in the memory, and store historical patient master index data in the first list container, each historical patient master index data includes a patient master index sequence number and a plurality of patient identity information fields; The second storage module 202 is used to traverse the first list container and store the historical patient primary index data in the first list container into a nested Map container preset in the memory, wherein the nested Map container includes an outer container and an inner container, the key of the outer container is the name of the matching rule field of the preset primary index matching model, the matching rule field is a field used to identify the patient identity information, the value corresponding to the key of each outer container is an inner container, the key of the inner container is the field value of the matching rule field corresponding to the key of the outer container in the historical patient primary index data, and the value corresponding to the key of each inner container is the coordinate set of the record in the container list of the same value as the inner container key in the historical patient primary index data; The first matching module 203 is used to obtain a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model; The second matching module 204 is used to determine the target inner container corresponding to each target field, match the target inner container corresponding to each target field according to the value of each target field to find the target key whose value is the value of the current target field, and extract the target value corresponding to each target key; The calculation module 205 is used to use the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container as the patient primary index data of the patient medical record data to be matched.
[0053] In the specific implementation process of the second embodiment, reference may be made to the first embodiment, which has the corresponding technical effects.
[0054] Embodiment 3 An embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned embodiments of the memory-based patient primary index fast matching method are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules in the above-mentioned embodiments of the patient master index fast matching device based on memory are realized, for example Figure 4 The first generating module 201, the second generating module 202, the first matching module 203, the second matching module 204 and the calculating module 205 are shown.
[0055] In the specific implementation process of Example 3, reference may be made to Example 1, which has corresponding technical effects.
[0056] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, any one of the claimed embodiments may be used in any combination.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for fast matching of patient primary index based on memory, characterized in that: The method comprises: Creating a first list container for storing patient master index data in a memory, storing historical patient master index data in the first list container, each historical patient master index data including a patient master index sequence number and a plurality of patient identity information fields; Traversing the first list container, storing the historical patient primary index data in the first list container into a nested Map container preset in the memory, wherein the nested Map container includes an outer container and an inner container, the key of the outer container is the name of the matching rule field of the preset primary index matching model, the matching rule field is a field used to identify the patient identity information, the value corresponding to the key of each outer container is an inner container, the key of the inner container is the field value of the matching rule field corresponding to the key of the outer container in the historical patient primary index data, and the value corresponding to the key of each inner container is the coordinate set of the record in the container list with the same value as the key of the inner container in the historical patient primary index data; Obtain a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model; Determine the target inner container corresponding to each target field, match the value of each target field in the corresponding target inner container to find the target key whose value is the value of the current target field, and extract the target value corresponding to each target key; The target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container is used as the patient primary index data of the patient medical record data to be matched.
2. The method according to claim 1, characterized in that The method further comprises: The primary index matching model is pre-constructed, and the primary index matching model includes a matching rule field for patient matching. A matching threshold is set for the primary index matching model and a weight is set for each matching rule field, so that when matching patients, the field weights of the fields in the patient's medical record data that have the same name as the matching rule field are added. If the sum of the weights is greater than the matching threshold, the patient is determined to be matched; if the sum of the weights is less than the matching threshold, the patient is not matched.
3. The method according to claim 2, characterized in that The step of obtaining a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model includes: Obtain the target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model and has a value; Arrange and combine the target fields to obtain a combination whose sum of field weights is greater than the matching threshold.
4. The method according to claim 3, characterized in that Determining the target inner container corresponding to each target field includes: According to the target fields contained in each combination mode, the target inner container corresponding to each target field under the current combination mode is retrieved from the nested Map container; The method of using the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container as the patient primary index data of the patient medical record data to be matched includes: The coordinate sets of each target value extracted under all combinations are intersected, and the target historical patient primary index data pointed to by the coordinates in the intersection in the first list container is used as the patient primary index data of the patient medical record data to be matched.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the intersection of each target value is empty, it is determined that there is no patient primary index data that matches the patient medical record data to be matched, and a new patient primary index sequence number is generated for the patient medical record data to be matched; The obtained new patient primary index sequence number is combined with the patient basic information field in the patient medical record data to be matched as the patient primary index data of the patient medical record data to be matched, and the patient primary index data is added to the first list container.
6. The method according to any one of claims 1 to 4, characterized in that: After taking the target historical patient primary index data pointed to by the coordinates in the intersection in the first list container as the patient primary index data of the patient medical record data to be matched, the method further includes: In the first list container, the non-empty field values of the basic patient information in the to-be-matched patient medical record data are overwritten with the corresponding fields of the target historical patient primary index data.
7. The method according to claim 5, characterized in that The method further comprises: The storage records of the nested Map container are updated according to the patient primary index data of the to-be-matched patient medical record data in the first list container.
8. The method according to claim 5, characterized in that The method further comprises: The patient primary index data of the patient medical record data to be matched is stored in a preset second list container, and the second list container is used to store the newly matched patient primary index data; When the second list container reaches a preset data length, all the patient main index data stored in the second list container are saved in batches to a preset database.
9. A patient master index fast matching device based on memory, characterized in that: The device comprises: A first storage module is used to create a first list container for storing patient master index data in a memory, and store historical patient master index data in the first list container, each historical patient master index data including a patient master index sequence number and a plurality of patient identity information fields; A second storage module is used to traverse the first list container and store the historical patient primary index data in the first list container into a nested Map container preset in the memory, wherein the nested Map container includes an outer container and an inner container, the key of the outer container is the name of the matching rule field of the preset primary index matching model, the matching rule field is a field used to identify the patient identity information, the value corresponding to the key of each outer container is an inner container, the key of the inner container is the field value of the matching rule field corresponding to the key of the outer container in the historical patient primary index data, and the value corresponding to the key of each inner container is the coordinate set of the record in the container list of the same value as the inner container key in the historical patient primary index data; A first matching module is used to obtain a target field in the patient medical record data to be matched that has the same name as the matching rule field of the primary index matching model; The second matching module is used to determine the target inner container corresponding to each target field, match the target inner container corresponding to each target field according to the value of each target field to find the target key whose value is the value of the current target field, and extract the target value corresponding to each target key; The calculation module is used to use the target historical patient primary index data pointed to by the coordinates in the intersection of each target value in the first list container as the patient primary index data of the patient medical record data to be matched.
10. A computer device, characterized in that: comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Hospital management platform customization method and device based on user demands, and storage medium
CN114064021A
IoT (Internet of Things) data perception-oriented sensor data packet retrieval method, system and device
CN114443922A
Statistical report paging method, system and equipment and medium
CN115129724A
Data query method and apparatus
US20180239800A1
Data Storage Method and Apparatus
US20180276262A1