Data creation device, data creation device control method, data creation program, medicine sorting device, medicine sorting device control method, and medicine sorting program

The data creation device automates the creation of master data for drug sorting devices, enabling efficient and error-reduced sorting of drugs without pre-registered master data.

JP2025092372APending Publication Date: 2025-06-19YUYAMA MFG CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024094619
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-07
Filing Date
2024-06-11
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

Existing drug sorting devices require pre-registered master images for drug identification, which is time-consuming and prone to errors, and they cannot sort drugs without pre-registered master data.

Method used

A data creation device that automatically creates master data by capturing images of drugs and extracting identification marks, allowing for registration of master images without visual inspection and enabling drug sorting without pre-registered master data.

Benefits of technology

Facilitates easy registration of master data and allows for efficient drug sorting processing without the need for pre-registered master data, reducing errors and increasing automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025092372000001_ABST
    Figure 2025092372000001_ABST
Patent Text Reader

Abstract

To simply register master data in a medicine sorting device.SOLUTION: A data creation device (20) comprises: a reception part (211) which receives input of medicine identification information indicated by at least one mark formed on a medicine; an extraction part (212) which extracts at least one mark region including one mark formed on the medicine in an image of an imaged medicine; and a creation part (216) which in a case when receiving a registration operation based on the identification information received by the reception part and the mark region extracted by the extraction part, associates the image of the medicine to the identification information as a master image, and creates master data.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a data creation device, a drug sorting device, and the like.

Background Art

[0002] Conventionally, a plurality of types of returned drugs have been sorted by a pharmacist or a doctor for each type. The returned drugs are drugs that have been prescribed to various patients or drugs after being dispensed according to prescriptions. Therefore, compared with the dispensing operation of collecting (sub-packaging) drugs (tablets) of (one or more types) for each dosing time unit from a group of drug types (drug cassettes) grouped in advance by drug type in a dispensing device or the like based on prescription information per patient unit, the types of drugs that are collectively returned and prescribed to a plurality of patients are very numerous. Therefore, it is highly useful to automatically sort and reuse the returned drugs. Note that the drugs dispensed for one dosing time are generally about 2 to 3 types, and at most about 10 types.

[0003] In addition, in order to avoid the risk of misadministration due to the time, labor, or sorting error (returning error to the drug cassette) involved in the sorting operation, there are also pharmacies or hospitals (specifically, the in-hospital pharmacy department) that discard the returned drugs as they are.

[0004] Patent Document 1 discloses a drug sorting device that realizes automatic sorting of drugs. The drug sorting device of Patent Document 1 images each of the plurality of types of drugs stored in the first storage unit, determines the type of the drug based on the captured image, and sorts the drugs into sorting cups in the second storage unit for each type based on the determination result. Further, the drug sorting device conveys the drugs sorted for each type to a sub-packaging mechanism and sub-packages them.

Prior Art Documents

Patent Documents

[0005]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0006] The drug sorting device determines the type of drug stored in the first storage unit by comparing the captured image with the image of the drug (master image included in the master data) registered in advance for each type of drug. The master image registered in advance may be newly registered in the drug sorting device not only before the shipment of the drug sorting device but also after the drug sorting device is installed in a hospital or pharmacy.

[0007] Patent Document 1 discloses registering a master image in a drug sorting device without relying on distribution from an external device, and registering the captured image after visual inspection as the master image. However, it does not disclose a method of registering a master image without performing visual inspection. Also, Patent Document 1 does not disclose a method of sorting drugs without using a master image prepared in advance.

[0008] One aspect of the present invention aims to realize simple registration of master data. Another aspect of the present invention aims to perform drug sorting processing without registering master data in advance.

Means for Solving the Problems

[0009] A data creation device according to one aspect of the present invention is a data creation device that creates master data including a master image to be compared with an image of a drug to be determined for type. The data creation device includes a reception unit that receives an input of identification information of the drug, the identification information being indicated by at least one mark formed on the drug, an extraction unit that extracts at least one mark area including one mark formed on the drug from the captured image of the drug, and a creation unit that, when receiving a registration operation of registering the image of the drug as the master image based on the identification information received by the reception unit and the mark area extracted by the extraction unit, associates the image of the drug with the identification information as the master image and creates the master data.

[0010] A control method for a data creation device according to an aspect of the present invention is a control method for a data creation device that creates master data including a master image to be compared with an image of a drug to be classified, the control method including: a reception step of receiving input of identification information of the drug, the identification information being indicated by at least one mark formed on the drug; an extraction step of extracting at least one mark area including one mark formed on the drug from the captured image of the drug; and a creation step of creating the master data by associating the image of the drug with the identification information as the master image when a registration operation of registering the image of the drug as the master image based on the identification information received in the reception step and the mark area extracted in the extraction step is received.

[0011] A drug sorting device according to another aspect of the present invention includes a plurality of sorting containers and sorts drugs of unknown types into the sorting containers for each type. The drug sorting device includes an infrared sensor that receives infrared light emitted from a drug, an acquisition unit that acquires waveform data indicating the relationship between the frequency and intensity of the infrared light received by the infrared sensor, and a determination unit that determines a sorting container for accommodating the drug of unknown type based on the waveform data of the drug of unknown type acquired by the acquisition unit and the waveform data of a drug whose accommodation destination sorting container has already been determined.

[0012] A control method for a drug sorting device according to another aspect of the present invention is a control method for a drug sorting device that includes a plurality of sorting containers and sorts drugs of unknown types into the sorting containers for each type. The drug sorting device includes an infrared sensor that receives infrared light emitted from a drug. The control method includes an acquisition step of acquiring waveform data indicating the relationship between the frequency and intensity of the infrared light received by the infrared sensor, and a determination step of determining a sorting container for accommodating the drug of unknown type based on the waveform data of the drug of unknown type acquired in the acquisition step and the waveform data of a drug that has already been sorted into the sorting container. [Effect of the Invention]

[0013] According to one aspect of the present invention, master data can be easily registered. Further, according to another aspect of the present invention, the sorting process of drugs can be performed without registering the master data in advance.

Brief Description of Drawings

[0014]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Figure 24

Figure 25

Embodiments for Carrying Out the Invention

[0015] 〔Underlying Configuration〕 FIG. 1 is a block diagram showing a configuration example of the drug sorting system 100. As shown in FIG. 1, the drug sorting system 100 includes, for example, a drug sorting device 1 and a data creation device 20. First, prior to the description of each embodiment of the present invention, the configuration of the drug sorting device 1 will be described as an underlying configuration.

[0016] (Overview of the medicine sorting device 1) FIG. 2 is a diagram showing a configuration example of the medicine sorting device 1. In FIG. 2, reference numeral 201 is a perspective view of the medicine sorting device 1, and reference numeral 202 is a perspective view showing the basic configuration of the medicine sorting area 2. First, the overview of the medicine sorting device 1 will be described with reference to FIGS. 1 and 2. As shown in FIG. 1 and reference numerals 201 and 202 in FIG. 2, the medicine sorting device 1 includes a medicine sorting area 2, a touch panel 3, and a packaging mechanism 6 (packaging unit).

[0017] The medicine sorting device 1 images each of a plurality of types of medicines, determines the type of medicine based on the image obtained as a result of the imaging, and sorts the medicines for each type. Specifically, this process is performed in the medicine sorting area 2. The medicine sorting area 2 (the internal configuration of the medicine sorting device 1) will be described later.

[0018] In the present embodiment, the plurality of types of medicines are medicines not contained in a container or the like, or medicines not subjected to packaging or the like, and as an example thereof, tablets or capsules will be described. Also, the plurality of types of medicines will be described as returned medicines. As for the return of medicines, there are cases where the adopted medicines in a pharmacy or a hospital are returned as "returned medicines" at the pharmacy or the hospital, and cases where, in the pharmacy or the hospital, in addition to the adopted medicines, "bring-your-own medicines" that may also include medicines issued by other pharmacies or hospitals are returned. In other words, the concept of the returned medicine includes at least one of the above "returned medicines" and "bring-your-own medicines". The medicine sorting device 1 can automatically perform the processes from imaging to sorting after the medicine is returned.

[0019] The touch panel 3 receives various user inputs at the operation unit 31 and displays various images (e.g., an image showing the transition of medicine sorting) at the display unit 32.

[0020] The sub-packaging mechanism 6 sub-packages the sorted drugs. By including the sub-packaging mechanism 6, the drug sorting device 1 can automatically perform the processes from sorting to sub-packaging. As the sub-packaging mechanism 6, it is possible to adopt the sub-packaging part of a conventionally used tablet sub-packaging machine or powder sub-packaging machine. In this case, for example, the drugs sorted for each same drug type can be sub-packaged into one or a plurality of packages.

[0021] (Basic configuration of the drug sorting area 2) Next, with reference to the reference numeral 202 in FIGS. 1 and 2, the basic configuration (internal configuration of the drug sorting device 1) of the drug sorting area 2 will be described.

[0022] As shown by the reference numeral 202 in FIGS. 1 and 2, the drug sorting area 2 mainly includes, as hardware, a first storage unit 11, a conveying and sorting unit 12 (conveying unit), an imaging unit 13, a second storage unit 14 (storage unit), a standby tray 15 (temporary storage unit), a collection tray 16, a drug input port 17, and a first dispensing mechanism 4. And each member except the conveying and sorting unit 12 is provided on a pedestal 19.

[0023] The first storage unit 11 stores a plurality of types of drugs returned by the user in a mixed state. In this embodiment, the first storage unit 11 is divided into a plurality of storage units. In this case, for example, when all the drugs stored in one storage unit are conveyed by the conveying and sorting unit 12, the drugs stored in the storage unit adjacent to the said storage unit become the conveyance target. Also, the first storage unit 11 may be provided so as to be rotatable with respect to the Z axis (center of the cylindrical shape). In this case, the control unit 60a of the computer 60 may rotate the first storage unit 11 so that the conveying and sorting unit 12 can easily acquire the drugs, for example, at the timing when one storage unit becomes empty.

[0024] In the second storage unit 14, a plurality of sorting cups 141 (sorting containers) for storing the drugs sorted by type can be arranged. The control unit 60a determines the type of the drug based on the image of the drug captured by the imaging unit 13, and determines the sorting cup 141 for storing the drug based on the determination result. The drug is transported and stored in the determined sorting cup 141 by the transport and sorting unit 12.

[0025] The standby tray 15 is a storage unit where the drugs are temporarily placed. For example, when all of the sorting cups 141 are filled with drugs, the drugs determined by the control unit 60a to be of other types are temporarily placed on the standby tray 15. In this case, after the drugs are removed from the sorting cup 141, they may be transported from the standby tray 15 to the sorting cup 141.

[0026] Also, in the process of transporting the drugs temporarily placed on the standby tray 15 to the sorting cups 141, when all of the sorting cups 141 are filled with drugs, the drugs determined by the control unit 60a to be of other types may be temporarily placed in the first storage unit 11. That is, the first storage unit 11 may be used as a second standby tray after the transportation of the drugs from the first storage unit 11 to the sorting cups 141 or the standby tray 15 is completed. Thereafter, when all of the sorting cups 141 are filled with drugs, the control unit 60a alternately places the drugs determined by the control unit 60a to be of other types on the standby tray 15 and the first storage unit 11. Thereby, by arranging the already determined drugs and the drugs not yet determined in different places, the possibility of their confusion can be reduced. However, the drug sorting device 1 may further include a second standby tray different from both the standby tray 15 and the first storage unit 11. In this case, the first storage unit 11 is not used as the second standby tray.

[0027] In addition, in the present embodiment, the standby tray 15 may temporarily hold a presumed drug (described later) presumed to be a drug. When the presumed drug is temporarily placed on the standby tray 15, the presumed drug may be conveyed to a predetermined area of the second storage unit 14 according to the determination result of the control unit 60a.

[0028] The collection tray 16 is a storage unit that stores objects whose types cannot be determined by the control unit 60a (e.g., foreign objects other than drugs). Examples of foreign objects other than drugs include fragments of PTP (Press Through Pack) sheets. Fragments of PTP sheets may be mixed into the first storage unit 11 when the drug is returned. In addition, the control unit 60a also stores in the collection tray 16 drugs registered as drugs to be discarded in the drug database or drugs desired to be discarded by the user (e.g., drugs with an old manufacturing date).

[0029] The drug input port 17 is for discharging the drug stored in the second storage unit 14 to the packaging mechanism 6. In the drug sorting device 1, the first discharging mechanism 4 or the conveying and sorting unit 12 discharges the drug stored in the second storage unit 14 to the packaging mechanism 6 by inputting it into the drug input port 17.

[0030] As shown in FIG. 1, the drug sorting device 1 includes a computer 60 that comprehensively controls the above-described respective members (hardware). The computer 60 mainly includes, as a control unit 60a (software), a conveyance control unit 61, a sorting control unit 62, an imaging control unit 63, a determination unit 64, an operation input unit 65, a display control unit 66, a take-out control unit 67a, an inclination control unit 67b, and a packaging control unit 68.

[0031] The operation input unit 65 and the display control unit 66 control the operation unit 31 and the display unit 32 of the touch panel 3, respectively. The packaging control unit 68 controls the packaging mechanism 6 to package the drug input from the drug input port 17.

[0032] In the following description, when explaining the operation of the hardware based on the software control, there may be cases where the operating entity is assumed to be the hardware.

[0033] In addition, the computer 60 includes a storage unit 80. The storage unit 80 manages drug data related to a plurality of types of drugs in a drug database (drug master), and stores image data indicating an image captured by the first camera 131 and the like. Note that the various data stored in the storage unit 80 may not be managed by the storage unit 80, and may be managed by an external device, for example. In this case, the control unit 60a may acquire the various data from the external device through a communication line such as the Internet as necessary. Further, the drug database may be updated when new drug data is added.

[0034] 〔Outline of processing in the drug sorting device 1〕 In the drug sorting device 1, the conveyance and sorting unit 12 conveys each drug returned to the first storage unit 11 to the imaging unit 13. The imaging unit 13 sequentially images each conveyed drug. The control unit 60a determines the type of each drug based on the captured image, and determines the sorting position of each determined drug in the second storage unit 14. The conveyance and sorting unit 12 conveys each drug to the determined sorting position. Then, information about the drug stored in the second storage unit 14 is written to the RFID tag of the sorting cup 141, stored in the storage unit 80, or displayed on the touch panel 3. Further, after the sorting of the drugs is completed or during the sorting, the user operates the touch panel 3 to perform processes such as packaging. Hereinafter, each process will be specifically described.

[0035] 〔Drug conveyance process to the imaging unit 13〕 First, the drug conveyance process from the first storage unit 11 to the imaging unit 13 will be described with reference to reference numeral 201 in FIGS. 1 and 2.

[0036] Specifically, the conveyance and sorting unit 12 conveys the drug stored in the first storage unit 11 to the acceptance area Ar1 (see reference numeral 302 in FIG. 3) where the imaging unit 13 accepts the drug. The conveyance control unit 61 controls the conveyance process by the conveyance and sorting unit 12.

[0037] The conveying and sorting unit 12 includes a second camera 121, a suction and shutter mechanism 122, and a conveying mechanism 123. The conveying and sorting unit 12 further includes a container taking-out mechanism 124.

[0038] The second camera 121 sequentially images the first storage unit 11 in order to identify the drug to be conveyed. The imaging control unit 63 controls the imaging process of the second camera 121. The second camera 121 is provided at an end of the conveying and sorting unit 12 (specifically, at least the housing including the suction and shutter mechanism 122) on the side facing the pedestal 19. The second camera 121 may be provided at the tip of the suction mechanism. The imaging control unit 63 analyzes the captured image and determines whether the drug is included in the image. When it is determined that the drug is included, the conveyance control unit 61, for example, moves the tip portion closer to the first storage unit 11 and identifies the drug included in the image captured at that time as the drug to be conveyed.

[0039] The suction and shutter mechanism 122 includes a suction mechanism that suctions the drug identified as the conveyance target, and a shutter mechanism that prevents the drug suctioned by the suction mechanism from falling. The suction mechanism is provided so as to be movable in the Z-axis direction. The shutter mechanism is provided in front of the end portion so as to be movable substantially parallel to the XY plane.

[0040] At the time of drug acquisition, the suction mechanism extends from the end portion, and at the tip portion thereof, after suctioning the identified drug, it returns to the position of the end portion. In this state, the conveyance control unit 61 moves the shutter mechanism to a position facing the end portion and maintains the position of the shutter mechanism (keeps it in a closed state) during drug conveyance. When the conveyance control unit 61 moves the suction and shutter mechanism 122 to a position facing the drug placement table 133a (refer to reference numeral 302 in FIG. 3) of the drug holding mechanism 133 arranged in the receiving area Ar1, the conveyance control unit 61 moves the shutter mechanism to a position not facing the end portion (keeps it in an open state). Then, after extending the suction mechanism from the end portion, the suction state is released to place the drug on the drug placement table 133a.

