Medicine sorting device and control method of medicine sorting device

The drug sorting device addresses the inability of prior art to sort tablets or capsules by implementing a discrimination and sorting unit, enabling automatic recognition and efficient sorting of returned medications.

JP2025142344APending Publication Date: 2025-09-30YUYAMA MFG CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2025127729
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-03-15
Filing Date
2025-07-30
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Existing drug sorting devices are unable to automatically recognize and sort tablets or capsules, which are not contained in containers or packaged, due to the limitations of prior art focusing on ampoules or vials.

Method used

A drug sorting device with a discrimination unit to identify the type of drugs and a sorting unit to sort them into designated positions based on the discrimination results, capable of handling tablets or capsules that have been prescribed and returned.

Benefits of technology

Enables automatic recognition and sorting of medicines such as tablets or capsules, facilitating efficient reuse by determining the type and sorting them into appropriate storage positions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025142344000001_ABST
    Figure 2025142344000001_ABST
Patent Text Reader

Abstract

To provide a medicine sorting device for recognizing medicines themselves and sorting them automatically.SOLUTION: A medicine sorting device (1) includes: a first storage part (11) for storing a plurality of types of medicines; a second storage part (14) for storing medicines that are sorted by type; a discrimination part (64) for discriminating types of medicines taken out of the first storage part; and a conveyance / sorting unit (12) for storing medicines in the second storage part by type on the basis of a result of the discrimination by the discrimination part. The plurality of types of medicines are medicines which are not stored in a container, or medicines which are not packaged, and medicines which are returned after prescribed to patients.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a medicine sorting device that sorts medicines. [Background technology]

[0002] Conventionally, multiple types of returned medications have been sorted by type by pharmacists or doctors. The returned medications are those prescribed to various patients or those that have been dispensed. Therefore, compared to the dispensing process of assembling (packaging) (one or more types of) medications (tablets) for each dosage period from groups of medications (medication cassettes) pre-packaged by drug type in dispensing equipment, etc., based on prescription information for each patient, the number of types of medications that are returned together, including those prescribed for multiple patients, is extremely large. Therefore, it is highly useful to automatically sort and reuse returned medications. The number of medications dispensed for each dosage period is generally around two to three, and at most around ten.

[0003] In addition, some pharmacies or hospitals (or more accurately, in-house pharmacy departments) simply dispose of returned medications to avoid the time and effort required for sorting, or the risk of misadministration due to incorrect sorting (putting medications back into the wrong cassette).

[0004] Patent Document 1 discloses a drug sorting device that automatically recognizes and stores returned ampoules or vials. This drug sorting device recognizes the orientation and posture of the ampoules or vials, as well as the properties of the ampoules or vials (e.g., shape, size, type, and expiration date). Then, the device associates the identification information of each ampule or vial with a storage area set for the individual ampule or vial when storing it according to the recognized size of the ampule or vial, and individually arranges the ampoules or vials, thereby storing each ampule or vial in a removable manner. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] International Publication No. 2015 / 170761 (Published November 12, 2015) Summary of the Invention [Problem to be solved by the invention]

[0006] However, the subject of returns in Patent Document 1 is ampoules or vials, not medicines such as tablets or capsules that are not contained in containers, etc., or medicines themselves that are not packaged, etc. Therefore, Patent Document 1 does not anticipate identifying and automatically sorting such medicines (e.g., tablets or capsules) themselves.

[0007] An object of one aspect of the present invention is to realize a medicine sorting device that can recognize medicines themselves and sort them automatically. [Means for solving the problem]

[0008] A drug sorting device according to one aspect of the present invention is a drug sorting device comprising a discrimination unit that discriminates the type of each of multiple types of drugs input into the drug sorting device, and a sorting unit that sorts the drugs into multiple sorting positions by type based on the discrimination results by the discrimination unit, wherein the multiple types of drugs are drugs that have been prescribed to patients and then returned, and when the discrimination unit determines that the type of drug discriminated by the discrimination unit is the same as the type of drug sorted into one of the multiple sorting positions, the sorting unit sorts the drug whose type has been discriminated by the discrimination unit into the same sorting position as the sorting position into which the discrimination unit has previously sorted drugs whose types have been discriminated.

[0009] A control method for a drug sorting device according to one aspect of the present invention is a control method for a drug sorting device, which includes a discrimination step of discriminating the type of each of multiple types of drugs input into the drug sorting device, and a sorting step of sorting the drugs into multiple sorting positions by type based on the discrimination results of the discrimination step, wherein the multiple types of drugs are drugs that have been prescribed to patients and then returned, and if it is determined that the type of drug discriminated in the discrimination step is the same as the type of drug sorted into one of the multiple sorting positions, in the sorting step, the drug whose type has been discriminated in the discrimination step is sorted into the same sorting position as the sorting position into which the drugs whose types have previously been discriminated in the discrimination step have been sorted. [Effects of the Invention]

[0010] According to the medicine sorting device of one aspect of the present invention, it is possible to recognize the medicines themselves and automatically sort them. [Brief explanation of the drawings]

[0011] [Figure 1] 1 is a block diagram showing the overall configuration of a medicine sorting device according to an embodiment of the present invention. [Figure 2] FIG. 2 is a perspective view showing the overall configuration of the medicine sorting device. [Figure 3] FIG. 2 is a perspective view showing the basic configuration of a medicine sorting area provided in the medicine sorting device. [Figure 4] (a) is a diagram showing an example of a sheet provided at the bottom of the first storage section of the medicine sorting device, and (b) to (d) are diagrams for explaining the image analysis process of the captured sheet. [Figure 5] 5(a) and 5(b) are schematic diagrams showing an example of a control valve included in the suction mechanism included in the medicine sorting device. [Figure 6] 3(a) and 3(b) are perspective views showing the overall configuration of an imaging unit provided in the medicine sorting device. [Figure 7] FIG. 2 is a diagram schematically illustrating an internal configuration of the imaging unit. [Figure 8]10(a) and 10(b) are diagrams for explaining the rotation of the imaging unit. [Figure 9] 10(a) and 10(b) are diagrams for explaining the sorting process into sorting cups provided in the medicine sorting unit. FIG. [Figure 10] 10 is a perspective view showing the arrangement of a second RFID reader / writer unit provided in the medicine sorting device. FIG. [Figure 11] 10A and 10B are diagrams showing examples of image displays, in which (a) is an example of a display during medicine sorting processing, and (b) is an example of a display of image data corresponding to a specified sorting cup. [Figure 12] FIG. 10 is a diagram showing another example of an image display. [Figure 13] FIG. 10 is a diagram illustrating an example of character recognition processing. [Figure 14] 10A and 10B are diagrams for explaining an example of a process for specifying an imaging position. [Figure 15] 10(a) to 10(c) are diagrams illustrating an example of a process for specifying a pickup position. [Figure 16] 10(a) to 10(d) are diagrams for explaining an example of a process for specifying a drug adsorption range. [Figure 17] 10A and 10B are diagrams illustrating an example of a process for specifying medicines and sorting cups. [Figure 18] FIG. 2 is a schematic diagram showing an example of a suction mechanism provided in the conveying / sorting unit. [Figure 19] 10(a) to 10(d) are diagrams illustrating an example of determining the number of medicines placed on the medicine placing stand, and are images taken by the first camera. [Figure 20] FIG. 10 is a diagram showing an example of the processing flow from drug sorting to drug return. [Figure 21] FIG. 10 is a diagram showing an example of a method for displaying an inspection image. [Figure 22] 10A and 10B are diagrams showing an example of a method for displaying an inspection image. [Figure 23] 10(a) and 10(b) are diagrams showing an example of a method for returning the product after visual inspection is completed. [Figure 24]FIG. 10 is a diagram showing an example of a method for returning the product after visual inspection is completed. [Figure 25] FIG. 10 illustrates an example of a journal. [Figure 26] FIG. 10(a) is a diagram showing an example of an assortment image, and FIG. 10(b) is a diagram showing an example of an assorted medicine list image showing information related to the assorted medicines. [Figure 27] 10(a) to 10(c) are diagrams showing examples of images that are displayed when a user input for an assortment image is accepted. [Figure 28] 10(a) to 10(c) are diagrams showing examples of inspection images. [Figure 29] 10(a) to 10(c) are diagrams showing other examples of inspection images. [Figure 30] 10A and 10B are diagrams showing examples of display images relating to the task of tallying up medicines sorted by the medicine sorting device. [Figure 31] 10A to 10D are diagrams showing examples of output when the counting results are output by journal. [Figure 32] FIG. 1(a) is a diagram showing an example of a specific configuration of the sorting cup, and (b) to (d) are diagrams showing modified examples of the sorting cup. [Figure 33] FIG. 33 is a six-view diagram of the sorting cup shown in FIG. 32(a). [Figure 34] 10(a) to 10(c) are diagrams showing further modified examples of the sorting cup. [Figure 35] 10(a) to 10(h) are diagrams showing further modified examples of the sorting cup. [Figure 36] (a) to (d) are figures for explaining an example of a method for generating symbol identification information, where (a) is a figure showing an example of an image of a drug for which symbol registration information is generated, and (b) to (d) are figures showing an example of an image of a drug when obtaining symbol identification information. [Figure 37] These are figures for explaining an example of a drug adsorption method, where (a) is a figure for explaining the state when a relatively small drug is adsorbed while the adsorption mechanism is moved, and (b) and (c) are figures for explaining the state when the adsorption method is changed depending on the size of the drug. [Figure 38]10(a) to 10(c) are diagrams for explaining the process of identifying the pickup position. [Figure 39] 10A and 10B are diagrams showing another example of the configuration of a medicine sorting device, in which (a) is a perspective view of the medicine sorting device, and (b) is a perspective view showing the basic configuration of a medicine sorting area provided in the medicine sorting device. DETAILED DESCRIPTION OF THE INVENTION

[0012] An embodiment of the present invention will be described in detail below with reference to FIGS.

[0013] [Overview of the medicine sorting device 1] First, an overview of the medicine sorting device 1 will be described using Figures 1 and 2. Figure 1 is a block diagram showing the overall configuration of the medicine sorting device 1. Figure 2 is a perspective view showing the overall configuration of the medicine sorting device 1. As shown in Figures 1 and 2, the medicine sorting device 1 includes a medicine sorting area 2, a touch panel 3, a print output unit 4, a first RFID (Radio Frequency Identifier) ​​reader / writer unit 5, and a packaging mechanism 6.

[0014] The medicine sorting device 1 takes an image of each of multiple types of medicine, determines the type of medicine based on the image obtained as a result of the image capture, and sorts the medicines by 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. After the medicines sorted by type are visually inspected by the user, they are packaged or returned to the medicine shelf.

[0015] In this embodiment, the multiple types of medications are medications that are not contained in a container or are not packaged, and examples of such medications are tablets or capsules. Furthermore, the multiple types of medications are described as returned medications. Examples of returned medications include the return of medications used at a pharmacy or hospital as "returned medications" at the pharmacy or hospital, and the return of "brought-in medications" at the pharmacy or hospital, which may include medications issued by other pharmacies or hospitals in addition to the used medications. In other words, the concept of returned medications includes at least one of the above-mentioned "returned medications" and "brought-in medications." After medications are returned, the medication sorting device 1 can automatically perform processes from imaging to sorting.

[0016] The touch panel 3 accepts various user inputs at the operation unit 31, and displays various images on the display unit 32 (for example, an image showing the progress of drug sorting, an image for visual inspection).

[0017] The print output unit 4 prints a journal representing drug data (e.g., data indicating the drug name, manufacturer, or ingredients) related to the drug after visual inspection according to user input after visual inspection. The drug data may include image data representing a drug-specific image.

[0018] The first RFID reader / writer unit 5 reads data about the medicines stored in each sorting cup 141 (e.g., the number of medicines stored, the medicine data, and image data acquired by the imaging unit 13) stored in an RFID tag (not shown) attached to the bottom of each sorting cup 141 in the second storage section 14. This data may include medicine data determined by visual inspection (medicine data after visual inspection). The medicine data after visual inspection may also be written to the RFID tag. The medicine data after visual inspection is used when the medicines stored in the corresponding sorting cup 141 are (1) packaged by the packaging mechanism 6 or a packaging machine other than the medicine sorting device 1, or (2) returned to the medicine shelf.

[0019] The packaging mechanism 6 packages the sorted medicines. The packaging mechanism 6 is an optional mechanism. When the packaging mechanism 6 is provided in the medicine sorting device 1, the medicine sorting device 1 can perform all processes from sorting returned medicines to packaging after visual inspection all at once. In particular, when medicines are fed into the packaging mechanism 6 by the transport / sorting unit 12, the processes from sorting to packaging can be performed automatically, except for visual inspection.

[0020] The packaging mechanism 6 can be a packaging unit of a conventional tablet packaging machine or powder packaging machine. In this case, for example, drugs in the sorting cup 141, which have been sorted into the same drug type, can be packaged into one or more packages. During the packaging process, a printing mechanism provided in the packaging mechanism 6 prints the drug names of the drugs in the sorting cup 141, which are stored in the RFID tag of the sorting cup 141, onto packaging paper. In addition, a barcode containing drug name information for the drug is printed on each package. These printouts are used when returning the drugs to the medicine shelf or to the tablet packaging machine, etc.

[0021] [Basic configuration of drug sorting area 2] Next, the basic configuration of the medicine sorting area 2 (internal configuration of the medicine sorting device 1) will be described with reference to Figures 1 and 3. Figure 3 is a perspective view showing the basic configuration of the medicine sorting area 2.

[0022] 1 and 3, the medicine sorting area 2 mainly comprises, as hardware, a first storage section 11, a transport / sorting unit 12 (sorting section), an imaging unit 13, a second storage section 14, a waiting tray 15, a collection tray 16, a medicine insertion port 17, and a second RFID reader / writer unit 18. Each component except for the transport / sorting unit 12 is mounted on a base 19. The main functions of the transport / sorting unit 12, the imaging unit 13, and the second RFID reader / writer unit 18 will be described in detail later in the description of each process.

[0023] The first storage unit 11 stores a mixture of multiple types of medicines returned by users. In this embodiment, the first storage unit 11 is divided into multiple storage units. In this case, for example, when all of the medicines stored in one storage unit are transported by the transport / sorting unit 12, the medicines stored in a storage unit adjacent to that storage unit become the target for transport. The first storage unit 11 may also be rotatable about the Z axis (the center of the cylindrical shape). In this case, the control unit of the computer 60 (hereinafter simply referred to as the control unit) may rotate the first storage unit 11 so that the transport / sorting unit 12 can easily retrieve the medicines, for example, when one storage unit becomes empty.

[0024] The first storage unit 11 has a cylindrical shape. This shape allows for an increased storage capacity. If this point is not taken into consideration, the shape is not limited to a cylindrical shape, and any shape that can store multiple types of medicines will do. Also, a dot-shaped pattern or unevenness may be provided on the bottom of the first storage unit 11. In this case, the control unit can determine that the first storage unit 11 is empty by analyzing the image captured by the second camera 121.

[0025] When the dot shape is represented by a pattern, it is realized, for example, by a sheet on which black dots sufficiently smaller than the drug to be detected are printed at equal intervals (see (a) of Figure 4). The sheet is white, and the intervals between the black dots are approximately the same as the size of the black dots. When it is represented by concaves and convexes, it is realized by a sheet on which concaves or convexes sufficiently smaller than the drug to be detected are arranged at equal intervals. The black dots or convexes may be provided directly on the bottom of the first storage section 11 instead of on a sheet. A similar pattern or convexes may also be provided on the bottom of the sorting cup 141.

[0026] The second storage section 14 includes a plurality of sorting cups 141 that store medicines sorted by type. The control section determines the type of medicine based on the image of the medicine captured by the imaging unit 13, and determines the sorting cup 141 in which to store the medicine based on the determination result. The medicine is transported to the determined sorting cup 141 by the transporting / sorting unit 12 and stored therein.

[0027] The standby tray 15 is a storage unit for temporarily storing medicines whose types are determined by the control unit when all of the sorting cups 141 are filled with medicines. After the medicines are removed from the sorting cups 141, they may be transported from the standby tray 15 to the sorting cups 141.

[0028] The collection tray 16 is a storage unit that stores objects whose type cannot be identified by the control unit (e.g., foreign matter other than medicine). Examples of foreign matter other than medicine include pieces of PTP (Press Through Pack) sheets. Pieces of PTP sheets may be mixed into the first storage unit 11 when medicines are returned.

[0029] When the medicine sorting device 1 is equipped with a packaging mechanism 6, the medicine input port 17 is used to transport medicines stored in the second storage section 14 to the packaging mechanism 6 by the transport / sorting unit 12. Naturally, when the medicine sorting device 1 is not equipped with a packaging mechanism 6, the medicine input port 17 is not required.

[0030] 1, the medicine sorting device 1 also includes a computer 60 that controls the above-mentioned components (hardware) of the medicine sorting device 1. The computer 60 mainly includes, as control units (software), a transport control unit 61, a sorting control unit 62, an imaging control unit 63, a discrimination unit 64, an image classification unit 65, an operation input unit 66, a display control unit 67, an RFID control unit 68, and a print output control unit 69. The transport control unit 61, the sorting control unit 62, the imaging control unit 63, the discrimination unit 64, and the image classification unit 65 will be described in detail in the description of each process below.

[0031] The operation input unit 66 and the display control unit 67 respectively control the operation unit 31 and the display unit 32 of the touch panel 3. The RFID control unit 68 controls the first RFID reader / writer unit 5 and the second RFID reader / writer unit 18. The print output control unit 69 controls the print output unit 4 in accordance with user input received by the operation input unit 66. Note that, in the case where the medicine sorting device 1 is equipped with a packaging mechanism 6, the computer 60 will have, as its control unit, a packaging control unit that controls the packaging mechanism 6.

[0032] The computer 60 also includes a storage unit 80. The storage unit 80 stores, for example, a drug database (drug master) that manages drug data on multiple types of drugs, and image data captured by the first camera 131. The storage unit 80 also stores data linking the discrimination results of the discrimination unit 64 with the drug sorting positions determined by the assortment control unit 62. This data can also be considered as sorting status data linking drugs with sorting positions from the start of sorting to the completion of sorting.

[0033] The drug database, image data, and sorting status data do not have to be managed by the storage unit 80, but may be managed by, for example, an external device. In this case, the control unit may obtain the drug database, image data, and sorting status data from the external device via a communication line such as the Internet, as needed. The drug database may also be updated by adding new drug data.

[0034] [Overview of processing in medicine sorting device 1] In the medicine sorting device 1, the transporting and sorting unit 12 transports each medicine returned to the first storage section 11 to the imaging unit 13. The imaging unit 13 sequentially captures images of each transported medicine, and the control unit determines the type of each medicine based on the captured images and determines a sorting position in the second storage section 14 for each identified medicine. The transporting and sorting unit 12 transports each medicine to the determined sorting position. Information about the medicines stored in the second storage section 14 is written to the RFID tag of the sorting cup 141, stored in the memory section 80, or displayed on the touch panel 3. After or during the sorting of the medicines, the user operates the touch panel 3 to perform processes such as visual inspection and packaging. Each process will be described in detail below.

[0035] [Drug Delivery Process to Imaging Unit 13] First, the process of transporting medicines from the first storage section 11 to the imaging unit 13 will be described with reference to Fig. 1 and Figs. 3 to 5. Fig. 4(a) is a diagram showing an example of a sheet provided at the bottom of the first storage section 11, and Figs. 4(b) to 4(d) are diagrams for explaining the image analysis process of the imaged sheet. Figs. 5(a) and 5(b) are schematic diagrams showing an example of a control valve provided in the suction mechanism. The above-mentioned process of transporting medicines is mainly performed by the transport / sorting unit 12 and the transport control section 61.

[0036] Specifically, the conveying / sorting unit 12 conveys the medicines stored in the first storage section 11 to a receiving area Ar1 (see (b) of FIG. 6) where the imaging unit 13 receives the medicines. The conveying control section 61 controls the conveying process performed by the conveying / sorting unit 12.

[0037] The transport and sorting unit 12 includes a second camera 121 , a suction and shutter mechanism 122 , and a transport mechanism 123 .

[0038] The second camera 121 sequentially captures images of the first storage unit 11 to identify the medicine to be transported. The imaging control unit 63 controls the imaging process of the second camera 121. The second camera 121 is provided at the end of the transport / sorting unit 12 (specifically, of the housing including at least the suction / shutter mechanism 122) on the side facing the base 19. The second camera 121 may be provided at the tip of the suction mechanism described below. The imaging control unit 63 analyzes the captured image and determines whether or not the image contains medicine. If it is determined that the image contains medicine, the transport control unit 61, for example, brings the tip closer to the first storage unit 11 and identifies the medicine contained in the image captured at that time as the medicine to be transported.

[0039] More specifically, second camera 121 captures an image of an entire one of the multiple storage sections included in first storage section 11. Imaging control section 63 converts the image including the storage section into a brightness image that has been binarized based on the difference between light and dark, and identifies the outline of a mass of multiple drugs and its area based on the boundary between light and dark in the brightness image (drug area identification method 1). Imaging control section 63 adsorbs one drug contained in the storage section by bringing the tip close to a position within the storage section that corresponds to the area including the brightest part among the identified areas.

[0040] A visible light source (not shown) is provided near the second camera 121, and when the second camera 121 captures an image, visible light is irradiated from above the container (in the +Z-axis direction). Therefore, it can be determined that the brightest part in the brightness image is the part of the container that is closest to the tip. Therefore, by moving the tip toward the area including the brightest part, it is possible to acquire images starting from the drug closest to the tip. Note that the brightness image may be an image obtained by converting any of the image attributes of hue, saturation, and brightness of the captured image of the drug.

[0041] 4(b) to 4(d), the imaging control unit 63 may perform image analysis to identify the position of the drug contained in the first container 11 (drug region identification method 2). Note that black dots that are sufficiently smaller than the drug to be detected are printed at equal intervals on the bottom of the first container 11.

[0042] Specifically, as shown in Fig. 4(b), the imaging control unit 63 converts an image containing multiple medicines contained in one of the first containers 11 into a brightness image, and performs a flattening process to generate the flattened image shown in Fig. 4(c). The imaging control unit 63 calculates the difference between the gradation values ​​of the brightness image and the flattened image, and determines that an area where the difference is smaller than a predetermined value is an area of ​​medicine contained in the image. Fig. 4(d) shows the difference image after the above difference is calculated.

[0043] 4(c) and (d), the difference in gradation value is larger in the area where there is no drug in the difference image than in the area where there is drug, so the imaging control unit 63 can identify the area where the difference is small as the drug area.

[0044] Generally, in mechanisms for adsorbing and transporting drugs, a backlight (transmitted light) that emits visible light from below the drug container is installed to determine the difference in brightness between the drug and the background. However, due to constraints such as the size or cost of the device that includes the mechanism, or the operating method of the device, it may not be possible to install a backlight. Furthermore, if the drug and the background are similar in color, the accuracy of the above-mentioned position determination decreases.

[0045] According to the above-described drug region specifying method 2, the position can be specified with high accuracy without providing a backlight (transmitted illumination). If the above-described black dot is provided on the bottom of the first container 11, the above-described drug region specifying method 1 can also achieve the same effect.

[0046] The suction / shutter mechanism 122 includes a suction mechanism that suctions the medicine identified as the delivery target, and a shutter mechanism that prevents the medicine 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 so as to be movable substantially parallel to the XY plane.

[0047] When acquiring a medicine, the suction mechanism extends from the end, adsorbs the identified medicine at its tip, and then returns to the end. In this state, the transport control unit 61 moves the shutter mechanism to a position facing the end and maintains the position of the shutter mechanism (closed state) during medicine transport. The transport control unit 61 moves the suction / shutter mechanism 122 to a position facing the medicine placement stage 133a (see Figure 6(b)) of the medicine holding mechanism 133 arranged in the receiving area Ar1, and then moves the shutter mechanism to a position not facing the end (open state). Then, after extending the suction mechanism from the end, the suction state is released, thereby placing the medicine on the medicine placement stage 133a.

[0048] In other words, during the drug transport process to the imaging unit 13, the adsorption mechanism moves to the first storage section 11 at a position opposite the first storage section 11 (in other words, moves from above the first storage section 11 to inside the first storage section 11) and adsorbs the drug stored in the first storage section 11.

[0049] The suction mechanism has a configuration, for example, as shown in Fig. 5. As shown in Fig. 5, the tip of the suction mechanism is provided with a suction pad 122a that comes into contact with the drug to be transported. The suction pad 122a is connected to a vacuum pump 122d that generates a vacuum (sucks in air) via an air pipe 122b through which air flows.

[0050] In Fig. 5(a), a proportional control solenoid valve 122c that controls the flow rate of air flowing through air pipe 122b is provided midway through air pipe 122b. On the other hand, in Fig. 5(b), a solenoid valve 122p and flow rate control valves 122q and 122r are provided instead of proportional control solenoid valve 122c. Specifically, in the example of Fig. 5(b), a flow rate control valve 122q is provided midway through air pipe 122b. Furthermore, in branch air pipe 122b' branching off from air pipe 122b, a solenoid valve 122p that controls flow rate control valves 122q and 122r, and a flow rate control valve 122r that controls the flow rate of air flowing through branch air pipe 122b' are provided in order from the closest to air pipe 122b. The flow rate of air flowing through air tube 122b can be controlled by proportional control solenoid valve 122c in Fig. 5(a), and by solenoid valve 122p and flow control valves 122q and 122r in Fig. 5(b), thereby adjusting the suction force (adsorption pressure) for adsorbing the drug on suction pad 122a. Fig. 5(b) shows the case where solenoid valve 122p is in the off state.

[0051] Here, when adsorbing a drug with the suction pad 122a, it is necessary to increase the air flow rate to generate a relatively strong suction force. When multiple drugs are simultaneously adsorbed by the suction pad 122a, it is necessary to detect that the suction force does not increase above a predetermined value even when the air flow rate is increased, and to attempt adsorption of the drugs again. Furthermore, while the drugs are being adsorbed and transported, it is necessary to increase the air flow rate to maintain a relatively strong suction force so that the drugs can be held even if they are not completely attached to the suction pad 122a. Thus, while the air flow rate needs to be controlled to change the suction force during adsorption, this control does not need to be very complicated.

[0052] In the case of FIG. 5(b), the flow rate of air flowing through the air pipe 122b is switched between two flow rates, "strong" and "weak," by controlling the flow rate control valves 122q and 122r using the solenoid valve 122p. Specifically, the air flow rate is reduced by turning on the solenoid valve 122p, and increased by turning off the solenoid valve 122p. In this case, air flow rate control can be simplified compared to the case of the proportional control solenoid valve 122c in FIG. 5(a). Note that these suction mechanisms are controlled by the conveyance control unit 61 and the sorting control unit 62.

[0053] In addition, the transport control unit 61 (sorting control unit 62 when sorting medicines) may change the time from when the medicine is brought into close contact with the suction pad 122a to when the tip is pulled upward (lifted up) depending on the type of medicine.

