Prescription reading program, prescription reading device, and prescription writing computer
Patent Information
- Application Number
- JP2021065835
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-04-08
- Publication Date
- 2025-02-26
- Estimated Expiration
- 2041-04-08
AI Technical Summary
【0011】 本発明によれば、不鮮明な文字であっても適切に処方箋の読み取りを行なうことができる。
Smart Images

Figure 0007635978000001 
Figure 0007635978000002 
Figure 0007635978000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a prescription reading program for reading information such as characters on a prescription, a prescription reading device, and a computer for creating prescriptions. [Background technology]
[0002] A pharmacy business support system is described in Patent Document 1. Patent Document 1 states that "Prescription information is, for example, image data obtained by photographing a prescription issued by a medical institution. Note that the photographed image may be subjected to character recognition to convert the prescription contents into text data, and the image data and text data may be used as prescription information." [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2020-086833 Summary of the Invention [Problem to be solved by the invention]
[0004] Pharmacies receive prescriptions from medical institutions via paper or fax. When pharmacies want to convert the paper prescriptions they receive into text data, they scan the paper and convert it into text data using OCR (Optical Character Recognition). Alternatively, pharmacies can convert image data received by fax into text data using OCR (Optical Character Recognition). However, scanned image data and image data received by fax can sometimes have unclear characters, making it difficult for conventional OCR to properly recognize the characters.
[0005] Therefore, an object of the present invention is to provide a prescription reading program, a prescription reading device, and a computer for creating prescriptions that can properly read prescriptions even if the characters are unclear. [Means for solving the problem]
[0006] The prescription reading program of the present invention includes a receiving process for receiving prescription data, a text recognition process for performing a text data recognition process on the prescription data received in the receiving process using a machine-learned character recognition algorithm, a first NLP algorithm process for extracting words defined in a predetermined prescription standard from the text data recognized in the text recognition process and attaching tags corresponding to the standard to each word, a second NLP algorithm process for understanding the syntax defined in the standard and arranging each word in an order defined in the standard based on the tags of each word assigned by the first NLP algorithm, and a data generation process for generating general-purpose data readable by a prescription creation computer based on the data organized by the second NLP algorithm. The information processing device executes the above.
[0007] The prescription reading program uses the first and second NLP algorithms to extract words from the read text data that are specified in the prescription standard established by JAHIS or similar organizations, and organizes the data in the order specified by the standard. The text on a prescription is not necessarily arranged in the order specified by JAHIS or similar organizations. For example, prescriptions may be written in a different order at different hospitals or facilities, or may be manually edited or have additional content added. However, the prescription reading program of this embodiment uses the first and second NLP algorithms to organize the read text data into a format that conforms to the standard established by JAHIS or similar organizations. Therefore, the prescription reading program can organize the data into usable data for devices such as receipt computers that comply with the standard established by JAHIS or similar organizations.
[0008] In addition, the prescription reading program may generate general-purpose data (e.g., CSV data) that can be read by a prescription creation computer based on the data organized by the second NLP algorithm, or the prescription reading program may input the data organized by the second NLP algorithm into the prescription computer via an API or the like.
[0009] The prescription reading program may further execute a correction process to correct errors in the text data recognized by the text recognition process using a machine-learned algorithm, thereby further improving the accuracy of reading prescriptions. In this case, the extraction process is performed on the text data corrected by the correction process.
[0010] The correction process is performed using a drug name dictionary and a pattern dictionary containing specific patterns found on prescriptions. The pattern dictionary includes information such as the character "general" used in generic drugs, the katakana character "ro" and the kanji character "kuchi." This further improves the accuracy of reading prescriptions. [Effects of the Invention]
[0011] According to the present invention, even if the characters are unclear, the prescription can be read properly. [Brief explanation of the drawings]
[0012] [Figure 1] FIG. 1 is a block diagram showing the configuration of a prescription reading system 1. [Figure 2] FIG. 2 is a block diagram showing the configuration of a server 11. [Figure 3] 4 is a flowchart showing the operation of the prescription reading system 1. [Figure 4] 10 is a flowchart showing the operation of the server 11 when reading a prescription. [Figure 5] 10 is a flowchart showing the operation of the server 11 when reading a prescription. [Figure 6] FIG. 10 is a diagram showing an example of prescription data. DETAILED DESCRIPTION OF THE INVENTION
[0013] Hereinafter, a prescription reading system 1 according to an embodiment of the present invention will be described with reference to the drawings.
[0014] 1 is a block diagram showing the configuration of a prescription reading system 1. The prescription reading system 1 includes a server 11, a reception terminal 12, a user terminal 13, and a receipt computer 14. The server 11, the reception terminal 12, the user terminal 13, and the receipt computer 14 are connected via a network.
[0015] The reception terminal 12 is realized by a general information processing device (personal computer). The reception terminal 12 is connected to a fax machine or scanner (not shown) and receives prescription data obtained by converting a prescription into image data. The prescription is sent from the medical institution on paper or by fax. When a pharmacist at the pharmacy receives the prescription on paper, the pharmacist inputs the prescription data into the reception terminal 12 using a scanner (not shown). When the prescription is received by fax, the reception terminal 12 receives the prescription data from the fax machine. Alternatively, the pharmacist may print the prescription data using a fax machine, read the printed prescription with a scanner, and input the data into the reception terminal 12. The reception terminal 12 transmits the prescription data to the server 11.
[0016] Server 11 is an example of a prescription reading device of the present invention. Server 11 may be installed in a pharmacy or may be a group of servers on the Internet. Server 11 receives prescription data from reception terminal 12 and performs an operation of reading the contents of the prescription.
[0017] The user terminal 13 is a terminal used by a person (user) who performs pharmacy work, such as a pharmacist, and is, for example, a portable information processing device such as a smartphone or a tablet computer. The user uses the user terminal 13 to check the contents of the prescription read by the server 11 and input the contents of the prescription into the receipt computer 14. The user can also use the user terminal 13 to check the patient's medication history and create a new medication history.
[0018] The receipt computer 14 is a receipt creation computer that creates a receipt according to the contents of the prescription input from the user terminal 13. The receipt computer 14 is realized by an application program installed on a general personal computer.
[0019] 2 is a block diagram showing the configuration of the server 11. The server 11 includes a network I / F 51, a storage unit 52, a CPU 53, and a RAM .
[0020] The network I / F 51 is connected to a network such as the Internet. In this embodiment, the server 11 is connected to the reception terminal 12 and the user terminal 13 via the network I / F 51.
[0021] The CPU 53 reads out the programs stored in the storage unit 52 into the RAM 54 and performs various operations. The storage unit 52 stores the basic program (OS) of the server 11 and the prescription reading program in this embodiment. The storage unit 52 also includes various databases such as information indicating the layout type of prescription data (described later) and personal information of patients.
[0022] The CPU 53 reads the prescription reading program from the storage unit 52 into the RAM 54, thereby functioning as a prescription reading device.
[0023] 3 is a flowchart showing the operation of the prescription reading system 1. First, a prescription is sent from a medical institution by paper or fax (S11). A pharmacist at a pharmacy receives the prescription sent by paper or fax (S12).
[0024] Then, the pharmacist at the pharmacy scans the paper prescription using the reception terminal 12 and transmits it as prescription data to the server 11, or transmits prescription data received by fax to the server 11 (S13). The pharmacist may also use an application program on the user terminal 13 to transmit the prescription data to the server 11. The reception terminal 12 or the user terminal 13 may also automatically transmit the prescription data to the server 11 when it receives the prescription data via fax or when it receives it from a scanner. In particular, home pharmacies such as elderly care facilities receive many prescriptions simultaneously from medical institutions. Therefore, the prescription reading system 1 of this embodiment can significantly reduce the workload of pharmacy operations by automatically transmitting the prescription data to the server 11 when it receives the prescription data and performing the following reading operation.
[0025] Next, the server 11 executes the prescription reading program to perform the prescription reading operation (S14).
[0026] 4 and 5 are flowcharts showing the operation of the server 11 when reading a prescription. First, the server 11 extracts image features from the prescription data (S101). This process is performed using an algorithm for extracting features, such as SIFT (Scale Invariant Feature Transform).
[0027] As described above, pharmacies receive prescription data via fax or scan it with a prescription scanner. Therefore, the size and orientation of the image of the prescription data are not constant. By using the SIFT feature extraction algorithm, the server 11 can extract features of the prescription image that are independent of the image size and orientation.
[0028] Next, the server 11 determines the corresponding layout type from a database based on the extracted feature amount (S102). The database stores multiple prescription layout types. The server 11 refers to the database using an estimation algorithm such as RANSAC (Random Sample Consensus) to determine the layout type that matches the layout type of the received prescription data.
[0029] The server 11 determines whether a matching layout type exists (S103). If the server 11 determines that a matching layout type exists, it performs a text area determination process (S104). The text area includes at least an area in which patient information such as the patient's name is written, an area in which the date is written, and an area in which medication information is written. The layout types registered in the database include position information that indicates where each text area is located in the prescription data. The server 11 determines the text area by reading the position information of the text area from the layout types registered in the database.
[0030] On the other hand, if the server 11 determines that there is no matching layout type, it performs a process of accepting a text area from the user (S105). A user such as a pharmacist manually specifies an area containing text from the prescription data using the user I / F of the reception terminal 12 or the user terminal 13. The server 11 registers the specified text area in the database as a new layout type (S106) and performs a process of determining the text area (S104).
[0031] New layout types may arise for prescriptions due to legal changes, etc., and may not match the layout types stored in the database. However, if there is no matching layout type in the database, the server 11 accepts a text area specification operation from the user and performs a registration process to register it in the database, so that even if a new layout type arises, the layout type can be automatically determined from the next time.
[0032] The server 11 then performs text recognition processing on the text area containing the patient information (S107). The patient information includes the patient's name, date of birth, etc. The text recognition processing is performed using any character recognition algorithm (for example, Tesseract-OCR equipped with an algorithm such as a neural network).
[0033] The server 11 compares the patient information recognized by the text recognition process with the database to determine whether or not corresponding patient information exists (S108). If the server 11 determines that a corresponding patient exists, it continues the processes of S201 to S207 shown in Fig. 5. If the server 11 determines that a corresponding patient does not exist, it registers the recognized patient information in the database (S109) and proceeds to the processes of S201 to S207.
[0034] Next, as shown in Fig. 5, the server 11 performs segmentation processing on the text area where the drug information is written (S201). Fig. 6 is a diagram showing an example of prescription data. The segmentation processing is a process of dividing the text area where the drug information is written into segments of one line each, as shown in the hatched area in Fig. 6.
[0035] The server 11 then performs text recognition processing on each segment (S202). The text recognition processing is performed using any character recognition algorithm (for example, Tesseract-OCR equipped with an algorithm such as a neural network). This processing preferably uses a machine-learned character recognition algorithm that has been machine-learned specifically for prescriptions. Of course, the server 11 may also perform text recognition processing using a general machine-learned algorithm.
[0036] Next, the server 11 performs a spelling correction process on the recognized text data (S203). The spelling correction process uses an arbitrary algorithm, such as SymSpell. The SymSpell algorithm corrects text recognition errors related to drug names using a drug name dictionary provided by the government. This allows the server 11 to appropriately correct errors that occurred in the text recognition process of S202.
[0037] Furthermore, the server 11 performs a correction process for specific patterns in the prescription (S204). The correction process for specific patterns uses any algorithm, such as n-gram. The n-gram algorithm uses a pattern dictionary containing specific patterns in the prescription to correct text recognition errors that could not be corrected by the process in S203. The specific patterns in the prescription include, for example, the character "general" used in generic drugs. The n-gram algorithm also corrects the difference between the katakana character "ro" and the kanji character "kuchi."
[0038] The server 11 performs a first word extraction process (S205) and a second word extraction process (S206) using the corrected text data. Both the first word extraction process and the second word extraction process are performed using a machine-learned word extraction algorithm such as a neural network. The machine-learned word extraction algorithm is, for example, an NLP (Natural Language Processing) algorithm. The first NLP algorithm used in the first word extraction process of this embodiment extracts words defined in a predetermined prescription standard and tags each word according to the standard. The predetermined prescription standard is, for example, a standard for prescription data defined by JAHIS. The standard defines the order of various pieces of information indicating the contents of a prescription. Data conforming to the standard defined by JAHIS can be input into the receipt computer 14 and made available. The first NLP algorithm is trained to extract and tag words defined in the standard defined by JAHIS. Each tag includes, for example, the name of the medication, dosage, duration of medication, and timing of intake.
[0039] The second NLP algorithm used in the second word extraction process is trained to understand the relationships (syntax and order) between keywords specific to prescriptions. In other words, the second NLP algorithm is trained to understand the syntax and order according to the content of the standard established by JAHIS. For example, an NLP algorithm trained to read English sentences, which differs from the present embodiment, tags the forms of English words (nouns, verbs, etc.) it reads and rearranges the words in the order specified by English syntax. In contrast, the second NLP algorithm of the present embodiment understands the syntax of the standard established by JAHIS and, based on the tags of each word assigned by the first NLP algorithm, rearranges and organizes the words in the order specified by the JAHIS standard. For example, in the prescription data shown in Figure 6, the second NLP algorithm associates, in this order, 1. generic name prescription, name of the drug "XX tablets" 12 mg, 2. dosage "3 tablets," 3. dosing period "14 days' supply," and 4. intake timing "once a day before bedtime." Similarly, the second NLP algorithm associates, in this order, 1. generic prescription with the name of the drug "○△△ tablets" 7.5 mg, 2. dosage "1 tablet", 3. medication period "14 days' supply", and 4. timing of intake "once a day before bed".
[0040] By using the first and second NLP algorithms, the server 11 can organize the scanned text data into the data order specified by the JAHIS standard. The text written on a prescription is not necessarily arranged in the order specified by the JAHIS standard. For example, prescriptions may be written in different orders at different hospitals or facilities, or may be manually edited or have additional content added. However, the prescription reading program of this embodiment uses the first and second NLP algorithms to organize the scanned text data into a format conforming to the JAHIS standard. Therefore, the prescription reading program accurately extracts the unique content of a prescription and organizes it into a format that can be appropriately registered and used in a database. In other words, the prescription reading program organizes all prescriptions into data in an order conforming to the JAHIS standard, so that prescriptions of any format can be entered into a receipt computer and organized into usable data.
[0041] The server 11 registers the words extracted and organized as described above in a database (S207). Then, returning to the flowchart of Fig. 3, the server 11 converts the read result into a two-dimensional code (QR code (registered trademark)) of a standard (e.g., JAHIS) that can be read by the receipt computer 14 (S15). The server 11 also registers the read prescription data, the position information of the words registered in S207 (information indicating the position of each word in the prescription data), and the QR code (registered trademark) generated in S15 in a database (S16).
[0042] Meanwhile, the server 11 transmits the information registered in the database to the user terminal 13, and updates the information in the user terminal 13 (S17). The pharmacist can use the application program on the user terminal 13 to check the contents of each prescription.
[0043] Thereafter, the QR code (registered trademark) generated by the server 11 is input into the receipt computer 14 via an application program on the user terminal 13 (S18). For example, the application program displays the QR code (registered trademark) generated by the server 11 on a display (not shown). The pharmacist reads the displayed QR code (registered trademark) with a scanner. As a result, the prescription data read by the prescription reading program is input into the receipt computer 14.
[0044] The prescription reading program may also generate general-purpose data, such as CSV format, in which text is written in the order organized by the second NLP algorithm. The prescription reading program inputs the generated CSV data into a data import folder in the receipt computer 14. The receipt computer 14 receives prescription data from the prescription reading program via the data import folder. The receipt computer 14 is configured to be able to input CSV data that conforms to the JAHIS standard. Therefore, the prescription reading program of this embodiment can accurately and automatically input prescription data into the receipt computer 14.
[0045] Alternatively, the prescription reading program may input prescription data into the receipt computer 14 via an API (Application Programming Interface). In this case, the receipt computer 14 is configured to be able to input data conforming to the JAHIS standard via the API. This allows the prescription reading program to input prescription data into the receipt computer 14 via the API. Therefore, in this case as well, the prescription reading program of this embodiment can input prescription data into the receipt computer 14 accurately and automatically.
[0046] In this way, the prescription reading program can also input prescription data into the receipt computer 14 without using a QR code (registered trademark). In this case, the prescription reading program can also reduce the workload of pharmacists and other workers who read the prescription data with a scanner, and can automate the input of prescription data into the receipt computer 14.
[0047] The prescription reading program of this embodiment determines the layout type of a prescription to identify text areas, and then extracts words such as drug names and dosages from the identified text areas using a machine-learned character recognition algorithm and a machine-learned word extraction algorithm, such as a neural network. Therefore, the prescription reading program of this embodiment can perform character and word recognition with significantly higher accuracy than conventional OCR. Therefore, the prescription reading program of this embodiment can properly read prescriptions even if the prescription data contains unclear characters captured by fax or scanner. Furthermore, the prescription reading program organizes the read text data into a data format conforming to the JAHIS standard, so that prescription data can be accurately and automatically entered into a receipt computer even if the order of various information in the prescription is different, or if handwritten corrections or additional content have been added. In particular, at home pharmacies, which receive multiple prescriptions simultaneously from medical institutions, the prescription reading program of this embodiment can significantly reduce the workload of reading prescriptions and entering them into a receipt computer.
[0048] The server 11 stores the reading result information for each patient in a database. The pharmacist can refer to all past reading results for each patient using an application program on the user terminal 13. When the information on the user terminal 13 is updated in the process of S17 in FIG. 3, the pharmacist can check the prescription contents and, via telephone or other means, explain the prescribed medication to the patient and confirm the patient's medication status. The pharmacist uses the user terminal 13 to record these contents as a medication history management record (hereinafter referred to as a "medication history"). The medication history consists of subjective information (what the patient said, symptoms) (S: Subjective), objective information (prescription contents, changes, pharmacist's observations, test data) (O: Objective), evaluation and guidance (the pharmacist's evaluation and judgment based on S and O and the guidance content based on that) (A: Assessment), and a plan (points to ask about next time and points to note) (P: Plan). After the information on the user terminal 13 is updated in the process of S17, the pharmacist can easily create a new medication history by referring to past information in addition to the current prescription. As a result, the prescription reading system 1 of this embodiment also functions as a medication history creation work support program.
[0049] Furthermore, the user terminal 13 may transmit the medication history created by the pharmacist to the server 11. By registering the newly created medication history in the database, the server 11 can present the medication history to the pharmacist via the user terminal 13 the next time a new prescription is read.
[0050] Furthermore, the server 11 may automatically create a new medication history based on the contents of the newly read prescription and the past medication history. The medication history is created using a predetermined algorithm. The server 11 transmits the newly created medication history to the user terminal 13. The pharmacist checks the medication history created by the server 11 and modifies it based on the results of explaining the medication history to the patient and checking the situation. Alternatively, if the pharmacist determines that there is no problem with the medication history created by the server 11 after explaining the medication history to the patient and checking the situation, the pharmacist confirms the medication history created by the server 11. When the pharmacist confirms the medication history, the confirmed medication history is registered in the server 11 and the receipt computer 14 from the user terminal 13.
[0051] In this way, the server 11 of this embodiment can support the medication history creation work by automatically creating a medication history, and can further reduce the burden on pharmacy work.
[0052] It should be noted that the description of the present embodiment is illustrative in all respects and should not be considered limiting. The scope of the present invention is defined not by the above-described embodiments but by the claims. Furthermore, the scope of the present invention includes a range equivalent to the claims.
[0053] For example, the prescription reading program may be executed by the reception terminal 12, the user terminal 13, or the receipt computer 14, rather than the server 11. When the receipt computer 14 executes the prescription reading program, the receipt computer 14 performs reception processing to directly accept data that has been organized into a format conforming to the JAHIS standard by the second NLP algorithm. In this case, the prescription reading program eliminates the workload of a pharmacist or other worker having to read the data with a scanner, and eliminates the need to send and receive data via CSV data or an API, allowing for the complete automation of prescription reading and prescription data acceptance within a single program. Note that the receipt computer 14 may execute the prescription reading program as plug-in software. [Explanation of symbols]
[0054] 1. Prescription reading system 11...Server 12...Reception terminal 13...User terminal 14...Receipt computer 51...Network I / F 52...Storage section 53...CPU 54...RAM
Claims
1. A receiving process for receiving prescription data; A text recognition process that performs a recognition process of text data on the prescription data received in the receiving process using a machine-learned character recognition algorithm; A first NLP algorithm process for extracting words defined in a standard specification for a predetermined prescription from the text data recognized by the text recognition process and attaching a tag corresponding to the standard to each word; A second NLP algorithm process that understands the syntax defined in the standard and organizes each word in an order defined in the standard based on the tag of each word assigned in the first NLP algorithm process; A data generation process for generating general-purpose data readable by a computer for creating a medical receipt based on the data organized by the second NLP algorithm process; A prescription reading program that causes an information processing device to execute the above.
2. A receiving process for receiving prescription data; A text recognition process that performs a recognition process of text data on the prescription data received in the receiving process using a machine-learned character recognition algorithm; A first NLP algorithm process for extracting words defined in a standard specification for a predetermined prescription from the text data recognized by the text recognition process and attaching a tag corresponding to the standard to each word; A second NLP algorithm process that understands the syntax defined in the standard and organizes each word in an order defined in the standard based on the tag of each word assigned in the first NLP algorithm process; An input process of inputting the data organized by the second NLP algorithm process into a prescription creation computer via an application programming interface; A prescription reading program that causes an information processing device to execute the above.
3. A receiving process for receiving prescription data; A text recognition process that performs a recognition process of text data on the prescription data received in the receiving process using a machine-learned character recognition algorithm; A first NLP algorithm process for extracting words defined in a standard specification for a predetermined prescription from the text data recognized by the text recognition process and attaching a tag corresponding to the standard to each word; A second NLP algorithm process that understands the syntax defined in the standard and organizes each word in an order defined in the standard based on the tag of each word assigned in the first NLP algorithm process; A reception process for receiving data organized by the second NLP algorithm process; A prescription reading program that causes a prescription creation computer to execute the above.
4. Further executing a correction process for correcting errors in the text data recognized by the text recognition process using a machine learning algorithm; The process of extracting words is performed on the text data corrected in the correction process. The prescription reading program according to any one of claims 1 to 3.
5. The correction process is performed using a drug name dictionary and a pattern dictionary that indicates a specific pattern included in the prescription. The prescription reading program according to claim 4.
6. A receiving unit for receiving prescription data; a text recognition unit that performs a text data recognition process on the prescription data received by the receiving unit; A first NLP algorithm processing unit that extracts words defined in a standard specification of a predetermined prescription from the text data recognized by the text recognition unit and attaches a tag corresponding to the standard to each word; A second NLP algorithm processing unit that understands a syntax defined in the standard and organizes each word in an order defined in the standard based on the tag of each word assigned by the first NLP algorithm processing unit; A data generation processing unit that generates general-purpose data readable by a prescription creation computer based on the data organized by the second NLP algorithm processing unit; A prescription reading device comprising:
7. A receiving unit for receiving prescription data; a text recognition unit that performs a text data recognition process on the prescription data received by the receiving unit; A first NLP algorithm processing unit that extracts words defined in a standard specification of a predetermined prescription from the text data recognized by the text recognition unit and attaches a tag corresponding to the standard to each word; A second NLP algorithm processing unit that understands a syntax defined in the standard and organizes each word in an order defined in the standard based on the tag of each word assigned by the first NLP algorithm processing unit; An input processing unit that inputs the data organized by the second NLP algorithm processing unit into a prescription creation computer; A prescription reading device comprising:
8. A receiving unit for receiving prescription data; a text recognition unit that performs a text data recognition process on the prescription data received by the receiving unit; A first NLP algorithm processing unit that extracts words defined in a standard specification of a predetermined prescription from the text data recognized by the text recognition unit and attaches a tag corresponding to the standard to each word; A second NLP algorithm processing unit that understands a syntax defined in the standard and organizes each word in an order defined in the standard based on the tag of each word assigned by the first NLP algorithm processing unit; A reception processing unit that receives the data organized by the second NLP algorithm processing unit; A prescription creation computer equipped with the following:
Citation Information
Patent Citations
Prescription data inputting device
JP2001318987A
Prescription receiving device
JP2007141040A
Pharmacy business support system
JP2020086833A
Information processing device and information processing program
JP2020123272A
Service providing device, service providing method, and program
JP2020129198A