[0041] The transport mechanism 123 moves the suction / shutter mechanism 122 in the X-axis and Y-axis directions under the control of the transport control unit 61. With this transport mechanism 123, it is possible to move the suction / shutter mechanism 122 during the search for the drug to be transported on the first storage unit 11, or to transport the drug from the first storage unit 11 to the drug placement table 133a. Also, it is possible to transport the drug from the drug placement table 133a to the second storage unit 14, the standby tray 15, or the collection tray 16. Furthermore, it is possible to transport the drug from the second storage unit 14 to the drug inlet 17.

[0042] 〔Drug imaging process〕 Next, the drug imaging process by the imaging unit 13 will be described with reference to FIGS. 1 and 2, reference numeral 202, and FIG. 3. Reference numerals 301 and 302 in FIG. 3 are perspective views showing the overall configuration of the imaging unit 13. The above drug imaging process is mainly performed by the imaging unit 13 and the imaging control unit 63.

[0043] Specifically, the imaging unit 13 is placed on the drug placement table 133a and images the drug placed in the placement area Ar2 (imaging area) which is the imaging target shown by reference numeral 302 in FIG. 3. The imaging control unit 63 controls the imaging process by the imaging unit 13, the turning movement of the first camera 131 and the illuminator 134, and the movement of the drug holding mechanism 133. As shown in FIGS. 1 and 3, the imaging unit 13 includes a first camera 131 (imaging unit, first imaging unit), a rotation mechanism 132 (rotating unit), a drug holding mechanism 133 (drug placement table, moving mechanism), and an illuminator 134 (ultraviolet light irradiation unit, visible light irradiation unit).

[0044] The first camera 131 images the drug placed in the placement area Ar2 facing the first camera 131 in order to discriminate the type of the drug in the discrimination unit 64 described later. The drug holding mechanism 133 is a mechanism for holding the drug, and as shown by reference numerals 301 and 302 in FIG. 3, includes a drug placement table (petri dish) 133a, a turning mechanism 133b (moving mechanism), and a shaft portion 133c connecting the drug placement table 133a and the turning mechanism 133b. The drug placement table 133a is for placing the drug to be imaged. The turning mechanism 133b moves the drug placement table 133a. Specifically, the drug placement table 133a is turned with respect to the XY plane, and the shaft portion 133c is turned in the circumferential direction of the shaft portion 133c.

[0045] When the drug conveyed from the first storage unit 11 is placed on the drug placement table 133a, the imaging control unit 63 drives the turning mechanism 133b to move the drug placement table 133a from the receiving area Ar1 to the placement area Ar2. Thereafter, at least the first camera 131 and the illuminator 134 are controlled to image the drug placed in the placement area Ar2. The captured image is stored in the storage unit 80 as image data. The imaging control unit 63 drives the turning mechanism 133b, for example, after the imaging is completed, to move the drug placement table 133a on which the imaged drug is placed from the placement area Ar2 to the receiving area Ar1.

[0046] In the present embodiment, two drug placement tables 133a are provided at the tip (end) of the shaft portion 133c. When the turning mechanism 133b turns the shaft portion 133c, when one drug placement table 133a is placed in the placement area Ar2, the other drug placement table 133a is placed in the receiving area Ar1. When imaging the drug in the placement area Ar2, by conveying the drug from the first storage unit 11 to the drug placement table 133a existing in the receiving area Ar1 by the conveying and sorting unit 12, continuous imaging processing of the drug becomes possible. It should be noted that it is assumed that the drug placement table 133a is in a state where no drug is placed, such as after the drug sorting process to the second storage unit 14.

[0047] The illuminator 134 emits light that irradiates the drug during imaging of the drug under the control of the imaging control unit 63. As shown by reference numeral 301 in FIG. 3, the illuminator 134 includes a visible light irradiation unit (a first irradiation unit 134a and a second irradiation unit 134b) that irradiates the drug with visible light, and an ultraviolet light irradiation unit 134c that irradiates the drug with ultraviolet light.

[0048] The first irradiation unit 134a and the second irradiation unit 134b irradiate the drug with white light as visible light. The first irradiation unit 134a is a bar-shaped visible light source (bar illumination), and the second irradiation unit 134b is a ring-shaped visible light source (ring illumination). The first camera 131 acquires an image (visible light image) based on visible light by receiving the visible light emitted from the first irradiation unit 134a or the second irradiation unit 134b and reflected by the drug. The imaging control unit 63 outputs the image data indicating the visible light image acquired by the first camera 131 to the discrimination unit 64.

[0049] The ultraviolet light irradiation unit 134c irradiates the drug with ultraviolet light (for example, light having a peak wavelength of 365 nm or more and 410 nm or less) to excite the components contained in the drug. As a result, fluorescence (for example, light having a peak wavelength of 410 nm or more and 800 nm or less) is extracted from the drug. The first camera 131 acquires an image (ultraviolet light image) based on ultraviolet light by receiving the fluorescence emitted from the drug. The imaging control unit 63 outputs the image data indicating the ultraviolet light image acquired by the first camera 131 to the discrimination unit 64.

[0050] As shown in FIG. 3, the rotation mechanism 132 rotates the first camera 131 so as to turn around the arrangement region Ar2 (the drug placement table 133a arranged at the position) where the drug to be imaged is arranged. The first camera 131 images the drug arranged in the arrangement region Ar2 from a plurality of positions rotated by the rotation mechanism 132. Specifically, the imaging mechanism including the first camera 131 and the illuminator 134 is rotated so as to turn around the arrangement region Ar2. Therefore, the first camera 131 can image the drug from a plurality of directions while maintaining the positional relationship between the first camera 131 and the illuminator 134 with respect to the arrangement region Ar2.

[0051] As shown by reference numeral 301 in FIG. 3, the rotation mechanism 132 includes an imaging mechanism drive unit 132a and a power transmission mechanism 132b. The imaging mechanism drive unit 132a generates power for rotating the imaging mechanism around the arrangement area Ar2. The power transmission mechanism 132b transmits the power generated by the imaging mechanism drive unit 132a to the imaging mechanism. The imaging mechanism drive unit 132a is driven under the control of the imaging control unit 63 to change the position of the imaging mechanism around the arrangement area Ar2.

[0052] The rotation mechanism 132 rotates the imaging mechanism between the initial position and the position opposite to the initial position. The initial position is a position substantially perpendicular to the arrangement area Ar2 and above the arrangement area Ar2. The position opposite to the initial position is a position substantially perpendicular to the arrangement area Ar2 and below the arrangement area Ar2.

[0053] 〔Image Processing and Discrimination Processing〕 Next, image processing for the image captured by the imaging unit 13 and drug discrimination processing based on the result of the image processing will be described with reference to FIG. 1. The above image processing is mainly performed by the imaging control unit 63, and the above discrimination processing is mainly performed by the discrimination unit 64.

[0054] The discrimination unit 64 discriminates the type of drug based on the image of the drug captured by the first camera 131. Specifically, the discrimination unit 64 discriminates the type of drug based on the imaging result (visible light image) of the drug captured in a state where visible light is irradiated from the first irradiation unit 134a or the second irradiation unit 134b. Further, the discrimination unit 64 discriminates the type of drug based on the imaging result (ultraviolet light image) of the drug captured in a state where ultraviolet light is irradiated.

[0055] The discrimination unit 64 extracts the features of the drug contained in the image by performing image analysis on each of the visible light image and / or the ultraviolet light image. Examples of the features of the drug include size, shape, engraving, printing, score line, representative color (the color of the area with engraving or printing). When performing OCR (Optical Character Recognition) or the like, as the features of the drug, identification information (identification information for identifying the drug) indicating the drug name or manufacturer represented by the engraving or printing, and other information such as the expiration date are extracted. In the case of the ultraviolet light image, the representative color of the drug in the image is an example of the feature of the drug. The discrimination unit 64 associates the extracted features of each drug with the image data of the drug and stores them in the storage unit 80. Note that the feature extraction of the drug may be performed by a known technique.

[0056] The discrimination unit 64 discriminates the type of the drug by comparing the features of each drug with the drug database. The discrimination unit 64 narrows down the candidates for the drug data related to the imaged drug from the drug database by using pattern matching or the like based on the extracted features of the drug. In this case, for example, at least one of the above-mentioned size, shape, engraving, printing, score line, and representative color is used to narrow down the candidates for the drug data. Then, the discrimination unit 64 performs OCR or the like, reads the identification information or the like represented by the engraving or printing, and further narrows down the type of the drug from the above candidates by using pattern matching or the like.

[0057] In addition, even when the features of the drug (target features) extracted by using pattern matching or the like are not in the drug database, if it is estimated that the drug is a drug (tablet or capsule) based on at least a part of the target features, the discrimination unit 64 discriminates the type of the drug as an estimated drug. In this case, the estimated drug can also be a sorting target for the second storage unit 14 or the standby tray 15. In the present embodiment, the estimated drug may first be temporarily placed on the standby tray 15.

[0058] The discrimination unit 64 outputs the discrimination result of the type of drug to the sorting control unit 62. For example, when the type of drug can be specified as one, or when the number of candidates is narrowed down to within a predetermined number, the drug data regarding the drug is output as the discrimination result. In this case, the discrimination unit 64 stores the drug data regarding the drug in the storage unit 80 in association with the image data of the drug.

[0059] When the discrimination unit 64 discriminates the type of drug as the estimated drug, it outputs the characteristics of the drug (the characteristics of the object estimated as the estimated drug) as the discrimination result. On the other hand, when the discrimination unit 64 discriminates that the drug is registered as a drug to be discarded in the drug database, or when it discriminates that the object stored in the first storage unit 11 is a foreign object other than a drug, it outputs that the drug is not subject to sorting as the discrimination result.

[0060] Based on the discrimination result by the discrimination unit 64, the conveying and sorting unit 12 executes a drug sorting process of storing the drugs in the second storage unit 14 for each type or storing them in the standby tray 15. The sorting control unit 62 controls the conveying and sorting unit 12 to convey the drug arranged in the receiving area Ar1 after the imaging and discrimination processes to a predetermined sorting cup 141 in the second storage unit 14 or the standby tray 15 based on the discrimination result.

[0061] (First dispensing mechanism) The container extraction mechanism 124 of the conveying and sorting unit 12 takes out the sorting cup 141 from the second storage unit 14 and delivers it to the first dispensing mechanism 4. Specifically, the container extraction mechanism 124 takes out the sorting cup 141 from the second storage unit 14 by gripping and lifting a part of the sorting cup 141. However, the container extraction mechanism 124 may be an independent mechanism separate from the conveying and sorting unit 12.

[0062] The first dispensing mechanism 4 is configured to dispense the drugs contained in the sorting cup 141 to the packaging mechanism 6 for each sorting cup 141. At this time, the first dispensing mechanism 4 tilts the sorting cup 141 received from the container extraction mechanism 124 to dispense the drugs contained in the sorting cup 141 to the packaging mechanism 6. However, depending on conditions such as the type and quantity of the drugs, it may not be possible to dispense all the drugs by simply tilting the sorting cup 141. In this case, the first dispensing mechanism 4 completely turns the sorting cup 141 upside down. The control unit 60a measures the mass of the sorting cup 141 (and the drugs therein) by, for example, a mass measurement mechanism (not shown), and determines that all the drugs have been dispensed when the mass becomes substantially equal to the mass of the sorting cup 141.

[0063] As described above, in the drug sorting device 1, the mechanism for taking out the sorting cup 141 from the second storage unit 14 and the mechanism for tilting the taken-out sorting cup 141 are separate. In the second storage unit 14, the sorting cups 141 are arranged in a state where they are close to each other in order to increase the storage rate of the sorting cups 141. By configuring the taking-out mechanism and the tilting mechanism separately, in order to appropriately take out the sorting cup 141 to be taken out from a plurality of sorting cups 141 arranged close to each other, a container extraction mechanism 124 suitable for taking out the sorting cup 141 can be used. Furthermore, in order to reliably hold the sorting cup 141 and tilt it at a desired angle, a first dispensing mechanism 4 suitable for holding and tilting the sorting cup 141 can be used. Therefore, in a state where the sorting cups 141 are arranged in a highly concentrated manner in the second storage unit 14, after the container extraction mechanism 124 appropriately takes out the sorting cup 141 to be taken out, the first dispensing mechanism 4 can tilt the sorting cup 141 to dispense the drugs in the sorting cup 141.

[0064] (Second dispensing mechanism) The suction / shutter mechanism 122 also operates as a second dispensing mechanism that individually dispenses the drugs stored in the second storage unit 14. Specifically, when dispensing is performed by the suction / shutter mechanism 122, the drugs are conveyed one by one from the sorting cup 141 arranged in the second storage unit 14 to the packaging mechanism 6 and dispensed.

[0065] When only the first dispensing mechanism 4 dispenses the drugs stored in the second storage unit 14 to the packaging mechanism 6, the upper limit of the number of drugs that can be stored in one sorting cup 141 is limited to the upper limit of the number of drugs that the packaging mechanism 6 can package in one packaging (hereinafter referred to as the packaging upper limit). For this reason, when conveying the drugs from the first storage unit 11 or the standby tray 15 to the second storage unit 14, the number of drugs that cannot be stored in the second storage unit 14 may increase, and the efficiency of drug conveyance may decrease.

[0066] In the drug sorting device 1, the control unit 60a determines whether the number of drugs stored in the sorting cup 141 is more than a specified number. The specified number is, for example, the packaging upper limit. However, the specified number may be another value smaller than the packaging upper limit. When the number of drugs stored in the sorting cup 141 is more than the specified number, the conveyance control unit 61 controls the suction / shutter mechanism 122 to dispense the drugs from the sorting cup 141 to the packaging mechanism 6. When the number of drugs stored in the sorting cup 141 is less than or equal to the specified number, the extraction control unit 67a controls the container extraction mechanism 124 to take out the sorting cup 141 from the second storage unit 14 and transfer it to the first dispensing mechanism 4. Thereafter, the tilt control unit 67b controls the tilt mechanism 42 to dispense the drugs from the sorting cup 141 to the packaging mechanism 6.

[0067] 〔Embodiment 1〕 As shown in FIG. 1, the drug sorting system 100 further includes a data creation device 20. The data creation device 20 is a device that creates master data to be added to the drug database. The master data is drug data regarding each type of drug. The master data is data in which, for example, a master image to be compared with an image of the drug to be sorted, a drug code which is an example of information for identifying the drug, and the name of the drug are associated with each other. As shown in FIG. 1, the data creation device 20 includes a control unit 21, a storage unit 22, a display unit 23, and an input unit 24.

[0068] The control unit 21 performs a process of creating master data. The specific configuration of the control unit 21 will be described as another embodiment.

[0069] The storage unit 22 is a storage device that stores information necessary for control by the control unit 21. However, in the data creation device 20, the storage unit 22 is not essential. The data creation device 20 may be communicably connected to an external storage device that stores information necessary for control by the control unit 21.

[0070] The display unit 23 is a display device that displays an image such as a message for the user. The input unit 24 is an input device that receives a user input to the data creation device 20. As the display unit 23 and the input unit 24, known ones can be used without particular limitation.

[0071] FIG. 4 is a flowchart showing an example of a method for creating master data according to Embodiment 1. In the present embodiment, it will be described that the control unit 21 executes a series of processes.

[0072] First, the control unit 21 acquires an image of the drug (S1). The image of the drug may be an image of the estimated drug stored in the standby tray 15, which was captured during the above-described sorting of the drug. Alternatively, the image of the drug may be an image obtained by imaging the drug stored in the second storage unit 14 after the above-described sorting of the drug. At this time, images captured from a plurality of different angles are obtained for each drug.

[0073] Next, the control unit 21 creates a thumbnail image that the user refers to in order to select the drug for creating the master data (S2). Further, the control unit 21 receives a user operation for selecting an image of the drug for creating the master data (S3).

[0074] After receiving the above user operation, the control unit 21 checks whether the selected drug image is in focus (S4). Specifically, the control unit 21 receives a user operation for selecting an image to be checked from among a plurality of images of the selected drug, and checks the image.

[0075] Hereinafter, it will be described assuming that the image checked is in focus. If the image checked is not in focus, the control unit 21 may receive a user operation for selecting another image of the selected drug and check the image. Further, when the out-of-focus images are consecutive, the control unit 21 may display a message prompting the user to adjust the focus of the camera.

[0076] The control unit 21 receives a user operation for creating temporary master data (S5). The temporary master data is data including an image of the drug and an image in which a mark is drawn on the image of the drug (an image showing the locus of the mark) by receiving a user operation of tracing a mark formed on the drug and indicating identification information for identifying the drug. Specifically, the control unit 21 receives an input of the identification information included in the drug image as character information. At this time, the control unit 21 may perform an operation of rotating the image so that the characters are in the correct orientation. Further, the control unit 21 receives an input of drawing by the user for the mark image in the drug image.