[0054] In this case, the transport control unit 61, for example, analyzes the image of the drug captured by the second camera 121 to determine whether the size or shape of the drug makes it difficult to adhere to the suction pad 122a. If the transport control unit 61 determines that the size or shape of the drug makes it difficult to adhere, it extends the time until the tip is pulled up by a predetermined time compared to when it determines that the drug is easy to adhere to. If a drug that does not adhere well is pulled up immediately after being adsorbed, even if the suction force reaches a specified value sufficient for pulling up, there is a possibility that the drug will not be sufficiently adsorbed to the suction pad 122a and will fall. By extending the time until the tip is pulled up by a predetermined time, the drug can be sufficiently adhered to the suction pad 122a and the drug can be prevented from falling when pulled up.

[0055] When the drug is adsorbed in the first storage section 11, the transport control section 61 appropriately colors the drug in the image and determines the size of the drug by comparing the area of ​​the colored part in the image with the set area size value.

[0056] 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. This transport mechanism 123 enables the movement of the suction / shutter mechanism 122 when searching for a drug to be transported in the first container 11, or transport of a drug from the first container 11 to the drug placement table 133a. Also, in the drug sorting process described below, it enables transport of a drug from the drug placement table 133a to the second container 14.

[0057] The conveying / sorting unit 12 may be provided with a distance sensor at the tip of the suction mechanism for detecting (measuring) the distance from the tip to the medicine (distance in the Z-axis direction), and may also be provided with a pressure sensor for detecting the suction force of the suction mechanism.

[0058] By measuring the distance in the Z-axis direction using a ranging sensor, the transport control unit 61 can identify the exact position of the drug regardless of the position of the second camera 121 relative to the first storage unit 11 or the state of drug accumulation in the first storage unit 11.

[0059] The distance measuring sensor may measure the distance to the measurement target based on the average area of ​​the captured image. In this case, the transport control unit 61 lowers the tip within the range of the distance (average height) to the measurement target based on the average area acquired by the distance measuring sensor. When a pressure sensor is provided, the process described below makes it possible to lower the tip so that it does not go too far relative to the medicine contained in the first container 11.

[0060] The distance measuring sensor may also measure the distance to the vicinity of the top of the pile of medicines formed by piling them up in the first container 11. In this case, the transport control unit 61 can lower the tip portion in one go to just before the top based on the distance.

[0061] Furthermore, the suction force detected by the pressure sensor changes depending on whether or not an object is present in front of the tip. When a pressure sensor is provided, the transport control unit 61 determines whether or not the tip is approaching the medicine based on the change in suction force, and controls the movement of the suction mechanism in the Z-axis direction based on the determination result. For example, if the tip approaches the medicine and the suction force changes, the speed of movement of the suction mechanism in the Z-axis direction can be reduced to prevent the tip from colliding with the medicine when suctioning the medicine and causing the medicine piled up in the first container 11 to collapse.

[0062] Alternatively, for example, the pressure sensor may be set to have two thresholds. When there is one threshold, the transport control unit 61 (or the sorting control unit 62 when sorting medicines) determines that the tip is in a position where it can adsorb medicines when the suction force is equal to or greater than the threshold. However, because the moving speed of the tip is fast, even if the moving speed is reduced and the tip is stopped after the determination, there is a possibility that the tip will collide with the medicines and cause the medicines stacked in the first container 11 to collapse.

[0063] Therefore, thresholds set in the pressure sensor are a first threshold for determining whether an object to be adsorbed, such as a drug, is present near the tip, and a second threshold for determining that the drug has been adsorbed to the tip. The first threshold is lower than the second threshold and is also lower than the threshold for the one case. These two thresholds are set in advance through experiments, etc. When the tip descends and the drug enters a predetermined range of the tip (a range within which the drug can be adsorbed), a slight change occurs in the suction force (the suction force becomes slightly larger). The first threshold is set so that the suction force after this change can be detected. On the other hand, when the drug is adsorbed, a suction force greater than the suction force after the change occurs. The second threshold is set so that this large suction force during adsorption can be detected.

[0064] The transport control unit 61 lowers the tip and starts suction by the vacuum pump 122d. When the transport control unit 61 determines that the suction force detected by the pressure sensor has reached a first threshold or greater, it determines that the tip has approached the drug to a position where it can adsorb the drug, and stops the tip. The transport control unit 61 then waits for a predetermined time until the drug closest to the tip is naturally adsorbed. When the drug is adsorbed to the tip, the suction force further increases, and the changed suction force becomes equal to or greater than a second threshold. When the transport control unit 61 determines that the changed suction force has reached or greater than the second threshold, it determines that the tip has adsorbed the drug, raises the tip, and transports the drug to the next destination.

[0065] On the other hand, if the transport control unit 61 cannot determine that the suction force has reached or exceeded the second threshold within a predetermined time after stopping the tip portion, it may, for example, temporarily raise the tip portion and then lower it again to retry the drug adsorption process. In this case, the transport control unit 61 may also lower the tip portion a predetermined distance (a distance not large enough to crush the pile of drug, for example, several millimeters) from the stopped position and determine whether the suction force has reached or exceeded the second threshold. In other words, the tip portion may be lowered slightly so that the drug is adsorbed onto the tip portion.

[0066] By setting two threshold levels (particularly the first threshold level) in this way, it is possible to reliably prevent the tip portion from collapsing the medicine piled up in first container 11 when the medicine is adsorbed.

[0067] When initially lowering the tip portion, the transport control unit 61 may lower the tip portion at a predetermined speed a predetermined distance (for example, to a position where the tip portion does not enter the first storage unit 11) and then decelerate the speed. After decelerating, the transport control unit 61 may continue to lower the tip portion until the suction force reaches or exceeds the first or second threshold. The initial lowering refers to the case where the tip portion is lowered from the end of the housing including at least the suction / shutter mechanism 122, the end facing the base 19. When the suction force suddenly reaches or exceeds the second threshold, the transport control unit 61 proceeds directly to the transport process.

[0068] [Drug Imaging Processing] Next, the medicine imaging process by the imaging unit 13 will be described with reference to Figs. 1, 3, and 6 to 8. Fig. 6(a) and (b) are perspective views showing the overall configuration of the imaging unit 13. Fig. 7 is a diagram schematically showing the internal configuration of the imaging unit 13. Fig. 8(a) and (b) are diagrams for explaining the rotation of the imaging unit 13. The medicine imaging process is mainly performed by the imaging unit 13 and the imaging control unit 63.

[0069] Specifically, the imaging unit 13 is placed on a medicine placing table 133a and captures an image of a medicine placed in a placement area Ar2 where the medicine to be imaged is placed, as shown in Figure 6(b) and Figure 7. The imaging control unit 63 controls the imaging process by the imaging unit 13, the pivoting movement of the first camera 131 and the illuminator 134, and the movement of the medicine holding mechanism 133. As shown in Figures 1 and 6, the imaging unit 13 includes the first camera 131 (imaging section), a rotation mechanism 132 (rotating section), the medicine holding mechanism 133 (medicine placing table, moving mechanism), and the illuminator 134 (ultraviolet light irradiation section, visible light irradiation section).

[0070] The first camera 131 captures an image of a drug placed in a placement area Ar2 facing the first camera 131 in order to identify the type of drug in the discrimination unit 64, which will be described later. The drug holding mechanism 133 is a mechanism for holding a drug, and as shown in FIGS. 6(a) and 6(b), includes a drug placing table (petri dish) 133a, a turning mechanism 133b (moving mechanism), and a shaft 133c connecting the drug placing table 133a and the turning mechanism 133b. The drug placing table 133a is used to place a drug to be imaged. The turning mechanism 133b moves the drug placing table 133a; specifically, it turns the drug placing table 133a relative to the XY plane and turns the shaft 133c in the circumferential direction of the shaft 133c.

[0071] When the medicine transported from the first container 11 is placed on the medicine placing table 133a, the imaging control unit 63 drives the turning mechanism 133b to move the medicine placing table 133a from the receiving area Ar1 to the placing area Ar2. Thereafter, the imaging control unit 63 controls at least the first camera 131 and the illuminator 134 to capture an image of the medicine placed in the placing area Ar2. The captured image is stored as image data in the storage unit 80. For example, after the imaging is completed, the imaging control unit 63 drives the turning mechanism 133b to move the medicine placing table 133a on which the imaged medicine is placed from the placing area Ar2 to the receiving area Ar1.

[0072] In other words, under the control of the imaging control unit 63, the turning mechanism 133b moves the medicine placing table 133a from the receiving area Ar1 (placing area) where the medicines are placed to the placing area Ar2. The turning mechanism 133b also moves the medicine placing table 133a from the placing area Ar2 back to the receiving area Ar1 (sorting standby area) to wait for sorting into the second container 14. In this embodiment, the receiving area Ar1 serves both as the placing area where the medicines are placed and as the sorting standby area where the medicines wait for sorting, but the placing area and the sorting standby area may be located at different positions on the base 19.

[0073] In this embodiment, two medicine placing tables 133a are provided at the tip (end) of the shaft 133c. The turning mechanism 133b turns the shaft 133c, and when one medicine placing table 133a is placed in the placement area Ar2, the other medicine placing table 133a is placed in the receiving area Ar1. When imaging medicines in the placement area Ar2, the transport / sorting unit 12 transports medicines from the first container 11 to the medicine placing table 133a present in the receiving area Ar1, thereby enabling continuous imaging of the medicines. Note that it is assumed that the medicine placing table 133a does not have any medicines placed on it, for example, after the medicines have been sorted into the second container 14.

[0074] In this embodiment, the medicine placing table 133a is transparent, so that the first camera 131 can take images of the medicines placed on the medicine placing table 133a from multiple directions through the medicine placing table 133a.

[0075] 7, the medicine placing stand 133a may have a V-shaped cross section with a recessed bottom. As shown in FIGS. 6(b) and 7, when the medicine placing stand 133a is placed in the receiving area Ar1 and the placement area Ar2, the groove direction of the V-shaped cross section (extension direction of the shaft portion 133c) is approximately parallel to the rotation axis Ay (see FIG. 8(a)) of the imaging mechanism (described later) of the rotation mechanism 132. The V-shaped cross section of the bottom does not have to be an acute V-shape, but may be a shape that allows the information (engraved information or printed information) imprinted or printed on the medicine to be recognized even when viewed (imaged) from the back side of the medicine placing stand 133a, and that allows the medicine to be fixed.

[0076] If the medicine is a capsule or deformed tablet (e.g., rugby ball-shaped), if the bottom of the medicine mounting table 133a is flat, the medicine will not be aligned on the XY plane, which may make it difficult to obtain a clear image of the medicine (engraved information or printed information). If the cross section is V-shaped, the capsule or deformed tablet fits into the bottom end, fixing the medicine. This makes it easier to obtain a clear image of the medicine. In the case of a tablet, for example, the axis 133c may be rotated in the circumferential direction of the axis 133c to position the flat portion of the medicine mounting table 133a facing the first camera 131, thereby ensuring that the medicine does not move.

[0077] Additionally, the rotation mechanism 133b can vibrate (slightly move or shake) the medicine placing table 133a. In this case, by vibrating and rolling the capsule placed on the medicine placing table 133a, the portion of the capsule bearing the imprint or print can be oriented in a predetermined direction (for example, the portion can be made to face the first camera 131 placed in the initial position described below). Therefore, the imaging control unit 63 can acquire an image of the medicine including the imprint or print when imaging the medicine for the first time (before the first camera 131 rotates). Furthermore, due to the vibration, even if a cylindrical tablet (with a circular bottom) is placed upright on the flat surface, the tablet can be turned sideways (positioned so that the bottom of the tablet faces the flat surface).

[0078] A black film may be provided on the periphery of the bottom of the medicine placing table 133a, which can prevent light irradiated onto the medicine during imaging from being reflected by the medicine placing table 133a.

[0079] Under the control of the imaging control unit 63, the illuminator 134 emits light to be irradiated onto the medicine when imaging the medicine. As shown in FIG. 6(a) and FIG. 7, the illuminator 134 includes a visible light irradiator (first irradiator 134a and second irradiator 134b) that irradiates the medicine with visible light, and an ultraviolet light irradiator 134c that irradiates the medicine with ultraviolet light. The first irradiator 134a and the second irradiator 134b irradiate the medicine with white light as visible light. The first irradiator 134a is a bar-shaped visible light source (bar illuminator), and the second irradiator 134b is a ring-shaped visible light source (ring illuminator). The first camera 131 receives the visible light emitted from the first irradiator 134a or the second irradiator 134b and reflected by the medicine, thereby acquiring an image based on visible light (visible light image). The imaging control unit 63 outputs image data representing the visible light image captured by the first camera 131 to the determination unit 64.

[0080] Here, the position where the first camera 131 is arranged facing the arrangement area Ar2 is defined as the initial position. The initial position can also be said to be a position above the arrangement area Ar2 and approximately perpendicular to the arrangement area Ar2. In (a) of Figures 6, 7, and 8, the first camera 131 is in the initial position.

[0081] 7, the first irradiation unit 134a is provided at an initial position obliquely above the medicine placing table 133a arranged in the arrangement area Ar2. By arranging the first irradiation unit 134a in this manner, it is possible to obtain a clear image of the print on the medicine.

[0082] On the other hand, the second irradiating unit 134b is provided at a position closer than the first irradiating unit 134a. In the initial state, the second irradiating unit 134b irradiates the medicine placing table 133a arranged in the arrangement area Ar2 with visible light from a direction closer to the horizontal direction than the first irradiating unit 134a. By arranging the second irradiating unit 134b in this way, it is possible to obtain a clear image of the markings (concave and convex) on the medicine.

[0083] The ultraviolet light irradiating unit 134c irradiates the drug with ultraviolet light (e.g., light having a peak wavelength of 365 nm or more and 410 nm or less), thereby exciting the components contained in the drug. This causes fluorescence (e.g., light having a peak wavelength of 410 nm or more and 800 nm or less) to be extracted from the drug. Therefore, the ultraviolet light irradiating unit 134c can also be said to be an excitation light source that emits excitation light that excites the drug.

[0084] First camera 131 receives fluorescence emitted from the drug and thereby acquires an image based on ultraviolet light (ultraviolet light image). Imaging control unit 63 outputs image data indicating the ultraviolet light image acquired by first camera 131 to discrimination unit 64. Therefore, discrimination unit 64, which will be described later, can discriminate the type of drug using the ultraviolet light image in addition to the visible light image.

[0085] In this embodiment, the ultraviolet light irradiating unit 134c is provided at a position adjacent to the first irradiating unit 134a. The position of the ultraviolet light irradiating unit 134c is not particularly limited as long as it is a position where the ultraviolet light can be irradiated onto the drug and the fluorescence can be extracted efficiently.

[0086] 7, a polarizing filter (PL filter) 131a and an ultraviolet light removal filter 131b are provided in front of the lens of the first camera 131. The polarizing filter 131a removes light (e.g., light reflected by the medicine placing table 133a) that is unnecessary for imaging from the light traveling toward the first camera 131. The ultraviolet light removal filter 131b removes ultraviolet light traveling toward the first camera 131, for example, ultraviolet light emitted from the ultraviolet light irradiating unit 134c and reflected without being excited by the medicine. Also, a polarizing filter 134d is provided in front of the first irradiating unit 134a, which transmits only visible light toward the medicine and removes other unnecessary light. Furthermore, an ultraviolet light transmission filter 134e is provided in front of the ultraviolet light irradiating unit 134c, which transmits only ultraviolet light toward the medicine and removes other unnecessary light (e.g., visible light).

[0087] As shown in Fig. 6, the rotation mechanism 132 rotates the first camera 131 so as to revolve around the arrangement area Ar2 (the medicine placing table 133a arranged at that position) where the medicine to be imaged is arranged. The first camera 131 images the medicine arranged in the arrangement area Ar2 from multiple positions to which the rotation mechanism 132 has rotated it. Specifically, the imaging mechanism including the first camera 131 and the illuminator 134 is rotated so as to revolve around the arrangement area Ar2. Therefore, the first camera 131 can image the medicine from multiple directions while maintaining the positional relationship of the first camera 131 and the illuminator 134 with respect to the arrangement area Ar2.

[0088] As shown in FIG. 6(a), 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 placement 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 placement area Ar2.

[0089] The rotation mechanism 132 rotates the imaging mechanism between an initial position and a position opposite to the initial position. The position opposite to the initial position is a position substantially perpendicular to the placement area Ar2 and below the placement area Ar2. This position can also be said to be a position where the first camera 131 faces the bottom of the medicine placing table 133a located in the placement area Ar2.

[0090] As shown in FIG. 8, an axis that passes through the center of the placement area Ar2 and is parallel to the Z axis is defined as axis Ax0, and an axis that passes through the center of the placement area Ar2 and the center of the imaging mechanism is defined as axis Ax1. The angle between axis Ax0 and axis Ax1 is defined as θ. In this embodiment, the rotation mechanism 132 positions the imaging mechanism at one of θ=0° (initial position), 45°, 135°, and 180°. (a) of FIG. 8 shows a case where the imaging mechanism is at θ=0°, and (b) of FIG. 8 shows a case where the imaging mechanism has rotated from the initial position to a position of θ=45°.

[0091] In this way, by rotating the imaging mechanism around the placement area Ar2, it is possible to image the medicine from multiple directions while the medicine is fixed in the placement area Ar2. Furthermore, even if the medicine (tablet) stands upright after shaking the medicine placing table 133a, information indicated by the markings or the like affixed to the medicine can be obtained by imaging from an oblique direction (θ=45° or 135°).

[0092] The medicine may be imaged from multiple directions by fixing the imaging mechanism and rotating the medicine. Alternatively, as described above, the rotation mechanism 133b may vibrate the medicine placing table 133a, causing the medicine to roll on the medicine placing table 133a, allowing the fixed imaging mechanism to capture the engraved or printed portion. The following configurations (A) to (C) may be included in the configuration for imaging the medicine from multiple directions. (A) A first camera 131 is provided above the placement area Ar2, facing the placement area Ar2, and a set of a first irradiator 134a and an ultraviolet light irradiator 134c is provided obliquely above the medicine placing table 133a placed in the placement area Ar2. In other words, the set is fixed at the position shown in FIG. 7. (B) A first camera 131 is provided below the placement area Ar2 at a position facing the placement area Ar2, and a set of a first irradiator 134a and an ultraviolet light irradiator 134c is provided diagonally below the medicine placing table 133a arranged in the placement area Ar2. In other words, the set is fixed at a position facing (A) above, sandwiching the placement area Ar2. (C) The second irradiator 134b is provided near the medicine placing table 133a arranged in the placement area Ar2, as shown in FIG.

[0093] (imaging position control) Next, an example of position control of the imaging mechanism will be described. The imaging control unit 63 first sets the imaging mechanism to an initial position and causes the first camera 131 to capture an image of the drug placed in the placement area Ar2 at the initial position. At this time, the first camera 131 acquires visible light images (two visible light images) based on visible light from the first irradiating unit 134a and the second irradiating unit 134b, and also acquires an ultraviolet light image based on ultraviolet light from the ultraviolet light irradiating unit 134c.

[0094] Next, the imaging control unit 63 sets the imaging mechanism to a position opposite to the initial position and causes the first camera 131 to capture an image of the drug placed in the placement area Ar2 at that position, thereby acquiring two visible light images and an ultraviolet light image. The discrimination unit 64 analyzes these six images to determine the type of drug. If the type of drug cannot be identified as one, the imaging control unit 63 causes the first irradiator 134a and the second irradiator 134b to emit visible light at positions θ=45° and 135°, and causes the first camera 131 to capture an image of the drug. The discrimination unit 64 analyzes the visible light image at this time to determine the type of drug.

[0095] The position of the imaging mechanism can be controlled in various ways, including but not limited to the above. For example, imaging may be performed from a position opposite to the initial position, and then imaging may be performed from the initial position. Alternatively, a drug discrimination process may be performed based on a visible light image captured from a position of θ=45°, and only if the drug type cannot be identified as a single type may a visible light image be acquired from a position of θ=135°. Alternatively, only ultraviolet light images may be acquired at the initial position and a position opposite to the initial position, and after drug discrimination process based on the ultraviolet light image, a visible light image may be acquired at that position. Alternatively, visible light images and ultraviolet light images may be acquired at all positions.

[0096] [Image processing / discrimination processing] Next, image processing of the image captured by the imaging unit 13 and drug discrimination processing based on the results of the image processing will be described with reference to Fig. 1. The image processing is mainly performed by the imaging control unit 63, and the discrimination processing is mainly performed by the discrimination unit 64.

[0097] 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 irradiating unit 134a or the second irradiating unit 134b. The discrimination unit 64 also 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.

[0098] The discrimination unit 64 extracts features of the drug contained in each of the visible light image and / or the ultraviolet light image by performing image analysis. In other words, the discrimination unit 64 functions as a feature extraction unit that extracts features of the drug. Examples of drug features include size, shape, markings, prints, secant lines, and representative colors (the colors of the marked or printed areas). When optical character recognition (OCR) or the like is performed, other information such as the name of the drug or identification information indicating the manufacturer indicated by markings or prints, and expiration dates is extracted as drug features. In the case of ultraviolet light images, examples of drug features include the representative colors of the drug in the image. 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. Drug feature extraction may be performed using known techniques.

[0099] The discrimination unit 64 determines the type of drug by comparing the characteristics of each drug with the drug database. In other words, the discrimination unit 64 functions as a drug data extraction unit that narrows down drug data candidates related to the imaged drug from the drug database using pattern matching or the like based on the extracted drug characteristics. In this case, for example, the drug data candidates are narrowed down using at least one of the above-mentioned size, shape, marking, print, dividing line, and representative color. Thereafter, the discrimination unit 64 performs OCR or the like to read identification information or the like indicated on the marking or print, and further narrows down the drug type from the candidates using pattern matching or the like.

[0100] The discrimination unit 64 also compares the features of each drug and determines the type of drug based on whether they are considered to be the same. In other words, the discrimination unit 64 has the function of a matching unit that uses pattern matching or the like to match the extracted drug features (target features) with previously extracted drug features (matching features), and determines the type of drug based on the matching results. Note that at least one of the above-mentioned features may be matched as the target feature and the matching feature.

[0101] Specifically, if an image of a drug sorted into the sorting cup 141 by the drug sorting process described below is used as a reference image, the drug features (target features) contained in subsequently acquired images are compared with the drug features (matching features) contained in the reference image. If the drug is sorted into the sorting cup 141 based on the matching results, the image of the drug also becomes the reference image. In this way, the discrimination unit 64 uses the image of the sorted drug as the reference image and compares features in images of the drug captured thereafter with the drug features in the reference image. This allows the above matching to be performed using the reference image instead of the drug database, making it possible to sort drugs into the sorting cup 141 even if the drugs have not been pre-registered in the drug database.

[0102] Note that the first medicine (sorting object) or a medicine (sorting object) that does not match the features of the reference image, for example, if the features of the sorting object are determined to be features possessed by the medicine (in the case of a suspected medicine, which will be described later), is sorted into the sorting cup 141. The sorting object may also be sorted into the sorting cup 141 based on the results of comparing its features with the features of medicines contained in a medicine database for a predetermined number of medicines.

[0103] In addition, in the above narrowing down, the discrimination unit 64 also uses the analysis results of the ultraviolet image. Here, if the analysis results of the ultraviolet image are not used and a clear image of the markings or prints on the medicine cannot be obtained, the type of medicine will be determined based on the color, size, shape, etc. of the medicine. In this case, medicines of the same color (e.g., white) and almost the same size or shape will be determined to be the same type. If this discrimination is made, the workload of confirming whether or not the medicines are the same type will increase during subsequent visual inspection.

[0104] The discrimination unit 64 discriminates the type of drug by utilizing the fact that the fluorescence emitted from the drug when irradiated with ultraviolet light differs depending on the drug's components. Therefore, even if drugs have the same color, size, and shape, if the drug components are different, they can be accurately distinguished as different drugs. Since the components of each drug are unique, using the analysis results of the ultraviolet light image makes it possible to narrow down and discriminate candidates more accurately than narrowing down using only visible light images.

[0105] Therefore, as a first step in narrowing down the candidates, the discrimination unit 64 preferably narrows down the candidates by comparing the analysis result of the ultraviolet image (the representative color of the drug) with the representative color obtained when each drug contained in the drug database is irradiated with ultraviolet light. The discrimination unit 64 first identifies the drug contained in the ultraviolet image by extracting the contour of the drug in the ultraviolet image (the contour of the area whose brightness differs from the surrounding area due to fluorescence) based on the fact that the drug emits fluorescence when irradiated with ultraviolet light. Thereafter, the discrimination unit 64 narrows down the candidates by comparing the representative color of the drug identified in the ultraviolet image with the representative color in the drug database.

[0106] In this case, the number of candidates after narrowing down is expected to be reduced compared to when an ultraviolet light image is not used, and matching can be performed using other features for the reduced number of candidates. This improves the accuracy of matching. Furthermore, if the number of candidates is reduced, it may be possible to determine the type of drug without identifying identification information, etc., using OCR or the like. In this case, the load of image processing can be reduced. Furthermore, particularly in the case of transparent drugs, it is difficult to distinguish the drug contained in the visible light image from the drug placement table 133a (background) using a visible light image. Therefore, the outline (area) of the drug cannot be extracted, making it difficult to extract the features of the transparent drug. On the other hand, when an ultraviolet light image is used as described above, the outline of the drug can be extracted by fluorescent light emission, even for transparent drugs. Therefore, even if the drug is transparent, its features can be extracted.

[0107] The types of returned medicines are diverse and vast in number, unlike the medicines used in dispensing. Therefore, being able to accurately identify the type of medicine is a very important factor, considering the workload of subsequent visual inspection. Furthermore, improving the performance of the drug type identification process will enable the rapid sorting of huge quantities of medicines.

[0108] In addition, even when comparing features with each other, the discrimination unit 64 may determine whether the features are considered to be identical using the same processing order as when using a drug database, and narrow down the drug data corresponding to the target features.

[0109] Furthermore, the discrimination unit 64 may compare features with each other and compare using a drug database in parallel, or may perform the following: For example, the discrimination unit 64 compares the extracted drug features with the drug database and determines whether or not a candidate for drug data related to the imaged drug exists in the drug database based on the extracted features. If the discrimination unit 64 determines that the candidate does not exist in the drug database, it may compare the target feature with the comparison feature to determine the type of drug.

[0110] Furthermore, the discrimination unit 64 may extract multiple color data of the drug from each of the visible light image and the ultraviolet light image of the drug captured from multiple directions as features of the drug, and narrow down the candidates. In this case, the discrimination unit 64 compares the multiple color data with, for example, representative colors contained in a drug database (in other words, performs color matching). In the case of a visible light image, the color data is compared with representative colors in the drug database obtained when irradiated with visible light, and in the case of an ultraviolet light image, the color data is compared with representative colors in the drug database obtained when irradiated with ultraviolet light. The color data may also be compared with the color data extracted as a feature for matching.

