Disclosure of Invention
In view of the foregoing, it is desirable to provide a medical drug matching method, apparatus, electronic device and storage medium, which can match drug information to achieve standardized management.
A first aspect of the present invention provides a medical drug matching method, including:
receiving input medicine information of a target medicine;
selecting a plurality of reference items from the medicine information, wherein the plurality of reference items are used for representing the medicine identification of the target medicine or the medicine specification of the target medicine;
determining the weight value of each reference item according to the set importance degree value;
for each reference item, matching the reference item with a standard item in a drug reference library on a block chain, and calculating a comparison value of the reference item;
calculating the matching degree of the target medicine according to the comparison value and the weight value;
judging whether the matching degree is greater than a first matching threshold corresponding to the target medicine;
if the matching degree is larger than a first matching threshold value, determining a plurality of target benchmark items from the plurality of benchmark items;
correcting the matching relation of the target medicine according to the comparison values of the target reference items to obtain a correction result;
and if the correction result shows that the target medicine is matched, establishing a mapping relation between the medicine identification of the target medicine and the standard identification of the target medicine stored in the medicine reference library.
In a possible implementation manner, the matching the reference item with a standard item in a drug reference library on a blockchain, and calculating a comparison value of the reference item includes:
matching the reference items with standard items in a drug reference library one by one according to characters;
counting the number of characters of the matched characters;
determining a valid character length of the reference item;
and calculating a comparison value of the reference item according to the number of the characters and the length of the effective characters.
In a possible implementation manner, after the calculating the matching degree of the target drug according to the comparison value and the weight value and before the determining whether the matching degree is greater than a first matching threshold corresponding to the target drug, the medical drug matching method further includes:
determining a drug type of the target drug;
acquiring the medicine grade of the target medicine according to the medicine type;
acquiring matching precision corresponding to the medicine grade;
and determining the matching precision as a first matching threshold corresponding to the target medicine.
In one possible implementation, determining a plurality of target reference items from the plurality of reference items comprises:
acquiring attention degree values of the user to the plurality of reference items through a web crawler technology;
determining the preset number of required reference items according to the medicine grade of the target medicine;
and determining the preset number of reference items ranked at the top as a plurality of target reference items from the plurality of reference items according to the sequence of the attention degree values from high to low.
In one possible implementation, the medical drug matching method further includes:
if the matching degree is smaller than a first matching threshold and the medicine grade of the target medicine is not the lowest medicine grade, judging whether the matching degree is smaller than a second matching threshold corresponding to the lowest medicine grade;
if the matching degree is smaller than a second matching threshold corresponding to the lowest medicine grade, determining that the target medicine is an unqualified medicine;
and sending the medicine information of the target medicine to a monitoring device so that the monitoring device can check the validity of the target medicine.
In one possible implementation, the medical drug matching method further includes:
if the matching degree is larger than a second matching threshold corresponding to the lowest medicine grade, determining that the target medicine is a qualified new medicine;
and updating the medicine information of the target medicine to the medicine benchmark library.
In a possible implementation manner, the modifying the matching relationship of the target drug according to the comparison values of the plurality of target reference items, and obtaining a modified result includes:
acquiring a comparison value of each target reference item;
judging whether the comparison value of each target reference item is a standard value or not;
if the comparison value of each target reference item is a standard value, determining that the correction result of the target drug is a match; or
And if the target reference item which is not the standard value exists in the comparison values of the target reference items, determining that the correction result of the target medicine is not matched.
A second aspect of the present invention provides a medical drug matching apparatus, comprising:
the transmission module is used for receiving the input medicine information of the target medicine;
the selection module is used for selecting a plurality of reference items from the medicine information, wherein the reference items are used for representing the medicine identification of the target medicine or the medicine specification of the target medicine;
the determining module is used for determining the weight value of each reference item according to the set importance degree value;
the calculation module is used for matching the reference item with a standard item in a drug reference library on a block chain and calculating a comparison value of the reference item;
the calculating module is further configured to calculate a matching degree of the target drug according to the comparison value and the weight value;
the judging module is used for judging whether the matching degree is greater than a first matching threshold corresponding to the target medicine;
the determining module is further configured to determine a plurality of target reference items from the plurality of reference items if the matching degree is greater than a first matching threshold;
the correction module is used for correcting the matching relation of the target medicines according to the comparison values of the target reference items to obtain a correction result;
and the establishing module is used for establishing a mapping relation between the medicine identification of the target medicine and the standard identification of the target medicine stored in the medicine benchmark library if the correction result shows that the target medicine is matched.
A third aspect of the invention provides an electronic device comprising a processor and a memory, the processor being adapted to carry out the medical drug matching method when executing a computer program stored in the memory.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the medical drug matching method.
According to the invention, the primary matching judgment is carried out on the target medicine according to the matching degree of the target medicine, the precise matching judgment is carried out on the target medicine by combining the comparison value of the target reference item, finally, an effective mapping relation is established, and subsequently, when newly-added medicine information is received, the medicine and the medicine reference library can be matched through the established mapping relation, so that the information and the code of the medicine in the medicine reference library are quickly matched, the medicine matching efficiency and the medicine matching precision can be obviously improved, and meanwhile, the standardized management of the medicine is also realized.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The electronic device is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like. The electronic device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers. The user device includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), or the like.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for matching medical drugs according to a preferred embodiment of the present invention. The order of the steps in the flowchart may be changed, and some steps may be omitted.
And S11, receiving the input medicine information of the target medicine.
The drug information may include, but is not limited to, chemical name, trade name, common name, drug specification, composition, packaging specification, national drug standard, manufacturer, etc.
And S12, selecting a plurality of reference items from the medicine information, wherein the reference items are used for representing the medicine identification of the target medicine or the medicine specification of the target medicine.
Wherein, the medicine mark is chemical name, trade name, common name, national medicine standard number, and the medicine specification is the content of each component of the medicine.
And S13, determining the weight value of each reference item according to the set importance degree value.
For example, if the importance degree values of the 4 reference items b1, b2, b3 and b4 are respectively set to 5, 3 and 2, the weight value β 1 of the reference item b1 is b1/(b1+ b2+ b3+ b4) is 5/(5+5+3+2) is 0.3333, and so on, the weight values of the other reference items may be calculated.
And S14, aiming at each reference item, matching the reference item with a standard item in a medicine reference library on the blockchain, and calculating a comparison value of the reference item.
Wherein, in order to ensure the safety of the data, the drug reference library can be stored on the block chain.
Specifically, the matching the reference item with a standard item in a drug reference library on a block chain, and calculating a comparison value of the reference item includes:
matching the reference items with standard items in a drug reference library one by one according to characters;
counting the number of characters of the matched characters;
determining a valid character length of the reference item;
and calculating a comparison value of the reference item according to the number of the characters and the length of the effective characters.
In this alternative embodiment, the matching process does not distinguish between redundant characters such as case, intelligent recognition of wrongly written words, filtering of spaces, etc. The method clearly removes interference and determines the effective character length of the reference item, such as removing wrongly written characters, filtering space characters and the like. Assuming that the number of characters on the match is N and the effective character length is N, the alignment value c is N/N × 100.
And S15, calculating the matching degree of the target medicine according to the comparison value and the weight value.
For example, assume that the alignment values are: c1, c2, c3 and c4, the weight values are β 1, β 2, β 3 and β 4 respectively, and the matching degree a ═ c1 ×. β 1+ c2 ×. β 2+ c3 ×. β 3+ c4 ×. β 4 can be calculated.
And S16, judging whether the matching degree is greater than a first matching threshold corresponding to the target medicine.
Optionally, after step S15 and before step S16, the method further includes:
determining a drug type of the target drug;
acquiring the medicine grade of the target medicine according to the medicine type;
acquiring matching precision corresponding to the medicine grade;
and determining the matching precision as a first matching threshold corresponding to the target medicine.
Wherein, different medicines have different medicine types, such as traditional Chinese medicine type, antibiotic type, vaccine type, western medicine type, health care type, and the like. The medicine grades of different medicine types are different, and generally the medicine grades are closely related to the importance degree of human health, for example, the medicine of vaccine type is more important to human health than other medicines, the medicine grade of the medicine of vaccine type is higher, at present, the requirement of the medicine with high medicine grade is higher when matching, and the requirement of matching precision is high. A plurality of medicine ranks and a plurality of matching accuracies may be preset, such as A, B, C and D for the medicine ranks from high to low, and 92, 84, 76, and 68 for the matching accuracies, respectively. Through the implementation mode, different matching thresholds are set for different drug grades, matching of drugs can be effectively supervised in a hierarchical mode, and the safety of the drugs is improved.
And S17, if the matching degree is larger than a first matching threshold, determining a plurality of target reference items from the plurality of reference items.
The matching degree is greater than the first matching threshold, which probably indicates that the target drug has been matched with the drug reference library, but there may be a case where, for example, most of the reference items of the target drug are matched with the drug reference library, but the more important reference items (i.e., the target reference items) of the core of the target drug are not matched with the drug reference library, which is likely to belong to a counterfeit drug, and therefore, further determination needs to be made on the target reference items to ensure a true matching condition of the target drug.
Specifically, the determining a plurality of target reference items from the plurality of reference items includes:
acquiring attention degree values of the user to the plurality of reference items through a web crawler technology;
determining the preset number of required reference items according to the medicine grade of the target medicine;
and determining the preset number of reference items ranked at the top as a plurality of target reference items from the plurality of reference items according to the sequence of the attention degree values from high to low.
In the optional implementation manner, the attention degrees of users to different reference items are different, for example, some users pay attention to the drug specification, some users pay attention to the national drug standard word size, some users pay attention to manufacturers, and the like, the attention number of the plurality of reference items of the users can be obtained through a web crawler technology, and is determined as the attention degree value, different preset numbers can be set for different drug grades, for example, the preset number with a high drug grade is more, the preset number with a low drug grade is less, the target reference item is selected according to the attention degree value and the preset number, the attention degree of the users to the target reference item of the target drug can be embodied, and the target reference item plays a crucial role in matching the drug.
Optionally, the method further includes:
if the matching degree is smaller than a first matching threshold and the medicine grade of the target medicine is not the lowest medicine grade, judging whether the matching degree is smaller than a second matching threshold corresponding to the lowest medicine grade;
if the matching degree is smaller than a second matching threshold corresponding to the lowest medicine grade, determining that the target medicine is an unqualified medicine;
and sending the medicine information of the target medicine to a monitoring device so that the monitoring device can check the validity of the target medicine.
In this alternative embodiment, different drug grades correspond to different matching thresholds. And if the matching degree is smaller than the first matching threshold, the target medicine belongs to a new medicine and is not stored in the medicine reference library. If the matching degree is smaller than the first matching threshold and the matching degree of the target medicine belonging to the higher level is smaller than the second matching threshold corresponding to the lowest medicine level, it is indicated that the comparison of the plurality of reference items of the target medicine does not meet the minimum requirement completely, the target medicine may be a counterfeit medicine and belongs to an unqualified product, and in order to avoid the entry of the counterfeit medicine into the market, the medicine information of the target medicine needs to be sent to the supervision equipment, so that the supervision equipment can check the validity of the target medicine. By the method, illegal counterfeit medicines can be struck, and the safety of the medicines can be improved.
Optionally, the method further includes:
if the matching degree is larger than a second matching threshold corresponding to the lowest medicine grade, determining that the target medicine is a qualified new medicine;
and updating the medicine information of the target medicine to the medicine benchmark library.
The medicine reference library is continuously updated, so that medicine data can be continuously improved, more accurate and quicker medicine matching is facilitated, the labor cost is greatly saved, and the problems that medicine catalogs of various hospital medicine libraries or various social security medicine catalogs are inconsistent with medicine catalogs of the medicine reference library and standardized management is difficult to realize are solved.
And S18, correcting the matching relation of the target medicines according to the comparison values of the target reference items to obtain a correction result.
Specifically, the modifying the matching relationship of the target drug according to the comparison values of the plurality of target reference items, and obtaining a modified result includes:
acquiring a comparison value of each target reference item;
judging whether the comparison value of each target reference item is a standard value or not;
if the comparison value of each target reference item is a standard value, determining that the correction result of the target drug is a match; or
And if the target reference item which is not the standard value exists in the comparison values of the target reference items, determining that the correction result of the target medicine is not matched.
In this embodiment, the alignment value is used to measure the matching condition between each character of the target reference item and each character in the drug reference library, and if all the characters are completely matched, the alignment value is 100 (i.e. standard value). If some character is not matched, the comparison value is not a standard value, the target medicine is not matched with the medicine reference library, and if the comparison values of all the target reference items are the standard values, namely all the characters are matched in percentage, the target medicine is determined to be matched with the medicine reference library.
S19, if the correction result shows that the target medicine is matched, establishing a mapping relation between the medicine identification of the target medicine and the standard identification of the target medicine stored in the medicine benchmark library.
Wherein, after determining that the target drug and the drug reference library have been matched, a mapping relationship between the target drug and the drug reference library can be established.
In the embodiment of the invention, no matter what kind of medicine information of the medicine is maintained, the medicine can be matched with the medicine reference library through the established mapping relation, the information and the code of the medicine in the medicine reference library are quickly matched, and the medicine matching efficiency and the medicine matching precision can be obviously improved.
Optionally, the method further includes:
and uploading the mapping relation to a block chain.
Wherein, in order to ensure the privacy and security of data, the mapping relationship may be uploaded to a block chain for storage.
In the method flow described in fig. 1, the target drug is subjected to preliminary matching judgment according to the matching degree of the target drug, the target drug is subjected to accurate matching judgment by combining the comparison value of the target reference item, and finally an effective mapping relation is established.
The above description is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and it will be apparent to those skilled in the art that modifications may be made without departing from the inventive concept of the present invention, and these modifications are within the scope of the present invention.
Referring to fig. 2, fig. 2 is a functional block diagram of a medical drug matching device according to a preferred embodiment of the present invention.
In some embodiments, the medical drug matching device operates in an electronic device. The medical drug matching device may comprise a plurality of functional modules consisting of program code segments. Program code of the various program segments in the medical drug matching apparatus may be stored in a memory and executed by at least one processor to perform some or all of the steps of the medical drug matching method described in fig. 1.
In this embodiment, the medical drug matching device may be divided into a plurality of functional modules according to the functions performed by the medical drug matching device. The functional module may include: a transmission module 201, a selection module 202, a determination module 203, a calculation module 204, a judgment module 205, a correction module 206 and a creation module 207. The module referred to herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in memory. In some embodiments, the functions of the modules will be described in detail in this embodiment.
The transmission module 201 is configured to receive input medicine information of a target medicine.
The drug information may include, but is not limited to, chemical name, trade name, common name, drug specification, composition, packaging specification, national drug standard, manufacturer, etc.
A selecting module 202, configured to select a plurality of reference items from the drug information, where the plurality of reference items are used to characterize a drug identifier of the target drug or a drug specification of the target drug.
Wherein, the medicine mark is chemical name, trade name, common name, national medicine standard number, and the medicine specification is the content of each component of the medicine.
And the determining module 203 is configured to determine a weight value of each reference item according to the set importance degree value.
For example, if the importance degree values of the 4 reference items b1, b2, b3 and b4 are respectively set to 5, 3 and 2, the weight value β 1 of the reference item b1 is b1/(b1+ b2+ b3+ b4) is 5/(5+5+3+2) is 0.3333, and so on, the weight values of the other reference items may be calculated.
A calculating module 204, configured to match, for each reference item, the reference item with a standard item in a drug reference library on a blockchain, and calculate a comparison value of the reference item.
Wherein, in order to ensure the safety of the data, the drug reference library can be stored on the block chain.
Specifically, the matching the reference item with a standard item in a drug reference library on a block chain, and calculating a comparison value of the reference item includes:
matching the reference items with standard items in a drug reference library one by one according to characters;
counting the number of characters of the matched characters;
determining a valid character length of the reference item;
and calculating a comparison value of the reference item according to the number of the characters and the length of the effective characters.
In this alternative embodiment, the matching process does not distinguish between redundant characters such as case, intelligent recognition of wrongly written words, filtering of spaces, etc. The method clearly removes interference and determines the effective character length of the reference item, such as removing wrongly written characters, filtering space characters and the like. Assuming that the number of characters on the match is N and the effective character length is N, the alignment value c is N/N × 100.
The calculating module 204 is further configured to calculate a matching degree of the target drug according to the comparison value and the weight value.
For example, assume that the alignment values are: c1, c2, c3 and c4, the weight values are β 1, β 2, β 3 and β 4 respectively, and the matching degree a ═ c1 ×. β 1+ c2 ×. β 2+ c3 ×. β 3+ c4 ×. β 4 can be calculated.
The determining module 205 is configured to determine whether the matching degree is greater than a first matching threshold corresponding to the target drug.
The determining module 203 is further configured to determine a plurality of target reference items from the plurality of reference items if the matching degree is greater than a first matching threshold.
The matching degree is greater than the first matching threshold, which probably indicates that the target drug has been matched with the drug reference library, but there may be a case where, for example, most of the reference items of the target drug are matched with the drug reference library, but the more important reference items (i.e., the target reference items) of the core of the target drug are not matched with the drug reference library, which is likely to belong to a counterfeit drug, and therefore, further determination needs to be made on the target reference items to ensure a true matching condition of the target drug.
Specifically, the determining a plurality of target reference items from the plurality of reference items includes:
acquiring attention degree values of the user to the plurality of reference items through a web crawler technology;
determining the preset number of required reference items according to the medicine grade of the target medicine;
and determining the preset number of reference items ranked at the top as a plurality of target reference items from the plurality of reference items according to the sequence of the attention degree values from high to low.
In the optional implementation manner, the attention degrees of users to different reference items are different, for example, some users pay attention to the drug specification, some users pay attention to the national drug standard word size, some users pay attention to manufacturers, and the like, the attention number of the plurality of reference items of the users can be obtained through a web crawler technology, and is determined as the attention degree value, different preset numbers can be set for different drug grades, for example, the preset number with a high drug grade is more, the preset number with a low drug grade is less, the target reference item is selected according to the attention degree value and the preset number, the attention degree of the users to the target reference item of the target drug can be embodied, and the target reference item plays a crucial role in matching the drug.
Optionally, the determining module 205 is further configured to determine whether the matching degree is smaller than a second matching threshold corresponding to a lowest medicine grade if the matching degree is smaller than a first matching threshold and the medicine grade of the target medicine is not the lowest medicine grade;
the determining module 203 is further configured to determine that the target drug is an unqualified drug if the matching degree is smaller than a second matching threshold corresponding to the lowest drug grade;
the transmission module 201 is further configured to send the drug information of the target drug to a monitoring device, so that the monitoring device can check the validity of the target drug.
In this alternative embodiment, different drug grades correspond to different matching thresholds. And if the matching degree is smaller than the first matching threshold, the target medicine belongs to a new medicine and is not stored in the medicine reference library. If the matching degree is smaller than the first matching threshold and the matching degree of the target medicine belonging to the higher level is smaller than the second matching threshold corresponding to the lowest medicine level, it is indicated that the comparison of the plurality of reference items of the target medicine does not meet the minimum requirement completely, the target medicine may be a counterfeit medicine and belongs to an unqualified product, and in order to avoid the entry of the counterfeit medicine into the market, the medicine information of the target medicine needs to be sent to the supervision equipment, so that the supervision equipment can check the validity of the target medicine. By the method, illegal counterfeit medicines can be struck, and the safety of the medicines can be improved.
Optionally, the determining module 203 is further configured to determine that the target drug is a qualified new drug if the matching degree is greater than a second matching threshold corresponding to a lowest drug grade;
the medical drug matching device further comprises:
and the updating module is used for updating the medicine information of the target medicine to the medicine benchmark library.
The medicine reference library is continuously updated, so that medicine data can be continuously improved, more accurate and quicker medicine matching is facilitated, the labor cost is greatly saved, and the problems that medicine catalogs of various hospital medicine libraries or various social security medicine catalogs are inconsistent with medicine catalogs of the medicine reference library and standardized management is difficult to realize are solved.
And the correcting module 206 is configured to correct the matching relationship of the target drug according to the comparison values of the plurality of target reference items, so as to obtain a corrected result.
Specifically, the modifying the matching relationship of the target drug according to the comparison values of the plurality of target reference items, and obtaining a modified result includes:
acquiring a comparison value of each target reference item;
judging whether the comparison value of each target reference item is a standard value or not;
if the comparison value of each target reference item is a standard value, determining that the correction result of the target drug is a match; or
And if the target reference item which is not the standard value exists in the comparison values of the target reference items, determining that the correction result of the target medicine is not matched.
In this embodiment, the alignment value is used to measure the matching condition between each character of the target reference item and each character in the drug reference library, and if all the characters are completely matched, the alignment value is 100 (i.e. standard value). If some character is not matched, the comparison value is not a standard value, the target medicine is not matched with the medicine reference library, and if the comparison values of all the target reference items are the standard values, namely all the characters are matched in percentage, the target medicine is determined to be matched with the medicine reference library.
An establishing module 207, configured to establish a mapping relationship between the drug identifier of the target drug and the standard identifier of the target drug stored in the drug benchmark library if the correction result indicates that the target drug is matched.
Wherein, after determining that the target drug and the drug reference library have been matched, a mapping relationship between the target drug and the drug reference library can be established.
In the embodiment of the invention, no matter what kind of medicine information of the medicine is maintained, the medicine can be matched with the medicine reference library through the established mapping relation, the information and the code of the medicine in the medicine reference library are quickly matched, and the medicine matching efficiency and the medicine matching precision can be obviously improved.
Optionally, the transmission module 201 is further configured to upload the mapping relationship to a block chain.
Wherein, in order to ensure the privacy and security of data, the mapping relationship may be uploaded to a block chain for storage.
Optionally, the determining module 203 is further configured to determine the drug type of the target drug after the calculating module 204 calculates the matching degree of the target drug according to the comparison value and the weight value, and before the determining module 205 determines whether the matching degree is greater than a first matching threshold corresponding to the target drug;
the medical drug matching device further comprises:
the acquisition module is used for acquiring the medicine grade of the target medicine according to the medicine type;
the acquisition module is further used for acquiring the matching precision corresponding to the medicine grade;
the determining module 203 is further configured to determine the matching accuracy as a first matching threshold corresponding to the target drug.
Wherein, different medicines have different medicine types, such as traditional Chinese medicine type, antibiotic type, vaccine type, western medicine type, health care type, and the like. The medicine grades of different medicine types are different, and generally the medicine grades are closely related to the importance degree of human health, for example, the medicine of vaccine type is more important to human health than other medicines, the medicine grade of the medicine of vaccine type is higher, at present, the requirement of the medicine with high medicine grade is higher when matching, and the requirement of matching precision is high. A plurality of medicine ranks and a plurality of matching accuracies may be preset, such as A, B, C and D for the medicine ranks from high to low, and 92, 84, 76, and 68 for the matching accuracies, respectively. Through the implementation mode, different matching thresholds are set for different drug grades, matching of drugs can be effectively supervised in a hierarchical mode, and the safety of the drugs is improved.
In the medical drug matching device depicted in fig. 2, the target drug is subjected to preliminary matching judgment according to the matching degree of the target drug, the target drug is subjected to accurate matching judgment by combining the comparison value of the target benchmark item, and finally an effective mapping relation is established.
Fig. 3 is a schematic structural diagram of an electronic device for implementing a matching method of medical drugs according to a preferred embodiment of the present invention. The electronic device 3 comprises a memory 31, at least one processor 32, a computer program 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
Those skilled in the art will appreciate that the schematic diagram shown in fig. 3 is merely an example of the electronic device 3, and does not constitute a limitation of the electronic device 3, and may include more or less components than those shown, or combine some components, or different components, for example, the electronic device 3 may further include an input/output device, a network access device, and the like.
The at least one Processor 32 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The processor 32 may be a microprocessor or the processor 32 may be any conventional processor or the like, and the processor 32 is a control center of the electronic device 3 and connects various parts of the whole electronic device 3 by various interfaces and lines.
The memory 31 may be used to store the computer program 33 and/or the module/unit, and the processor 32 may implement various functions of the electronic device 3 by running or executing the computer program and/or the module/unit stored in the memory 31 and calling data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data) created according to the use of the electronic device 3, and the like. Further, the memory 31 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device.
With reference to fig. 1, the memory 31 in the electronic device 3 stores a plurality of instructions to implement a method of medical drug matching, which the processor 32 may execute to implement:
receiving input medicine information of a target medicine;
selecting a plurality of reference items from the medicine information, wherein the plurality of reference items are used for representing the medicine identification of the target medicine or the medicine specification of the target medicine;
determining the weight value of each reference item according to the set importance degree value;
for each reference item, matching the reference item with a standard item in a drug reference library on a block chain, and calculating a comparison value of the reference item;
calculating the matching degree of the target medicine according to the comparison value and the weight value;
judging whether the matching degree is greater than a first matching threshold corresponding to the target medicine;
if the matching degree is larger than a first matching threshold value, determining a plurality of target benchmark items from the plurality of benchmark items;
correcting the matching relation of the target medicine according to the comparison values of the target reference items to obtain a correction result;
and if the correction result shows that the target medicine is matched, establishing a mapping relation between the medicine identification of the target medicine and the standard identification of the target medicine stored in the medicine reference library.
In an optional embodiment, the matching the reference item with a standard item in a drug reference library on a blockchain, and calculating the comparison value of the reference item includes:
matching the reference items with standard items in a drug reference library one by one according to characters;
counting the number of characters of the matched characters;
determining a valid character length of the reference item;
and calculating a comparison value of the reference item according to the number of the characters and the length of the effective characters.
In an optional implementation manner, after the calculating the matching degree of the target drug according to the comparison value and the weight value and before the determining whether the matching degree is greater than the first matching threshold corresponding to the target drug, the processor 32 may execute the plurality of instructions to implement:
determining a drug type of the target drug;
acquiring the medicine grade of the target medicine according to the medicine type;
acquiring matching precision corresponding to the medicine grade;
and determining the matching precision as a first matching threshold corresponding to the target medicine.
In an alternative embodiment, determining a plurality of target reference terms from the plurality of reference terms comprises:
acquiring attention degree values of the user to the plurality of reference items through a web crawler technology;
determining the preset number of required reference items according to the medicine grade of the target medicine;
and determining the preset number of reference items ranked at the top as a plurality of target reference items from the plurality of reference items according to the sequence of the attention degree values from high to low.
In an alternative embodiment, the processor 32 may execute the plurality of instructions to implement:
if the matching degree is smaller than a first matching threshold and the medicine grade of the target medicine is not the lowest medicine grade, judging whether the matching degree is smaller than a second matching threshold corresponding to the lowest medicine grade;
if the matching degree is smaller than a second matching threshold corresponding to the lowest medicine grade, determining that the target medicine is an unqualified medicine;
and sending the medicine information of the target medicine to a monitoring device so that the monitoring device can check the validity of the target medicine.
In an alternative embodiment, the processor 32 may execute the plurality of instructions to implement:
if the matching degree is larger than a second matching threshold corresponding to the lowest medicine grade, determining that the target medicine is a qualified new medicine;
and updating the medicine information of the target medicine to the medicine benchmark library.
In an optional implementation manner, the modifying the matching relationship of the target drug according to the comparison values of the plurality of target reference items, and obtaining a modified result includes:
acquiring a comparison value of each target reference item;
judging whether the comparison value of each target reference item is a standard value or not;
if the comparison value of each target reference item is a standard value, determining that the correction result of the target drug is a match; or
And if the target reference item which is not the standard value exists in the comparison values of the target reference items, determining that the correction result of the target medicine is not matched.
Specifically, the processor 32 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
In the electronic device 3 depicted in fig. 3, the target medicine is subjected to preliminary matching judgment according to the matching degree of the target medicine, the target medicine is subjected to accurate matching judgment by combining the comparison value of the target reference item, and finally an effective mapping relation is established.
The integrated modules/units of the electronic device 3 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, and Read-Only Memory (ROM).
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned. The units or means recited in the system claims may also be implemented by software or hardware.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.