[0077] The above mark is a sign formed on the surface of the drug. For example, characters (including alphabets, numbers, etc.), symbols, designs, pictures, lines (e.g., scoring lines), or code information such as two-dimensional codes formed to indicate the type or manufacturer of the drug are also included in the scope of the above mark. Also, the method of forming the above mark is not particularly limited. For example, the above mark may be formed by engraving the surface of the drug, or may be formed by printing on the surface of the drug.

[0078] Subsequently, the control unit 21 receives a user operation regarding the check result as to whether the angle of the image of the drug included in the temporary master data is appropriate (S6). The control unit 21 may display a message prompting the user to perform the check and receive the input of the check result. The user may perform the above angle check by visually recognizing the image on which the mark is drawn. When the image on which the mark is drawn is upright, the user may determine that the above angle is appropriate.

[0079] Hereinafter, it will be described on the assumption that the user has input the check result that the angle of the image on which the mark is drawn is appropriate. If the image on which the mark is drawn includes an image with an inappropriate drug orientation such as diagonal or horizontal, the user inputs the check result that the angle of the above image is inappropriate. In this case, the control unit 21 deletes the temporary master data and executes step S5 again.

[0080] Based on the identification information of the temporary master data, the control unit 21 renames the code for identifying the temporary master data to the drug code of the country where the drug sorting device 1 is used (S7). The code for identifying the temporary master data only needs to be assigned so that the codes of each temporary master data are different. Thereafter, the control unit 21 changes the image of the drug included in the temporary master data to an appropriate size (S8).

[0081] Next, the control unit 21 checks whether master data similar to the temporary master data is included in the drug database (S9). If master data similar to the temporary master data is included in the drug database, the control unit 21 deletes one of the temporary master data and the existing master data included in the drug database.

[0082] For example, the control unit 21 may check whether the drug code assigned to the temporary master data matches the drug code included in the existing master data managed in the drug database. Further, the control unit 21 may perform the above check by, for example, collating the image of the drug included in the temporary master data with the image of the drug included in the existing master data. In this case, the control unit 21 may have the function of the discrimination unit 64 described above. Furthermore, the control unit 21 may, for example, display a message prompting the user to check and receive the input of the check result.

[0083] After the check in S9, the control unit 21 receives the user's input regarding the name of the drug and creates a link file associating the name with the temporary master data (S10). Thereby, the creation of the master data is completed. Thereafter, the control unit 21 transmits the created master data to the computer 60 of the drug sorting device 1. In the computer 60, the control unit 60a registers the received master data in the drug database stored in the storage unit 80.

[0084] As described above, the data creation device 20 prompts the user's input as necessary in accordance with the uniquely determined master data creation procedure. Thereby, the user can smoothly proceed with the creation of the master data.

[0085] The drug sorting system 100 may include a plurality of data creation devices 20. In this case, in the creation of the drug database, the control units 21 provided in each of the plurality of data creation devices 20 may share and execute the above-described steps.

[0086] For example, the drug sorting system 100 may include a desktop computer and a tablet as the data creation device 20. In this case, only the reception of the drawing of the mark in step S5 may be performed by the control unit 21 provided in the tablet, and the other processes may be performed by the control unit 21 provided in the desktop computer.

[0087] 〔Embodiment 2〕 As shown in Embodiment 1, the data creation device 20 creates temporary master data that has received a user operation of tracing a mark formed on a drug in a drug image. At least one mark is formed on the drug as identification information. In the image of each drug, drawing a mark by a user operation of tracing the mark can be troublesome for the user. Also, variations among users can occur in the accuracy of drawing the mark.

[0088] According to the data creation device 20 of the present embodiment, by executing the following processes, a master image can be created without drawing a mark. Therefore, according to the data creation device 20 of the present embodiment, master data can be created easily. Also, the time required to create the master data can be shortened. Further, according to the data creation device 20 of the present embodiment, it is possible to achieve leveling of the accuracy of drawing associated with personal work. Therefore, the user can accurately check the suitability of the angle of the drug image included in the temporary master data.

[0089] Hereinafter, an example of the functions and processes in the data creation device 20 of the present embodiment will be described with reference to FIGS. 1, 5 to 9. FIG. 5 is a diagram showing an example of a display image (display screen) that displays an image of a drug selected to create master data. FIG. 6 is a diagram showing an example of a display image that displays the extraction result of a mark area in the image of the selected drug and a display image that displays the image of the drug to be registered as a master image. FIG. 7 is a diagram showing another example of a display image that displays the extraction result of a mark area in the image of the selected drug. FIG. 8 is a diagram showing an example of a display image for explaining the resetting of the mark area shown in FIG. 7. FIG. 9 is a diagram showing yet another example of a display image that displays the extraction result of a mark area in the image of the selected drug and another example of a display image for explaining the resetting of the mark area.

[0090] As shown in FIG. 1, in the data creation device 20 of the present embodiment, the control unit 21 includes, for example, a reception unit 211, an extraction unit 212, a numbering unit 213, a display control unit 214, a setting unit 215, and a creation unit 216. The storage unit 22 of the present embodiment includes a learned model 221.

[0091] The reception unit 211 receives the input of identification information indicated by at least one mark formed on the drug. The reception unit 211 receives the input of identification information via the input unit 24. The display control unit 214 displays, on the display unit 23, a display image for extracting the identification information of the drug, including the image of the drug specified by the user from among the images of a plurality of drugs of unknown types that have been imaged. Reference numeral 1001 in FIG. 5 is a display image showing a state in which the result of the reception unit 211 receiving the identification information is displayed in the dialog box DB1.

[0092] When the drug is in tablet form, the reception unit 211 receives the input of identification information on each of one surface (referred to as the front surface) and the other surface (referred to as the back surface) of the drug. The display control unit 214 displays the identification information on the front surface received by the reception unit 211 in the "F" column of the display area DAR1 shown by reference numeral 1002 in FIG. 5. Further, the display control unit 214 displays the identification information on the back surface received by the reception unit 211 in the "R" column of the display area DAR1 shown by reference numeral 1002 in FIG. 5.

[0093] In the example of FIG. 5, five characters "SW132" are shown as identification information on the front surface of the drug, and nothing is shown on the back surface. Therefore, in the example of FIG. 5, "SW132" is displayed in the "F" column of the display area DAR1, and nothing is displayed in the "R" column of the display area DAR1.

[0094] Also, the arrow shown by reference numeral 1001 in FIG. 5 indicates the orientation DR1 of the drug in the image of the drug. In the display image, when the orientation DR1 of the drug is not upward, the user changes the orientation DR1 of the drug so that the orientation DR1 of the drug is upward. The control unit 21 changes the orientation DR1 of the drug by rotating the image of the drug with the perpendicular line of the display image as the rotation axis when receiving a user operation to change the orientation DR1 of the drug. Reference numeral 1002 in FIG. 5 is a diagram showing an example of the display image after the orientation DR1 of the drug is changed to upward.

[0095] Also, when the drug is a tablet, when the user determines whether the orientation DR1 of the drug is upward, the user selects whether the mark formed on the drug is a stamp or a print. The control unit 21 receives the selection of stamp or print in the radio button BO1 shown by reference numeral 1002 in FIG. 5.

[0096] The extraction unit 212 extracts at least one mark area including one mark formed on the drug from the captured image of the drug. The extraction unit 212 may extract at least one mark area by performing image processing on the image of the drug. In the present embodiment, the extraction unit 212 extracts the mark area based on the output value obtained by inputting the image of the drug into the learned model 221 constructed to extract the mark area.

[0097] In the present embodiment, as an example of the learned model 221, a segmentation model that has been learned to distinguish between the pixels constituting the mark and the pixels constituting the background portion of the mark in the image of the drug is used. As an example of the segmentation model, a semantic segmentation model (hereinafter referred to as an SS model) can be mentioned. By using the SS model as the learned model 221, it becomes possible to accurately extract marks having an irregular shape.

[0098] When the captured image of the drug is input to the SS model, the SS model calculates a probability value indicating the probability that each pixel constituting the image of the drug is a pixel constituting the mark. The higher the probability value of a pixel, the higher the possibility that the pixel constitutes the mark, and the lower the probability value of a pixel, the higher the possibility that the pixel constitutes the background portion. Then, the SS model outputs data in which the pixels constituting the mark and the pixels constituting the background portion are classified based on the probability value (for example, data in which the pixels constituting the background area are classified as 0 and the pixels constituting the mark are classified as 1).

[0099] Therefore, the extraction unit 212 can perform image processing on the output value obtained by inputting the image of the drug into the SS model. For example, the extraction unit 212 may set the pixel whose output value of the SS model is 0 to (R, G, B) = (255, 255, 255), and the pixel whose output value of the SS model is 1 to (R, G, B) = (0, 0, 0). In this case, the extraction unit 212 can represent the pixels constituting the background area in white and the pixels constituting the mark in black, and can extract one group of pixels represented in black as one area. In this way, the extraction unit 212 can extract the mark area based on the output value of the SS model.

[0100] The learned model 221 may be a model that outputs the above probability value as an output value. In this case, the extraction unit 212 determines whether the probability value of each pixel output from the learned model 221 is equal to or greater than a predetermined threshold, and determines the pixel value of each pixel based on the determination result.

[0101] In the present embodiment, as shown by reference numeral 1002 in FIG. 5, when a user operation on the extraction button BO2 displayed on the display image is received, the extraction unit 212 extracts the mark area from the image of the drug. In the present embodiment, the control unit 21 may display or activate the extraction button BO2 after the input of the identification information and the selection by the radio button BO1 are performed. Further, the control unit 21 may display or activate the extraction button BO2 when a user operation indicating that the orientation DR1 of the drug is upward is received.

[0102] The number - assigning unit 213 assigns numbers to the symbol corresponding to the mark included in the identification information received by the reception unit 211 and the mark area extracted by the extraction unit 212. The number - assigning unit 213 assigns numbers to the mark areas extracted by the extraction unit 212 so as to correspond to the order in which the symbols corresponding to the marks constituting the identification information are input. The marks constituting the identification information are formed from the upper row to the lower row and, in each row, from left to right in a state where the orientation of the marks included in the drug image is upward. Therefore, the number - assigning unit 213 assigns numbers to the mark areas extracted by the extraction unit 212 in order from the upper row to the lower row and, in each row, from left to right in a state where the orientation of the marks included in the drug image is upward. Thereby, the number - assigning unit 213 assigns numbers in order from the upper - left mark area to the lower - right mark area. Also, the number - assigning unit 213 assigns the numbers assigned to the mark areas to the symbols constituting the input identification information in order.

[0103] The control unit 21 may assign layout information that can distinguish between the upper - row marks and the lower - row marks for a specified drug. The layout information may be, for example, information indicating the row in which the marks are formed. Also, the control unit 21 may assign information indicating that a symbol other than a character is included on the surface of the drug, such as a line (dividing line) existing between the upper - row marks and the lower - row marks for a specified drug, or may assign information indicating that the line or the like is a symbol other than a character. When information regarding a symbol other than a character is assigned, the number - assigning unit 213 may assign numbers limited to the symbol other than a character based on the information. The control unit 21 may receive the layout information or the information regarding a symbol other than a character, for example, by an input operation.

[0104] The display control unit 214 causes the display unit 23 to display various display images. In the present embodiment, the display control unit 214 displays, as a number-assigned image, a display image including a symbol with a number assigned thereto and a marked area with a number assigned thereto. The display control unit 214 displays the number assigned to the marked area in the vicinity of or superimposed on the marked area extracted by the extraction unit 212. Further, the display control unit 214 displays the number assigned to the symbol in the vicinity of or superimposed on the marked area of the symbol received by the reception unit 211 in the display area DAR1.

[0105] The display image shown by reference numeral 1011 in FIG. 6 is an example of a number-assigned image. In the example of FIG. 6, the extraction unit 212 also extracts, as marked areas, areas each including "S", "W", "1", "3", and "2" formed from top left to bottom right. Therefore, the number-assigning unit 213 assigns numbers "1" to "5" to the marked areas each including "S", "W", "1", "3", and "2" in this order. Accordingly, as shown by reference numeral 1011 in FIG. 6, the display control unit 214 displays numbers "1" to "5" for the marked areas each including "S", "W", "1", "3", and "2".

[0106] Also, the number-assigning unit 213 assigns the numbers "1" to "5" assigned to the marked areas to the marked areas in the order of "S", "W", "1", "3", and "2" received by the reception unit 211. Accordingly, as shown by reference numeral 1011 in FIG. 6, the display control unit 214 displays numbers "1" to "5" for "S", "W", "1", "3", and "2" received by the reception unit 211 in the display area DAR1.

[0107] When the creation unit 216 receives a registration operation for registering, as a master image, an image of a drug based on the identification information received by the reception unit 211 and the marked area extracted by the extraction unit 212, the creation unit 216 creates master data by associating the image of the drug as the master image with the identification information. Thereby, the creation unit 216 can create a master image without performing drawing of marks. Therefore, the creation unit 216 can easily create master data. Also, the time required for the creation unit 216 to create master data can be shortened.

[0108] In this embodiment, when the user determines that all the numbers assigned to the extracted mark area match the numbers assigned to the input symbols, the user can register the image of the drug displayed as the target for creating master data as the master image.

[0109] In this embodiment, when the display control unit 214 receives a user operation on the registration button BO3 shown by reference numeral 1011 in FIG. 6, it displays the display image shown by reference numeral 1012 in FIG. 6. As a result, the user can visually recognize the mark area extracted by the extraction unit 212 in the image of the drug. When the creation unit 216 receives a user operation on the OK button BO4 for reference numeral 1012 in FIG. 6, it registers the image of the drug as temporary master data.

[0110] The mark area corresponds to, for example, an image showing the locus when tracing the mark formed on the drug described in Embodiment 1. Therefore, when the orientation of the mark area extracted by the extraction unit 212 is upward, the user inputs the check result to the effect that the angle of the image showing the locus of the mark is appropriate. As a result, the creation unit 216 specifies the image of the drug included in the temporary master data as the master image, and creates master data by associating the master image with identification information, a drug code corresponding to the identification information, and the name of the drug.

[0111] In the example of FIG. 6, the numbers assigned to each of the mark areas including "S", "W", "1", "3", and "2" extracted by the extraction unit 212 match the numbers assigned to each of "S", "W", "1", "3", and "2" received by the reception unit 211. Therefore, when the creation unit 216 receives the input of the above check result, it associates the image of the drug displayed in the display image as the target for creating master data with the identification information "SW132" received by the reception unit 211 as if it had received the above registration operation, as the master image.

[0112] Based on the input operation on the numbered image displayed by the display control unit 214, the setting unit 215 re - sets the mark area that does not contain only one mark among the mark areas extracted by the extraction unit 212 to a mark area changed to contain only one mark.

[0113] Consider the case where in the numbered image, the number of numbers assigned to each of the multiple mark areas extracted by the extraction unit 212 does not match the number of multiple marks received by the reception unit 211. In this case, the user changes the mark area that does not contain only one mark to a mark area that contains only one mark.

[0114] (Example of re - setting the mark area when a single mark area contains multiple marks) The display image shown in FIG. 7 is an example of a numbered image. In the example of FIG. 7, the reception unit 211 has received "L", "L", "4", "3", "4" as identification information. On the other hand, the extraction unit 212 has extracted four mark areas of "LL", "4", "3", "4". That is, the extraction unit 212 extracts the two characters "L", "L" as one block of "LL".

[0115] Therefore, in the example of FIG. 7, the number - assigning unit 213 assigns numbers "1" to "4" in this order to the mark areas containing "LL", "4", "3", "4" respectively. Also, the number - assigning unit 213 assigns the numbers "1" to "4" assigned to the mark areas in the order of "L", "L", "4", "3", "4" received by the reception unit 211. Therefore, as shown in FIG. 7, the number - assigning unit 213 cannot assign a number to the "4" received last by the reception unit 211.

[0116] In such a case, the user selects the first "L" in the "LL" which is a mark area containing two marks (i.e., not containing only one mark). In reference numeral 1021 of FIG. 8, when the control unit 21 receives the selection of the area containing the first "L" in the numbered image, the display control unit 214 shows a state where the first selection area SAR1 is displayed. In this state, when the control unit 21 receives an input operation on the area button BO5, the setting unit 215 re - sets the first selection area SAR1 as one mark area.

[0117] Next, the user selects the second "L" in the "LL" which is a mark area containing two marks. In reference numeral 1022 of FIG. 8, when the control unit 21 receives the selection of the area containing the second "L" in the numbered image, the display control unit 214 shows a state where the second selection area SAR2 is displayed. In this state, when the control unit 21 receives an input operation on the area button BO5, the setting unit 215 re - sets the second selection area SAR2 as one mark area.

[0118] In this way, by the setting unit 215 re - setting the mark area so that it contains only one mark for a mark area containing a plurality of marks, the mark area can be made to correspond to the symbols included in the identification information. In this state, when the display control unit 214 receives a user operation on the registration button BO3, it can display a mark area in which each mark "L", "L", "4", "3", "4" is drawn, similar to the display image shown by reference numeral 1012 in FIG. 6.