[0111] Furthermore, if a medicine has a logo indicating the manufacturer of the medicine, the logo also serves as identification information and is a characteristic of the medicine. Therefore, in this case, the discrimination unit 64 also uses the logo to discriminate the type of medicine. Since the logo is engraved or printed on the medicine, the discrimination unit 64 acquires the logo by analyzing the visible light image. Regarding the logo, the discrimination unit 64 may also use artificial intelligence (machine learning, particularly deep learning) to compare the target feature with a medicine database or a comparison feature, thereby narrowing down the candidates.

[0112] In this case, the discrimination unit 64 may narrow down the candidates using the ultraviolet light image, and then use pattern matching to compare target features other than the logo with a drug database or comparison features to further narrow down the candidates. Furthermore, for the logo, the discrimination unit 64 may also use artificial intelligence to perform the above-mentioned comparison. Specifically, in the case of deep learning, images of drugs bearing engraved or printed logos of major manufacturers (multiple logos with different sizes, shapes, colors, etc.) are used to train a neural network for deep learning on a multi-class classification problem. For example, if there are 20 manufacturers, the multi-class classification problem becomes a 20-class classification problem.

[0113] Logos are generally designed to be easy to read, and their size (font for letters), shape, color, etc. are often changed. Therefore, even for the same drug, logos of different sizes may be attached depending on the time of sale of the drug. Furthermore, the size of logos attached to capsules and tablets may differ even if they are manufactured by the same manufacturer. Therefore, even if a target feature and a drug database or matching feature are matched using pattern matching or the like, if the size, etc. of the logo differs from the logo registered in the drug database or the logo of the matching feature, it may not be possible to distinguish the two logos as being the same, even if they are of the same type and manufactured by the same manufacturer.

[0114] As described above, by using artificial intelligence in logo matching, the discrimination unit 64 can learn the logo feature extraction method itself, unlike pattern matching. This allows for a matching process that is robust against variations in size, shape, color, lighting conditions, etc., making it possible to determine that logos that could not be determined to be identical using pattern matching are identical. This increases the accuracy of logo matching and improves the ability to narrow down candidates. In addition, by accumulating extracted logo features (image data) and using them for the above learning, the accuracy of matching using artificial intelligence can be further improved.

[0115] Furthermore, even if the target feature is not in the drug database and is not considered to be the same as the matching feature, if the target feature is estimated to be a drug (tablet or capsule) based on at least a part of the target feature, the discrimination unit 64 determines the type of drug as a suspected drug. In this case, the suspected drug can also be sorted into the second storage unit 14 or the waiting tray 15.

[0116] The discrimination unit 64 outputs the discrimination result of the drug type to the sorting control unit 62. For example, when the drug type can be identified to one or when the number of candidates has been narrowed down to a predetermined number or less, the discrimination unit 64 outputs the drug data related to the drug as the discrimination result. In this case, the discrimination unit 64 stores the drug data related to the drug in the storage unit 80 in association with the image data of the drug.

[0117] The discrimination unit 64 controls the number of candidates so that it does not exceed a predetermined number, and acquires the discrimination result. For example, the predetermined number (e.g., 5) is set as a threshold, and the discrimination unit 64 determines whether the number of narrowed-down candidates exceeds the threshold. If the discrimination unit 64 determines that the number of candidates exceeds the threshold, it ranks the multiple candidates in order of similarity to the characteristics of the drug to be discriminated. Then, it extracts the number of candidates set as the threshold (e.g., the top 5) from the top, and outputs the drug data related to the candidate drugs as the discrimination result. The order of similarity is determined, for example, by the number of matching characteristics. Alternatively, each characteristic may be weighted, and the order of similarity may be determined based on the degree of match of each characteristic taking the weighting into consideration.

[0118] When the discrimination unit 64 discriminates the type of medicine as a suspected medicine, it outputs the characteristics of the medicine (the characteristics of the object presumed to be a suspected medicine) as the discrimination result. On the other hand, when the discrimination unit 64 discriminates that the object contained in the first container 11 is a foreign object other than a medicine, it outputs the discrimination result indicating that the type of medicine could not be discriminated.

[0119] After the discrimination unit 64 discriminates and determines the type of medicine, the imaging control unit 63 uses the first camera 131 to acquire a visible light image of the medicine placing table 133a containing the medicine, and stores the image data in the storage unit 80. The visible light image is, for example, an image including the surface of the medicine with an imprint or print and an image including the opposite surface. This visible light image is included in the data regarding the medicine written in the sorting cup 141, and becomes the display target of the display control unit 67 (see (b) of FIG. 11).

[0120] [Image classification processing] Next, the image classification process based on the result of the above-mentioned discrimination process will be described with reference to Fig. 1. The above-mentioned image classification process is mainly performed by the image classification unit 65.

[0121] The image classification unit 65 classifies the images captured by the first camera 131 according to the type of drug identified by the discrimination unit 64. When the image classification unit 65 receives the discrimination result from the discrimination unit 64, it performs the classification by determining whether or not a discrimination result identical to the discrimination result is stored in the storage unit 80. For example, if the same discrimination result is not stored, a new storage area for the discrimination result is created, and image data in which the type of drug has been identified is stored in the storage area. On the other hand, if the same discrimination result is stored, the image data in which the type of drug has been identified is stored in the storage area for the discrimination result.

[0122] The image classification unit 65 assigns a name (pseudonym) to each memory area created. For example, this name is the drug name identified based on the discrimination result of the discrimination unit 64 (if there are multiple candidates, the drug name with the highest similarity ranking). In the case of a suspected drug, a message indicating that it is a suspected drug is added. The name of each memory area is changed to the drug name uniquely identified during visual inspection.

[0123] If the discrimination result by the discrimination unit 64 shows that there are multiple drug data candidates for the drug to be discriminated, the image classification unit 65 may determine that the two discrimination results are the same if the multiple drug data match all of the multiple drug data for each stored drug. Also, if the drug is discriminated as a suspected drug, the image classification unit 65 may determine that the two discrimination results are the same if the features of the suspected drug match all of the multiple features corresponding to one stored drug.

[0124] In this way, by providing the image classification unit 65, it is possible to classify the image data of medicines so that it matches the sorting results of the medicine sorting process described below. Therefore, by looking at each image data included in the classified image data group, the user can confirm whether multiple medicines sorted into any sorting cup 141 are of the same type.

[0125] [Medicine sorting process] Next, the medicine sorting process based on the results of the above-mentioned discrimination process will be described with reference to Figures 1, 9, and 10. Figures 9(a) and 9(b) are diagrams for explaining the sorting process into the sorting cup 141. Figure 10 is a perspective view showing the arrangement of the second RFID reader / writer unit 18. The medicine sorting process is mainly performed by the conveying / sorting unit 12 and the sorting control unit 62.

[0126] Based on the discrimination result by the discrimination section 64, the conveying / sorting unit 12 sorts the medicines by type and stores them in the second storage section 14 or the waiting tray 15. The sorting control section 62 controls the conveying / sorting unit 12 to convey the medicines placed in the receiving area Ar1 after the imaging and discrimination process to a predetermined sorting cup 141 in the second storage section 14 or the waiting tray 15 based on the discrimination result.

[0127] Upon receiving the drug discrimination result, the sorting control unit 62 determines a sorting position for storing the drug, and stores the discrimination result and the determined sorting position in the memory unit 80 in association with each other. Specifically, the sorting control unit 62 determines whether a discrimination result identical to the above discrimination result is stored in the memory unit 80. Note that the method for determining whether these two discrimination results are the same has been explained above in [Image Classification Processing], so a description thereof will be omitted.

[0128] If the same discrimination result as the above discrimination result is stored, the sorting cup 141 linked to the stored discrimination result is determined as the sorting position. Also, if the sorting position linked to the stored discrimination result is the waiting tray 15, the waiting tray 15 is determined as the sorting position. On the other hand, if the same discrimination result as the above discrimination result is not stored, the sorting cup 141 that does not contain any medicines (the sorting cup 141 that has not been determined as the sorting position) is determined as the sorting position. If all of the sorting cups 141 contain medicines, the waiting tray 15 is determined as the sorting position.

[0129] Once the sorting control unit 62 has determined the sorting position, it controls the transport mechanism 123, similar to the transport control unit 61, to move the transport / sorting unit 12 above the receiving area Ar1. Similarly to the transport control unit 61, the sorting control unit 62 controls the second camera 121 and the suction / shutter mechanism 122 to adsorb the medicines placed in the receiving area Ar1. Thereafter, the transport mechanism 123 transports the medicines to the determined sorting cup 141 or waiting tray 15. As described above, the shutter mechanism is closed while the medicines are being transported, preventing the medicines from falling into areas other than the determined sorting position (e.g., a sorting cup 141 other than the determined sorting cup 141). After transport, the suction is released, allowing the medicines to be stored in the sorting cup 141 or waiting tray 15. Furthermore, the sorting control unit 62 counts the number of medicines stored in the sorting cup 141, and stores the count in the memory unit 80 in association with the sorting position.

[0130] After the sorting control unit 62 transports the medicines (medicines after identification) on the medicine placing table 133a arranged in the receiving area Ar1 to the sorting position, the transport control unit 61 controls the transport / sorting unit 12 to transport and place the medicines stored in the first storage unit 11 on the now empty medicine placing table 133a. This allows the medicine sorting device 1 to continuously identify the types of medicines.

[0131] It can also be said that when the discrimination unit 64 compares the target feature with the matching feature, the sorting control unit 62 determines the sorting position based on the comparison result of the discrimination unit 64. Specifically, when the discrimination unit 64 determines that the target feature matches the matching feature, the sorting control unit 62 transports the medicine having the target feature to the same position as the position to which the medicine having the matching feature was sorted. On the other hand, when the discrimination unit 64 determines that the target feature does not match the matching feature, the sorting control unit 62 transports the medicine having the target feature to a new position different from the position to which the medicine having the matching feature was already sorted before sorting the medicine.

[0132] In addition, if the sorting control unit 62 receives a discrimination result indicating that the type of medicine could not be identified, the object placed in the receiving area Ar1 after discrimination is a foreign object, and therefore the foreign object is transported to the collection tray 16.

[0133] In this way, the sorting control unit 62 stores all of the items contained in the first storage unit 11 in either the second storage unit 14, the waiting tray 15, or the collection tray 16, regardless of the result of identifying the type of medicine. Therefore, even if the type of medicine cannot be identified as one, or if a foreign object has been mixed into the first storage unit 11, the sorting process can be continued without being stopped for that reason.

[0134] In order to remove medicines for which the discrimination process has been completed from the medicine placing table 133a arranged in the receiving area Ar1, the sorting control unit 62 causes the second camera 121 to capture an image of the medicine placing table 133a, thereby narrowing down the positions of the medicines. Furthermore, when transporting medicines stored in the sorting cup 141 to the packaging mechanism 6, the sorting control unit 62 causes the second camera 121 to capture an image of the sorting cup 141, thereby narrowing down the medicines to be transported, in order to remove the medicines from the sorting cup 141.

[0135] In addition, when the number of drugs stored in the sorting cup 141 reaches the upper limit, the sorting control unit 62 stores the drugs to be sorted in an empty sorting cup 141 different from the sorting cup 141, even if the type of drug to be sorted is the same as the type of drug sorted in the sorting cup 141.

[0136] 9 so that more medicines can be placed in the sorting cup 141. As shown in (a) of FIG. 9, the sorting control unit 62 determines the position for storing the medicine in the sorting cup 141 to be a position shifted by a predetermined distance D in the horizontal direction from the reference position (here, the center line CL) of the sorting cup 141, and places the medicine at that position. On the other hand, when the next medicine is to be stored in the sorting cup 141, as shown in (b) of FIG. 9, the sorting control unit 62 determines the position for storing the medicine to be a position shifted by a predetermined distance D from the reference position in the opposite direction to that in (a) of FIG. 9, and places the medicine at that position.

[0137] The predetermined distance D (amount of movement from the reference position) is calculated based on the maximum length of the medicine that can be acquired by imaging and the width of the sorting cup 141 in the direction of displacement so that the medicine can be stored in the sorting cup 141. For example, if the maximum length of the medicine is large, the amount of movement is calculated to be smaller than for a small medicine.

[0138] In this way, by controlling the storage position of the medicines in the sorting cup 141, for example, when the medicines are piled up along the center line CL, it is possible to prevent the piled up medicines from falling over and spilling out of the sorting cup 141. It is also possible to prevent the tip of the suction mechanism of the suction / shutter mechanism 122 from colliding with the piled up medicines.

[0139] Furthermore, the medicine data relating to the medicines stored in the sorting cup 141 by the sorting control unit 62 is stored in an RFID tag provided on the sorting cup 141 by the second RFID reader / writer unit 18.

[0140] The second RFID reader / writer unit 18 writes drug data to an RFID tag or reads out drug data stored in an RFID tag, similar to the first RFID reader / writer unit 5. The sorting control unit 62 causes the RFID control unit 68 to write data about a drug every time the sorting cup 141 stores the drug.

[0141] The second RFID reader / writer unit 18 is provided below the second storage section 14. Specifically, as shown in FIG. 10, it is provided so as to face the bottom of each sorting cup 141 when reading or writing data related to medicines stored in the RFID tag of each sorting cup 141. In this embodiment, the second RFID reader / writer unit 18 has multiple RFID reader / writers 18a arranged in the X-axis direction and is configured to be movable in the Y-axis direction by guide members 18b extending in the Y-axis direction. This enables communication with the RFID tags of each sorting cup 141, and makes it possible to use, for example, data related to medicines written during medicine sorting processing in subsequent processing.

[0142] [Display processing] Next, the display process will be described with reference to Figures 1, 11, and 12. Figure 11 shows an example of an image display, where (a) is an example of a display during the medicine sorting process (an example of an image showing the progress of medicine sorting), and (b) is an example of a display of image data corresponding to a specified sorting cup 141 (an example of an image for visual inspection). Figure 12 is a diagram showing another example of an image display.

[0143] 11(a), the display control unit 67 generates a display image of the medicine sorting process in progress based on the sorting positions determined by the sorting control unit 62 and data related to the medicines associated with the sorting positions, and displays the image on the display unit 32. The rectangular portions corresponding to the respective sorting cups 141 and the icons for display switching and the like can accept user input via the operation unit 31.

[0144] In the example display image of Fig. 11(a), the name of the medicine, the number of medicines, and whether or not they have been visually inspected are displayed in a rectangular portion corresponding to each sorting cup 141 in which the medicines are stored. Each time sorting of one medicine is completed, the display control unit 67 causes the RFID control unit 68 to read data related to the medicine from the RFID tag of at least the sorting cup 141 in which the medicine was most recently stored. This allows the sorting status to be displayed in real time.

[0145] In this example display image, the first row corresponds to the sorting cups 141 provided on the front side (+Y-axis direction side) of the medicine sorting device 1, and the seventh row corresponds to the sorting cups 141 provided on the rear side (-Y-axis direction side). In this example display image, since 50 tablets of medicine (the upper limit of the number that can be stored in one sorting cup 141 in this example) are stored in the sorting cup 141 B-1, it can be seen that tablets 51 and beyond are stored in the sorting cup 141 C-1. Furthermore, as shown in this example display image, the sorting control unit 62 may store medicines starting from the sorting cups 141 in the first row on the front side and the seventh row on the rear side. In this case, the front area of ​​the second container 14 may be set as an area where medicines installed in the tablet packaging machine are sorted, and the rear area may be set as an area where medicines not installed in the tablet packaging machine that will be returned to a medicine shelf, etc. are sorted. By setting in this manner, medicines installed in the tablet packaging machine can be sorted to positions where they can be easily retrieved.

[0146] When a user input is received in the rectangular portion corresponding to the sorting cup 141 in which the medicines are stored, the display control unit 67 displays all image data of the medicines stored in the sorting cup 141, as shown in Fig. 11(b). Specifically, the display control unit 67 displays visible light images of all the medicines stored in the sorting cup 141 selected by the user from the sorting cups 141 sorted by type based on the discrimination results (visible light images of the medicine placing table 133a acquired after the type of medicine was determined).

[0147] This allows the user to visually inspect the images of all the drugs in the sorting cup 141 individually, assuming that the same or similar drugs have been sorted into the same sorting cup 141, and therefore to discover any different drugs or foreign objects, etc.

[0148] Furthermore, when a user input of "all OK" or "all NG" is received from the viewpoint of work efficiency, the display control unit 67 switches the rectangular portion corresponding to the relevant sorting cup 141 in (a) of FIG. 11 to a display indicating that the sorting cup has been visually inspected. The RFID control unit 68 also stores (registers) the fact that the sorting cup 141 has been visually inspected in the RFID tag of the sorting cup 141. At this time, the fact that the sorting cup has been visually inspected may also be stored in the storage unit 80.

[0149] For a drug to which multiple candidate drug data are linked or a drug determined to be a suspected drug, the drug data for the drug is uniquely identified through visual inspection. Therefore, the uniquely identified drug data is registered in the RFID tag or the storage unit 80.

[0150] 12, in the display image during or after the medicine sorting process, the rectangular portions corresponding to each sorting cup 141 may be color-coded according to the destination of the medicine to be returned (e.g., tablet packing machine or medicine shelf). In the example of FIG. 12, the colors are coded so that the medicines to be returned to packing machine P, the medicines to be returned to packing machine Q, and the medicine shelf can be distinguished. The memory unit 80 stores the return destinations and the display colors set in association with the return destinations.

[0151] For example, when color-coding before visual inspection, the control unit compares the drug data based on the discrimination result of the discrimination unit 64 with the drug data installed in each tablet packing machine, and determines the tablet packing machine to which the drug in each sorting cup 141 should be returned based on the comparison result. If it is determined that the drug is not installed in a tablet packing machine, it determines that the return destination is the drug shelf. The display control unit 67 displays the above-mentioned rectangular portion in color based on the determination result. If the drug data is changed by visual inspection, the control unit changes the display color to match the change result. In the case of a suspected drug, the control unit, for example, reserves color-coding and determines the final display color after the drug data is confirmed by visual inspection.

[0152] On the other hand, if the visual inspection is performed, the control unit may simply compare the drug data written on the RFID tag of each sorting cup 141 with the drug data implemented in each tablet packaging machine.

[0153] By displaying the medicines in different colors in this way, the user can see at a glance which sorting cup 141 to take out depending on the intended use of the medicines. This color-coded display is particularly useful for users who own multiple tablet packaging machines, as it reduces the effort required to confirm the return destination when returning the medicines (sorting cups 141).

[0154] [Other processing] An example of other processing will be described.

[0155] (Creating and updating drug databases) The medicine database manages medicine data relating to a plurality of types of medicines. As described above, the medicine database is used to identify the types of medicines handled by the medicine sorting device 1.

[0156] It is preferable that the drug database contains drug data for all of the wide variety of drugs that exist, but it is practically difficult to include all of them at the time of shipping the drug sorting device 1. Furthermore, there is a possibility that new drugs will be developed after shipping the drug sorting device 1. For this reason, the drug database is capable of adding (updating) drug data for new drugs.

[0157] For example, if a drug identified as a suspected drug is uniquely identified through visual inspection as described above, the control unit registers the drug data for the drug in the drug database during the registration process. This allows new drugs to be registered in the drug database and the drug database can be updated as needed. Furthermore, it is no longer necessary to include all drugs in the drug database during its creation.

[0158] The drug data for each drug identified based on the discrimination result of the discrimination unit 64 can be said to be predicted by the drug sorting device 1 to support visual inspection. Therefore, the drug name displayed by the display control unit 67 is the predicted drug name. The user performs visual inspection based on the image data and predicted drug name of each displayed drug, and the drug data for the drug is uniquely identified.

[0159] Furthermore, as described above, when the type of medicine is determined using the reference image (in other words, using the result of matching between the target feature and the matching feature), the medicine does not need to be pre-registered in the medicine database. In this case, the medicine data of the medicine uniquely identified by visual inspection as described above will be registered in the medicine database as official medicine data together with the reference image.

[0160] (Position detection of suction and shutter mechanism) The control unit may detect the position of the housing including the second camera 121 and the suction / shutter mechanism 122. In this case, for example, distance measuring sensors are installed on the surface of the housing facing the +X axis direction and on the surface facing the +Y axis direction, and the position is detected by measuring the distance to the housing of the medicine sorting device 1. This allows the control unit to identify the position of the suction / shutter mechanism 122, and therefore, for example, to determine whether the suction / shutter mechanism 122 has moved to the correct sorting position.

[0161] (Obstacle detection mechanism) The medicine sorting device 1 may also be provided with an obstacle detection mechanism that detects any obstacle placed in the medicine sorting area 2. For example, if the sorting cup 141 is not placed correctly and is placed at an angle to the base 19, the obstacle detection mechanism detects a part of the sorting cup 141 that protrudes from the top surface of the sorting cup 141 when it is correctly placed on the base 19 as the obstacle. Furthermore, for example, if medicines are piled up and protrude from the top surface of the sorting cup 141, the obstacle detection mechanism detects the medicine protruding from the top surface as the obstacle. For example, if an obstacle is placed in the space between the bottom (the bottom surface facing the base 19) of the housing including the second camera 121 and the suction / shutter mechanism 122 and the top surface of the sorting cup 141 when it is correctly placed on the base 19, the obstacle detection mechanism detects the obstacle.

[0162] The obstacle detection mechanism includes a laser light source that emits laser light into the space, and a sensor that receives the laser light emitted from the laser light source. When an obstacle is placed, the sensor detects the placement of the obstacle by being unable to receive the laser light. For example, the obstacle detection mechanism is provided at one end of the base 19, and a reflecting mirror is provided at the other end. In this case, the sensor receives the laser light emitted from the laser light source and reflected by the reflecting mirror. The obstacle detection mechanism may also be configured to move along one end of the base 19.

[0163] (Excluding drugs that do not require sorting) If the medicines stored in the first storage unit 11 are medicines that do not require sorting, the medicine sorting device 1 does not need to sort them. Specifically, if the medicine whose type has been determined is a medicine that does not require sorting, the discrimination unit 64 excludes the medicine from the medicines to be sorted.

[0164] Medicines that do not require sorting are medicines that a user has determined do not require sorting based on the operation of the medicine sorting work, and are set in advance in the medicine sorting device 1. For example, the user sets the conditions for medicines that do not require sorting via a sorting condition setting screen. The conditions include, for example, the following four. If a medicine meets any of the conditions, the discrimination unit 64 excludes the identified medicine from the sorting target as a medicine that does not require sorting: (1) A medicine whose price is equal to or less than a predetermined fee; (2) A medicine whose last packaging date is more than a predetermined number of days before the sorting processing date; (3) A medicine that has a flag (e.g., a flag indicating a psychotropic drug, a flag indicating an anticancer drug); or (4) A medicine whose name contains a specific character string. The drug price information in (1) above and the flag in (3) above can be obtained from a comprehensive pharmaceutical database managed by an external device. The last packaging date in (2) above and the medicine name in (4) above can be obtained by downloading master data from the tablet packaging machine.

[0165] If the discrimination unit 64 discriminates that the medicine does not need to be sorted, the transport control unit 61 controls the suction / shutter mechanism 122 to remove the medicine from the medicine placing table 133a on which it is placed, transport it to the collection tray 16, and collect it in one place. In this way, by excluding medicines that the user does not want to sort from the medicines to be sorted, unnecessary processes such as sorting or visual inspection for the medicines can be eliminated.

[0166] (Image data log) When drugs are removed from the sorting cup 141 and packaged, an image of the drugs removed from the sorting cup 141 may be saved so that it is possible to reliably identify which drugs have been removed and packaged (for the purpose of traceability of the process flow). When the suction / shutter mechanism 122 is used to transport the drugs from the sorting cup 141 to the packaging mechanism 6 via the drug inlet 17, for example, the second camera 121 captures an image of the drugs, and the image data is stored in the memory unit 80. In this case, the image data is recorded as a log each time a drug is removed. Therefore, by checking the image data, it is possible to confirm the validity of the packaging process after the packaging process.

[0167] (Specify the return source) The system may be configured so that the source of return can be specified before the start of medicine sorting, and the source of return of the sorted medicines can be recorded as a history.

[0168] For example, the control unit of the medicine sorting device 1 acquires information about the return source by downloading master data from a tablet packaging machine in the hospital. The information about the return source may be acquired by user input, or by reading a barcode (identification information) attached to the returned medicine. In this way, the control unit identifies the return source of the medicines stored in the first storage unit 11 before starting to sort the medicines. The control unit also links the information about the return source to data about the sorted medicines. This makes it possible to manage the history of the return sources of the sorted medicines in the medicine sorting device 1 or an external device connected to the medicine sorting device 1.

[0169] Furthermore, in the tabulation process (tabulation work) of returned medicines, the medicine sorting device 1 or the external device may count the number of returned medicines for each ward, department, or facility, and output the result.

[0170] (Designation of prescribing physician) Before starting to sort medicines, the prescription issuing doctor may be selected, and the doctor who prescribed the sorted medicines may be recorded as a history.

[0171] For example, the control unit of the medicine sorting device 1 may obtain information about the doctor who issued the prescription through user input, or by reading identification information issued to the doctor (e.g., a barcode attached to an ID card). Alternatively, the information may be obtained by downloading master data from a tablet packaging machine in the hospital. Thus, the control unit identifies the doctor who prescribed the medicines stored in the first storage unit 11 before starting to sort the medicines. Furthermore, the control unit links data about the sorted medicines with information about the doctor who prescribed the medicines. This allows the medicine sorting device 1 or an external device connected to the medicine sorting device 1 to manage the history of the doctors who prescribed the sorted medicines.

[0172] Furthermore, the medicine sorting device 1 or the external device may count the number of returned medicines for each doctor in the counting process (counting work) of returned medicines, and output the result.

[0173] [Configuration of main parts of medicine sorting device 1] As described above, the medicine sorting device 1 has various components. The following (1) to (4) are examples of particularly major components among the various components. The following (1) to (4) are merely examples, and do not exclude other components of the medicine sorting device 1 from the major components.

[0174] (1) The drug sorting device 1 includes a first storage section (first storage section 11) that stores a mixture of multiple types of drugs, a second storage section (second storage section 14) that stores the drugs sorted by type, an imaging section (first camera 131) that captures images of the drugs, a discrimination section (discrimination section 64) that determines the type of drug based on the image captured by the imaging section, and a sorting section (transporting / sorting unit 12) that sorts the drugs by type based on the discrimination results by the discrimination section and stores them in the second storage section.

[0175] (2) The drug sorting device 1 includes an imaging unit that captures images of drugs, a discrimination unit that determines the type of drug based on the image captured by the imaging unit, a sorting unit that sorts the drugs by type based on the discrimination results of the discrimination unit, and an image classification unit (image classification unit 65) that classifies the images captured by the imaging unit by the type of drug discriminated by the discrimination unit.

