A medical data tracing method and system
By collecting and integrated the key information of drugs and establishing database storage traceability information, users can query the shelf life through the name and batch number of the drug under the condition of losing the drug box, which solves the problem of not inquiring the shelf life during the use of the drug to ensure that the medicine is to ensure the medicine. Safety and effective use.
Patent Information
- Application Number
- CN202411533338.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-31
AI Technical Summary
Users may lose the medicine box during the use of the medicine, resulting in the inability to check the shelf life of the medicine, affecting the safe and effective use of the medicine.
By collecting key information such as the name, batch number, shelf life and usage dosage of the drug, and integrating it with the user's order information, the database storage traceability information can be established. Users can query the shelf life through the name and batch number of the drug.
It enables users to query the shelf life of medicines through their names and batch numbers when they lose their medicine boxes, ensuring the safe and effective use of medicines and preventing misuse or confusion of medicines.
Smart Images

Figure CN119028506B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical data management, and in particular to a medical data tracing method and system. Background Art
[0002] In daily life, medicines are important items for treating diseases and maintaining health. Their safety and effectiveness are of vital importance. As we all know, the shelf life of medicines is recorded on the medicine box. However, sometimes users may encounter the situation that the medicine box is lost, which brings them a lot of inconvenience, especially when they need to check the shelf life of the medicine.
[0003] The shelf life of a drug is the period of time during which the drug can maintain its safety and effectiveness under the prescribed storage conditions. It is very important for users to understand the shelf life of a drug, because it is directly related to whether the drug can continue to be used and the safety of its use. If the drug has passed its shelf life, its efficacy may be reduced, and it may even produce harmful substances, posing a threat to human health.
[0004] However, when users accidentally lose the medicine box, they cannot directly learn the shelf life of the medicine through the information on the medicine box. In this case, they may feel confused and uneasy, not knowing how to obtain the required information. Therefore, it is urgent to develop a method that can obtain the shelf life of the medicine based on the information on the medicine plate. Summary of the invention
[0005] In order to enable users to obtain the shelf life of drugs through the information on the medicine plate and achieve the purpose of safe medication, the present application provides a medical data tracing method and system.
[0006] In the first aspect, the present application provides a method for tracing medical data, which adopts the following technical solution:
[0007] A method for tracing medical data comprises the following steps:
[0008] Data collection: including the first collection and the second collection;
[0009] First collection: collecting the name, batch number, shelf life, usage and dosage of the drug as the first drug information of the drug, and integrating the first drug information with the drug traceability code into the first traceability information;
[0010] Second collection: collect the user's order information, obtain the name and batch number of the drug purchased by the user, and record it as the second drug information;
[0011] Building a database: Building a database, wherein the first traceability information is stored in the database;
[0012] Data tracing: including first calculation, first judgment and first feedback;
[0013] First calculation: calculating the matching degree between the second drug information and the first drug information;
[0014] First judgment: judging whether the matching degree is greater than a preset matching degree threshold, if so, executing the first feedback step; if not, executing the data adding step;
[0015] First feedback: Feedback the first traceability information stored in the database to the user;
[0016] Data addition: Add the drug name to the database and feedback to the operation and maintenance personnel.
[0017] By adopting the above technical solution, the present application stores the relevant information of the drug in the database in advance. When the user loses the packaging box, the shelf life of the drug can be obtained through the name of the drug on the medicine plate and the batch number of the drug, so as to achieve the purpose of safe medication. By collecting key information such as the name, batch number, shelf life and usage and dosage of the drug, the integrity of the basic data of the drug is ensured, and the user's order information, especially the name and batch number of the drug, can be accurately associated with the detailed information of the drug purchased by the user. By presetting the matching degree threshold, it is possible to accurately judge whether the drug purchased by the user matches the drug information stored in the database, which helps to prevent the misuse or confusion of the drug. When the matching degree does not meet the preset threshold, the system will add the new drug name to the database and feedback to the operation and maintenance personnel, which helps to continuously improve the information of the database and improve the accuracy of the system. When the drug purchased by the user matches the drug information stored in the database, the first traceability information can be fed back to the user in time, so that the user can understand the shelf life and usage and dosage of the drug, so as to achieve the purpose of safe medication.
[0018] Optionally, after executing the step of building a database and before executing the step of tracing back the data, the method further includes:
[0019] Extract keywords: extract key information of the order information;
[0020] First encryption: using an asymmetric encryption algorithm to encrypt the key information to obtain first data;
[0021] Data expansion: adding the first data to the first traceability information to obtain new first traceability information.
[0022] By adopting the above technical solution and using an asymmetric encryption algorithm to encrypt the key information of the order information, the security of the information can be significantly improved. The asymmetric encryption algorithm has the characteristics of convenient key management and high security, and can effectively prevent the information from being stolen or tampered with during transmission and storage. This application extracts the key information of the order information (such as drug name, batch number, etc.) so that the subsequent encrypted and expanded data is accurate and useful, which helps to reduce unnecessary data processing and improve the overall efficiency of the system. The encrypted key information (first data) is added to the first traceability information to obtain new first traceability information, so that the new first traceability information can still maintain its original appearance to confuse those who want to obtain user information later.
[0023] Optionally, the database also stores the number of times the current drug is in and out of the drugstore. After executing the first judgment step and before executing the first feedback step, the step further includes:
[0024] Information verification: verify whether the current user is the purchaser. If yes, decrypt the first data and execute the first feedback step; if no, execute the data desensitization step;
[0025] Data desensitization: including data replacement and second feedback;
[0026] Data replacement: replace the order information in the first traceability information with the number of in-and-out warehouse times to obtain the second traceability information;
[0027] Second feedback: Feedback the second traceability information to the user.
[0028] By adopting the above technical solution, by verifying whether the current user is the purchaser, the system can ensure that only legal or authorized users can access sensitive traceability information, further enhancing the security of information and preventing information leakage to unauthorized users. For non-purchaser users, through subsequent data desensitization processing, sensitive order information is replaced with relatively insensitive in-and-out times, thereby protecting the privacy of the purchaser. This processing method not only meets the user's demand for information, but also avoids the disclosure of the purchaser's personal information. By replacing the order information with the in-and-out times, when the user transfers the medicine to relatives and friends, their relatives and friends can obtain the information of the medicine and protect the sensitive information of the purchaser. Although desensitized traceability information is provided for non-purchaser users, this information still has a certain reference value. For example, the number of times a drug is in and out of the warehouse can reflect the circulation of the drug. When the drug has multiple in and out records in one or more pharmacies, and there is a certain time interval between each in and out, the authenticity of the drug is in doubt, so that their relatives and friends can also obtain the circulation status of the drug and the authenticity data of the drug. Secondly, the traceability information can help their relatives and friends obtain the shelf life and usage and dosage.
[0029] Optionally, after performing the step of replacing the data and before performing the step of providing the second feedback, the method further includes:
[0030] Coding: using a hash algorithm, converting the first traceability information into a hash value, recorded as the first hash value; and converting the second traceability information into a hash value, recorded as the second hash value;
[0031] Hash value judgment: judge whether the first hash value and the second hash value are the same. If so, re-execute the data replacement step; if not, execute the second feedback step.
[0032] By adopting the above technical solution, two unique and fixed identifiers can be generated by converting the first traceability information and the second traceability information into a hash value using a hash algorithm. This conversion method helps to quickly and accurately verify the consistency of the data. By comparing whether the first hash value is the same as the second hash value, it can be determined whether the second traceability information after data replacement is consistent with the original first traceability information in content. If the hash values are the same, it means that the data replacement has failed and the data replacement step needs to be re-executed; otherwise, it means that the replacement is successful.
[0033] Optionally, after executing the step of data collection and before executing the step of modeling, the method further includes:
[0034] The third collection: based on the user's order information, obtain the category of medicines purchased by the user;
[0035] First category judgment: judge whether the category is unique. If so, execute the modeling step; if not, execute the association step;
[0036] Connection: The first traceability information corresponding to the drugs belonging to the same order information is stored in the same sub-database.
[0037] By adopting the above technical solution, the user behavior data can be further enriched by obtaining the categories of medicines purchased by the user. When a user purchases multiple medicines in one order, the associated medicines can be stored in the same sub-database after establishing associations between the various medicines. After the user information is verified, all the first traceability information of the order is fed back to the user. When the user loses the medicine box of a certain medicine, the shelf life and usage and dosage of the medicine can be obtained through medicines of other categories.
[0038] Optionally, after executing the first judgment step and before executing the data adding step, the method further includes:
[0039] Fourth collection: collect the order information of the current drug and obtain the category of the drug in the order information;
[0040] Second category determination: determine whether the category is unique, if so, execute the step of adding data; if not, execute the step of querying;
[0041] Query: Get the second drug information of the remaining drugs in the order information, and perform the data tracing steps to obtain the first tracing information of the remaining drugs.
[0042] By adopting the above technical solution, when a user purchases multiple categories of medicines, if a certain medicine fails to match, it can be matched through other medicines to obtain the first traceability information of all medicines in the sub-database corresponding to the order, and indirectly obtain the shelf life and usage and dosage of the required medicines.
[0043] Optionally, in the first feedback step, the first traceability information of all drugs in the sub-database is fed back to the user.
[0044] By adopting the above technical solution, users can obtain the traceability information of all drugs in the sub-database, which improves the transparency of information. When a medicine box of a drug in the same order of a user is lost, the first traceability information of all drugs in the entire order can be retrieved based on the first traceability information of the remaining drugs, and then the shelf life and usage and dosage of the required drugs can be obtained, which improves flexibility.
[0045] Optionally, the method further comprises:
[0046] Fifth collection: collecting the historical order information of the current user in the database, obtaining the historical drug purchase quantity and historical drug purchase category, and recording them as the second data;
[0047] Modeling: establishing a Bayesian network model, wherein the nodes of the Bayesian network model are the second data, and the directed edges are the dependency relationships between the second data;
[0048] Reasoning: Input the current user's real-time order information into the Bayesian network model to obtain the purchase probability of the drug in the real-time order, which is recorded as the third data;
[0049] Probability judgment: judging whether the third data is greater than a preset probability threshold, if so, executing the data storage step; if not, executing the early warning step;
[0050] Data storage: store the categories and quantities of drugs in the current order in the database;
[0051] Warning: Warn pharmacy staff that the current user's purchasing behavior is risky.
[0052] By adopting the above technical solution, by collecting the historical order information of the current user, a wealth of historical drug purchase quantity and historical drug purchase category data is obtained. The historical data can reflect the user's purchasing habits and help to conduct more personalized purchasing behavior analysis. The Bayesian network model can capture the complex dependencies between variables and is suitable for analyzing potential influencing factors in user purchasing behavior. The Bayesian network model can infer the user's real-time order information based on the rules learned from historical data and predict the purchase probability. The reasoning step can process the user's order information in real time and quickly give the purchase probability to provide a basis for subsequent decision-making. The acquisition of purchase probability helps to judge the rationality of the user's purchasing behavior and provide a direct basis for data storage or early warning. By setting a preset probability threshold, the sensitivity and accuracy of the system can be flexibly adjusted to adapt to different application scenarios. According to the comparison result between the purchase probability and the threshold, the order information is diverted to the data storage or early warning step, realizing differentiated processing of the purchase behavior. By storing the current order information, the database can be further enriched to provide more data support for future purchase behavior analysis. With the accumulation of data, a more complete user portrait can be constructed to improve the accuracy of personalized services. The early warning step can promptly detect and identify potential risks in user purchasing behavior, providing pharmacy staff with timely intervention opportunities.
[0053] Optionally, after executing the step of probability judgment and before executing the step of early warning, the method further includes:
[0054] Calculate the correlation: Calculate the correlation between the drugs in the current order and the drugs in the historical orders;
[0055] Correlation judgment: judge whether the correlation is greater than the preset correlation threshold. If so, execute the data storage step; if not, execute the early warning step.
[0056] By adopting the above technical solution, by calculating the correlation between the drugs in the current order and the drugs in the historical orders, the user's purchasing behavior pattern can be deeply analyzed to understand whether the user tends to buy certain specific categories of drugs or whether there is an alternative purchase behavior for a certain drug. After the probability judgment, the processing flow can be further refined by correlation judgment. If the correlation is higher than the preset threshold, it means that the current order is relatively consistent with the user's purchase history and there is no abnormal behavior, so the data storage step is executed; if the correlation is lower than the preset threshold, it indicates that the user's purchase behavior is abnormal and the early warning step needs to be executed.
[0057] In a second aspect, the present invention provides a medical data tracing system, which adopts the following technical solution:
[0058] A medical data tracing system, comprising:
[0059] The data acquisition module includes a first acquisition unit and a second acquisition unit;
[0060] A first collection unit is used to collect the name, batch number, shelf life, usage and dosage of the drug as the first drug information of the drug, and integrate the first drug information with the drug traceability code into the first traceability information;
[0061] The second collecting unit is used to collect the user's order information, obtain the name and batch number of the medicine purchased by the user, and record it as the second medicine information;
[0062] A database building module, which is in communication with the data acquisition module and is used to build a database, wherein the first traceability information is stored in the database;
[0063] The data tracing module is connected to the data collection module and the database building module in communication, and includes a first calculation unit, a first judgment unit and a first feedback unit;
[0064] A first calculation unit, used to calculate the matching degree between the second drug information and the first drug information;
[0065] A first judging unit, configured to judge whether the matching degree is greater than a preset matching degree threshold;
[0066] A first feedback unit, used to feed back the first tracing information stored in the database to the user;
[0067] The data adding module is connected to the data collection module and the database building module to add the drug names to the database and provide feedback to the operation and maintenance personnel.
[0068] By adopting the above technical solution, this application comprehensively collects drug and user order information through the data collection module, and establishes a database to store traceability information; the data traceability module uses the first calculation unit and the first judgment unit to achieve accurate matching and traceability of drug information, and uses the first feedback unit to feedback the first traceability information to the user; the data addition module supports the update and maintenance of the database, enhancing the flexibility and adaptability of the system. The system improves traceability efficiency and user experience while ensuring data privacy and security.
[0069] In summary, the present application includes at least one of the following beneficial technical effects:
[0070] 1. This application stores the relevant information of the drug in the database in advance. When the user loses the packaging box, the shelf life of the drug can be obtained through the name of the drug on the medicine plate and the batch number of the drug to achieve the purpose of safe medication. By collecting key information such as the name, batch number, shelf life, usage and dosage of the drug, the integrity of the basic data of the drug is ensured. By collecting the user's order information, especially the name and batch number of the drug, the drug purchased by the user can be accurately associated with the detailed information of the drug. By presetting the matching degree threshold, it can accurately determine whether the drug purchased by the user matches the drug information stored in the database, which helps to prevent the misuse or confusion of the drug. When the matching degree does not meet the preset threshold, the system will add the new drug name to the database and feedback to the operation and maintenance personnel, which helps to continuously improve the information in the database and improve the accuracy of the system. When the drug purchased by the user matches the drug information stored in the database, the first traceability information can be fed back to the user in time, so that the user can understand the shelf life and usage and dosage of the drug to achieve the purpose of safe medication.
[0071] 2. Using an asymmetric encryption algorithm to encrypt the key information of the order information can significantly improve the security of the information. The asymmetric encryption algorithm has the characteristics of convenient key management and high security, and can effectively prevent the information from being stolen or tampered with during transmission and storage. This application extracts the key information of the order information (such as drug name, batch number, etc.) so that the subsequent encrypted and expanded data is accurate and useful, which helps to reduce unnecessary data processing and improve the overall efficiency of the system. The encrypted key information (first data) is added to the first traceability information to obtain new first traceability information, so that the new first traceability information can still maintain its original appearance to confuse those who want to obtain user information later.
[0072] 3. By obtaining the categories of medicines purchased by users, user behavior data can be further enriched. When a user purchases multiple medicines in one order, the associated medicines can be associated with each other and stored in the same sub-database. After the user information is verified, all the first traceability information of the order will be fed back to the user. When the user loses the medicine box of a certain medicine, the shelf life and usage and dosage of the medicine can be obtained through other categories of medicines. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a flow chart of Example 1 of the present application;
[0074] Figure 2 is a flow chart of Example 2 of the present application;
[0075] Figure 3 This is a flow chart from S61 third collection to S63 linking in Example 3 of the present application;
[0076] Figure 4 This is a flowchart from S71 fourth collection to S73 query of Example 3 of the present application;
[0077] Figure 5 This is a flow chart of Example 4 of the present application. DETAILED DESCRIPTION
[0078] The following combination Figures 1 to 5 This application is described in further detail.
[0079] Example 1: This example discloses a method for tracing medical data. Figure 1 The method includes: S1 data collection, S2 database building, S3 data tracing and S4 data addition. First, data collection is performed, drug information and drug traceability codes are integrated into first traceability information, and user order information is obtained. Then, a database is established, and then the drug information in the order is matched with the first drug information to obtain the shelf life and usage and dosage of the drug. This embodiment includes the following steps:
[0080] S1 data collection, including S11 first collection and S12 second collection.
[0081] S11 first collection: when a pharmacy sells drugs to users or users use drugs, the name, batch number, shelf life, usage and dosage of the drugs purchased by users are collected, and the name, batch number, shelf life, usage and dosage of the purchased drugs are used as the first drug information of the drugs. The first drug information is integrated with the drug traceability code (the drug traceability code is a unique code used to identify a specific drug or drug batch) into the first traceability information.
[0082] The first drug information is as follows:
[0083] Drug name: including the generic name or trade name of the drug, the drug name is the basic information for identifying the drug. When the drug name stored in the database corresponds to multiple manufacturers, it is necessary to further match the manufacturer's name.
[0084] Drug batch number: Each batch of drugs produced has a unique batch number to distinguish different batches. The drug batch number will be engraved on the edge of the medicine plate. When the user loses the medicine box or cannot obtain the medicine box, the drug batch number engraved on the medicine plate can be used as an index to obtain the shelf life of the corresponding drug.
[0085] Shelf life: records the expiration date of the drug so that users can obtain the shelf life of the drug through verification.
[0086] Dosage and Usage: Record the recommended dosage and usage of the drug in detail to guide users to use the drug correctly.
[0087] Users can easily query detailed information about drugs by scanning the drug traceability code, including manufacturer, production date, expiration date, etc., and quickly identify counterfeit and inferior drugs through data comparison. The drug traceability code can effectively prevent the illegal secondary sale of medical insurance drugs.
[0088] S12 is the second collection. When a user purchases medicines, the user's order information is collected. In the order, the name of the medicine purchased by the user and the batch number of the medicine are extracted and recorded as the second medicine information.
[0089] S2: Building a database, in which the first tracing information is stored.
[0090] S3 data tracing includes S31 first calculation, S32 first judgment and S33 first feedback.
[0091] S31 is a first calculation, in which, according to the second drug information (such as drug name and batch number) provided by the user, the database is searched for the first drug information that matches it, and the matching degree is calculated.
[0092] When the drug names stored in the database correspond to multiple manufacturers, it is necessary to further match the names of the manufacturers, that is, the drug names of the first drug information and the second drug information are completely matched, and then the matching degree between the manufacturer in the first drug information and the manufacturer in the second drug information is calculated.
[0093] S32 is the first judgment, judging whether the matching degree is greater than the preset matching degree threshold. If so, it means that the medicine purchased by the user is consistent with the medicine information recorded in the database, which is legal and safe, and then S33 is executed for the first feedback; if not, it means that the corresponding first traceability information is not matched in the database, and then S4 is executed for data addition.
[0094] S33 is the first feedback, in which the first traceability information matching the second drug in the database is fed back to the user, so that the user can obtain information such as the drug traceability code, shelf life, usage and dosage.
[0095] S4 data addition, adds the drug name provided by the user to the database as a new drug information record. Notifies the operation and maintenance personnel to check and verify the authenticity of the drug information and whether further investigation is needed on the source and legality of the drug.
[0096] For example, a user buys a box of "XX capsules" at a pharmacy. When the user recovers, there is some medicine left, so the user puts the medicine in the medicine box (the medicine box is not stored together at this time). When the user gets sick again, the medicine is found in the medicine box. However, since the medicine box is lost, the user cannot know the shelf life and usage and dosage of the medicine, resulting in the user not knowing whether the medicine is within the shelf life. The scheme for obtaining the shelf life and usage and dosage of the medicine through this embodiment is as follows:
[0097] 1. Information extraction: First, the drug name "XX Capsule" and drug batch number "20230101" are extracted from the user's order information. These information constitute the second drug information provided by the user.
[0098] 2. Database search: searching the previously established database for the first drug information that matches the second drug information.
[0099] The first drug information in the database contains detailed data of multiple drugs, including drug name (including manufacturer), batch number, shelf life, usage and dosage, and drug traceability code.
[0100] 3. Matching calculation: after searching for drug records with the same name and manufacturer as "XX Capsules", the batch numbers of these records will be further compared to see if they match the "20230101" provided by the user. If a completely matching record is found, it will be considered a highly matched result and the output matching degree is 1; if no matching record is found at all, the matching degree is 0.
[0101] If the batch numbers do not match completely but are similar (for example, only the last few digits differ, which may be due to minor differences in different production lines or batches), the similarity between the strings is calculated using the Levenshtein distance. For example, if the database stores "20230104", the Levenshtein distance between "20230101" and "20230104" is calculated as follows:
[0102] 3-1. Determine the length of the string. The length of the string "20230101" is 8, and the length of the string "20230104" is also 8.
[0103] 3-2. Build a dynamic programming table and create an 8x8 two-dimensional table dp, where dp [i][j] Represents the minimum edit distance required to convert the first i characters of the string "20230101" into the first j characters of the string "20230104".
[0104] 3-3. Initialize the boundary condition. When i=0, it means that the empty string is converted to the first j characters of "20230104". The number of operations required is j (all inserted). Therefore, dp [0][j] = j.
[0105] When j = 0, it means that the first i characters of "20230101" are converted to an empty string, and the number of operations required is i (delete all), so dp [i][0] = i.
[0106] 3-4. Fill in the dynamic programming table for dp [i][j]In the case of (i, j > 0), the following three operations need to be considered:
[0107] If the i-th character of "20230101" is the same as the j-th character of "20230104", no operation is required, i.e., dp [i][j] =dp [i-1][j-1] .
[0108] If they are different, you can choose to replace, insert, or delete, taking the one with the smallest number of operations:
[0109] Replacement: dp [i][j] =dp [i-1][j-1] + 1.
[0110] Insert: dp [i][j] =dp [i][j-1] + 1.
[0111] Delete: dp [i][j] =dp [i-1][j] + 1.
[0112] 3-5. Calculate the final result and fill in the entire dp table. [8][8] This is the minimum edit distance for converting "20230101" to "20230104".
[0113] By step-by-step calculation, we can get dp [8][8] The value is 3, that is, converting the string "20230101" to "20230104" requires 3 operations: replacing the last digit "1" with "4".
[0114] Therefore, the edit distance between "20230101" and "20230104" is 3.
[0115] 3-6. Matching degree determination: compare the calculated matching degree score with the preset matching degree threshold. If the matching degree score is higher than or equal to the threshold, it is considered that the medicine purchased by the user matches the record in the database and feedback can be given; if the matching degree score is lower than the threshold, the S4 data addition step is executed, and the operation and maintenance personnel verify whether there is a data problem or supplement the information.
[0116] If the preset edit distance threshold is 5, the edit distance 3<5, which can be considered to meet the preset matching threshold, and the first traceability information corresponding to the drug batch number 20230104 is fed back to the user for reference.
[0117] 4. Based on the results of the matching calculation, the user is shown detailed information about the drug, including shelf life, usage and dosage, and drug traceability code, etc. If the drug purchased by the user completely matches the record in the database, an electronic traceability report containing this information will be generated for the user to download or print.
[0118] This embodiment collects detailed information of the drug and integrates it with the traceability code to form the first traceability information, and obtains the user's order information to form the second drug information; then establishes a database to store the first traceability information; then calculates the matching degree, judges and feeds back the drug information; if the matching degree is insufficient, executes S4 data addition, adds the new drug information to the database and notifies the operation and maintenance personnel to verify or supplement the relevant information (the first traceability information), so as to ensure the legality, safety and traceability of the drug.
[0119] Example 2: Reference Figure 2 The difference between this embodiment and embodiment 1 is that the database also stores the number of times the current drug is in and out of the drugstore. After executing S2 to build the database and before executing S3 to trace the data, it also includes:
[0120] S21 extracts keywords, extracts key information of the order information, and the key information includes: information of the purchaser, information of purchased medicines, purchase location, purchase quantity, purchase date, etc.
[0121] S22 first encryption, using an asymmetric encryption algorithm to encrypt the key information to obtain first data.
[0122] Asymmetric encryption algorithms use a pair of keys (public key and private key) for encryption and decryption. The public key is used to encrypt data, while the private key is used to decrypt data. Every authorized user can obtain the private key. In this way, even if the data is stolen, it cannot be decrypted by unauthorized personnel.
[0123] S23 data expansion, the encrypted key information (first data) will be added to the first traceability information to form new first traceability information. The first traceability information originally contained detailed information about the drug and data related to the traceability code, and now the user's order information (in encrypted form) is added. When it is necessary to trace the flow of the drug, the purchaser information related to the drug can be obtained at the same time (after decryption).
[0124] Then, the first calculation is performed in S31, and according to the second drug information (such as drug name and batch number) provided by the user, the first drug information matching the second drug information is searched in the database, and the matching degree is calculated.
[0125] S32 is the first judgment, judging whether the matching degree is greater than a preset matching degree threshold. If so, it means that the medicine purchased by the user is consistent with the medicine information recorded in the database, which is legal and safe, and then S51 information verification is executed; if not, it means that the corresponding first traceability information is not matched in the database, and then S4 data addition is executed.
[0126] S51 information verification, by comparing the verification information provided by the user (such as ID card, face recognition, etc.) with the information stored in the database, verify whether the current user is the purchaser. If so, decrypt the first data and execute S33 first feedback; if not, execute S52 data desensitization.
[0127] S52 data desensitization, including S521 data replacement, S522 encoding, S523 hash value judgment and S524 second feedback.
[0128] S521 data replacement, replacing the order information in the first traceability information with the number of in-and-out warehouse times to obtain the second traceability information.
[0129] S522 encoding uses a hash algorithm to convert the first traceability information into a hash value, recorded as the first hash value; and converts the second traceability information into a hash value, recorded as the second hash value. The hash algorithm is a one-way function that can convert data of any length into a hash value of a fixed length, and it is almost impossible for different data to generate the same hash value.
[0130] S523 hash value judgment, judge whether the first hash value and the second hash value are the same. If so, it means that there may be a problem in the data replacement process (for example, the replaced information can still uniquely identify the original data), and re-execute S521 data replacement; if not, execute S524 second feedback.
[0131] S524: second feedback: feeding back the second tracing information to the user.
[0132] This embodiment can not only ensure the traceability and security of drug information, but also provide necessary information to the current inquiring user or third party under the premise of protecting user privacy.
[0133] Example 3: Reference Figure 3 The difference between this embodiment and embodiment 1 is that after executing S1 data collection and before executing S2 modeling, it also includes:
[0134] S61 The third collection is to obtain the categories of medicines purchased by the user based on the user's order information.
[0135] S62 first category judgment, through S61 third collection to obtain the category of the user to buy medicine, determine whether the category is unique, if so, execute S2 modeling; if not, execute S63 to establish a connection.
[0136] S63 establishes a connection, and stores the first traceability information corresponding to the drugs belonging to the same order information in the same sub-database.
[0137] Reference Figure 4 In other embodiments, after executing S32 first judgment and before executing S4 data adding, it also includes:
[0138] S71 fourth collection, collecting the order information of the current drug and obtaining the category of the drug in the order information.
[0139] S72 second category judgment, judge whether the category is unique, if so, execute S4 data addition; if not, execute S73 query.
[0140] S73 queries to obtain the second drug information of the remaining drugs in the order information, and executes S31 first calculation to S33 first feedback in sequence to obtain the first traceability information of the remaining drugs.
[0141] In S33 first feedback, the first traceability information of all drugs in the sub-database is fed back to the user.
[0142] This embodiment adds the following scheme after executing data collection and before modeling: obtain the drug category based on the order information, then determine whether the category is unique to decide whether to directly model, and then integrate the drug traceability information under the same order into the same sub-database. In addition, between the first judgment step and the data addition step, the following steps are inserted: re-collect the drug category information in the order, then perform a category uniqueness judgment, and then perform a query operation on the non-unique category to obtain the traceability information of the remaining drugs. Finally, in the first feedback, the first traceability information of all drugs in the current order stored in the sub-database is fed back to the user. When the medicine box of a drug in a certain order of the user is lost, the first traceability information of the drug can be obtained through other drugs in the same order, and then the shelf life and usage and dosage of the drug can be obtained.
[0143] Example 4: Reference Figure 5 The difference between this embodiment and embodiment 1 is that the method further includes:
[0144] S81 fifth collection, collecting the historical order information of the current user in the database, obtaining the historical drug purchase quantity and historical drug purchase category, and recording them as the second data.
[0145] S82: Modeling, establishing a Bayesian network model, wherein the nodes of the Bayesian network model are the second data, and the directed edges are the dependency relationships between the second data.
[0146] S83 reasoning, inputs the real-time order information of the current user into the Bayesian network model to obtain the purchase probability of the drugs in the real-time order, which is recorded as the third data.
[0147] The Bayesian network model is a graphical probability model that uses nodes to represent random variables and directed edges to represent the dependencies between these variables. In the Bayesian network model, the second data (i.e., historical drug purchase quantity and historical drug purchase category) will be used as nodes, and directed edges represent the potential dependencies between these drug purchase behaviors.
[0148] S84 probability judgment, judging whether the third data is greater than a preset probability threshold, if so, it means that the current order is relatively consistent with the user's historical behavior of purchasing medicines, and executing S87 data storage; if not, executing S85 to calculate the correlation.
[0149] S85 calculates the correlation degree, that is, calculates the correlation degree between the drugs in the current order and the drugs in the historical orders.
[0150] S86 correlation determination, determining whether the correlation is greater than a preset correlation threshold, if so, executing S87 data storage; if not, executing S88 warning.
[0151] S87 data storage, stores the categories and quantities of drugs in the current order in the database.
[0152] S88 warning: if the current order does not meet the preset probability threshold or the correlation threshold, the pharmacy staff will be warned that the current user's purchasing behavior is risky.
[0153] For example, A frequently bought medicines at a pharmacy in the past year. By analyzing his historical orders, we found that he mainly bought the following types of medicines:
[0154] Antipyretic and analgesic: such as ibuprofen, acetaminophen, etc., mainly used to relieve symptoms such as headache and fever.
[0155] Gastrointestinal type: such as omeprazole, enteritis Ning, etc., mainly used to treat gastrointestinal diseases such as stomach pain, diarrhea, etc.
[0156] Anti-allergic drugs: such as cetirizine, loratadine, etc., are mainly used to relieve allergic symptoms such as skin itching, sneezing, etc.
[0157] A submitted a new order. The drugs in the new order are as follows:
[0158] Cold medicine (containing antipyretic and analgesic ingredients) and stomach medicine (used to relieve stomach pain).
[0159] Category correlation: The cold medicine in the new order belongs to the antipyretic and analgesic category, which is the same category as the ibuprofen and acetaminophen that A purchased in the past, so the category correlation is relatively high. The stomach medicine belongs to the gastrointestinal category, which is the same category as the omeprazole and enteritis medicine that A purchased in the past, so the category correlation is also relatively high.
[0160] Efficacy correlation: The main effect of cold medicine is antipyretic and analgesic, which is consistent with the efficacy of antipyretic and analgesic drugs that A bought in the past, so the efficacy correlation is relatively high. The main effect of stomach medicine is to relieve stomach pain, which is also consistent with the efficacy of gastrointestinal drugs that A bought in the past, and the efficacy correlation is also relatively high.
[0161] Usage scenario correlation: A has purchased antipyretic and analgesic drugs for headache, fever and other symptoms many times in the past year. Now he is buying cold medicine because of a cold (which may be accompanied by headache, fever and other symptoms). Therefore, the usage scenario correlation is relatively high. A has also purchased gastrointestinal drugs for stomachache and other symptoms many times. Now he is buying stomach medicine because of stomachache. The usage scenario correlation is also relatively high.
[0162] This embodiment can identify potential risks and take corresponding measures through analysis of user historical order information and real-time order information.
[0163] Embodiment 5: This embodiment discloses a medical data tracing system, including:
[0164] The data acquisition module includes a first acquisition unit and a second acquisition unit.
[0165] The first collection unit is used to collect the name, batch number, shelf life, usage and dosage of the drug as the first drug information of the drug, and integrate the first drug information with the drug traceability code into the first traceability information. The drug traceability code is a unique identifier used to uniquely identify a drug batch, which is convenient for locating in subsequent data traceability.
[0166] The second collection unit is used to collect the user's order information, obtain the name of the drug purchased by the user and the drug batch number, which is recorded as the second drug information.
[0167] The database building module is connected to the data acquisition module for establishing a database, wherein the first tracing information is stored in the database.
[0168] The data tracing module is connected to the data collection module and the database building module in communication, and includes a first calculation unit, a first judgment unit and a first feedback unit.
[0169] The first calculation unit is used to calculate the matching degree between the second drug information and the first drug information. The matching degree can be calculated based on multiple dimensions, such as drug name (and manufacturer), drug batch number, etc. By calculating the matching degree, the system can determine whether the drug purchased by the user is consistent with the drug information in the database.
[0170] The first judging unit is used to judge whether the matching degree is greater than a preset matching degree threshold.
[0171] The first feedback unit is used to feed back the first traceability information stored in the database to the user. When the user queries the drug information, the first feedback unit retrieves the first traceability information matching the second drug information from the database and displays it to the user, so that the user can learn the detailed information of the drug he purchased, including the production date, shelf life, usage and dosage, etc.
[0172] The data adding module is connected to the data acquisition module and the database building module to add the drug name to the database and provide feedback to the operation and maintenance personnel. When a new drug is launched or the information of an existing drug changes, the operation and maintenance personnel can add the new drug name to the database through the data adding module to ensure the integrity and accuracy of the database.
[0173] This embodiment includes a data acquisition module (including a first acquisition unit and a second acquisition unit), a database building module, a data tracing module (including a first calculation unit, a first judgment unit and a first feedback unit) and a data adding module. The first acquisition unit integrates drug information and traceability codes into the first traceability information; the second acquisition unit obtains drug information in the user's order. The database building module stores the first traceability information, and the data tracing module calculates the matching degree between the user's drug information and the database information, judges and feeds back the matching first traceability information to the user. The data adding module is used to update the drug name to the database to ensure that the information is complete and accurate.
[0174] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A medical data tracing method, characterized in that: include: Data collection: including the first collection and the second collection; First collection: collecting the name, batch number, shelf life, usage and dosage of the drug as the first drug information of the drug, and integrating the first drug information with the drug traceability code into the first traceability information; Second collection: collect the user's order information, obtain the name and batch number of the drug purchased by the user, and record it as the second drug information; Building a database: Building a database, wherein the first traceability information is stored in the database; Data tracing: including first calculation, first judgment and first feedback; First calculation: calculating the matching degree between the second drug information and the first drug information; First judgment: judging whether the matching degree is greater than a preset matching degree threshold, and if so, executing the first feedback step; If not, then execute the step of adding data; First feedback: Feedback the first traceability information stored in the database to the user; Data addition: Add the drug name to the database and provide feedback to the operation and maintenance personnel; After executing the step of data collection and before executing the step of database construction, the following steps are also included: The third collection: based on the user's order information, obtain the category of medicines purchased by the user; First category judgment: judge whether the category is unique. If so, execute the database building step; if not, execute the association building step; Linking: The first traceability information corresponding to the drugs belonging to the same order information is stored in the same sub-database; After executing the first judgment step and before executing the data adding step, the method further includes: Fourth collection: collect the order information of the current drug and obtain the category of the drug in the order information; Second category determination: determine whether the category is unique, if so, execute the step of adding data; if not, execute the step of querying; Query: obtain the second drug information of the remaining drugs in the order information, and perform the data tracing step to obtain the first tracing information of the remaining drugs; In the first feedback step, the first traceability information of all drugs in the sub-database is fed back to the user.
2. The medical data tracing method according to claim 1, characterized in that: After executing the step of building the database and before executing the step of data tracing, it also includes: Extract keywords: extract key information of the order information; First encryption: using an asymmetric encryption algorithm to encrypt the key information to obtain first data; Data expansion: adding the first data to the first traceability information to obtain new first traceability information.
3. The medical data tracing method according to claim 2, characterized in that: The database also stores the number of times the current drug is in and out of the drugstore. After executing the first judgment step and before executing the first feedback step, the method further includes: Information verification: verify whether the current user is the purchaser. If yes, decrypt the first data and execute the first feedback step; if no, execute the data desensitization step; Data desensitization: including data replacement and second feedback; Data replacement: replace the order information in the first traceability information with the number of in-and-out warehouse times to obtain the second traceability information; Second feedback: Feedback the second traceability information to the user.
4. The medical data tracing method according to claim 3, characterized in that: After performing the step of replacing the data and before performing the step of providing the second feedback, the method further includes: Coding: using a hash algorithm, converting the first traceability information into a hash value, recorded as the first hash value; converting the second traceability information into a hash value, recorded as the second hash value; Hash value judgment: judge whether the first hash value and the second hash value are the same. If so, re-execute the data replacement step; if not, execute the second feedback step.
5. The medical data tracing method according to any one of claims 1 to 4, characterized in that: The method further comprises: Fifth collection: collecting the historical order information of the current user in the database, obtaining the historical drug purchase quantity and historical drug purchase category, and recording them as the second data; Modeling: establishing a Bayesian network model, wherein the nodes of the Bayesian network model are the second data, and the directed edges are the dependency relationships between the second data; Reasoning: Input the current user's real-time order information into the Bayesian network model to obtain the purchase probability of the drug in the real-time order, which is recorded as the third data; Probability judgment: judging whether the third data is greater than a preset probability threshold, if so, executing the data storage step; if not, executing the early warning step; Data storage: store the categories and quantities of drugs in the current order in the database; Warning: Warn pharmacy staff that the current user's purchasing behavior is risky.
6. The medical data tracing method according to claim 5, characterized in that: After executing the step of probability judgment and before executing the step of early warning, the method further includes: Calculate the correlation: Calculate the correlation between the drugs in the current order and the drugs in the historical orders; Correlation judgment: judge whether the correlation is greater than the preset correlation threshold. If so, execute the data storage step; if not, execute the early warning step.
7. A pharmaceutical data tracing system, the system being applicable to the method according to any one of claims 1 to 6, characterized in that: include: The data acquisition module includes a first acquisition unit and a second acquisition unit; A first collection unit is used to collect the name, batch number, shelf life, usage and dosage of the drug as the first drug information of the drug, and integrate the first drug information with the drug traceability code into the first traceability information; The second collecting unit is used to collect the user's order information, obtain the name and batch number of the medicine purchased by the user, and record it as the second medicine information; A database building module, which is in communication with the data acquisition module and is used to build a database, wherein the first traceability information is stored in the database; The data tracing module is connected to the data collection module and the database building module in communication, and includes a first calculation unit, a first judgment unit and a first feedback unit; A first calculation unit, used to calculate the matching degree between the second drug information and the first drug information; A first judging unit, configured to judge whether the matching degree is greater than a preset matching degree threshold; A first feedback unit, used to feed back the first tracing information stored in the database to the user; The data adding module is connected to the data collection module and the database building module to add the drug names to the database and provide feedback to the operation and maintenance personnel.
Citation Information
Patent Citations
Method for querying real information of drug
CN101710329A
Medicine credible traceability method based on public key searchable encryption
CN116777476A