[0119] When the setting unit 215 divides a mark area containing a plurality of marks in the re - setting of the mark area, the numbering unit 213 assigns a blank number to symbols other than the first symbol among the plurality of symbols corresponding to the plurality of marks. Then, the numbering unit 213 re - assigns the numbers for the symbols after the symbol to which the blank number is assigned, shifting them.

[0120] In the example of reference numeral 1022 in FIG. 8, a blank number is assigned to the second "L", and numbers "2" to "4" are assigned to the subsequent "4", "3", and "4". The display control unit 214 inserts a blank area SP1 in the display area DAR1 at the position where the number is assigned to the second "L".

[0121] (Example of resetting the mark area when one mark is included across a plurality of mark areas) The display image shown in FIG. 9 is an example of a numbered image. In the example of FIG. 9, the reception unit 211 receives "LL", "4", "3", and "4" as identification information. In this example, for the sake of convenience of explanation, it is assumed that "LL" is one character. On the other hand, the extraction unit 212 extracts five mark areas of "L", "L", "4", "3", and "4". That is, the extraction unit 212 extracts one character of "LL" as two blocks of "L" and "L".

[0122] Therefore, in the example of FIG. 9, the numbering unit 213 assigns numbers "1" to "5" in this order to the mark areas including "L", "L", "4", "3", and "4" respectively. Also, the numbering unit 213 assigns the numbers "1" to "4" assigned to the mark areas in the order of "LL", "4", "3", and "4" received by the reception unit 211. Therefore, the numbering unit 213 cannot assign a number greater than the number of symbols received by the reception unit 211 (in reference numeral 1031 in FIG. 9, it is "5") to the symbols.

[0123] In such a case, the user selects "LL" collectively for "L" and "L", which are mark areas including a part of one mark (that is, not including only one mark). In reference numeral 1032 in FIG. 9, when the control unit 21 receives the selection of one area including "LL" in the numbered image, the display control unit 214 shows a state where the third selection area SAR3 is displayed. In this state, when the control unit 21 receives an input operation on the area button BO5, the setting unit 215 resets the third selection area SAR3 as one mark area.

[0124] In this way, by the setting unit 215 reconfiguring the mark areas such that each of the plurality of mark areas containing one mark contains only one mark, the mark areas can be made to correspond to the symbols included in the identification information. In this state, when the display control unit 214 receives a user operation on the registration button BO3, it can display the mark areas in which each of the marks "LL", "4", "3", "4" is drawn, similar to the display image shown by reference numeral 1012 in FIG. 6.

[0125] When the setting unit 215 integrates the plurality of mark areas each containing one mark in reconfiguring the mark areas, the numbering unit 213 re-numbers as follows. The numbering unit 213 re-numbers the plurality of symbols received by the reception unit 211, with the numbers other than the first number among the plurality of numbers assigned to the plurality of mark areas deleted. In the example of reference numeral 1032 in FIG. 9, the number "2" assigned to the second mark area is deleted, and numbers "3" to "5" are assigned to the subsequent "4", "3", "4".

[0126] (Processing flow) An example of the processing flow of the control unit 21 (control method of the data creation device) according to the present embodiment will be described. FIG. 10 is a flowchart showing another example of the method for creating master data.

[0127] In a state where an image of a drug designated by the user is being displayed, the reception unit 211 receives an input of identification information indicated by at least one mark formed on the drug (S11; reception step). Next, the extraction unit 212 extracts at least one mark area containing one mark formed on the drug from the image of the drug (S12; extraction step). Next, the numbering unit 213 assigns numbers to the symbols included in the identification information received in S11 and the mark areas extracted in S12 (S13). The display control unit 214 displays the numbers assigned to the symbols and the mark areas (S14).

[0128] Thereafter, the reception unit 211 determines whether a registration operation has been received (S15). When the reception unit 211 has received a registration operation (YES in S15), master data with the image of the drug as the master image is created (S16; creation step). While waiting to receive a registration operation (NO in S15), the reception unit 211 determines whether an input operation for selecting (designating) a region in the drug image has been received (whether an input operation for the region button BO5 has been received after the region is selected) (S17).

[0129] When the reception unit 211 has not received the selection of the above region (NO in S17), the process of S15 is performed. When the reception unit 211 has received the selection of the above region (YES in S17), the setting unit 215 re - sets the selected region as the marked region (S18). Also, the number - assigning unit 213 re - assigns numbers to the symbols included in the identification information based on the re - set marked region (S19). After the process of S19, the control unit 21 performs the process of S15.

[0130] [Embodiment 3] The drug sorting device 1 may be able to receive a drug comprehensive database from a higher - level device at startup or in a preset time zone. The drug comprehensive database is a database that manages master data for multiple types of drugs that can be used in multiple drug sorting devices 1. The drug sorting device 1 may add master data included in the drug comprehensive database but not included in the drug database of the drug sorting device 1 to the drug database. The drug sorting device 1 registers the master data added from the drug comprehensive database to the drug database as master data of a new drug.

[0131] Here, the master data included in the drug comprehensive database may not include data of the drug image. In this case, the master data added to the drug comprehensive database of the drug sorting device 1 also does not include data of the drug image. When there is no data of the drug image, there is a possibility that the drug sorting device 1 cannot correctly identify the drug.

[0132] Generally, during the reception of the comprehensive drug database, the display control unit 66 causes the display unit 32 to display an image indicating the progress of the reception. However, for example, when it is set to receive the comprehensive drug database during a time period when the user is absent, such as at night, the user does not visually recognize the image indicating the progress of the reception during normal use. In this case, even if the master data added to the drug database from the comprehensive drug database does not include drug image data, there is a possibility that the user may not recognize this fact.

[0133] In the drug sorting device 1 of the present embodiment, when adding the master data included in the comprehensive drug database received from the upper device to the drug database, the display control unit 66 may cause the display unit 32 to display an image showing a list of new drugs after the addition is completed. Further, the image may include an image indicating whether the added master data includes drug image data. Thereby, the user of the drug sorting device 1 can easily recognize the presence or absence of drug image data for the master data added from the comprehensive drug database to the drug database.

[0134] Also, the display control unit 66 may continue to display the image showing the list of new drugs until an instruction input to end the display of the image is received. Thereby, the user can confirm the presence or absence of the above new drugs even when not receiving the comprehensive drug database. Further, when the image showing the list of new drugs includes an image indicating whether the added master data includes drug image data, the user can recognize the presence or absence of the drug image data.

[0135] When it is recognized that there is master data without data of the image of the drug, the user can add the data of the image of the drug to the master data using, for example, the same type of drug the user has (the same type of drug used in the hospital or pharmacy where the user works). Also, even when the user does not have the same type of drug, the user can procure the same type of drug from outside and add the data of the image of the drug to the drug database. For example, when the user stores the drug in the first storage unit 11 and the drug dispensing device 1 executes the drug dispensing process, the drug dispensing device 1 may acquire the data of the image of the drug and associate the data with the target master data.

[0136] Therefore, even when master data is added from the comprehensive drug database to the drug database and the master data does not include the data of the image of the drug, the data of the image of the drug can be associated with the master data. Therefore, the discrimination performance of the drug by the drug dispensing device 1 can be maintained.

[0137] 〔Embodiment 4〕 FIG. 11 is a diagram showing a configuration example of the subcontracting mechanism 6. Reference numeral 1041 in FIG. 11 is a diagram schematically showing a configuration example of a part of the subcontracting mechanism 6. Reference numerals 1042 and 1043 in FIG. 11 are diagrams for explaining the opening and closing operations of the upper shutter mechanism 6d, and reference numerals 1044 and 1045 are diagrams for explaining the opening and closing operations of the lower shutter mechanism 6e.

[0138] As shown by reference numeral 1041 in FIG. 11, the subcontracting mechanism 6 includes a packaging hopper 6a, a heater roller 6b, a moving passage 6c, an upper shutter mechanism 6d, and a lower shutter mechanism 6e. The control of the heater roller 6b, the upper shutter mechanism 6d, and the lower shutter mechanism 6e is performed by the subcontracting control unit 68.

[0139] The packaging hopper 6a receives the medicine that has passed (fallen) through the moving passage 6c and guides it to the packaging paper PP set on the heater roller 6b. Specifically, the packaging hopper 6a guides the medicine that has passed through the moving passage 6c to the pre-packaging medicine placement area MPAr where the medicine is placed before being packaged by the heater roller 6b. In reference numeral 1041 of FIG. 11, the packaging paper PP is indicated by a dashed line. The packaging hopper 6a has a tapered shape toward the heater roller 6b in order to place the medicine near the bottom of the heater roller 6b in the pre-packaging medicine placement area MPAr.

[0140] The heater roller 6b packages the medicine into the packaging paper PP one pack at a time. Specifically, the heater roller 6b heat-seals the packaging paper PP to package the medicine into the packaging paper PP. By placing one pack of medicine on the packaging paper PP in the pre-packaging medicine placement area MPAr, it is possible to package the medicine into the packaging paper PP for each pack of medicine.

[0141] In addition, when the packaging mechanism 6 packages the medicine taken out from the sorting cup 141 sorted by the same type, it may package all the medicine stored in one sorting cup 141 as one pack. Also, when the quantity of the medicine stored in the sorting cup 141 is large, it may be divided into a plurality of packs in predetermined quantities and packaged. A printing mechanism (not shown) provided in the packaging mechanism 6 may print the medicine name on the packaging paper PP. In this case, the packaging control unit 68 reads the medicine data from the RFID of the sorting cup 141 which is the source of the medicine extraction, and causes the medicine name of the medicine to be printed on the packaging paper PP for which the medicine has been packaged. Thereby, the user can confirm which type of medicine is packaged in each pack. Also, when the packaging mechanism 6 packages by dividing into a plurality of packs, it may print 1 / 2, 2 / 2, etc. on each pack so that the user can confirm the total number of packs of the target medicine that has been packaged. Further, the packaging mechanism 6 may print the date or time when the sorting process was executed, or information such as the ward where the sorting process was executed on the packaging paper PP.

[0142] The transfer path 6c is provided between the medicine inlet 17 into which the medicine (the medicine to be sub-packed) sorted by the conveying and sorting unit 12 is introduced, and the packaging hopper 6a, and guides the medicine introduced from the medicine inlet 17 to the packaging hopper 6a.

[0143] The upper shutter mechanism 6d is connected to the medicine inlet 17 and functions as a medicine dropping prevention part that prevents the medicine not to be sub-packed, which is introduced into the medicine inlet 17, from dropping into the sub-packaging mechanism 6. As shown by the reference numeral 1042 in Fig. 11, the upper shutter mechanism 6d includes an upper shutter 6da and an upper shutter driving part 6db.

[0144] The upper shutter 6da is an openable and closable shutter that functions as the bottom of the medicine inlet 17. The upper shutter driving part 6db controls the opening and closing operation of the upper shutter 6da by driving the upper shutter 6da. The reference numeral 1042 in Fig. 11 indicates the state where the upper shutter 6da is open, and the reference numeral 1043 indicates the state where the upper shutter 6da is closed.

[0145] The upper shutter 6da is normally in a closed state and opens when the medicine to be sub-packed is introduced into the medicine inlet 17. Specifically, the sub-packaging control unit 68 controls the conveying and sorting unit 12 to take out the medicine to be sub-packed from the corresponding sorting cup 141 and convey it to the medicine inlet 17. After the sub-packaging control unit 68 introduces the medicine into the medicine inlet 17, it controls the upper shutter mechanism 6d to open the closed upper shutter 6da. Thereby, the medicine introduced into the medicine inlet 17 is guided to the packaging hopper 6a through the transfer path 6c. The sub-packaging control unit 68 closes the open upper shutter 6da after a predetermined time (a time sufficient for the introduced medicine to drop into the transfer path 6c).

[0146] In this way, by providing the upper shutter mechanism 6d, it is possible to avoid the situation that the medicine (the medicine not to be sub-packed) accidentally dropped into the medicine inlet 17 during the operation of the medicine sorting device 1 is sub-packed by the sub-packaging mechanism 6.

[0147] The lower shutter mechanism 6e functions as a chemical holding unit that temporarily holds the chemicals introduced from the chemical inlet 17 until all the chemicals contained in one batch created by the subcontracting mechanism 6 are introduced from the chemical inlet 17. Therefore, the lower shutter mechanism 6e (specifically, the lower shutter 6ea described later) may be provided between the chemical inlet 17 and the pre-subcontracting chemical placement area MPAr. In the present embodiment, the lower shutter mechanism 6e is provided between the packaging hopper 6a and the transfer path 6c, but it is not limited thereto. For example, it may be provided inside the packaging hopper 6a or the transfer path 6c.

[0148] Also, as indicated by reference numeral 1045 in FIG. 11, the lower shutter mechanism 6e includes an openable and closable lower shutter 6ea (shutter). The lower shutter mechanism 6e also includes a lower shutter drive unit (not shown). The lower shutter drive unit controls the opening and closing operation of the lower shutter 6ea by driving the lower shutter 6ea. Reference numeral 1044 in FIG. 11 indicates a state where the lower shutter 6ea is open, and reference numeral 1045 indicates a state where the lower shutter 6ea is closed.

[0149] The lower shutter 6ea is normally in a closed state and opens when one batch of chemicals is held on the lower shutter 6ea. Specifically, the subcontracting control unit 68 opens the lower shutter 6ea after a predetermined time has elapsed since the last chemical among the plurality of chemicals included in one batch is introduced into the chemical inlet 17 and the upper shutter 6da is opened. As a result, one batch of chemicals is collectively guided to the packaging hopper 6a (that is, the pre-subcontracting chemical placement area MPAr). However, when there is only one chemical included in one batch, the last chemical is the said chemical.

[0150] By the way, the printing mechanism generates non-printed and non-subcontracted subcontracting paper PP (empty bag) before the start and after the end of continuous subcontracting. When there is one sorting cup 141 that contains the chemicals to be subcontracted, the printing mechanism generates an empty bag before the start and after the end of this subcontracting. In the following description, this empty bag is referred to as a loss bag.

[0151] In the drug sorting device 1, when a predetermined number of drugs equal to the first threshold value are stored in any one of the sorting cups 141, there is an operation mode in which the drugs stored in the sorting cup 141 are dispensed to the packaging mechanism 6. The first threshold value may be, for example, 15, but is not limited thereto. In this operation mode, if the packaging control unit 68 packages the drugs dispensed to the packaging mechanism 6 each time, a loss bag will be generated each time the drugs stored in one sorting cup 141 are packaged, resulting in an increase in loss bags.

[0152] In the drug sorting device 1, when the packaging control unit 68 stores a number of drugs equal to the first threshold value in any one of the sorting cups 141 and dispenses the drugs stored in the sorting cup 141 to the packaging mechanism 6, the packaging control unit 68 causes the drugs to wait on the lower shutter 6ea. At this time, when the drugs are dispensed to the packaging mechanism 6 by the first dispensing mechanism 4, the packaging control unit 68 keeps the upper shutter 6da open and dispenses the drugs onto the closed lower shutter 6ea. When the drugs are dispensed to the packaging mechanism 6 by the adsorption / shutter mechanism 122, the packaging control unit 68 opens the upper shutter 6da each time one tablet of the drugs is dispensed onto the closed upper shutter 6da and dispenses the drugs onto the closed lower shutter 6ea.

[0153] When the drugs are waiting on the lower shutter 6ea and a number of drugs equal to the first threshold value are stored in another sorting cup 141, the packaging control unit 68 packages the drugs that were waiting on the lower shutter 6ea. Also, for the drugs stored in the above-mentioned another sorting cup 141, the packaging control unit 68 also dispenses and packages them to the packaging mechanism 6. Thereby, the packaging control unit 68 can continuously package the drugs stored in at least two sorting cups 141. Therefore, the generation of loss bags can be reduced.

[0154] Furthermore, when the sub-packaging control unit 68 sub-packages the drugs stored in the above-described two sorting cups 141 by the sub-packaging mechanism 6, it may determine whether, for all other sorting cups 141, the number of drugs stored is equal to or greater than a second threshold value that is smaller than the first threshold value. For example, when the first threshold value is 15, the second threshold value may be 10, but it is not limited to this. The sub-packaging control unit 68 may dispense the drugs stored in the sorting cup 141 in which the number of drugs is equal to or greater than the second threshold value to the sub-packaging mechanism 6 for sub-packaging. Thereby, it is possible to continuously sub-package the drugs stored in more sorting cups 141. Therefore, the generation of waste bags can be further reduced.

[0155] 〔Embodiment 5〕 FIG. 12 is a plan view of a pedestal 19 in a drug sorting device 1A which is a modified example of the drug sorting device 1. The drug sorting device 1A includes an ionizer 18 in addition to the configuration provided in the drug sorting device 1. The ionizer 18 generates a wind containing ions in the direction indicated by the arrow 181. The ionizer 18 is arranged at a position where at least a part of the movement range of the drug by the conveyance / sorting unit 12 and the flow range of the wind containing ions overlap. Therefore, the conveyance control unit 61 can move the drug to a position where the wind containing ions hits by the conveyance / sorting unit 12.