[0176] (3) The drug sorting device 1 includes an imaging unit that images the drug, an ultraviolet light irradiation unit (ultraviolet light irradiation unit 134c) that irradiates the drug with ultraviolet light, and a drug data extraction unit (discrimination unit 64) that narrows down candidates for drug data related to the imaged drug from a drug database that manages drug data related to multiple types of drug.

[0177] (4) The drug sorting device 1 includes an imaging unit that captures images of drugs, a discrimination unit that extracts features of the drugs from each of the images captured by the imaging unit and discriminates the type of the drug by comparing the features and determining whether they are considered to be the same, and a sorting unit that, when the discrimination unit determines that the features are considered to be the same, sorts and places the drug whose type has been discriminated by the discrimination unit in the same position as the drug whose type has previously been discriminated by the discrimination unit.

[0178] [Software implementation example] The control blocks of the drug sorting device 1 (particularly the transport control unit 61, sorting control unit 62, imaging control unit 63, discrimination unit 64, image classification unit 65, operation input unit 66, display control unit 67, RFID control unit 68, and print output control unit 69) may be realized by a logic circuit (hardware) formed on an integrated circuit (IC chip) or the like, or may be realized by software using a CPU (Central Processing Unit).

[0179] In the latter case, the drug sorting device 1 includes a CPU that executes instructions from a program (software) that implements each function, a ROM (Read Only Memory) or storage device (hereinafter referred to as a "recording medium") on which the program and various data are recorded so as to be readable by a computer (or CPU), and a RAM (Random Access Memory) that expands the program. The object of the present invention is achieved when the computer (or CPU) reads and executes the program from the recording medium. The recording medium may be a "non-transitory tangible medium," such as a tape, disk, card, semiconductor memory, or programmable logic circuit. The program may also be supplied to the computer via any transmission medium capable of transmitting the program (such as a communication network or broadcast waves). One aspect of the present invention may also be realized in the form of a data signal embedded in a carrier wave, in which the program is embodied by electronic transmission.

[0180] The following describes further the configuration and processing of the medicine sorting device 1. Note that the following description may include some overlapping or more specific content than those described above.

[0181] <Various processing or operation examples> (character recognition) First, we will explain an example of the character recognition process performed by the discrimination unit 64. Figures 13(a) to 13(d) are diagrams for explaining an example of the character recognition process.

[0182] In this example, the discrimination unit 64 performs a recognition process on a plurality of characters (e.g., numbers) attached to the medicine included in the image captured by the first camera 131. This recognition process is a process of extracting the characteristics of the medicine by performing OCR or the like as described above.

[0183] The medicines to be recognized are placed on the medicine placement table 133a by the conveying / sorting unit 12. At this time, the medicines are not placed so that the position where the markings or prints on the medicines face a predetermined direction. Therefore, the discrimination unit 64 performs the recognition process while rotating the captured image of the medicine. In this case, there is a possibility that a dividing line or a pattern such as a logo on the medicine may be forcibly recognized as a character.

[0184] Therefore, in this example, the discrimination unit 64 determines that, among the multiple characters recognized by the above recognition process, the characters whose size is within a predetermined range and that the characters form a string are the multiple characters actually attached to the medicine.

[0185] 13(a), when there are multiple portions recognized as characters (rectangular portions in the figure), the discrimination unit 64 determines whether the lengths h1, h2, and h3 of the long sides of each of the portions are within a preset length range (predetermined range). If the lengths h1, h2, and h3 of the long sides are within the predetermined range, the discrimination unit 64 determines that each portion has a size within the predetermined range.

[0186] The predetermined range may be set, for example, by obtaining a plurality of lengths (heights) of the long sides of the portions recognized as characters in advance and using the average value of these heights as a reference. The predetermined range can be adjusted as appropriate, but is set, for example, to a range of 0.8 times or more and 1.2 times or less the average value. The predetermined range only needs to be set to a size that allows the discrimination unit 64 to recognize the characters written on the medicine.

[0187] In this example, the length of the long side is used to determine whether the size of each part is within a predetermined range, but this is not limited to this, and the determination may also be made using the length of the short side or the size (area) of each part.

[0188] If the discrimination unit 64 determines that each portion has a size within a predetermined range, it determines whether the arrangement of the portions is linear. For example, the discrimination unit 64 connects the end of any one side of the portion of interest to the end of any one side of a portion within a predetermined range from the portion of interest. This process is performed for all portions. If the multiple line segments connected in this way are straight lines or can be considered to be straight lines, the discrimination unit 64 determines that the arrangement of the portions forming the line segments is linear.

[0189] For example, consider a case where an image of a medicine as shown in (b) of Figure 13 is acquired. In this example, an example will be described in which the discrimination unit 64 accurately reads the sequence of numbers.

[0190] As shown in (c) of FIG. 13, the discrimination unit 64 recognizes, for example, the actual character "A" as the character "4" (code Ch1 in the figure) and the actual character "R" as the character "0" (code Ch2 in the figure) through the above recognition process. Furthermore, as shown in (d) of FIG. 13, the discrimination unit 64 recognizes, for example, a portion of the actual character "E" as the character "1" (code Ch3 in the figure) and a portion of the actual dividing line as the character "1" (code Ch4 in the figure) through the above recognition process. Furthermore, as shown in (d) of FIG. 13, the discrimination unit 64 reads the actual character "102" as the character "102" through the above recognition process.

[0191] If such a recognition process is performed, a number string different from the actual characters "102" will be read.

[0192] The discrimination unit 64 determines whether the size of the characters (the above-mentioned portions) is within a predetermined range and whether the arrangement of the characters is linear. The portion marked with the code Ch3 does not have a size within the predetermined range and is therefore excluded from the characters to be recognized. Furthermore, the portions marked with the codes Ch1, Ch2, and Ch4 are excluded because their arrangement does not have a linearity. On the other hand, for the actual character "102," the sizes of the "1," "0," and "2" portions in the image are determined to be within a predetermined range and to have a linear arrangement.

[0193] As a result, the discrimination unit 64 extracts only "102" that is actually attached to the medicine as a number string from the image. In this way, the discrimination unit 64 of this example can accurately read the number string. Note that although the reading of a number string has been described as an example in (b) to (d) of FIG. 13, character strings other than numbers can also be determined in the same way. In other words, the discrimination unit 64 of this example can improve the accuracy of reading multiple characters attached to the medicine.

[0194] (Identifying the imaging position) Next, a description will be given of an example of the process of specifying the imaging position by the imaging control unit 63. (a) to (e) of Figure 14 are diagrams for explaining an example of the process of specifying the imaging position.

[0195] 14(a), the medicine placing table 133a, which is placed in the placement area Ar2 and on which the medicine to be imaged is placed, is provided with a shaft 133c that supports the medicine placing table 133a. When the medicine placing table 133a is placed in the placement area Ar2, the shaft 133c is approximately parallel to the axial direction in which the first camera 131 rotates.

[0196] In this example, the shaft portion 133c is provided with a confirmation area Cr having a pattern applied thereto for determining whether or not the photographing position is appropriate using an image captured by the imaging control unit 63. To enable this determination, in this example, the confirmation area Cr is applied with different patterns in the circumferential direction of the shaft portion 133c. In addition, in this example, the patterns are applied with multiple colors in the circumferential direction of the shaft portion 133c.

[0197] For example, red, green, blue, orange, and purple are evenly applied in this order to at least a portion of the circumference of shaft portion 133c as confirmation region Cr. In this case, as shown in (b) to (e) of Fig. 14, the proportion of each color present in confirmation region Cr included in the image captured by first camera 131 varies depending on the imaging position of first camera 131. Therefore, by capturing images such as those shown in (b) to (e) of Fig. 14 in advance at each imaging position, it can be determined whether first camera 131 is capturing an image of the medicine from a predetermined position.

[0198] Specifically, when the imaging control unit 63 acquires an image captured to determine the type of drug, it compares the pattern contained in the image with a pattern (predetermined pattern) contained in a previously captured image to determine whether the first camera 131 is positioned in an appropriate position.

[0199] In this example, the imaging control unit 63 preliminarily determines the proportion of each color present within the confirmation region Cr included in the image at each imaging position and stores the proportions in the storage unit 80. The imaging control unit 63 determines the proportion of each color present within the confirmation region Cr included in the image captured for identifying the type of medicine, and compares the proportion of each color (referred to as the target proportion) with the preliminarily determined proportion of each color (referred to as the reference proportion). As a result, if the target proportion substantially matches the reference proportion (the difference between the target proportion and the reference proportion is within a predetermined range), the imaging control unit 63 determines that the imaging position is appropriate.

[0200] For example, when imaging a medicine from an imaging position of 0° (directly above the placement area Ar2), the imaging control unit 63 positions the first camera 131 at the imaging position of 0° and then images the medicine placed on the medicine placing table 133a from that imaging position. The imaging control unit 63 calculates the target ratio from the captured image, reads out the reference ratio for the imaging position of 0°, and then compares the target ratio with the reference ratio. This allows the imaging control unit 63 to determine whether the captured image is an image captured from the specified imaging position of 0°. In other words, it can determine whether the first camera 131 captured an image of the medicine from the specified imaging position of 0°.

[0201] If it is determined that the imaging position is deviated from the specified imaging position, the imaging control unit 63 adjusts the imaging position and then determines again whether the adjusted imaging position is an appropriate position.

[0202] Furthermore, in this example, multiple colors are applied in the circumferential direction of the shaft portion 133c, which is within the imaging range of the first camera 131. However, this is not limiting, and any pattern may be applied within the medicine sorting device 1 so that the imaging control unit 63 can identify the imaging position. For example, the pattern may be applied to a part of the medicine sorting device 1 other than the shaft portion 133c (e.g., a part of the medicine placing table 133a) that appears in the images captured from each imaging position. Furthermore, instead of color, the pattern may be an uneven shape, etc. However, it is necessary that the appearance of the pattern differs from one another at each imaging position. Furthermore, when multiple colors are applied in the circumferential direction of the shaft portion 133c, the number of colors is not limited to the above five, and the multiple colors do not need to be evenly distributed, as long as a unique ratio can be obtained for each imaging position.

[0203] In this way, the imaging control unit 63 compares the pattern of a predetermined portion other than the drug contained in the image captured by the first camera 131 with a predetermined pattern contained in an image previously captured by the first camera 131. This allows the imaging control unit 63 to determine whether the imaging position of the first camera 131 is a predetermined position. Then, by the simple method of adding a pattern to the imaging range of the first camera 131, the imaging control unit 63 can recognize whether the first camera 131 is capturing an image from an appropriate position.

[0204] (Identifying the adsorption position) Next, a description will be given of an example of the process of specifying the suction position by the transport control unit 61. (a) to (c) of Figure 15 are diagrams for explaining an example of the process of specifying the suction position.

[0205] As described above, the transport control unit 61 controls the transport / sorting unit 12 that transports medicines from the first storage unit 11 to the first camera 131 side (specifically, the receiving area Ar1). The transport control unit 61 in this example further identifies a position within the protruding area including a protruding portion of the medicine estimated area that is estimated to contain medicine in the image captured by the second camera 121 as an adsorption position where the adsorption mechanism adsorbs the medicine.

[0206] 15(a), the transport control unit 61 narrows down the drug adsorption area (picking area) in the image captured by the second camera 121, and then extracts multiple drug estimated areas Mr based on the brightness distribution in the captured image. For example, a known watershed algorithm is used to extract the drug estimated areas Mr based on this brightness distribution.

[0207] As shown in (b) of FIG. 15, the transport control unit 61 identifies the largest estimated drug area Mrmax among the extracted multiple estimated drug areas Mr. The transport control unit 61 determines whether the largest estimated drug area Mrmax has a predetermined shape or a shape similar to a predetermined shape. The predetermined shape is a shape specific to the drug, such as the shape of a tablet or capsule. In other words, it is a shape that has a relatively high degree of circularity or rectangularity in the image.

[0208] When the transport control unit 61 determines that the estimated maximum drug area Mrmax has a shape different from the predetermined shape, it determines that multiple drugs are adjacent to or overlapping in the estimated maximum drug area Mrmax. For example, when the transport control unit 61 determines that the degree of coincidence between the estimated maximum drug area Mrmax and the predetermined shape is equal to or less than a predetermined value, it determines that the estimated maximum drug area Mrmax has a shape different from the predetermined shape (i.e., an unnatural shape for a drug).

[0209] When the transport control unit 61 determines that the estimated maximum drug area Mrmax has a shape different from the predetermined shape, it sets a circumscribed rectangular area Rr that circumscribes the identified estimated maximum drug area Mrmax, as shown in (b) of Figure 15. The transport control unit 61 identifies the most protruding protruding part Pp in a predetermined area that is inscribed on the periphery of the set circumscribed rectangular area Rr, and then identifies a protruding area Pr that includes the protruding part Pp.

[0210] Thereafter, the transport control unit 61 specifies an arbitrary position within the specified protruding region Pr (for example, the center of the protruding region Pr) as the suction position.

[0211] When multiple drugs are adjacent to or overlapping in the first container 11, even if the vicinity of the center of the drug estimated region Mr is identified as the adsorption position, there is a possibility that the drug will not be adsorbed. According to this example, even when multiple drugs are adjacent to or overlapping, a position where the drug is likely to exist can be identified as the adsorption position. Therefore, the drug can be more reliably adsorbed.

[0212] In this example, the adsorption position is specified using the maximum estimated drug region Mrmax, but this is not limiting, and the adsorption position may be specified using an estimated drug region Mr other than the maximum estimated drug region Mrmax. Also, in this example, it is determined whether the shape of the maximum estimated drug region Mrmax is a predetermined shape, but this is not limiting, and the adsorption position may be specified using one estimated drug region Mr of the extracted multiple estimated drug regions Mr without performing this determination.

[0213] (Identifying the drug adsorption range) Next, a description will be given of an example of the process of specifying the drug adsorption range by the transport control unit 61 or the sorting control unit 62. Figure 16 (a) to (d) are diagrams for explaining an example of the process of specifying the drug adsorption range.

[0214] The sorting control unit 62 (detection area changing unit) of this example changes the detection area for detecting medicines contained in the sorting cup 141 depending on whether or not at least a portion of the bottom of the sorting cup 141 is included in the image of the sorting cup 141 captured by the second camera 121. Similarly, the transport control unit 61 (detection area changing unit) of this example changes the detection area for detecting medicines contained in the first container 11 depending on whether or not at least a portion of the bottom of the first container 11 is included in the image of the first container 11 captured by the second camera 121. This process may be performed by at least either the sorting control unit 62 or the transport control unit 61.

[0215] To achieve this process of specifying the detection area, in this example, a mark Mk is provided on the bottom of the sorting cup 141, as shown in (a) of Fig. 16. Furthermore, as shown in (b) of Fig. 16, a mark Mk is provided on the bottom of the first storage unit 11. In this example, a sheet with the mark Mk is inserted into the bottom, but the mark Mk may also be formed directly on the bottom. The process of specifying the detection area is similar in the sorting control unit 62 and the conveyance control unit 61, so hereinafter, the process by the sorting control unit 62 will be described as an example.

[0216] If the bottom of the sorting cup 141 is not included in the image captured by the second camera 121, the assorting control unit 62 specifies, as the detection area Dr, an area smaller than the size Br of the bottom of the sorting cup 141, as shown in (c) of Fig. 16. In this example, if the assorting control unit 62 cannot recognize the mark Mk in the image, it determines that the bottom is not included in the image.

[0217] If the bottom is not included in the image, it can be determined that a large number of medicines are contained in the sorting cup 141. Therefore, taking into consideration that the sorting cup 141 may be positioned off-center from its predetermined position, the sorting control unit 62 specifies an area smaller than the size Br of the bottom as the detection area Dr.

[0218] On the other hand, if the captured image includes at least a portion of the bottom of the sorting cup 141, the assorting control unit 62 specifies an area that is approximately the same as the size Br of the bottom of the sorting cup 141 as the detection area Dr, as shown in (d) of Figure 16. This detection area Dr is the detection area Dr that should have been set. In this example, if the assorting control unit 62 can recognize the mark Mk in the image, it determines that the bottom is included in the image.

[0219] If the image includes the bottom, it can be determined that the number of medicines contained in the sorting cup 141 is small. It can also be determined that the medicines are present near the edge of the sorting cup 141. Therefore, the sorting control unit 62 specifies an area that is approximately the same as the size Br of the bottom as the detection area Dr. Note that the size of the detection area Dr may be calculated using the mark Mk as a reference.

[0220] In this way, by changing the detection area Dr (specifically, its size) depending on whether the image includes the bottom, it is possible to specify the detection area Dr according to the number of medicines contained in the sorting cup 141 or the first container 11. It is also possible to reduce the possibility that medicines cannot be extracted due to misalignment of the sorting cup 141 or the first container 11. In other words, the above process makes it possible to more reliably extract medicines.

[0221] The above-described medicine removal method (first removal method) is useful when the sorting cup 141 or the first storage unit 11 is substantially transparent. When the sorting cup 141 or the first storage unit 11 is substantially transparent, for example, the bottom surface of the sorting cup 141 or the first storage unit 11 has a finely uneven shape, and the side surfaces are substantially transparent. In this case, when the sorting control unit 62 or the transport control unit 61 analyzes the image captured by the second camera 121, there is a possibility that the boundary between the bottom surface and the side surface is mistakenly detected as part of the medicine. Furthermore, when the sorting control unit 62 or the transport control unit 61 analyzes the image, there is a possibility that the sorting control unit 62 or the transport control unit 61 will not be able to detect a relatively small medicine placed at the boundary surface. The first removal method reduces this possibility.

[0222] On the other hand, if the sorting cup 141 or the first storage unit 11 has a color (e.g., black), especially if it is uniformly colored, the sorting control unit 62 or the transport control unit 61 can reduce the possibility that the analysis of the image will be affected by the boundary portion. Therefore, the sorting control unit 62 or the transport control unit 61 can stably detect the medicine based on brightness, color, or the like. In other words, even without adopting the first removal method, the medicine can be stably detected from the sorting cup 141 or the first storage unit 11.

[0223] Furthermore, if the sorting cup 141 or the first container 11 has a color, the medicines may be removed from the sorting cup 141 by, for example, a second removal method different from the first removal method. In this case, for example, the sorting control unit 62 moves the suction mechanism relative to the bottom surface of the sorting cup 141 so as to sequentially adsorb the medicines, starting from the medicines present near the center of the bottom surface. Specifically, the sorting control unit 62 first identifies a region narrowed to the center, including the center of the bottom surface, as the medicine adsorption region, and controls the position of the suction mechanism so as to adsorb the medicines within that region. Thereafter, the sorting control unit 62 gradually expands the adsorption region toward the side (e.g., in two stages). This allows the medicines to be adsorbed while breaking down from the center even if they are piled up in the sorting cup 141. Note that the transport control unit 61 may remove the medicines from the first container 11 using a similar process.

[0224] Furthermore, when the sorting cup 141 or the first storage section 11 has a color, the sorting control section 62 or the conveying control section 61 can stably detect almost transparent capsules or relatively small medicines standing upright on the bottom surface, which would be difficult to detect on a bottom surface having the above-mentioned fine uneven shape.

[0225] (Specify medication and sorting cup) Next, an example of the designation process of medicines and the sorting cup 141 by the sorting control unit 62 will be described. (a) and (b) of Fig. 17 are diagrams for explaining an example of the designation process of medicines and the sorting cup 141. Specifically, (a) of Fig. 17 is a maintenance image Im10 when changing (e.g., maintenance) the medicine database. (b) of Fig. 17 is an initialization image Im11 when initializing the stored contents of the RFID tag (information recording medium) of the sorting cup 141.

[0226] The images to be displayed on the display unit 32 may be referred to as screens. For example, the maintenance image and the initialization image may be referred to as a maintenance screen and an initialization screen, respectively. In addition, the sorting image, inspection image, sorted medicine list image, display color switching image, return source selection image, enlarged display image, and tally image, which will be described later, may also be referred to as a sorting screen, inspection screen, sorted medicine list screen, display color switching screen, return source selection screen, enlarged display screen, and tally screen, respectively.

[0227] The sorting group selection area Gr1 of the maintenance image Im10 and the sorting container group setting area Gr2 of the initialization image Im11 are areas that accept user operations for setting sorting identification information. The sorting identification information is information for sorting the medicines into the specified sorting cups 141, and is assigned to the medicines that the user wants to be sorted into the specified sorting cups 141.

[0228] Specifically, when a user wants to sort a specific medicine into a specific sorting cup 141, the user displays the maintenance image Im10 of the medicine on the display unit 32 and inputs a sorting group number to identify the sorting group as sorting identification information in the sorting group selection area Gr1 of the maintenance image Im10.

[0229] The user also displays the initialization image Im11 on the display unit 32. Then, in the sorting container group setting area Gr2 of the initialization image Im11, the user inputs, as sorting identification information, the same sorting group number as the sorting group number input in the sorting group selection area Gr1 of the maintenance image Im10.

[0230] The sorting group number input in the sorting group selection area Gr1 and the sorting group number input in the sorting container group setting area Gr2 are stored in the memory unit 80. Therefore, the sorting control unit 62 can identify a sorting cup 141 that has been assigned the same sorting group number as the sorting group number input in the sorting container group setting area Gr2 for a medicine that has been assigned the sorting group number input in the sorting group selection area Gr1. In other words, the transport / sorting unit 12 can sort a specific medicine into a specific sorting cup 141.

[0231] The sorting identification information may be information for identifying the sorting cup 141. In this case, this sorting identification information is input into the sorting group selection area Gr1 and the sorting container group setting area Gr2.

[0232] Because the sorting cups 141 are reused, when sorting medications that should not come into contact with other medications, such as colored medications or orally disintegrating tablets (OD tablets), the sorting cups 141 must be cleaned after use. In hospital wards where there are many returned colored medications or OD tablets, cleaning can take time. By using sorting identification information, such medications can be sorted into specific sorting cups 141. This reduces or eliminates the cleaning work required to sort the medications.

[0233] (Determining sorting position) Next, we will explain an example of the process of determining the sorting position by the sorting control unit 62. The sorting control unit 62 may control the transport / sorting unit 12 to sort the medicines identified as targets to be removed from the medicine sorting device 1 to the medicine removal side of the medicine sorting device 1 (the sorting cup 141 arranged in the front area of ​​the second storage unit 14).

[0234] Specifically, the sorting control unit 62 may determine whether a journal is required, which prints out drug data about the drug that reflects the user's visual inspection, based on return destination information about the destination of the sorted drug. If the sorting control unit 62 determines that a journal is required for a drug, it identifies the drug as one to be removed from the drug sorting device 1.

[0235] The return destination information is linked to each piece of drug data related to the drug and stored in the storage unit 80. The return destination information includes, for example, reader information indicating whether the return destination or the return assisting device is provided with a reader (e.g., an RFID reader) that reads the drug data. The return destination information also includes, as information indicating the return destination, for example, packaging machine information indicating whether the packaging mechanism 6 is an accessory to the drug sorting device 1.

[0236] The return destination includes, for example, a tablet packaging machine, a powder medicine packaging machine, a medicine shelf, or a packaging mechanism 6 provided in the medicine sorting device 1. The return assistance device is a device for returning medicines to the return destination (e.g., a medicine shelf). In addition, at least the reader information is acquired from another facility or device (e.g., the return destination or return assistance device described above) different from the medicine sorting device 1.

[0237] Here, the return assistance device includes, for example, a reading unit capable of reading drug data (e.g., drug identification information) and return destination information related to the drug from the journal, and a display unit that displays the drug data and return destination information read by the reading unit. When the drug data and return destination information are represented by at least a barcode or a two-dimensional code, the reading unit is implemented as a barcode reader. The display unit also displays detailed information, such as the drug shelf (e.g., shelf number), included in the return destination information read by the reading unit. Since the return destination information is displayed on the display unit, the possibility of the user returning the drug to the wrong drug shelf can be reduced. Note that shelf identification information may be assigned to each drug shelf to which the drug is to be returned. In this case, for example, the return assistance device reads shelf identification information assigned to the drug shelf in addition to the return destination information assigned to the journal. The return assistance device compares the read information and notifies the comparison result. This further reduces the possibility that the user using the return assistance device will return the drug to the wrong drug shelf.

[0238] When sorting medicines, the sorting control unit 62 determines whether the return destination is the packaging mechanism 6 by referring to the return destination information for the medicines. Furthermore, if the return destination is another facility or another device, the sorting control unit 62 determines whether the return destination is equipped with an RFID reader. If the sorting control unit 62 determines that the return destination is another facility or another device and that the return destination is not equipped with an RFID reader, it determines that the medicine requires a journal. On the other hand, if the sorting control unit 62 determines that the return destination is the packaging mechanism 6 or that the return destination is equipped with an RFID reader, it determines that the medicine does not require a journal.

[0239] The sorting control unit 62 controls the conveying and sorting unit 12 so that medicines that require a journal are sorted into sorting cups 141 arranged in the front area. Each time the conveying and sorting unit 12 determines that a journal is required, it stores the medicines in order, for example, starting from the sorting cup 141 arranged on the front right side. Furthermore, the sorting control unit 62 controls the conveying and sorting unit 12 so that medicines that do not require a journal are sorted into sorting cups 141 arranged in the back area. Each time the conveying and sorting unit 12 determines that a journal is not required, it stores the medicines in order, for example, starting from the sorting cup 141 arranged on the back left side.

[0240] The journal is inserted into the sorting cup 141 in which the sorted medicines are stored. When inserting the journal into the sorting cup 141, the user needs to remove it from the medicine sorting device 1. By the above process, the medicines that need to be removed (i.e., medicines that require a journal) can be stored in the sorting cup 141 at the front where they can be easily removed.

[0241] The sorting cup 141 into which the medicines to be taken out are sorted (that is, a predetermined area on the front side into which the medicines to be taken out are sorted) may be set in advance.

[0242] Furthermore, the return destination information does not necessarily have to include the reader information. In this case, the sorting control unit 62 may determine whether or not a journal is required using, for example, only the return destination of the medicine.

[0243] For example, when the return destination is a packaging machine, the sorting control unit 62 determines whether a journal is required for the medicine to be sorted by identifying which packaging machine it is. Because it is possible to know in advance whether an RFID reader is installed in each packaging machine, it is possible to associate and store the need for a journal for each packaging machine. In this case, too, the sorting control unit 62 sorts medicines for which a packaging machine equipped with an RFID reader is the return destination into the sorting cup 141 located in the back area, since a journal is not required. On the other hand, if the return destination is a medicine shelf, a journal is required. Therefore, the sorting control unit 62 sorts medicines for which a medicine shelf is the return destination into the sorting cup 141 located in the front area.