[0156] The conveyance control unit 61 conveys the drug adsorbed by the adsorption mechanism above the target position and then blows air from the adsorption mechanism to drop the drug at the target position. However, in the drug sorting device 1A, the drug may be charged. In particular, when the drug sorting device 1A is used in an environment with low temperature and low humidity, the drug is likely to be charged. In this case, even if air is blown out from the adsorption mechanism, it may not be possible to drop the drug.

[0157] In the drug sorting device 1A, the conveyance control unit 61 blows air from the suction mechanism a certain number of times above the target position. The certain number of times may be any number that is considered sufficient for the drug to surely fall to the target position if the drug is not charged. For example, it may be 5 times, but is not limited thereto. If the fall of the drug cannot be detected after blowing air a certain number of times, the conveyance control unit 61 conveys the drug hanging from the suction mechanism due to charging to a position where it is hit by the wind from the ionizer 18. At this time, the conveyance control unit 61 conveys the drug with the shutter mechanism closed while the drug is re-adsorbed by the suction mechanism.

[0158] For example, the imaging control unit 63 may execute imaging by the second camera 121 after the suction mechanism blows air a certain number of times. Then, the imaging control unit 63 may determine whether the drug adsorbed by the suction mechanism has fallen from the suction mechanism by analyzing the image captured by the second camera 121. However, the imaging control unit 63 may execute imaging by the second camera 121 every time the suction mechanism blows air. In this case, if the imaging control unit 63 determines that the drug has fallen from the suction mechanism due to blowing air less than a certain number of times, the conveyance control unit 61 does not have to execute blowing air for the remaining number of times.

[0159] The conveyance control unit 61 holds the drug at the position where it is hit by the wind from the ionizer 18 for a certain period of time. The certain period of time may be long enough for the drug to be discharged from electricity. For example, it may be 5 seconds, but is not limited thereto. Thereby, the drug is discharged from electricity. After that, the conveyance control unit 61 conveys the drug above the target position again, opens the shutter mechanism, blows air from the suction mechanism, and drops the drug to the target position.

[0160] As described above, in the drug sorting device 1A, the conveyance control unit 61 can discharge the drug from electricity by the ionizer 18 even when the drug is charged. Therefore, the possibility that the operation of the drug sorting device 1A is hindered because the drug cannot be dropped to the target position is reduced.

[0161] Further, the conveyance control unit 61 performs an operation for charge removal by the ionizer 18 only when the chemical agent does not drop even after air is blown out from the suction mechanism a certain number of times. Therefore, the delay in the operation of the chemical agent dispensing device 1A due to the operation for charge removal can be minimized. Further, when the chemical agent dispensing device 1A is used in an environment where the influence of static electricity is small, the operation for charge removal is not executed, so that the operation of the chemical agent dispensing device 1A does not cause a delay.

[0162] Further, in an arbitrary conveyance process, the conveyance control unit 61 can convey the chemical agent to a position where the wind from the ionizer 18 hits, and hold the chemical agent at that position to remove the charge of the chemical agent. For this reason, for example, compared with the case where an ionizer is provided for each target position, the possibility of an increase in the cost of the chemical agent dispensing device 1A can be reduced, and charge removal can be performed in an arbitrary conveyance process.

[0163] In FIG. 12, the ionizer 18 is located on the pedestal 19. However, the ionizer 18 may be integrated with the conveyance / dispensing unit 12. In this case, charge removal by the ionizer 18 can be performed at an arbitrary position.

[0164] Further, the ionizer 18 may be arranged on the pedestal 19 at a position where the wind containing ions hits a place where static electricity tends to accumulate. For example, since the first storage unit 11 is the place where the chemical agent is first introduced, static electricity tends to accumulate more easily than other places. By arranging the ionizer 18 so that the wind containing ions hits the first storage unit 11, the first storage unit 11 can be decharged.

[0165] Further, the ionizer 18 may be provided on the inner wall of the chemical agent dispensing device 1A near the collection tray 16. In this case, a part of the wind from the ionizer 18 reaches not only the collection tray 16 but also the first storage unit 11 and the imaging unit 13. Therefore, in this case, the ionizer 18 can efficiently decharge a plurality of components located on the pedestal 19.

[0166] 〔Embodiment 6〕 When the suction mechanism (reference numeral "122a" in FIGS. 15 and 16) of the suction and shutter mechanism 122 takes out the drug from the drug placement table 133a located in the receiving area Ar1, the sorting control unit 62 causes the second camera 121 to image the drug placement table 133a. The sorting control unit 62 identifies the position of the drug on the drug placement table 133a by analyzing the image of the drug placement table 133a. After moving the suction mechanism above the identified drug, the sorting control unit 62 attempts to suck the drug on the drug placement table 133a by lowering the suction pad (reference numeral "122c" in FIGS. 15 and 16) provided at the tip of the suction mechanism.

[0167] When the sorting control unit 62 fails to suck the drug on the drug placement table 133a, it raises the suction pad once and causes the second camera 121 to image the drug placement table 133a again. The sorting control unit 62 may determine that the drug has been sucked, for example, when the flow rate in the air tube (reference numeral "122b" in FIGS. 15 and 16) (suction nozzle) connecting the suction pad and the suction mechanism (e.g., a vacuum pump, not shown) drops below a predetermined flow rate. In this case, a flow rate sensor is provided in the air tube.

[0168] The sorting control unit 62 identifies the position of the drug on the drug placement table 133a based on the image of the drug placement table 133a, moves the suction mechanism above the position, and then attempts to suck the drug on the drug placement table 133a again by lowering the suction pad. In this way, the sorting control unit 62 causes the conveyance and sorting unit 12 to execute a retry operation for picking up the drug. If the sorting control unit 62 fails to suck the drug on the drug placement table 133a even after executing the retry operation a predetermined number of times (e.g., 10 times) defined in advance, the display control unit 66 issues an error notification indicating that the drug cannot be sucked.

[0169] In addition, when the sorting control unit 62 determines as a result of analyzing the captured image that the image does not include an image of the drug, it cannot identify where the drug has moved, so it aborts the sorting process for the drug and executes the sorting process for the next drug.

[0170] However, if the captured image does not contain an image of the drug, it is highly likely that the lowered suction pad has flipped the drug on the drug placement table 133a. When the suction pad flips the drug in this way, the drug may enter the sorting cup 141 located near the receiving area Ar1 (including the sorting cup 141 being conveyed to the drug inlet 17 by the first dispensing mechanism 4).

[0171] In this embodiment, when the sorting control unit 62 determines, as a result of analyzing the captured image, that the image does not contain an image of the drug (when detecting the loss of the drug on the drug placement table 133a), the control unit 60a notifies that the drug on the drug placement table 133a has been flipped.

[0172] Here, as shown in FIG. 1, the drug sorting device 1 includes a print output unit 7. The print output unit 7 outputs a journal in which information indicated by drug data regarding the sorted drug is printed. The drug data may include, for example, the name, identification information, quantity, drug price, return destination, drug code (e.g., GS1 code), etc. of the sorted drug (the drug sub-packaged into one pack). In addition, the print output unit 7 may print, for example, the sorting date and time and the visual inspection result, etc. on the journal. The print output unit 7 is controlled by a print output control unit 69 provided in the control unit 60a.

[0173] When the sorting control unit 62 determines that the image does not contain an image of the drug, the print output control unit 69 controls the print output unit 7 at this timing to print on the journal the notification content indicating that the drug on the drug placement table 133a has been flipped. The print output control unit 69 outputs, to the print output unit 7, a journal in which, for example, notification content prompting the user to check whether there is no drug located on the drug placement table 133a around the drug placement table 133a located in the receiving area Ar1 is printed.

[0174] In addition, when the printing output control unit 69 subcontracts the drug contained in the sorting cup 141 where there is a possibility that the skipped drug is mixed in, it causes the printing output unit 7 to output a journal that prints the notification content prompting the user to check the subcontracted product obtained by subcontracting the drug. For example, as the sorting cup 141, for example, the sorting cups 141 arranged at the positions of A4, A5, B4, B5, and B6 in FIG. 12 can be mentioned. Further, when the drug contained in the sorting cup 141 is paid out to the drug input port 17 using the container take-out mechanism 124 and the first payout mechanism 4, the printing output control unit 69 may output a journal. This is because when the sorting cup 141 is taken out from the second storage unit 14 and the drug contained in the sorting cup 141 is paid out to the drug input port 17, it is difficult for the control unit 60a to detect the mixing of the drug into the sorting cup 141.

[0175] In this way, by the control unit 60a notifying that the drug on the drug placement table 133a has been skipped and giving a warning to the user, it is possible to reduce the possibility that the drug sorting process continues in a situation where different types of drugs are mixed in the same sorting cup 141. Therefore, it is possible to perform the drug sorting process in a state where safety is ensured.

[0176] 〔Embodiment 7〕 Even when the suction mechanism attempts to suck the drug, there may be cases where the drug cannot be sucked. As factors for the suction mechanism being unable to suck the drug, for example, due to vibrations generated during the drug sorting process or subcontracting process, it is conceivable that the air tube comes off from the suction mechanism and falls in a situation or position where the user did not intend to remove it. This can be caused by a work mistake such as not tightening the screw firmly when the user reinstalls the air tube on the suction mechanism after removing it from the suction mechanism during the cleaning work, or due to the aging deterioration or failure of the suction mechanism including the air tube.

[0177] When the adsorption mechanism attempts to adsorb the drug with the air tube in a fallen state, the flow rate in the air tube does not decrease below a predetermined flow rate. As a result, the adsorption mechanism repeatedly executes the retry operation for picking up the drug many times, wasting useless time. If, as described above, there is no setting to notify an error after a predetermined number of retry operations or to abort the sorting process of the drug, the retry operation may be repeated hundreds of times. Furthermore, if the fallen air tube gets caught on the sorting cup 141 or the like, the air tube, the adsorption mechanism, or other members may be damaged.

[0178] Therefore, in the present embodiment, the control unit 60a determines whether the air tube has come off from the adsorption mechanism based on the change in the flow rate in the air tube. Specifically, when the air tube comes off from the adsorption mechanism, the flow rate in the air tube becomes larger than the flow rate in the air tube (normal value) when the adsorption mechanism is not adsorbing the drug. Also, the flow rate in the air tube increases rapidly. When the control unit 60a determines that the flow rate in the air tube has rapidly exceeded the normal value, it detects that the air tube has come off. By using the flow rate in the air tube to determine whether the air tube has come off, the control unit 60a can easily detect that the air tube has come off.

[0179] When the control unit 60a detects that the air tube has come off, it immediately stops the operation of the drug sorting device 1 and notifies that an error has occurred. This can avoid the possibility of the above-described retry operation being repeatedly performed uselessly. Also, by preventing the drug sorting device 1 from continuing to operate with the air tube fallen, damage to the drug sorting device 1 can be avoided.

[0180] 〔Embodiment 8〕 There is a limit to the number of drugs that can be contained in the sub-packaging paper. Therefore, the control unit 60a cannot perform the dispensing of the drug using the container taking-out mechanism 124 and the first dispensing mechanism 4 unless the number of drugs contained in the sorting cup 141 is equal to or less than the number of drugs that can be contained in the sub-packaging paper (e.g., equal to or less than the first threshold value described above).

[0181] When the sorting cup 141 is in the operation mode where it can accommodate a number of drugs exceeding the first threshold, the sub-packaging control unit 68 causes the conveying and sorting unit 12 to perform the operation of taking out one drug from the sorting cup 141 and conveying it to the drug inlet 17 until the number of drugs contained in the sorting cup 141 reaches the first threshold. In this case, the adsorption and shutter mechanism 122 may reciprocate between the sorting cup 141 containing the drug to be sub-packaged and the drug inlet 17 a plurality of times. In particular, the farther the sorting cup 141 is from the drug inlet 17, the more time it takes for the adsorption and shutter mechanism 122 to move.

[0182] The sub-packaging control unit 68 determines whether the sorting cup 141 containing the drug to be sub-packaged contains a drug exceeding the first threshold. In the storage unit 80, information indicating the number of drugs contained in the sorting cup 141 is stored in association with the identification information of the sorting cup 141. The control unit 60a updates the information each time a drug is stored in the sorting cup 141. The sub-packaging control unit 68 makes the above determination by referring to the information.

[0183] When the sub-packaging control unit 68 determines that the sorting cup 141 containing the drug to be sub-packaged contains a drug exceeding the first threshold, it moves the sorting cup 141 to the arrangement position of the sorting cup 141 closest to the drug inlet 17 in the second storage unit 14. After taking out the sorting cup 141 using the container taking-out mechanism 124, the sub-packaging control unit 68 moves it to the arrangement position. Hereinafter, the arrangement position is referred to as the proximity position. In the present embodiment, the proximity position is the position A3 shown in FIG. 12. Also, in the present embodiment, in order to enable the moved sorting cup 141 to be placed at the proximity position, no sorting cup 141 is arranged at the proximity position.

[0184] Then, the sub-packaging control unit 68 dispenses the drugs one by one into the drug inlet 17 using the adsorption / shutter mechanism 122 until the number of drugs contained in the sorting cup 141 reaches the first threshold value. When the sub-packaging control unit 68 determines that the number of drugs contained in the sorting cup 141 has reached the first threshold value, it uses the container extraction mechanism 124 and the first dispensing mechanism 4 to collectively dispense the remaining drugs in the sorting cup 141 into the drug inlet 17. After the completion of the dispensing using the first dispensing mechanism 4, the sub-packaging control unit 68 moves the sorting cup 141 back to its original position. Note that the storage unit 80 stores information indicating the position of the sorting cup 141 in association with the identification information of the sorting cup 141.

[0185] In this way, by moving the sorting cup 141 to the proximity position and then executing the dispensing by the adsorption / shutter mechanism 122, the moving distance of the adsorption / shutter mechanism 122 can be shortened. Therefore, the dispensing time of the drugs by the adsorption / shutter mechanism 122 can be shortened. Also, the wear of the components (e.g., motor and gears) for moving the adsorption / shutter mechanism 122 can be reduced.

[0186] Consider a case where there is a 300 ms difference in the moving time of the adsorption / shutter mechanism 122 between the drug inlet 17 and the sorting cup 141 when dispensing the drugs without moving the sorting cup 141 to the proximity position and when moving it to the proximity position and then executing the dispensing. Assuming the first threshold value is 15, computationally, when the number of drugs contained in the sorting cup 141 is 32 tablets or more, the time required for dispensing is shorter when the drugs are dispensed after moving the sorting cup 141 to the proximity position. When 50 tablets are contained in the sorting cup 141, the time required for dispensing can be shortened by about 10 seconds. Also, when 50 tablets are contained in each of the 25 sorting cups 141 excluding the sorting cup 141 arranged near the proximity position, the time required for dispensing can be shortened by about 4 minutes. The 25 sorting cups 141 may be the sorting cups 141 excluding A1, A2, A4, A5, B1 - B5, C1 - C5.

[0187] Note that the process shown in this embodiment may be performed only on the sorting cup 141 disposed at a position a predetermined distance away from the drug inlet 17. When the sorting control unit 68 determines that the sorting cup 141 contains a drug exceeding the first threshold value and that the sorting cup 141 is disposed at a position a predetermined distance away from the drug inlet 17, the sorting cup 141 may be moved to a proximity position. The predetermined distance can be arbitrarily set, and the information indicating the position a predetermined distance away from the drug inlet 17 is stored in the storage unit 80.

[0188] 〔Embodiment 9〕 FIG. 13 is a schematic diagram showing an example of the packaging paper PP. Reference numeral 1051 in FIG. 13 shows an example of the packaging paper PP1 in a state where empty packages P2 are connected before and after the packaging part P1 for packaging the drug, and reference numeral 1052 is a diagram showing an example of the packaging paper PP2 dedicated to on-demand packaging. FIG. 14 is a schematic diagram showing an example of the flow when the drug contained in the sorting cup 141 is contained in the packaging part P11.

[0189] As described in Embodiment 4, the printing mechanism of the packaging mechanism 6 generates empty packages (waste bags) that do not perform printing and packaging before and after the start and end of packaging. As shown by reference numeral 1051 in FIG. 13, the printing mechanism generates empty packages P2 before and after the packaging paper (packaging part P1) that contains the drug to be packaged. In the example of reference numeral 1051 in FIG. 13, the printing mechanism generates three empty packages P2 before the packaging part P1 that contains the drug and two empty packages P2 after the packaging part P1.

[0190] When the sorting control unit 68 identifies the drug to be packaged, it controls the printing mechanism to print the information indicated by the drug data of the drug stored in association with the sorting cup 141 that contains the drug on the packaging part P1 that packages the drug. In addition, the sorting control unit 68 may print, for example, the sorting date and time and the visual inspection result on the packaging part P1.

[0191] In this embodiment, the identification information indicating the sorting cup 141, the drug data, the sorting date and time, the information indicating the visual inspection result, etc. are stored in association with the sorting ID (the ID starting with "TS" in the example of FIG. 14). In addition, the sorting ID may be associated with information indicating the position of the sorting cup 141 (sorting position), and an image of the drug captured by the first camera 131. The control unit 60a issues a sorting ID, for example, when determining the type and sorting position of the drug, and stores the above various types of information in the storage unit 80 in association with the sorting ID.

[0192] Here, as an operation mode of the drug sorting device 1, there may be a case where an on-demand packaging mode (on-demand packaging function) is set. In this case, the control unit 60a once interrupts the drug sorting process when all the sorting cups 141 are filled with drugs during the drug sorting process, and for the sorting cups 141 containing a predetermined number or more of drugs, the drugs are packaged. After that, the control unit 60a resumes the drug sorting process.

[0193] When the on-demand packaging mode is set, as the packaging process performed by interrupting the drug sorting process, fine packaging processes such as packaging for one or two packages tend to be frequently performed. Each time this packaging process is performed, empty packages P2 for several packages (five packages in the example of reference numeral 1051) are generated. Therefore, a large number of empty packages P2 are generated until the drug sorting process for the drugs stored in the first storage unit 11 is completed, and the packaging paper PP1 is consumed up to the amount of these empty packages P2. In the on-demand packaging mode, if the packaging process for one package is intermittently performed 40 times, and five empty packages P2 are generated for each packaging process, 200 empty packages P2 will be generated for 40 packaged portions P1 (after the drugs are stored, they are packaged products (medicine packages)).

[0194] Therefore, in the present embodiment, when the on-demand packaging mode is set, the sub-packaging control unit 68 controls the printing mechanism to create a sub-packaging paper PP2 including a sub-packaging portion P11 on which an on-demand packaging ID is printed in advance. Specifically, the sub-packaging control unit 68 assigns an on-demand packaging ID to each sub-packaging portion P11. Then, as shown by reference numeral 1052 in FIG. 13 and FIG. 14, the sub-packaging control unit 68 controls the printing mechanism to print a barcode indicating the on-demand packaging ID assigned to each sub-packaging portion P11 on each sub-packaging portion P11. In the example of reference numeral 1052 and FIG. 14, the sub-packaging control unit 68 also prints the on-demand packaging ID (ID starting with "ZU") assigned to each sub-packaging portion P11 on each sub-packaging portion P11.

[0195] The number of sub-packaging portions P11 to be created in advance (the number of on-demand packaging IDs) can be arbitrarily set. The number of sub-packaging portions P11 to be created in advance (the number of on-demand packaging IDs) may be set based on, for example, the number of sub-packaging processes performed until the sorting process of the drug stored in the first storage unit 11 is completed in an experiment or actual operation in which the on-demand packaging mode is set.

[0196] Also, in the present embodiment, after identifying the drug to be sub-packaged in the on-demand packaging mode, the sub-packaging control unit 68 associates the on-demand packaging ID assigned to the sub-packaging portion P11 that houses the drug with the sorting ID corresponding to the drug. The sub-packaging control unit 68 associates the on-demand packaging ID with the sorting ID, for example, when the upper shutter 6da or the lower shutter 6ea is opened (when the drug is stored in the sub-packaging portion P11).

[0197] The drug sorting device 1 is equipped with a barcode reader (not shown). When the user visually inspects the drug contained in the sub-packaging part P11, the barcode reader is made to read the ad-hoc sub-packaging ID printed on the sub-packaging part P11. Thereby, the control unit 60a can read out the information associated with the sorting ID associated with the ad-hoc sub-packaging ID read by the barcode reader from the storage unit 80. Therefore, the display control unit 66 can display the information regarding the drug sub-packaged in the sub-packaging part P11 on the display unit 32 during the visual inspection. Also, after the print output control unit 69 receives an input indicating that the visual inspection has been completed via the operation unit 31, it can cause the print output unit 7 to output a journal JN on which the information regarding the drug is printed. Therefore, the user can visually recognize the information regarding the drug via the display unit 32 and the journal JN.

[0198] Information such as the name of the drug and the return destination is not printed on the sub-packaging part P11. Instead, it is printed on the journal JN. Therefore, the user can grasp information such as the name of the drug and the return destination by storing the sub-packaging part P11 containing the drug and the journal JN after the visual inspection as a set. Also, since almost no empty packages are generated in the ad-hoc sub-packaging mode, the labor of searching for the sub-packaging part containing the drug from among a large number of generated empty packages can be significantly reduced, and furthermore, the consumption amount of the sub-packaging paper can be reduced.

[0199] <Modification Example 1> The drug sorting device 1 may be communicably connected to a sub-packaging machine (not shown) that dispenses drugs. In this case, after the control unit 60a receives an input indicating that the visual inspection has been completed via the operation unit 31, it transmits the information regarding the drug for which the visual inspection was performed and the ad-hoc sub-packaging ID associated with the sorting ID corresponding to the drug to the sub-packaging machine. The control unit of the sub-packaging machine stores the information regarding the drug and the ad-hoc sub-packaging ID in association with each other.

[0200] The user causes the barcode reader provided in the packaging machine to read the on-demand packaging ID printed on the packaged portion P11 in which the drug is packaged. As a result, the control unit of the packaging machine can identify the cassette to which information matching the information regarding the drug is associated among the plurality of cassettes provided in the packaging machine and storing drugs for each type. Therefore, the user can fill the cassette containing the drug with the drug contained in the packaged portion P11.

[0201] Therefore, regarding the drugs contained in the cassettes of the packaging machine, even if the drug sorting device 1 does not output a journal, the user can perform the filling operation on the packaging machine. Therefore, for the return of the packaged drugs, the drug sorting device 1 does not need to output a journal. In addition, since the user does not need to keep the journal, the labor for journal storage is reduced.

[0202] <Modification 2> The drug sorting device 1 may be communicably connected to a label printer that outputs a label. After receiving an input indicating that the visual inspection has been completed via the operation unit 31, the control unit 60a outputs information regarding the drug on which the visual inspection has been performed to the label printer. As a result, the label printer can print the information printed in the journal on the label. Therefore, the printing output unit 7 does not need to output the journal on which the information is printed. In addition, since the label can be directly attached to the packaged portion P11, the labor for journal storage is reduced.

[0203] 〔Embodiment 10〕 FIG. 15 is a perspective view showing a configuration example of the recovery tray 16 of the present embodiment. FIG. 15 shows a state in which the suction / shutter mechanism 122 is positioned above the recovery tray 16. As shown in FIG. 15, the suction / shutter mechanism 122 includes a suction mechanism 122a including an air pipe 122b, a suction pad 122c, and a cylindrical cover 122k, and a shutter mechanism 122j. The air pipe 122b is a hollow portion through which air sucked from the suction pad 122c for sucking the drug MD1 passes by a suction mechanism. The air pipe 122b extends in the Z-axis direction and is movable in the Z-axis direction together with the suction pad 122c. The cylindrical cover 122k prevents the drug MD1 that has fallen from the suction pad 122c from falling from above the shutter mechanism 122j.

[0204] Also, as shown in FIG. 15, a contact member 161 is provided on the recovery tray 16. The contact member 161 is a member that brings the drug MD1 attracted to the suction pad 122c into contact and causes it to fall. The control unit 60a moves the suction / shutter mechanism 122 substantially parallel to the XY plane, and brings the drug MD1 attracted to the suction pad 122c into contact with the contact member 161, thereby causing the drug MD1 to fall onto the recovery tray 16.

[0205] The contact member 161 is provided so as to protrude from the inner wall of the recovery tray 16 into the recovery tray 16. In the present embodiment, the contact member 161 is located above the inner wall of the recovery tray 16. Thereby, the moving distance for moving the air pipe 122b in the Z-axis direction to drop the drug MD1 attracted to the suction pad 122c can be shortened. In the present embodiment, the contact member 161 is provided so as to protrude from the inner wall on the receiving region Ar1 side of the recovery tray 16 into the recovery tray 16.

[0206] Also, in the present embodiment, the contact member 161 is a plate-like member. Further, the contact member 161 is separated from the inner wall of the recovery tray 16 in the moving direction for moving the air pipe 122b substantially parallel to the XY plane in order to drop the drug MD1 attracted to the suction pad 122c.

[0207] The size, shape, and material of the contact member 161 may be selected such that the drug MD1 adsorbed to the suction pad 122c can be dropped, and the possibility of the drug MD1 (e.g., capsules and tablets such as sugar-coated tablets) being damaged due to contact with the contact member 161 is reduced. The material of the contact member 161 may be, for example, rubber.

[0208] The suction mechanism 122a includes a mechanism (not shown) that injects air into the air tube 122b in the direction of the suction pad 122c. When releasing the drug MD1 adsorbed to the suction pad 122c in order to accommodate the drug MD1 in the drug placement table 133a, the sorting cup 141, etc., the control unit 60a can discharge air from the suction pad 122c by operating the mechanism. However, even when this discharge operation is performed, the drug MD1 may not separate from the suction pad 122c due to the viscosity or static electricity of the drug MD1. Even when the discharge operation (drug MD1 release operation) is performed multiple times, the drug MD1 may not separate from the suction pad 122c.

[0209] In the present embodiment, each time the control unit 60a performs the discharge operation, it determines whether the drug MD1 has separated (fallen) from the suction pad 122c. For example, when a flow sensor is provided in the air tube 122b, the control unit 60a determines that the drug MD1 has separated from the suction pad 122c when the flow rate in the air tube 122b exceeds a predetermined flow rate.

[0210] After performing the discharge operation, if the control unit 60a determines that the drug MD1 has not separated from the suction pad 122c, it executes the discharge operation again (executes a retry operation of the discharge operation). If the control unit 60a cannot drop the drug MD1 from the suction pad 122c even after executing the retry operation a predetermined number of times (e.g., 9 times) defined in advance, it moves the suction mechanism 122a above the recovery tray 16.

[0211] FIG. 16 is a schematic diagram showing an operation example of the suction mechanism 122a when dropping the drug MD1 attached to the suction pad 122c. Reference numeral 1062 is a schematic diagram in which the vicinity of the suction mechanism 122a and the contact member 161 is enlarged in the schematic diagram shown by reference numeral 1061.

[0212] When the control unit 60a determines that the drug MD1 has not detached from the suction pad 122c after a predetermined number of retry operations, the control unit 60a moves the suction mechanism 122a so that the contact member 161 is positioned in the direction in which the suction mechanism 122a is moved to drop the drug MD1. In the example of FIG. 16, the suction mechanism 122a is positioned on the left side of the contact member 161 (on the -X-axis direction side).

[0213] The control unit 60a moves the air tube 122b downward so that the drug MD1 attached to the suction pad 122c can be brought into contact with the contact member 161. Thereafter, the control unit 60a moves the suction mechanism 122a in the direction in which the contact member 161 is positioned (in the +X-axis direction in this example). Thereby, the drug MD1 attached to the suction mechanism 122a can be brought into contact with the contact member 161, and the drug MD1 can be released from the suction pad 122c. Then, the drug MD1 can be accommodated in the collection tray 16.

[0214] In this way, the drug MD1 that could not be dropped from the suction pad 122c by a predetermined number of ejection operations can be dropped by contact with the contact member 161. Therefore, when the drug MD1 could not be dropped from the suction pad 122c by a predetermined number of ejection operations, the display control unit 66 can notify the user to that effect, so as not to cause the user to perform the following operations. By this notification, after stopping the sorting process or the subcontracting process of the drug MD1, it is possible not to cause the user to perform the operation of removing the drug MD1 attached to the suction pad 122c.

[0215] 〔Embodiment 11〕 Reference numeral 1071 in Fig. 17 is a diagram showing an example of a sorting image (sorting screen) of drugs, reference numeral 1072 is a diagram showing an example of a menu, and reference numeral 1073 is a diagram showing an example of a sorting history image (sorting history screen).

[0216] The sorting image IM1 shown by reference numeral 1071 is an image capable of displaying the sorting status of drugs and the like. After receiving an input operation for the menu button BO11 included in the sorting image IM1 and then receiving an input operation for "history inquiry" of "sorting history" shown by reference numeral 1072, the display control unit 66 displays the sorting history image IM2 shown by reference numeral 1073 on the display unit 32.

[0217] In the sorting history image IM2, as sorting history information, for example, information such as the sorting completion date and time, the visual inspection date (visual confirmation date), the sorting ID, the name of the drug (drug name), the return destination, the return source, the visual inspection result (visual result), the name of the visual inspection performer (name of the visual confirmation person), and the quantity can be displayed. The control unit 60a stores information other than the sorting ID in the storage unit 80 in association with the sorting ID issued when sorting the drugs.

[0218] The sorting completion date and time indicates the date and time when the sorting process of all the drugs stored in the first storage unit 11 is completed. The visual inspection date indicates the date and time when an input operation indicating that the visual inspection is completed is received. The name of the drug indicates the name determined by the discrimination unit 64 or the name confirmed by visual inspection. The return destination indicates the return destination of the drug (e.g., the subcontracting machine, the drug shelf). The return source indicates the return source (e.g., the store) specified at the start of the sorting process of the drug. The visual inspection result indicates the result of confirming that the drugs stored in the sorting cup 141 are of the same type and the name of the drug, and is input by an input operation during visual inspection. The name of the visual inspection performer indicates the name (e.g., the name) of the person who performed the visual inspection on the drugs stored in the sorting cup 141, and is input by an input operation during visual inspection.

[0219] In the example of symbol 1073, among the sorting history information stored in the storage unit 80, the sorting history information of the drug "XXX 500 mg" (search result of the drug "XXX 500 mg") is displayed. As shown by symbol 1073, the sorting history image IM2 includes a display area DAR1 that enables searching for the name of the visual inspection performer in addition to the execution period of the drug sorting process, the sorting ID, and the name of the drug. Therefore, the display control unit 66 can also display the search result based on the name of the visual inspection performer in the sorting history image IM2.

[0220] In this way, by storing the name of the visual inspection performer in the sorting history information and being able to display the name of the visual inspection performer in the sorting history image, the user can visually recognize the visual inspection performer for each drug sorting process. Therefore, when a mistake occurs in the visual inspection after the drug sorting process, the user can easily identify the visual inspection performer of the drug. Note that the control unit 60a can also output the search result as a CSV (Comma Separated Values) file.

[0221] 〔Embodiment 12〕 The drug sorting device 1B of this embodiment will be described. The drug sorting device 1B is different from the drug sorting device 1 in that it includes the infrared sensor 51, the camera 52 (second imaging unit), and the reflection unit 53 shown in FIG. 18, and the control unit 60b and the storage unit 80b shown in FIG. 19. When there is no drug database, the drug sorting device 1B uses the measurement result of the infrared sensor 51 to perform the drug sorting process as accurately as possible.

[0222] Reference numeral 1081 in FIG. 18 is a schematic diagram showing an arrangement example of each member on the pedestal 19 of the drug sorting device 1B, and reference numeral 1082 is a schematic diagram showing an arrangement example of the infrared sensor 51. As shown by reference numeral 1081, the infrared sensor 51, the camera 52, and the reflection unit 53 are provided on the pedestal 19. In this embodiment, the infrared sensor 51 is provided at a corner of the second storage unit 14 (the corner at the position farthest from the first storage unit 11) in the basic configuration of the drug sorting device 1 described above, and the camera 52 and the reflection unit 53 are provided around it.

[0223] The infrared sensor 51 is a sensor that receives infrared light emitted from an object. In the present embodiment, the infrared sensor 51 is a sensor that receives infrared light emitted from the drug MD2. Further, in the present embodiment, the infrared sensor 51 includes a light emitting unit that emits light together with a light receiving unit that receives infrared light. The infrared sensor 51 receives infrared light emitted by the light irradiated on the object (drug MD2).

[0224] Infrared light has the property of passing through an object. Therefore, the infrared sensor 51 can receive infrared light having different waveforms for each composition constituting the drug MD2. Therefore, by using the infrared light emitted from the drug MD2, which indicates the internal information of the drug MD2, the possibility of accommodating drugs MD2 that are likely to be of the same type in the same sorting cup 141 can be increased. That is, it becomes possible to accurately determine the sorting cup 141 by the determination unit 74 described later.

[0225] In the present embodiment, the infrared sensor 51 is a near-infrared sensor that receives near-infrared light. The wavelength range of near-infrared light is close to the wavelength range of visible light. Also, the light intensity of near-infrared light is lower than the light intensity of mid-infrared light or far-infrared light. Therefore, when a near-infrared sensor is used as the infrared sensor 51 (especially when emitting near-infrared light), the degree of influence on the drug (e.g., discoloration of the drug, etc.) is low. Therefore, it is preferable to use near-infrared light to improve the determination accuracy of the sorting cup 141. However, as long as it is possible to receive infrared light having different waveforms for each type of drug MD2, the infrared light received by the infrared sensor 51 is not limited to near-infrared light.