[0244] Here, the journal may actually be issued as follows: When a user places the sorting cup 141 on the first RFID reader / writer unit 5, the display control unit 67 reads the information stored in the RFID tag of the sorting cup 141. As a result, the display control unit 67 displays an inspection image (described below) of the medicines contained in the sorting cup 141. The user performs a visual inspection of the medicines by checking the inspection image. After the visual inspection, the user determines whether a journal is necessary based on the return destination of the medicines contained in the sorting cup 141, and if a journal is necessary, performs user input for issuing the journal on the journal necessity confirmation image. When the printout control unit 69 accepts the user input, it issues the journal by controlling the printout unit 4. The user inserts the issued journal into the sorting cup 141 that has been visually inspected. In this way, by printing the journal every time the sorting cup 141 is placed on the first RFID reader / writer unit 5, it is possible to prevent the user from inserting the journal into the wrong sorting cup 141.

[0245] As described above, the sorting control unit 62 may sort drugs that are loaded in the tablet packing machine into a front region and drugs that are not loaded in the tablet packing machine into a rear region. In this case, information indicating whether the sorted drugs are loaded in the tablet packing machine is stored in the storage unit 80, for example, linked to the drug data related to the drugs. The sorting control unit 62 may also determine whether the drugs are loaded in the tablet packing machine based on the return destination information.

[0246] Furthermore, when sorting medicines into the front region of the second storage unit 14, the sorting control unit 62 stores the medicines in order from the frontmost row toward the center of the second storage unit 14. Furthermore, when sorting medicines into the back region of the second storage unit 14, the sorting control unit 62 stores the medicines in order from the backmost row toward the center of the second storage unit 14.

[0247] (Identifying the shape of the drug) Next, we will explain an example of the process of identifying the shape of a medicine by the discrimination unit 64. In this embodiment, as described above, the first camera 131 images the medicine from positions of θ=0° and 180°, and then, if the type of medicine cannot be identified to one, images the medicine from positions of θ=45° and 135°.

[0248] Here, tablets generally have a substantially circular shape when viewed from above and a substantially rectangular shape when viewed from the side. On the other hand, capsules generally have a substantially cylindrical shape (with the ends being substantially hemispherical). Therefore, when viewed from above and from the side, the capsules have a substantially rectangular shape.

[0249] Therefore, when a medicine is imaged from positions θ=0° and 180° (i.e., when imaged from a planar view position), it is possible to determine whether the medicine is a tablet or a capsule. Furthermore, the shape of the tablet included in the image captured from positions θ=0° and 180° is approximately circular, while the shape of the tablet included in the image captured from positions θ=45° and 135° is approximately rectangular. In other words, the shape of the tablet in the image captured from positions θ=0° and 180° differs from that captured from positions θ=45° and 135°. On the other hand, in the case of a capsule, the shape of the capsule in the image is approximately the same regardless of the position from which it is imaged.

[0250] Therefore, in this example, first, discrimination unit 64 determines whether the medicine is a tablet or not based on the shape of the medicine included in the image captured by first camera 131 from the position of θ=0° (first direction) or the position of 180° (second direction opposite to the first direction). The position of θ=0° is the position (direction) opposite to the mounting surface of medicine mounting table 133a on which the medicine is mounted.

[0251] For example, discrimination unit 64 extracts the shape of the drug from images captured from these positions and determines whether the drug is a tablet or a capsule by calculating the degree of similarity with the shape of a typical tablet stored in memory unit 80. First camera 131 first captures an image of the drug from a position of θ=0° or 180°. Therefore, by being able to narrow down whether the drug is a tablet or a capsule at an early stage of the drug discrimination process, the drug discrimination process can be expedited.

[0252] On the other hand, if the discrimination unit 64 cannot determine whether the medicine is a tablet based on the image captured from the position of θ=0° or 180°, the first camera 131 captures an image of the medicine from the position of θ=45° or 135° (i.e., obliquely relative to the placement surface). The discrimination unit 64 then determines whether the medicine is a tablet based on the shape of the medicine contained in the image captured from the position of θ=0° or 180° and the image captured from the position of θ=45° or 135°. For example, the discrimination unit 64 determines whether the medicine is a tablet by comparing a first shape of the medicine contained in the image captured from the position of θ=0° or 180° with a second shape of the medicine contained in the image captured from the position of θ=45° or 135°.

[0253] As described above, in the case of a tablet, the first shape and the second shape are different, but in the case of a capsule, the first shape and the second shape are approximately the same. Therefore, when the first shape and the second shape are approximately the same (the difference between the first shape and the second shape is within a predetermined range), the discrimination unit 64 determines that the medicine is a capsule, and when the difference is outside the predetermined range, the discrimination unit 64 determines that the medicine is a tablet.

[0254] In this embodiment, the position facing the placement surface is the position of θ=0°, and therefore the imaging direction from the position of θ=0° has been described as the first direction, but this is not limiting. In other words, it is sufficient that the imaging direction when capturing an image from the position facing the placement surface is the first direction.

[0255] In this embodiment, a camera having a manual focus function is used as the first camera 131, but a camera having an autofocus function may also be used. When the first camera 131 has an autofocus function, it becomes possible to focus on the medicine depending on the height of the medicine.

[0256] For example, the imaging control unit 63 adjusts the focus using information indicating the diameter of the medicine registered in advance. In the case of a capsule, the diameter of the medicine is the height of the medicine when placed on the medicine placing table 133a, so the focus is adjusted using information on the diameter. On the other hand, in the case of a tablet, for example, the medicine height to be applied when the diameter is equal to or greater than a predetermined diameter and the medicine height to be applied when the diameter is less than the predetermined diameter are stored in the storage unit 80. The imaging control unit 63 identifies the medicine height to be applied from the medicine diameter registered in advance and adjusts the focus according to the height of the medicine.

[0257] (Example of using fixed drug information) Next, an example of using drug-specific information to identify a drug (drug type) will be described. Generally, drug-specific information is assigned individually to each device that handles drugs. Therefore, even for the same drug, different drug-specific information may be assigned between, for example, the drug sorting device 1 and other equipment or devices different from the drug sorting device 1 (e.g., a tablet packaging machine or powder drug packaging machine as a return destination, or a return auxiliary device).

[0258] For example, assume that the drug sorting device 1 stores "001," "002," and "003" as the drug-specific information for a given drug, while another device or facility stores "002" and "003" as the drug-specific information. If multiple pieces of drug-specific information are stored for a single drug and the first registered drug-specific information is used for printing in the journal, the drug sorting device 1 uses "001" as the drug-specific information. In other words, the drug sorting device 1 issues a journal with "001" printed as the drug-specific information. Note that if the drug-specific information is, for example, GS1, it is printed as a GS1 barcode in the journal.

[0259] In this case, even if the drug-specific information printed on the journal is read by another device or facility, it cannot be verified because the other device or facility does not store "001" as the drug-specific information. Therefore, the drug cannot be returned to the other device or facility.

[0260] Therefore, in this example, the print output control unit 69 prints in the journal at least one of the multiple drug-specific information items related to the sorted drugs that is obtained from a return destination or return assistance device that is another device or equipment different from the drug sorting device 1.

[0261] Specifically, the control unit acquires in advance from all of the return destinations and return assistance devices all of the drug-specific information managed by these devices, linking it to the return destinations. If the drug-specific information is managed in a drug database, the control unit may acquire the drug database.

[0262] When the return destination of the sorted medications is identified, the printout control unit 69 extracts at least one of the multiple pieces of medication-specific information related to the medications managed at the identified return destination (or the return assistance device if the return destination is a medication shelf). If a medication database has been acquired, the printout control unit 69 extracts the medication-specific information of the medication to be returned from the medication database managed at the identified return destination or the return assistance device. For example, data obtained by converting the file of medication-specific information extracted from the medication database into text may be used as the medication-specific information to be printed in the journal.

[0263] The printout control unit 69 issues a journal in which the extracted drug-specific information is printed, for example, as a GS1 barcode. This ensures that the journal is issued using the drug-specific information held by the return destination, ensuring reliable verification at the return destination, and as a result, ensuring that the drug is returned to the return destination.

[0264] In particular, when printing unique drug information on a journal as a GS1 barcode, it is common for one unique drug to be printed. Therefore, this process is particularly useful when unique drug information is printed on a journal.

[0265] In addition, the print output control unit 69 may compare at least one device-specific information originally stored in the drug sorting device 1 with at least one device-specific information obtained from the return destination, and identify the matching device-specific information as the item to be printed in the journal.

[0266] Furthermore, at least one of the medicine-specific information acquired from the return destination may be stored in an RFID tag provided on the sorting cup 141 that contains the sorted medicines. Even when the medicine-specific information stored in the RFID tag is read by an RFID reader at the return destination, it can be reliably verified at the return destination.

[0267] (Cleaning operation of medicine placing table) Next, an example of the cleaning operation of the medicine placing table 133a will be described. Fig. 18 is a schematic diagram showing an example of the suction mechanism provided in the transport / sorting unit 12. The suction mechanism shown in Fig. 18 has a configuration suitable for the cleaning operation of the medicine placing table 133a.

[0268] In the example of Fig. 18, the suction mechanism includes an electromagnetic valve 122p' located in an air pipe 122b connecting the suction pad 122a and the vacuum pump 122d, and the electromagnetic valve 122p' controls the flow rate of air flowing through the air pipe 122b. As shown in Fig. 18, the suction mechanism includes, as air pipe 122b, a first path for discharging air from the suction pad 122a and a second path for sucking air up from the suction pad 122a. A filter 122f is provided on the second path between the suction pad 122a and the electromagnetic valve 122p' to collect dust and other particles sucked up from the suction pad 122a. The filter 122f is replaceable.

[0269] Here, when the medicine is introduced into the first container 11, the medicine may break into pieces or dust, which may be contained in the first container 11. In this case, the medicine transported from the first container 11 and placed on the medicine placing table 133a may have the pieces or dust attached to it. Dust or the like may also be attached to the medicine. The medicine placing table 133a placed in the placement area Ar2 is the subject of image capture by the first camera 131 to determine the type of medicine placed on the medicine placing table 133a. Therefore, if a medicine with foreign matter such as dust attached is placed on the medicine placing table 133a, or if the foreign matter accumulates on the medicine placing table 133a, the outline or markings of the medicine may not be accurately read in the captured image. This may affect the identification of the type of medicine by the identification unit 64. Furthermore, from a hygienic perspective, it is preferable to remove the foreign matter.

[0270] Therefore, in this example, the medicine placing table 133a is cleaned using the conveying / sorting unit 12. Specifically, when cleaning the medicine placing table 133a, the conveying control unit 61 moves the suction pad 122a close to the inner surface (internal bottom surface) of the bottom of the medicine placing table 133a to a position a predetermined distance away from the inner surface. In this state, the conveying control unit 61 causes the vacuum pump 122d to draw in air. As a result, foreign matter in the medicine placing table 133a is collected by the filter 122f via the suction pad 122a. This operation cleans the medicine placing table 133a.

[0271] Here, the adsorption mechanism adsorbs the medicine and releases the medicine. If the air pipe 122b has only one path, there is a possibility that the foreign matter collected by the filter 122f may flow back and be discharged to the outside of the adsorption mechanism when the medicine is released. In this case, the collected foreign matter will be returned to the inside of the medicine sorting device 1 (including the sorting cup 141).

[0272] As described above, the suction mechanism of this example includes, as air pipe 122b, a first path for discharging air from suction pad 122a and a second path for sucking air from suction pad 122a. When suctioning foreign matter, air drawn in by vacuum pump 122d flows through the second path, and when releasing medicines, air discharged by vacuum pump 122d flows through the first path. This prevents foreign matter suctioned by filter 122f from being returned to the interior of medicine sorting device 1, as described above.

[0273] The transport control unit 61 controls the operation of the suction mechanism to move the suction mechanism over the entire inner bottom surface of the medicine placing table 133a. This allows the entire inner bottom surface to be cleaned. The transport control unit 61 may also analyze the image captured by the second camera 121 to determine that only at least a portion of the inner bottom surface is to be cleaned.

[0274] In the above, the inner bottom surface of the medicine placing table 133a is the object to be cleaned, but this is not limiting, and the inner bottom surface of the first storage section 11 or the sorting cup 141 may be the object to be cleaned. When the sorting cup 141 is the object to be cleaned, the sorting control section 62 may perform the processing of the transport control section 61.

[0275] (Clogging prevention operation) The suction mechanism shown in Fig. 18 is provided with filter 122f to prevent foreign matter such as dust from entering downstream air pipe 122b, solenoid valve 122p', or vacuum pump 122d. However, if the filter becomes clogged with foreign matter, filter 122f must be replaced with a new filter. Note that the suction mechanism shown in Fig. 5 may also be provided with a filter in air pipe 122b near suction pad 122a to prevent the entry of such foreign matter.

[0276] If the adsorption mechanism is provided with a flow rate sensor (described later), the transport control unit 61 (or sorting control unit 62) determines whether the flow rate of air in the air pipe 122b when the medicine is not being adsorbed is equal to or less than a predetermined flow rate. The predetermined flow rate may be set to a flow rate at which the medicine can be adsorbed (a flow rate that does not affect the adsorption of the medicine). If the transport control unit 61 determines that the flow rate is equal to or less than the predetermined flow rate, it determines that the filter is clogged. If this is determined, the transport control unit 61 moves the adsorption mechanism onto the collection tray 16, for example, and controls the adsorption mechanism to discharge air from the adsorption pad 122a. This allows foreign matter adhering to the filter to be removed, thereby extending the service life of the filter (the period until the filter needs to be replaced).

[0277] (Detecting dirt on the medicine table) By taking an image of the medicine placing table 133a with no medicine placed thereon with the first camera 131, it may be possible to determine whether or not dirt (for example, foreign matter) is present on the medicine placing table 133a.

[0278] As described with reference to Fig. 7, the medicine sorting device 1 includes a visible light irradiator (first irradiator 134a and second irradiator 134b) that emits visible light and an ultraviolet light irradiator 134c that emits ultraviolet light. Therefore, the first camera 131 can acquire a visible light image and an ultraviolet light image. The control unit uses the visible light image and the ultraviolet light image to determine whether or not dirt is present on the medicine placing table 133a.

[0279] Here, a brand new medicine placing stand 133a (i.e., a medicine placing stand 133a in a clean state) is imaged in advance, and the visible light image and ultraviolet light image (referred to as a reference visible light image and a reference ultraviolet light image, respectively) are stored in memory unit 80.

[0280] For example, at the start of sorting, the imaging control unit 63 captures an image of the medicine placing table 133a on which no medicines are placed using the first camera 131. The control unit compares the visible light image and the ultraviolet light image (referred to as the target visible light image and the target ultraviolet light image, respectively) with the reference visible light image and the reference ultraviolet light image, respectively, to identify components (background parts) of the medicine sorting device 1 that are present in the background of the medicine placing table 133a in the target visible light image and the target ultraviolet light image.

[0281] Because the medicine placing stand 133a is transparent, the background of the medicine placing stand 133a is also reflected in the visible light image. Furthermore, depending on the material of the background, it may emit light in the ultraviolet light image. Therefore, by comparing the reference visible light image with the target visible light image, or the reference ultraviolet light image with the target ultraviolet light image, the background can be removed from the stain determination target.

[0282] The control unit determines whether an image different from the background exists in the target visible light image. If the control unit determines that an image different from the background exists, the control unit determines whether the size of the image is equal to or larger than a predetermined size. If the control unit determines that the size is equal to or larger than the predetermined size, the control unit determines that the image is a stain.

[0283] The control unit also determines whether or not there is light emission different from that of the background portion in the target ultraviolet light image. If the control unit determines that there is light emission different from that of the background portion, it determines whether or not the intensity of the light emission is equal to or greater than a predetermined magnitude. If the control unit determines that the intensity is equal to or greater than the predetermined magnitude, it determines that the light emission is caused by dirt.

[0284] When the control unit determines that dirt is present on the medicine placing stand 133a, it issues a notification urging the cleaning of the medicine placing stand 133a, for example, via the display unit 32. By cleaning the medicine placing stand 133a, it is possible to reduce the possibility that dirt will affect the discrimination unit 64's discrimination of the type of medicine.

[0285] Also, in the case of visible light images, there is a possibility that dust cannot be recognized. On the other hand, in the case of ultraviolet light images, dust is easily recognized (dust easily emits light when irradiated with ultraviolet light), but dark objects may not be recognized. By analyzing the visible light image and the ultraviolet light image and using the results to determine the presence of dirt on the medicine placing table 133a, it is possible to identify various types of dirt.

[0286] The predetermined size to be compared with the image size and the predetermined size to be compared with the intensity of emitted light may be set to a size that allows the control unit to recognize dirt that affects the above-mentioned determination. Furthermore, if the influence of the background portion on the determination of dirt is small, it is not necessarily necessary to compare the captured image with the reference visible light image or reference ultraviolet image.

[0287] (Determining whether or not the drug can be adsorbed) Next, the determination by the transport control unit 61 or the sorting control unit 62 as to whether or not a drug can be adsorbed will be described.

[0288] The conveying / sorting unit 12 may be equipped with a flow rate sensor (not shown) that detects the flow rate of air flowing through the air pipe 122b of the suction mechanism. In this case, the conveying control unit 61 (or the sorting control unit 62) can determine that the suction pad 122a has adsorbed the medicine based on a change in the flow rate detected by the flow rate sensor. In other words, the conveying control unit 61 can determine that the medicine has been adsorbed based on a change in the flow rate instead of a change in the suction force detected by a pressure sensor.

[0289] Even if there is a change in the adsorption state of the drug (e.g., a state in which the drug is adsorbed, or a state in which the drug is released from an adsorbed state), it takes time for the pressure in the air tube 122b to change to a level that allows the pressure sensor to detect the change. On the other hand, the flow rate changes in real time in response to changes in the adsorption state of the drug. Therefore, by using a flow rate sensor instead of a pressure sensor to have the transport control unit 61 determine whether or not the drug can be adsorbed, the time required to determine whether or not the adsorption can be performed can be shortened compared to when a pressure sensor is used.

[0290] As with the pressure sensor, the transport control unit 61 may detect that the drug has approached a predetermined range from the tip of the suction mechanism based on a change in flow rate detected by a flow rate sensor. By appropriately setting a threshold value, the transport control unit 61 can also determine whether the suction mechanism is sucking in the suction pad 122a itself based on the change in flow rate. This determination can also be made in less time using a flow rate sensor than using a pressure sensor.

[0291] (Determining the number of medicines placed on the medicine placement table) Next, a process of determining the number of drugs placed on the drug placing stand 133a by the imaging control unit 63 will be described. One drug to be discriminated by the discrimination unit 64 is placed on the drug placing stand 133a, but there is a possibility that a malfunction will occur in which another drug is placed on the drug placing stand 133a while the other drug remains on the drug placing stand 133a. When two or more drugs are placed on the drug placing stand 133a, there is a possibility that the discrimination unit 64 will not be able to properly discriminate the type of drug.

[0292] Therefore, in this example, the imaging control unit 63 determines that an error has occurred when two or more medicines are placed on the medicine placing table 133a. For example, the imaging control unit 63 determines that there are two or more medicines in the area extraction process for the surface of the medicine (the image of the medicine in the image captured from the position of θ=0°). In this case, the imaging control unit 63 does not perform the area extraction process for the back surface of the medicine (the image of the medicine in the image captured from the position of θ=180°), and determines that an error has occurred. When an error has occurred, the control unit may notify the fact via the display unit 32, for example, and may temporarily suspend the medicine sorting process.

[0293] The imaging control unit 63 determines whether or not two or more medicines are placed on the medicine placing stand 133a, for example, as follows.

[0294] First, because the brightness of the medicine in the image varies depending on the color of the medicine, the imaging control unit 63 extracts multiple regions based on the brightness distribution in the image captured by the first camera 131. For example, when classifying the image into regions based on three types of brightness distribution, a first brightness threshold and a second brightness threshold are set in advance. In this case, the imaging control unit 63 classifies the image into a region R(A) having a brightness equal to or greater than the first brightness threshold, a region R(B) having a brightness less than the first brightness threshold and equal to or greater than the second brightness threshold, and a region R(C) having a brightness less than the second brightness threshold.

[0295] Next, the imaging control unit 63 performs a narrowing-down process on the image using shape features. Shape features are features that are set in advance to remove images of objects that are not drugs. Examples of shape features include the area assumed to be a drug and the degree of indentation of the edge (jaggedness, convexity). By referring to the shape features, the imaging control unit 63 removes areas from the image that are assumed not to be drugs, thereby extracting only areas that are assumed to be drugs.

[0296] Next, the imaging control unit 63 extracts only one of the regions R(A), R(B), and R(C) from the region estimated to be a drug. Here, it is estimated that the region R(A) is a region corresponding to a drug that is given a relatively light color, the region R(C) is a region corresponding to a drug that is given a relatively dark color, and the region R(B) is a region corresponding to a drug that is given an intermediate color.

[0297] When regions R(A) and R(B) are extracted from the image, the imaging control unit 63 determines that the regions correspond to a relatively light-colored drug and extracts region R(A). When regions R(B) and R(C) are extracted from the image, the imaging control unit 63 determines that the regions correspond to a relatively dark-colored drug and extracts region R(C). When regions R(A), R(B), and R(C) are extracted from the image, the imaging control unit 63 determines that the regions correspond to a medium-colored drug and extracts region R(B).

[0298] After extracting one of the regions R(A), R(B), and R(C), the imaging control unit 63 performs a segmentation process (e.g., a process using a known Watershed algorithm) on the extracted region based on the luminance distribution. As a result, if there is a region in the extracted region that can be segmented based on the luminance distribution, it is segmented into two or more regions.

[0299] Then, the imaging control unit 63 determines that the finally obtained regions are regions corresponding to the medicine and counts the number of such regions. If the number is two or more, the imaging control unit 63 determines that an error has occurred.

[0300] 19(a) to 19(d) are diagrams for explaining an example of the number determination process, and are images captured by the first camera 131.

[0301] In the example of (a) in Figure 19, the imaging control unit 63 extracts regions R1(A) and R3(A) as region R(A), extracts region R2(B) as region R(B), and extracts regions R4(C) and R5(C) as region R(C).

[0302] Next, as shown in (b) of Figure 19, the imaging control unit 63 refers to the shape features to exclude areas R3(A), R4(C), and R5(C), which are clearly different from the shape of the drug, and extracts areas R1(A) and R2(B) from which the shape of the drug can be extracted.

[0303] Next, since the extracted regions are region R1(A) and region R2(B), the imaging control unit 63 extracts region R1(A) as shown in (c) of FIG. 19. The imaging control unit 63 performs a division process on the extracted region R1(A) based on the luminance distribution. In the example of FIG. 19, as shown in (d) of FIG. 19, the imaging control unit 63 extracts two regions from region R1(A). That is, in this case, the imaging control unit 63 determines that two medicines are placed on the medicine placing stand 133a, and determines that an error has occurred.

[0304] This allows the discrimination unit 64 to perform discrimination processing only when one medicine is placed on the medicine placing stand 133a, which means that medicine sorting processing can be performed safely.

[0305] (Reservation settings) Furthermore, the display control unit 67 may display on the display unit 32 a setting image that can accept user input for reserving a medicine sorting start time. In this case, the control unit starts the sorting process of the medicines stored in the first storage unit 11 at the set sorting start time. Therefore, the medicine sorting device 1 can be set to a sleep mode (eco mode) until the start of the sorting operation, thereby reducing the power consumption of the medicine sorting device 1. Furthermore, electricity costs are generally lower at night than during the day. Therefore, if the sorting start time is set so that the medicine sorting process is performed at night, electricity costs can be further reduced.

[0306] (Identification of medications brought in by customers and repackaging) Next, the discrimination and repackaging of medications brought by the patient using the medication sorting device 1 will be described. For example, when a patient who has been visiting or hospitalized at another hospital is admitted, the receiving hospital or pharmacy must discriminate the medications prescribed at the other hospital or pharmacy (i.e., medications brought by the patient). In this case, the patient must unwrap the packaging paper brought by the patient, visually inspect the medications brought by the patient, and then repackage the medications based on the doctor's examination results. The medication sorting device 1 can be used for the visual inspection and repackaging of the medications brought by the patient.

[0307] For example, a user unwraps a packaging paper brought by a patient and places the patient's medications contained in the packaging paper into first storage unit 11. Medicine sorting device 1 sorts the patient's medications stored in first storage unit 11 into second storage unit 14. The user then visually inspects the medications. In addition, prescription information for the patient is input based on the doctor's examination results for the patient. Packaging mechanism 6 of medicine sorting device 1 repackages the patient's medications stored in second storage unit 14 based on the input prescription information.

[0308] Since prescription information has been entered, new medications not included in the medications brought in can be added and packaged. Also, medications that were included in the medications brought in but not entered in the prescription information can be prevented from being packaged.

[0309] (Determine whether to deliver the master image) Next, the process of determining whether to distribute a master image by the management device will be described. After capturing an image of a returned drug with the first camera 131, the drug sorting device 1 can visually inspect the image and register it as a master image by linking it to the drug name. Furthermore, if the drug sorting device 1 is installed in multiple locations (e.g., hospitals), the master image registered by the drug sorting device 1 installed in any location can also be distributed to drug sorting devices 1 installed in other locations. However, if the master image is distributed to other drug sorting devices 1 without confirming the authenticity of the master image, there is a possibility that the drug sorting device 1 will erroneously identify the type of drug.

[0310] Therefore, in this example, a management device (not shown) that collects master images from a plurality of medicine sorting devices 1 and can distribute the master images to the plurality of medicine sorting devices 1 determines whether or not the master images can be distributed. The management device determines whether or not the master images can be distributed, for example, by (A1) The registration date of the master image, (A2) Number of returns to the drug sorting device 1, (A3) The first day of return of the tablet or powder medicine packing machine, and (A4) The last return date of the last returned product to the tablet packing machine or powder packing machine. The information (1) to (4) above is managed by the medicine sorting device 1, and is sent to the management device in association with the registered master image.

[0311] When the management device receives the master image from the medicine sorting device 1, for example, (B1) Has the required number of days passed since the date of registration? (B2) Whether the number of returns has reached the specified number, (B3) Whether the specified number of days has passed since the first day of return, and (B4) Determine whether a predetermined number of days have passed since the last day for returns.

[0312] Regarding (B1), if a predetermined number of days have not passed since the date of registration, the number of times the master image has been used in the medicine sorting device 1 (i.e., the number of times it has been used for visual inspection, in other words, its usage record) is likely to be low, and therefore the master image can be determined to be of low credibility. Therefore, if a predetermined number of days have not passed since the date of registration, the management device excludes the master image from the master images to be distributed.

[0313] Regarding (B2), if the number of returns does not reach the predetermined number, the master image has not been used much, and therefore it can be determined that the master image has low credibility. Therefore, if the number of returns does not reach the predetermined number, the management device excludes the master image from the list of master images to be distributed.

[0314] Regarding (B3), if a predetermined number of days have not passed since the first day of returns, even if the master image has a high usage history (even if the number of returns has reached a predetermined number), there is a possibility that the master image may be mistakenly determined to have been registered in a subsequent visual inspection. Therefore, in order to increase the credibility of the master image, the management device excludes master images from distribution targets if a predetermined number of days have not passed since the first day of returns.

[0315] Regarding (B4), if a predetermined number of days have passed since the last day for returns, the tablet or powder medicine dispensing machine has not been used for a while since it was last returned, and it can be determined that the master image lacks authenticity. Therefore, if a predetermined number of days have passed since the last day for returns, the management device excludes the master image from the master images to be distributed.

[0316] By determining whether or not to deliver the master image in this manner, a highly reliable master image can be delivered to the medicine sorting device 1.

[0317] The predetermined number of days for (B1), (B3), and (B4) may be set based on experience or the like in terms of actual usage, and different numbers of days may be set for (B1), (B3), and (B4). The predetermined number of days for (B2) is also set in the same way.

[0318] <Example of processing from drug sorting to drug return> An example of the process from drug sorting to drug return (an example of a drug return method) will be described below. Figure 20 is a diagram showing an example of the process flow from drug sorting to drug return. In this example, the drug sorting device 1 will be described as sorting multiple types of drugs by type.

[0319] As shown in FIG. 20, when multiple types of medicines are put into the first storage unit 11, the medicine sorting device 1 sorts the medicines by type and stores them in the sorting cups 141 of the second storage unit 14 (medicine sorting step).

[0320] Thereafter, the medicine sorting device 1 displays on the touch panel 3 an inspection image Im2 for visually inspecting the medicines sorted by the medicine sorting device 1 (display process). That is, the user uses the inspection image Im2 displayed on the touch panel 3 to visually inspect the medicines sorted by the medicine sorting device 1 (inspection process).

[0321] Thereafter, the medicine sorting device 1 performs a process to enable the medicine after visual inspection to be returned to the packing machine 200 or medicine shelf 300, which is the return destination, based on the visual inspection result using the inspection image Im2 (return preparation process). That is, the user returns the medicine after visual inspection to the packing machine 200 or medicine shelf 300 based on the visual inspection result (inspection result) (return process). Note that the packing machine 200 may be, for example, a tablet packing machine or a powdered medicine packing machine.

[0322] By going through the above steps, the medicines sorted by the medicine sorting device 1 can be visually inspected by the user and then returned to the packaging machine 200 or medicine shelf 300 as the return destination.

[0323] Next, a method for displaying the inspection image Im2 will be described with reference to Figures 21 and 22. Figures 21 and 22(a) and (b) are diagrams showing an example of a method for displaying the inspection image Im2.

[0324] The medicine sorting device 1 can stop the medicine sorting operation at any timing. For example, the medicine sorting device 1 stops the sorting operation when a user input to stop the sorting operation is received, or when sorting of the medicines stored in the first storage unit 11 into the second storage unit 14 is completed. When the medicine sorting device 1 stops the sorting operation (for example, when it determines that the medicine sorting operation is completed), it displays a sorting image Im1 indicating the medicine sorting status, as shown in FIG. 21. Note that the medicine sorting device 1 may display the sorting image Im1 during the sorting operation.

[0325] Each of the multiple sorting positions where medicines are sorted, the sorting cups 141 placed at the corresponding sorting positions, and medicine data related to the medicines contained in the sorting cups 141 are linked and stored in the memory unit 80 and an RFID tag provided on the sorting cups 141. Therefore, the medicine sorting device 1 can display a sorting image Im1 that reflects the multiple sorting positions in the second container 14 and the sorting status (e.g., the number of medicines contained) at each sorting position.

[0326] 21, the medicine assorting device 1 receives a user input for a sorting position shown in the assortment image Im1, and displays an inspection image Im2 of the medicine associated with the sorting position on the touch panel 3. This allows the inspection image Im2 of the medicine that the user desires to visually inspect to be displayed.

[0327] Furthermore, the medicine sorting device 1 continues sorting until all the medicines stored in the first storage unit 11 are used up. If the number of sorting cups 141 that can be placed in the second storage unit 14 is, for example, 40, the medicine sorting device 1 can store 40 types of medicines in the second storage unit 14. If 41 or more types of medicines are stored in the first storage unit 11, the medicine sorting device 1 cannot sort all of the medicines into the second storage unit 14. Therefore, when medicines have been sorted into all of the sorting cups 141 placed in the second storage unit 14, the medicine sorting device 1 sorts the 41st and subsequent types of medicines into the waiting tray 15.

[0328] In this case, in order to store the medicines stored in the waiting tray 15 in the sorting cups 141, the medicine sorting device 1 may remove the medicines stored in any of the sorting cups 141 and package them using the packaging mechanism 6. For example, the sorting cup 141 that contains the medicines that have been sorted becomes the target for automatic packaging by the packaging mechanism 6.

[0329] In addition, in the medicine sorting device 1, a user can visually inspect the medicines contained in the sorting cup 141 at any timing. The medicine sorting device 1 determines that sorting of the medicines that have been visually inspected is complete, and can designate the medicines as targets for removal or packaging after visual inspection is complete. Therefore, even if the medicine sorting device 1 is in the middle of sorting medicines, if a visual inspection is performed on the medicines contained in the sorting cup 141, the medicine sorting device 1 can determine that sorting of the medicines is complete and designate the medicines as targets for automatic packaging by the packaging mechanism 6 as described above. However, when the medicine sorting device 1 performs the medicine packaging process, it temporarily stops the medicine sorting process.

[0330] 22(a), after packaging the medicines to be automatically packaged, the packaging mechanism 6 attaches a barcode to the packaging paper for reading the inspection image Im2. The barcode includes, for example, medicine data related to the medicine.

[0331] When the sorted medicines are packaged, the user causes a barcode reader (not shown) to read the medicine data related to the medicine contained in the barcode attached to the packaging paper. The medicine sorting device 1 uses the medicine data related to the medicine read by the barcode reader to read image data associated with the data and stored in the memory unit 80, thereby displaying an inspection image Im2 of the medicine on the touch panel 3.

[0332] 22(b), the medicine sorting device 1 may display an inspection image Im2 using data stored in an RFID tag attached to the sorting cup 141. In this case, the user takes out the sorting cup 141 containing the medicines to be returned to the return destination and places it on the first RFID reader / writer unit 5. The medicine sorting device 1 uses the data related to the medicines read by the first RFID reader / writer unit 5 to read image data associated with the data and stored in the memory unit 80, thereby displaying an inspection image Im2 of the medicines on the touch panel 3. If image data is included in the RFID tag, the inspection image Im2 may be displayed on the touch panel 3 using the image data.

[0333] In this way, the method shown in FIG. 22 can also display the inspection image Im2 of the medicine that the user desires to visually inspect.

[0334] Next, a method for returning the product after visual inspection is completed will be described with reference to Figures 23 and 24. Figures 23(a) and (b) and Figure 24 are diagrams showing an example of a method for returning the product after visual inspection is completed.

[0335] If the packaging machine 200 to which the sorting cup 141 is to be returned has a function for reading out data stored in an RFID tag attached to the sorting cup 141, the return method will be as shown in FIG. 23(a), for example.

[0336] Specifically, the medicine sorting device 1 displays an inspection image Im2 based on a user input or user operation. The user visually inspects the medicines contained in any sorting cup 141 by checking the inspection image Im2. After completing the visual inspection, the user inputs this information to the medicine sorting device 1. In response to this user input, the medicine sorting device 1 stores data on the medicines for which the visual inspection results have been determined in the RFID tag of the sorting cup 141.

[0337] The user then carries the sorting cup 141 to the packing machine 200 and causes an RFID reader (not shown) provided in the packing machine 200 to read the data related to the medicines stored in the RFID tag of the sorting cup 141. This allows the user to store (return) the medicines stored in the sorting cup 141 in a cassette (not shown) provided in the packing machine 200 in which the medicines are stored. At this time, if the cassette of the packing machine 200 has a locking lid, the lock of the cassette of the packing machine 200 may be unlocked on the condition that the user can confirm that the visual inspection result stored in the RFID tag of the sorting cup 141 indicates that all the medicines have been visually inspected and are OK, as a result of visually inspecting an inspection image Im2 sorted based on the information (engraved information or printed information) indicated by the imprint or print of the medicines reliably recognized by this device.

[0338] On the other hand, if the packaging machine 200 to which the medicine is to be returned does not have the function to read the data stored in the RFID tag attached to the sorting cup 141, or if the return destination is a medicine shelf 300, the return method will be, for example, as shown in (b) of Figure 23.

[0339] Specifically, the user places the sorting cup 141 to be visually inspected on the first RFID reader / writer unit 5. This causes the medicine sorting device 1 to display an inspection image Im2 based on the data related to the medicines stored in the RFID tag of the sorting cup 141. The user then visually inspects the medicines contained in the sorting cup 141 by checking the inspection image Im2. After completing the visual inspection, the user inputs this information to the medicine sorting device 1. In response to this user input, the medicine sorting device 1 issues a journal Jo in which the medicine data related to the medicines that reflects the visual inspection results and return address information, etc. are printed.

[0340] Thereafter, if the return destination is the packing machine 200, the user carries the sorting cup 141 and journal Jo to the packing machine 200. Then, the user causes a barcode reader (not shown) provided in the packing machine 200 to read the drug data related to the drugs contained in the barcode printed in the journal Jo. This allows the user to store (return) the drugs contained in the sorting cup 141 into a cassette provided in the packing machine 200 that contains the drugs. At this time, if the cassette of the packing machine 200 is provided with a locking lid, the cassette of the packing machine 200 may be unlocked on the condition that the user can confirm that the visual inspection result included in the barcode printed in the journal Jo, i.e., the inspection image Im2 sorted based on the information (stamped information or printed information) indicated by the imprinted or printed drug information reliably recognized by this device, includes an inspection result indicating that the visual inspection of the sorting cup 141 is all OK.

[0341] Furthermore, if the return destination is the medicine shelf 300, the user causes a reading unit (e.g., a barcode reader) provided in the return assistance device to read the medicine data and return destination information related to the medicine contained in the barcode printed on the journal Jo. This allows the user to carry the sorting cup 141 and journal Jo to the medicine shelf 300, which is the return destination, and store (return) the medicines contained in the sorting cup 141 in a predetermined position on the medicine shelf 300. At this time, if the medicine shelf 300 has a locking door, the door of the medicine shelf 300 may be unlocked on the condition that the user can confirm that the visual inspection result of the sorting cup 141 is completely OK as a result of visually inspecting the inspection image Im2 sorted based on the visual inspection result contained in the barcode printed on the journal Jo, i.e., the information (imprinted information or printed information) indicated by the imprint or print of the medicine reliably recognized by this device.

[0342] Furthermore, when returning medicines packaged by the packaging mechanism 6 to the packaging machine 200 or medicine shelf 300, the returning method is, for example, as shown in Fig. 24. For example, as described above, when all of the sorting cups 141 arranged in the second storage section 14 contain medicines and the waiting tray 15 contains medicines, the medicines are removed from the sorting cups 141 and the medicines in the waiting tray 15 are stored in the sorting cups 141. In this case, the medicines removed from the sorting cups 141 are packaged by the packaging mechanism 6.

[0343] 23(a), after the user has completed the visual inspection, the user inputs that fact to the medicine sorting device 1. Upon receiving the user input, the medicine sorting device 1 stores data relating to the medicine that reflects the visual inspection results in the RFID tag of the sorting cup 141 and in the memory unit 80.

[0344] Thereafter, the medicine sorting device 1 uses the data about the medicine stored in the RFID tag or memory unit 80 to package the medicine using the packaging mechanism 6. At this time, the medicine sorting device 1 attaches medicine data about the medicine and / or return destination information, for example in the form of a barcode, to the packaging paper on which the medicine is packaged. As shown in FIG. 23(b), the user reads the medicine data about the medicine and / or return destination information contained in the barcode printed on the packaging paper using a barcode reader provided in the packaging machine 200 or a reading unit provided in the return assistance device. This allows the user to store (return) the medicine stored in the sorting cup 141 in a cassette of the packaging machine 200 or a predetermined position on the medicine shelf 300. At this time, if the lid of the cassette of the packing machine 200 or the medicine shelf 300 has a door with a locking mechanism, the lock on the cassette of the packing machine 200 or the lock on the door of the medicine shelf 300 may be unlocked on the condition that the user visually inspects the inspection image Im2 sorted based on the visual inspection results contained in the barcode printed on the packing paper, i.e., the information (engraved information or printed information) indicated by the medicine's imprint or print reliably recognized by this device, and confirms that the inspection result includes an inspection result that all visual inspections of the sorting cup 141 are OK.

[0345] (Example of a journal) Next, an example of a journal issued by the medicine sorting device 1 will be described using Figure 25. (a) and (b) of Figure 25 are diagrams showing an example of a journal. (a) of Figure 25 shows an example of journal Jo1 that is issued in response to a visual inspection result that all medicines contained in any sorting cup 141 are the same type of medicine. The visual inspection result in this case is referred to as "visual OK". (b) of Figure 25 shows an example of journal Jo2 that is issued in response to a visual inspection result that at least one medicine among the medicines contained in any sorting cup 141 is a different type from the other medicines. The visual inspection result in this case is referred to as "visual NG".

[0346] 25(a), if the visual inspection result is "visually OK," a barcode and text information are printed in the journal Jo1 as information about the medicine indicating the visual inspection result. The information included in the barcode may include, for example, medicine-specific information (medicine identification code), device-specific information for identifying the medicine sorting device 1, or the number of medicines contained in the sorting cup 141.

[0347] By recording device-specific information or information on the number of drugs in the journal Jo1, this information can be read by the packing machine 200 when returning (filling) the drugs to the packing machine 200. When device-specific information is recorded, the packing machine 200 can determine which medicine sorting device 1 the drugs were sorted by.

[0348] The text information printed in the journal Jo1 includes, for example, the inspection date and time, the name of the inspector, the name of the drug, the marking on the drug, the total number of drugs contained in the sorting cup 141, the total drug price of the drugs, container-specific information for identifying the sorting cup 141, and information indicating the return destination.

[0349] 25(a), multiple return destinations that are candidates for return are printed in journal Jo1. Specifically, the type of packaging machine 200 that is the return destination, the machine number of packaging machine 200, and the cassette number of the cassette equipped in packaging machine 200 are printed. In addition, the shelf number of medicine shelf 300 is printed.

[0350] On the other hand, as shown in (b) of Figure 25, if the visual inspection result is "visual NG," journal Jo2 also prints a barcode and text information as information about the drug indicating the visual inspection result, but differs from journal Jo1 in the following ways.

[0351] Journal Jo2 is issued when the sorting cup 141 contains "visually unacceptable" medicines (medicines of a different type from the other medicines). Therefore, the barcode does not include the number of medicines contained in the sorting cup 141. In this case, the packaging machine 200 cannot determine the number of medicines to be returned. Therefore, journal Jo2 prints a message instructing the user to count the number of medicines remaining (medicines whose visual inspection results are OK) after removing the medicines whose visual inspection results are OK (the "visually unacceptable" medicines). Furthermore, journal Jo2 prints the number of medicines whose visual inspection results are OK (number of medicines whose visual inspection results are OK) and the number of medicines whose visual inspection results are NG (number of medicines whose visual inspection results are NG) instead of the total number of medicines printed in journal Jo1. Furthermore, journal Jo2 prints the words "visually unacceptable" so that the visual inspection results can be seen at a glance, as shown in FIG. 25(b).

[0352] Note that a barcode is also attached to the packaging paper in the return method shown in Figure 24. The barcode attached to the packaging paper may be the barcode described above. In other words, the information contained in the barcode attached to the packaging paper may differ depending on whether the product is "visually acceptable" or "visually unacceptable."

[0353] (Examples of displayed images: sorting image and inspection image) Next, examples of display images will be described with reference to FIGS.

[0354] FIG. 26(a) is a diagram showing an example of an assortment image Im1, and FIG. 26(b) is a diagram showing an example of an assorted medicine list image Im3 showing information related to the assorted medicines. The assortment image Im1 shown in FIG. 26(a) is another example of the display image shown in FIG. 11(a). The assortment image Im1 shown in FIG. 26(a) differs from the display image shown in FIG. 11(a) mainly in the configuration of the lower part. Here, we will mainly describe the parts of the assortment image Im1 that differ from the display image shown in FIG. 11(a). Also, FIG. 27(a) to (c) are diagrams showing examples of images that are displayed when a user input for the assortment image Im1 is accepted.

[0355] In the sorting image Im1, a plurality of rectangular portions Rs corresponding to each sorting cup 141 arranged in the second storage section 14 can accept user input. In response to a user input into a rectangular portion Rs, the medicine sorting device 1 displays an inspection image Im2 (see (a) in FIG. 28) corresponding to the rectangular portion Rs. Also, similar to (a) in FIG. 11, the medicine sorting device 1 displays the number of sorted medicines in the rectangular portion Rs corresponding to the sorting cup 141 into which the medicines have been sorted.

[0356] The "display switch" button Bo1 is an operation button that accepts a user input for selecting a color-coding method for the rectangular portion Rs. When the medicine sorting device 1 accepts a user input to the "display switch" button Bo1, it pops up a display color switch image Im4 showing the color-coding method as shown in (a) of FIG.

[0357] The display color switching image Im4 includes, for example, a "Color-code by return destination" button Bo11 and a "Color-code by visual inspection status" button Bo12. The "Color-code by return destination" button Bo11 is an operation button that accepts user input for color-coding by return destination. The "Color-code by visual inspection status" button Bo12 is an operation button that accepts user input for color-coding by visual inspection status.

[0358] When a user inputs the "Color-code by return destination" button Bo11, the medicine sorting device 1, for example, if the medicine name of the medicine contained in the sorting cup 141 has been determined, colors the rectangular portion Rs by referring to the return destination information linked to the medicine data related to the medicine. Furthermore, the medicine sorting device 1 displays rectangular portions Rs for which the medicine name has not been determined and rectangular portions Rs corresponding to sorting cups 141 that do not contain medicines in a color different from that for when the medicine name has been determined. The rectangular portions Rs for which the medicine name has not been determined and the rectangular portions Rs corresponding to sorting cups 141 that do not contain medicines may be displayed in different colors. An example of the display of rectangular portions Rs for each return destination is the display image shown in FIG. 12 described above.

[0359] When a user inputs the "Color-code by visual inspection status" button Bo12, the medicine sorting device 1 displays, for example, (1) rectangular portions Rs where the visual inspection result is "visual OK," (2) rectangular portions Rs where the visual inspection result is "visual NG," and (3) rectangular portions Rs where visual inspection has not been performed, each in a different color. Figure 26 (a) is an example of a sorting image Im1 in which a color-coded display is performed for each visual inspection status. Note that at least one of the above three types of visual inspection status may be displayed in a color different from the other visual inspection statuses.

[0360] The sorting image Im1 also includes a "sort" button Bo3 that accepts user input to start and stop sorting by the drug sorting device 1, and a "package" button Bo4 that accepts user input to start and stop packaging by the packaging mechanism 6.

[0361] In this embodiment, the specifications may be such that the drug sorting process by the drug sorting device 1 and the packaging process by the packaging mechanism 6 cannot be performed simultaneously. In this specification, as shown in (a) of FIG. 26, for example, if the drug sorting process is in progress, the "Packaging" button Bo4 will be inactive (only the button for stopping sorting (square button) will be active). On the other hand, if the packaging process is in progress, the "Sorting" button Bo3 will be inactive (only the button for stopping packaging (square button) will be active). Note that if the drug sorting device 1 does not have a packaging mechanism 6, the "Packaging" button Bo4 does not need to be displayed.

[0362] Furthermore, the "Select Return Source" button Bo5 is an operation button that accepts user input for selecting the source of return of the medicine. The return source is the location where the medicine was stored before being inserted into the medicine sorting device 1, such as a ward, a medical department, or a facility (e.g., a medical institution). When user input to the "Select Return Source" button Bo5 is accepted, the medicine sorting device 1 displays a return source selection image Im5, for example, as shown in (b) of FIG. 27. For example, if the medicine sorting device 1 is linked to (communicatively connected to) the packing machine 200, the medicine sorting device 1 can acquire information identifying the ward, etc., in which the packing machine 200 is installed (e.g., a ward ID). Therefore, the medicine sorting device 1 can associate the information identifying the ward ID, etc., with the medicine data related to the inserted medicine and store it in the memory unit 80 or the RFID tag of the sorting cup 141.

[0363] When the return source displayed in the return source selection image Im5 shown in (b) of Figure 27 is selected, the selected return source will be displayed in (a) of Figure 26 (displayed as "Unselected" in the figure).

[0364] The "Select Packaging Target" button Bo6 is an operation button that accepts user input for selecting a packaging method for the medicines by the packaging mechanism 6. When user input is accepted for the "Select Packaging Target" button Bo6, the medicine sorting device 1 displays a pop-up display, for example, as shown in FIG. 27(c). In the example of FIG. 27(c), the following buttons are displayed: (1) a "Packaging All" button Bo61 that causes the packaging mechanism 6 to package all sorted medicines; (2) a "Visual Inspection Completed Only" button Bo62 that causes the packaging mechanism 6 to package only those medicines that have been visually inspected out of all sorted medicines; (3) a "Not Packaged Only" button Bo63 that causes the packaging mechanism 6 to package only those medicines that have not been packaged at the return destination out of all sorted medicines; and (4) a "Select Only" button Bo64 that causes the packaging mechanism 6 to package only those medicines that have been placed in a sorting cup 141 that the user has individually selected out of all sorted medicines. According to the user's selection, the selected packaging method is displayed in the packaging method (shown as "Not Selected" in the figure) shown in (a) of FIG. 26. Note that return destination information may be linked to the drug data for the sorted drugs. In this case, the user's input to the "Select Packaging Target" button Bo6 may be applied only to the rectangular portion Rs corresponding to the sorting cup 141 containing the drugs whose return destination indicated by the return destination information is the packaging mechanism 6.

[0365] The "sorting list" button Bo7 is an operation button for switching the displayed image from the assortment image Im1 to the assorted medicine list image Im3. When a user inputs to the "assorting list" button Bo7, the medicine assorting device 1 switches to displaying the assorted medicine list image Im3.

[0366] 26(b), the sorted medicine list image Im3 shows the history of sorting by each type of medicine by the medicine sorting device 1. The RFID tag of the memory unit 80 or the sorting cup 141 stores medicine data related to the medicines, container-specific information for identifying the sorting cup 141, the number of medicines contained in the sorting cup 141, return destination information, etc., in a linked manner so that the sorted medicine list image Im3 can be generated.

[0367] When any drug included in the sorted drug list image Im3 is selected and user input is received via the "Visual Inspection" button Bo31, the drug sorting device 1 displays an inspection image Im2 of that drug. The list of drugs included in the sorted drug list image Im3 can be scrolled up and down and sorted via user input. By receiving user input via the "Container List" button Bo32 on the sorted drug list image Im3, the drug sorting device 1 switches from displaying the sorted drug list image Im3 to displaying the sorted image Im1.

[0368] The sorting image Im1 is a display image showing the sorting state (current sorting state) of medicines during the medicine sorting process by the medicine sorting device 1. On the other hand, the sorted medicine list image Im3 is a display image including not only the sorting state of medicines during the medicine sorting process, but also past medicine sorting states by the medicine sorting device 1. In other words, by displaying the sorted medicine list image Im3, the user can, for example, check information about medicines that have been sorted in the past but have not yet been visually inspected.

[0369] (a) to (c) of Figure 28 are diagrams showing an example of an inspection image Im2. Note that the inspection image Im2 shown in (a) and (b) of Figure 28 is another example of the display image shown in (b) of Figure 11. The following mainly describes the parts of the inspection image Im2 that are different from the display image shown in (b) of Figure 11.

[0370] As shown in (a) of Figure 28, when any drug is selected in the sorting image Im1 or sorted drug list image Im3, the drug sorting device 1 displays an inspection image Im2 of the drug. When a user input is received on the "Start visual inspection" button Bo21 of the inspection image Im2, the drug sorting device 1 displays an inspection image Im2 that can receive the confirmation results of the visual inspection, as shown in (b) of Figure 28.

[0371] The inspection image Im2 shown in (b) of Fig. 28 includes an "All OK" button Bo22 and an "NG" button Bo23 that allow the visual inspection results of the displayed medicines (medicines contained in the sorting cup 141) to be registered all at once. The "All OK" button Bo22 and the "NG" button Bo23 are operation buttons that replace the "Register" button included in the display image shown in (b) of Fig. 11.

[0372] When a user input is received using the "All OK" button Bo22, the medicine sorting device 1 determines that the visual inspection results of all displayed medicines are "visually OK" and writes the visual inspection results to the RFID tag of the sorting cup 141 containing the medicines. On the other hand, when a user input is received using the "NG" button Bo23, the medicine sorting device 1 determines that the visual inspection result of at least one medicine out of all displayed medicines is "visually NG" and writes the visual inspection result to the RFID tag of the sorting cup 141 containing the medicine.

[0373] In addition, in the inspection image Im2 shown in (a) and (b) of Figure 28, when user input is received regarding an image of the drug contained in the sorting cup 141 (visible light image of the drug captured by the imaging unit 13), the drug sorting device 1 displays an enlarged image Im6 of the drug, as shown in (c) of Figure 28.

[0374] An enlarged image of the selected drug is displayed in the enlarged display area R21 of the enlarged display image Im6. Images of the front and back surfaces of the drug captured by the imaging unit 13 are displayed. In addition, the normal image display area R22 displays an image (master image) (e.g., an image of an uncoated tablet) and size of the selected drug registered in the drug database.

[0375] If the visual inspection result for the selected medicine is "visual OK", the medicine sorting device 1 accepts "visual OK" as the visual inspection result for the medicine by accepting user input to the "visual OK" button Bo22. On the other hand, if the visual inspection result is "visual NG", the medicine sorting device 1 accepts "visual NG" as the visual inspection result for the medicine by accepting user input to the "NG" button Bo23.

[0376] In addition, in the inspection image Im2 shown in (a) and (b) of Figure 28, the user can zoom in or out on the captured image of the medicine (e.g., pinch in or pinch out). As a result, in the inspection image Im2 shown in (a) and (b) of Figure 28, the "display size" button for changing the display size of the display image shown in (b) of Figure 11 is not required.

[0377] In the inspection image Im2, the medicine sorting device 1 may arrange the images of the multiple medicines contained in the sorting cup 141 in order of highest matching accuracy with the images of the medicines registered in the medicine database (e.g., from the top left). Alternatively, the images may be arranged in order of lowest matching accuracy (e.g., from the top left). This allows medicines with lowest matching accuracy to be displayed in order of easiest visual recognition for the operator, thereby improving the efficiency and accuracy of visual inspection. When a user stores (returns) the medicines stored in the sorting cup 141 in a cassette (not shown) in the packaging machine 200 containing the medicines or in a predetermined location on the medicine shelf 300, if the cassette lid or shelf door has a locking mechanism, the locking mechanism of the cassette lid or shelf door may be unlocked on the condition that the matching accuracy of all medicines stored in the sorting cup 141 to be returned is equal to or greater than a predetermined value. The matching accuracy may be set to a level or threshold based on the degree of certainty with which the medicine sorting device 1 recognizes information indicated by an inscription or print on the medicine (engraved information or printed information).