[0226] As indicated by reference numeral 1082, the infrared sensor 51 receives infrared light emitted from the drug MD2 in a state where the drug MD2 is located above the infrared sensor 51. In the present embodiment, the infrared sensor 51 receives infrared light emitted from the drug MD2 at a position a predetermined distance (for example, about several millimeters. For example, about 1 mm.) away from the infrared sensor 51 upward.

[0227] The camera 52 is an imaging unit that images the drug MD2 to be measured by the infrared sensor 51. In the present embodiment, the camera 52 is installed on the pedestal 19 so as to be able to image the measurement range of the infrared sensor 51 (a position at a predetermined distance above the infrared sensor 51).

[0228] The reflecting unit 53 is a member (mirror) that reflects the drug MD2 to be measured by the infrared sensor 51. In the present embodiment, the reflecting unit 53 is installed on the pedestal 19 so that the drug located above the infrared sensor 51 is reflected in the direction of the camera 52. Therefore, the camera 52 directly images the drug MD2 located above the infrared sensor 51 and also images the drug MD2 reflected by the reflecting unit 53. The control unit 60b can specify the position of the drug MD2 in the ±X-axis direction and the ±Z-axis direction based on the image directly imaging the drug MD2. Further, the control unit 60b can specify the position of the drug MD2 in the ±Y-axis direction based on the image indirectly imaging the drug MD2 via the reflecting unit 53.

[0229] Reference numeral 1091 in FIG. 19 is a block diagram showing a configuration example of the drug sorting device 1B of the present embodiment. In FIG. 19, only the functions related to the processing performed by the control unit 60b and not shown in FIG. 1 are shown. Note that the sorting control unit 62 shown in FIG. 1 can function as the position control unit 71. The configuration of the control unit 60b shown by reference numeral 1092 in FIG. 19 will be described later.

[0230] As shown by reference numeral 1091, the control unit 60b of the present embodiment includes a position control unit 71, an acquisition unit 72, an image generation unit 73, and a determination unit 74.

[0231] The position control unit 71 controls the transport mechanism 123 of the transport and sorting unit 12 to control the position of the suction and shutter mechanism 122 when viewed in a plan view of the pedestal 19. Based on the imaging result of the camera 52, the position control unit 71 controls the position of the suction and shutter mechanism 122 so that the drug is located at a predetermined position (within the measurement range of the infrared sensor 51) above the infrared sensor 51. The suction and shutter mechanism 122 functions as an adjustment unit that adjusts the position of the drug with respect to the infrared sensor 51 based on the imaging result of the camera 52.

[0232] By adjusting the position of the drug in this way, the possibility of the drug coming into contact with the infrared sensor 51 can be reduced. In addition, the possibility of the drug falling from the suction pad 122c due to contact with the infrared sensor 51 can be reduced. Furthermore, since the distance (measurement distance) between the infrared sensor 51 and the drug can be made constant, stable measurement by the infrared sensor 51 becomes possible.

[0233] If a mounting table is provided within the measurement range of the infrared sensor 51 and the drug is placed on the mounting table, contamination will occur between the drugs. Therefore, in this embodiment, in order to avoid this occurrence, the measurement of the infrared light emitted from the drug by the infrared sensor 51 is performed in a state where the suction and shutter mechanism 122 has adsorbed the drug.

[0234] The acquisition unit 72 acquires waveform data indicating the relationship between the frequency and intensity of the infrared light received by the infrared sensor 51. Reference numeral 1101 in FIG. 20 shows an example of the waveform data acquired by the acquisition unit 72. In reference numeral 1101, the horizontal axis indicates the frequency (nm) of the infrared light, and the vertical axis indicates the intensity of the infrared light. Reference numeral 1101 shows the waveform data of near-infrared light in the range of 1550 (nm) or more and 1950 (nm) or less.

[0235] The image generation unit 73 generates a characteristic image representing the frequency component characteristics of the waveform data by performing spectrogram conversion on the waveform data acquired by the acquisition unit 72. Reference numeral 1102 in FIG. 20 shows an example of the characteristic image generated by the image generation unit 73. Reference numeral 1102 is a characteristic image obtained from the waveform data of reference numeral 1101.

[0236] In symbol 1102, the horizontal axis of the characteristic image indicates the frequency (nm) corresponding to the horizontal axis when the waveform data is regarded as a vertical × horizontal graph. The horizontal axis of the characteristic image coincides with the horizontal axis of the graph of the waveform data shown in symbol 1101. In the present embodiment, the horizontal axis of the characteristic image is set in the range of 1550 (nm) or more and 1950 (nm) or less. The frequency corresponding to this horizontal axis is referred to as the reference frequency. The vertical axis of the characteristic image indicates the frequency (nm) of the waveform data when the waveform data is regarded as a vertical × horizontal graph. Further, the value of the pixel of the characteristic image indicates the amplitude of the waveform data when the waveform data is regarded as a vertical × horizontal graph. In the present embodiment, the larger the pixel value (the whiter it is), the larger the amplitude of the waveform data (the higher the intensity of the infrared light).

[0237] The image generation unit 73 divides the entire range of the reference frequency by a predetermined range (window), and calculates the frequency spectrum for each predetermined range by performing Fourier transform for each predetermined range. The image generation unit 73 calculates the frequency spectrum for each predetermined range while shifting the predetermined range from the minimum value to the maximum value for the entire range of the reference frequency. In FIG. 20, the results of performing Fourier transform on the first range R1, the second range R2, and the third range R3 of the waveform data of symbol 1101 are respectively reflected in the first range R1, the second range R2, and the third range R3 of the characteristic image of symbol 1102. The image generation unit 73 generates a characteristic image by performing such spectrogram conversion. That is, the image generation unit 73 generates a characteristic image by performing a process corresponding to a general short-time Fourier transform on the waveform data.

[0238] The determination unit 74 determines the sorting cup 141 for accommodating the drug of unknown type based on the waveform data of the drug of unknown type acquired by the acquisition unit 72 and the waveform data of the drug that the sorting cup 141 of the accommodation destination has already determined. In the present embodiment, the determination unit 74 uses the first characteristic image corresponding to the drug of unknown type generated by the image generation unit 73 and the second characteristic image corresponding to the drug that the sorting cup 141 of the accommodation destination has already determined, and determines the sorting cup 141 for accommodating the drug of unknown type. Specifically, the determination unit 74 uses the first characteristic image, the second characteristic image, and the learned model 801 described later to determine the sorting cup 141 for accommodating the drug of unknown type. In the present embodiment, the drug for which the sorting cup 141 of the accommodation destination has already been determined is the drug that has already been sorted into the sorting cup 141.

[0239] The drug sorting device 1B includes a storage unit 80b instead of the storage unit 80. The storage unit 80b stores the learned model 801 instead of the drug database of the storage unit 80.

[0240] The learned model 801 is a model that performs machine learning using the following training data and outputs whether the first characteristic image and the second characteristic image match. The training data includes data in which characteristic images of two drugs of the same type are associated with information indicating that the characteristic images match each other. The training data also includes data in which characteristic images of two drugs of different types are associated with information indicating that the characteristic images do not match each other.

[0241] The learned model 801 may be, for example, a neural network (e.g., a convolutional neural network (CNN)) including at least an input layer, an intermediate layer, and an output layer. The learned model 801 is constructed by sequentially inputting the training data and learning the parameters (weights and biases) so as to minimize the loss function.

[0242] The learned model 801 outputs a result indicating whether the first characteristic image and the second characteristic image match or do not match for the input of the first characteristic image and the second characteristic image. In the present embodiment, this result is output as a probability value. The closer the probability value is to 1, the higher the possibility that the two images match. When the learned model 801 outputs a result indicating that the two characteristic images match, the determination unit 74 determines the sorting cup 141 that already stores the drug determined by the storage destination sorting cup 141 as the sorting cup 141 for storing the drug with an unknown type. In the present embodiment, the determination unit 74 determines the sorting cup 141 that already stores the sorted drug as the sorting cup 141 for storing the drug with an unknown type.

[0243] Here, for the drug first taken out from the first storage unit 11 (when no sorting cup 141 has been determined as the storage destination of the drug), the determination unit 74 determines a pre-determined sorting cup 141 as the sorting cup 141 for storing the drug.

[0244] For the drugs subsequently taken out from the first storage unit 11, the determination unit 74 determines the sorting cup 141 for storing the drug by using the characteristic image of the drug and all the characteristic images stored in the storage unit 80b. All the characteristic images stored in the storage unit 80b correspond to the characteristic images of all the drugs for which the storage destination sorting cup 141 has been determined.

[0245] In the present embodiment, the determination unit 74 inputs the first characteristic image of the drug to be determined for the storage destination and the second characteristic image of one of the drugs for which the storage destination sorting cup 141 has already been determined into the learned model 801. Assume that the learned model 801 outputs a result indicating that these two characteristic images match. In this case, the determination unit 74 determines the sorting cup 141 that has already been determined as the storage destination of the drug with the second characteristic image used for comparison as the sorting cup 141 for storing the drug to be determined for the storage destination.

[0246] On the other hand, assume that the learned model 801 outputs a result indicating that these two characteristic images do not match. In this case, the determination unit 74 inputs the first characteristic image and the second characteristic image of another drug among the drugs whose storage destinations have already been determined into the learned model 801. Then, when the determination unit 74 obtains a result indicating that these two characteristic images match, the sorting cup 141 that has already been determined as the storage destination of the drug whose second characteristic image was used for comparison is determined as the sorting cup 141 for storing the drug whose storage destination is to be determined. On the other hand, when the determination unit 74 obtains a result indicating that these two characteristic images do not match, the determination unit 74 inputs the first characteristic image and the second characteristic image of yet another drug among the drugs whose storage destinations have already been determined into the learned model 801.

[0247] The determination unit 74 inputs the first characteristic image and the second characteristic image into the learned model 801 until a result indicating that the two characteristic images match is obtained. As a result, if a result indicating that the first characteristic image does not match any of the second characteristic images is obtained for all the second characteristic images, the determination unit 74 determines the sorting cup 141 for which the storage destination has not been determined as the sorting cup 141 for storing the drug whose storage destination is to be determined. Then, the sorting control unit 62 controls the conveyance and sorting unit 12 to store the drug whose storage destination is to be determined in the sorting cup 141 determined by the determination unit 74.

[0248] Note that the control unit 60b may not include the discrimination unit 64. This is because the drug database is not stored in the storage unit 80b, so the type of the drug cannot be discriminated by comparing the image of the drug captured by the first camera 131 with the drug database. In this embodiment, the type of the sorted drug may be specified as follows.

[0249] For example, the display control unit 66 displays, on the display unit 32, an image of the drug contained in each sorting cup 141. By visually recognizing this display, the user identifies the type of the drug and inputs the type via the operation unit 31. The control unit 60b specifies the type of the drug contained in the sorting cup 141 by associating and storing the information indicating the input type with the identification information of the sorting cup 141.

[0250] Alternatively, instead of the discrimination unit 64 in FIG. 1, the control unit 60b may include a discrimination unit 64b. The discrimination unit 64b may discriminate the type of the drug contained in the sorting cup 141 by using a learned model (referred to as a type estimation model) that outputs the type of the drug in response to an input of a first characteristic image or an image of the drug captured by the first camera 131. The type estimation model is constructed, for example, by performing machine learning using training data in which the type of the drug is associated with the characteristic image or the image of the drug. The type estimation model may be stored in advance in the storage unit 80b, or may be constructed by creating training data each time the user inputs the type of the drug.

[0251] <Processing Flow> An example of the processing of the control unit 60b according to the present embodiment will be described with reference to FIG. 21. FIG. 21 is a flowchart showing an example of the processing of the control unit 60b according to the present embodiment.

[0252] In a state where a plurality of drugs are stored in the first storage unit 11, the conveyance control unit 61 controls the conveyance / sorting unit 12 to take out one drug from the first storage unit 11 (S21) and place it on the drug placement table 133a. The imaging control unit 63 controls the imaging unit 13 to image the drug placed on the drug placement table 133a (S22). The position control unit 71 controls the conveyance / sorting unit 12 to convey the drug after imaging by the imaging unit 13 above the infrared sensor 51 from the drug placement table 133a (S23). At this time, the position control unit 71 controls the conveyance mechanism 123 so that the drug is positioned at a predetermined position above the infrared sensor 51 based on the imaging result of the camera 52.

[0253] Thereafter, the infrared sensor 51 receives infrared light emitted from the drug located above the infrared sensor 51 (S24). The acquisition unit 72 acquires waveform data of the infrared light received by the infrared sensor 51 (S25; acquisition step). The image generation unit 73 generates a first characteristic image by performing spectrogram conversion on the waveform data acquired by the acquisition unit 72 (S26).

[0254] The determination unit 74 inputs the first characteristic image generated by the image generation unit 73 and the second characteristic image for which the determination unit 74 has already determined the sorting cup 141 as the storage destination into the learned model 801 (S27). When it is obtained that the first characteristic image and the second characteristic image match, the determination unit 74 determines the sorting cup 141 that has been determined as the storage destination for the drug corresponding to the second characteristic image as the sorting cup 141 that stores the drug located above the infrared sensor 51 (S28). On the other hand, when it is obtained that the first characteristic image does not match any of the second characteristic images, the determination unit 74 determines the sorting cup 141 for which the storage destination of the drug has not been determined as the sorting cup 141 that stores the drug located above the infrared sensor 51 (S28). The process of S28 is an example of the determination step.

[0255] The determination unit 74 stores the first characteristic image generated by the image generation unit 73 as the second characteristic image in association with the identification information of the sorting cup 141 determined as the storage destination, and stores the image of the drug captured by the first camera 131.

[0256] The control unit 60b executes the above-described process for all the drugs stored in the first storage unit 11, and executes the sorting process of the drugs so that the drugs for which the first characteristic image and the second characteristic image match are stored in the same sorting cup 141.

[0257] <Verification of Estimation Accuracy> FIG. 22 is a diagram showing an example of a histogram of the output results of a learned model (referred to as a waveform input model) constructed using waveform data. The horizontal axis represents the probability value output by the waveform input model. The vertical axis on the 0 side of the probability value indicates the number of times the waveform input model outputs a result that the two waveform data do not match, and the vertical axis on the 1 side of the probability value indicates the number of times the waveform input model outputs a result that the two waveform data match.

[0258] The waveform input model is a model that outputs whether two waveform data match by performing machine learning using the following training data. The training data includes data in which waveform data for two drugs of the same type are associated with information indicating that the waveform data match each other. The training data also includes data in which waveform data for two drugs of different types are associated with information indicating that the waveform data do not match each other. The waveform input model outputs a result indicating that the two waveform data match or do not match for the input of the two waveform data. In this example, the closer the probability value is to 1, the higher the possibility that the two waveform data match.

[0259] As shown in FIG. 22, even when two waveform data match (the case of "OK" in the figure), the distribution of the histogram indicating the output of "OK" is not biased toward the probability value of 1, and for example, multiple outputs of "OK" are recognized in the vicinity of the probability value of 0. Therefore, when using waveform data and the waveform input model, there is a possibility that drugs with a high possibility of being of the same type cannot be accommodated in the same sorting cup 141.

[0260] FIG. 23 is a diagram showing an example of a histogram of the output results of the learned model 801 constructed using the characteristic image. The horizontal axis represents the probability value output by the learned model 801. The vertical axis on the 0 side of the probability value indicates the number of times the learned model 801 outputs a result that the first characteristic image and the second characteristic image do not match, and the vertical axis on the 1 side of the probability value indicates the number of times the first characteristic image and the second characteristic image match.

[0261] As shown in FIG. 23, when the first characteristic image and the second characteristic image match (the case of "OK" in the figure), the distribution of the histogram indicating the output of "OK" is biased toward a probability value of 1. Further, when the first characteristic image and the second characteristic image do not match (the case of "NG" in the figure), the distribution of the histogram indicating the output of "NG" is biased toward a probability value of 0. That is, it can be seen that the estimation accuracy of the match or non-match between the first characteristic image and the second characteristic image is high.

[0262] Therefore, by using the characteristic image and the learned model 801, the determination accuracy of the sorting cup 141 by the determination unit 74 can be improved as compared with the case of using the waveform data and the waveform input model. Accordingly, the possibility that drugs with a high probability of being of the same type can be accommodated in the same sorting cup 141 can be increased.

[0263] <Effect> In the basic configuration of the drug sorting device 1 described above, based on the image of the drug of unknown type captured by the first camera 131 and the drug data (e.g., master image) regarding the drug stored in the drug database, the discrimination unit 64 discriminates the type of the drug of unknown type. The sorting control unit 62 accommodates a plurality of drugs of the same type in the same sorting cup 141 based on the discrimination result.