[0378] Next, (a) to (c) of Figure 29 are diagrams showing other examples of inspection image Im2. As shown in (a) to (c) of Figure 29, the medicine sorting device 1 may display an inspection image Im2 that reflects whether or not visual inspection has been performed and the results of the visual inspection.

[0379] For example, as shown in (a) and (b) of FIG. 29, the medicine sorting device 1 may use different display methods when accepting user input for the "All OK" button Bo22 and when accepting user input for the "NG" button Bo23. For example, as shown in (a) of FIG. 29, when accepting user input for the "All OK" button Bo22, the medicine sorting device 1 surrounds the entire display region R23 of the medicines that are the subject of the audit with a predetermined pattern (e.g., green). On the other hand, as shown in (b) of FIG. 29, when accepting user input for the "NG" button Bo23, the medicine sorting device 1 surrounds the entire display region R23 with a pattern (e.g., yellow) that is different from the predetermined pattern.

[0380] Furthermore, as shown in (c) of Figure 29, the medicine sorting device 1 may display an inspection image Im2 for each medicine image displayed in the display area R23, with a pattern indicating whether a visual inspection has been performed and the result of the visual inspection. For example, each medicine may be marked with a pattern indicating one of three states: no visual inspection has been performed, the visual inspection result is "visually OK," and the visual inspection result is "visually NG." In (c) of Figure 29, the medicine images in the top two rows of the display area R23 are marked with a pattern indicating no visual inspection has been performed (e.g., surrounded by a blue circle), and the medicine images in the bottom three rows are marked with a pattern indicating "visually OK" (e.g., surrounded by a green circle).

[0381] (Example of display image: Aggregate image) Next, examples of display images will be described using Fig. 30 and Fig. 31. Fig. 30 is a diagram showing an example of a display image (summary image Im7) relating to the task of tallying medicines sorted by the medicine sorting device 1. The medicine sorting device 1 displays the summary image Im7 as shown in Fig. 30 by accepting user input for performing the task of tallying medicines. The summary image Im7 can accept user input for specifying, for example, the "tallying period," "output category," "output unit," and "journal output format." The medicine sorting device 1 displays the tallying results (e.g., CSV (Comma Separated Value) output) or outputs them as a journal in accordance with these user inputs.

[0382] In the "aggregation period" field, a aggregation period desired by the user is set.

[0383] In "Output Category," the method for outputting the tally results is set. As options for "Output Category," for example, "Sorting Result Tally" and "Main Unit Error History Tally" are displayed in a pull-down menu. When "Sorting Result Tally" is selected, the medicine sorting device 1 performs a tally of the sorted medicines. When "Main Unit Error History Tally" is selected, the medicine sorting device 1 tallys the history of errors in the medicine sorting device 1. The medicine sorting device 1 stores logs of malfunctions such as operational errors in the transport / sorting unit 12, communication errors in the medicine sorting device 1, or errors in the adsorption mechanism adsorbing medicines, and tallys these logs as error history.

[0384] In "Output unit," the output method for tabulating the sorted medicines is set. Selection items for "Output unit" are displayed in a pull-down menu, such as "By medicine," "By medicine type," "By efficacy classification," "By return origin (ward / department / facility)," and "By user." Depending on the selected item, the medicine sorting device 1 tabulates the sorted medicines by medicine, by medicine type, by efficacy, by return origin, or by user.

[0385] In "Journal Output Format," an output method is selected for printing and outputting the tally results of sorted medicines in a journal. Selection items for "Journal Output Format" include, for example, "Number of sorted medicines (by medicine)," "Sorted drug price (by medicine)," "Number of sorted medicines and drug price (by medicine)," and "Number of sorted medicines and drug price (total)." Depending on the selected item, the medicine sorting device 1 tally the number of each sorted medicine, the drug price of each sorted medicine (total, i.e., number of medicines x drug unit price), the number and drug price of each sorted medicine (total), or the total number and drug price of all sorted medicines.

[0386] FIGS. 31(a) to 31(d) are diagrams showing examples of output when the counting results are output by journal.

[0387] (a) of Figure 31 is an example in which the number of drugs for each sorted drug is printed in the journal. In this example, "Number of drugs sorted (by drug)" is selected as the "Journal output format" in the summary image Im7. (b) of Figure 31 is an example in which the drug price for each sorted drug is printed in the journal. In this example, "Number of drugs sorted (by drug)" is selected as the "Journal output format" in the summary image Im7. (c) of Figure 31 is an example in which both the number of drugs and the drug price for each sorted drug are printed in the journal. In this example, "Number of drugs sorted, drug price (by drug)" is selected as the "Journal output format" in the summary image Im7. (d) of Figure 31 is an example in which the total number and drug price of all sorted drugs are printed in the journal. In this example, "Number of drugs sorted, drug price (total)" is selected as the "Journal output format" in the summary image Im7.

[0388] In the journal output examples of Figures 31(a) to 31(c), the total number of all sorted medicines and the total drug prices are also printed, but this printing is optional.

[0389] By accepting user input to such a tally image Im7 during the tallying operation, the medicine sorting device 1 can tally the sorted medicines, for example, by "sorting processing time (by ward, department, or facility)" and "by specified period." The medicine sorting device 1 can also tally the number of medicines (number of sorted tablets) or drug prices (total) by "drug," "drug efficacy," or "drug type." The medicine sorting device 1 can then output the tally results by displaying them or printing them in a journal. Note that the drug prices may also be output as the unit price of each medicine. The medicine sorting device 1 may also tally and output, for example, the number of medicines (total number of tablets) that could not be sorted.

[0390] <Example of sorting cup configuration> Below, we will explain a specific configuration example of the sorting cup 141. (a) of Fig. 32 is a diagram showing an example of a specific configuration of the sorting cup 141. Fig. 33 is a six-sided view of the sorting cup 141 shown in (a) of Fig. 32.

[0391] As described above, the sorting cup 141 is disposed in the second storage section 14, and serves as a sorting container for storing the medicines sorted by the medicine sorting device 1 (specifically, the conveying and sorting unit 12).

[0392] As shown in Figures 32(a) and 33, the sorting cup 141 has a substantially rectangular parallelepiped shape made up of side walls 143 (outer walls) and a bottom 144. In other words, when viewed from the opening 142 side, the shape of the sorting cup 141 (the shape of the opening 142 and bottom 144) is substantially rectangular. In this case, compared to when the sorting cup 141 is substantially cylindrical, the sorting cup 141 can be placed without gaps in the second storage section 14. Therefore, the storage space for the sorting cup 141 in the second storage section 14 can be used effectively. Note that in this embodiment, the "rectangle" shape of the sorting cup 141 also includes a case where the four corners are connected by curved lines.

[0393] Furthermore, in particular, if the shape of the sorting cup 141 is approximately rectangular when viewed from the opening 142 side, the orientation of the sorting cup 141 can be determined when the sorting cup 141 is placed in the second storage section 14. In other words, the multiple sorting cups 141 can be aligned and placed so that the long sides (or short sides) of each of the multiple sorting cups 141 face the same direction. Furthermore, by forming the placement location of the sorting cup 141 in the second storage section 14 to match the shape of this sorting cup 141, the multiple sorting cups 141 can be placed uniformly without gaps and in a predetermined direction.

[0394] In the sorting cup 141, an opening 142 into which the medicines sorted by the conveying and sorting unit 12 are inserted is formed on the upper surface of the sorting cup 141 by a side wall 143. In addition, the upper part of the side wall 143 defines an edge 145 as the outer periphery of the opening 142.

[0395] Furthermore, the size of the opening 142 may be larger than the size of the bottom 144 so that medicines transported by the transporting / sorting unit 12 can be easily stored in the sorting cup 141 and so that medicines stored in the sorting cup 141 can be easily removed. In other words, the cross-sectional shape of the sorting cup 141 cut along a plane including a perpendicular line to the bottom 144 (the cross-sectional shape of the sorting cup 141 as viewed from the side wall 143) may be a substantially trapezoid shape in which the bottom 144 side is smaller than the opening 142 side. However, the sorting cup 141 may also be a rectangular parallelepiped shape (in which the size of the bottom 144 and the size of the opening 142 are substantially the same).

[0396] The sorting cup 141 has a protrusion 146 on at least a part of the edge 145. Specifically, the protrusion 146 is provided on at least one of the multiple sides that make up the edge 145. In other words, the edge 145 is made up of the protrusion 146 and a base 148, which is the part other than the protrusion 146.

[0397] By grasping the protrusion 146, the user can lift the sorting cup 141 placed in the second storage section 14. In other words, by providing the protrusion 146 on the edge 145, it is possible to easily remove each of the multiple sorting cups 141 stored in the second storage section 14 from the second storage section 14.

[0398] In (a) of Figure 32, one protrusion 146 is provided on each of the four sides of the edge 145. The protrusions 146 provided on two adjacent sides are adjacent to each other. The heights 146h of the adjacent portions 146a are the same. This allows the protrusions 146 to be wider, making it easier to remove the sorting cup 141.

[0399] In addition, in (a) of Figure 32, the convex portions 146 are provided at corners that face each other. As described above, the opening 142 and the bottom portion 144 are substantially rectangular. Therefore, the user can easily arrange the sorting cup 141 in the second storage section 14 with the orientation of the sorting cup 141 aligned, and as a result, the convex portions 146 provided at the corners can be easily arranged so that they are not adjacent to each other. In other words, the user can arrange the sorting cup 141 in a way that makes it easy to take it out without even thinking about it.

[0400] If the opening 142 and the bottom 144 are square, unless the user consciously positions the sorting cups 141, there is a possibility that the convex portions 146 of adjacent sorting cups 141 will be adjacent to each other. In this case, it will be difficult for the user to grasp the convex portions 146, making it difficult to remove the sorting cups 141. However, for example, if the placement location of the sorting cups 141 in the second storage section 14 is specified to make them easier to remove, the shape of the sorting cups 141 when viewed from the opening 142 side may be square.

[0401] Note that, as long as the sorting cup 141 can be positioned so that it is easy for the user to take it out without any consideration, it is not necessary to provide the convex portions 146 at the corners as described above. For example, it is also acceptable to provide the convex portions 146 on each side so that they are point symmetrical on opposing sides.

[0402] Furthermore, as long as the above-mentioned points are not taken into consideration, the shape of the sorting cup 141 may be any shape. For example, the shape of the opening 142 or the bottom 144 may be circular or elliptical, and part of the periphery of the opening 142 or the bottom 144 may be curved. Furthermore, the protrusions 146 do not have to be provided on all sides, and they do not have to be provided adjacent to and facing each other at corners. Furthermore, the heights of the adjacent portions 146a of adjacent protrusions 146 may be different from each other.

[0403] The edge 145 functions as a protrusion (a return portion) that protrudes outward from the side wall 143 at the connection portion with the side wall 143 (the upper portion of the side wall 143). This allows the user to hook their finger on the protrusion, further improving the ease of removal. However, if this point is not taken into consideration, the edge 145 does not necessarily need to protrude outward from the side wall 143.

[0404] 32(a), an upper portion 146u of the convex portion 146 is not inclined and is linear. An extension portion 146e of the convex portion 146, which extends to the base portion 148, is inclined from the upper portion 146u toward the base portion 148. The base portion 148 is not inclined and is linear. A connection portion 146c between the upper portion 146u of the convex portion 146 and the extension portion 146e, and a connection portion 146d between the extension portion 146e of the convex portion 146 and the base portion 148 are both substantially arc-shaped.

[0405] The sorting cup 141 of this example has a color (for example, black) so that the medicines can be easily identified when imaged by the second camera 121. However, the sorting cup 141 may be light-transmitting as long as it can capture an image of the medicines.

[0406] (Modification of sorting cup 141) Figures 32(b) to (d) are diagrams showing modified examples of the sorting cup 141. In the sorting cup 141a shown in Figure 32(b), the opening 142 and bottom 144 are rectangular and horizontally (or vertically) longer than the opening 142 and bottom 144 of the sorting cup 141 shown in Figure 32(a). In the sorting cup 141b shown in Figure 32(c), the height 146h' of the convex portion 146 is higher than the height 146h of the convex portion 146 of the sorting cup 141 shown in Figure 32(a). The sorting cup 141c shown in Figure 32(d) is a sorting cup 141 in which the above-mentioned protrusion (turned portion) is not provided on the edge 145.

[0407] Figures 34(a) to (c) and Figure 35(a) to (h) are diagrams showing further modified examples of the sorting cup 141. In Figures 34(a) to (c) and Figure 35(a) to (h), the edge 145 is shown as not being provided with the protrusion, but it is also possible for the edge 145 to be provided with the protrusion as in the sorting cup 141.

[0408] In the sorting cup 141d shown in Figure 34(a), the convex portion 146 (i.e., the upper portion 146u and the extending portion 146e) is approximately arc-shaped. In other words, in the upper portion 146u, the end portion opposite the end portion connected to the extending portion 146e (in Figure 34(a), the adjacent portion 146a where the convex portions 146 are adjacent) protrudes most upward. In the sorting cup 141e shown in Figure 34(b), in addition to the convex portion 146 and the extending portion 146e, the base portion 148 also is approximately arc-shaped. In the sorting cup 141d, at least the base portion 148 is concave. In other words, in the sorting cup 141d, the curve connecting points Px and Py is point-symmetrical about its approximate center Pc. In a sorting cup 141f shown in Figure 34(c), an upper portion 146u is linear, and an extension portion 146e and a base portion 148 are generally arc-shaped. At least the base portion 148 is concave.

[0409] In the sorting cup 141g shown in FIG. 35(a), the convex portion 146 has a curved shape that protrudes upward near the center. In other words, the sorting cup 141g differs from the sorting cup 141d shown in FIG. 34(a) in that the convex portion 146 protrudes most upward near its center, not the adjacent portion 146a. The base portion 148 also has a curved shape that protrudes upward near its center. In the sorting cup 141h shown in FIG. 35(b), the convex portion 146 has a curved shape similar to that in FIG. 35(a), but the base portion 148 is linear. In the sorting cup 141i shown in FIG. 35(c), the convex portion 146 has a curved shape similar to that in FIG. 35(a), but the base portion 148 has a concave shape similar to that in the sorting cup 141e shown in FIG. 34(b).

[0410] In the sorting cups 141g to 141i shown in Figure 35(a) to (c), the convex portion 146 is curved, but the convex portion 146 may be polygonal, as in the sorting cups 141j to 141m shown in Figure 35(d) to (g). Furthermore, as shown in Figure 35(h), the convex portion 146 may be stair-shaped.

[0411] (Other: Bottom shape of sorting cup) Fine protrusions may be provided on the inner bottom surface of the sorting cup 141. If the suction mechanism approaches the inner bottom surface of the sorting cup 141 and sucks the sorting cup 141, there is a possibility that the sorting cup 141 may be lifted up. By providing fine protrusions on the inner bottom surface, it is possible to make it more difficult for the sorting cup 141 to be sucked up.

[0412] In order to prevent the first housing portion 11 from being lifted up, minute protrusions may be provided on the inner bottom surface of the first housing portion 11.

[0413] <Other various processing or operation examples> (character recognition) Next, another example of character recognition processing by the discrimination unit 64 will be described. Here, the storage unit 80 stores image data (master image) showing an image of a drug including characters, markings, and cleavage lines, for example, linked to identification information indicating the drug name, as master information of the drug. This image data may be managed by a drug database. In this case, the discrimination unit 64 performs pattern matching of the image of the drug captured by the first camera 131 in the placement area Ar with multiple image data stored in the storage unit 80.

[0414] Generally, when performing OCR processing, the orientation and size of characters contained in the target image must be consistent. Therefore, the discrimination unit 64 rotates the visible light image while performing OCR processing. However, in this case, the visible light image must be rotated each time analysis is performed, which increases processing time. Furthermore, the character recognition accuracy of OCR processing may not be high.