[0264] On the other hand, in the present embodiment, the determination unit 74 determines the sorting cup 141 for accommodating the drug of unknown type based on the waveform data of the infrared light obtained from the drug of unknown type and the waveform data of the infrared light obtained from the drug for which the accommodation destination sorting cup 141 has already been determined. Since the infrared light has the characteristics described above, by determining the sorting cup 141 for accommodating the drug of unknown type using the waveform data of the infrared light, the possibility that a plurality of drugs with a high probability of being of the same type can be accommodated in the same sorting cup 141 can be increased. Accordingly, the drug sorting device 1B can accommodate a plurality of drugs with a high probability of being of the same type in the same sorting cup 141 without using a drug database (master image). Therefore, the drug sorting device 1B can perform the drug sorting process without registering a drug database in advance.

[0265] Also, in this embodiment, the determination unit 74 determines the sorting cup 141 that contains a drug of unknown type using the characteristic image obtained by spectrogram-converting the waveform data. Specifically, the determination unit 74 determines the sorting cup 141 that contains a drug of unknown type using the characteristic image and the learned model 801. Therefore, the possibility of accommodating a plurality of drugs that are likely to be of the same type in the sorting cup 141 can be further increased. Also, by using the characteristic image, a learned model 801 can be constructed using highly versatile image-based deep learning. Therefore, there is no need to devise a complex algorithm to accommodate a plurality of drugs that are likely to be of the same type in the same sorting cup 141. Therefore, the development cost in the sorting process of drugs without using a drug database can be reduced.

[0266] <Modification Example 1> In addition to the characteristic image, the determination unit 74 may determine the sorting cup 141 that contains a drug of unknown type by inputting the image of the drug captured by the first camera 131 into the learned model 801. The learned model 801 in this case is a model constructed by performing machine learning using the following training data. The training data includes data in which images of two drugs of the same type are associated with information indicating that the characteristic images match each other, and data in which images of two drugs of different types are associated with information indicating that the characteristic images do not match each other.

[0267] The determination unit 74 inputs, in addition to the first characteristic image and the second characteristic image, two images captured by the first camera 131 into the learned model 801. These two images are an image of a drug of unknown type and an image of a drug whose sorting cup 141 for the storage destination has already been determined. By using an image of a drug as an input element to the learned model 801 in addition to the characteristic image, the number of input elements can be increased. Therefore, the learned model 801 can more accurately estimate the match or mismatch between the first characteristic image and the second characteristic image. Also, the first camera 131 is included in the basic configuration of the drug sorting device 1 described above. Therefore, it is possible to improve the accuracy of the above estimation without adding new members to the basic configuration.

[0268] In the present embodiment, as the image of the drug included in the training data and as the image of the drug input to the learned model 801, R (red), G (green), and B (blue) images (3-channel images) obtained by decomposing the captured image are used. Therefore, in the present embodiment, the learned model 801 is constructed using four-channel images, namely, the characteristic image, R, G, and B images, and the four-channel images are input to the learned model 801 to obtain the result of whether the two characteristic images match.

[0269] <Modification 2> The determination unit 74 may determine the sorting cup 141 that houses a drug of unknown type without using the characteristic image and the learned model 801. An example thereof will be described with reference to reference numeral 1092 in FIG. 19 and FIG. 24. Reference numeral 1092 in FIG. 19 is a block diagram showing a configuration example of the drug sorting device 1B of this modification.

[0270] As shown by reference numeral 1092, the control unit 60b of this modification includes a waveform generation unit 75 instead of the image generation unit 73 shown by reference numeral 1091. The waveform generation unit 75 generates waveform differentiation data by performing first-order differentiation on the waveform data acquired by the acquisition unit 72.

[0271] The determination unit 74 calculates the similarity between the waveform differential data of the drug of unknown type generated by the waveform generation unit 75 and the waveform differential data of the drug whose sorting cup 141 for the storage destination has already been determined. When the similarity is equal to or greater than a predetermined value, the determination unit 74 determines the sorting cup 141 in which the drug whose sorting cup 141 for the storage destination has already been determined is stored as the sorting cup 141 for storing the drug of unknown type.

[0272] When the determination unit 74 determines the sorting cup 141 for storing the drug of unknown type, it associates the waveform differential data of the drug stored in the sorting cup 141 with the identification information of the sorting cup 141 and stores it in the storage unit 80b. Therefore, waveform differential data 802 is stored in the storage unit 80b instead of the learned model 801.

[0273] The determination unit 74 calculates the similarity between the waveform differential data of the drug of unknown type and the waveform differential data stored in the storage unit 80b. The determination unit 74 refers to one piece of waveform differential data among all the waveform differential data stored in the storage unit 80b and calculates the similarity for the waveform differential data. When the determination unit 74 determines that the similarity is equal to or greater than a predetermined value, it determines the sorting cup 141 associated with the waveform differential data as the sorting cup 141 for storing the drug of unknown type. When the determination unit 74 determines that the similarity is less than the predetermined value, it refers to another piece of waveform differential data from the storage unit 80b, calculates the similarity for the waveform differential data, and determines whether the similarity is equal to or greater than the predetermined value.

[0274] The similarity of the waveform differential data can be calculated using known methods such as CCF (cross-correlation function) and DTW (Dynamic Time Warping). The predetermined value may be set by experiments or the like so that drugs of the same type are stored in the same sorting cup 141.

[0275] FIG. 24 is a flowchart showing an example of the processing of the control unit 60b of this modified example. For the same processing as in FIG. 21, the description thereof will be omitted. As shown in FIG. 24, in S25, after the acquisition unit 72 acquires the waveform data for the drug whose type is unknown, the waveform generation unit 75 generates the waveform differential data of the waveform data by performing a first derivative on the waveform data (S31).

[0276] As described above, the determination unit 74 calculates the similarity between the waveform differential data generated by the waveform generation unit 75 and one piece of waveform differential data referred to in the storage unit 80b, and determines whether the similarity is equal to or greater than a predetermined value. The determination unit 74 executes the similarity calculation process and the comparison process between the similarity and the predetermined value until it determines that the similarity is equal to or greater than the predetermined value. When the determination unit 74 determines that the similarity is equal to or greater than the predetermined value, it determines the sorting cup 141 associated with the waveform differential data referred to in the storage unit 80b as the sorting cup 141 for accommodating the drug whose type is unknown (S32). On the other hand, when the determination unit 74 determines that the similarity is less than the predetermined value for all the waveform differential data stored in the storage unit 80b, it determines the sorting cup 141 for which the accommodation destination has not been determined as the sorting cup 141 for accommodating the drug whose type is unknown (S32). The process of S32 is an example of a determination step.

[0277] The control unit 60b executes the above-described processing for all the drugs stored in the first storage unit 11, so as to execute the sorting process of the drugs so that the drugs with a similarity of waveform differential data equal to or greater than a predetermined value are stored in the same sorting cup 141.

[0278] Since the waveform differential data captures the characteristics of the waveform data by the slope of the waveform, it is considered that the variation in the intensity of the light received by the infrared sensor 51 that can appear in the waveform data is absorbed. Therefore, even when the waveform differential data is used, the control unit 60b can increase the possibility of accommodating a plurality of drugs that are likely to be of the same type in the same sorting cup 141.

[0279] In addition, in the determination process of the sorting cup 141 by the determination unit 74, only the characteristic image and the learned model 801 may be used, only the waveform differential data may be used, or both of them may be used.

[0280] <Modification Example 3> In the above, the example in which the camera 52 is disposed on the pedestal 19 has been described. However, the arrangement position of the camera 52 is not limited to this. As shown in FIG. 25, the camera 52 may be provided below the glass plate 56 (pedestal 19). FIG. 25 is a schematic diagram schematically showing the infrared sensor 51 and its surroundings. In the present embodiment, a lens 55 is provided on the camera 52.

[0281] The reflecting portion 53 is provided on the pedestal 19 so as to reflect the drug MD2 located above the infrared sensor 51 in the direction of the camera 52. In addition, in the pedestal 19, a glass plate 56 is provided at the mounting position of the infrared sensor 51 and the surrounding area thereof. Thereby, the camera 52 can image the drug MD2 reflected by the reflecting portion 53.

[0282] In this modification example, a first reflecting portion 53a and a second reflecting portion 53b are provided as the reflecting portion 53. Since the first reflecting portion 53a is provided such that the reflecting surface is along the Y-axis direction, it can reflect the drug MD2 moving in the ±X-axis direction and the ±Z-axis direction. Since the second reflecting portion 53b is provided such that the reflecting surface is along the X-axis direction, it can reflect the drug MD2 moving in the ±Y-axis direction and the ±Z-axis direction.

[0283] Therefore, based on the image of the drug MD2 reflected by the first reflecting portion 53a, the control unit 60b can identify the position of the drug MD2 in the ±X-axis direction and the ±Z-axis direction. Also, based on the image of the drug MD2 reflected by the second reflecting portion 53b, the control unit 60b can identify the position of the drug MD2 in the ±Y-axis direction and the ±Z-axis direction. By identifying this position, the position control unit 71 can control the position of the adsorption / shutter mechanism 122 so that the drug MD2 is positioned within the measurement range of the infrared sensor 51. Therefore, also in this modification example, the possibility of the drug coming into contact with the infrared sensor 51 can be reduced, and the infrared sensor 51 can perform stable measurement.

[0284] 〔Examples of Realization by Software〕 The functions of the drug sorting devices 1, 1A, 1B (hereinafter referred to as "devices") can be realized by a program for causing a computer to function as the device, and by a program for causing a computer to function as each control block of the device (especially each part included in the control units 60a, 60b). Also, the functions of the data creation device 20 (hereinafter referred to as "device") can be realized by a program for causing a computer to function as the device, and by a program for causing a computer to function as each control block of the device (especially each part included in the control unit 21). The above program may be, for example, a data creation program.

[0285] In this case, the above device includes a computer having at least one control device (for example, a processor) and at least one storage device (for example, a memory) as hardware for executing the above program. By executing the above program with this control device and storage device, each function described in the above embodiments is realized.

[0286] The above program may be recorded on one or more computer-readable recording media, not temporarily. This recording medium may or may not be provided in the above device. In the latter case, the above program may be supplied to the above device via any wired or wireless transmission medium.

[0287] In addition, part or all of the functions of each of the above control blocks can also be realized by a logic circuit. For example, an integrated circuit in which a logic circuit functioning as each of the above control blocks is formed is also included in the scope of the present invention. In addition to this, for example, it is also possible to realize the functions of each of the above control blocks by a quantum computer.

[0288] Also, each process described in each of the above embodiments may be executed by AI (Artificial Intelligence). In this case, the AI may operate in the above control device, or may operate in another device (for example, an edge computer or a cloud server, etc.).

[0289] 〔Supplementary Notes〕 The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present invention.

Explanation of Reference Numerals

[0290] 20 Data creation device 211 Reception unit 212 Extraction unit 213 Numbering unit 214 Display control unit 215 Setting unit 216 Creation unit 221 Trained model 1B Drug sorting device 51 Infrared sensor 52 Camera (second imaging unit) 53 Reflection unit 72 Acquisition unit 74 Determination unit 73 Image generation unit 75 Waveform generation unit 122 Adsorption / shutter mechanism (adjustment unit) 131 First camera (first imaging unit) 141 Sorting Cup (Sorting Container) 801 Trained Model

Claims

1. A data creation device that creates master data including a master image to be compared with an image of a drug type to be identified, A receiving unit that receives input of identification information of a medicine, the identification information being indicated by at least one mark formed on the medicine; An extracting unit that extracts at least one mark area including one mark formed on the medicine from the captured image of the medicine; A data creation device comprising: a creation unit that, when a registration operation to register an image of the drug as the master image based on the identification information received by the reception unit and the mark area extracted by the extraction unit is received, associates the image of the drug as the master image with the identification information and creates the master data.

2. a number assigning unit that assigns numbers to a symbol corresponding to the mark included in the identification information accepted by the accepting unit and to a mark area extracted by the extracting unit; 2. The data creation device according to claim 1, further comprising: a display control unit that displays a numbered image including the symbol to which the number is assigned and the mark area to which the number is assigned.

3. A plurality of the marks are formed on the medicine across a plurality of stages, 3. The data creation device according to claim 2, wherein the numbering unit assigns the numbers to the mark areas extracted by the extraction unit in sequence from the top to the bottom row and from left to right within each row when the mark included in the image of the drug is facing upward, thereby assigning numbers in sequence from the top left mark area to the bottom right mark area.

4. The data creation device according to claim 2 or 3, further comprising a setting unit that resets, based on an input operation on the numbered image, a mark area extracted by the extraction unit that does not include only the one mark to a mark area changed to include only the one mark.

5. The data creation device according to claim 1 , wherein the extraction unit extracts the mark region based on an output value obtained by inputting an image of the drug into a trained model constructed to extract the mark region.

6. A method for controlling a data creation device that creates master data including a master image to be compared with an image of a drug type to be identified, comprising: a receiving step of receiving input of identification information of a medicine, the identification information being indicated by at least one mark formed on the medicine; An extraction step of extracting at least one mark area including one mark formed on the medicine from the captured image of the medicine; A control method for a data creation device, comprising: a creation step of, when a registration operation is received to register an image of the drug as the master image based on the identification information received in the reception step and the mark area extracted in the extraction step, associating the image of the drug as the master image with the identification information to create the master data.

7. 2. A data creation program for causing a computer to function as the data creation device according to claim 1, the data creation program causing a computer to function as the reception unit, the extraction unit, and the creation unit.

8. A medicine sorting device that includes a plurality of sorting containers and sorts medicines of unknown types into the sorting containers by type, an infrared sensor that receives infrared light emitted from the drug; an acquisition unit that acquires waveform data indicating a relationship between a frequency and an intensity of the infrared light received by the infrared sensor; A drug sorting device comprising: a determination unit that determines a sorting container to contain the drug of unknown type based on the waveform data of the drug of unknown type acquired by the acquisition unit and the waveform data of a drug whose destination sorting container has already been determined.

9. an image generating unit that generates a characteristic image representing a frequency component characteristic of the waveform data by performing a spectrogram transformation on the waveform data acquired by the acquiring unit, The drug sorting device of claim 8, wherein the determination unit determines a sorting container to contain the drug of unknown type using a first characteristic image generated by the image generation unit as the characteristic image corresponding to the drug of unknown type, and a second characteristic image generated by the image generation unit as the characteristic image corresponding to the drug of whose destination sorting container has already been determined.

10. A trained model is provided that outputs whether the first characteristic image and the second characteristic image match, The drug sorting device of claim 9, wherein when the trained model outputs a result indicating that the first characteristic image and the second characteristic image match in response to the input of the first characteristic image and the second characteristic image, the determination unit determines a sorting container that contains a drug whose destination sorting container has already been determined as a sorting container that contains the drug of an unknown type.

11. A first imaging unit that images the medicine, The drug sorting device of claim 10, wherein the determination unit determines a sorting container to contain the drug of unknown type by inputting into the trained model, in addition to the first characteristic image and the second characteristic image, an image of the drug of unknown type captured by the first imaging unit and an image of the drug whose destination sorting container has already been determined.

12. a waveform generating unit that generates waveform differential data by performing a first differentiation on the waveform data acquired by the acquiring unit, The drug sorting device of claim 8, wherein the determination unit determines a sorting container containing a drug whose destination sorting container has already been determined as a sorting container containing the drug of unknown type when a similarity between the waveform differential data of the drug of unknown type generated by the waveform generating unit and the waveform differential data of a drug whose destination sorting container has already been determined is greater than or equal to a predetermined value.

13. A second imaging unit that images the drug to be measured by the infrared sensor; The medicine sorting device according to claim 8 , further comprising: an adjustment unit that adjusts a position of the medicine relative to the infrared sensor based on an imaging result of the second imaging unit.

14. The infrared sensor includes a reflector that reflects a drug to be measured, The medicine sorting device according to claim 13 , wherein the second imaging section images the medicine reflected by the reflecting section.

15. The medicine sorting device according to claim 8 , wherein the infrared sensor is a near-infrared sensor that receives near-infrared light.

16. A method for controlling a medicine sorting device that includes a plurality of sorting containers and sorts medicines of unknown types into the sorting containers by type, comprising: The medicine sorting device includes an infrared sensor that receives infrared light emitted from the medicine, an acquiring step of acquiring waveform data indicating a relationship between a frequency and an intensity of the infrared light received by the infrared sensor; A method for controlling a drug sorting device, comprising: a determination step of determining a sorting container to contain the drug of unknown type based on the waveform data of the drug of unknown type acquired in the acquisition step and the waveform data of drugs that have already been sorted into the sorting container.

17. A medicine assorting program for causing a computer to function as the medicine assorting device according to claim 8, the medicine assorting program causing a computer to function as the acquisition unit and the determination unit.

Citation Information

Patent Citations

  • Drug sorting device, sorting container, and drug return method

    WO2018190394A1