[0415] Therefore, in this example, symbol identification information indicating the type of symbol (e.g., letters (numbers and letters, etc.), manufacturer's mark, and secant line), size, and angle shown on the medicine, for identifying the symbol shown on the medicine, is registered in advance in association with the identification information. The discrimination unit 64 identifies the type of medicine by referring to the symbol identification information.

[0416] A method for generating symbol identification information will be described with reference to FIG. 36. FIG. 36 is a diagram for explaining an example of a method for generating symbol identification information. (a) of FIG. 36 is a diagram showing an example of an image Ima of a drug for which symbol registration information is to be generated, and (b) to (d) are diagrams showing examples of drug images Imr1 to Imr3 when acquiring the symbol identification information. The process for generating symbol identification information is executed by an information generating device that generates the symbol identification information. The information generating device may be provided in the drug sorting device 1, and the drug sorting device 1 may generate the symbol registration information. The information generating device is also assumed to have the master information described above.

[0417] First, the information generating device acquires an image Ima of a drug for which symbol registration information is to be generated, as shown in (a) of Fig. 36. In this example, the image Ima includes the letters (numbers) 1, 2, and 3.

[0418] Next, as shown in (b) to (d) of FIG. 36, the information generating device acquires symbol identification information by performing pattern matching with image data included in the master information of the medicine while rotating image Ima. For example, in the state of (b) of FIG. 36, pattern matching is performed to acquire "1" from image Imr1. At this time, the information generating device identifies the multiple pixels that form the "1" by drawing a line to trace the "1" in image Imr1. In this way, the information generating device identifies the size of the "1" in image Imr1. At this time, the type of character may be identified as a number. The information generating device also acquires the angle of image Imr1 from the reference position, when the position of image Ima shown in (a) of FIG. 36 is used as the reference position. In this way, the information generating device identifies the angle of the "1" in image Imr1. In the states of (c) and (d) of FIG. 36, the information generating device also identifies the size and angle of the "2" in image Imr2 and the "3" in image Imr3, respectively.

[0419] The information generating device stores the identified type, size, and angle of the character as symbol identification information in the storage unit 80 of the medicine sorting device 1, linking the type, size, and angle of the character to the identification information (master information).

[0420] The discrimination unit 64 performs pattern matching of the captured image of the drug with multiple image data stored in the storage unit 80, thereby narrowing down multiple (e.g., 10) drug types in descending order of matching score. The discrimination unit 64 compares the captured image with the symbol identification information for each of the narrowed-down multiple drugs (applies the symbol identification information to the captured image). The discrimination unit 64 identifies the drug image that has the highest degree of match with the symbol identification information among the captured images of the narrowed-down drugs, and identifies that the drug is the type (drug name) of the drug linked to the symbol identification information.

[0421] In this way, the discrimination unit 64 can identify the type of medicine more easily and accurately by performing matching using the symbol identification information compared to OCR processing. Therefore, the discrimination unit 64 can identify the type of medicine quickly and accurately.

[0422] (Drug adsorption method) Next, the drug adsorption method will be described with reference to Figure 37. Figure 37 is a diagram for explaining an example of the drug adsorption method. Figure 37(a) is a diagram for explaining the state when a relatively small drug is adsorbed while the adsorption mechanism is moved, and Figures 37(b) and 37(c) are diagrams for explaining the state when the adsorption method is changed depending on the size of the drug.

[0423] As described above, the suction mechanism changes its movement speed in the Z-axis direction when suctioning the drug (movement speed when descending) based on, for example, changes in suction force detected by a pressure sensor. For example, when the suction mechanism suctions the drug in the first storage section 11, the suction mechanism stops just before the drug (before contacting the drug) so as not to push the drug in during its descent. In this case, the suction mechanism suctions the drug just before it reaches the drug, and therefore descends while sucking air with the vacuum pump 122d.

[0424] Here, relatively small drugs have a relatively light mass. Therefore, as shown in (a) of Figure 37, when attempting to adsorb a drug using the above method, the relatively small drug may be sucked up at an angle just before the drug reaches the adsorption pad 122a. In this case, a gap may be formed between the adsorption pad 122a and the drug, or the adsorption force (flow rate) may vary depending on the position of the adsorption pad 122a, resulting in an unstable adsorption force. Therefore, it may be difficult to determine whether the drug is adsorbed to the adsorption pad 122a based on changes in adsorption force.

[0425] Furthermore, when a drug is adsorbed, the second camera 121 captures an image of the drug stored on the drug placement table 133a. Therefore, the sorting control unit 62 can calculate the size (area) of the drug to be adsorbed by analyzing the captured image. In particular, since at least one drug is placed on the drug placement table 133a when adsorbing the drug, the sorting control unit 62 can relatively easily calculate the size of the drug to be adsorbed. The size of the drug is identified, for example, by counting the number of pixels of the image of the drug in the acquired image.

[0426] In this example, the sorting control unit 62 changes the drug adsorption method by determining whether the calculated drug size is equal to or greater than a predetermined value. This predetermined value is set in advance, for example, through experiments or the like.

[0427] Specifically, when the calculated area of ​​the medicine is less than a predetermined value (when the medicine is relatively small), the sorting control unit 62 lowers the suction mechanism to a predetermined position PS1 without suction, as shown in FIG. 37(b). The sorting control unit 62 then starts suction at the predetermined position PS1 to suction the medicine. The predetermined position PS1 is a position where the medicine can be suctioned by suction, and for example, it roughly coincides with the location where the suction force changes using the above-mentioned method. When suctioned in this manner, the medicine can be lifted directly upward, and therefore, unlike the case of FIG. 37(a), the suction force when the medicine is suctioned can be stabilized. Therefore, the sorting control unit 62 can stably determine the suction of relatively small medicines.

[0428] The predetermined position PS1 may be set to the same position (height) for all medicines, or may be calculated from the distance to the medicine detected by a distance sensor. Furthermore, if the type of medicine is specified, the predetermined position PS1 may be calculated based on information about the size of the medicine (e.g., diameter, thickness) contained in the medicine database.

[0429] On the other hand, if the calculated area of ​​the medicine is equal to or greater than a predetermined value (if the medicine is relatively large), the sorting control unit 62 adsorbs the medicine using the method described above, as shown in (c) of Figure 37. That is, the sorting control unit 62 lowers the adsorption mechanism while sucking, and stops the adsorption mechanism when the suction force changes (i.e., at predetermined position PS2). That is, the adsorption mechanism stops just before the medicine. In this state, the adsorption mechanism adsorbs the medicine. If the medicine is relatively large, this method is unlikely to lift it at an angle, so the suction force when the medicine is adsorbed can be stabilized. Furthermore, because the adsorption mechanism is stopped at predetermined position PS2 based on the change in suction force, the adsorption mechanism can be stopped just before the medicine (without crushing the medicine) using a simple method and reliably.

[0430] In this way, by changing the adsorption method depending on the size of the medicine (i.e., the weight of the medicine), the medicine can be adsorbed onto the adsorption pad 122a stably regardless of the weight of the medicine. Therefore, failure in adsorption of the medicine can be reduced, and the medicine sorting process can be speeded up.

[0431] When a relatively large drug is to be adsorbed, the adsorption mechanism may be moved to a predetermined position PS2 without suction, and then suction may be started at the predetermined position PS2, as explained with reference to (b) of Figure 37. In this case, there is no need to determine whether the drug is large or small.

[0432] 37(b) and 37(c) may also be used for adsorption of medicines in the first container 11 and the sorting cup 141. In this case, the transport control unit 61 identifies the medicine to be adsorbed from the captured image and calculates the size of the medicine. The predetermined position PS1 is calculated, for example, by detecting the distance to the medicine to be adsorbed using a distance sensor.

[0433] (Air blowing operation) Next, the air blowing operation by the suction mechanism will be described.

[0434] Depending on the position where the medicine to be adsorbed by the adsorption mechanism is placed or the posture of the medicine, the adsorption mechanism may not be able to adsorb the medicine. For example, if the medicine is placed on the edge of the first container 11, the sorting cup 141, the medicine placement table 133a, or the like, or if it is standing at an angle, the adsorption mechanism may not be able to adsorb the medicine. If the adsorption mechanism is unable to adsorb the medicine to be adsorbed, it attempts to adsorb the medicine by, for example, repeating the adsorption operation (picking operation) a predetermined number of times. In other words, in this case, the number of retry attempts to adsorb the medicine increases.

[0435] Therefore, in this example, when the transport control unit 61 or the sorting control unit 62 determines that the adsorption of the target drug has failed, it blows air from the adsorption mechanism. This can change the position or posture of the drug. For example, it is possible to change the state of the drug from when adsorption failed, such as by laying down a standing drug or repositioning the drug away from the edge. This increases the chances of successfully adsorbing the drug, thereby reducing the number of drug adsorption retries.

[0436] Furthermore, if it is determined that the adsorption of the target drug has failed, the adsorption mechanism may blow air toward the drug and its vicinity a predetermined number of times. In other words, the adsorption mechanism may blow air toward the same location a predetermined number of times.

[0437] For example, in this case, after the suction mechanism blows air, the second camera 121 captures an image of the first container 11, etc. This blowing and capturing operation is repeated a predetermined number of times, and each time, the image captured by the second camera 121 is stored in the storage unit 80. The transport control unit 61 or the sorting control unit 62 identifies changes in the image of the area where the suction mechanism blows air from the images captured multiple times. Then, for images other than the image of the housing of the first container 11, etc., it determines whether there is an image that remains unchanged in the images captured multiple times. If the medicine is present in the area where air is blown, the position or posture of the medicine will be changed to some extent by the blown air. Therefore, if there is an image that remains unchanged in the images captured multiple times, the transport control unit 61 or the sorting control unit 62 determines that the image is dirt adhering to the first container 11, etc. Note that the presence or absence of changes in the image may also be determined from images captured by the second camera 121 when the medicine fails to be adsorbed.

[0438] In this way, by performing the air blowing action multiple times, it can be determined whether or not dirt is attached to the first storage section 11, etc. Therefore, it is possible to notify the user that dirt is attached to the first storage section 11, etc. (that cleaning is required).

[0439] The multiple air blowing operations are not limited to when the adsorption of the medicine fails. For example, the multiple air blowing operations may be performed when no medicine is contained in the first container 11, etc. In this case, by comparing the images described above, it is possible to determine that an object other than the medicine placing stand 133a that does not show any change in its image is dirt adhering to the medicine placing stand 133a.

[0440] Furthermore, if medicine fragments or dust are contained on the medicine placing table 133a, the accuracy of identifying the medicine may be reduced by the fragments. For example, depending on the position or size of the fragments, the fragments may be mistakenly recognized as medicine (or a part thereof). In particular, the medicine placing table 133a identifies the type of medicine based on the captured image, but the position or size of the fragments may affect this identification.

[0441] Therefore, in this example, the suction mechanism blows air toward the medicine placing stand 133a. This makes it possible to blow debris and the like out of the medicine placing stand 133a. It also makes it possible to prevent debris and the like from adhering to the medicine placing stand 133a. The suction mechanism performs the air blowing operation, for example, when no medicine is placed on the medicine placing stand 133a (for example, before placing a medicine on the medicine placing stand 133a or after removing a medicine from the medicine placing stand 133a).

[0442] Furthermore, the suction mechanism can blow air into the first storage unit 11, the sorting cup 141, etc., to blow away debris or prevent adhesion of debris. For example, by blowing air when the suction mechanism fails to adsorb a drug as described above, the suction mechanism can change the attitude or position of the drug and blow away debris. However, the suction mechanism may also perform the air blowing operation when, for example, no drug is stored in the first storage unit 11 or the sorting cup 141.

[0443] (Suction position identification process) Next, the process of specifying the pickup position will be described.

[0444] The transport control unit 61 or the sorting control unit 62 identifies the position of the medicine in the first container 11 or the sorting cup 141, etc., by analyzing the image captured by the second camera 121. If the first container 11 has a color (e.g., black or gray), the transport control unit 61 identifies the position of the medicine, for example, from the difference between the color of the first container 11 and the color of the medicine in the image captured by the second camera 121. Even if the sorting cup 141 has a color, the sorting control unit 62 performs a similar process to identify the position of the medicine. However, if the medicine has a dark color (a color similar to that of the first container 11, etc.) or is a transparent medicine, it may not be possible to identify the position of the medicine using this method.

[0445] Therefore, in this example, the transport control unit 61 or the sorting control unit 62 specifies the position of the medicine by the light that is irradiated onto the surface of the medicine and reflected by the surface. Figure 38 (a) to (c) are diagrams for explaining the process of specifying the adsorption position.

[0446] As shown in (a) of Figure 38, the conveying / sorting unit 12 of this example includes a light source 124 that emits light when the second camera 121 captures an image. The light source 124 is provided near the second camera 121 and emits light toward the first storage section 11 or the sorting cup 141. This allows the second camera 121 to capture an image including an image of light reflected from the surface of the medicine. Therefore, the conveying control section 61 or the sorting control section 62 can identify the position of the reflected light included in the image captured by the second camera 121 as the position of the medicine.

[0447] In (a) of Figure 38, the transporting and sorting unit 12 is equipped with two light sources 124. However, as long as the position of the medicine can be identified in the image captured by the second camera 121, the number of light sources 124 may be one, or may be three or more.

[0448] Here, when the two light sources 124 are considered as one light source, the position of the reflected light on the medicine differs depending on the position where the medicine is placed, as shown in (b) of Figure 38. Specifically, if the medicine is located directly below the light source 124, the position of the reflected light will be at or near the center of the medicine. On the other hand, the further the medicine is located from directly below the light source 124, the further the position of the reflected light will be from the center of the medicine.

[0449] Therefore, in this example, the transport control unit 61 or the sorting control unit 62 corrects the position of the reflected light on the medicine. The storage unit 80 stores correction value information indicating correction values ​​(correction amount and direction) for correcting the position of the reflected light. The correction value information is set by experiment or the like.

[0450] The correction value is linked to each position of the drug (i.e., each position of the reflected light) captured in advance by changing the position of the drug. Also, as shown in (c) of FIG. 38, the correction value is set to increase the further away from directly below the light source 124. Specifically, for drugs at positions P1, P3, and P4 that are shifted from directly below the light source 124, the position Pre of the reflected light is shifted from the center position of the drug. Therefore, the correction value is determined so that the position Pre of the reflected light is the center position of the drug (detection position Pde where the reflected light is detected). On the other hand, for the drug at position P2 that is directly below the light source 124, the position Pre of the reflected light is the same as the center position of the drug, so the correction value is 0.

[0451] The transport control unit 61 or the sorting control unit 62 identifies the position Pre of the reflected light included in the image captured by the second camera 121, and then corrects the position Pre of the reflected light to the detection position Pde of the reflected light by referring to the correction value information. The transport control unit 61 or the sorting control unit 62 identifies the detection position Pde of the reflected light as the adsorption position of the medicine.

[0452] This makes it possible to accurately identify the adsorption position of the medicine even when the first container 11 or the sorting cup 141 has a color and the medicine has a color similar to that of the first container 11 or the sorting cup 141, or is transparent. Furthermore, since accuracy of the adsorption position is required when the medicine is particularly small, this process makes it possible to determine the adsorption position with greater accuracy.

[0453] (Method of determining rotation direction of first camera) Next, a method for determining the rotation direction of first camera 131 will be described.

[0454] Consider a case where the position of first camera 131 when first camera 131 captures an image of a medicine from above is 0°, and the medicine (e.g., capsule) is placed on medicine placing table 133a with information such as identification information attached to the medicine facing a direction of 315°. In this case, imaging control unit 63 can acquire information such as identification information (hereinafter simply referred to as identification information) by analyzing the medicine imaged by first camera 131 from the 315° position.

[0455] Here, consider a case where the rotation mechanism 132 rotates the first camera 131 so that it rotates around the placement area Ar2 in only one direction (for example, clockwise when viewed from the front of the medicine sorting device 1). When capturing an image of the identification information of a medicine placed in the above state, the rotation mechanism 132 must move the first camera 131 to three positions: 45°, 135°, and 225°, and then move it to the 315° position after the first camera 131 captures an image of the medicine. This is because it is difficult to obtain the identification information by analyzing the images captured from the 45°, 135°, and 225° positions.

[0456] Therefore, in this example, the rotation mechanism 132 rotates the first camera 131 so that the first camera 131 revolves around the arrangement area Ar2 in both clockwise and counterclockwise directions. The imaging control unit 63 controls the rotation mechanism 132 based on the image captured from the 0° position to determine the rotation direction of the first camera 131.

[0457] For example, in an image of the drug captured from the 0° position, the imaging control unit 63 divides the drug into two equal parts in a direction parallel to the direction in which the shaft 133c extends (a direction perpendicular to the rotation direction of the first camera 131) and sets two regions on the drug. The imaging control unit 63 identifies one of the two regions that contains at least a part of the identification information attached to the drug, and determines the direction in which the identified region exists as the rotation direction of the first camera 131. If the identification information is included in both of the two regions, the imaging control unit 63 determines the direction in which the region with the larger area occupied by the identification information exists as the rotation direction of the first camera 131. Note that if the identification information is not included in the image of the drug captured from the 0° position, the imaging control unit 63 rotates the first camera 131 in an initially set direction (e.g., clockwise).

[0458] This reduces the time required to obtain the identification information and to identify the type of medicine.

[0459] <Configuration example of a medicine sorting device> Next, a configuration example of the medicine sorting device 1a will be described with reference to Fig. 39. Fig. 39 shows a configuration example of the medicine sorting device 1a, where (a) is a perspective view of the medicine sorting device 1a and (b) is a perspective view showing the basic configuration of the medicine sorting area 2 provided in the medicine sorting device 1a.

[0460] In the medicine sorting device 1 shown in FIG. 2, the first RFID reader / writer unit 5 is provided on the medicine removal side (front side), but in the medicine sorting device 1a, as shown in FIG. 39(b), the first RFID reader / writer unit 5 is provided on the medicine removal side of the base 19. By providing the first RFID reader / writer unit 5 on the base 19, it is not necessary to remove the sorting cup 141 from the medicine sorting device 1a when reading information from the RFID tag of the sorting cup 141. This reduces the possibility of dropping the sorting cup 141 and scattering the medicines inside the sorting cup 141 outside the medicine sorting device 1a. In other words, operational safety can be improved.

[0461] In addition, in accordance with the change in the installation position of the first RFID reader / writer unit 5, the medicine sorting device 1a is provided with an opening / closing door 52 on the medicine removal side, as shown in (a) of Figure 39. In order to move the medicines stored in the second storage section 14 to the packaging mechanism 6, the medicine sorting device 1a is provided with, for example, a packaging hopper that temporarily holds the medicines, and a transfer path that moves the medicines held in the packaging hopper to the packaging mechanism 6. Furthermore, at least the transfer path is removable. By opening the opening / closing door 52, the transfer path can be removed to the outside of the medicine sorting device 1a.

[0462] That is, the provision of opening / closing door 52 makes it possible to remove and clean the passageway. Furthermore, with the passageway removed, it becomes possible to clean the members (e.g., packaging hopper) provided between medicine inlet 17 and packaging mechanism 6.

[0463] The medicine sorting device 1a is provided with an opening / closing shutter 51 that allows the medicine take-out side to be opened and closed. The medicine sorting device 1 shown in Fig. 2 is also provided with an opening / closing shutter similar to the opening / closing shutter 51 (in Fig. 2, the opening / closing shutter is shown as being substantially transparent so that the medicine sorting area 2 can be seen).

[0464] [Another expression of the present invention] A drug sorting device according to one embodiment of the present invention comprises a first storage unit that stores multiple types of drugs in a mixed state, a second storage unit that stores the drugs sorted by type, an imaging unit that images the drugs, a discrimination unit that determines the type of the drugs based on the image captured by the imaging unit, and a sorting unit that sorts the drugs by type based on the discrimination result by the discrimination unit and stores them in the second storage unit, wherein the second storage unit has multiple sorting containers that store the drugs, the first storage unit and the second storage unit are arranged on the same plane, and the sorting unit sequentially transports the drugs removed from the first storage unit on a horizontal plane that is horizontal to the plane, and stores them in each of the multiple sorting containers in the second storage unit.

[0465] In addition, a drug sorting device according to one embodiment of the present invention includes a rotating unit that rotates the imaging unit so that it rotates around a placement area in which the drug to be imaged is placed, and the imaging unit images the drug placed in the placement area from multiple positions to which the rotating unit has rotated, and the rotating unit may rotate the imaging unit so that it rotates around a pivot point defined on a horizontal plane parallel to the plane around one drug placed in the placement area.

[0466] In addition, a drug sorting device according to one embodiment of the present invention may further include a detection area changing unit that gradually changes the detection area for detecting drugs contained in the first storage unit from an area narrower than the bottom surface of the first storage unit to an area wider as the sorting unit removes drugs from the first storage unit.

[0467] In addition, a drug sorting device according to one embodiment of the present invention includes a packaging mechanism that packages the drugs sorted into the second storage section, and the sorting section further transports the drugs sorted into the second storage section to the packaging mechanism, and may further include a detection area change section that, as the sorting section removes drugs from the second storage section, changes the detection area for detecting drugs contained in a sorting container that is arranged in the second storage section and contains the drugs sorted by the sorting section from an area narrower than the bottom surface of the sorting container to a detection area that is gradually wider.

[0468] In addition, a drug sorting device according to one embodiment of the present invention may include a first storage unit that stores multiple types of drugs, a second storage unit that stores the drugs sorted by type, an imaging unit that images the drugs removed from the first storage unit, a discrimination unit that determines the type of drug based on the image captured by the imaging unit, a sorting unit that stores the drugs in the second storage unit by type based on the discrimination result by the discrimination unit, a sorting container that is detachably arranged in the second storage unit and stores the drugs sorted by the sorting unit, and an object detection unit that moves horizontally to detect objects present in the upper space of the sorting container placed in the second storage unit in a specified state.

[0469] In addition, a drug sorting device according to one aspect of the present invention is a drug sorting device that sorts and stores drugs by type in a plurality of sorting containers, and includes a sorting container installation unit in which the plurality of sorting containers are installed, an information acquisition unit that acquires information for determining the type of drug to be sorted, a transport unit that transports the drug about which the information has been acquired by the information acquisition unit to one of the plurality of sorting containers installed in the sorting container installation unit, and a sorting control unit that, if the characteristics of the drug about which the information has been acquired are deemed to be identical to the characteristics of a drug already stored in the sorting container, causes the transport unit to transport the drug about which the information has been acquired to a sorting container that already stores a drug having characteristics deemed to be identical to the characteristics of the drug about which the information has been acquired, and the drugs stored in the sorting containers may be drugs handled in other equipment or devices different from the drug sorting device.

[0470] In addition, in a drug sorting device according to one aspect of the present invention, if the characteristics of the drug about which the information has been acquired are deemed to be non-identical to the characteristics of a drug already stored in the sorting container, the sorting control unit may cause the transporting unit to transport the drug about which the information has been acquired to a sorting container different from the sorting container in which the already stored drug is stored.

[0471] In addition, in a drug sorting device according to one aspect of the present invention, even if the characteristics of the drug for which the information has been acquired are deemed to be identical to the characteristics of the drug already stored in the sorting container, the sorting control unit may cause the transporting unit to transport the drug for which the information has been acquired to a sorting container other than the sorting container in which the already stored drug is stored, when the number of drugs stored in the sorting container reaches the upper limit.

[0472] A medicine sorting device according to one aspect of the present invention is a medicine sorting device that sorts a plurality of types of medicine by type, and includes a first storage unit that stores the plurality of types of medicine, a transport unit that transports the medicine from the first storage unit, an imaging unit that images the medicine, a discrimination unit that discriminates the type of the medicine based on an image captured by the imaging unit, a sorting unit that sorts the medicine by type based on a discrimination result by the discrimination unit, and a second storage unit that stores the medicines sorted by the sorting unit in a state sorted by type, and the plurality of types of medicine are not stored in containers. The drugs are unpackaged or unpackaged drugs that have been prescribed to patients and then returned, and the multiple types of drugs include the drugs themselves that were packaged by multiple packaging machines different from the drug sorting device, and when the type of drug identified by the discrimination unit is compared with drug data indicating the type of drug implemented in each of the multiple packaging machines and the result is that the type of drug identified by the discrimination unit matches the type of drug indicated by the drug data, one of the multiple packaging machines may be determined as the destination for returning the drugs sorted by the sorting unit.

[0473] In addition, a drug sorting system according to one aspect of the present invention may include the drug sorting device and a return assistance device for returning the drugs sorted by the sorting unit to a return destination, which may include a reading unit that reads information indicating the type of drug sorted by the sorting unit and the return destination information from a journal in which information indicating the type of drug sorted by the sorting unit and the return destination information are printed, and a display unit that displays the information indicating the type of drug and the return destination information read by the reading unit.

[0474] A system according to one aspect of the present invention is a system including a medicine sorting device that sorts a plurality of types of medicine by type, and a packaging machine that packages the medicines sorted by the medicine sorting device, wherein the medicine sorting device includes an imaging unit that images the plurality of types of medicine, a sorting unit that sorts the medicines by type based on an image captured by the imaging unit, and a storage unit that stores the medicines sorted by the sorting unit in a state sorted by type, and the storage unit stores the medicines sorted by the sorting unit in a state sorted by type. The drug sorting device can arrange a plurality of sorting containers each containing the same type of drug, and the drug sorting device stores the results of a visual inspection of the drugs contained in the sorting containers in the sorting containers or prints out the results of the visual inspection. The packaging machine is equipped with a cassette that can store the drugs contained in the sorting containers and has a lockable lid, and when it determines that the result that all the drugs contained in the sorting containers brought to the packaging machine are the same type of drug is stored in the sorting container or that the result is printed out, the packaging machine unlocks the lid.

[0475] In addition, one aspect of the present invention provides a system comprising: a medicine sorting device that sorts multiple types of medicine by type; a medicine shelf to which the medicines sorted by the medicine sorting device are returned; and a return assistance device for returning the medicines sorted by the medicine sorting device to the medicine shelf, wherein the medicine sorting device comprises an imaging unit that images the multiple types of medicine; a sorting unit that sorts the medicines by type based on the image captured by the imaging unit; and a storage unit that stores the medicines sorted by the sorting unit in a sorted state by type, and the storage unit is capable of arranging multiple sorting containers that store the medicines sorted by the sorting unit in a sorted state by type, the medicine sorting device prints the results of a visual inspection of the medicines stored in the sorting containers, the medicine shelf has a lockable door, and when the return assistance device determines that the results printed indicate that all of the medicines stored in the sorting containers and to be returned to the medicine shelf are the same type of medicine, the medicine shelf unlocks the door.

[0476] A system according to one aspect of the present invention is a system including a medicine sorting device that sorts a plurality of types of medicine by type, and a packaging machine that packages the medicines sorted by the medicine sorting device, wherein the medicine sorting device includes an imaging unit that images the plurality of types of medicine, a sorting unit that sorts the medicines by type based on an image captured by the imaging unit, and a storage unit that stores the medicines sorted by the sorting unit in a sorted state by type, and the storage unit is capable of arranging a plurality of sorting containers that store the medicines sorted by the sorting unit in a sorted state by type, and the medicine sorting device performs packaging for all of the medicines stored in the sorting containers. The accuracy of matching between the image captured by the imaging unit and the image registered in the drug database is identified, and accuracy information indicating the matching accuracy for all of the identified drugs is stored in the sorting container or the accuracy information is printed.The packaging machine is equipped with a cassette that can contain the drugs contained in the sorting container and is equipped with a lockable lid, and when it determines that the matching accuracy for all of the drugs contained in the sorting container transported to the packaging machine is equal to or greater than a predetermined value based on the accuracy information stored in the sorting container or the printed accuracy information, the packaging machine unlocks the lid.

[0477] A system according to one aspect of the present invention is a system including a medicine sorting device that sorts a plurality of types of medicine by type, a medicine shelf to which the medicines sorted by the medicine sorting device are returned, and a return assisting device that returns the medicines sorted by the medicine sorting device to the medicine shelf, wherein the medicine sorting device includes an imaging unit that images the plurality of types of medicine, a sorting unit that sorts the medicines by type based on an image captured by the imaging unit, and a storage unit that stores the medicines sorted by the sorting unit in a state sorted by type, and the storage unit stores the medicines sorted by the sorting unit in a state sorted by type. The medicine sorting device is capable of arranging a plurality of sorting containers that contain medicines in a sealed state, and the medicine sorting device determines the matching accuracy between the image captured by the imaging unit and the image registered in the medicine database for all medicines contained in the sorting containers, and prints accuracy information indicating the matching accuracy for all of the identified medicines.The medicine shelf is equipped with a lockable door, and when the return assistance device determines based on the printed accuracy information that the matching accuracy for all medicines contained in the sorting containers and to be returned to the medicine shelf is equal to or greater than a predetermined value, the medicine shelf unlocks the door.

[0478] In addition, a drug sorting device according to one embodiment of the present invention comprises a first storage unit that stores multiple types of drugs, a second storage unit that stores the drugs sorted by type, a discrimination unit that discriminates the type of drug removed from the first storage unit, and a sorting unit that stores the drugs in the second storage unit by type based on the discrimination result by the discrimination unit, and the multiple types of drugs are drugs that are not stored in containers or unpackaged, and are drugs that have been prescribed to patients and then returned.

[0479] The medicine sorting device according to one aspect of the present invention further includes a collection tray for accommodating items whose type cannot be identified by the identification unit.

[0480] In addition, in a drug sorting device according to one embodiment of the present invention, the second storage section can accommodate a plurality of sorting containers that store the drugs sorted by the sorting section, sorted by type, and further includes a waiting tray for temporarily placing drugs of a type different from any of the drugs stored in the plurality of sorting containers when all of the plurality of sorting containers are filled with drugs.

[0481] In addition, in a drug sorting device according to one aspect of the present invention, if the discrimination unit is unable to determine the type of drug and estimates that the drug is a tablet or a capsule, the sorting unit temporarily places the drug on the waiting tray.

[0482] In addition, in the medicine sorting device according to one aspect of the present invention, the sorting section sorts the medicines temporarily placed on the waiting tray after the medicines have been removed from the plurality of sorting containers.

[0483] Moreover, the medicine sorting device according to one aspect of the present invention further includes a packaging mechanism that packages the medicines contained in the second container.

[0484] In addition, in a drug sorting device according to one embodiment of the present invention, the second storage unit can accommodate a plurality of sorting containers that store the drugs sorted by the sorting unit, sorted by type, and is further provided with a waiting tray for temporarily storing drugs of a type different from any of the drugs stored in the plurality of sorting containers when drugs are stored in all of the plurality of sorting containers, and the packaging mechanism packages the drugs stored in any of the plurality of sorting containers, and the sorting unit places the drugs temporarily placed on the waiting tray into the sorting container into which the drugs previously stored have been packaged by the packaging mechanism.

[0485] In addition, a medicine sorting device according to one embodiment of the present invention further includes an imaging unit that captures an image of the medicine removed from the first storage section, and the discrimination unit discriminates the type of the medicine based on the image captured by the imaging unit.

[0486] In addition, a drug sorting device according to one aspect of the present invention includes a discrimination unit that discriminates the type of each of multiple types of drugs fed into the drug sorting device, a storage unit that stores the drugs in a state sorted by type, and a sorting unit that stores the drugs in the storage unit by type based on the discrimination result by the discrimination unit, and the sorting unit includes an adsorption mechanism that adsorbs the drugs and a shutter mechanism that prevents the drugs adsorbed by the adsorption mechanism from falling.

[0487] In addition, a drug sorting device according to one aspect of the present invention includes a discrimination unit that discriminates the type of each of multiple types of drugs that are input into the drug sorting device, a storage unit that stores the drugs in a state sorted by type, and a sorting unit that stores the drugs in the storage unit by type based on the discrimination result by the discrimination unit, and the sorting unit moves on a single plane to transport the drugs from the area where they were input to the storage unit.

[0488] In addition, a drug sorting device according to one aspect of the present invention is a drug sorting device that includes a discrimination unit that discriminates the type of each of multiple types of drugs fed into the drug sorting device, a storage unit that has multiple sorting containers that store the drugs sorted by type, a sorting unit that stores the drugs in the storage unit by type based on the discrimination results by the discrimination unit, and a display control unit that displays on a display unit a display image that shows the progress of drug sorting by the sorting unit by switching the display content of the portion corresponding to the sorting container.

[0489] In addition, in a drug sorting device according to one aspect of the present invention, the storage section has the multiple sorting containers arranged in a row from the front to the back of the drug sorting device, and the display control section may display the parts corresponding to the sorting containers on the display section in a manner that corresponds to the arrangement of the multiple sorting containers.

[0490] In addition, a drug sorting device according to one aspect of the present invention may include a sorting control unit that determines the sorting position of the drug based on the discrimination result by the discrimination unit, and may generate the display image based on the sorting position determined by the sorting control unit and data regarding the drug linked to the sorting position, and display the image on the display unit.

[0491] In addition, in a drug sorting device according to one aspect of the present invention, when user input is received in a portion corresponding to the sorting container in which the drug is stored, the display control unit may display all image data of the drug stored in the sorting container on the display unit.

[0492] In addition, in a drug sorting device according to one aspect of the present invention, the display control unit may display, in a portion corresponding to the sorting container in which the drug is stored, the name of the drug stored in the sorting container, the number of the drug, and information indicating whether an image of the drug has been visually inspected.

[0493] In addition, in a drug sorting device according to one embodiment of the present invention, an information recording medium is provided in the sorting container, and data relating to the drugs stored in the sorting container is written to the information recording medium, and the display control unit may display the display image based on the data relating to the drug read from the information recording medium of the sorting container in which the drug is stored each time sorting of one drug is completed.

[0494] In addition, in the medicine sorting device according to one aspect of the present invention, the display control unit may color-code the portion corresponding to the sorting container according to the destination to which the medicine is to be returned.

[0495] In addition, in a drug sorting device according to one aspect of the present invention, the display control unit may switch to the display image and display on the display unit a sorted drug list image showing the drug sorting history by the sorting unit for each type of drug.

[0496] In addition, a control method for a drug sorting device according to one aspect of the present invention is a control method for a drug sorting device, wherein the drug sorting device has a storage unit equipped with a plurality of sorting containers that store a plurality of types of drugs sorted by type when they are input into the drug sorting device, and includes a discrimination step of discriminating the type of each of the plurality of types of drugs, a sorting step of storing the drugs in the storage unit by type based on the discrimination result of the discrimination step, and a display control step of displaying on a display unit a display image showing the progress of drug sorting by the sorting step by switching the display content of the part corresponding to the sorting container.

[0497] Furthermore, a program according to one aspect of the present invention is a program for causing a computer to function as the above-described drug sorting device, and is a program for causing a computer to function as the discrimination unit and the display control unit.

[0498] [Additional Notes] The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of 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 symbols]

[0499] 1. Drug sorting device 11 First storage section 14 Second storage section 12 Conveying and sorting unit (sorting section) 15 Waiting Tray 16 Collection tray 61 Conveyance control unit (detection area change unit) 62 Sorting control unit (detection area change unit) 63 Imaging control unit 64 Discrimination part 65 Image Classification Unit 122 Adsorption / shutter mechanism (adsorption mechanism) 131 First camera (imaging unit) 132 Rotation mechanism (rotating part) 133a Medicine stand 133b Swivel mechanism (movement mechanism) 133c Shaft 134 Illuminator (ultraviolet light irradiation section, visible light irradiation section) 134a 1st irradiation section (visible light irradiation section) 134b Second irradiation section (visible light irradiation section) 134c Ultraviolet light irradiation section 141, 141a-141j Sorting cup (sorting container) 142 Aperture 143 Side wall (exterior wall) 145 Edge 146 Convex 146a Adjacent part Ar1 Receiving area (loading area, sorting waiting area) Ar2 placement area Dr Detection area Jo, Jo1, Jo2 Journals Im1 sorting image Im2 inspection image

Claims

1. A medicine sorting device, a discrimination unit that discriminates the type of each of the plurality of types of medicines input into the medicine sorting device; a sorting unit that sorts the medicines into a plurality of sorting positions according to their types based on the discrimination result by the discrimination unit, the plurality of types of medicines are medicines that have been prescribed to patients and then returned; A drug sorting device in which, when the discrimination unit determines that the type of drug discriminated is the same as the type of drug sorted to one of the multiple sorting positions, the sorting unit sorts the drug whose type has been discriminated by the discrimination unit to the same sorting position as the sorting position to which the discrimination unit has previously sorted the drug whose type has been discriminated.

2. an imaging unit that images a drug to be discriminated by the discrimination unit among the plurality of types of drugs; two medicine placement tables on which the medicines to be imaged by the imaging unit can be placed; a shaft portion having two ends, each end having one of the two medicine mounting bases; The medicine sorting device according to claim 1 , wherein the medicine placing table is moved between an imaging area of ​​the imaging unit and an area other than the imaging area by rotating the shaft portion.

3. The medicine sorting device according to claim 1 , further comprising a packaging mechanism that packages the medicines sorted into the plurality of sorting positions according to type.

4. A method for controlling a medicine sorting device, comprising: a discrimination step of discriminating the type of each of the plurality of types of medicines input into the medicine sorting device; a sorting step of sorting the medicines into a plurality of sorting positions according to their types based on the discrimination result of the discrimination step, the plurality of types of medicines are medicines that have been prescribed to patients and then returned; A control method for a drug sorting device, in which, if it is determined that the type of drug identified in the discrimination step is the same as the type of drug sorted to one of the multiple sorting positions, in the sorting step, the drug whose type has been identified in the discrimination step is sorted to the same sorting position as the sorting position to which the drugs whose types have previously been identified in the discrimination step have been sorted.

Citation Information

Patent Citations

  • Automatically sorting and storing device

    JP1996258917A

  • Divided and packaged medicament inspection system

    JP2013055970A

  • Apparatus and method for classifying returned drug

    JP2013215343A

  • Medicine sorting device, medicine return system, control method of medicine sorting device, and program

    JP2024173994A

  • Drug sorting device

    WO2015170762A1