[go: up one dir, main page]

JP2025092372A - DATA CREATION DEVICE, CONTROL METHOD FOR DATA CREATION DEVICE, DATA CREATION PROGRAM, DRUG SORTION DEVICE, CONTROL METHOD FOR DRUG SORTION DEVICE, AND DRUG SORTION PROGRAM - Google Patents

DATA CREATION DEVICE, CONTROL METHOD FOR DATA CREATION DEVICE, DATA CREATION PROGRAM, DRUG SORTION DEVICE, CONTROL METHOD FOR DRUG SORTION DEVICE, AND DRUG SORTION PROGRAM Download PDF

Info

Publication number
JP2025092372A
JP2025092372A JP2024094619A JP2024094619A JP2025092372A JP 2025092372 A JP2025092372 A JP 2025092372A JP 2024094619 A JP2024094619 A JP 2024094619A JP 2024094619 A JP2024094619 A JP 2024094619A JP 2025092372 A JP2025092372 A JP 2025092372A
Authority
JP
Japan
Prior art keywords
drug
medicine
unit
image
sorting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2024094619A
Other languages
Japanese (ja)
Inventor
知大 ▲すぎ▼本
Tomohiro Sugimoto
直樹 北村
Naoki Kitamura
圭吾 中村
Keigo Nakamura
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuyama Manufacturing Co Ltd
Original Assignee
Yuyama Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuyama Manufacturing Co Ltd filed Critical Yuyama Manufacturing Co Ltd
Publication of JP2025092372A publication Critical patent/JP2025092372A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Medical Preparation Storing Or Oral Administration Devices (AREA)

Abstract

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

Description

本開示は、データ作成装置および薬剤仕分装置等に関する。 This disclosure relates to a data creation device and a drug sorting device, etc.

従来、返品された複数種類の薬剤は、薬剤師または医師の手により種類毎に仕分けられていた。返品される薬剤は、様々な患者に処方される、または処方された調剤後の薬剤である。そのため、1患者単位の処方箋情報に基づいて、調剤機器等に予め薬種単位でまとめられた薬種群(薬剤カセット)から、一服用時期単位毎に、(1種または複数種の)薬剤(錠剤)を取りまとめる(分包する)調剤業務に比べて、複数の患者に処方された薬剤がまとめて返品される薬剤の種類は非常に多い。そのため、返品された薬剤を自動的に仕分けて、再利用することの有用性は高い。なお、一服用時期用に調剤される薬剤は、一般に2~3種類程度であり、多くても10種類程度である。 Conventionally, multiple types of returned medicines were sorted by type by a pharmacist or doctor. The returned medicines are either prescribed to various patients or have been dispensed. Therefore, compared to the dispensing work of assembling (packaging) (one or multiple types) of medicines (tablets) for each dosing period from groups of medicines (medicine cassettes) that have been pre-assembled by type in a dispensing machine or the like based on prescription information for each patient, the types of medicines that are returned together from multiple patients are very large. Therefore, it is highly useful to automatically sort and reuse returned medicines. Note that the number of types of medicines dispensed for one dosing period is generally around 2 to 3, and at most around 10.

なお、仕分け業務にかかる時間、手間、または仕分け間違い(薬剤カセットへの戻し間違い)による誤投与のリスクを避けるため、返品された薬剤を、そのまま廃棄する薬局または病院(正確には院内薬剤部)も存在している。 However, to avoid the time and effort required for sorting, or the risk of mis-administration due to incorrect sorting (putting the wrong medication back into the medication cassette), some pharmacies or hospitals (or more accurately, their in-house pharmacy departments) simply dispose of returned medications.

特許文献1には、薬剤の自動仕分けを実現する薬剤仕分装置が開示されている。特許文献1の薬剤仕分装置は、第1収容部に収容された複数種類の薬剤を1つずつ撮像し、撮像した画像に基づき薬剤の種類を判別し、その判別結果に基づき第2収容部の仕分カップに種類ごとに仕分ける。さらに、薬剤仕分装置は、種類ごとに仕分けた薬剤を、分包機構へ搬送して分包する。 Patent Document 1 discloses a medicine sorting device that realizes automatic sorting of medicines. The medicine sorting device of Patent Document 1 captures images of multiple types of medicine stored in a first storage unit one by one, determines the type of medicine based on the captured image, and sorts the medicines by type into sorting cups in a second storage unit based on the determination result. Furthermore, the medicine sorting device transports the medicines sorted by type to a packaging mechanism for packaging.

国際公開2018/190394号公報International Publication No. 2018/190394

薬剤仕分装置は、撮像画像を、予め薬剤の種類毎に登録している薬剤の画像(マスタデータに含まれるマスタ画像)と照合することにより、第1収容部に収容された薬剤の種類を判別する。予め登録しているマスタ画像は、薬剤仕分装置の出荷前に限らず、薬剤仕分装置が病院または薬局等に設置された後に、薬剤仕分装置において新たに登録される可能性もある。 The medicine sorting device determines the type of medicine contained in the first storage unit by comparing the captured image with images of the medicine that have been registered in advance for each type of medicine (master images included in the master data). The pre-registered master images may be registered not only before the medicine sorting device is shipped, but also after the medicine sorting device is installed in a hospital, pharmacy, etc.

特許文献1には、外部装置からの配信に依らず薬剤仕分装置においてマスタ画像を登録することに関し、目視鑑査を行った後の撮像画像をマスタ画像として登録することについては開示されている。しかし、目視鑑査を行うことなくマスタ画像を登録する手法について開示されていない。また、特許文献1には、予め準備されたマスタ画像を用いずに薬剤を仕分ける手法については開示されていない。 Patent Document 1 discloses that a master image can be registered in a medicine sorting device without relying on distribution from an external device, and that an image captured after visual inspection can be registered as a master image. However, it does not disclose a method for registering a master image without visual inspection. Furthermore, Patent Document 1 does not disclose a method for sorting medicines without using a master image prepared in advance.

本発明の一態様は、マスタデータの簡易な登録を実現することを目的とする。また、本発明の別の一態様は、マスタデータを予め登録することなく、薬剤の仕分処理を行うことを目的とする。 One aspect of the present invention aims to realize simple registration of master data. Another aspect of the present invention aims to perform drug sorting processing without registering master data in advance.

本発明の一態様に係るデータ作成装置は、種類判別の対象薬剤の画像と照合されるマスタ画像を含むマスタデータを作成するデータ作成装置であって、薬剤の識別情報であって、前記薬剤に形成された少なくとも1つのマークにより示される前記識別情報の入力を受付ける受付部と、撮像された前記薬剤の画像において、前記薬剤に形成された1つのマークを含むマーク領域を少なくとも1つ抽出する抽出部と、前記受付部が受付けた識別情報と前記抽出部が抽出したマーク領域とに基づく、前記薬剤の画像を前記マスタ画像として登録する登録操作を受付けた場合に、前記薬剤の画像を前記マスタ画像として前記識別情報に対応付けて、前記マスタデータを作成する作成部と、を備える。 A data creation device according to one aspect of the present invention is a data creation device that creates master data including a master image to be matched with an image of a drug to be type-discriminated, and includes a reception unit that receives input of drug identification information, the identification information being indicated by at least one mark formed on the drug, an extraction unit that extracts at least one mark area including one mark formed on the drug from the captured image of the drug, and a creation unit that, when receiving a registration operation to register the image of the drug as the master image based on the identification information received by the reception unit and the mark area extracted by the extraction unit, creates the master data by associating the image of the drug as the master image with the identification information.

本発明の一態様に係るデータ作成装置の制御方法は、種類判別の対象薬剤の画像と照合されるマスタ画像を含むマスタデータを作成するデータ作成装置の制御方法であって、薬剤の識別情報であって、前記薬剤に形成された少なくとも1つのマークにより示される前記識別情報の入力を受付ける受付ステップと、撮像された前記薬剤の画像において、前記薬剤に形成された1つのマークを含むマーク領域を少なくとも1つ抽出する抽出ステップと、前記受付ステップにおいて受付けた識別情報と前記抽出ステップにおいて抽出されたマーク領域とに基づく、前記薬剤の画像を前記マスタ画像として登録する登録操作を受付けた場合に、前記薬剤の画像を前記マスタ画像として前記識別情報に対応付けて、前記マスタデータを作成する作成ステップと、を含む。 A control method for a data creation device according to one aspect of the present invention is a control method for a data creation device that creates master data including a master image to be matched with an image of a drug to be type-discriminated, and includes a reception step of receiving input of drug identification information, the identification information being indicated by at least one mark formed on the drug, an extraction step of extracting at least one mark area including one mark formed on the drug from the captured image of the drug, and a creation step of, when a registration operation is received to register the image of the drug as the master image based on the identification information received in the reception step and the mark area extracted in the extraction step, creating the master data by associating the image of the drug as the master image with the identification information.

本発明の別の一態様に係る薬剤仕分装置は、複数の仕分容器を備え、種類が未知の薬剤を種類毎に前記仕分容器に仕分ける薬剤仕分装置であって、薬剤から発せられる赤外光を受光する赤外センサと、前記赤外センサが受光した赤外光の、周波数と強度との関係を示す波形データを取得する取得部と、前記取得部が取得した、前記種類が未知の薬剤の前記波形データと、収容先の仕分容器が既に決定している薬剤の前記波形データとに基づき、前記種類が未知の薬剤を収容する仕分容器を決定する決定部と、を備える。 A drug sorting device according to another aspect of the present invention is a drug sorting device that includes a plurality of sorting containers and sorts drugs of unknown type into the sorting containers by type, and includes an infrared sensor that receives infrared light emitted from the drugs, an acquisition unit that acquires waveform data indicating the relationship between the frequency and intensity of the infrared light received by the infrared sensor, and a determination unit that determines a sorting container to hold the drug of unknown type based on the waveform data of the drug of unknown type acquired by the acquisition unit and the waveform data of drugs whose destination sorting containers have already been determined.

本発明の別の一態様に係る薬剤仕分装置の制御方法は、複数の仕分容器を備え、種類が未知の薬剤を種類毎に前記仕分容器に仕分ける薬剤仕分装置の制御方法であって、前記薬剤仕分装置は、薬剤から発せられる赤外光を受光する赤外センサを備え、前記赤外センサが受光した赤外光の、周波数と強度との関係を示す波形データを取得する取得ステップと、前記取得ステップにおいて取得した、前記種類が未知の薬剤の前記波形データと、前記仕分容器に既に仕分けられた薬剤の前記波形データとに基づき、前記種類が未知の薬剤を収容する仕分容器を決定する決定ステップと、を含む。 A control method for a medicine sorting device according to another aspect of the present invention is a control method for a medicine sorting device that includes a plurality of sorting containers and sorts medicines of unknown type into the sorting containers by type, the medicine sorting device including an infrared sensor that receives infrared light emitted from the medicines, and includes an acquisition step of acquiring waveform data showing the relationship between the frequency and intensity of the infrared light received by the infrared sensor, and a determination step of determining a sorting container that will hold the medicine of unknown type based on the waveform data of the medicine of unknown type acquired in the acquisition step and the waveform data of the medicines already sorted into the sorting containers.

本発明の一態様によれば、マスタデータを簡易に登録できる。また、本発明の別の一態様によれば、マスタデータを予め登録することなく、薬剤の仕分処理を行うことができる。 According to one aspect of the present invention, master data can be registered easily. In addition, according to another aspect of the present invention, drug sorting processing can be performed without registering master data in advance.

薬剤仕分システムの構成例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of a medicine sorting system. 薬剤仕分装置の構成例を示す図である。FIG. 1 is a diagram illustrating a configuration example of a medicine sorting device. 撮像ユニットの全体構成を示す斜視図である。FIG. 2 is a perspective view showing the overall configuration of an imaging unit. マスタデータの作成方法の一例を示すフローチャートである。13 is a flowchart illustrating an example of a method for creating master data. マスタデータを作成するために選択された薬剤の画像を表示する表示画像の一例を示す図である。FIG. 13 is a diagram showing an example of a display image displaying an image of a drug selected for creating master data. 選択された薬剤の画像におけるマーク領域の抽出結果を表示する表示画像と、マスタ画像として登録対象となる薬剤の画像を表示する表示画像の一例を示す図である。13A and 13B are diagrams showing an example of a display image displaying the extraction result of a marked area in an image of a selected drug, and an example of a display image displaying an image of a drug to be registered as a master image. 選択された薬剤の画像におけるマーク領域の抽出結果を表示する表示画像の別例を示す図である。FIG. 13 is a diagram showing another example of a display image displaying the extraction result of a marked region in an image of a selected drug. 図7に示すマーク領域の再設定について説明するための表示画像の一例を示す図である。8 is a diagram showing an example of a display image for explaining the resetting of the mark area shown in FIG. 7 . FIG. 選択された薬剤の画像におけるマーク領域の抽出結果を表示する表示画像のさらなる別例と、当該マーク領域の再設定について説明するための表示画像の別例を示す図である。13A and 13B are diagrams showing yet another example of a display image displaying the extraction result of a mark area in an image of a selected drug, and another example of a display image for explaining resetting of the mark area. マスタデータの作成方法の別例を示すフローチャートである。13 is a flowchart showing another example of a method for creating master data. 分包機構の構成例を示す図である。FIG. 4 is a diagram showing a configuration example of a packaging mechanism. 変形例に係る薬剤仕分装置における、台座上の平面図である。FIG. 11 is a plan view of a base in a medicine sorting device according to a modified example. 分包紙の一例を示す模式図である。FIG. 2 is a schematic diagram showing an example of a packaging paper. 仕分カップに収容された薬剤が、分包部分に収容されるときの流れの一例を示す模式図である。10 is a schematic diagram showing an example of the flow of medicines contained in a sorting cup when they are contained in a packaging portion. FIG. 回収トレイの構成例を示す斜視図である。FIG. 4 is a perspective view showing an example of the configuration of a collection tray. 吸着パッドに引っ付いた薬剤を落下させるときの吸着機構の動作例を示す模式図である。13A and 13B are schematic diagrams showing an example of the operation of the suction mechanism when dropping a drug stuck to the suction pad. 仕分画像(仕分画面)の一例を示す図と、メニューの一例を示す図と、仕分履歴画像(仕分履歴画面)の一例を示す図である。1A to 1C are diagrams showing an example of a sorting image (sorting screen), a diagram showing an example of a menu, and a diagram showing an example of a sorting history image (sorting history screen). 薬剤仕分装置の台座における各部材の配置例を示す模式図と、赤外センサの配置例を示す模式図である。1A is a schematic diagram showing an example of the arrangement of each component on a base of a medicine sorting device, and FIG. 1B is a schematic diagram showing an example of the arrangement of an infrared sensor. 薬剤仕分装置の構成例を示すブロック図である。FIG. 2 is a block diagram showing a configuration example of a medicine sorting device. 取得部が取得する波形データの一例を示す図と、画像生成部が生成する特性画像の一例を示す図である。4A and 4B are diagrams showing an example of waveform data acquired by an acquisition unit and an example of a characteristic image generated by an image generation unit; 制御部の処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of a process of a control unit. 波形データを用いて構築した学習済みモデルの出力結果のヒストグラムの一例を示す図である。FIG. 13 is a diagram showing an example of a histogram of the output results of a trained model constructed using waveform data. 特性画像を用いて構築した学習済みモデルの出力結果のヒストグラムの一例を示す図である。FIG. 13 is a diagram showing an example of a histogram of the output results of a trained model constructed using characteristic images. 制御部の処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of a process of a control unit. 赤外センサおよびその周囲を概略的に示す模式図である。FIG. 2 is a schematic diagram illustrating an infrared sensor and its surroundings.

〔前提となる構成〕
図1は、薬剤仕分システム100の構成例を示すブロック図である。図1に示すように、薬剤仕分システム100は、例えば、薬剤仕分装置1およびデータ作成装置20を含む。まず、本発明の各実施形態の説明に先駆けて、前提となる構成として薬剤仕分装置1の構成について説明する。
[Prerequisite configuration]
Fig. 1 is a block diagram showing a configuration example of a medicine sorting system 100. As shown in Fig. 1, the medicine sorting system 100 includes, for example, a medicine sorting device 1 and a data creation device 20. First, prior to describing each embodiment of the present invention, the configuration of the medicine sorting device 1 will be described as a prerequisite configuration.

(薬剤仕分装置1の概要)
図2は、薬剤仕分装置1の構成例を示す図である。図2において、符号201は薬剤仕分装置1の斜視図であり、符号202は、薬剤仕分領域2の基本構成を示す斜視図である。まず、薬剤仕分装置1の概要について図1および図2を用いて説明する。図1、並びに、図2の符号201および符号202に示すように、薬剤仕分装置1は、薬剤仕分領域2、タッチパネル3、および分包機構6(分包部)を備える。
(Overview of medicine sorting device 1)
Fig. 2 is a diagram showing an example of the configuration of the medicine sorting device 1. In Fig. 2, reference numeral 201 is a perspective view of the medicine sorting device 1, and reference numeral 202 is a perspective view showing the basic configuration of the medicine sorting area 2. First, an overview of the medicine sorting device 1 will be described with reference to Figs. 1 and 2. As shown in Fig. 1 and reference numerals 201 and 202 in Fig. 2, the medicine sorting device 1 includes a medicine sorting area 2, a touch panel 3, and a packaging mechanism 6 (packaging unit).

薬剤仕分装置1は、複数種類の薬剤のそれぞれについて撮像し、撮像の結果得られた画像に基づき薬剤の種類を判別し、種類毎に薬剤を仕分ける。具体的には、薬剤仕分領域2においてこの処理が行われる。薬剤仕分領域2(薬剤仕分装置1の内部構成)については後述する。 The medicine sorting device 1 captures images of each of the multiple types of medicine, determines the type of medicine based on the images obtained as a result of the 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.

本実施形態では、複数種類の薬剤は、容器等に収容されていない薬剤、または包装等が施されていない薬剤であり、その一例として、錠剤またはカプセルであるものとして説明する。また、複数種類の薬剤が返品された薬剤であるものとして説明する。薬剤の返品としては、薬局または病院における採用薬が当該薬局または病院にて「返品薬」として返品される場合と、当該薬局または病院において、当該採用薬以外に、他の薬局または病院で発行された薬剤も含み得る「持参薬」が返品される場合とが含まれる。換言すれば、返品される薬剤という概念には、上記「返品薬」および「持参薬」の少なくともいずれかが含まれる。薬剤仕分装置1は、薬剤が返品された後、撮像から仕分までの処理を自動的に行うことが可能である。 In this embodiment, the multiple types of medicines are medicines that are not contained in a container or the like, or medicines that are not packaged, and an example of such medicines will be described as tablets or capsules. The multiple types of medicines will also be described as returned medicines. Examples of returned medicines include a case where a medicine adopted by a pharmacy or hospital is returned to the pharmacy or hospital as a "returned medicine" and a case where a "brought-in medicine" that may include medicines issued by other pharmacies or hospitals in addition to the adopted medicine is returned to the pharmacy or hospital. In other words, the concept of returned medicines includes at least one of the above "returned medicines" and "brought-in medicines." After the medicine is returned, the medicine sorting device 1 can automatically perform processes from imaging to sorting.

タッチパネル3は、操作部31にて各種ユーザ入力を受け付けるとともに、表示部32にて各種画像(例:薬剤仕分の推移を示す画像)を表示する。 The touch panel 3 accepts various user inputs through the operation unit 31 and displays various images (e.g., images showing the progress of drug sorting) on the display unit 32.

分包機構6は仕分けられた薬剤を分包する。薬剤仕分装置1は、分包機構6を備えることで、上記仕分から分包までの処理を自動で行うことができる。分包機構6としては、従来から用いられている錠剤分包機または散薬分包機の分包部を採用することが可能である。この場合、例えば、同一薬種毎に仕分けられた薬剤を、一包または複数包に分包することができる。 The packaging mechanism 6 packages the sorted medicines. By including the packaging mechanism 6, the medicine sorting device 1 can automatically carry out the processes from sorting to packaging. As the packaging mechanism 6, it is possible to adopt the packaging section of a conventional tablet packaging machine or powder packaging machine. In this case, for example, medicines sorted by the same drug type can be packaged into one packet or multiple packets.

(薬剤仕分領域2の基本構成)
次に、図1および図2の符号202を用いて、薬剤仕分領域2の基本構成(薬剤仕分装置1の内部構成)について説明する。
(Basic configuration of drug sorting area 2)
Next, the basic configuration of the medicine sorting area 2 (the internal configuration of the medicine sorting device 1) will be described with reference to reference numeral 202 in FIGS.

図1および図2の符号202に示すように、薬剤仕分領域2は、ハードウェアとして主に、第1収容部11、搬送・仕分ユニット12(搬送部)、撮像ユニット13、第2収容部14(収容部)、待機トレイ15(仮収容部)、回収トレイ16、薬剤投入口17、および第1払出機構4を備える。そして、搬送・仕分ユニット12を除く各部材は台座19に設けられている。 As shown by reference numeral 202 in Figures 1 and 2, the drug sorting area 2 mainly comprises, as hardware, a first storage section 11, a transport/sorting unit 12 (transport section), an imaging unit 13, a second storage section 14 (storage section), a waiting tray 15 (temporary storage section), a collection tray 16, a drug insertion port 17, and a first dispensing mechanism 4. Each component except for the transport/sorting unit 12 is mounted on a base 19.

第1収容部11は、ユーザによって返品された複数種類の薬剤を混在した状態で収容する。本実施例では、第1収容部11は、複数の収容部に分割されている。この場合、例えば、1つの収容部に収容された薬剤の全てが搬送・仕分ユニット12によって搬送されると、当該収容部に隣接する収容部に収容された薬剤が搬送対象となる。また、第1収容部11がZ軸(円柱形状の中心)に対して回動可能に設けられてもよい。この場合、コンピュータ60の制御部60aは、例えば1つの収容部が空になったタイミングで、搬送・仕分ユニット12が薬剤を取得しやすいように第1収容部11を回動させてもよい。 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 the storage unit adjacent to that storage unit become the target for transport. The first storage unit 11 may also be provided so as to be rotatable about the Z axis (the center of the cylindrical shape). In this case, the control unit 60a of the computer 60 may rotate the first storage unit 11, for example, when one storage unit becomes empty, so that the transport/sorting unit 12 can easily obtain the medicines.

第2収容部14には、薬剤を種類毎に仕分けられた状態で収容する複数の仕分カップ141(仕分容器)を複数配置可能である。制御部60aは、撮像ユニット13で撮像された薬剤の画像に基づき薬剤の種類を判別し、その判別結果に基づき当該薬剤を格納する仕分カップ141を決定する。当該薬剤は、その決定された仕分カップ141に搬送・仕分ユニット12により搬送され、格納される。 The second storage section 14 can accommodate a number of sorting cups 141 (sorting containers) that store medicines sorted by type. The control section 60a 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 transport/sorting unit 12 and stored therein.

待機トレイ15は、薬剤が仮置きされる収容部である。例えば、仕分カップ141の全てに薬剤が格納されている場合に、制御部60aによりそれら以外の種類であると判別された薬剤が、待機トレイ15に仮置きされる。この場合、仕分カップ141から薬剤が取り除かれた後、待機トレイ15から当該仕分カップ141に搬送されてもよい。 The waiting tray 15 is a storage unit where medicines are temporarily placed. For example, when all of the sorting cups 141 are filled with medicines, medicines that are determined by the control unit 60a to be of a type other than those are temporarily placed on the waiting tray 15. In this case, after the medicines are removed from the sorting cups 141, they may be transported from the waiting tray 15 to the sorting cups 141.

また、待機トレイ15に仮置きされた薬剤が仕分カップ141に搬送される過程において、仕分カップ141の全てに薬剤が格納されている場合に、制御部60aによりそれら以外の種類であると判別された薬剤は、第1収容部11に仮置きされてもよい。すなわち、第1収容部11は、最初に第1収容部11から仕分カップ141または待機トレイ15への薬剤の搬送が終了した後は、第2の待機トレイとして使用されてもよい。以降、制御部60aは、仕分カップ141の全てに薬剤が格納されている場合に、制御部60aによりそれら以外の種類であると判別された薬剤は、待機トレイ15および第1収容部11に交互に仮置きされる。これにより、既に判別された薬剤とまだ判別されていない薬剤とを別の場所に配置することにより、それらが混同する可能性を低減できる。ただし、薬剤仕分装置1は、待機トレイ15および第1収容部11のいずれとも別の、第2の待機トレイをさらに備えていてもよい。この場合には、第1収容部11は第2の待機トレイとしては用いられない。 In addition, in the process of transporting the medicines temporarily placed in the waiting tray 15 to the sorting cup 141, if the medicines are stored in all of the sorting cups 141, the medicines determined by the control unit 60a to be of a type other than those may be temporarily placed in the first storage unit 11. That is, the first storage unit 11 may be used as a second waiting tray after the first transport of the medicines from the first storage unit 11 to the sorting cup 141 or the waiting tray 15 is completed. Thereafter, if the medicines are stored in all of the sorting cups 141, the control unit 60a temporarily places the medicines determined by the control unit 60a to be of a type other than those in the waiting tray 15 and the first storage unit 11 alternately. In this way, by arranging the medicines that have already been identified and the medicines that have not yet been identified in different locations, the possibility of them being mixed up can be reduced. However, the medicine sorting device 1 may further include a second waiting tray separate from both the waiting tray 15 and the first storage unit 11. In this case, the first storage unit 11 is not used as the second waiting tray.

また、本実施形態では、待機トレイ15には、薬剤であると推定された推定薬剤(後述)が仮置きされても構わない。推定薬剤が待機トレイ15に仮置きされた場合、推定薬剤は、制御部60aの判別結果に応じて、第2収容部14の所定領域に搬送されてもよい。 In addition, in this embodiment, a suspected drug (described later) that is suspected to be a drug may be temporarily placed on the waiting tray 15. When a suspected drug is temporarily placed on the waiting tray 15, the suspected drug may be transported to a specified area of the second storage unit 14 according to the determination result of the control unit 60a.

回収トレイ16は、制御部60aにより種類が判別できなかった物(例:薬剤以外の異物)を格納する収容部である。薬剤以外の異物としては、例えば、PTP(Press Through Pack)シートの破片が挙げられる。PTPシートの破片は、薬剤の返品時に第1収容部11に混入する可能性がある。また、制御部60aは、薬剤データベースに廃棄する薬剤として登録されている薬剤、またはユーザが廃棄することを所望する薬剤(例:製造日の古い薬剤)についても、回収トレイ16に格納する。 The collection tray 16 is a storage unit that stores items whose type cannot be determined by the control unit 60a (e.g., foreign objects other than medicine). Examples of foreign objects other than medicine include pieces of PTP (press through pack) sheets. PTP sheet pieces may become mixed into the first storage unit 11 when medicine is returned. The control unit 60a also stores in the collection tray 16 medicines that are registered in the medicine database as medicines to be discarded or medicines that the user wishes to discard (e.g., medicines with old manufacturing dates).

薬剤投入口17は、第2収容部14に格納された薬剤を、分包機構6へ払い出すためのものである。薬剤仕分装置1においては、第1払出機構4または搬送・仕分ユニット12が、第2収容部14に格納された薬剤を、薬剤投入口17に投入することで分包機構6へ払い出す。 The medicine input port 17 is for dispensing medicine stored in the second storage section 14 to the packaging mechanism 6. In the medicine sorting device 1, the first dispensing mechanism 4 or the transport/sorting unit 12 dispenses medicine stored in the second storage section 14 to the packaging mechanism 6 by inputting the medicine into the medicine input port 17.

また、図1に示すように、薬剤仕分装置1は、上記各部材(ハードウェア)を統括して制御するコンピュータ60を備える。コンピュータ60は、制御部60a(ソフトウェア)として主に、搬送制御部61、仕分制御部62、撮像制御部63、判別部64、操作入力部65、表示制御部66、取出制御部67a、傾斜制御部67b、および分包制御部68を備える。 As shown in FIG. 1, the medicine sorting device 1 also includes a computer 60 that controls the above-mentioned components (hardware). The computer 60 mainly includes a transport control unit 61, a sorting control unit 62, an imaging control unit 63, a discrimination unit 64, an operation input unit 65, a display control unit 66, a removal control unit 67a, a tilt control unit 67b, and a packaging control unit 68 as a control unit 60a (software).

操作入力部65および表示制御部66は、それぞれタッチパネル3の操作部31および表示部32を制御する。分包制御部68は、分包機構6を制御して、薬剤投入口17から投入された薬剤を分包する。 The operation input unit 65 and the display control unit 66 respectively control the operation unit 31 and the display unit 32 of the touch panel 3. The packaging control unit 68 controls the packaging mechanism 6 to package the medicine inserted through the medicine insertion port 17.

以下の説明では、ソフトウェアの制御に基づくハードウェアの動作について、動作主体がハードウェアであるものとして説明する場合がある。 In the following explanation, the operation of hardware based on software control may be described as if the operating entity is the hardware.

また、コンピュータ60は記憶部80を備える。記憶部80は、複数種類の薬剤に関する薬剤データを管理する薬剤データベース(薬剤マスタ)、および、第1カメラ131が撮像した画像を示す画像データ等を記憶する。なお、記憶部80に記憶された各種データは、記憶部80にて管理されていなくてもよく、例えば外部装置で管理されてもよい。この場合、制御部60aは、上記各種データを、必要に応じて、インターネット等の通信回線を通じて当該外部装置から取得してもよい。また、薬剤データベースは、新たな薬剤データが追加されることにより、更新されてもよい。 The computer 60 also includes a storage unit 80. The storage unit 80 stores a drug database (drug master) that manages drug data related to multiple types of drugs, image data showing images captured by the first camera 131, and the like. Note that the various data stored in the storage unit 80 do not have to be managed by the storage unit 80, and may be managed, for example, by an external device. In this case, the control unit 60a may obtain the various data from the external device via a communication line such as the Internet, as necessary. The drug database may also be updated by adding new drug data.

〔薬剤仕分装置1における処理の概要〕
薬剤仕分装置1では、搬送・仕分ユニット12が、第1収容部11に返品された各薬剤を撮像ユニット13まで搬送する。搬送された各薬剤を順次撮像ユニット13が撮像する。制御部60aは、撮像された画像に基づき各薬剤の種類を判別するとともに、判別した各薬剤の第2収容部14における仕分位置を決定する。搬送・仕分ユニット12は、決定された仕分位置に各薬剤を搬送する。そして、第2収容部14に格納された薬剤についての情報は、仕分カップ141のRFIDタグに書き込まれたり、記憶部80に記憶されたり、タッチパネル3に表示されたりする。また、薬剤の仕分が完了した後、または仕分の途中において、ユーザがタッチパネル3を操作することで、分包等の処理が行われる。以降、各処理について具体的に説明する。
[Overview of Processing in Medicine Dispensing Device 1]
In the medicine sorting device 1, the transporting/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. The control unit 60a determines the type of each medicine based on the captured images, and determines the sorting position of each identified medicine in the second storage section 14. The transporting/sorting unit 12 transports each medicine to the determined sorting position. Then, information about the medicine stored in the second storage section 14 is written to the RFID tag of the sorting cup 141, stored in the storage 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 processing such as packaging. Each processing will be described in detail below.

〔撮像ユニット13への薬剤搬送処理〕
まず、第1収容部11から撮像ユニット13への薬剤搬送処理について、図1および図2の符号201を用いて説明する。
[Drug Delivery Process to Imaging Unit 13]
First, the process of transporting medicine from the first container 11 to the imaging unit 13 will be described with reference to reference numeral 201 in FIGS.

具体的には、搬送・仕分ユニット12は、第1収容部11に収容された薬剤を、撮像ユニット13が薬剤を受け入れる受入領域Ar1(図3の符号302参照)まで搬送させる。搬送制御部61は、搬送・仕分ユニット12による当該搬送処理を制御する。 Specifically, the transport/sorting unit 12 transports the medicine stored in the first storage section 11 to the receiving area Ar1 (see reference numeral 302 in FIG. 3) where the imaging unit 13 receives the medicine. The transport control section 61 controls the transport process performed by the transport/sorting unit 12.

搬送・仕分ユニット12は、第2カメラ121、吸着・シャッター機構122、および搬送機構123を備える。また、搬送・仕分ユニット12は、容器取出機構124をさらに備える。 The transport and sorting unit 12 includes a second camera 121, a suction and shutter mechanism 122, and a transport mechanism 123. The transport and sorting unit 12 further includes a container removal mechanism 124.

第2カメラ121は、搬送対象とする薬剤を特定するために、第1収容部11を逐次撮像する。撮像制御部63は、第2カメラ121の撮像処理を制御する。第2カメラ121は、搬送・仕分ユニット12の(具体的には、少なくとも吸着・シャッター機構122を含む筐体の)、台座19と対向する側の端部に設けられる。第2カメラ121は、吸着機構の先端部に設けられてもよい。撮像制御部63は、撮像された画像を解析して、当該画像に薬剤が含まれるか否かを判定する。搬送制御部61は、薬剤が含まれると判定された場合には、例えば、上記先端部を第1収容部11に近づけ、そのとき撮像された画像に含まれる薬剤を搬送対象の薬剤として特定する。 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) facing the base 19. The second camera 121 may be provided at the tip of the suction mechanism. The imaging control unit 63 analyzes the captured image and determines whether 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 included in the image captured at that time as the medicine to be transported.

吸着・シャッター機構122は、搬送対象として特定された薬剤を吸着する吸着機構と、吸着機構が吸着した薬剤が落下することを防止するシャッター機構とを含む。吸着機構はZ軸方向に移動可能に設けられる。シャッター機構は上記端部の前方に、XY平面と略平行に移動可能に設けられる。 The suction/shutter mechanism 122 includes an suction mechanism that suctions the medicine identified as the object to be transported, 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 approximately parallel to the XY plane.

吸着機構は、薬剤取得時に、上記端部から延伸して、その先端部において、特定された薬剤を吸着した後、上記端部の位置まで戻る。この状態において、搬送制御部61は、上記端部と対向する位置にシャッター機構を移動させ、薬剤搬送中、シャッター機構の位置を維持する(閉状態とする)。搬送制御部61は、受入領域Ar1に配置された薬剤保持機構133の薬剤載置台133a(図3の符号302参照)と対向する位置まで吸着・シャッター機構122を移動させると、シャッター機構を上記端部と対向しない位置に移動させる(開状態とする)。そして、吸着機構を上記端部から延伸させた後、吸着状態を解除することにより、薬剤載置台133aに薬剤を載置する。 When acquiring a drug, the suction mechanism extends from the end, adsorbs the identified drug at its tip, and then returns to the position of the end. In this state, the transport control unit 61 moves the shutter mechanism to a position opposite the end, and maintains the position of the shutter mechanism during drug transport (closed state). When the transport control unit 61 moves the suction/shutter mechanism 122 to a position opposite the drug placement stage 133a (see reference numeral 302 in FIG. 3) of the drug holding mechanism 133 arranged in the receiving area Ar1, it moves the shutter mechanism to a position not opposite the end (open state). Then, after the suction mechanism extends from the end, the suction state is released, and the drug is placed on the drug placement stage 133a.

搬送機構123は、搬送制御部61の制御を受けて、X軸およびY軸方向に吸着・シャッター機構122を移動させる。この搬送機構123により、第1収容部11上での搬送対象となる薬剤の探索時の吸着・シャッター機構122の動き、または第1収容部11から薬剤載置台133aまでの薬剤搬送が可能となる。また、薬剤載置台133aから、第2収容部14、待機トレイ15または回収トレイ16への薬剤搬送が可能となる。さらに、第2収容部14から薬剤投入口17への薬剤搬送が可能となる。 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 the drug to be transported on the first storage unit 11, or transport of the drug from the first storage unit 11 to the drug placement table 133a. It also enables transport of the drug from the drug placement table 133a to the second storage unit 14, the waiting tray 15, or the collection tray 16. It also enables transport of the drug from the second storage unit 14 to the drug insertion port 17.

〔薬剤撮像処理〕
次に、撮像ユニット13による薬剤撮像処理について、図1、図2の符号202、および図3を用いて説明する。図3の符号301および符号302は、撮像ユニット13の全体構成を示す斜視図である。上記薬剤撮像処理は、主として、撮像ユニット13および撮像制御部63により行われる。
[Drug Imaging Processing]
Next, the medicine imaging process by the imaging unit 13 will be described with reference to Fig. 1, reference numeral 202 in Fig. 2, and Fig. 3. Reference numerals 301 and 302 in Fig. 3 are perspective views showing the overall configuration of the imaging unit 13. The medicine imaging process is mainly performed by the imaging unit 13 and the imaging control unit 63.

具体的には、撮像ユニット13は、薬剤載置台133aに載置され、図3の符号302に示す撮像対象となる薬剤を配置する配置領域Ar2(撮像領域)に配置された薬剤を撮像する。撮像制御部63は、撮像ユニット13による当該撮像処理と、第1カメラ131および照明器134の旋回移動と、薬剤保持機構133の移動とを制御する。撮像ユニット13は、図1および図3に示すように、第1カメラ131(撮像部、第1撮像部)、回転機構132(回動部)、薬剤保持機構133(薬剤載置台、移動機構)、および照明器134(紫外光照射部、可視光照射部)を備える。 Specifically, the imaging unit 13 is placed on the drug placement table 133a and captures an image of the drug placed in placement area Ar2 (imaging area) in which the drug to be imaged is placed, as shown by reference numeral 302 in FIG. 3. 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 drug holding mechanism 133. As shown in FIG. 1 and FIG. 3, the imaging unit 13 includes the first camera 131 (imaging section, first imaging section), the rotation mechanism 132 (rotating section), the drug holding mechanism 133 (drug placement table, moving mechanism), and the illuminator 134 (ultraviolet light irradiation section, visible light irradiation section).

第1カメラ131は、後述の判別部64において薬剤の種類を判別するために、第1カメラ131と対向する配置領域Ar2に配置された薬剤を撮像する。薬剤保持機構133は、薬剤を保持する機構であり、図3の符号301および符号302に示すように、薬剤載置台(シャーレ)133aと、旋回機構133b(移動機構)と、薬剤載置台133aおよび旋回機構133bを接続する軸部133cとを備える。薬剤載置台133aは、撮像対象となる薬剤を載置するものである。旋回機構133bは、薬剤載置台133aを移動させるものであり、具体的には、薬剤載置台133aをXY平面に対して旋回させるとともに、軸部133cを、軸部133cの周方向に旋回させる。 The first camera 131 captures an image of a drug placed in the placement area Ar2 facing the first camera 131 in order to identify the type of drug in the discrimination unit 64 described below. The drug holding mechanism 133 is a mechanism for holding a drug, and includes a drug placement table (petri dish) 133a, a rotation mechanism 133b (movement mechanism), and an axis portion 133c that connects the drug placement table 133a and the rotation mechanism 133b, as shown by reference numerals 301 and 302 in FIG. 3. The drug placement table 133a is for placing a drug to be imaged. The rotation mechanism 133b moves the drug placement table 133a, and more specifically, rotates the drug placement table 133a relative to the XY plane and rotates the axis portion 133c in the circumferential direction of the axis portion 133c.

撮像制御部63は、薬剤載置台133aに第1収容部11から搬送された薬剤が載置されると、旋回機構133bを駆動し、当該薬剤載置台133aを受入領域Ar1から配置領域Ar2へと移動させる。その後、少なくとも第1カメラ131および照明器134を制御して、配置領域Ar2に配置された薬剤を撮像する。撮像した画像は記憶部80に画像データとして記憶される。撮像制御部63は、例えば撮像が完了した後に、旋回機構133bを駆動し、撮像された薬剤が載置された薬剤載置台133aを配置領域Ar2から受入領域Ar1へと移動させる。 When the drug transported from the first container 11 is placed on the drug placement platform 133a, the imaging control unit 63 drives the swivel mechanism 133b to move the drug placement platform 133a from the receiving area Ar1 to the placement area Ar2. Then, the imaging control unit 63 controls at least the first camera 131 and the illuminator 134 to capture an image of the drug placed in the placement area Ar2. The captured image is stored as image data in the memory unit 80. For example, after the imaging is completed, the imaging control unit 63 drives the swivel mechanism 133b to move the drug placement platform 133a on which the imaged drug is placed from the placement area Ar2 to the receiving area Ar1.

本実施形態では、薬剤載置台133aは軸部133cの先端部(端部)に2つ設けられている。旋回機構133bは、軸部133cを旋回させることにより、一方の薬剤載置台133aを配置領域Ar2に配置したとき、他方の薬剤載置台133aを受入領域Ar1に配置する。配置領域Ar2での薬剤撮像時に、搬送・仕分ユニット12により、受入領域Ar1に存在する薬剤載置台133aに、第1収容部11から薬剤を搬送しておくことで、連続的な薬剤の撮像処理が可能となる。なお、当該薬剤載置台133aは、第2収容部14への薬剤仕分処理後等、薬剤が載置されていない状態であることが前提である。 In this embodiment, two medicine mounting tables 133a are provided at the tip (end) of the shaft 133c. The rotating mechanism 133b rotates the shaft 133c, so that when one medicine mounting table 133a is placed in the placement area Ar2, the other medicine mounting 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 storage unit 11 to the medicine mounting table 133a present in the receiving area Ar1, enabling continuous imaging of medicines. Note that it is assumed that no medicines are placed on the medicine mounting table 133a after the medicine sorting process to the second storage unit 14, etc.

照明器134は、撮像制御部63の制御により、薬剤の撮像時に、薬剤に照射される光を出射する。照明器134は、図3の符号301に示すように、薬剤に可視光を照射する可視光照射部(第1照射部134aおよび第2照射部134b)と、薬剤に紫外光を照射する紫外光照射部134cとを備える。 The illuminator 134 emits light that is irradiated onto the drug when the drug is imaged under the control of the imaging control unit 63. As shown by reference numeral 301 in FIG. 3, the illuminator 134 includes a visible light irradiator (first irradiator 134a and second irradiator 134b) that irradiates the drug with visible light, and an ultraviolet light irradiator 134c that irradiates the drug with ultraviolet light.

第1照射部134aおよび第2照射部134bは、可視光として白色光を薬剤に照射する。第1照射部134aはバー形状の可視光源(バー照明)であり、第2照射部134bはリング形状の可視光源(リング照明)である。第1カメラ131は、第1照射部134aまたは第2照射部134bから出射され、薬剤で反射した可視光を受光することにより、可視光に基づく画像(可視光画像)を取得する。撮像制御部63は、第1カメラ131が取得した可視光画像を示す画像データを、判別部64に出力する。 The first irradiation unit 134a and the second irradiation unit 134b irradiate the drug with white light as visible light. The first irradiation unit 134a is a bar-shaped visible light source (bar illumination), and the second irradiation unit 134b is a ring-shaped visible light source (ring illumination). The first camera 131 receives the visible light emitted from the first irradiation unit 134a or the second irradiation unit 134b and reflected by the drug, thereby acquiring an image based on the visible light (visible light image). The imaging control unit 63 outputs image data indicating the visible light image acquired by the first camera 131 to the discrimination unit 64.

紫外光照射部134cは、薬剤に紫外光(例:365nm以上410nm以下のピーク波長を有する光)を照射することで、薬剤に含まれる成分を励起させる。これにより、薬剤から蛍光(例:410nm以上800nm以下のピーク波長を有する光)が取り出される。第1カメラ131は、薬剤から発せられた蛍光を受光することにより、紫外光に基づく画像(紫外光画像)を取得する。撮像制御部63は、第1カメラ131が取得した紫外光画像を示す画像データを、判別部64に出力する。 The ultraviolet light irradiation 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) to excite 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. The first camera 131 receives the fluorescence emitted from the drug and obtains an image based on the ultraviolet light (ultraviolet light image). The imaging control unit 63 outputs image data indicating the ultraviolet light image obtained by the first camera 131 to the discrimination unit 64.

回転機構132は、図3に示すように、撮像対象となる薬剤が配置される配置領域Ar2(当該位置に配置された薬剤載置台133a)の周囲を旋回するように第1カメラ131を回動させる。第1カメラ131は、回転機構132が回動させた複数の位置から、配置領域Ar2に配置された薬剤を撮像する。具体的には、第1カメラ131および照明器134を含む撮像機構を、配置領域Ar2の周囲を旋回するように回動させる。そのため、配置領域Ar2に対する第1カメラ131および照明器134の位置関係を維持したまま、第1カメラ131が複数の方向から薬剤を撮像できる。 As shown in FIG. 3, the rotation mechanism 132 rotates the first camera 131 so as to revolve around the placement area Ar2 (the drug placement table 133a placed at that position) where the drug to be imaged is placed. The first camera 131 images the drug placed in the placement 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 placement area Ar2. Therefore, the first camera 131 can image the drug from multiple directions while maintaining the positional relationship of the first camera 131 and the illuminator 134 with respect to the placement area Ar2.

回転機構132は、図3の符号301に示すように、撮像機構駆動部132aと動力伝達機構132bとを含む。撮像機構駆動部132aは、撮像機構を配置領域Ar2の周囲を旋回させるための動力を発生する。動力伝達機構132bは、撮像機構駆動部132aが発生させた動力を撮像機構へと伝達する。撮像機構駆動部132aは、撮像制御部63の制御により駆動し、配置領域Ar2の周囲における撮像機構の位置を変更する。 As shown by reference numeral 301 in FIG. 3, the rotation mechanism 132 includes an imaging mechanism drive unit 132a and a power transmission mechanism 132b. The imaging mechanism drive unit 132a generates power for rotating the imaging mechanism around the arrangement area Ar2. The power transmission mechanism 132b transmits the power generated by the imaging mechanism drive unit 132a to the imaging mechanism. The imaging mechanism drive unit 132a is driven under the control of the imaging control unit 63 to change the position of the imaging mechanism around the arrangement area Ar2.

回転機構132は、撮像機構を、初期位置と、初期位置と対向する位置との間において旋回させる。初期位置とは、配置領域Ar2に対して略垂直方向の位置であって、配置領域Ar2の上方の位置である。初期位置と対向する位置とは、配置領域Ar2に対して略垂直方向の位置であって、配置領域Ar2の下方の位置である。 The rotation mechanism 132 rotates the imaging mechanism between an initial position and a position opposite to the initial position. The initial position is a position that is approximately perpendicular to the placement area Ar2 and above the placement area Ar2. The position opposite to the initial position is a position that is approximately perpendicular to the placement area Ar2 and below the placement area Ar2.

〔画像処理・判別処理〕
次に、撮像ユニット13により撮像された画像に対する画像処理と、画像処理の結果に基づく薬剤の判別処理について、図1を用いて説明する。上記画像処理は、主として撮像制御部63により行われ、上記判別処理は、主として判別部64により行われる。
[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.

判別部64は、第1カメラ131により撮像された薬剤の画像に基づき、薬剤の種類を判別する。具体的には、判別部64は、第1照射部134aまたは第2照射部134bから可視光が照射された状態で撮像された薬剤の撮像結果(可視光画像)に基づき、薬剤の種類を判別する。また、判別部64は、紫外光が照射された状態で撮像された薬剤の撮像結果(紫外光画像)に基づき、薬剤の種類を判別する。 The discrimination unit 64 discriminates the type of drug based on the image of the drug captured by the first camera 131. Specifically, the discrimination unit 64 discriminates the type of drug based on the imaging result (visible light image) of the drug captured in a state where visible light is irradiated from the first irradiation unit 134a or the second irradiation unit 134b. 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.

判別部64は、可視光画像および/または紫外光画像のそれぞれにおいて画像解析を実行することにより、当該画像に含まれる薬剤の特徴を抽出する。薬剤の特徴としては、例えば、大きさ、形状、刻印、プリント、割線、代表色(刻印またはプリントが付された領域の色)が挙げられる。OCR(Optical Character Recognition)等を行った場合には、薬剤の特徴として、刻印またはプリントにより表された薬剤名または製造元を示す識別情報(薬剤を識別する識別情報)、使用期限等のその他の情報が抽出される。また、紫外光画像の場合には、薬剤の特徴として、画像中の薬剤における代表色が挙げられる。判別部64は、抽出した各薬剤の特徴を、薬剤の画像データに紐づけて記憶部80に記憶する。なお、薬剤の特徴抽出は、公知の技術により行われてもよい。 The discrimination unit 64 extracts the characteristics of the drug contained in the visible light image and/or the ultraviolet light image by performing image analysis on each of the images. Examples of the characteristics of the drug include size, shape, marking, print, dividing line, and representative color (color of the area with the marking or print). When OCR (Optical Character Recognition) or the like is performed, other information such as the drug name or identification information indicating the manufacturer (identification information for identifying the drug) represented by the marking or print, and expiration date are extracted as the characteristics of the drug. In the case of the ultraviolet light image, the representative color of the drug in the image is also extracted as the characteristics of the drug. The discrimination unit 64 links the extracted characteristics of each drug to the image data of the drug and stores them in the storage unit 80. The extraction of the characteristics of the drug may be performed by a known technique.

判別部64は、各薬剤の特徴を薬剤データベースと照合することにより薬剤の種類を判別する。判別部64は、抽出した薬剤の特徴に基づいて、パターンマッチング等を用いて、薬剤データベースの中から、撮像された薬剤に関する薬剤データの候補を絞込む。この場合、例えば、上述した大きさ、形状、刻印、プリント、割線、および代表色の少なくとも1つを用いて薬剤データの候補を絞込む。その後、判別部64は、OCR等を行い、刻印またはプリントに表された識別情報等を読取り、パターンマッチング等を用いて上記候補の中から薬剤の種類をさらに絞込む。 The discrimination unit 64 discriminates the type of drug by comparing the characteristics of each drug with a drug database. Based on the extracted drug characteristics, the discrimination unit 64 narrows down candidates for drug data related to the imaged drug from the drug database using pattern matching or the like. In this case, for example, the drug data candidates are narrowed down using at least one of the above-mentioned size, shape, engraving, print, dividing line, and representative color. The discrimination unit 64 then performs OCR or the like to read the identification information or the like shown on the engraving or print, and further narrows down the drug type from the above candidates using pattern matching or the like.

また、判別部64は、パターンマッチング等を用いて抽出した薬剤の特徴(対象特徴)が薬剤データベースに無い場合であっても、対象特徴の少なくとも一部に基づき薬剤(錠剤またはカプセル)であると推定される場合には、薬剤の種類を推定薬剤として判別する。この場合、推定薬剤も、第2収容部14または待機トレイ15への仕分け対象とすることができる。本実施形態では、推定薬剤は、まず待機トレイ15へ仮置きされても構わない。 In addition, even if the drug features (target features) extracted using pattern matching or the like are not in the drug database, if the discrimination unit 64 predicts that the drug is a drug (tablet or capsule) based on at least a portion of the target features, it will determine 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. In this embodiment, the suspected drug may first be temporarily placed on the waiting tray 15.

判別部64は、薬剤の種類の判別結果を仕分制御部62に出力する。例えば、薬剤の種類を1つに特定できた場合、または所定数以内の候補数に絞込んだ場合には、当該薬剤に関する薬剤データを判別結果として出力する。この場合、判別部64は、当該薬剤に関する薬剤データを、当該薬剤の画像データに紐づけて記憶部80に記憶する。 The discrimination unit 64 outputs the discrimination result of the type of drug to the sorting control unit 62. For example, when the type of drug can be identified as 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 regarding the drug as the discrimination result. In this case, the discrimination unit 64 stores the drug data regarding the drug in the memory unit 80 in association with the image data of the drug.

判別部64は、薬剤の種類を推定薬剤として判別した場合には、薬剤の特徴(推定薬剤として推定された物の特徴)を判別結果として出力する。一方、判別部64は、薬剤データベースに廃棄する薬剤として登録された薬剤であると判別した場合、または第1収容部11に収容された物が薬剤以外の異物であると判別した場合、仕分対象外の薬剤である旨を判別結果として出力する。 When the discrimination unit 64 discriminates that the type of drug is a suspected drug, it outputs the characteristics of the drug (the characteristics of the object presumed to be a suspected drug) as the discrimination result. On the other hand, when the discrimination unit 64 discriminates that the drug is registered in the drug database as a drug to be discarded, or when it discriminates that the object contained in the first container 11 is a foreign object other than a drug, it outputs the discrimination result indicating that the drug is not to be sorted.

搬送・仕分ユニット12は、判別部64による判別結果に基づき、薬剤を種類毎に第2収容部14へ格納するか、または待機トレイ15へ格納する薬剤仕分処理を実行する。仕分制御部62は、搬送・仕分ユニット12を制御して、撮像および判別処理後に受入領域Ar1に配置された薬剤を、判別結果に基づき、第2収容部14の所定の仕分カップ141または待機トレイ15まで搬送する。 The transport/sorting unit 12 executes a drug sorting process in which the drugs are stored by type in the second storage unit 14 or in the waiting tray 15 based on the discrimination result by the discrimination unit 64. The sorting control unit 62 controls the transport/sorting unit 12 to transport the drugs placed in the receiving area Ar1 after the imaging and discrimination process to a specified sorting cup 141 in the second storage unit 14 or to the waiting tray 15 based on the discrimination result.

(第1払出機構)
搬送・仕分ユニット12の容器取出機構124は、第2収容部14から仕分カップ141を取り出し、第1払出機構4へと受け渡すものである。具体的には、容器取出機構124は、仕分カップ141の一部を把持して引き上げることで、第2収容部14から取り出す。ただし、容器取出機構124は、搬送・仕分ユニット12とは別の独立した機構であってもよい。
(First dispensing mechanism)
The container removal mechanism 124 of the transporting and sorting unit 12 removes the sorting cup 141 from the second storage section 14 and transfers it to the first dispensing mechanism 4. Specifically, the container removal mechanism 124 grasps and pulls up a part of the sorting cup 141 to remove it from the second storage section 14. However, the container removal mechanism 124 may be an independent mechanism separate from the transporting and sorting unit 12.

第1払出機構4は、仕分カップ141に収容された薬剤を、仕分カップ141ごとに分包機構6へ払い出すものである。このとき、第1払出機構4は、容器取出機構124から受け取った仕分カップ141を傾斜させることで、当該仕分カップ141に収容された薬剤を分包機構6へ払い出す。ただし、薬剤の種類および数量などの条件によっては、仕分カップ141を傾斜させるだけでは全ての薬剤を払い出せない場合もある。この場合には、第1払出機構4は、仕分カップ141を完全に上下反転させる。制御部60aは、例えば図示しない質量計測機構により仕分カップ141(およびその中の薬剤)の質量を計測し、当該質量が仕分カップ141の質量と略等しくなった場合に全ての薬剤が払い出されたと判定する。 The first dispensing mechanism 4 dispenses the medicines contained in the sorting cups 141 to the packaging mechanism 6 for each sorting cup 141. At this time, the first dispensing mechanism 4 tilts the sorting cup 141 received from the container removal mechanism 124 to dispense the medicines contained in the sorting cup 141 to the packaging mechanism 6. However, depending on conditions such as the type and quantity of medicine, it may not be possible to dispense all of the medicines just by tilting the sorting cup 141. In this case, the first dispensing mechanism 4 completely inverts the sorting cup 141 upside down. The control unit 60a measures the mass of the sorting cup 141 (and the medicines therein) using, for example, a mass measuring mechanism not shown, and determines that all of the medicines have been dispensed when the measured mass is approximately equal to the mass of the sorting cup 141.

このように、薬剤仕分装置1においては、第2収容部14から仕分カップ141を取り出す機構と、取り出された仕分カップ141を傾斜させる機構とが別個である。第2収容部14では、仕分カップ141の収容率を高めるために、仕分カップ141同士が近接した状態で配置される。取り出す機構と傾斜させる機構とを別構成とすることにより、近接して配置された複数の仕分カップ141から取出対象の仕分カップ141を適切に取出すために、仕分カップ141の取出しに適した容器取出機構124を用いることができる。さらに、仕分カップ141を確実に保持して所望の角度に傾斜させるために、仕分カップ141を保持し、傾斜させることに適した第1払出機構4を用いることができる。したがって、第2収容部14において仕分カップ141が高集積に配置された状態において、容器取出機構124が取出対象の仕分カップ141を適切に取出した後、第1払出機構4が当該仕分カップ141を傾斜させることにより当該仕分カップ141内の薬剤を払出すことができる。 In this way, in the medicine sorting device 1, the mechanism for removing the sorting cup 141 from the second storage section 14 and the mechanism for tilting the removed sorting cup 141 are separate. In the second storage section 14, the sorting cups 141 are arranged in close proximity to each other in order to increase the storage rate of the sorting cups 141. By configuring the removal mechanism and the tilting mechanism separately, a container removal mechanism 124 suitable for removing the sorting cup 141 can be used to properly remove the sorting cup 141 to be removed from the multiple sorting cups 141 arranged in close proximity. Furthermore, a first dispensing mechanism 4 suitable for holding and tilting the sorting cup 141 can be used to reliably hold the sorting cup 141 and tilt it to the desired angle. Therefore, when the sorting cups 141 are arranged in a highly-accumulated state in the second storage section 14, the container removal mechanism 124 properly removes the sorting cup 141 to be removed, and then the first dispensing mechanism 4 tilts the sorting cup 141 to dispense the medicine inside the sorting cup 141.

(第2払出機構)
吸着・シャッター機構122は、第2収容部14に収容された薬剤を個別に払い出す、第2払出機構としても動作する。具体的には、吸着・シャッター機構122による払い出しを行う場合、第2収容部14に配された状態の仕分カップ141から、薬剤を1錠ずつ分包機構6へ搬送して払い出す。
(Second dispensing mechanism)
The suction/shutter mechanism 122 also operates as a second dispensing mechanism that individually dispenses the medicines contained in the second container 14. Specifically, when dispensing by the suction/shutter mechanism 122, the medicines are transported one tablet at a time from the sorting cup 141 arranged in the second container 14 to the packaging mechanism 6 and dispensed.

第1払出機構4のみで第2収容部14に収容された薬剤を分包機構6へ払い出す場合、1つの仕分カップ141に収容可能な薬剤の数の上限が、分包機構6が1回の分包で分包可能な薬剤の数の上限(以下、分包上限と称する)に制限される。このため、第1収容部11または待機トレイ15から第2収容部14への薬剤の搬送時に、第2収容部14へ収容できない薬剤が増加して薬剤の搬送の効率が低下する可能性がある。 When the medicines contained in the second storage unit 14 are dispensed to the packaging mechanism 6 using only the first dispensing mechanism 4, the upper limit of the number of medicines that can be accommodated in one sorting cup 141 is limited to the upper limit of the number of medicines that the packaging mechanism 6 can package in one packaging (hereinafter referred to as the packaging upper limit). Therefore, when the medicines are transported from the first storage unit 11 or the waiting tray 15 to the second storage unit 14, the number of medicines that cannot be accommodated in the second storage unit 14 may increase, decreasing the efficiency of drug transport.

薬剤仕分装置1においては、制御部60aは、仕分カップ141に収容されている薬剤の数が規定された数よりも多いか否かを判定する。規定された数は、例えば分包上限である。ただし、規定された数は、分包上限よりも小さい別の値であってもよい。仕分カップ141に収容されている薬剤の数が規定された数よりも多い場合には、搬送制御部61が吸着・シャッター機構122を制御して、仕分カップ141から分包機構6へ薬剤の払い出しを行う。仕分カップ141に収容されている薬剤の数が規定された数以下である場合には、取出制御部67aが容器取出機構124を制御して、仕分カップ141を第2収容部14から取り出して第1払出機構4に受け渡す。その後、傾斜制御部67bが傾斜機構42を制御して仕分カップ141から分包機構6へ薬剤の払い出しを行う。 In the drug sorting device 1, the control unit 60a determines whether the number of drugs contained in the sorting cup 141 is greater than a specified number. The specified number is, for example, the upper limit of packaging. However, the specified number may be another value smaller than the upper limit of packaging. If the number of drugs contained in the sorting cup 141 is greater than the specified number, the transport control unit 61 controls the suction/shutter mechanism 122 to dispense the drugs from the sorting cup 141 to the packaging mechanism 6. If the number of drugs contained in the sorting cup 141 is equal to or less than the specified number, the removal control unit 67a controls the container removal mechanism 124 to remove the sorting cup 141 from the second storage unit 14 and transfer it to the first dispensing mechanism 4. Thereafter, the tilt control unit 67b controls the tilt mechanism 42 to dispense the drugs from the sorting cup 141 to the packaging mechanism 6.

〔実施形態1〕
図1に示したように、薬剤仕分システム100は、データ作成装置20をさらに含む。データ作成装置20は、薬剤データベースに追加するマスタデータを作成する装置である。マスタデータは、薬剤の種類のそれぞれについての薬剤に関する薬剤データである。マスタデータは、例えば、種類判別の対象薬剤の画像と照合されるマスタ画像と、薬剤を識別する情報の一例である薬剤コードと、薬剤の名称とが対応付けられたデータである。図1に示したように、データ作成装置20は、制御部21、記憶部22、表示部23、および入力部24を備える。
[Embodiment 1]
As shown in FIG. 1, the medicine sorting system 100 further includes a data creation device 20. The data creation device 20 is a device that creates master data to be added to the medicine database. The master data is medicine data related to each type of medicine. The master data is data in which, for example, a master image to be compared with an image of the target medicine for type determination, a medicine code which is an example of information for identifying the medicine, and the name of the medicine are associated with each other. As shown in FIG. 1, the data creation device 20 includes a control unit 21, a memory unit 22, a display unit 23, and an input unit 24.

制御部21は、マスタデータを作成する処理を行う。制御部21の具体的な構成については、別実施形態として説明する。 The control unit 21 performs a process to create master data. The specific configuration of the control unit 21 will be described in another embodiment.

記憶部22は、制御部21による制御に必要な情報を記憶する記憶装置である。ただし、データ作成装置20において、記憶部22は必須ではない。データ作成装置20は、制御部21による制御に必要な情報を記憶する外部の記憶装置と通信可能に接続されていてもよい。 The memory unit 22 is a storage device that stores information necessary for control by the control unit 21. However, the memory unit 22 is not essential to the data creation device 20. The data creation device 20 may be communicably connected to an external storage device that stores information necessary for control by the control unit 21.

表示部23は、ユーザに対するメッセージ等の画像を表示する表示装置である。入力部24は、データ作成装置20に対するユーザの入力を受付ける入力装置である。表示部23および入力部24としては、公知のものを特に制限なく用いることができる。 The display unit 23 is a display device that displays images such as messages for the user. The input unit 24 is an input device that accepts user input to the data creation device 20. The display unit 23 and the input unit 24 can be any known device without any particular restrictions.

図4は、実施形態1に係るマスタデータの作成方法の一例を示すフローチャートである。本実施形態では、制御部21が一連の処理を実行するものとして説明する。 Figure 4 is a flowchart showing an example of a method for creating master data according to the first embodiment. In this embodiment, the control unit 21 is described as executing a series of processes.

制御部21は、まず、薬剤の画像を取得する(S1)。薬剤の画像は、上述した薬剤の仕分け時に撮像された、待機トレイ15に収容された推定薬剤の画像であってよい。または、薬剤の画像は、上述した薬剤の仕分け後に、第2収容部14に格納された薬剤を撮像したものであってもよい。このとき、互いに異なる複数の角度から撮像した画像が、薬剤ごとに得られる。 The control unit 21 first acquires an image of the drug (S1). The image of the drug may be an image of the presumed drug stored in the waiting tray 15, captured during the above-mentioned drug sorting. Alternatively, the image of the drug may be an image of the drug stored in the second storage unit 14 after the above-mentioned drug sorting. At this time, images captured from multiple mutually different angles are obtained for each drug.

次に、制御部21は、マスタデータを作成する薬剤を選択するためにユーザが参照するサムネイル画像を作成する(S2)。さらに、制御部21は、マスタデータを作成する薬剤の画像を選択するユーザ操作を受付ける(S3)。 Next, the control unit 21 creates a thumbnail image that the user refers to in order to select a drug for which master data is to be created (S2). Furthermore, the control unit 21 accepts a user operation to select an image of the drug for which master data is to be created (S3).

上記ユーザ操作を受付けた後、制御部21は、選択された薬剤の画像に対して、ピントが合っているか否かのチェックを行う(S4)。具体的には、制御部21は、選択された薬剤についての複数の画像のうち、チェックの対象とする画像を選択するユーザ操作を受付け、当該画像に対してチェックを行う。 After accepting the above user operation, the control unit 21 checks whether the image of the selected drug is in focus (S4). Specifically, the control unit 21 accepts a user operation to select an image to be checked from among multiple images of the selected drug, and checks the image.

以下では、チェックを行った画像においてピントが合っていたものとして説明する。仮にチェックを行った画像においてピントが合っていなかった場合、制御部21は、選択された薬剤の別の画像を選択するユーザ操作を受付け、当該画像に対してチェックを行ってよい。さらに、ピントが合っていない画像が連続した場合、制御部21は、ユーザに対してカメラのピントの調整を促すメッセージを表示してよい。 In the following, it is assumed that the checked image was in focus. If the checked image was not in focus, the control unit 21 may accept a user operation to select another image of the selected drug and check that image. Furthermore, if a series of out-of-focus images are displayed, the control unit 21 may display a message to the user urging them to adjust the focus of the camera.

制御部21は、一時マスタデータを作成するためのユーザ操作を受付ける(S5)。一時マスタデータとは、薬剤の画像、および、当該薬剤に形成された、当該薬剤を識別するための識別情報を示すマークをなぞるユーザ操作を受付けることにより、当該薬剤の画像においてマークが描画された画像(マークの軌跡を示す画像)を含むデータである。具体的には、制御部21は、薬剤の画像に含まれる識別情報の、文字情報としての入力を受付ける。このとき、制御部21は、文字が正しい向きになるよう画像を回転させる動作を実施してもよい。また、制御部21は、薬剤の画像におけるマークの画像についての、ユーザによる描画の入力を受付ける。 The control unit 21 accepts a user operation for creating temporary master data (S5). The temporary master data is data including an image of the drug and an image of the drug in which a mark is drawn on the image of the drug (an image showing the trajectory of the mark) by accepting a user operation of tracing a mark formed on the drug that indicates identification information for identifying the drug. Specifically, the control unit 21 accepts input of the identification information included in the image of the drug as character information. At this time, the control unit 21 may perform an operation of rotating the image so that the characters are oriented in the correct direction. The control unit 21 also accepts input of drawing by the user on the image of the mark on the image of the drug.

上記マークは、薬剤の表面に形成されたしるしである。例えば、薬剤の種類またはメーカーを示すために形成された文字(アルファベット・数字等も含む)、記号、図案、絵、線(例えば割線)、あるいは二次元コード等のコード情報なども上記マークの範疇に含まれる。また、上記マークの形成方法は特に限定されない。例えば、上記マークは、薬剤の表面を彫り込むことにより形成されていてもよいし、薬剤の表面にプリント(印字)することにより形成されていてもよい。 The above-mentioned marks are indicia formed on the surface of the medicine. For example, the category of the above-mentioned marks includes letters (including letters and numbers), symbols, designs, pictures, lines (e.g., slits), and code information such as two-dimensional codes formed to indicate the type or manufacturer of the medicine. In addition, the method of forming the above-mentioned marks is not particularly limited. For example, the above-mentioned marks may be formed by engraving the surface of the medicine, or by printing (printing) on the surface of the medicine.

続けて制御部21は、一時マスタデータに含まれる薬剤の画像の角度が適切であるかのチェック結果についてのユーザ操作を受付ける(S6)。制御部21は、ユーザによるチェックを促すメッセージを表示するとともに、チェック結果の入力を受付けてよい。ユーザは、マークが描画された画像を視認することにより、上記の角度のチェックを行ってよい。ユーザは、マークが描画された画像が上向きである場合、上記角度が適切であると判断してよい。 The control unit 21 then accepts a user operation regarding the check result of whether the angle of the image of the medicine included in the temporary master data is appropriate (S6). The control unit 21 may display a message prompting the user to check, and may accept input of the check result. The user may check the angle by visually checking the image in which the mark is drawn. The user may determine that the angle is appropriate if the image in which the mark is drawn is facing upward.

以下では、マークが描画された画像の角度が適切であるとのチェック結果をユーザが入力したものとして説明する。仮にマークが描画された画像に、斜めまたは横といった、薬剤の向きが不適である画像が含まれている場合、ユーザは、上記画像の角度が不適であるとのチェック結果を入力する。この場合、制御部21は、一時マスタデータを削除して、再度ステップS5を実行する。 In the following, it is assumed that the user inputs a check result indicating that the angle of the image on which the mark is drawn is appropriate. If the image on which the mark is drawn includes an image in which the orientation of the drug is inappropriate, such as diagonally or horizontally, the user inputs a check result indicating that the angle of the image is inappropriate. In this case, the control unit 21 deletes the temporary master data and executes step S5 again.

制御部21は、一時マスタデータの識別情報に基づいて、一時マスタデータを識別するコードを、薬剤仕分装置1が使用されている国の薬剤コードにリネームする(S7)。一時マスタデータを識別するコードは、各一時マスタデータのコードが異なるように付与されていればよい。その後、制御部21は、一時マスタデータに含まれる薬剤の画像を、適切なサイズに変更する(S8)。 The control unit 21 renames the code identifying the temporary master data to the drug code of the country in which the drug sorting device 1 is used based on the identification information of the temporary master data (S7). The code identifying the temporary master data may be assigned so that the code of each temporary master data is different. After that, the control unit 21 changes the image of the drug included in the temporary master data to an appropriate size (S8).

次に、制御部21は、一時マスタデータと類似するマスタデータが、薬剤データベースに含まれていないかのチェックを行う(S9)。一時マスタデータと類似するマスタデータが、薬剤データベースに含まれている場合には、制御部21は、一時マスタデータ、および、薬剤データベースに含まれる既存のマスタデータのうちの一方を削除する。 Next, the control unit 21 checks whether master data similar to the temporary master data is included in the drug database (S9). If master data similar to the temporary master data is included in the drug database, the control unit 21 deletes either the temporary master data or the existing master data included in the drug database.

制御部21は、例えば、一時マスタデータに付与された薬剤コードが、薬剤データベースにおいて管理されている既存のマスタデータに含まれる薬剤コードと一致しているかをチェックしてもよい。また、制御部21は、例えば、一時マスタデータに含まれる薬剤の画像と、既存のマスタデータに含まれる薬剤の画像とを照合することにより、上記のチェックを行ってもよい。この場合、制御部21は、上述した判別部64の機能を有してよい。さらに、制御部21は、例えば、ユーザによるチェックを促すメッセージを表示するとともに、チェック結果の入力を受付けてもよい。 The control unit 21 may, for example, check whether the drug code assigned to the temporary master data matches the drug code included in the existing master data managed in the drug database. The control unit 21 may also perform the above check by, for example, comparing a drug image included in the temporary master data with a drug image included in the existing master data. In this case, the control unit 21 may have the function of the discrimination unit 64 described above. Furthermore, the control unit 21 may, for example, display a message encouraging the user to perform a check and accept input of the check result.

制御部21は、S9のチェック後、薬剤の名称についてのユーザの入力を受付け、当該名称を一時マスタデータと対応付けた連携ファイルを作成する(S10)。これにより、マスタデータの作成が完了する。その後、制御部21は、作成したマスタデータを、薬剤仕分装置1のコンピュータ60に送信する。コンピュータ60では、制御部60aは、記憶部80に記憶された薬剤データベースに、受信したマスタデータを登録する。 After checking S9, the control unit 21 accepts user input regarding the name of the drug and creates a linkage file that associates the name with the temporary master data (S10). This completes the creation of the master data. The control unit 21 then transmits the created master data to the computer 60 of the drug sorting device 1. In the computer 60, the control unit 60a registers the received master data in the drug database stored in the memory unit 80.

以上のとおり、データ作成装置20は、一意に定められたマスタデータ作成の手順に沿って、必要に応じてユーザの入力を促す。これにより、ユーザは、マスタデータの作成を円滑に進めることができる。 As described above, the data creation device 20 prompts the user for input as necessary, following a uniquely defined procedure for creating master data. This allows the user to smoothly proceed with creating the master data.

薬剤仕分システム100は、複数のデータ作成装置20を含んでいてもよい。この場合、薬剤データベースの作成において、複数のデータ作成装置20のそれぞれが備える制御部21が、上述したステップを分担して実行してもよい。 The medicine sorting system 100 may include multiple data creation devices 20. In this case, in creating the medicine database, the control units 21 provided in each of the multiple data creation devices 20 may share and execute the above-mentioned steps.

例えば、薬剤仕分システム100は、データ作成装置20として、デスクトップコンピュータおよびタブレットを含んでいてもよい。この場合、ステップS5におけるマークの描画の受付けのみを、タブレットが備える制御部21が行い、その他の処理をデスクトップコンピュータが備える制御部21が行ってよい。 For example, the medicine sorting system 100 may include a desktop computer and a tablet as the data creation device 20. In this case, only the reception of the mark drawing in step S5 may be performed by the control unit 21 provided in the tablet, and other processing may be performed by the control unit 21 provided in the desktop computer.

〔実施形態2〕
実施形態1に示すように、データ作成装置20は、薬剤の画像において、薬剤に形成されたマークをなぞるユーザ操作を受付けた一時マスタデータを作成する。薬剤には、識別情報として、少なくとも1つのマークが形成されている。各薬剤の画像において、マークをなぞるユーザ操作によりマークを描画することは、ユーザの手間となり得る。また、マークの描画の精度には、ユーザ間のばらつきも生じ得る。
[Embodiment 2]
As shown in the first embodiment, the data creation device 20 creates temporary master data by receiving a user operation of tracing a mark formed on a medicine in an image of the medicine. At least one mark is formed on the medicine as identification information. Drawing a mark by a user operation of tracing the mark on each medicine image can be time-consuming for the user. In addition, the accuracy of drawing the mark can vary between users.

本実施形態のデータ作成装置20によれば、以下の処理を実行することにより、マークの描画を行うことなくマスタ画像を作成できる。したがって、本実施形態のデータ作成装置20によれば、簡易にマスタデータを作成できる。また、マスタデータの作成に要する時間を短縮できる。さらに、本実施形態のデータ作成装置20によれば、属人的な作業に伴う描画の精度の平準化を図ることができる。そのため、ユーザは、一時マスタデータに含まれる薬剤の画像の角度の適否を精度よくチェックできる。 According to the data creation device 20 of this embodiment, by executing the following process, a master image can be created without drawing a mark. Therefore, according to the data creation device 20 of this embodiment, master data can be easily created. In addition, the time required to create the master data can be shortened. Furthermore, according to the data creation device 20 of this embodiment, it is possible to standardize the accuracy of drawing that is associated with personal work. Therefore, the user can accurately check whether the angle of the drug image included in the temporary master data is appropriate.

以下、図1,図5~図9を用いて、本実施形態のデータ作成装置20における機能および処理の一例について説明する。図5は、マスタデータを作成するために選択された薬剤の画像を表示する表示画像(表示画面)の一例を示す図である。図6は、選択された薬剤の画像におけるマーク領域の抽出結果を表示する表示画像と、マスタ画像として登録対象となる薬剤の画像を表示する表示画像の一例を示す図である。図7は、選択された薬剤の画像におけるマーク領域の抽出結果を表示する表示画像の別例を示す図である。図8は、図7に示すマーク領域の再設定について説明するための表示画像の一例を示す図である。図9は、選択された薬剤の画像におけるマーク領域の抽出結果を表示する表示画像のさらなる別例と、当該マーク領域の再設定について説明するための表示画像の別例を示す図である。 Below, an example of the functions and processing of the data creation device 20 of this embodiment will be described with reference to FIG. 1 and FIG. 5 to FIG. 9. FIG. 5 is a diagram showing an example of a display image (display screen) displaying an image of a drug selected to create master data. FIG. 6 is a diagram showing an example of a display image displaying the extraction result of a mark area in an image of a selected drug, and a display image displaying an image of a drug to be registered as a master image. FIG. 7 is a diagram showing another example of a display image displaying the extraction result of a mark area in an image of a selected drug. FIG. 8 is a diagram showing an example of a display image for explaining the resetting of the mark area shown in FIG. 7. FIG. 9 is a diagram showing yet another example of a display image displaying the extraction result of a mark area in an image of a selected drug, and another example of a display image for explaining the resetting of the mark area.

図1に示すように、本実施形態のデータ作成装置20では、制御部21は、例えば、受付部211、抽出部212、番号付与部213、表示制御部214、設定部215、および、作成部216を備える。本実施形態の記憶部22は、学習済みモデル221を備える。 As shown in FIG. 1, in the data creation device 20 of this embodiment, the control unit 21 includes, for example, a reception unit 211, an extraction unit 212, a number assignment unit 213, a display control unit 214, a setting unit 215, and a creation unit 216. The memory unit 22 of this embodiment includes a trained model 221.

受付部211は、薬剤に形成された少なくとも1つのマークにより示される識別情報の入力を受付ける。受付部211は、入力部24を介して識別情報の入力を受付ける。表示制御部214は、撮像された種類不明の複数の薬剤の画像の中からユーザが指定した薬剤の画像を含む、当該薬剤の識別情報を抽出するための表示画像を、表示部23に表示する。図5の符号1001は、受付部211が識別情報を受付けた結果が、ダイアログボックスDB1に表示された状態を示す表示画像である。 The reception unit 211 receives input of identification information indicated by at least one mark formed on the drug. The reception unit 211 receives input of the identification information via the input unit 24. The display control unit 214 displays on the display unit 23 a display image for extracting identification information of the drug, including an image of a drug specified by the user from among multiple captured images of drugs of unknown type. Reference numeral 1001 in FIG. 5 is a display image showing a state in which the result of the reception unit 211 receiving the identification information is displayed in the dialog box DB1.

薬剤が錠剤の場合、受付部211は、薬剤の一方の面(表面と称する)と他方の面(裏面と称する)とのそれぞれにおいて、識別情報の入力を受付ける。表示制御部214は、受付部211が受付けた表面の識別情報を、図5の符号1002に示す表示領域DAR1の「F」欄に表示する。また、表示制御部214は、受付部211が受付けた裏面の識別情報を、図5の符号1002に示す表示領域DAR1の「R」欄に表示する。 When the medication is a tablet, the reception unit 211 receives input of identification information for each of one side (referred to as the front side) and the other side (referred to as the back side) of the medication. The display control unit 214 displays the identification information for the front side received by the reception unit 211 in the "F" field of the display area DAR1 shown by reference numeral 1002 in FIG. 5. The display control unit 214 also displays the identification information for the back side received by the reception unit 211 in the "R" field of the display area DAR1 shown by reference numeral 1002 in FIG. 5.

図5の例では、薬剤の表面には、識別情報として「SW132」の5文字が示され、裏面には何も示されていない。そのため、図5の例では、表示領域DAR1の「F」欄に「SW132」が表示され、表示領域DAR1の「R」欄には何も表示されていない。 In the example of Figure 5, the five letters "SW132" are displayed as identification information on the front of the medicine, and nothing is displayed on the back. Therefore, in the example of Figure 5, "SW132" is displayed in the "F" column of display area DAR1, and nothing is displayed in the "R" column of display area DAR1.

また、図5の符号1001に示す矢印は、薬剤の画像における薬剤の向きDR1を示す。表示画像において、薬剤の向きDR1が上向きでない場合、ユーザは、薬剤の向きDR1が上向きとなるように、薬剤の向きDR1を変更する。制御部21は、薬剤の向きDR1を変更するユーザ操作を受付けたときに、表示画像の垂線を回転軸として薬剤の画像を回転させることにより、薬剤の向きDR1を変更する。図5の符号1002は、薬剤の向きDR1が上向きに変更された後の表示画像の一例を示す図である。 The arrow indicated by reference numeral 1001 in FIG. 5 indicates the drug orientation DR1 in the drug image. If the drug orientation DR1 in the display image is not upward, the user changes the drug orientation DR1 so that the drug orientation DR1 is upward. When the control unit 21 receives a user operation to change the drug orientation DR1, the control unit 21 changes the drug orientation DR1 by rotating the drug image around the perpendicular line of the display image as the rotation axis. Reference numeral 1002 in FIG. 5 shows an example of the display image after the drug orientation DR1 has been changed to upward.

また、薬剤が錠剤である場合、ユーザは、薬剤の向きDR1が上向きかを判断するときに、薬剤に形成されたマークが刻印(Stamp)であるか、印字(Print)であるかを選択する。制御部21は、図5の符号1002に示すラジオボタンBO1において、刻印または印字の選択を受付ける。 When the medicine is a tablet, the user selects whether the mark formed on the medicine is a stamp or a print when determining whether the medicine's orientation DR1 is upward. The control unit 21 accepts the selection of stamp or print using radio button BO1 indicated by reference numeral 1002 in FIG. 5.

抽出部212は、撮像された薬剤の画像において、薬剤に形成された1つのマークを含むマーク領域を少なくとも1つ抽出する。抽出部212は、薬剤の画像に対して画像処理を行うことにより、少なくとも1つのマーク領域を抽出してよい。本実施形態では、抽出部212は、マーク領域を抽出するように構築された学習済みモデル221に、薬剤の画像を入力して得られる出力値に基づき、マーク領域を抽出する。 The extraction unit 212 extracts at least one mark area including one mark formed on the drug from the captured image of the drug. The extraction unit 212 may extract at least one mark area by performing image processing on the image of the drug. In this embodiment, the extraction unit 212 extracts the mark area based on an output value obtained by inputting the image of the drug to a trained model 221 constructed to extract the mark area.

本実施形態では、学習済みモデル221の一例として、薬剤の画像においてマークを構成する画素と、当該マークの背景部分を構成する画素と、を識別するように学習したセグメンテーションモデルが用いられる。セグメンテーションモデルの一例としては、セマンティックセグメンテーションモデル(以降、SSモデルと称する)が挙げられる。学習済みモデル221としてSSモデルを用いることにより、不規則な形状のマークを精度よく抽出することが可能になる。 In this embodiment, as an example of the trained model 221, a segmentation model that has been trained to distinguish between pixels that make up a mark in an image of a drug and pixels that make up the background of the mark is used. An example of a segmentation model is a semantic segmentation model (hereinafter referred to as an SS model). By using the SS model as the trained model 221, it becomes possible to extract marks with irregular shapes with high accuracy.

SSモデルは、撮像された薬剤の画像が入力されると、当該薬剤の画像を構成する各画素について、マークを構成する画素である確率を示す確率値を算出する。確率値が高い画素ほど、マークを構成する画素である可能性が高く、確率値が低い画素ほど、背景部分を構成する画素である可能性が高い。そして、SSモデルは、上記確率値に基づいてマークを構成する画素と背景部分を構成する画素とが区分されたデータ(例えば背景領域を構成する画素を0、マークを構成する画素を1に分類したデータ)を出力する。 When an image of a captured drug is input, the SS model calculates a probability value for each pixel that makes up the drug image, indicating the probability that the pixel is a pixel that makes up a mark. The higher the probability value of a pixel, the more likely it is to be a pixel that makes up a mark, and the lower the probability value of a pixel, the more likely it is to be a pixel that makes up the background. The SS model then outputs data that distinguishes between pixels that make up the mark and pixels that make up the background based on the probability values (for example, data that classifies pixels that make up the background area as 0 and pixels that make up the mark as 1).

そのため、抽出部212は、薬剤の画像をSSモデルに入力して得られる出力値に対して画像処理を施すことができる。例えば、抽出部212は、SSモデルの出力値が0である画素を(R,G,B)=(255,255,255)とし、SSモデルの出力値が1である画素を(R,G,B)=(0,0,0)としてもよい。この場合、抽出部212は、背景領域を構成する画素が白、マークを構成する画素が黒で表すことができ、黒で表された1つの画素群を1つの領域として抽出できる。このように、抽出部212は、SSモデルの出力値に基づき、マーク領域を抽出できる。 Therefore, the extraction unit 212 can apply image processing to the output values obtained by inputting an image of the drug into the SS model. For example, the extraction unit 212 may set a pixel whose output value of the SS model is 0 as (R, G, B) = (255, 255, 255) and a pixel whose output value of the SS model is 1 as (R, G, B) = (0, 0, 0). In this case, the extraction unit 212 can represent the pixels that make up the background region as white and the pixels that make up the mark as black, and can extract one group of pixels represented in black as one region. In this way, the extraction unit 212 can extract the mark region based on the output value of the SS model.

学習済みモデル221は、上記確率値を出力値として出力するモデルであってもよい。この場合、抽出部212は、学習済みモデル221から出力された各画素の確率値について所定閾値以上であるかを判定し、その判定結果に基づいて各画素の画素値を決定する。 The trained model 221 may be a model that outputs the above-mentioned probability value as an output value. In this case, the extraction unit 212 determines whether the probability value of each pixel output from the trained model 221 is equal to or greater than a predetermined threshold, and determines the pixel value of each pixel based on the determination result.

本実施形態では、図5の符号1002に示すように、表示画像に表示された抽出ボタンBO2に対するユーザ操作を受付けた場合、抽出部212は、薬剤の画像に対してマーク領域の抽出を行う。本実施形態では、制御部21は、識別情報の入力およびラジオボタンBO1による選択が行われた後に、抽出ボタンBO2を表示またはアクティブにしてもよい。さらに、制御部21は、薬剤の向きDR1が上向きであるとのユーザ操作を受付けた場合に、抽出ボタンBO2を表示またはアクティブにしてもよい。 In this embodiment, as shown by reference numeral 1002 in FIG. 5, when a user operation is received on the extraction button BO2 displayed on the display image, the extraction unit 212 extracts a mark area from the image of the drug. In this embodiment, the control unit 21 may display or activate the extraction button BO2 after input of identification information and selection by the radio button BO1. Furthermore, the control unit 21 may display or activate the extraction button BO2 when a user operation is received indicating that the drug orientation DR1 is upward.

番号付与部213は、受付部211が受付けた識別情報に含まれる、マークに対応する記号と、抽出部212が抽出したマーク領域とに対して、番号を付与する。番号付与部213は、識別情報を構成するマークに対応する記号が入力される順序と対応するように、抽出部212が抽出したマーク領域に対して番号を付与する。識別情報を構成するマークは、薬剤の画像に含まれるマークの向きが上向きである状態において、上段から下段に向けて、かつ、各段において左から右に向けて形成されている。そのため、番号付与部213は、薬剤の画像に含まれるマークの向きが上向きである状態において、抽出部212が抽出したマーク領域に対して、上段から下段に向けて、かつ、各段において左から右に向けて順に番号を付与する。これにより、番号付与部213は、左上のマーク領域から右下のマーク領域へと順に番号を付与する。また、番号付与部213は、入力された識別情報を構成する記号に対しては、マーク領域に対して付与した番号を順に付与する。 The numbering unit 213 assigns numbers to the symbols corresponding to the marks included in the identification information received by the receiving unit 211 and to the mark areas extracted by the extraction unit 212. The numbering unit 213 assigns numbers to the mark areas extracted by the extraction unit 212 so as to correspond to the order in which the symbols corresponding to the marks constituting the identification information are input. The marks constituting the identification information are formed from the top row to the bottom row and from left to right in each row when the mark included in the image of the medicine is facing upward. Therefore, when the mark included in the image of the medicine is facing upward, the numbering unit 213 assigns numbers to the mark areas extracted by the extraction unit 212 in order from the top row to the bottom row and from left to right in each row. As a result, the numbering unit 213 assigns numbers in order from the upper left mark area to the lower right mark area. In addition, the numbering unit 213 assigns the numbers assigned to the mark areas to the symbols constituting the input identification information in order.

制御部21は、指定された薬剤について、上段のマークと下段のマークとを区別することが可能なレイアウト情報を付与してもよい。レイアウト情報は、例えば、マークが形成された段を示す情報であってよい。また、制御部21は、指定された薬剤について、上段のマークと下段のマークとの間に存在する線(割線)等、薬剤の表面に文字以外の記号が含まれることを示す情報を付与してもよいし、当該線等が文字以外の記号であることを示す情報を付与してもよい。文字以外の記号に関する情報が付与されている場合、番号付与部213は、当該情報に基づき、文字以外の記号に限定して番号を付与してもよい。制御部21は、レイアウト情報又は文字以外の記号に関する情報を、例えば入力操作により受付けてよい。 The control unit 21 may assign layout information to the specified drug that allows a distinction between an upper mark and a lower mark. The layout information may be, for example, information indicating the row on which the mark is formed. The control unit 21 may also assign information to the specified drug indicating that symbols other than letters are included on the surface of the drug, such as a line (secant line) existing between the upper mark and the lower mark, or may assign information indicating that the line, etc. is a symbol other than letters. When information regarding symbols other than letters is assigned, the numbering unit 213 may assign numbers limited to symbols other than letters based on the information. The control unit 21 may accept the layout information or information regarding symbols other than letters, for example, by an input operation.

表示制御部214は、各種表示画像を表示部23に表示させる。本実施形態では、表示制御部214は、番号が付与された記号と、番号が付与されたマーク領域とを含む表示画像を、番号付与画像として表示する。表示制御部214は、抽出部212が抽出したマーク領域の近傍またはマーク領域に重畳させて、当該マーク領域に付与された番号を表示する。また、表示制御部214は、表示領域DAR1において、受付部211が受付けた記号の近傍またはマーク領域に重畳させて、当該記号に付与された番号を表示する。 The display control unit 214 causes various display images to be displayed on the display unit 23. In this embodiment, the display control unit 214 displays a display image including a symbol to which a number is assigned and a mark area to which a number is assigned as a numbered image. The display control unit 214 displays the number assigned to the mark area extracted by the extraction unit 212, either adjacent to the mark area or superimposed on the mark area. The display control unit 214 also displays the number assigned to the symbol accepted by the acceptance unit 211, either adjacent to the symbol or superimposed on the mark area in the display area DAR1.

図6の符号1011に示す表示画像は、番号付与画像の一例である。図6の例では、また、抽出部212は、左上から右下に向けて形成されている「S」「W」「1」「3」「2」のそれぞれを含む領域を、マーク領域として抽出している。そのため、番号付与部213は、「S」「W」「1」「3」「2」のそれぞれを含むマーク領域に対して、この順に番号「1」~「5」を付与する。したがって、図6の符号1011に示すように、表示制御部214は、「S」「W」「1」「3」「2」のそれぞれを含むマーク領域に対して、番号「1」~「5」を表示する。 The display image indicated by reference numeral 1011 in FIG. 6 is an example of a numbered image. In the example of FIG. 6, the extraction unit 212 also extracts areas including each of the letters "S", "W", "1", "3", and "2" formed from the upper left to the lower right as marked areas. Therefore, the numbering unit 213 assigns the numbers "1" to "5" to the marked areas including each of the letters "S", "W", "1", "3", and "2" in that order. Therefore, as indicated by reference numeral 1011 in FIG. 6, the display control unit 214 displays the numbers "1" to "5" to the marked areas including each of the letters "S", "W", "1", "3", and "2".

また、番号付与部213は、受付部211が受付けた「S」「W」「1」「3」「2」の順に、マーク領域に対して付与された番号「1」~「5」を付与する。したがって、図6の符号1011に示すように、表示制御部214は、表示領域DAR1において、受付部211が受付けた「S」「W」「1」「3」「2」に対して、番号「1」~「5」を表示する。 The numbering unit 213 assigns the numbers "1" to "5" to the marked areas in the order of "S", "W", "1", "3", and "2" received by the receiving unit 211. Therefore, as shown by reference numeral 1011 in FIG. 6, the display control unit 214 displays the numbers "1" to "5" in the display area DAR1 for the "S", "W", "1", "3", and "2" received by the receiving unit 211.

作成部216は、受付部211が受付けた識別情報と抽出部212が抽出したマーク領域とに基づく、薬剤の画像をマスタ画像として登録する登録操作を受付けた場合に、薬剤の画像をマスタ画像として当該識別情報に対応付けて、マスタデータを作成する。これにより、作成部216は、マークの描画を行うことなくマスタ画像を作成できる。したがって、作成部216、簡易にマスタデータを作成できる。また、作成部216がマスタデータの作成に要する時間を短縮できる。 When the creation unit 216 receives a registration operation to register an image of a drug as a master image based on the identification information received by the reception unit 211 and the mark area extracted by the extraction unit 212, the creation unit 216 creates master data by associating the image of the drug as a master image with the identification information. This allows the creation unit 216 to create a master image without drawing a mark. Therefore, the creation unit 216 can easily create master data. In addition, the time required for the creation unit 216 to create the master data can be reduced.

本実施形態では、ユーザは、抽出されたマーク領域に付与された番号と、入力された記号に付与された番号とが全て一致すると判断した場合、マスタデータの作成対象として表示された薬剤の画像を、マスタ画像として登録できる。 In this embodiment, if the user determines that the numbers assigned to the extracted mark areas and the numbers assigned to the input symbols all match, the user can register the image of the drug displayed as the target for creating master data as a master image.

本実施形態では、表示制御部214は、図6の符号1011に示す登録ボタンBO3に対するユーザ操作を受付けた場合、図6の符号1012に示す表示画像を表示する。これにより、ユーザは、薬剤の画像において、抽出部212が抽出したマーク領域を視認できる。作成部216は、図6の符号1012に対するOKボタンBO4に対するユーザ操作を受付けた場合、薬剤の画像を一時マスタデータとして登録する。 In this embodiment, when the display control unit 214 receives a user operation on the registration button BO3 indicated by reference numeral 1011 in FIG. 6, the display control unit 214 displays the display image indicated by reference numeral 1012 in FIG. 6. This allows the user to visually recognize the mark area extracted by the extraction unit 212 in the image of the medicine. When the creation unit 216 receives a user operation on the OK button BO4 indicated by reference numeral 1012 in FIG. 6, the creation unit 216 registers the image of the medicine as temporary master data.

マーク領域は、例えば、実施形態1において説明した、薬剤に形成されたマークをなぞったときの軌跡を示す画像に対応する。そのため、ユーザは、抽出部212が抽出したマーク領域の向きが上向きである場合、マークの軌跡を示す画像の角度が適切であるものとして、その旨のチェック結果を入力する。これにより、作成部216は、一時マスタデータに含まれる薬剤の画像をマスタ画像として特定すると共に、当該マスタ画像に、識別情報と、識別情報に対応する薬剤コードと、薬剤の名称とに対応付けて、マスタデータを作成する。 The mark area corresponds to, for example, an image showing the trajectory when tracing the mark formed on the medicine, as described in embodiment 1. Therefore, if the orientation of the mark area extracted by the extraction unit 212 is upward, the user inputs a check result to that effect, assuming that the angle of the image showing the trajectory of the mark is appropriate. As a result, the creation unit 216 identifies the image of the medicine included in the temporary master data as a master image, and creates master data by associating the master image with the identification information, the medicine code corresponding to the identification information, and the name of the medicine.

図6の例では、抽出部212が抽出した「S」「W」「1」「3」「2」を含むマーク領域のそれぞれに付与された番号と、受付部211が受付けた「S」「W」「1」「3」「2」のそれぞれに付与された番号が一致している。そのため、作成部216は、上記チェック結果の入力を受付けた場合に、上記登録操作を受付けたものとして、受付部211が受付けた識別情報「SW132」に、マスタデータの作成対象として表示画像に表示された薬剤の画像を、マスタ画像として対応付ける。 In the example of FIG. 6, the numbers assigned to the mark regions including "S", "W", "1", "3", and "2" extracted by the extraction unit 212 match the numbers assigned to "S", "W", "1", "3", and "2" accepted by the acceptance unit 211. Therefore, when the creation unit 216 accepts the input of the above check result, it assumes that the above registration operation has been accepted and associates the image of the drug displayed in the display image as the target for creating master data with the identification information "SW132" accepted by the acceptance unit 211 as a master image.

設定部215は、表示制御部214が表示する番号付与画像に対する入力操作に基づき、抽出部212が抽出したマーク領域のうち、1つのマークのみを含まないマーク領域について、1つのマークのみを含むように変更されたマーク領域に再設定する。 Based on an input operation on the numbered image displayed by the display control unit 214, the setting unit 215 resets the mark areas extracted by the extraction unit 212 that do not contain only one mark to mark areas that have been changed to contain only one mark.

番号付与画像において、抽出部212が抽出した複数のマーク領域のそれぞれに付与した番号の数が、受付部211が受付けた複数のマークの数と一致しない場合を考える。この場合、ユーザは、上記1つのマークのみを含まないマーク領域を、1つのマークのみを含むマーク領域に変更する。 Consider a case where the number of numbers assigned to each of the multiple mark areas extracted by the extraction unit 212 in the numbered image does not match the number of multiple marks accepted by the acceptance unit 211. In this case, the user changes the mark area that does not include only one mark to a mark area that includes only one mark.

(1つのマーク領域に複数のマークが含まれる場合のマーク領域の再設定例)
図7に示す表示画像は、番号付与画像の一例である。図7の例では、受付部211は、識別情報として、「L」「L」「4」「3」「4」を受付けている。一方、抽出部212は、「LL」「4」「3」「4」の4つのマーク領域を抽出している。つまり、抽出部212は、「L」「L」の2文字を「LL」という1つの塊として抽出している。
(Example of re-setting a mark area when one mark area contains multiple marks)
The display image shown in Fig. 7 is an example of a numbered image. In the example of Fig. 7, the reception unit 211 receives "L", "L", "4", "3", and "4" as identification information. Meanwhile, the extraction unit 212 extracts four mark areas, "LL", "4", "3", and "4". In other words, the extraction unit 212 extracts the two characters "L" and "L" as one block called "LL".

したがって、図7の例では、番号付与部213は、「LL」「4」「3」「4」のそれぞれを含むマーク領域に対して、この順に番号「1」~「4」を付与する。また、番号付与部213は、受付部211が受付けた「L」「L」「4」「3」「4」の順に、マーク領域に対して付与された番号「1」~「4」を付与する。そのため、図7に示すように、番号付与部213は、受付部211が最後に受付けた「4」に対して、番号を付与できない。 Therefore, in the example of FIG. 7, the numbering unit 213 assigns the numbers "1" to "4" to the marked areas that contain "LL", "4", "3", and "4" in that order. The numbering unit 213 also assigns the numbers "1" to "4" to the marked areas in the order of "L", "L", "4", "3", and "4" that were accepted by the acceptance unit 211. Therefore, as shown in FIG. 7, the numbering unit 213 cannot assign a number to "4", which was accepted last by the acceptance unit 211.

このような場合、ユーザは、2つのマークを含む(すなわち1つのマークのみを含まない)マーク領域である「LL」において、1つ目の「L」を選択する。図8の符号1021では、制御部21が番号付与画像において1つ目の「L」を含む領域の選択を受付けた場合に、表示制御部214が第1選択領域SAR1を表示した状態を示している。この状態において、制御部21が領域ボタンBO5に対する入力操作を受付けると、設定部215は、第1選択領域SAR1を1つのマーク領域として再設定する。 In such a case, the user selects the first "L" in "LL", which is a mark area that contains two marks (i.e. does not contain only one mark). Reference numeral 1021 in FIG. 8 shows a state in which the display control unit 214 displays the first selection area SAR1 when the control unit 21 accepts the selection of an area that contains the first "L" in the numbered image. In this state, when the control unit 21 accepts an input operation on the area button BO5, the setting unit 215 re-sets the first selection area SAR1 as one mark area.

次に、ユーザは、2つのマークを含むマーク領域である「LL」において、2つ目の「L」を選択する。図8の符号1022では、制御部21が番号付与画像において2つ目の「L」を含む領域の選択を受付けた場合に、表示制御部214が第2選択領域SAR2を表示した状態を示している。この状態において、制御部21が領域ボタンBO5に対する入力操作を受付けると、設定部215は、第2選択領域SAR2を1つのマーク領域として再設定する。 Next, the user selects the second "L" in "LL", a mark area containing two marks. Reference numeral 1022 in FIG. 8 shows a state in which the display control unit 214 displays the second selection area SAR2 when the control unit 21 accepts the selection of an area containing the second "L" in the numbered image. In this state, when the control unit 21 accepts an input operation on the area button BO5, the setting unit 215 re-sets the second selection area SAR2 as one mark area.

このように、設定部215が、複数のマークが含まれるマーク領域について、1つのマークのみを含むようにマーク領域を再設定することにより、マーク領域を識別情報に含まれる記号に対応させることができる。この状態において、表示制御部214は、登録ボタンBO3に対するユーザ操作を受付けた場合、図6の符号1012に示す表示画像と同様、各マーク「L」「L」「4」「3」「4」を描画したマーク領域を表示させることができる。 In this way, the setting unit 215 can reconfigure a mark area that includes multiple marks so that it includes only one mark, thereby making the mark area correspond to the symbol included in the identification information. In this state, when the display control unit 214 receives a user operation on the registration button BO3, it can display a mark area in which the marks "L", "L", "4", "3", and "4" are drawn, similar to the display image shown by reference numeral 1012 in FIG. 6.

設定部215がマーク領域の再設定において、複数のマークを含むマーク領域を分割した場合、番号付与部213は、当該複数のマークに対応する複数の記号のうち、最初の記号以外の記号については、空番を付与する。そして、番号付与部213は、空番を付与した記号以降についての番号をずらして付与しなおす。 When the setting unit 215 divides a mark area that includes multiple marks when re-setting the mark area, the numbering unit 213 assigns an empty number to symbols other than the first symbol among the multiple symbols corresponding to the multiple marks. The numbering unit 213 then shifts and re-assigns numbers to the symbols following the symbol to which the empty number was assigned.

図8の符号1022の例では、2つ目の「L」に空番が付与されると共に、それ以降の「4」「3」「4」に対して番号「2」~「4」が付与されている。表示制御部214は、表示領域DAR1において、2つ目の「L」に対して番号を付与する箇所に空白領域SP1を挿入している。 In the example of reference number 1022 in FIG. 8, a blank number is assigned to the second "L", and the numbers "2" to "4" are assigned to the following "4", "3", and "4". The display control unit 214 inserts a blank area SP1 in the display area DAR1 where the second "L" is to be numbered.

(複数のマーク領域に跨って1つのマークが含まれる場合のマーク領域の再設定例)
図9に示す表示画像は、番号付与画像の一例である。図9の例では、受付部211は、識別情報として、「LL」「4」「3」「4」を受付けている。この例においては、説明の便宜上、「LL」が1文字であるものとして説明する。一方、抽出部212は、「L」「L」「4」「3」「4」の5つのマーク領域を抽出している。つまり、抽出部212は、「LL」の1文字を「L」「L」という2つの塊として抽出している。
(Example of re-setting a mark area when one mark is included across multiple mark areas)
The display image shown in Fig. 9 is an example of a number-assigned image. In the example of Fig. 9, the reception unit 211 receives "LL", "4", "3", and "4" as identification information. In this example, for the sake of convenience, the description will be given assuming that "LL" is one character. Meanwhile, the extraction unit 212 extracts five mark regions, "L", "L", "4", "3", and "4". In other words, the extraction unit 212 extracts the one character "LL" as two chunks, "L" and "L".

したがって、図9の例では、番号付与部213は、「L」「L」「4」「3」「4」のそれぞれを含むマーク領域に対して、この順に番号「1」~「5」を付与する。また、番号付与部213は、受付部211が受付けた「LL」「4」「3」「4」の順に、マーク領域に対して付与された番号「1」~「4」を付与する。そのため、番号付与部213は、受付部211が受付けた記号の数以上の番号(図9の符号1031では「5」)を、記号に付与できない。 Therefore, in the example of FIG. 9, the numbering unit 213 assigns the numbers "1" to "5" to the marked areas containing "L", "L", "4", "3", and "4" in that order. The numbering unit 213 also assigns the numbers "1" to "4" to the marked areas in the order of "LL", "4", "3", and "4" accepted by the acceptance unit 211. Therefore, the numbering unit 213 cannot assign a number to a symbol that is greater than the number of symbols accepted by the acceptance unit 211 (for example, "5" in the case of reference numeral 1031 in FIG. 9).

このような場合、ユーザは、1つのマークの一部を含む(すなわち1つのマークのみを含まない)マーク領域である「L」「L」について、「LL」をまとめて選択する。図9の符号1032では、制御部21が番号付与画像において「LL」を含む1つの領域の選択を受付けた場合に、表示制御部214が第3選択領域SAR3を表示した状態を示している。この状態において、制御部21が領域ボタンBO5に対する入力操作を受付けると、設定部215は、第3選択領域SAR3を1つのマーク領域として再設定する。 In this case, the user selects "LL" as a single mark area for "L" and "L", which are mark areas that contain part of one mark (i.e., do not contain only one mark). Reference numeral 1032 in FIG. 9 shows a state in which the display control unit 214 displays the third selection area SAR3 when the control unit 21 accepts the selection of an area that contains "LL" in the numbered image. In this state, when the control unit 21 accepts an input operation on the area button BO5, the setting unit 215 re-sets the third selection area SAR3 as one mark area.

このように、設定部215が、1つのマークを含む複数のマーク領域について、1つのマークのみを含むようにマーク領域を再設定することにより、マーク領域を識別情報に含まれる記号に対応させることができる。この状態において、表示制御部214は、登録ボタンBO3に対するユーザ操作を受付けた場合、図6の符号1012に示す表示画像と同様、各マーク「LL」「4」「3」「4」を描画したマーク領域を表示させることができる。 In this way, the setting unit 215 can reconfigure multiple mark areas that include one mark so that the mark area includes only one mark, thereby making the mark area correspond to the symbol included in the identification information. In this state, when the display control unit 214 receives a user operation on the registration button BO3, it can display a mark area in which the marks "LL", "4", "3", and "4" are drawn, similar to the display image shown by reference numeral 1012 in FIG. 6.

設定部215がマーク領域の再設定において、1つのマークを含む複数のマーク領域を統合した場合、番号付与部213は、以下のように番号を付与しなおす。番号付与部213は、受付部211が受付けた複数の記号に対して、当該複数のマーク領域に付与した複数の番号のうち、最初の番号以外の番号を削除した状態で、番号を付与しなおす。図9の符号1032の例では、2つ目のマーク領域に付与された番号「2」が削除されると共に、それ以降の「4」「3」「4」に対して番号「3」~「5」が付与されている。 When the setting unit 215 combines multiple marked areas containing one mark when re-setting a marked area, the numbering unit 213 re-assigns numbers as follows. The numbering unit 213 re-assigns numbers to the multiple symbols accepted by the acceptance unit 211 after deleting all numbers other than the first number that were assigned to the multiple marked areas. In the example of reference number 1032 in FIG. 9, the number "2" assigned to the second marked area is deleted, and the numbers "3" to "5" are assigned to the subsequent "4", "3", and "4".

(処理フロー)
本実施形態に係る制御部21の処理フロー(データ作成装置の制御方法)の一例について説明する。図10は、マスタデータの作成方法の別例を示すフローチャートである。
(Processing flow)
An example of a process flow (control method of the data creation device) of the control unit 21 according to the present embodiment will be described below. Fig. 10 is a flow chart showing another example of the master data creation method.

ユーザが指定した薬剤の画像が表示されている状態において、受付部211は、当該薬剤に形成された少なくとも1つのマークにより示される識別情報の入力を受付ける(S11;受付ステップ)。次に、抽出部212は、薬剤の画像において、薬剤に形成された1つのマークを含むマーク領域を少なくとも1つ抽出する(S12;抽出ステップ)。次に、番号付与部213は、S11において入力を受付けた識別情報に含まれる記号と、S12において抽出されたマーク領域とに対して、番号を付与する(S13)。表示制御部214は、上記記号およびマーク領域に付与した番号を表示する(S14)。 When an image of a drug specified by a user is displayed, the reception unit 211 receives input of identification information indicated by at least one mark formed on the drug (S11; reception step). Next, the extraction unit 212 extracts at least one mark area including one mark formed on the drug from the image of the drug (S12; extraction step). Next, the number assignment unit 213 assigns numbers to the symbol included in the identification information input in S11 and to the mark area extracted in S12 (S13). The display control unit 214 displays the numbers assigned to the symbol and the mark area (S14).

その後、受付部211は、登録操作を受付けたかを判定する(S15)。受付部211が登録操作を受付けた場合(S15でYES)、薬剤の画像をマスタ画像としたマスタデータを作成する(S16;作成ステップ)。受付部211は、登録操作の受付けを待機している間に(S15でNO)、薬剤の画像において領域を選択(指定)する入力操作を受付けたか(領域の選択後に領域ボタンBO5に対する入力操作を受付けたか)を判定する(S17)。 Then, the reception unit 211 determines whether a registration operation has been received (S15). If the reception unit 211 has received a registration operation (YES in S15), it creates master data with the image of the drug as the master image (S16; creation step). While waiting for the reception of the registration operation (NO in S15), the reception unit 211 determines whether an input operation to select (specify) an area in the image of the drug has been received (whether an input operation to the area button BO5 has been received after the selection of an area) (S17).

受付部211は、上記領域の選択を受付けていない場合(S17でNO)、S15の処理を行う。受付部211が上記領域の選択を受付けた場合(S17でYES)、設定部215は、選択された領域をマーク領域として再設定する(S18)。また、番号付与部213は、再設定されたマーク領域に基づき、識別情報に含まれる記号について、番号を付与しなおす(S19)。制御部21は、S19の処理後、S15の処理を行う。 If the reception unit 211 has not received the selection of the above area (NO in S17), it performs the process of S15. If the reception unit 211 has received the selection of the above area (YES in S17), the setting unit 215 resets the selected area as a marked area (S18). Furthermore, the numbering unit 213 renumbers the symbols included in the identification information based on the reset marked area (S19). After processing S19, the control unit 21 performs the process of S15.

〔実施形態3〕
薬剤仕分装置1は、起動時、または予め設定された時間帯に、薬剤総合データベースを上位の装置から受信可能であってよい。薬剤総合データベースは、複数の薬剤仕分装置1において使用され得る複数種類の薬剤についてのマスタデータを管理するデータベースである。薬剤仕分装置1は、薬剤総合データベースに含まれるマスタデータのうち、薬剤仕分装置1の薬剤データベースに含まれていないマスタデータを、薬剤データベースに追加してよい。薬剤仕分装置1は、薬剤総合データベースから薬剤データベースに追加したマスタデータを、新薬のマスタデータとして登録する。
[Embodiment 3]
The medicine sorting device 1 may be capable of receiving the comprehensive medicine database from a higher-level device at startup or during a preset time period. The comprehensive medicine database is a database that manages master data for multiple types of medicines that can be used in multiple medicine sorting devices 1. The medicine sorting device 1 may add master data contained in the comprehensive medicine database that is not included in the medicine database of the medicine sorting device 1 to the medicine database. The medicine sorting device 1 registers the master data added to the medicine database from the comprehensive medicine database as master data of a new medicine.

ここで、薬剤総合データベースに含まれるマスタデータには、薬剤の画像のデータが含まれていない場合がある。この場合、薬剤仕分装置1の薬剤総合データベースに追加されるマスタデータにも、薬剤の画像のデータは含まれない。薬剤の画像のデータがない場合、薬剤仕分装置1において当該薬剤を正しく判別できない可能性がある。 The master data included in the comprehensive drug database may not include drug image data. In this case, the master data added to the comprehensive drug database of the drug sorting device 1 also does not include drug image data. If there is no drug image data, the drug sorting device 1 may not be able to correctly identify the drug.

一般に、薬剤総合データベースの受信中には、表示制御部66は、受信の進捗状況を示す画像を表示部32に表示させる。しかし、例えば夜間など、ユーザが不在の時間帯に薬剤総合データベースを受信するように設定している場合、ユーザは通常の使用において、受信の進捗状況を示す画像を視認しない。この場合、薬剤総合データベースから薬剤データベースに追加されたマスタデータに薬剤の画像のデータが含まれていなくても、そのことをユーザが認識できない可能性がある。 Generally, while the comprehensive drug database is being received, the display control unit 66 causes the display unit 32 to display an image showing the progress of the reception. However, if the comprehensive drug database is set to be received during a time when the user is not present, such as at night, the user will not see the image showing the progress of the reception during normal use. In this case, even if the master data added to the drug database from the comprehensive drug database does not include drug image data, the user may not be aware of this.

本実施形態の薬剤仕分装置1においては、上位の装置から受信した薬剤総合データベースに含まれるマスタデータを薬剤データベースに追加した場合、表示制御部66は、追加の完了後に、新薬の一覧を示す画像を表示部32に表示させてよい。さらに、当該画像は、追加したマスタデータに薬剤の画像のデータが含まれているか否かを示す画像を含んでいてよい。これにより、薬剤仕分装置1のユーザは、薬剤総合データベースから薬剤データベースに追加されたマスタデータについて、薬剤の画像のデータの有無を容易に認識できる。 In the drug sorting device 1 of this embodiment, when master data contained in the comprehensive drug database received from a higher-level device is added to the drug database, the display control unit 66 may cause the display unit 32 to display an image showing a list of new drugs after the addition is complete. Furthermore, the image may include an image indicating whether or not the added master data includes drug image data. This allows the user of the drug sorting device 1 to easily recognize whether or not drug image data is included in the master data added to the drug database from the comprehensive drug database.

また、表示制御部66は、上記新薬の一覧を示す画像の表示を終了する指示入力を受付けるまで、当該画像の表示を継続してよい。これにより、ユーザは、薬剤総合データベースの受信中でなくても、上記新薬の有無を確認できる。さらに、上記新薬の一覧を示す画像が、追加したマスタデータに薬剤の画像のデータが含まれているか否かを示す画像を含んでいる場合には、ユーザは、上記薬剤の画像のデータの有無を認識できる。 The display control unit 66 may continue to display the image showing the list of new drugs until it receives an instruction to end the display of the image. This allows the user to check whether the new drugs are present even when the comprehensive drug database is not being received. Furthermore, if the image showing the list of new drugs includes an image indicating whether or not the added master data includes drug image data, the user can recognize whether or not the drug image data is present.

薬剤の画像のデータが無いマスタデータが存在することを認識した場合、ユーザは、例えば自身が所持している同種の薬剤(ユーザが勤務する病院または薬局等で使用している同種の薬剤)を用いて、マスタデータに薬剤の画像のデータを追加することができる。また、ユーザ自身が同種の薬剤を所持していない場合であっても、外部から同種の薬剤を調達して、薬剤データベースに薬剤の画像のデータを追加することもできる。例えば、ユーザが第1収容部11に当該薬剤を収容し、薬剤仕分装置1が薬剤仕分処理を実行することにより、薬剤仕分装置1は、当該薬剤の画像のデータを取得し、当該データを対象のマスタデータに対応付けてもよい。 When the user recognizes that there is master data without drug image data, the user can add drug image data to the master data, for example, by using a drug of the same type that the user possesses (a drug of the same type used at the hospital or pharmacy where the user works). Even if the user does not possess the same type of drug, the user can procure the same type of drug from outside and add the drug image data to the drug database. For example, the user may store the drug in the first storage unit 11 and the drug sorting device 1 may execute the drug sorting process, whereby the drug sorting device 1 may obtain the drug image data and associate the data with the target master data.

したがって、薬剤総合データベースから薬剤データベースにマスタデータが追加され、かつマスタデータに薬剤の画像のデータが含まれていない場合であっても、当該マスタデータに薬剤の画像のデータを対応付けることができる。そのため、薬剤仕分装置1による薬剤の判別性能を維持できる。 Therefore, even if master data is added to the drug database from the comprehensive drug database and the master data does not include drug image data, the drug image data can be associated with the master data. This allows the drug sorting device 1 to maintain its drug discrimination performance.

〔実施形態4〕
図11は、分包機構6の構成例を示す図である。図11の符号1041は、分包機構6の一部の構成例を概略的に示す図である。図11の符号1042及び符号1043は、上部シャッター機構6dにおける開閉動作について説明するための図であり、符号1044及び符号1045は、下部シャッター機構6eにおける開閉動作について説明するための図である。
[Embodiment 4]
Fig. 11 is a diagram showing a configuration example of the packaging mechanism 6. Reference numeral 1041 in Fig. 11 is a diagram showing a schematic configuration example of a part of the packaging mechanism 6. Reference numerals 1042 and 1043 in Fig. 11 are diagrams for explaining the opening and closing operation of the upper shutter mechanism 6d, and reference numerals 1044 and 1045 are diagrams for explaining the opening and closing operation of the lower shutter mechanism 6e.

図11の符号1041に示すように、分包機構6は、包装ホッパー6a、ヒーターローラー6b、移動通路6c、上部シャッター機構6d、及び下部シャッター機構6eを備えている。ヒーターローラー6b、上部シャッター機構6d、及び下部シャッター機構6eの制御は、分包制御部68によって行われる。 As shown by reference numeral 1041 in FIG. 11, the packaging mechanism 6 includes a packaging hopper 6a, a heater roller 6b, a moving passage 6c, an upper shutter mechanism 6d, and a lower shutter mechanism 6e. The heater roller 6b, the upper shutter mechanism 6d, and the lower shutter mechanism 6e are controlled by the packaging control unit 68.

包装ホッパー6aは、移動通路6cを通過(落下)した薬剤を受入れ、ヒーターローラー6bにセットされた分包紙PPに導くものである。具体的には、包装ホッパー6aは、移動通路6cを通過した薬剤を、ヒーターローラー6bによって薬剤が分包される前に載置される分包前薬剤載置領域MPArに導く。図11の符号1041では、分包紙PPは一点鎖線で示されている。包装ホッパー6aは、分包前薬剤載置領域MPArにおいて、ヒーターローラー6bの底部付近に薬剤を載置するために、ヒーターローラー6b側に向けて先細り形状となっている。 The packaging hopper 6a receives the medicine that has passed (fallen) through the moving path 6c and guides it to the packaging paper PP set on the heater roller 6b. Specifically, the packaging hopper 6a guides the medicine that has passed through the moving path 6c to a pre-packaging medicine placement area MPAr where the medicine is placed before being packaged by the heater roller 6b. In FIG. 11, the packaging paper PP is indicated by a dashed line at 1041. The packaging hopper 6a is tapered toward the heater roller 6b in order to place the medicine near the bottom of the heater roller 6b in the pre-packaging medicine placement area MPAr.

ヒーターローラー6bは、1包分ずつ薬剤を分包紙PPに分包するものである。具体的には、ヒーターローラー6bは、分包紙PPを熱融着して分包紙PPに薬剤を分包する。分包前薬剤載置領域MPArにおいて、分包紙PPに1包分の薬剤を載置しておくことで、1包分の薬剤毎に分包紙PPに分包できる。 The heater roller 6b packages one packet of medicine into the packaging paper PP. Specifically, the heater roller 6b heat-seals the packaging paper PP to package the medicine into the packaging paper PP. By placing one packet of medicine on the packaging paper PP in the pre-packaging medicine placement area MPAr, one packet of medicine can be packaged into the packaging paper PP.

なお、分包機構6は、同一種類毎に仕分けられた仕分カップ141から取り出された薬剤を分包する場合、1つの仕分カップ141に格納された薬剤の全てを1包分として分包しても構わない。また、仕分カップ141に格納された薬剤の数量が多い場合には、所定数量ずつ複数包に分割して分包しても構わない。分包機構6に設けられた印刷機構(不図示)により、分包紙PPに薬剤名を印字しても構わない。この場合、分包制御部68は、薬剤の取出し元である仕分カップ141のRFIDから薬剤データを読み出すことにより、当該薬剤を分包した分包紙PPに、当該薬剤の薬剤名を印字させる。これにより、ユーザは、各包にどの種類の薬剤が分包されているか否かを確認することが可能となる。また、分包機構6は、複数包に分割して分包した場合、各包に1/2、2/2といった印字を行うことにより、ユーザが、分包された対象薬剤の全包数を確認できるようにしても構わない。また、分包機構6は、仕分処理を実行した日付もしくは日時、又は、仕分処理を実行した病棟等の情報を分包紙PPに印字しても構わない。 In addition, when packaging medicines taken out of the sorting cups 141 sorted by the same type, the packaging mechanism 6 may package all of the medicines stored in one sorting cup 141 as one package. In addition, when the amount of medicines stored in the sorting cup 141 is large, the medicines may be divided into a predetermined amount of multiple packages and packaged. The name of the medicine may be printed on the packaging paper PP by a printing mechanism (not shown) provided in the packaging mechanism 6. In this case, the packaging control unit 68 reads the medicine data from the RFID of the sorting cup 141 from which the medicine was taken out, and prints the name of the medicine on the packaging paper PP that packages the medicine. This allows the user to check which type of medicine is packaged in each package. In addition, when the packaging mechanism 6 divides the medicine into multiple packages and packages it, the packaging mechanism 6 may print 1/2, 2/2, etc. on each package so that the user can check the total number of packages of the target medicine that has been packaged. Additionally, the packaging mechanism 6 may print information such as the date or time when the sorting process was performed, or the ward where the sorting process was performed, on the packaging paper PP.

移動通路6cは、搬送・仕分ユニット12によって仕分けられた薬剤(分包対象の薬剤)が投入される薬剤投入口17と、包装ホッパー6aとの間に設けられ、薬剤投入口17から投入された薬剤を包装ホッパー6aに導くものである。 The moving passage 6c is provided between the drug inlet 17, into which the drugs sorted by the conveying and sorting unit 12 (drugs to be packaged) are fed, and the packaging hopper 6a, and guides the drugs fed from the drug inlet 17 to the packaging hopper 6a.

上部シャッター機構6dは、薬剤投入口17に接続されており、かつ、薬剤投入口17に投入された分包対象ではない薬剤の、分包機構6への落下を防止する薬剤落下防止部として機能する。図11の符号1042に示すように、上部シャッター機構6dは、上部シャッター6da及び上部シャッター駆動部6dbを備えている。 The upper shutter mechanism 6d is connected to the medicine inlet 17 and functions as a medicine drop prevention unit that prevents medicines that are not to be packaged and that are inserted into the medicine inlet 17 from falling into the packaging mechanism 6. As shown by reference numeral 1042 in FIG. 11, the upper shutter mechanism 6d includes an upper shutter 6da and an upper shutter drive unit 6db.

上部シャッター6daは、薬剤投入口17の底部として機能する、開閉可能なシャッターである。上部シャッター駆動部6dbは、上部シャッター6daを駆動することで、上部シャッター6daの開閉動作を制御する。図11の符号1042は上部シャッター6daが開いている状態、符号1043は上部シャッター6daが閉じている状態を示している。 The upper shutter 6da is an openable/closable shutter that functions as the bottom of the medicine insertion port 17. The upper shutter drive unit 6db drives the upper shutter 6da to control the opening and closing operation of the upper shutter 6da. In FIG. 11, reference numeral 1042 indicates a state in which the upper shutter 6da is open, and reference numeral 1043 indicates a state in which the upper shutter 6da is closed.

上部シャッター6daは、通常は閉じた状態であり、分包対象の薬剤が薬剤投入口17に投入されたときに開く。具体的には、分包制御部68は、搬送・仕分ユニット12を制御することにより、分包対象の薬剤を該当する仕分カップ141から取出し、薬剤投入口17まで搬送する。分包制御部68は、薬剤投入口17に薬剤を投入した後、上部シャッター機構6dを制御することにより、閉じている上部シャッター6daを開く。これにより、薬剤投入口17に投入された薬剤は、移動通路6cを介して包装ホッパー6aへと導かれる。分包制御部68は、所定時間(投入された薬剤が移動通路6cへと落下するのに十分な時間)経過後、開いている上部シャッター6daを閉じる。 The upper shutter 6da is normally closed and opens when the medicine to be packaged is inserted into the medicine insertion port 17. Specifically, the packaging control unit 68 controls the transport and sorting unit 12 to remove the medicine to be packaged from the corresponding sorting cup 141 and transport it to the medicine insertion port 17. After the packaging control unit 68 inserts the medicine into the medicine insertion port 17, it controls the upper shutter mechanism 6d to open the closed upper shutter 6da. As a result, the medicine inserted into the medicine insertion port 17 is guided to the packaging hopper 6a via the moving path 6c. The packaging control unit 68 closes the open upper shutter 6da after a predetermined time has elapsed (a time sufficient for the inserted medicine to fall into the moving path 6c).

このように、上部シャッター機構6dを設けることにより、薬剤仕分装置1の動作中に、薬剤投入口17に誤って落下した薬剤(分包対象ではない薬剤)が、分包機構6により分包されてしまうことを回避できる。 In this way, by providing the upper shutter mechanism 6d, it is possible to prevent a drug (a drug that is not to be packaged) that accidentally falls into the drug insertion port 17 during operation of the drug sorting device 1 from being packaged by the packaging mechanism 6.

下部シャッター機構6eは、分包機構6で作成される1包分に含まれる薬剤の全てが、薬剤投入口17から投入されるまで、薬剤投入口17から投入された薬剤を一時的に保持する薬剤保持部として機能する。そのため、下部シャッター機構6e(具体的には、後述の下部シャッター6ea)は、薬剤投入口17と分包前薬剤載置領域MPArとの間に設けられていればよい。本実施形態では、下部シャッター機構6eは、包装ホッパー6aと移動通路6cとの間に設けられているが、これに限らず、例えば包装ホッパー6a又は移動通路6cの内部に設けられても構わない。 The lower shutter mechanism 6e functions as a drug holding section that temporarily holds the drug inserted through the drug insertion port 17 until all of the drug contained in one packet created by the packaging mechanism 6 has been inserted through the drug insertion port 17. Therefore, the lower shutter mechanism 6e (specifically, the lower shutter 6ea described below) only needs to be provided between the drug insertion port 17 and the pre-packaging drug placement area MPAr. In this embodiment, the lower shutter mechanism 6e is provided between the packaging hopper 6a and the moving passage 6c, but is not limited thereto, and may be provided, for example, inside the packaging hopper 6a or the moving passage 6c.

また、図11の符号1045に示すように、下部シャッター機構6eは、開閉可能な下部シャッター6ea(シャッター)を備えている。また、下部シャッター機構6eは、下部シャッター駆動部(不図示)を備えている。下部シャッター駆動部は、下部シャッター6eaを駆動することで、下部シャッター6eaの開閉動作を制御する。図11の符号1044は下部シャッター6eaが開いている状態、符号1045は下部シャッター6eaが閉じている状態を示している。 As shown by reference numeral 1045 in FIG. 11, the lower shutter mechanism 6e includes a lower shutter 6ea (shutter) that can be opened and closed. The lower shutter mechanism 6e also includes a lower shutter drive unit (not shown). The lower shutter drive unit drives the lower shutter 6ea to control the opening and closing operation of the lower shutter 6ea. Reference numeral 1044 in FIG. 11 indicates a state in which the lower shutter 6ea is open, and reference numeral 1045 indicates a state in which the lower shutter 6ea is closed.

下部シャッター6eaは、通常は閉じた状態であり、1包分の薬剤が下部シャッター6ea上に保持されたときに開く。具体的には、分包制御部68は、1包分に含まれる複数の薬剤のうち最後の薬剤が薬剤投入口17に投入され、上部シャッター6daを開いてから所定時間経過後、下部シャッター6eaを開く。これにより、1包分の薬剤が纏めて包装ホッパー6a(つまり、分包前薬剤載置領域MPAr)へと導かれる。但し、1包分に含まれる薬剤が1個の場合には、上記最後の薬剤は当該薬剤となる。 The lower shutter 6ea is normally closed and opens when one packet of medicine is held on the lower shutter 6ea. Specifically, the packaging control unit 68 opens the lower shutter 6ea a predetermined time after the last of the multiple medicines contained in one packet is inserted into the medicine insertion port 17 and the upper shutter 6da is opened. This causes one packet of medicine to be led together to the packaging hopper 6a (i.e., the pre-packaging medicine placement area MPAr). However, if one packet contains only one medicine, the last medicine will be that medicine.

ところで、印刷機構は、連続する分包の開始前および終了後に、印字および分包を行わない分包紙PP(空包)を発生させる。分包対象の薬剤を収容する仕分カップ141が1つである場合、印刷機構は、この分包の開始前および終了後に空包を発生させる。以下の説明では、この空包をロス袋と称する。 Incidentally, the printing mechanism generates packet paper PP (blank packets) that is not printed or packaged before and after successive packaging starts and ends. When there is one sorting cup 141 that contains the medicine to be packaged, the printing mechanism generates blank packets before and after packaging starts and ends. In the following description, these blank packets are referred to as loss bags.

薬剤仕分装置1においては、いずれかの仕分カップ141に所定の第1閾値の数の薬剤が格納された場合に、当該仕分カップ141に格納された薬剤が分包機構6へ払い出される動作モードが存在する。第1閾値は、例えば15であってよいがこれに限られない。当該動作モードにおいて、仮に分包制御部68が、分包機構6へ払い出した薬剤を都度分包すると、1つの仕分カップ141に格納された薬剤を分包するたびにロス袋が発生することとなるため、ロス袋が増加する。 The drug sorting device 1 has an operating mode in which, when a predetermined first threshold number of drugs is stored in any of the sorting cups 141, the drugs stored in that sorting cup 141 are dispensed to the packaging mechanism 6. The first threshold may be, for example, 15, but is not limited to this. In this operating mode, if the packaging control unit 68 packages the drugs dispensed to the packaging mechanism 6 each time, a waste bag will be generated each time the drugs stored in one sorting cup 141 is packaged, resulting in an increase in waste bags.

薬剤仕分装置1においては、分包制御部68は、いずれかの仕分カップ141に第1閾値の数の薬剤が格納され、当該仕分カップ141に格納された薬剤を分包機構6へ払い出した場合、当該薬剤を下部シャッター6ea上で待機させる。このとき、第1払出機構4により薬剤を分包機構6へ払い出す場合には、分包制御部68は、上部シャッター6daを開いた状態とし、閉じた状態の下部シャッター6ea上に薬剤を払い出す。また、吸着・シャッター機構122により薬剤を分包機構6へ払い出す場合には、分包制御部68は、閉じた状態の上部シャッター6da上に薬剤を1錠払い出すごとに、上部シャッター6daを開いて、閉じた状態の下部シャッター6ea上に薬剤を払い出す。 In the drug sorting device 1, when the first threshold number of drugs is stored in any of the sorting cups 141 and the drug stored in the sorting cup 141 is dispensed to the packaging mechanism 6, the packaging control unit 68 causes the drug to wait on the lower shutter 6ea. At this time, when dispensing drugs to the packaging mechanism 6 using the first dispensing mechanism 4, the packaging control unit 68 opens the upper shutter 6da and dispenses the drug onto the closed lower shutter 6ea. When dispensing drugs to the packaging mechanism 6 using the suction/shutter mechanism 122, the packaging control unit 68 opens the upper shutter 6da and dispenses the drug onto the closed lower shutter 6ea each time it dispenses one tablet of drug onto the closed upper shutter 6da.

分包制御部68は、下部シャッター6ea上に薬剤が待機している状態で、別の仕分カップ141に第1閾値の数の薬剤が格納されたときに、下部シャッター6ea上で待機していた薬剤を分包する。また、分包制御部68は、上述した別の仕分カップ141に格納された薬剤についても、分包機構6へ払い出して分包する。これにより、分包制御部68は、少なくとも2つの仕分カップ141に格納された薬剤を、連続して分包することができる。したがって、ロス袋の発生を低減できる。 When a first threshold number of medicines is stored in another sorting cup 141 while medicines are waiting on the lower shutter 6ea, the packaging control unit 68 packages the medicines that were waiting on the lower shutter 6ea. The packaging control unit 68 also dispenses the medicines stored in the other sorting cup 141 to the packaging mechanism 6 for packaging. This allows the packaging control unit 68 to continuously package medicines stored in at least two sorting cups 141. This reduces the occurrence of waste bags.

さらに、分包制御部68は、上述した2つの仕分カップ141に格納された薬剤を分包機構6により分包するときに、他の全ての仕分カップ141について、第1閾値よりも小さい第2閾値以上の数の薬剤が格納されているか否かを判定してもよい。例えば第1閾値が15である場合、第2閾値は10であってよいが、これに限られない。分包制御部68は、第2閾値以上の数の薬剤が格納されている仕分カップ141について、当該仕分カップ141に格納されている薬剤を分包機構6へ払い出して分包してよい。これにより、さらに多くの仕分カップ141に格納された薬剤を連続して分包することができる。したがって、ロス袋の発生をさらに低減できる。 Furthermore, when the packaging mechanism 6 packages the medicines stored in the above-mentioned two sorting cups 141, the packaging control unit 68 may determine whether or not all other sorting cups 141 store a number of medicines equal to or greater than a second threshold value that is smaller than the first threshold value. For example, if the first threshold value is 15, the second threshold value may be 10, but is not limited to this. For a sorting cup 141 in which a number of medicines equal to or greater than the second threshold value is stored, the packaging control unit 68 may dispense the medicines stored in that sorting cup 141 to the packaging mechanism 6 for packaging. This allows medicines stored in even more sorting cups 141 to be packaged continuously. Therefore, the generation of waste bags can be further reduced.

〔実施形態5〕
図12は、薬剤仕分装置1の変形例である薬剤仕分装置1Aにおける、台座19上の平面図である。薬剤仕分装置1Aは、薬剤仕分装置1が備える構成に加えて、イオナイザ18を備える。イオナイザ18は、矢印181で示す方向に、イオンを含む風を発生させる。イオナイザ18は、搬送・仕分ユニット12による薬剤の移動範囲とイオンを含む風の流れる範囲とが少なくとも一部において重畳する位置に配される。したがって、搬送制御部61は、搬送・仕分ユニット12により、イオンを含む風が当たる位置に薬剤を移動させることができる。
[Embodiment 5]
12 is a plan view of a base 19 of a medicine sorting device 1A, which is a modified example of the medicine sorting device 1. The medicine sorting device 1A includes an ionizer 18 in addition to the components of the medicine sorting device 1. The ionizer 18 generates a wind containing ions in the direction indicated by an arrow 181. The ionizer 18 is disposed at a position where the range of movement of the medicine by the transporting/sorting unit 12 and the range of the flow of the wind containing ions overlap at least partially. Therefore, the transport control unit 61 can move the medicine to a position where the wind containing ions hits it by the transporting/sorting unit 12.

搬送制御部61は、吸着機構により吸着した薬剤を目的の位置の上方まで搬送した後、吸着機構から空気を吹き出させることで、目的の位置に薬剤を落下させる。しかし、薬剤仕分装置1Aにおいては、薬剤が帯電する場合がある。特に、薬剤仕分装置1Aが低温かつ低湿度の環境下で使用される場合には、薬剤が帯電しやすくなる。この場合、吸着機構から空気を吹き出させても、薬剤を落下させることができない可能性がある。 The transport control unit 61 transports the medicine adsorbed by the adsorption mechanism above the target position, and then blows air from the adsorption mechanism to drop the medicine at the target position. However, in the medicine sorting device 1A, the medicine may become electrically charged. In particular, when the medicine sorting device 1A is used in a low-temperature, low-humidity environment, the medicine is likely to become electrically charged. In this case, even if air is blown from the adsorption mechanism, it may not be possible to drop the medicine.

薬剤仕分装置1Aにおいては、搬送制御部61は、目的の位置の上方において、吸着機構から空気を一定の回数吹き出させる。一定の回数は、薬剤が帯電していなければ確実に目的の位置に落下すると考えられる回数であればよく、例えば5回であってよいがこれに限られない。空気を一定の回数吹き出させた後に、薬剤の落下を検出できなかった場合、搬送制御部61は、帯電により吸着機構にぶら下がっている薬剤を、イオナイザ18からの風が当たる位置へ搬送する。このとき、搬送制御部61は、当該薬剤を、吸着機構に吸着させ直した状態で、シャッター機構を閉状態として搬送する。 In the drug sorting device 1A, the transport control unit 61 blows air from the adsorption mechanism above the target position a fixed number of times. The fixed number of times may be any number that would ensure that the drug would fall to the target position if it were not charged, and may be, for example, five times, but is not limited to this. If the drug is not detected as falling after blowing air a fixed number of times, the transport control unit 61 transports the drug that is hanging from the adsorption mechanism due to charging to a position where it is hit by the wind from the ionizer 18. At this time, the transport control unit 61 transports the drug with the shutter mechanism in a closed state, with the drug re-adsorbed by the adsorption mechanism.

例えば、撮像制御部63は、吸着機構が空気を一定の回数吹き出した後に、第2カメラ121による撮像を実行してもよい。そして、撮像制御部63は、第2カメラ121が撮像した画像を解析することにより、吸着機構が吸着していた薬剤が吸着機構から落下したかどうかを判定してもよい。ただし、撮像制御部63は、吸着機構が空気を吹き出すたびに、第2カメラ121による撮像を実行してもよい。この場合、撮像制御部63が、一定の回数未満の空気の吹き出しにより吸着機構から薬剤が落下したと判定した場合、搬送制御部61は、残りの回数分の空気の吹き出しを実行しなくてよい。 For example, the imaging control unit 63 may execute imaging by the second camera 121 after the suction mechanism blows air a certain number of times. Then, the imaging control unit 63 may determine whether the drug adsorbed by the suction mechanism has fallen from the suction mechanism by analyzing the image captured by the second camera 121. However, the imaging control unit 63 may execute imaging by the second camera 121 every time the suction mechanism blows air. In this case, if the imaging control unit 63 determines that the drug has fallen from the suction mechanism due to air being blown less than a certain number of times, the transport control unit 61 does not need to execute air blowing for the remaining number of times.

搬送制御部61は、イオナイザ18からの風が当たる位置に、薬剤を一定時間保持する。一定の時間は、薬剤が除電されるのに十分な長さであればよく、例えば5秒であってよいがこれに限られない。これにより、薬剤が除電される。その後、搬送制御部61は、薬剤を目的の位置の上方へ再度搬送し、シャッター機構を開状態とし、吸着機構から空気を吹き出させて目的の位置に薬剤を落下させる。 The transport control unit 61 holds the medicine in a position where it is exposed to the wind from the ionizer 18 for a certain period of time. The certain period of time may be long enough to de-ionize the medicine, and may be, for example, 5 seconds, but is not limited to this. This de-ionizes the medicine. The transport control unit 61 then transports the medicine again above the target position, opens the shutter mechanism, and blows air from the adsorption mechanism to drop the medicine at the target position.

以上のとおり、薬剤仕分装置1Aにおいては、搬送制御部61は、薬剤が帯電した場合であっても、イオナイザ18により薬剤を除電できる。したがって、薬剤を目的の位置に落下させることができずに薬剤仕分装置1Aの動作に支障が生じる可能性が低減される。 As described above, in the medicine sorting device 1A, the transport control unit 61 can neutralize the charge on the medicine using the ionizer 18 even if the medicine is charged. This reduces the possibility that the medicine cannot be dropped at the desired position, causing problems with the operation of the medicine sorting device 1A.

また、搬送制御部61は、吸着機構から空気を一定の回数吹き出させても薬剤が落下しなかった場合にのみ、イオナイザ18による除電のための動作を行う。したがって、除電のための動作による薬剤仕分装置1Aの動作の遅延を最小限にできる。さらに、静電気の影響が小さい環境下で薬剤仕分装置1Aが使用される場合には、除電のための動作は実行されないため、薬剤仕分装置1Aの動作に遅延が生じない。 The transport control unit 61 also performs the operation to remove static electricity using the ionizer 18 only if the medicine does not fall even after blowing air from the suction mechanism a certain number of times. This allows the delay in the operation of the medicine sorting device 1A caused by the operation to remove static electricity to be minimized. Furthermore, when the medicine sorting device 1A is used in an environment where the effects of static electricity are small, the operation to remove static electricity is not performed, so there is no delay in the operation of the medicine sorting device 1A.

また、搬送制御部61は、任意の搬送工程において、イオナイザ18からの風が当たる位置に薬剤を搬送して、その位置に薬剤を保持することにより薬剤を除電できる。このため、例えば目的の位置ごとにイオナイザを設ける場合などと比較して、薬剤仕分装置1Aのコストの増加する可能性を低減し、かつ、任意の搬送工程において除電を行うことができる。 In addition, the transport control unit 61 can transport the medicine to a position where it is exposed to the wind from the ionizer 18 during any transport process, and hold the medicine at that position to de-electrify the medicine. This reduces the possibility of an increase in the cost of the medicine sorting device 1A compared to, for example, providing an ionizer at each target position, and can perform de-electrification during any transport process.

図12においては、イオナイザ18は、台座19上に位置している。しかし、イオナイザ18は、搬送・仕分ユニット12と一体であってもよい。この場合、イオナイザ18による除電を任意の位置で行うことができる。 In FIG. 12, the ionizer 18 is located on a base 19. However, the ionizer 18 may be integrated with the transport/sorting unit 12. In this case, static elimination by the ionizer 18 can be performed at any position.

また、イオナイザ18は、台座19上において、静電気が滞留しやすい場所にイオンを含む風が当たる位置に配されてもよい。例えば、第1収容部11は、最初に薬剤が投入される場所であることから、他の場所と比較して静電気が滞留しやすい。イオンを含む風が第1収容部11に当たるようにイオナイザ18を配することで、第1収容部11を除電できる。 The ionizer 18 may be disposed on the base 19 in a position where the wind containing ions hits an area where static electricity is likely to accumulate. For example, the first storage unit 11 is the location where the medicine is first dispensed, and therefore is more likely to accumulate static electricity than other locations. By disposing the ionizer 18 so that the wind containing ions hits the first storage unit 11, the first storage unit 11 can be de-ionized.

また、イオナイザ18は、回収トレイ16の近傍の、薬剤仕分装置1Aの内壁に設けられてもよい。この場合、イオナイザ18からの風の一部は、回収トレイ16のみならず、第1収容部11および撮像ユニット13などにも到達する。したがって、この場合には、イオナイザ18によって、台座19上に位置する複数の構成要素を効率的に除電できる。 The ionizer 18 may also be provided on the inner wall of the medicine sorting device 1A near the collection tray 16. In this case, part of the wind from the ionizer 18 reaches not only the collection tray 16, but also the first storage section 11 and the imaging unit 13, etc. Therefore, in this case, the ionizer 18 can efficiently neutralize the static electricity of multiple components located on the base 19.

〔実施形態6〕
吸着・シャッター機構122の吸着機構(図15,図16の符号「122a」)が、受入領域Ar1に位置する薬剤載置台133aから薬剤を取出す場合、仕分制御部62は、第2カメラ121に、当該薬剤載置台133aを撮像させる。仕分制御部62は、薬剤載置台133aの画像を解析することにより、薬剤載置台133a上の薬剤の位置を特定する。仕分制御部62は、特定した薬剤の上方に吸着機構を移動させた後、吸着機構の先端部に設けられた吸着パッド(図15,図16の符号「122c」)を降下させることにより、薬剤載置台133a上の薬剤の吸着を試みる。
[Embodiment 6]
When the suction mechanism (reference symbol "122a" in Figs. 15 and 16) of the suction/shutter mechanism 122 takes out a medicine from the medicine mounting table 133a located in the receiving area Ar1, the sorting control unit 62 causes the second camera 121 to capture an image of the medicine mounting table 133a. The sorting control unit 62 identifies the position of the medicine on the medicine mounting table 133a by analyzing the image of the medicine mounting table 133a. The sorting control unit 62 moves the suction mechanism above the identified medicine, and then attempts to adsorb the medicine on the medicine mounting table 133a by lowering the suction pad (reference symbol "122c" in Figs. 15 and 16) provided at the tip of the suction mechanism.

仕分制御部62は、薬剤載置台133a上の薬剤を吸着できなかった場合、吸着パッドを一旦上昇させると共に、第2カメラ121に、薬剤載置台133aを再度撮像させる。仕分制御部62は、例えば、吸着パッドと吸引機構(例えば真空ポンプ。不図示。)とを接続する空気管(図15,図16の符号「122b」)(吸着ノズル)内の流量が所定の流量以下まで低下した場合、薬剤を吸着したと判定してよい。この場合、空気管内に流量センサが設けられる。 If the sorting control unit 62 is unable to adsorb the medicine on the medicine placement stage 133a, it raises the suction pad once and causes the second camera 121 to capture an image of the medicine placement stage 133a again. The sorting control unit 62 may determine that the medicine has been adsorbed, for example, when the flow rate in the air tube (122b in Figures 15 and 16) (suction nozzle) connecting the suction pad and the suction mechanism (e.g., a vacuum pump, not shown) falls below a predetermined flow rate. In this case, a flow sensor is provided in the air tube.

仕分制御部62は、薬剤載置台133aの画像に基づき薬剤載置台133a上の薬剤の位置を特定し、当該位置の上方に吸着機構を移動させた後、吸着パッドを降下させることにより、薬剤載置台133a上の薬剤の吸着を再度試みる。このように、仕分制御部62は、搬送・仕分ユニット12に、薬剤のピッキングのリトライ動作を実行させる。仕分制御部62が、予め規定された所定回数(例えば10回)リトライ動作を実行しても、薬剤載置台133a上の薬剤を吸着できなかった場合、表示制御部66は、薬剤を吸着できない旨のエラー報知を行う。 The sorting control unit 62 identifies the position of the drug on the drug mounting table 133a based on the image of the drug mounting table 133a, moves the suction mechanism above the position, and then lowers the suction pad to again attempt to suction the drug on the drug mounting table 133a. In this way, the sorting control unit 62 causes the transport/sorting unit 12 to execute a retry operation to pick up the drug. If the sorting control unit 62 is unable to suction the drug on the drug mounting table 133a even after executing a predetermined number of retry operations (e.g., 10 times), the display control unit 66 issues an error notification to the effect that the drug cannot be suctioned.

また、仕分制御部62は、撮像した画像を解析した結果、当該画像に薬剤の像が含まれていないと判定した場合には、当該薬剤がどこに移動してしまったのかを特定できないため、当該薬剤の仕分処理を中止し、次の薬剤の仕分処理を実行する。 In addition, if the sorting control unit 62 determines, as a result of analyzing the captured image, that the image does not contain an image of the medicine, it stops sorting the medicine and executes sorting processing for the next medicine, since it cannot identify where the medicine has moved.

ただし、撮像した画像に薬剤の像が含まれていない場合、降下した吸着パッドが、薬剤載置台133a上の薬剤を跳飛ばした可能性が高い。このように吸着パッドが薬剤を跳飛ばした場合、受入領域Ar1の近傍に位置する仕分カップ141(第1払出機構4により薬剤投入口17に搬送中の仕分カップ141を含む)等に当該薬剤が入込む可能性がある。 However, if the captured image does not include an image of the medicine, it is highly likely that the lowered suction pad has splashed the medicine off the medicine placement table 133a. If the suction pad splashes the medicine in this way, the medicine may enter the sorting cup 141 (including the sorting cup 141 being transported to the medicine inlet 17 by the first dispensing mechanism 4) located near the receiving area Ar1.

本実施形態では、仕分制御部62が、撮像した画像を解析した結果、当該画像に薬剤の像が含まれていないと判定した場合(薬剤載置台133a上の薬剤の紛失を検出した場合)、制御部60aは、薬剤載置台133a上の薬剤が跳飛ばされたことを報知する。 In this embodiment, if the sorting control unit 62 analyzes the captured image and determines that the image does not contain an image of the medicine (if the loss of the medicine on the medicine placement table 133a is detected), the control unit 60a notifies the user that the medicine on the medicine placement table 133a has been kicked away.

ここで、図1に示すように、薬剤仕分装置1は、印刷出力部7を備える。印刷出力部7は、仕分された薬剤に関する薬剤データが示す情報を印刷したジャーナルを出力する。当該薬剤データには、例えば、仕分された薬剤(1包に分包される薬剤)の名称、識別情報、数、薬価、返却先、薬剤コード(例:GS1コード)等が含まれていてよい。その他、印刷出力部7は、例えば仕分日時および目視鑑査結果等をジャーナルに印刷してよい。印刷出力部7は、制御部60aが備える印刷出力制御部69により制御される。 As shown in FIG. 1, the drug sorting device 1 includes a print output unit 7. The print output unit 7 outputs a journal that prints information indicated by drug data related to the sorted drugs. The drug data may include, for example, the name, identification information, quantity, drug price, return destination, drug code (e.g., GS1 code) and the like of the sorted drugs (drugs packaged in one packet). In addition, the print output unit 7 may print, for example, the sorting date and time and visual inspection results in the journal. The print output unit 7 is controlled by a print output control unit 69 included in the control unit 60a.

仕分制御部62が、上記画像に薬剤の像が含まれていないと判定した場合、印刷出力制御部69は、この判定のタイミングで印刷出力部7を制御して、薬剤載置台133a上の薬剤が跳飛ばされた旨の報知内容をジャーナルに印刷させる。印刷出力制御部69は、例えば、受入領域Ar1に位置する薬剤載置台133aの周辺に、薬剤載置台133a上に位置していた薬剤が存在していないかを確認するようユーザに促す報知内容を印刷したジャーナルを、印刷出力部7に出力させる。 If the sorting control unit 62 determines that the image does not include an image of the medicine, the print output control unit 69 controls the print output unit 7 at the timing of this determination to print in the journal a notification that the medicine on the medicine placing table 133a has been thrown away. For example, the print output control unit 69 causes the print output unit 7 to output a journal on which a notification is printed that prompts the user to check whether any medicine that was on the medicine placing table 133a is present around the medicine placing table 133a located in the receiving area Ar1.

また、印刷出力制御部69は、跳飛ばされた薬剤が混入した可能性がある仕分カップ141に収容されている薬剤を分包するときに、当該薬剤を分包した分包品を確認するようユーザに促す報知内容を印刷したジャーナルを、印刷出力部7に出力させる。例えば、当該仕分カップ141としては、例えば、図12においてA4、A5、B4、B5、B6の位置に配置された仕分カップ141が挙げられる。また、印刷出力制御部69は、当該仕分カップ141に収容されている薬剤を、容器取出機構124および第1払出機構4を用いて薬剤投入口17に払出す場合に、ジャーナルを出力してよい。仕分カップ141を第2収容部14から取出して、仕分カップ141に収容されている薬剤を薬剤投入口17に払出す場合、制御部60aが仕分カップ141への薬剤の混入を検出することが困難であるためである。 When packaging medicines contained in a sorting cup 141 that may have been mixed with a jumped medicine, the print output control unit 69 causes the print output unit 7 to output a journal in which notification content is printed to prompt the user to check the package containing the medicine. For example, the sorting cups 141 may be sorting cups 141 arranged at positions A4, A5, B4, B5, and B6 in FIG. 12. The print output control unit 69 may also output a journal when dispensing medicines contained in the sorting cup 141 to the medicine inlet 17 using the container removal mechanism 124 and the first dispensing mechanism 4. This is because it is difficult for the control unit 60a to detect the inclusion of medicines in the sorting cup 141 when the sorting cup 141 is removed from the second storage unit 14 and the medicines contained in the sorting cup 141 are dispensed to the medicine inlet 17.

このように、制御部60aが、薬剤載置台133a上の薬剤が跳飛ばされたことを報知して、ユーザに対して注意喚起(警告)を行うことにより、異なる種類の薬剤が同一の仕分カップ141に混在する状況で薬剤の仕分処理が続行される可能性を低減できる。そのため、安全性を担保した状態で薬剤の仕分処理を行うことができる。 In this way, the control unit 60a notifies the user that the medicine on the medicine placement table 133a has been thrown off and issues a warning to the user, thereby reducing the possibility that the medicine sorting process will be continued in a situation where different types of medicine are mixed in the same sorting cup 141. Therefore, the medicine sorting process can be carried out while ensuring safety.

〔実施形態7〕
吸着機構が薬剤の吸着を試みても、当該薬剤を吸着できない場合がある。吸着機構が薬剤を吸着できない要因としては、例えば、薬剤の仕分処理中または分包処理中において生じる振動により、ユーザが外すことを意図していない状況または位置において、空気管が吸着機構から外れて落下するということが考えらえる。これは、ユーザが清掃作業において吸着機構から空気管を取外した後、吸着機構に再度取付けるときに強固にネジを締めなかった等の作業ミス、または、空気管を含む吸着機構の経年劣化もしくは故障等により生じ得る。
[Embodiment 7]
Even if the suction mechanism tries to adsorb a medicine, it may not be able to adsorb the medicine. For example, the reason why the suction mechanism cannot adsorb the medicine may be that the air tube falls off the suction mechanism in a situation or position where the user does not intend to remove it due to vibrations generated during the sorting or packaging process of the medicine. This may be caused by a mistake such as the user not tightening the screw firmly when reattaching the air tube to the suction mechanism after removing it from the suction mechanism during cleaning work, or by aging or failure of the suction mechanism including the air tube.

空気管が落下した状態において吸着機構が薬剤の吸着を試みた場合、空気管内の流量が所定の流量以下まで低下しないため、吸着機構が薬剤のピッキングのリトライ動作を何度も繰り返し実行し、無駄な時間が費やされることになる。上述したように所定回数のリトライ動作後にエラーを報知する、または薬剤の仕分処理を中止するという設定がなされていない場合には、数百回に亘りリトライ動作が繰り返される可能性がある。さらに、落下した空気管が仕分カップ141等に引っかかった場合には、空気管、吸着機構またはその他の部材が破損する可能性もある。 If the suction mechanism attempts to pick up the medicine when the air tube has fallen, the flow rate in the air tube will not fall below the specified flow rate, and the suction mechanism will repeatedly retry picking the medicine, wasting time. As described above, if there is no setting to report an error or to stop the medicine sorting process after a specified number of retries, the retry operation may be repeated hundreds of times. Furthermore, if the fallen air tube gets caught in the sorting cup 141 or the like, the air tube, the suction mechanism, or other components may be damaged.

そこで本実施形態では、制御部60aは、空気管内の流量の変化に基づき、吸着機構から空気管が外れたかどうかを判定する。具体的には、吸着機構から空気管が外れた場合、空気管内の流量は、吸着機構が薬剤を吸着していない状態における空気管内の流量(正常値)よりも大きくなる。また、空気管内の流量は急激に大きくなる。制御部60aは、空気管内の流量が急激に正常値を超えたと判定した場合に、空気管が外れたことを検出する。空気管が外れたかどうかの判定に空気管内の流量を用いることにより、制御部60aは、空気管が外れたことを容易に検出できる。 In this embodiment, the control unit 60a determines whether the air tube has become detached from the adsorption mechanism based on a change in the flow rate in the air tube. Specifically, when the air tube becomes detached from the adsorption mechanism, the flow rate in the air tube becomes greater than the flow rate (normal value) in the air tube when the adsorption mechanism is not adsorbing the drug. The flow rate in the air tube also increases rapidly. The control unit 60a detects that the air tube has become detached when it determines that the flow rate in the air tube has suddenly exceeded the normal value. By using the flow rate in the air tube to determine whether the air tube has become detached, the control unit 60a can easily detect that the air tube has become detached.

そして制御部60aは、空気管が外れたことを検出した場合、すぐに薬剤仕分装置1の動作を停止し、エラーが発生したことを報知する。これにより、上記のリトライ動作が無駄に繰り返される可能性を回避できる。また、空気管が落下したまま薬剤仕分装置1が動作を続けることにより、薬剤仕分装置1が破損することを回避できる。 When the control unit 60a detects that the air tube has come off, it immediately stops the operation of the medicine sorting device 1 and notifies the user that an error has occurred. This makes it possible to avoid the possibility of the above-mentioned retry operation being repeated unnecessarily. It also makes it possible to avoid damage to the medicine sorting device 1 that would occur if the medicine sorting device 1 continued to operate with the air tube still dropped.

〔実施形態8〕
分包紙に収容できる薬剤の数には制限がある。そのため、制御部60aは、仕分カップ141に収容されている薬剤の数が、分包紙に収容できる薬剤の数以下(例:上述した第1閾値以下)でないと、容器取出機構124および第1払出機構4を用いた薬剤の払出しを行うことができない。
[Embodiment 8]
There is a limit to the number of medicines that can be accommodated in a packaging paper, and therefore the control unit 60a cannot dispense medicines using the container removal mechanism 124 and the first dispensing mechanism 4 unless the number of medicines accommodated in the sorting cup 141 is equal to or less than the number of medicines that can be accommodated in the packaging paper (e.g., equal to or less than the first threshold value described above).

仕分カップ141に第1閾値を超えた数の薬剤を収容できる動作モードの場合、分包制御部68は、仕分カップ141から薬剤を1つ取出し、薬剤投入口17まで搬送するという動作を、仕分カップ141に収容されている薬剤の数が第1閾値になるまで、搬送・仕分ユニット12に行わせる。この場合、吸着・シャッター機構122が、分包対象の薬剤を収容した仕分カップ141と、薬剤投入口17との間における往復移動を、複数回行う可能性がある。特に、当該仕分カップ141が薬剤投入口17から離れた位置にあるほど、吸着・シャッター機構122の移動に時間を要する。 In an operation mode in which the sorting cup 141 can contain a number of medicines that exceeds the first threshold, the packaging control unit 68 causes the transport/sorting unit 12 to perform the operation of removing one medicine from the sorting cup 141 and transporting it to the medicine input port 17 until the number of medicines contained in the sorting cup 141 reaches the first threshold. In this case, the suction/shutter mechanism 122 may perform multiple reciprocating movements between the sorting cup 141 containing the medicine to be packaged and the medicine input port 17. In particular, the farther the sorting cup 141 is located from the medicine input port 17, the longer it takes for the suction/shutter mechanism 122 to move.

分包制御部68は、分包対象の薬剤を収容した仕分カップ141に第1閾値を超える薬剤が収容されているかを判定する。記憶部80には、仕分カップ141の識別情報に対応付けて、仕分カップ141に収容されている薬剤の数を示す情報が記憶される。制御部60aは、仕分カップ141に薬剤を収容するたびに当該情報を更新する。分包制御部68は、当該情報を参照することにより、上記の判定を行う。 The packaging control unit 68 determines whether the sorting cup 141 that contains the medicine to be packaged contains more than a first threshold value of medicine. The memory unit 80 stores information indicating the number of medicines contained in the sorting cup 141 in association with the identification information of the sorting cup 141. The control unit 60a updates the information each time medicine is contained in the sorting cup 141. The packaging control unit 68 makes the above determination by referring to the information.

分包制御部68は、分包対象の薬剤を収容した仕分カップ141に第1閾値を超える薬剤が収容されていると判定した場合、第2収容部14において薬剤投入口17に最も近い仕分カップ141の配置位置に、当該仕分カップ141を移動させる。分包制御部68は、容器取出機構124を用いて当該仕分カップ141を取出した後、当該配置位置まで移動させる。以降、当該配置位置を、近接位置と称する。本実施形態において、近接位置は、図12に示すA3の位置である。また本実施形態では、移動させた仕分カップ141を近接位置に載置可能とするため、近接位置には仕分カップ141は配置されていない。 When the packaging control unit 68 determines that the sorting cup 141 containing the medicine to be packaged contains more than the first threshold value of medicine, it moves the sorting cup 141 to the position of the sorting cup 141 closest to the medicine inlet 17 in the second container 14. The packaging control unit 68 removes the sorting cup 141 using the container removal mechanism 124 and then moves it to that position. Hereinafter, this position is referred to as the proximity position. In this embodiment, the proximity position is position A3 shown in FIG. 12. Also, in this embodiment, the sorting cup 141 is not placed at the proximity position so that the moved sorting cup 141 can be placed at the proximity position.

そして、分包制御部68は、仕分カップ141に収容されている薬剤の数が第1閾値となるまで吸着・シャッター機構122を用いて1つずつ薬剤を薬剤投入口17に払出す。分包制御部68は、仕分カップ141に収容されている薬剤の数が第1閾値に達したと判定した場合、容器取出機構124および第1払出機構4を用いて、仕分カップ141に残っている薬剤を一括して薬剤投入口17に払出す。分包制御部68は、第1払出機構4を用いた払出しの完了後、仕分カップ141を元の配置位置に移動させる。なお、記憶部80には、仕分カップ141の識別情報に対応付けて、仕分カップ141の位置を示す情報が記憶されている。 Then, the packaging control unit 68 uses the suction/shutter mechanism 122 to dispense the medicines one by one into the medicine inlet 17 until the number of medicines contained in the sorting cup 141 reaches the first threshold. When the packaging control unit 68 determines that the number of medicines contained in the sorting cup 141 has reached the first threshold, it uses the container removal mechanism 124 and the first dispensing mechanism 4 to dispense all the medicines remaining in the sorting cup 141 into the medicine inlet 17 at once. After dispensing using the first dispensing mechanism 4 is completed, the packaging control unit 68 moves the sorting cup 141 to its original position. Note that the memory unit 80 stores information indicating the position of the sorting cup 141 in association with the identification information of the sorting cup 141.

このように、分包制御部68が、近接位置まで仕分カップ141を移動させてから吸着・シャッター機構122による払出しを実行することにより、吸着・シャッター機構122の移動距離を短くできる。そのため、吸着・シャッター機構122による薬剤の払出時間を短縮できる。また、吸着・シャッター機構122を移動させるための部品(例:モータおよびギア)の摩耗を軽減できる。 In this way, the packaging control unit 68 moves the sorting cup 141 to the close position before dispensing with the suction/shutter mechanism 122, thereby shortening the movement distance of the suction/shutter mechanism 122. This shortens the time it takes for the suction/shutter mechanism 122 to dispense the medicine. In addition, wear on the parts (e.g., motor and gears) used to move the suction/shutter mechanism 122 can be reduced.

仕分カップ141を近接位置に移動させずに薬剤の払出しを実行する場合と、近接位置に移動させてから実行する場合とにおいて、薬剤投入口17と仕分カップ141との間における吸着・シャッター機構122の移動時間に300msの差があった場合を考える。第1閾値が15であるとした場合、計算上、仕分カップ141に収容されている薬剤の数が32錠以上である場合、近接位置に移動させてから薬剤の払出しを実行した方が払出しに要する時間が短くなる。仕分カップ141に50錠収容されている場合には、払出しに要する時間を約10秒短縮できる。また、近接位置付近に配置された仕分カップ141を除く25個の仕分カップ141に50錠収容されている場合、払出しに要する時間を約4分短縮できる。25個の仕分カップ141は、A1,A2,A4,A5,B1~B5,C1~C5を除く仕分カップ141であってよい。 Consider a case where the difference in the movement time of the suction/shutter mechanism 122 between the medicine inlet 17 and the sorting cup 141 is 300 ms between dispensing medicine without moving the sorting cup 141 to the close position and dispensing medicine after moving it to the close position. If the first threshold value is 15, the calculation shows that if the number of medicines contained in the sorting cup 141 is 32 or more, the time required for dispensing medicine is shorter if the sorting cup 141 is moved to the close position and then dispensed. If 50 tablets are contained in the sorting cup 141, the time required for dispensing can be reduced by approximately 10 seconds. Also, if 50 tablets are contained in 25 sorting cups 141 excluding the sorting cup 141 located near the close position, the time required for dispensing can be reduced by approximately 4 minutes. The 25 sorting cups 141 may be sorting cups 141 excluding A1, A2, A4, A5, B1 to B5, and C1 to C5.

なお、本実施形態に示す処理は、薬剤投入口17から所定距離離れた位置に配置された仕分カップ141に対してのみ行われてもよい。分包制御部68は、仕分カップ141に第1閾値を超える薬剤が収容されていると判定した場合で、かつ、当該仕分カップ141が薬剤投入口17から所定距離離れた位置に配置されていると判定した場合に、当該仕分カップ141を近接位置に移動させてもよい。所定距離は任意に設定可能であり、薬剤投入口17から所定距離離れた位置を示す情報は、記憶部80に記憶されている。 The processing shown in this embodiment may be performed only on the sorting cup 141 that is placed at a predetermined distance from the medicine insertion port 17. When the packaging control unit 68 determines that the sorting cup 141 contains medicine exceeding the first threshold value and that the sorting cup 141 is placed at a predetermined distance from the medicine insertion port 17, the packaging control unit 68 may move the sorting cup 141 to a nearby position. The predetermined distance can be set arbitrarily, and information indicating a position at a predetermined distance from the medicine insertion port 17 is stored in the memory unit 80.

〔実施形態9〕
図13は、分包紙PPの一例を示す模式図である。図13の符号1051は、薬剤を分包する分包部分P1の前後に空包P2が連なっている状態の分包紙PP1の一例を示す図であり、符号1052は、随時分包専用の分包紙PP2の一例を示す図である。図14は、仕分カップ141に収容された薬剤が、分包部分P11に収容されるときの流れの一例を示す模式図である。
[Embodiment 9]
Fig. 13 is a schematic diagram showing an example of a packaging paper PP. Reference numeral 1051 in Fig. 13 shows an example of packaging paper PP1 in a state in which blank packets P2 are connected to the front and rear of a packaging portion P1 for packaging medicines, and reference numeral 1052 shows an example of packaging paper PP2 exclusively for occasional packaging. Fig. 14 is a schematic diagram showing an example of the flow when medicines contained in a sorting cup 141 are contained in a packaging portion P11.

実施形態4で説明したように、分包機構6の印刷機構は、分包の開始前および終了後に、印字および分包を行わない空包(ロス袋)を発生させる。図13の符号1051に示すように、印刷機構は、分包される薬剤が収容される分包紙(分包部分P1)の前後に、空包P2を発生させる。図13の符号1051の例では、印刷機構は、薬剤が収容される分包部分P1の前に3包分、分包部分P1の後に2包分の空包P2を発生させている。 As described in the fourth embodiment, the printing mechanism of the packaging mechanism 6 generates blank packets (loss bags) that are not printed or packaged before and after packaging begins and ends. As shown by reference numeral 1051 in FIG. 13, the printing mechanism generates blank packets P2 before and after the packaging paper (packaging portion P1) that contains the medicine to be packaged. In the example of reference numeral 1051 in FIG. 13, the printing mechanism generates three packets of blank packets P2 before the packaging portion P1 that contains the medicine and two packets of blank packets P2 after the packaging portion P1.

分包制御部68は、分包対象の薬剤を特定したときに、印刷機構を制御して、当該薬剤を収容する仕分カップ141に対応付けて記憶されている当該薬剤の薬剤データが示す情報を、当該薬剤を分包する分包部分P1に印刷する。その他、分包制御部68は、例えば仕分日時および目視鑑査結果等を分包部分P1に印刷してよい。 When the packaging control unit 68 identifies the drug to be packaged, it controls the printing mechanism to print information indicated by the drug data of the drug stored in association with the sorting cup 141 that contains the drug, on the packaging part P1 that packages the drug. In addition, the packaging control unit 68 may print, for example, the sorting date and time and the visual inspection results, etc., on the packaging part P1.

本実施形態では、仕分カップ141を示す識別情報、薬剤データ、仕分日時および目視鑑査結果等を示す情報は、仕分ID(図14の例では「TS」から始まるID)に対応付けて記憶されている。その他、仕分IDには、仕分カップ141の位置(仕分位置)を示す情報、および、第1カメラ131が撮像した薬剤の画像などが対応付けられていてよい。制御部60aは、例えば、薬剤の種類および仕分位置を決定したときに仕分IDを発行して、上記の各種情報を仕分IDに対応付けて記憶部80に記憶する。 In this embodiment, the identification information indicating the sorting cup 141, the drug data, the sorting date and time, the visual inspection results, etc. are stored in association with a sorting ID (an ID beginning with "TS" in the example of FIG. 14). In addition, the sorting ID may be associated with information indicating the position (sorting position) of the sorting cup 141, an image of the drug captured by the first camera 131, etc. The control unit 60a issues a sorting ID, for example, when it determines the type of drug and the sorting position, and stores the various information described above in association with the sorting ID in the memory unit 80.

ここで、薬剤仕分装置1の動作モードとして、随時分包モード(随時分包機能)が設定されている場合がある。この場合、制御部60aは、薬剤の仕分処理中に全ての仕分カップ141に薬剤が収容された時点で一旦、薬剤の仕分処理を中断し、所定数以上の数の薬剤が収容されている仕分カップ141については、当該薬剤を分包する。その後、制御部60aは、薬剤の仕分処理を再開する。 Here, the drug sorting device 1 may be set to an on-demand packaging mode (on-demand packaging function) as its operating mode. In this case, the control unit 60a temporarily suspends the drug sorting process when drugs are contained in all sorting cups 141 during the drug sorting process, and packages the drugs in sorting cups 141 that contain a predetermined number or more of drugs. The control unit 60a then resumes the drug sorting process.

随時分包モードに設定されている場合、薬剤の仕分処理を中断して行われる分包処理として、1包または2包分の分包といった細かい分包処理が多く行われる傾向にある。この分包処理が行われるたびに、数包(符号1051の例では5包)の空包P2が発生するため、第1収容部11に収容された薬剤の仕分処理が完了するまでの間に大量の空包P2が発生し、この空包P2分まで分包紙PP1を消費してしまう。随時分包モードにおいて、仮に1包分の分包処理が断続的に40回行われた場合であり、かつ1回の分包処理につき5包の空包P2が発生する場合、40個の分包部分P1(薬剤が収容された後は分包品(薬包))に対して、空包P2が200包発生することになる。 When the on-demand packaging mode is set, the drug sorting process is interrupted and the drug sorting process is performed, and small packaging processes such as one or two packets tend to be performed. Each time this packaging process is performed, several empty packets P2 (five packets in the example of reference number 1051) are generated, and a large amount of empty packets P2 is generated before the drug sorting process of the first storage unit 11 is completed, and the packaging paper PP1 is consumed for these empty packets P2. In the on-demand packaging mode, if the one-packet packaging process is performed intermittently 40 times and five empty packets P2 are generated per packaging process, 200 empty packets P2 will be generated for 40 package portions P1 (packaged products (medicine packets) after the drugs are contained).

そこで本実施形態では、随時分包モードに設定されている場合、分包制御部68は、印刷機構を制御して、予め随時分包IDを印刷した分包部分P11を備える分包紙PP2を作成しておく。具体的には、分包制御部68は、各分包部分P11に対して随時分包IDを割当てる。そして、図13の符号1052および図14に示すように、分包制御部68は、印刷機構を制御して、各分包部分P11に、各分包部分P11に対して割当てた随時分包IDを示すバーコードを印刷する。符号1052および図14の例では、分包制御部68は、各分包部分P11に、各分包部分P11に割当てた随時分包ID(「ZU」から始まるID)も印字している。 In this embodiment, when the on-demand packaging mode is set, the packaging control unit 68 controls the printing mechanism to create packaging paper PP2 including a packaging portion P11 on which an on-demand packaging ID has been printed in advance. Specifically, the packaging control unit 68 assigns an on-demand packaging ID to each packaging portion P11. Then, as shown by reference numeral 1052 in FIG. 13 and FIG. 14, the packaging control unit 68 controls the printing mechanism to print a barcode indicating the on-demand packaging ID assigned to each packaging portion P11 on each packaging portion P11. In the example of reference numeral 1052 and FIG. 14, the packaging control unit 68 also prints the on-demand packaging ID (an ID beginning with "ZU") assigned to each packaging portion P11 on each packaging portion P11.

予め作成する分包部分P11の数(随時分包IDの数)は、任意に設定可能である。予め作成する分包部分P11の数(随時分包IDの数)は、例えば、随時分包モードが設定された実験または実際の運用において、第1収容部11に収容された薬剤の仕分処理が完了するまでに行われた分包処理の回数等に基づき設定されてよい。 The number of packaging parts P11 (the number of on-demand packaging IDs) to be created in advance can be set arbitrarily. The number of packaging parts P11 (the number of on-demand packaging IDs) to be created in advance may be set based on, for example, the number of packaging processes performed until the sorting process of the medicines contained in the first container 11 is completed in an experiment or actual operation in which the on-demand packaging mode is set.

また本実施形態では、分包制御部68は、随時分包モードにおいて分包対象の薬剤を特定した後に、当該薬剤を収容する分包部分P11に割当てた随時分包IDと、当該薬剤に対応する仕分IDとを対応付ける。分包制御部68は、例えば上部シャッター6daまたは下部シャッター6eaを開いたときに(薬剤を分包部分P11に収容するときに)、随時分包IDと仕分IDとを対応付ける。 In addition, in this embodiment, after identifying the medicine to be packaged in the on-demand packaging mode, the packaging control unit 68 associates the on-demand packaging ID assigned to the packaging part P11 that contains the medicine with the sorting ID corresponding to the medicine. For example, when the upper shutter 6da or the lower shutter 6ea is opened (when the medicine is contained in the packaging part P11), the packaging control unit 68 associates the on-demand packaging ID with the sorting ID.

薬剤仕分装置1は、バーコードリーダ(不図示)を備えている。ユーザは、分包部分P11に収容された薬剤の目視鑑査時に、バーコードリーダに、当該分包部分P11に印刷された随時分包IDが読取らせる。これにより、制御部60aは、バーコードリーダが読取った随時分包IDに対応付けられた仕分IDに対応付けられた情報を、記憶部80から読出すことができる。したがって、表示制御部66は、目視鑑査時に、当該分包部分P11に分包された薬剤に関する情報を表示部32に表示できる。また、印刷出力制御部69は、操作部31を介して目視鑑査が完了したことを示す入力を受付けた後、薬剤に関する情報を印刷したジャーナルJNを印刷出力部7から出力させることができる。そのため、ユーザは、表示部32およびジャーナルJNを介して、薬剤に関する情報を視認できる。 The drug sorting device 1 is equipped with a barcode reader (not shown). When visually inspecting the drug contained in the package part P11, the user causes the barcode reader to read the package ID printed on the package part P11. This allows the control unit 60a to read information associated with the sorting ID associated with the package ID read by the barcode reader from the storage unit 80. Therefore, the display control unit 66 can display information about the drug packaged in the package part P11 on the display unit 32 during visual inspection. In addition, the print output control unit 69 can output a journal JN in which information about the drug is printed from the print output unit 7 after receiving an input indicating that the visual inspection has been completed via the operation unit 31. Therefore, the user can visually check the information about the drug via the display unit 32 and the journal JN.

分包部分P11には、薬剤の名称および返却先等の情報は印刷されないが、代わりにジャーナルJNに印刷される。そのため、ユーザは、薬剤が収容された分包部分P11と、目視鑑査後のジャーナルJNとをセットで保管しておくことにより、当該薬剤の名称および返却先等の情報を把握できる。また、随時分包モードにおいて空包をほとんど発生させないため、大量に発生した空包の中から、薬剤が収容された分包部分を探す手間を大幅に削減でき、さらに分包紙の消費量を削減できる。 Information such as the name of the drug and the return address are not printed on the packet part P11, but are instead printed on the journal JN. Therefore, by storing the packet part P11 containing the drug and the journal JN after visual inspection as a set, the user can ascertain information such as the name of the drug and the return address. In addition, because empty packets are rarely generated in the on-demand packet mode, the effort required to search for the packet part containing the drug among the large number of empty packets is greatly reduced, and the amount of packet paper consumed is also reduced.

<変形例1>
薬剤仕分装置1は、薬剤を払出す分包機(不図示)と通信可能に接続されていてもよい。この場合、制御部60aは、操作部31を介して目視鑑査が完了したことを示す入力を受付けた後、目視鑑査が行われた薬剤に関する情報と、当該薬剤に対応する仕分IDに対応付けられた随時分包IDとを、分包機に送信する。分包機の制御部は、当該薬剤に関する情報と随時分包IDとを対応付けて記憶する。
<Modification 1>
The medicine sorting device 1 may be communicably connected to a packaging machine (not shown) that dispenses medicines. In this case, the control unit 60a receives an input indicating that the visual inspection has been completed via the operation unit 31, and then transmits information about the medicine that has been visually inspected and an on-demand packaging ID associated with the sorting ID corresponding to the medicine to the packaging machine. The control unit of the packaging machine stores the information about the medicine and the on-demand packaging ID in association with each other.

ユーザは、分包機が備えるバーコードリーダに、薬剤が分包された分包部分P11に印刷された随時分包IDを読取らせる。これにより、分包機の制御部は、分包機が備える、種類毎に薬剤を収容する複数のカセットのうち、当該薬剤に関する情報と一致する情報が対応付けられたカセットを特定できる。そのため、ユーザは、当該薬剤が収容されたカセットに、分包部分P11に収容された薬剤を充填できる。 The user causes the barcode reader provided in the packaging machine to read the occasional packaging ID printed on the packaging part P11 in which the medicine is packaged. This allows the control unit of the packaging machine to identify a cassette, among the multiple cassettes provided in the packaging machine that contain medicines by type, that is associated with information that matches the information about the medicine. The user can then fill the cassette that contains the medicine with the medicine contained in the packaging part P11.

したがって、分包機のカセットに収容されている薬剤については、薬剤仕分装置1がジャーナルを出力しなくても、ユーザは分包機への充填業務を行うことができる。そのため、分包された薬剤の返却のために、薬剤仕分装置1がジャーナルを出力しなくてよい。また、ユーザがジャーナルを保管しておく必要がなくなるため、ジャーナル保管のための手間が削減される。 Therefore, for drugs stored in cassettes of the packaging machine, the user can perform the filling work into the packaging machine even if the drug sorting device 1 does not output a journal. Therefore, the drug sorting device 1 does not need to output a journal in order to return packaged drugs. In addition, since the user does not need to keep a journal, the effort required for keeping a journal is reduced.

<変形例2>
薬剤仕分装置1は、ラベルを出力するラベルプリンタと通信可能に接続されていてもよい。制御部60aは、操作部31を介して目視鑑査が完了したことを示す入力を受付けた後、目視鑑査が行われた薬剤に関する情報を、ラベルプリンタに出力する。これにより、ラベルプリンタは、ジャーナルに印刷される情報をラベルに印刷できる。したがって、印刷出力部7は、当該情報を印刷したジャーナルを出力しなくてよい。また、分包部分P11にラベルを直接貼付できるため、ジャーナル保管のための手間が削減される。
<Modification 2>
The medicine sorting device 1 may be communicably connected to a label printer that outputs a label. After receiving an input indicating that the visual inspection has been completed via the operation unit 31, the control unit 60a outputs information about the medicine that has been visually inspected to the label printer. This allows the label printer to print information to be printed in the journal on the label. Therefore, the print output unit 7 does not need to output a journal on which the information is printed. In addition, since the label can be directly attached to the package portion P11, the effort required for storing the journal is reduced.

〔実施形態10〕
図15は、本実施形態の回収トレイ16の構成例を示す斜視図である。図15では、回収トレイ16の上方に、吸着・シャッター機構122が位置している状態を示している。図15に示すように、吸着・シャッター機構122は、空気管122b、吸着パッド122cおよび円筒カバー122kを備える吸着機構122aと、シャッター機構122jと、を備える。空気管122bは、吸引機構によって、薬剤MD1を吸着するための吸着パッド122cから吸引した空気を通過させる中空部である。空気管122bは、Z軸方向に延伸しており、吸着パッド122cと共にZ軸方向に移動可能である。円筒カバー122kは、吸着パッド122cから落下した薬剤MD1の、シャッター機構122j上からの落下を防止する。
[Embodiment 10]
Fig. 15 is a perspective view showing a configuration example of the collection tray 16 of this embodiment. Fig. 15 shows a state in which the adsorption/shutter mechanism 122 is located above the collection tray 16. As shown in Fig. 15, the adsorption/shutter mechanism 122 includes an adsorption mechanism 122a including an air tube 122b, an adsorption pad 122c, and a cylindrical cover 122k, and a shutter mechanism 122j. The air tube 122b is a hollow portion through which air sucked from the adsorption pad 122c for adsorbing the medicine MD1 by the suction mechanism passes. The air tube 122b extends in the Z-axis direction and can move in the Z-axis direction together with the adsorption pad 122c. The cylindrical cover 122k prevents the medicine MD1 that has fallen from the adsorption pad 122c from falling from above the shutter mechanism 122j.

また図15に示すように、回収トレイ16には、接触部材161が設けられている。接触部材161は、吸着パッド122cに引っ付いた薬剤MD1を接触させて落下させる部材である。制御部60aは、吸着・シャッター機構122をXY平面と略平行に移動させ、吸着パッド122cに引っ付いた薬剤MD1を接触部材161に接触させることにより、当該薬剤MD1を回収トレイ16に落下させる。 As shown in FIG. 15, the collection tray 16 is provided with a contact member 161. The contact member 161 is a member that contacts and drops the drug MD1 stuck to the suction pad 122c. The control unit 60a moves the suction/shutter mechanism 122 approximately parallel to the XY plane, and brings the drug MD1 stuck to the suction pad 122c into contact with the contact member 161, thereby dropping the drug MD1 onto the collection tray 16.

接触部材161は、回収トレイ16の内壁から回収トレイ16の内部に突出するように設けられている。本実施形態では、接触部材161は、回収トレイ16の内壁の上方に位置している。これにより、吸着パッド122cに引っ付いた薬剤MD1を落下させるために空気管122bをZ軸方向に移動させる移動距離を短くできる。なお本実施形態では、接触部材161は、回収トレイ16における受入領域Ar1側の内壁から、回収トレイ16の内部に突出するように設けられている。 The contact member 161 is provided so as to protrude from the inner wall of the collection tray 16 into the inside of the collection tray 16. In this embodiment, the contact member 161 is located above the inner wall of the collection tray 16. This makes it possible to shorten the distance that the air tube 122b is moved in the Z-axis direction to drop the drug MD1 stuck to the suction pad 122c. Note that in this embodiment, the contact member 161 is provided so as to protrude from the inner wall of the collection tray 16 on the receiving area Ar1 side into the inside of the collection tray 16.

また本実施形態では、接触部材161は、板状部材である。さらに、接触部材161は、吸着パッド122cに引っ付いた薬剤MD1を落下させるために空気管122bをXY平面に略平行に移動させる移動方向に対して、回収トレイ16の内壁から離間している。 In this embodiment, the contact member 161 is a plate-shaped member. Furthermore, the contact member 161 is spaced apart from the inner wall of the collection tray 16 in the direction of movement of the air tube 122b, which is moved approximately parallel to the XY plane, in order to drop the medicine MD1 adhering to the suction pad 122c.

接触部材161の大きさ、形状および材質は、吸着パッド122cに引っ付いた薬剤MD1を落下させることができ、かつ、接触部材161への接触により薬剤MD1(例:カプセル、および、糖衣錠等の錠剤)が破損する可能性が低くなるように選択されてよい。接触部材161の材質は、例えばゴムであってよい。 The size, shape, and material of the contact member 161 may be selected so that the drug MD1 adhering to the suction pad 122c can be dropped, and so that the drug MD1 (e.g., capsules and tablets such as sugar-coated tablets) is less likely to be damaged by contact with the contact member 161. The material of the contact member 161 may be, for example, rubber.

吸着機構122aは、吸着パッド122cの方向に空気管122b内に空気を射出する機構(不図示)を備える。薬剤載置台133aおよび仕分カップ141等に薬剤MD1を収容するために、吸着パッド122cに吸着させた薬剤MD1をリリースする場合、制御部60aが当該機構を動作させることにより、吸着パッド122cから空気を吐出すことができる。しかし、この吐出し動作を行った場合であっても、薬剤MD1の粘性または静電気等により、吸着パッド122cから薬剤MD1が離れない場合がある。複数回に亘り吐出し動作(薬剤MD1のリリース動作)を行っても、吸着パッド122cから薬剤MD1が離れない場合もある。 The suction mechanism 122a includes a mechanism (not shown) that injects air into the air tube 122b in the direction of the suction pad 122c. When releasing the drug MD1 adsorbed to the suction pad 122c in order to store the drug MD1 in the drug placement table 133a, the sorting cup 141, or the like, the control unit 60a can operate the mechanism to eject air from the suction pad 122c. However, even when this ejection operation is performed, the drug MD1 may not separate from the suction pad 122c due to the viscosity or static electricity of the drug MD1. Even when the ejection operation (release operation of the drug MD1) is performed multiple times, the drug MD1 may not separate from the suction pad 122c.

本実施形態では、制御部60aは、吐出し動作を行うたびに、吸着パッド122cから薬剤MD1が離れたか(落下したか)を判定する。例えば空気管122b内に流量センサが設けられている場合、制御部60aは、空気管122b内の流量が所定の流量を超えた場合に、吸着パッド122cから薬剤MD1が離れたと判定する。 In this embodiment, the control unit 60a determines whether the drug MD1 has left (fallen) from the suction pad 122c each time the ejection operation is performed. For example, if a flow rate sensor is provided in the air tube 122b, the control unit 60a determines that the drug MD1 has left the suction pad 122c when the flow rate in the air tube 122b exceeds a predetermined flow rate.

制御部60aは、吐出し動作を行った後に、吸着パッド122cから薬剤MD1が離れていないと判定した場合、吐出し動作を再度実行する(吐出し動作のリトライ動作を実行する)。制御部60aは、予め規定された所定回数(例えば9回)リトライ動作を実行しても、吸着パッド122cから薬剤MD1を落下させることができなかった場合、吸着機構122aを回収トレイ16の上方に移動させる。 If the control unit 60a determines that the drug MD1 has not been released from the suction pad 122c after performing the ejection operation, it executes the ejection operation again (performs a retry operation of the ejection operation). If the control unit 60a is unable to drop the drug MD1 from the suction pad 122c even after performing a predetermined number of retry operations (e.g., nine times), it moves the suction mechanism 122a above the collection tray 16.

図16は、吸着パッド122cに引っ付いた薬剤MD1を落下させるときの吸着機構122aの動作例を示す模式図である。符号1062は、符号1061に示す模式図において、吸着機構122aおよび接触部材161付近を拡大した模式図である。 Figure 16 is a schematic diagram showing an example of the operation of the suction mechanism 122a when dropping the drug MD1 stuck to the suction pad 122c. Reference numeral 1062 is a schematic diagram showing an enlarged view of the suction mechanism 122a and the contact member 161 in the schematic diagram shown by reference numeral 1061.

制御部60aは、所定回数のリトライ動作後に吸着パッド122cから薬剤MD1が離れていないと判定した場合、当該薬剤MD1を落下させるために吸着機構122aを移動させる方向に接触部材161が位置するように、吸着機構122aを移動させる。図16の例では、接触部材161の左側に(-X軸方向側に)、吸着機構122aを位置させる。 When the control unit 60a determines that the drug MD1 has not been released from the suction pad 122c after a predetermined number of retry operations, it moves the suction mechanism 122a so that the contact member 161 is positioned in the direction in which the suction mechanism 122a is moved to drop the drug MD1. In the example of FIG. 16, the suction mechanism 122a is positioned to the left of the contact member 161 (in the -X-axis direction).

制御部60aは、吸着パッド122cに引っ付いた薬剤MD1を接触部材161に接触させることができるように、空気管122bを下方に移動させる。その後、制御部60aは、吸着機構122aを、接触部材161が位置する方向に(本例では+X軸方向)に移動させる。これにより、吸着機構122aに引っ付いた薬剤MD1を接触部材161に接触させて、当該薬剤MD1を吸着パッド122cからリリースすることができる。そして、当該薬剤MD1を回収トレイ16内に収容できる。 The control unit 60a moves the air tube 122b downward so that the drug MD1 stuck to the suction pad 122c can be brought into contact with the contact member 161. The control unit 60a then moves the suction mechanism 122a in the direction in which the contact member 161 is located (in this example, in the +X-axis direction). This allows the drug MD1 stuck to the suction mechanism 122a to be brought into contact with the contact member 161, and the drug MD1 can be released from the suction pad 122c. The drug MD1 can then be stored in the collection tray 16.

このように、所定回数の吐出し動作によって吸着パッド122cから落下させることができなかった薬剤MD1を、接触部材161への接触により落下させることができる。そのため、所定回数の吐出し動作によって吸着パッド122cから落下させることができなかった場合に、表示制御部66がその旨を報知して、ユーザに以下の作業を行わせる手間を発生させないようにすることができる。この報知により、薬剤MD1の仕分処理または分包処理を停止させた後に、吸着パッド122cに引っ付いた薬剤MD1を取り除く作業を、ユーザに行わせる手間を発生させないようにすることができる。 In this way, the drug MD1 that could not be dropped from the suction pad 122c by a predetermined number of ejection operations can be dropped by contacting the contact member 161. Therefore, when the drug MD1 cannot be dropped from the suction pad 122c by a predetermined number of ejection operations, the display control unit 66 notifies the user of this fact, thereby preventing the user from having to go through the trouble of performing the following tasks. This notification prevents the user from having to go through the trouble of removing the drug MD1 stuck to the suction pad 122c after the sorting process or packaging process of the drug MD1 is stopped.

〔実施形態11〕
図17の符号1071は、薬剤の仕分画像(仕分画面)の一例を示す図であり、符号1072は、メニューの一例を示す図であり、符号1073は、仕分履歴画像(仕分履歴画面)の一例を示す図である。
[Embodiment 11]
Reference numeral 1071 in Figure 17 is a diagram showing an example of a medicine sorting image (sorting screen), reference numeral 1072 is a diagram showing an example of a menu, and reference numeral 1073 is a diagram showing an example of a sorting history image (sorting history screen).

符号1071に示す仕分画像IM1は、薬剤の仕分状況等を表示可能な画像である。仕分画像IM1に含まれるメニューボタンBO11に対する入力操作を受付けた後、符号1072に示す「仕分履歴」の「履歴照会」に対する入力操作を受付けると、表示制御部66は、符号1073に示す仕分履歴画像IM2を表示部32に表示する。 The sorting image IM1 indicated by the reference symbol 1071 is an image capable of displaying the sorting status of medicines, etc. After accepting an input operation for the menu button BO11 included in the sorting image IM1, when an input operation for "History inquiry" of "Sorting history" indicated by the reference symbol 1072 is accepted, the display control unit 66 displays the sorting history image IM2 indicated by the reference symbol 1073 on the display unit 32.

仕分履歴画像IM2には、仕分履歴情報として、例えば、仕分完了日時、目視鑑査日(目視確認日)、仕分ID、薬剤の名称(薬品名)、返却先、返却元、目視鑑査結果(目視結果)、目視鑑査実施者名(目視確認者名)および個数等の情報を表示できる。制御部60aは、薬剤を仕分するときに発行する仕分IDに対応付けて、仕分ID以外の情報を記憶部80に記憶する。 The sorting history image IM2 can display, as sorting history information, information such as the sorting completion date and time, visual inspection date (visual confirmation date), sorting ID, drug name (drug name), return destination, return origin, visual inspection result (visual inspection result), name of visual inspection performer (name of visual inspector), and quantity. The control unit 60a stores information other than the sorting ID in the memory unit 80 in association with the sorting ID issued when sorting the drugs.

仕分完了日時は、第1収容部11に収容された全ての薬剤の仕分処理が完了した日時を示す。目視鑑査日は、目視鑑査が完了したことを示す入力操作を受付けた日時を示す。薬剤の名称は、判別部64が判別した名称、または、目視鑑査により確定した名称を示す。返却先は、薬剤の返却先(例:分包機、薬剤棚)を示す。返却元は、薬剤の仕分処理の開始時に指定された返却元(例:店舗)を示す。目視鑑査結果は、仕分カップ141に収容された薬剤が同一種類の薬剤であることと、薬剤の名称とを確認した結果を示し、目視鑑査時の入力操作により入力される。目視鑑査実施者名は、仕分カップ141に収容された薬剤に対して目視鑑査を実施した者の名称(例:氏名)を示し、目視鑑査時の入力操作により入力される。 The sorting completion date and time indicates the date and time when the sorting process of all the medicines contained in the first container 11 was completed. The visual inspection date indicates the date and time when an input operation was received indicating that the visual inspection was completed. The name of the medicine indicates the name determined by the discrimination unit 64 or the name confirmed by visual inspection. The return destination indicates the destination to which the medicine is returned (e.g., a packaging machine, medicine shelf). The return source indicates the return source (e.g., a store) specified when the medicine sorting process began. The visual inspection result indicates the result of confirming that the medicines contained in the sorting cup 141 are the same type of medicine and the name of the medicine, and is input by an input operation during the visual inspection. The name of the person who performed the visual inspection indicates the name (e.g., name) of the person who performed the visual inspection of the medicines contained in the sorting cup 141, and is input by an input operation during the visual inspection.

符号1073の例では、記憶部80に記憶されている仕分履歴情報のうち、薬剤「○○○500mg」の仕分履歴情報(薬剤「○○○500mg」の検索結果)が表示されている。符号1073に示すように、仕分履歴画像IM2は、薬剤の仕分処理の実施期間、仕分ID、および、薬剤の名称に加えて、目視鑑査実施者名を検索可能とする表示領域DAR1を含む。したがって、表示制御部66は、仕分履歴画像IM2において、目視鑑査実施者名に基づく検索結果も表示できる。 In the example of reference numeral 1073, the sorting history information for the drug "XXX 500 mg" (search results for the drug "XXX 500 mg") is displayed from the sorting history information stored in the memory unit 80. As shown by reference numeral 1073, the sorting history image IM2 includes a display area DAR1 that makes it possible to search for the name of the person who carried out the visual inspection in addition to the period during which the drug was sorted, the sorting ID, and the name of the drug. Therefore, the display control unit 66 can also display search results based on the name of the person who carried out the visual inspection in the sorting history image IM2.

このように、仕分履歴情報において目視鑑査実施者名を記憶しておき、仕分履歴画像において目視鑑査実施者名を表示させることができる。そのため、ユーザは、薬剤の仕分処理毎に、目視鑑査実施者を視認できる。したがって、ユーザは、薬剤の仕分処理後の目視鑑査においてミスが生じていた場合に、当該薬剤の目視鑑査実施者を容易に特定できる。なお、制御部60aは、検索結果を、CSV(Comma Separated Values)ファイルとして出力することもできる。 In this way, the name of the visual inspector can be stored in the sorting history information and the name of the visual inspector can be displayed in the sorting history image. This allows the user to visually identify the visual inspector for each drug sorting process. Therefore, if an error occurs in the visual inspection after the drug sorting process, the user can easily identify the person who performed the visual inspection of that drug. The control unit 60a can also output the search results as a CSV (Comma Separated Values) file.

〔実施形態12〕
本実施形態の薬剤仕分装置1Bについて説明する。薬剤仕分装置1Bは、図18に示す赤外センサ51、カメラ52(第2撮像部)および反射部53と、図19に示す制御部60bおよび記憶部80bとを備える点で、薬剤仕分装置1と異なる。薬剤仕分装置1Bは、薬剤データベースが存在しない場合に、赤外センサ51の測定結果を用いて、可能な限り精度よく薬剤の仕分処理を行うものである。
[Embodiment 12]
The medicine sorting device 1B of this embodiment will be described. The medicine sorting device 1B differs from the medicine sorting device 1 in that it includes an infrared sensor 51, a camera 52 (second image capturing unit), and a reflecting unit 53 shown in Fig. 18, and a control unit 60b and a storage unit 80b shown in Fig. 19. When a medicine database does not exist, the medicine sorting device 1B performs medicine sorting processing as accurately as possible using the measurement results of the infrared sensor 51.

図18の符号1081は、薬剤仕分装置1Bの台座19における各部材の配置例を示す模式図であり、符号1082は、赤外センサ51の配置例を示す模式図である。符号1081に示すように、台座19上に、赤外センサ51、カメラ52および反射部53が設けられている。本実施形態では、上述した薬剤仕分装置1の基本構成における第2収容部14の角部(第1収容部11から最も離れた位置の角部)に赤外センサ51が設けられ、その周囲にカメラ52および反射部53が設けられている。 Reference numeral 1081 in FIG. 18 is a schematic diagram showing an example of the arrangement of each component on the base 19 of the medicine sorting device 1B, and reference numeral 1082 is a schematic diagram showing an example of the arrangement of the infrared sensor 51. As shown by reference numeral 1081, the infrared sensor 51, the camera 52, and the reflector 53 are provided on the base 19. In this embodiment, the infrared sensor 51 is provided at a corner of the second storage unit 14 (the corner located farthest from the first storage unit 11) in the basic configuration of the medicine sorting device 1 described above, and the camera 52 and the reflector 53 are provided around it.

赤外センサ51は、対象物から発せられる赤外光を受光するセンサである。本実施形態では、赤外センサ51は、薬剤MD2から発せられる赤外光を受光するセンサである。また本実施形態では、赤外センサ51は、赤外を受光する受光部と共に、光を出射する光出射部とを備える。赤外センサ51は、対象物(薬剤MD2)に照射された光により発せられる赤外光を受光する。 The infrared sensor 51 is a sensor that receives infrared light emitted from the object. In this embodiment, the infrared sensor 51 is a sensor that receives infrared light emitted from the drug MD2. In this embodiment, the infrared sensor 51 includes a light receiving unit that receives infrared light and a light emitting unit that emits light. The infrared sensor 51 receives infrared light emitted by light irradiated to the object (drug MD2).

赤外光は、対象物を透過する性質を有する。そのため、赤外センサ51は、薬剤MD2を構成する組成毎に異なる波形を有する赤外光を受光できる。そのため、薬剤MD2の内部の情報を示す、薬剤MD2から発せられる赤外光を用いることにより、同種である可能性が高い薬剤MD2を同一の仕分カップ141に収容できる可能性を高めることができる。つまり、後述する決定部74による仕分カップ141の決定を精度よく行うことが可能となる。 Infrared light has the property of penetrating objects. Therefore, the infrared sensor 51 can receive infrared light having a waveform that differs for each composition that makes up the drug MD2. Therefore, by using infrared light emitted from the drug MD2, which indicates information about the inside of the drug MD2, it is possible to increase the possibility that drugs MD2 that are likely to be of the same type can be stored in the same sorting cup 141. In other words, it becomes possible for the sorting cup 141 to be determined with high accuracy by the determination unit 74, which will be described later.

本実施形態では、赤外センサ51は、近赤外光を受光する近赤外センサである。近赤外光の波長範囲は、可視光の波長範囲に近い。また、近赤外光の光強度は、中赤外光または遠赤外光の光強度よりも低い。そのため、赤外センサ51として近赤外センサを用いる場合(近赤外光を出射する場合は特に)、薬剤に対する影響度(例:薬剤の変色等)が低い。したがって、仕分カップ141の決定精度を高めるために近赤外光を用いることは好適である。但し、薬剤MD2の種類毎に異なる波形を有する赤外光を受光することが可能であれば、赤外センサ51が受光対象とする赤外光は近赤外光に限られない。 In this embodiment, the infrared sensor 51 is a near-infrared sensor that receives near-infrared light. The wavelength range of near-infrared light is close to the wavelength range of visible light. Furthermore, the light intensity of near-infrared light is lower than the light intensity of mid-infrared light or far-infrared light. Therefore, when a near-infrared sensor is used as the infrared sensor 51 (especially when emitting near-infrared light), the degree of influence on the medicine (e.g., discoloration of the medicine, etc.) is low. Therefore, it is preferable to use near-infrared light to improve the determination accuracy of the sorting cup 141. However, as long as it is possible to receive infrared light having a waveform that differs for each type of medicine MD2, the infrared light that the infrared sensor 51 receives is not limited to near-infrared light.

符号1082に示すように、赤外センサ51は、赤外センサ51の上方に薬剤MD2が位置した状態で、薬剤MD2から発せられる赤外光を受光する。本実施形態では、赤外センサ51は、赤外センサ51からその上方に所定距離(例えば数ミリ程度。例えば1mm程度。)離れた位置で、薬剤MD2から発せられる赤外光を受光する。 As shown by the reference numeral 1082, the infrared sensor 51 receives infrared light emitted from the drug MD2 when the drug MD2 is positioned above the infrared sensor 51. In this embodiment, the infrared sensor 51 receives infrared light emitted from the drug MD2 at a position above the infrared sensor 51 at a predetermined distance (e.g., about several millimeters, e.g., about 1 mm).

カメラ52は、赤外センサ51が測定対象とする薬剤MD2を撮像する撮像部である。本実施形態では、カメラ52は、赤外センサ51の測定範囲(赤外センサ51からその上方に所定距離離れた位置)を撮像可能なように、台座19上に設置される。 The camera 52 is an imaging unit that captures an image of the drug MD2 that is the measurement target of the infrared sensor 51. In this embodiment, the camera 52 is installed on the base 19 so that it can capture an image of the measurement range of the infrared sensor 51 (a position a predetermined distance above the infrared sensor 51).

反射部53は、赤外センサ51が測定対象とする薬剤MD2を反射する部材(ミラー)である。本実施形態では、反射部53は、赤外センサ51の上方に位置する薬剤がカメラ52の方向に反射されるように、台座19上に設置される。したがって、カメラ52は、赤外センサ51の上方に位置する薬剤MD2を直接撮像すると共に、反射部53が反射した薬剤MD2を撮像する。制御部60bは、薬剤MD2を直接撮像した画像に基づき、±X軸方向および±Z軸方向における薬剤MD2の位置を特定できる。また制御部60bは、反射部53を介して薬剤MD2を間接的に撮像した画像に基づき、±Y軸方向における薬剤MD2の位置を特定できる。 The reflecting unit 53 is a member (mirror) that reflects the drug MD2 that is the measurement target of the infrared sensor 51. In this embodiment, the reflecting unit 53 is installed on the base 19 so that the drug located above the infrared sensor 51 is reflected toward the camera 52. Therefore, the camera 52 directly images the drug MD2 located above the infrared sensor 51, and also images the drug MD2 reflected by the reflecting unit 53. The control unit 60b can identify the position of the drug MD2 in the ±X-axis direction and the ±Z-axis direction based on the image of the drug MD2 directly captured. The control unit 60b can also identify the position of the drug MD2 in the ±Y-axis direction based on the image of the drug MD2 indirectly captured via the reflecting unit 53.

図19の符号1091は、本実施形態の薬剤仕分装置1Bの構成例を示すブロック図である。図19では、制御部60bが行う処理に関わる機能で、かつ、図1に図示がない機能のみを示している。なお、図1に示す仕分制御部62が位置制御部71として機能し得る。また、図19の符号1092に示す制御部60bの構成については後述する。 Reference numeral 1091 in FIG. 19 is a block diagram showing an example of the configuration of the medicine sorting device 1B of this embodiment. FIG. 19 shows only functions related to the processing performed by the control unit 60b and functions that are not shown in FIG. 1. Note that the sorting control unit 62 shown in FIG. 1 can function as the position control unit 71. The configuration of the control unit 60b shown by reference numeral 1092 in FIG. 19 will be described later.

符号1091に示すように、本実施形態の制御部60bは、位置制御部71、取得部72、画像生成部73および決定部74を備える。 As indicated by the reference numeral 1091, the control unit 60b of this embodiment includes a position control unit 71, an acquisition unit 72, an image generation unit 73, and a determination unit 74.

位置制御部71は、搬送・仕分ユニット12の搬送機構123を制御して、台座19を平面視したときの吸着・シャッター機構122の位置を制御する。位置制御部71は、カメラ52の撮像結果に基づき、赤外センサ51の上方において、薬剤が所定位置(赤外センサ51の測定範囲内)に位置するように、吸着・シャッター機構122の位置を制御する。吸着・シャッター機構122は、カメラ52の撮像結果に基づき、赤外センサ51に対する薬剤の位置を調整する調整部として機能する。 The position control unit 71 controls the transport mechanism 123 of the transport/sorting unit 12 to control the position of the suction/shutter mechanism 122 when the base 19 is viewed in a plan view. Based on the imaging results of the camera 52, the position control unit 71 controls the position of the suction/shutter mechanism 122 so that the drug is located at a predetermined position (within the measurement range of the infrared sensor 51) above the infrared sensor 51. The suction/shutter mechanism 122 functions as an adjustment unit that adjusts the position of the drug relative to the infrared sensor 51 based on the imaging results of the camera 52.

このように薬剤の位置を調整することにより、薬剤が赤外センサ51と接触する可能性を低減できる。また、赤外センサ51との接触により吸着パッド122cから薬剤が落下する可能性を低減できる。さらに、赤外センサ51と薬剤との距離(測定距離)を一定にすることができるため、安定した赤外センサ51の測定が可能となる。 By adjusting the position of the drug in this manner, the possibility of the drug coming into contact with the infrared sensor 51 can be reduced. In addition, the possibility of the drug falling off the suction pad 122c due to contact with the infrared sensor 51 can be reduced. Furthermore, the distance (measurement distance) between the infrared sensor 51 and the drug can be kept constant, allowing stable measurement by the infrared sensor 51.

なお、赤外センサ51の測定範囲内に載置台を設け、当該載置台に薬剤を載置した場合、他の薬剤との間でコンタミネーションが発生する。そのため本実施形態では、この発生を回避すべく、赤外センサ51による薬剤から発せられる赤外光の測定は、吸着・シャッター機構122が薬剤を吸着した状態で行われる。 If a mounting table is provided within the measurement range of the infrared sensor 51 and a drug is placed on the mounting table, contamination will occur between the drug and other drugs. Therefore, in this embodiment, to prevent this from occurring, the infrared sensor 51 measures the infrared light emitted from the drug while the adsorption/shutter mechanism 122 is adsorbing the drug.

取得部72は、赤外センサ51が受光した赤外光の、周波数と強度との関係を示す波形データを取得する。図20の符号1101は、取得部72が取得する波形データの一例を示す。符号1101において、横軸は赤外光の周波数(nm)を示し、縦軸は赤外光の強度を示す。符号1101は、1550(nm)以上かつ1950(nm)以下の範囲の近赤外光の波形データを示している。 The acquisition unit 72 acquires waveform data indicating the relationship between the frequency and intensity of the infrared light received by the infrared sensor 51. Reference numeral 1101 in FIG. 20 indicates an example of waveform data acquired by the acquisition unit 72. In reference numeral 1101, the horizontal axis indicates the frequency (nm) of the infrared light, and the vertical axis indicates the intensity of the infrared light. Reference numeral 1101 indicates waveform data of near-infrared light in the range of 1550 (nm) or more and 1950 (nm) or less.

画像生成部73は、取得部72が取得した波形データに対してスペクトログラム変換を実行することにより、当該波形データの周波数成分特性を表す特性画像を生成する。図20の符号1102は、画像生成部73が生成する特性画像の一例を示す。符号1102は、符号1101の波形データから得られた特性画像である。 The image generating unit 73 generates a characteristic image representing the frequency component characteristics of the waveform data acquired by the acquiring unit 72 by performing a spectrogram conversion on the waveform data. Reference numeral 1102 in FIG. 20 shows an example of a characteristic image generated by the image generating unit 73. Reference numeral 1102 is a characteristic image obtained from the waveform data of reference numeral 1101.

符号1102において、特性画像の横軸は、波形データを縦×横のグラフとしてみたときの横軸に対応する周波数(nm)を示す。特性画像の横軸は、符号1101に示す波形データのグラフの横軸と一致する。本実施形態では、特性画像の横軸は、1550(nm)以上かつ1950(nm)以下の範囲に設定される。この横軸に対応する周波数を基準周波数と称する。特性画像の縦軸は、波形データを縦×横のグラフとしてみたときの、波形データの周波数(nm)を示す。また、特性画像の画素の値は、波形データを縦×横のグラフとしてみたときの、波形データの振幅を示す。本実施形態では、画素の値が大きいほど(白色であるほど)、波形データの振幅が大きい(赤外光の強度が高い)ことを示している。 In reference number 1102, the horizontal axis of the characteristic image indicates the frequency (nm) corresponding to the horizontal axis when the waveform data is viewed as a vertical x horizontal graph. The horizontal axis of the characteristic image coincides with the horizontal axis of the waveform data graph shown by reference number 1101. In this embodiment, the horizontal axis of the characteristic image is set in the range of 1550 (nm) or more and 1950 (nm) or less. The frequency corresponding to this horizontal axis is referred to as the reference frequency. The vertical axis of the characteristic image indicates the frequency (nm) of the waveform data when the waveform data is viewed as a vertical x horizontal graph. In addition, the pixel value of the characteristic image indicates the amplitude of the waveform data when the waveform data is viewed as a vertical x horizontal graph. In this embodiment, the larger the pixel value (the whiter the pixel), the larger the amplitude of the waveform data (the higher the intensity of the infrared light).

画像生成部73は、基準周波数の全範囲について所定範囲(窓)で区切り、所定範囲毎においてフーリエ変換を実行することにより、所定範囲毎の周波数スペクトルを算出する。画像生成部73は、基準周波数の全範囲について、最小値から最大値へと所定範囲をずらしながら、所定範囲毎の周波数スペクトルを算出する。図20において、符号1101の波形データの第1範囲R1、第2範囲R2および第3範囲R3に対してフーリエ変換を実行した結果がそれぞれ、符号1102の特性画像の第1範囲R1、第2範囲R2および第3範囲R3に反映される。画像生成部73は、このようなスペクトログラム変換を実行することにより、特性画像を生成する。つまり、画像生成部73は、波形データに対して一般的な短時間フーリエ変換に相当する処理を実行することにより、特性画像を生成する。 The image generating unit 73 divides the entire range of the reference frequency into predetermined ranges (windows) and calculates a frequency spectrum for each predetermined range by performing a Fourier transform for each predetermined range. The image generating unit 73 calculates a frequency spectrum for each predetermined range while shifting the predetermined range from the minimum value to the maximum value for the entire range of the reference frequency. In FIG. 20, the results of performing a Fourier transform on the first range R1, the second range R2, and the third range R3 of the waveform data of reference numeral 1101 are reflected in the first range R1, the second range R2, and the third range R3 of the characteristic image of reference numeral 1102, respectively. The image generating unit 73 generates a characteristic image by performing such a spectrogram transform. In other words, the image generating unit 73 generates a characteristic image by performing a process equivalent to a general short-time Fourier transform on the waveform data.

決定部74は、取得部72が取得した、種類が未知の薬剤の波形データと、収容先の仕分カップ141が既に決定している薬剤の波形データとに基づき、種類が未知の薬剤を収容する仕分カップ141を決定する。本実施形態では、決定部74は、画像生成部73が生成した、種類が未知の薬剤に対応する第1特性画像と、収容先の仕分カップ141が既に決定している薬剤に対応する第2特性画像とを用いて、種類が未知の薬剤を収容する仕分カップ141を決定する。具体的には、決定部74は、第1特性画像、第2特性画像、および、後述する学習済みモデル801を用いて、種類が未知の薬剤を収容する仕分カップ141を決定する。なお本実施形態では、収容先の仕分カップ141が既に決定している薬剤は、仕分カップ141に既に仕分けられた薬剤である。 The determination unit 74 determines the sorting cup 141 that will contain the unknown type of medicine based on the waveform data of the medicine of unknown type acquired by the acquisition unit 72 and the waveform data of the medicine for which the destination sorting cup 141 has already been determined. In this embodiment, the determination unit 74 determines the sorting cup 141 that will contain the unknown type of medicine using the first characteristic image corresponding to the medicine of unknown type generated by the image generation unit 73 and the second characteristic image corresponding to the medicine for which the destination sorting cup 141 has already been determined. Specifically, the determination unit 74 determines the sorting cup 141 that will contain the unknown type of medicine using the first characteristic image, the second characteristic image, and a trained model 801 described later. Note that in this embodiment, the medicine for which the destination sorting cup 141 has already been determined is a medicine that has already been sorted into the sorting cup 141.

薬剤仕分装置1Bは、記憶部80に代えて記憶部80bを備える。記憶部80bは、記憶部80の薬剤データベースに代えて、学習済みモデル801を記憶している。 The drug sorting device 1B has a memory unit 80b instead of the memory unit 80. The memory unit 80b stores a trained model 801 instead of the drug database of the memory unit 80.

学習済みモデル801は、以下の訓練データを用いて機械学習を行うことにより構築された、第1特性画像と第2特性画像とが一致しているかどうかを出力するモデルである。訓練データには、同種である2つの薬剤についての特性画像を、当該特性画像同士が一致することを示す情報に対応付けたデータが含まれる。また訓練データには、異種である2つの薬剤についての特性画像を、当該特性画像同士が一致しないことを示す情報に対応付けたデータが含まれる。 The trained model 801 is a model that outputs whether the first characteristic image and the second characteristic image match, and is constructed by performing machine learning using the following training data. The training data includes data that associates characteristic images for two drugs of the same type with information indicating that the characteristic images match. The training data also includes data that associates characteristic images for two drugs of different types with information indicating that the characteristic images do not match.

学習済みモデル801は、例えば、入力層、中間層および出力層を少なくとも含むニューラルネットワーク(例:畳み込みニューラルネットワーク(Convolutional Neural Network:CNN))であってよい。学習済みモデル801は、訓練データを順次入力して、損失関数を最小化するようにパラメータ(重みおよびバイアス)を学習することにより構築される。 The trained model 801 may be, for example, a neural network (e.g., a Convolutional Neural Network (CNN)) that includes at least an input layer, an intermediate layer, and an output layer. The trained model 801 is constructed by sequentially inputting training data and training parameters (weights and biases) to minimize a loss function.

学習済みモデル801は、第1特性画像と第2特性画像との入力に対して、第1特性画像と第2特性画像とが一致している、または一致していないとの結果を出力する。本実施形態では、この結果を確率値として出力する。確率値が1に近いほど、2つの画像が一致している可能性が高いことを示す。学習済みモデル801が、2つの特性画像が一致しているとの結果を出力した場合、決定部74は、収容先の仕分カップ141が既に決定している薬剤が収容される当該仕分カップ141を、種類が未知の薬剤を収容する仕分カップ141として決定する。本実施形態では、決定部74は、既に仕分けられた薬剤が収容されている仕分カップ141を、種類が未知の薬剤を収容する仕分カップ141として決定する。 When the first characteristic image and the second characteristic image are input, the trained model 801 outputs a result that the first characteristic image and the second characteristic image match or do not match. In this embodiment, this result is output as a probability value. The closer the probability value is to 1, the more likely it is that the two images match. If the trained model 801 outputs a result that the two characteristic images match, the determination unit 74 determines the sorting cup 141 that contains the medicine whose destination sorting cup 141 has already been determined as the sorting cup 141 that contains the medicine of an unknown type. In this embodiment, the determination unit 74 determines the sorting cup 141 that contains the medicine that has already been sorted as the sorting cup 141 that contains the medicine of an unknown type.

ここで、第1収容部11から最初に取出される薬剤については(何れの仕分カップ141も薬剤の収容先として決定されていない状態においては)、決定部74は、予め決められた仕分カップ141を、当該薬剤を収容する仕分カップ141として決定する。 Here, for the medicine that is first removed from the first storage unit 11 (when no sorting cup 141 has been determined as the storage destination for the medicine), the determination unit 74 determines a predetermined sorting cup 141 as the sorting cup 141 that will store the medicine.

決定部74は、その後に第1収容部11から取出される薬剤については、当該薬剤の特性画像と、記憶部80bに記憶されている全ての特性画像とを用いて、当該薬剤を収容する仕分カップ141を決定する。記憶部80bに記憶されている全ての特性画像は、収容先の仕分カップ141が決定している全ての薬剤の特性画像に相当する。 For a drug subsequently removed from the first container 11, the determination unit 74 determines the sorting cup 141 that will contain the drug, using the characteristic image of the drug and all characteristic images stored in the memory unit 80b. All characteristic images stored in the memory unit 80b correspond to the characteristic images of all drugs for which the sorting cup 141 in which the drug is to be contained has been determined.

本実施形態では、決定部74は、収容先の決定対象である薬剤の第1特性画像と、収容先の仕分カップ141が既に決定している薬剤のうちの1つの薬剤の第2特性画像とを学習済みモデル801に入力する。学習済みモデル801が、これら2つの特性画像が一致しているとの結果を出力したとする。この場合、決定部74は、比較対象とした第2特性画像の薬剤の収容先として既に決定されている仕分カップ141を、収容先の決定対象である薬剤を収容する仕分カップ141として決定する。 In this embodiment, the determination unit 74 inputs to the trained model 801 a first characteristic image of the drug for which a storage destination is to be determined, and a second characteristic image of one of the drugs for which a storage destination sorting cup 141 has already been determined. It is assumed that the trained model 801 outputs a result indicating that these two characteristic images match. In this case, the determination unit 74 determines the sorting cup 141 that has already been determined as the storage destination for the drug in the second characteristic image that is the comparison target, as the sorting cup 141 that will store the drug for which a storage destination is to be determined.

一方、学習済みモデル801が、これら2つの特性画像が一致していないとの結果を出力したとする。この場合、決定部74は、第1特性画像と、収容先が既に決定している薬剤のうちの別の薬剤の第2特性画像とを学習済みモデル801に入力する。そして、決定部74は、これら2つの特性画像が一致しているとの結果を得た場合、比較対象とした第2特性画像の薬剤の収容先として既に決定されている仕分カップ141を、収容先の決定対象である薬剤を収容する仕分カップ141として決定する。一方、決定部74は、これら2つの特性画像が一致していないとの結果を得た場合、第1特性画像と、収容先が既に決定している薬剤のうちのさらに別の薬剤の第2特性画像とを学習済みモデル801に入力する。 On the other hand, suppose that the trained model 801 outputs a result indicating that these two characteristic images do not match. In this case, the determination unit 74 inputs the first characteristic image and a second characteristic image of another drug among the drugs whose destination has already been determined to the trained model 801. Then, when the determination unit 74 obtains a result indicating that these two characteristic images match, it determines the sorting cup 141 that has already been determined as the destination of the drug of the second characteristic image used as the comparison target as the sorting cup 141 that will contain the drug whose destination is to be determined. On the other hand, when the determination unit 74 obtains a result indicating that these two characteristic images do not match, it inputs the first characteristic image and a second characteristic image of yet another drug among the drugs whose destination has already been determined to the trained model 801.

決定部74は、2つの特性画像が一致しているとの結果を得るまで、学習済みモデル801に第1特性画像および第2特性画像を入力する。その結果、全ての第2特性画像について第1特性画像と一致していないとの結果を得た場合、決定部74は、収容先として決定していない仕分カップ141を、収容先の決定対象である薬剤を収容する仕分カップ141として決定する。そして、仕分制御部62は、搬送・仕分ユニット12を制御して、収容先の決定対象である薬剤を、決定部74が決定した仕分カップ141に収容する。 The determination unit 74 inputs the first characteristic image and the second characteristic image into the trained model 801 until it obtains a result indicating that the two characteristic images match. If the determination unit 74 obtains a result indicating that none of the second characteristic images match the first characteristic image, the determination unit 74 determines a sorting cup 141 that has not been determined as a storage destination as the sorting cup 141 that will store the medicine for which a storage destination is to be determined. The sorting control unit 62 then controls the transport/sorting unit 12 to store the medicine for which a storage destination is to be determined in the sorting cup 141 determined by the determination unit 74.

なお、制御部60bは判別部64を備えていなくてもよい。記憶部80bには薬剤データベースが記憶されていないため、第1カメラ131が撮像した薬剤の画像と薬剤データベースとの照合による薬剤の種類判別を行うことができないためである。本実施形態では、仕分けられた薬剤の種類は以下のように特定されてよい。 The control unit 60b does not have to include the discrimination unit 64. This is because the storage unit 80b does not store a drug database, and therefore it is not possible to discriminate the type of drug by comparing the image of the drug captured by the first camera 131 with the drug database. In this embodiment, the type of sorted drug may be identified as follows.

例えば、表示制御部66は、仕分カップ141毎に、仕分カップ141に収容された薬剤の画像を表示部32に表示する。ユーザは、この表示を視認することにより薬剤の種類を特定し、操作部31を介して当該種類を入力する。制御部60bは、入力された種類を示す情報を仕分カップ141の識別情報と対応付けて記憶することにより、仕分カップ141に収容された薬剤の種類を特定する。 For example, the display control unit 66 displays an image of the medicine contained in each sorting cup 141 on the display unit 32. The user identifies the type of medicine by visually checking this display and inputs the type via the operation unit 31. The control unit 60b identifies the type of medicine contained in the sorting cup 141 by storing information indicating the input type in association with the identification information of the sorting cup 141.

また、制御部60bは、図1の判別部64に代えて、判別部64bを備えていてもよい。判別部64bは、第1特性画像または第1カメラ131が撮像した薬剤の画像の入力に対して薬剤の種類を出力する学習済みモデル(種類推定モデルと称する)を用いて、仕分カップ141に収容される薬剤の種類を判別してもよい。種類推定モデルは、例えば、薬剤の種類と特性画像または薬剤の画像とを対応付けた訓練データを用いて機械学習を行うことにより構築される。種類推定モデルは、記憶部80bに予め記憶されていてもよいし、ユーザが薬剤の種類を入力するたびに訓練データを作成することにより構築されていってもよい。 The control unit 60b may also include a discrimination unit 64b instead of the discrimination unit 64 in FIG. 1. The discrimination unit 64b may discriminate the type of drug contained in the sorting cup 141 using a trained model (referred to as a type estimation model) that outputs the type of drug in response to the input of the first characteristic image or the image of the drug captured by the first camera 131. The type estimation model is constructed, for example, by performing machine learning using training data that associates the type of drug with the characteristic image or the image of the drug. The type estimation model may be stored in advance in the storage unit 80b, or may be constructed by creating training data each time the user inputs the type of drug.

<処理フロー>
図21を用いて、本実施形態の制御部60bの処理の一例について説明する。図21は、本実施形態の制御部60bの処理の一例を示すフローチャートである。
<Processing flow>
An example of the process of the control unit 60b of this embodiment will be described with reference to Fig. 21. Fig. 21 is a flowchart showing an example of the process of the control unit 60b of this embodiment.

第1収容部11に複数の薬剤が収容されている状態において、搬送制御部61は、搬送・仕分ユニット12を制御して、第1収容部11から薬剤を1つ取出し(S21)、薬剤載置台133a上に載置する。撮像制御部63は、撮像ユニット13を制御して、薬剤載置台133a上に載置された薬剤を撮像する(S22)。位置制御部71は、搬送・仕分ユニット12を制御して、撮像ユニット13による撮像後の薬剤を、薬剤載置台133aから赤外センサ51の上方に搬送する(S23)。このとき、位置制御部71は、カメラ52の撮像結果に基づき、薬剤が赤外センサ51の上方の所定位置に位置するように、搬送機構123を制御する。 When multiple medicines are stored in the first storage section 11, the transport control section 61 controls the transport/sorting unit 12 to remove one medicine from the first storage section 11 (S21) and place it on the medicine placement table 133a. The imaging control section 63 controls the imaging unit 13 to capture an image of the medicine placed on the medicine placement table 133a (S22). The position control section 71 controls the transport/sorting unit 12 to transport the medicine after its image is captured by the imaging unit 13 from the medicine placement table 133a to above the infrared sensor 51 (S23). At this time, the position control section 71 controls the transport mechanism 123 based on the image capture result of the camera 52 so that the medicine is positioned at a predetermined position above the infrared sensor 51.

その後、赤外センサ51は、赤外センサ51の上方に位置する薬剤から発せられる赤外光を受光する(S24)。取得部72は、赤外センサ51が受光した赤外光の波形データを取得する(S25;取得ステップ)。画像生成部73は、取得部72が取得した波形データをスペクトログラム変換することにより、第1特性画像を生成する(S26)。 Then, the infrared sensor 51 receives infrared light emitted from the drug located above the infrared sensor 51 (S24). The acquisition unit 72 acquires waveform data of the infrared light received by the infrared sensor 51 (S25; acquisition step). The image generation unit 73 generates a first characteristic image by spectrogram-converting the waveform data acquired by the acquisition unit 72 (S26).

決定部74は、画像生成部73が生成した第1特性画像と、決定部74が既に収容先の仕分カップ141を決定している第2特性画像とを学習済みモデル801に入力する(S27)。第1特性画像と第2特性画像とが一致しているとの結果を得た場合、決定部74は、当該第2特性画像に対応する薬剤の収容先として決定している仕分カップ141を、赤外センサ51の上方に位置する薬剤を収容する仕分カップ141として決定する(S28)。一方、第1特性画像が何れの第2特性画像とも一致していないとの結果を得た場合、決定部74は、薬剤の収容先として決定していない仕分カップ141を、赤外センサ51の上方に位置する薬剤を収容する仕分カップ141として決定する(S28)。S28の処理は、決定ステップの一例である。 The determination unit 74 inputs the first characteristic image generated by the image generation unit 73 and the second characteristic image for which the determination unit 74 has already determined the destination sorting cup 141 to be used (S27) into the trained model 801. If the determination unit 74 determines that the first characteristic image and the second characteristic image match, the determination unit 74 determines the sorting cup 141 determined as the destination of the medicine corresponding to the second characteristic image as the sorting cup 141 that contains the medicine located above the infrared sensor 51 (S28). On the other hand, if the determination unit 74 determines that the first characteristic image does not match any of the second characteristic images, the determination unit 74 determines the sorting cup 141 that has not been determined as the destination of the medicine as the sorting cup 141 that contains the medicine located above the infrared sensor 51 (S28). The process of S28 is an example of a determination step.

決定部74は、収容先として決定した仕分カップ141の識別情報に対応付けて、画像生成部73が生成した第1特性画像を第2特性画像として記憶すると共に、第1カメラ131が撮像した薬剤の画像を記憶する。 The determination unit 74 stores the first characteristic image generated by the image generation unit 73 as a second characteristic image in association with the identification information of the sorting cup 141 determined as the storage destination, and also stores the image of the medicine captured by the first camera 131.

制御部60bは、第1収容部11に収容されている全ての薬剤について上述した処理を実行することにより、第1特性画像と第2特性画像が一致する薬剤が同一の仕分カップ141に収容されるように、薬剤の仕分処理を実行する。 The control unit 60b executes the above-mentioned process for all drugs contained in the first container 11, thereby performing drug sorting processing so that drugs whose first characteristic image and second characteristic image match are contained in the same sorting cup 141.

<推定精度の検証>
図22は、波形データを用いて構築した学習済みモデル(波形入力モデルと称する)の出力結果のヒストグラムの一例を示す図である。横軸は、波形入力モデルが出力する確率値を示す。また、確率値が0側の縦軸は、波形入力モデルが2つの波形データが一致していないとの結果を出力する回数を示し、確率値が1側の縦軸は、2つの波形データが一致しているとの結果を出力する回数を示す。
<Verification of estimation accuracy>
22 is a diagram showing an example of a histogram of output results of a trained model (referred to as a waveform input model) constructed using waveform data. The horizontal axis indicates the probability value output by the waveform input model. The vertical axis on the probability value 0 side indicates the number of times the waveform input model outputs a result indicating that two waveform data do not match, and the vertical axis on the probability value 1 side indicates the number of times the waveform input model outputs a result indicating that two waveform data match.

波形入力モデルは、以下の訓練データを用いて機械学習を行うことにより、2つの波形データが一致しているかどうかを出力するモデルである。訓練データには、同種である2つの薬剤についての波形データを、当該波形データ同士が一致することを示す情報に対応付けたデータが含まれる。また訓練データには、異種である2つの薬剤についての波形データを、当該波形データ同士が一致しないことを示す情報に対応付けたデータが含まれる。波形入力モデルは、2つの波形データの入力に対して、2つの波形データが一致している、または一致していないとの結果を出力する。この例では、確率値が1に近いほど、2つの波形データが一致している可能性が高いことを示す。 The waveform input model is a model that outputs whether two pieces of waveform data match by performing machine learning using the following training data. The training data includes data that associates waveform data for two drugs of the same type with information indicating that the waveform data match. The training data also includes data that associates waveform data for two drugs of different types with information indicating that the waveform data do not match. When two pieces of waveform data are input, the waveform input model outputs a result indicating that the two pieces of waveform data match or do not match. In this example, the closer the probability value is to 1, the more likely it is that the two pieces of waveform data match.

図22に示すように、特に2つの波形データが一致している場合(図中の「OK」の場合)であっても、確率値が1の方に当該「OK」の出力を示すヒストグラムの分布が偏らず、例えば確率値が0付近において複数回の当該「OK」の出力が認められる。したがって、波形データおよび波形入力モデルを用いた場合、同種の可能性が高い薬剤を同一の仕分カップ141に収容できない可能性がある。 As shown in FIG. 22, even when two waveform data are identical (in the case of "OK" in the figure), the distribution of the histogram showing the output of "OK" is not biased toward a probability value of 1, and "OK" is output multiple times when the probability value is near 0, for example. Therefore, when waveform data and a waveform input model are used, it is possible that medicines that are likely to be the same type cannot be placed in the same sorting cup 141.

図23は、特性画像を用いて構築した学習済みモデル801の出力結果のヒストグラムの一例を示す図である。横軸は、学習済みモデル801が出力する確率値を示す。また、確率値が0側の縦軸は、学習済みモデル801が第1特性画像と第2特性画像とが一致していないとの結果を出力する回数を示し、確率値が1側の縦軸は、第1特性画像と第2特性画像とが一致しているとの結果を出力する回数を示す。 Figure 23 is a diagram showing an example of a histogram of the output results of the trained model 801 constructed using characteristic images. The horizontal axis indicates the probability value output by the trained model 801. The vertical axis with a probability value of 0 indicates the number of times that the trained model 801 outputs a result that the first characteristic image and the second characteristic image do not match, and the vertical axis with a probability value of 1 indicates the number of times that the trained model 801 outputs a result that the first characteristic image and the second characteristic image match.

図23に示すように、第1特性画像と第2特性画像とが一致している場合(図中の「OK」の場合)、確率値が1の方に当該「OK」の出力を示すヒストグラムの分布が偏っている。また、第1特性画像と第2特性画像とが一致していない場合(図中の「NG」の場合)、確率値が0の方に当該「NG」の出力を示すヒストグラムの分布が偏っている。つまり、第1特性画像および第2特性画像の一致または不一致の推定精度が高いことがわかる。 As shown in FIG. 23, when the first characteristic image and the second characteristic image match (in the case of "OK" in the figure), the distribution of the histogram indicating the output of "OK" is biased towards a probability value of 1. Also, when the first characteristic image and the second characteristic image do not match (in the case of "NG" in the figure), the distribution of the histogram indicating the output of "NG" is biased towards a probability value of 0. In other words, it can be seen that the estimation accuracy of the match or mismatch between the first characteristic image and the second characteristic image is high.

そのため、特性画像および学習済みモデル801を用いることにより、波形データおよび波形入力モデルを用いる場合に比べ、決定部74による仕分カップ141の決定精度を高めることができる。したがって、同種の可能性が高い薬剤を同一の仕分カップ141に収容できる可能性を高めることができる。 Therefore, by using the characteristic image and the trained model 801, the accuracy of the determination of the sorting cup 141 by the determination unit 74 can be improved compared to the case where waveform data and a waveform input model are used. Therefore, it is possible to increase the possibility that medicines that are likely to be the same type can be contained in the same sorting cup 141.

<効果>
上述した薬剤仕分装置1の基本構成では、第1カメラ131が撮像した種類が未知の薬剤の画像と、薬剤データベースに記憶している薬剤に関する薬剤データ(例:マスタ画像)とに基づき、判別部64は、種類が未知の薬剤の種類を判別する。仕分制御部62は、その判別結果に基づき、同種である複数の薬剤を、同一の仕分カップ141に収容する。
<Effects>
In the basic configuration of the medicine sorting device 1 described above, the discrimination unit 64 discriminates the type of the unknown medicine based on the image of the unknown medicine captured by the first camera 131 and the medicine data (e.g., master image) related to the medicine stored in the medicine database. The sorting control unit 62 places multiple medicines of the same type in the same sorting cup 141 based on the discrimination result.

一方、本実施形態では、決定部74は、種類が未知の薬剤から得られた赤外光の波形データと、収容先の仕分カップ141が既に決定している薬剤から得られた赤外光の波形データとに基づき、種類が未知の薬剤を収容する仕分カップ141を決定する。赤外光は上述した特性を有するため、赤外光の波形データを用いて種類が未知の薬剤を収容する仕分カップ141を決定することにより、同種である可能性が高い複数の薬剤を同一の仕分カップ141に収容できる可能性を高めることができる。したがって、薬剤仕分装置1Bは、薬剤データベース(マスタ画像)を用いずとも、同種である可能性が高い複数の薬剤を同一の仕分カップ141に収容できる。そのため、薬剤仕分装置1Bは、薬剤データベースを予め登録することなく、薬剤の仕分処理を行うことができる。 On the other hand, in this embodiment, the determination unit 74 determines the sorting cup 141 to contain the unknown type of drug based on the infrared light waveform data obtained from the drug of unknown type and the infrared light waveform data obtained from the drug for which the sorting cup 141 to contain the drug has already been determined. Since infrared light has the above-mentioned characteristics, by determining the sorting cup 141 to contain the unknown type of drug using the infrared light waveform data, it is possible to increase the possibility that multiple drugs that are likely to be the same type can be contained in the same sorting cup 141. Therefore, the drug sorting device 1B can contain multiple drugs that are likely to be the same type in the same sorting cup 141 without using a drug database (master image). Therefore, the drug sorting device 1B can perform drug sorting processing without registering a drug database in advance.

また本実施形態では、決定部74は、波形データをスペクトログラム変換した特性画像を用いて、種類が未知の薬剤を収容する仕分カップ141を決定する。具体的には、決定部74は、特性画像および学習済みモデル801を用いて、種類が未知の薬剤を収容する仕分カップ141を決定する。したがって、同種である可能性が高い複数の薬剤を仕分カップ141に収容できる可能性をさらに高めることができる。また、特性画像を用いることにより、汎用性の高い画像系ディープラーニングを用いて学習済みモデル801を構築できる。そのため、同種である可能性が高い複数の薬剤を同一の仕分カップ141に収容するために、複雑なアルゴリズムを考案する必要が無い。そのため、薬剤データベースを用いない薬剤の仕分処理における開発コストを削減できる。 In addition, in this embodiment, the determination unit 74 uses a characteristic image obtained by spectrogram conversion of waveform data to determine a sorting cup 141 that will accommodate an unknown type of medicine. Specifically, the determination unit 74 uses the characteristic image and the trained model 801 to determine a sorting cup 141 that will accommodate an unknown type of medicine. Therefore, it is possible to further increase the possibility that multiple medicines that are likely to be the same type can be accommodated in the sorting cup 141. In addition, by using the characteristic image, it is possible to construct the trained model 801 using highly versatile image-based deep learning. Therefore, there is no need to devise a complex algorithm to accommodate multiple medicines that are likely to be the same type in the same sorting cup 141. Therefore, it is possible to reduce the development costs of medicine sorting processing that does not use a medicine database.

<変形例1>
決定部74は、特性画像に加え、第1カメラ131が撮像した薬剤の画像も学習済みモデル801に入力することにより、種類が未知の薬剤を収容する仕分カップ141を決定してもよい。この場合の学習済みモデル801は、さらに以下の訓練データを用いて機械学習を行うことにより構築されたモデルである。訓練データは、同種である2つの薬剤の画像を特性画像同士が一致することを示す情報に対応付けたデータと、異種である2つの薬剤の画像を特性画像同士が一致しないことを示す情報に対応付けたデータとを含む。
<Modification 1>
The determination unit 74 may determine a sorting cup 141 that contains an unknown type of medicine by inputting an image of the medicine captured by the first camera 131 in addition to the characteristic image to the trained model 801. In this case, the trained model 801 is a model constructed by performing machine learning using the following training data: The training data includes data in which images of two medicines of the same type are associated with information indicating that their characteristic images match, and data in which images of two medicines of different types are associated with information indicating that their characteristic images do not match.

決定部74は、第1特性画像および第2特性画像に加え、第1カメラ131が撮像した2つの画像を学習済みモデル801に入力する。これら2つの画像は、種類が未知の薬剤の画像、および、収容先の仕分カップ141が既に決定している薬剤の画像である。学習済みモデル801への入力要素として、特性画像に加え薬剤の画像も用いることにより、当該入力要素を増やすことができる。そのため、学習済みモデル801は、第1特性画像および第2特性画像の一致または不一致の推定を、より精度よく行うことが可能となる。また、第1カメラ131は、上述した薬剤仕分装置1の基本構成に含まれる。そのため、当該基本構成に対して新たな部材を追加することなく、上記推定の精度を高めることが可能となる。 The determination unit 74 inputs two images captured by the first camera 131 to the trained model 801 in addition to the first and second characteristic images. These two images are an image of a drug of unknown type and an image of a drug whose destination sorting cup 141 has already been determined. By using the drug image in addition to the characteristic image as an input element to the trained model 801, the input elements can be increased. Therefore, the trained model 801 can more accurately estimate the match or mismatch between the first and second characteristic images. In addition, the first camera 131 is included in the basic configuration of the drug sorting device 1 described above. Therefore, it is possible to improve the accuracy of the above estimation without adding new components to the basic configuration.

本実施形態では、訓練データに含まれる薬剤の画像としても、学習済みモデル801に入力される薬剤の画像としても、撮像画像を分解したR(赤)、G(緑)およびB(青)の画像(3チャンネルの画像)を用いている。したがって、本実施形態では、特性画像、R、GおよびBの画像という4チャンネルの画像を用いて学習済みモデル801を構築し、当該4チャンネルの画像を学習済みモデル801に入力して、2つの特性画像が一致するかどうかの結果を得ている。 In this embodiment, the drug images included in the training data and the drug images input to the trained model 801 are decomposed into R (red), G (green), and B (blue) images (three-channel images). Therefore, in this embodiment, the trained model 801 is constructed using four-channel images, namely, a characteristic image and R, G, and B images, and the four-channel images are input to the trained model 801 to obtain a result of whether the two characteristic images match.

<変形例2>
決定部74は、特性画像および学習済みモデル801を用いずに、種類が未知の薬剤を収容する仕分カップ141を決定してもよい。その一例について、図19の符号1092および図24を用いて説明する。図19の符号1092は、本変形例の薬剤仕分装置1Bの構成例を示すブロック図である。
<Modification 2>
The determination unit 74 may determine the sorting cup 141 that contains the medicine of unknown type without using the characteristic image and the trained model 801. An example of this will be described with reference to reference numeral 1092 in Fig. 19 and Fig. 24. Reference numeral 1092 in Fig. 19 is a block diagram showing an example of the configuration of the medicine sorting device 1B of this modified example.

符号1092に示すように、本変形例の制御部60bは、符号1091に示す画像生成部73に代えて、波形生成部75を備える。波形生成部75は、取得部72が取得した波形データに対して一次微分を実行することにより、波形微分データを生成する。 As indicated by reference numeral 1092, the control unit 60b of this modified example includes a waveform generating unit 75 instead of the image generating unit 73 indicated by reference numeral 1091. The waveform generating unit 75 generates waveform differential data by performing first-order differentiation on the waveform data acquired by the acquiring unit 72.

決定部74は、波形生成部75が生成した、種類が未知の薬剤の波形微分データと、収容先の仕分カップ141が既に決定している薬剤の波形微分データとの類似度を算出する。決定部74は、当該類似度が所定値以上である場合に、収容先の仕分カップ141が既に決定している薬剤が収容される仕分カップ141を、種類が未知の薬剤を収容する仕分カップ141として決定する。 The determination unit 74 calculates the degree of similarity between the waveform differential data of the drug of unknown type generated by the waveform generation unit 75 and the waveform differential data of the drug of which the destination sorting cup 141 has already been determined. If the degree of similarity is equal to or greater than a predetermined value, the determination unit 74 determines the sorting cup 141 that contains the drug of which the destination sorting cup 141 has already been determined as the sorting cup 141 that contains the drug of unknown type.

決定部74は、種類が未知の薬剤を収容する仕分カップ141を決定すると、仕分カップ141の識別情報に、当該仕分カップ141に収容される薬剤の波形微分データを対応付けて、記憶部80bに記憶する。したがって、記憶部80bには、学習済みモデル801に代えて、波形微分データ802が記憶される。 When the determination unit 74 determines a sorting cup 141 that contains an unknown type of medicine, the determination unit 74 associates the identification information of the sorting cup 141 with the waveform differential data of the medicine contained in the sorting cup 141 and stores the waveform differential data in the memory unit 80b. Therefore, the memory unit 80b stores the waveform differential data 802 instead of the trained model 801.

決定部74は、種類が未知の薬剤の波形微分データと、記憶部80bに記憶された波形微分データとの類似度を算出する。決定部74は、記憶部80bに記憶された全ての波形微分データのうちの1つの波形微分データを参照し、当該波形微分データについて類似度を算出する。決定部74は、当該類似度が所定値以上であると判定した場合、当該波形微分データに対応付けられた仕分カップ141を、種類が未知の薬剤を収容する仕分カップ141として決定する。決定部74は、当該類似度が所定値未満であると判定した場合、記憶部80bから別の波形微分データを参照し、当該波形微分データについて類似度を算出し、当該類似度が所定値以上であるかを判定する。 The determination unit 74 calculates the similarity between the waveform differential data of the unknown type of drug and the waveform differential data stored in the memory unit 80b. The determination unit 74 refers to one of the waveform differential data among all the waveform differential data stored in the memory unit 80b, and calculates the similarity for the waveform differential data. If the determination unit 74 determines that the similarity is equal to or greater than a predetermined value, it determines the sorting cup 141 associated with the waveform differential data as the sorting cup 141 that contains the unknown type of drug. If the determination unit 74 determines that the similarity is less than the predetermined value, it refers to another waveform differential data from the memory unit 80b, calculates the similarity for the waveform differential data, and determines whether the similarity is equal to or greater than a predetermined value.

波形微分データの類似度は、例えばCCF(相互相関関数)、DTW(Dynamic Time Warping)などの公知の手法を用いて算出できる。所定値は、実験等により、同種の薬剤が同一の仕分カップ141に収容されるように設定されればよい。 The similarity of the waveform differential data can be calculated using known methods such as CCF (Cross-Correlation Function) and DTW (Dynamic Time Warping). The predetermined value may be set through experiments or the like so that drugs of the same type are contained in the same sorting cup 141.

図24は、本変形例の制御部60bの処理の一例を示すフローチャートである。図21と同一の処理については、その説明を割愛する。図24に示すように、S25において、取得部72が、種類が未知の薬剤についての波形データを取得した後、波形生成部75は、当該波形データを一次微分することにより、当該波形データの波形微分データを生成する(S31)。 Figure 24 is a flowchart showing an example of the processing of the control unit 60b in this modified example. The same processing as in Figure 21 will not be described. As shown in Figure 24, after the acquisition unit 72 acquires waveform data for an unknown type of drug in S25, the waveform generation unit 75 generates waveform differential data of the waveform data by first differentiating the waveform data (S31).

決定部74は、上述したように、波形生成部75が生成した波形微分データと、記憶部80bにおいて参照した1つの波形微分データとの類似度を算出し、当該類似度が所定値以上であるかを判定する。決定部74は、類似度が所定値以上であると判定するまで、類似度の算出処理と、類似度と所定値との比較処理とを実行する。決定部74は、類似度が所定値以上であると判定した場合、記憶部80bにおいて参照した波形微分データに対応付けられた仕分カップ141を、種類が未知の薬剤を収容する仕分カップ141として決定する(S32)。一方、決定部74は、記憶部80bに記憶されている全ての波形微分データについて類似度が所定値未満であると判定した場合には、収容先として決定していない仕分カップ141を、種類が未知の薬剤を収容する仕分カップ141として決定する(S32)。S32の処理は、決定ステップの一例である。 As described above, the determination unit 74 calculates the similarity between the waveform differential data generated by the waveform generation unit 75 and one waveform differential data referenced in the storage unit 80b, and determines whether the similarity is equal to or greater than a predetermined value. The determination unit 74 executes the calculation process of the similarity and the comparison process of the similarity with the predetermined value until it determines that the similarity is equal to or greater than the predetermined value. When the determination unit 74 determines that the similarity is equal to or greater than the predetermined value, it determines the sorting cup 141 associated with the waveform differential data referenced in the storage unit 80b as the sorting cup 141 that contains the medicine of unknown type (S32). On the other hand, when the determination unit 74 determines that the similarity is less than the predetermined value for all the waveform differential data stored in the storage unit 80b, it determines the sorting cup 141 that has not been determined as the storage destination as the sorting cup 141 that contains the medicine of unknown type (S32). The process of S32 is an example of a determination step.

制御部60bは、第1収容部11に収容されている全ての薬剤について上述した処理を実行することにより、波形微分データの類似度が所定値以上の薬剤が同一の仕分カップ141に収容されるように、薬剤の仕分処理を実行する。 The control unit 60b executes the above-mentioned process for all drugs contained in the first container 11, thereby sorting the drugs so that drugs with a similarity of the waveform differential data equal to or greater than a predetermined value are stored in the same sorting cup 141.

波形微分データは、波形の傾きによって波形データの特徴を捉えたものであるから、波形データに現れ得る赤外センサ51が受けた光の強度のばらつきを吸収できていると考えられる。そのため、制御部60bは、波形微分データを用いた場合であっても、同種である可能性が高い複数の薬剤を同一の仕分カップ141に収容する可能性を高めることができる。 The waveform differential data captures the characteristics of the waveform data from the slope of the waveform, and is therefore believed to be able to absorb variations in the intensity of the light received by the infrared sensor 51 that may appear in the waveform data. Therefore, even when using waveform differential data, the control unit 60b can increase the likelihood that multiple medicines that are likely to be the same type will be placed in the same sorting cup 141.

なお、決定部74による仕分カップ141の決定処理において、特性画像および学習済みモデル801のみを用いてもよいし、波形微分データのみを用いてもよいし、または、その両方を用いてもよい。 In addition, in the process of determining the sorting cup 141 by the determination unit 74, only the characteristic image and the trained model 801 may be used, only the waveform differential data may be used, or both may be used.

<変形例3>
上記では、カメラ52が台座19上に配置されている例について説明したが、カメラ52の配置位置はこれに限られない。図25に示すように、カメラ52は、ガラス板56(台座19)の下方に設けられてもよい。図25は、赤外センサ51およびその周囲を概略的に示す模式図である。本実施形態では、カメラ52にレンズ55が設けられている。
<Modification 3>
Although an example in which the camera 52 is disposed on the base 19 has been described above, the position at which the camera 52 is disposed is not limited to this. As shown in Fig. 25, the camera 52 may be provided below a glass plate 56 (base 19). Fig. 25 is a schematic diagram illustrating an infrared sensor 51 and its surroundings. In this embodiment, the camera 52 is provided with a lens 55.

反射部53は、台座19上に、赤外センサ51の上方に位置する薬剤MD2をカメラ52の方向に反射するように設けられている。また、台座19において、赤外センサ51の載置位置およびその周囲の領域には、ガラス板56が設けられている。これにより、カメラ52は、反射部53が反射した薬剤MD2を撮像できる。 The reflecting portion 53 is provided on the base 19 so as to reflect the drug MD2 located above the infrared sensor 51 in the direction of the camera 52. In addition, a glass plate 56 is provided on the base 19 at the position where the infrared sensor 51 is placed and in the area surrounding it. This allows the camera 52 to capture an image of the drug MD2 reflected by the reflecting portion 53.

本変形例では、反射部53として、第1反射部53aおよび第2反射部53bが設けられている。第1反射部53aは、反射面がY軸方向に沿うように設けられているため、±X軸方向および±Z軸方向に移動する薬剤MD2を反射できる。第2反射部53bは、反射面がX軸方向に沿うように設けられているため、±Y軸方向および±Z軸方向に移動する薬剤MD2を反射できる。 In this modified example, a first reflecting portion 53a and a second reflecting portion 53b are provided as the reflecting portion 53. The first reflecting portion 53a is provided so that its reflecting surface is along the Y-axis direction, and therefore can reflect the drug MD2 moving in the ±X-axis direction and ±Z-axis direction. The second reflecting portion 53b is provided so that its reflecting surface is along the X-axis direction, and therefore can reflect the drug MD2 moving in the ±Y-axis direction and ±Z-axis direction.

そのため、制御部60bは、第1反射部53aが反射した薬剤MD2の画像に基づき、±X軸方向および±Z軸方向における薬剤MD2の位置を特定できる。また制御部60bは、第2反射部53bが反射した薬剤MD2の画像に基づき、±Y軸方向および±Z軸方向における薬剤MD2の位置を特定できる。この位置の特定により、位置制御部71は、薬剤MD2が赤外センサ51の測定範囲内に位置するように、吸着・シャッター機構122の位置を制御できる。したがって、本変形例においても、薬剤が赤外センサ51と接触する可能性を低減できると共に、赤外センサ51が安定した測定を行うことが可能となる。 Therefore, the control unit 60b can identify the position of the drug MD2 in the ±X-axis direction and ±Z-axis direction based on the image of the drug MD2 reflected by the first reflecting unit 53a. The control unit 60b can also identify the position of the drug MD2 in the ±Y-axis direction and ±Z-axis direction based on the image of the drug MD2 reflected by the second reflecting unit 53b. By identifying the position, the position control unit 71 can control the position of the adsorption/shutter mechanism 122 so that the drug MD2 is located within the measurement range of the infrared sensor 51. Therefore, even in this modified example, the possibility of the drug coming into contact with the infrared sensor 51 can be reduced, and the infrared sensor 51 can perform stable measurements.

〔ソフトウェアによる実現例〕
薬剤仕分装置1,1A,1B(以下、「装置」と呼ぶ)の機能は、当該装置としてコンピュータを機能させるためのプログラムであって、当該装置の各制御ブロック(特に制御部60a,60bに含まれる各部)としてコンピュータを機能させるためのプログラムにより実現することができる。また、データ作成装置20(以下、「装置」と呼ぶ)の機能は、当該装置としてコンピュータを機能させるためのプログラムであって、当該装置の各制御ブロック(特に制御部21に含まれる各部)としてコンピュータを機能させるためのプログラムにより実現することができる。上記プログラムは、例えばデータ作成プログラムであってよい。
[Software implementation example]
The functions of the drug sorting devices 1, 1A, 1B (hereinafter referred to as "devices") can be realized by a program for causing a computer to function as the device, and a program for causing a computer to function as each control block of the device (particularly each unit included in the control units 60a, 60b). The functions of the data creation device 20 (hereinafter referred to as "device") can be realized by a program for causing a computer to function as the device, and a program for causing a computer to function as each control block of the device (particularly each unit included in the control unit 21). The above program may be, for example, a data creation program.

この場合、上記装置は、上記プログラムを実行するためのハードウェアとして、少なくとも1つの制御装置(例えばプロセッサ)と少なくとも1つの記憶装置(例えばメモリ)を有するコンピュータを備えている。この制御装置と記憶装置により上記プログラムを実行することにより、上記各実施形態で説明した各機能が実現される。 In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The control device and storage device execute the program, thereby realizing each of the functions described in each of the above embodiments.

上記プログラムは、一時的ではなく、コンピュータ読み取り可能な、1または複数の記録媒体に記録されていてもよい。この記録媒体は、上記装置が備えていてもよいし、備えていなくてもよい。後者の場合、上記プログラムは、有線または無線の任意の伝送媒体を介して上記装置に供給されてもよい。 The program may be recorded on one or more computer-readable recording media, not on a temporary basis. The recording media may or may not be included in the device. In the latter case, the program may be provided to the device via any wired or wireless transmission medium.

また、上記各制御ブロックの機能の一部または全部は、論理回路により実現することも可能である。例えば、上記各制御ブロックとして機能する論理回路が形成された集積回路も本発明の範疇に含まれる。この他にも、例えば量子コンピュータにより上記各制御ブロックの機能を実現することも可能である。 In addition, some or all of the functions of each of the above control blocks can be realized by a logic circuit. For example, an integrated circuit in which a logic circuit that functions as each of the above control blocks is formed is also included in the scope of the present invention. In addition, it is also possible to realize the functions of each of the above control blocks by, for example, a quantum computer.

また、上記各実施形態で説明した各処理は、AI(Artificial Intelligence:人工知能)に実行させてもよい。この場合、AIは上記制御装置で動作するものであってもよいし、他の装置(例えばエッジコンピュータまたはクラウドサーバ等)で動作するものであってもよい。 The processes described in each of the above embodiments may be executed by AI (Artificial Intelligence). In this case, the AI may run on the control device, or on another device (such as an edge computer or a cloud server).

〔付記事項〕
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
[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.

20 データ作成装置
211 受付部
212 抽出部
213 番号付与部
214 表示制御部
215 設定部
216 作成部
221 学習済みモデル
1B 薬剤仕分装置
51 赤外センサ
52 カメラ(第2撮像部)
53 反射部
72 取得部
74 決定部
73 画像生成部
75 波形生成部
122 吸着・シャッター機構(調整部)
131 第1カメラ(第1撮像部)
141 仕分カップ(仕分容器)
801 学習済みモデル
20 Data creation device 211 Reception unit 212 Extraction unit 213 Number assignment unit 214 Display control unit 215 Setting unit 216 Creation unit 221 Trained model 1B Medicine sorting device 51 Infrared sensor 52 Camera (second imaging unit)
53 Reflection unit 72 Acquisition unit 74 Determination unit 73 Image generation unit 75 Waveform generation unit 122 Adsorption/shutter mechanism (adjustment unit)
131 first camera (first imaging unit)
141 Sorting cup (sorting container)
801 Trained model

Claims (17)

種類判別の対象薬剤の画像と照合されるマスタ画像を含むマスタデータを作成するデータ作成装置であって、
薬剤の識別情報であって、前記薬剤に形成された少なくとも1つのマークにより示される前記識別情報の入力を受付ける受付部と、
撮像された前記薬剤の画像において、前記薬剤に形成された1つのマークを含むマーク領域を少なくとも1つ抽出する抽出部と、
前記受付部が受付けた識別情報と前記抽出部が抽出したマーク領域とに基づく、前記薬剤の画像を前記マスタ画像として登録する登録操作を受付けた場合に、前記薬剤の画像を前記マスタ画像として前記識別情報に対応付けて、前記マスタデータを作成する作成部と、を備える、データ作成装置。
A data creation device that creates master data including a master image to be compared with an image of a drug type to be identified,
A receiving unit that receives input of identification information of a medicine, the identification information being indicated by at least one mark formed on the medicine;
An extracting unit that extracts at least one mark area including one mark formed on the medicine from the captured image of the medicine;
A data creation device comprising: a creation unit that, when a registration operation to register an image of the drug as the master image based on the identification information received by the reception unit and the mark area extracted by the extraction unit is received, associates the image of the drug as the master image with the identification information and creates the master data.
前記受付部が受付けた前記識別情報に含まれる、前記マークに対応する記号と、前記抽出部が抽出したマーク領域とに対して、番号を付与する番号付与部と、
前記番号が付与された記号と、前記番号が付与されたマーク領域とを含む番号付与画像を表示する表示制御部と、を備える、請求項1に記載のデータ作成装置。
a number assigning unit that assigns numbers to a symbol corresponding to the mark included in the identification information accepted by the accepting unit and to a mark area extracted by the extracting unit;
2. The data creation device according to claim 1, further comprising: a display control unit that displays a numbered image including the symbol to which the number is assigned and the mark area to which the number is assigned.
前記薬剤には、複数の前記マークが複数の段に亘って形成されており、
前記番号付与部は、前記薬剤の画像に含まれる前記マークの向きが上向きである状態において、前記抽出部が抽出したマーク領域に対して、上段から下段に向けて、かつ、各段において左から右に向けて順に前記番号を付与することにより、左上のマーク領域から右下のマーク領域へと順に番号を付与する、請求項2に記載のデータ作成装置。
A plurality of the marks are formed on the medicine across a plurality of stages,
3. The data creation device according to claim 2, wherein the numbering unit assigns the numbers to the mark areas extracted by the extraction unit in sequence from the top to the bottom row and from left to right within each row when the mark included in the image of the drug is facing upward, thereby assigning numbers in sequence from the top left mark area to the bottom right mark area.
前記番号付与画像に対する入力操作に基づき、前記抽出部が抽出したマーク領域のうち、前記1つのマークのみを含まないマーク領域について、前記1つのマークのみを含むように変更されたマーク領域に再設定する設定部を備える、請求項2または3に記載のデータ作成装置。 The data creation device according to claim 2 or 3, further comprising a setting unit that resets, based on an input operation on the numbered image, a mark area that does not include only the one mark among the mark areas extracted by the extraction unit, to a mark area that has been changed to include only the one mark. 前記抽出部は、前記マーク領域を抽出するように構築された学習済みモデルに、前記薬剤の画像を入力して得られる出力値に基づき、前記マーク領域を抽出する、請求項1に記載のデータ作成装置。 The data creation device according to claim 1, wherein the extraction unit extracts the mark area based on an output value obtained by inputting an image of the drug into a trained model constructed to extract the mark area. 種類判別の対象薬剤の画像と照合されるマスタ画像を含むマスタデータを作成するデータ作成装置の制御方法であって、
薬剤の識別情報であって、前記薬剤に形成された少なくとも1つのマークにより示される前記識別情報の入力を受付ける受付ステップと、
撮像された前記薬剤の画像において、前記薬剤に形成された1つのマークを含むマーク領域を少なくとも1つ抽出する抽出ステップと、
前記受付ステップにおいて受付けた識別情報と前記抽出ステップにおいて抽出されたマーク領域とに基づく、前記薬剤の画像を前記マスタ画像として登録する登録操作を受付けた場合に、前記薬剤の画像を前記マスタ画像として前記識別情報に対応付けて、前記マスタデータを作成する作成ステップと、を含む、データ作成装置の制御方法。
A method for controlling a data creation device that creates master data including a master image to be compared with an image of a drug type to be identified, comprising:
a receiving step of receiving input of identification information of a medicine, the identification information being indicated by at least one mark formed on the medicine;
An extraction step of extracting at least one mark area including one mark formed on the medicine from the captured image of the medicine;
A control method for a data creation device, comprising: a creation step of, when a registration operation is received to register an image of the drug as the master image based on the identification information received in the reception step and the mark area extracted in the extraction step, associating the image of the drug as the master image with the identification information to create the master data.
請求項1に記載のデータ作成装置としてコンピュータを機能させるためのデータ作成プログラムであって、前記受付部、前記抽出部および前記作成部としてコンピュータを機能させるためのデータ作成プログラム。 A data creation program for causing a computer to function as the data creation device according to claim 1, the data creation program causing a computer to function as the reception unit, the extraction unit, and the creation unit. 複数の仕分容器を備え、種類が未知の薬剤を種類毎に前記仕分容器に仕分ける薬剤仕分装置であって、
薬剤から発せられる赤外光を受光する赤外センサと、
前記赤外センサが受光した赤外光の、周波数と強度との関係を示す波形データを取得する取得部と、
前記取得部が取得した、前記種類が未知の薬剤の前記波形データと、収容先の仕分容器が既に決定している薬剤の前記波形データとに基づき、前記種類が未知の薬剤を収容する仕分容器を決定する決定部と、を備える、薬剤仕分装置。
A medicine sorting device that includes a plurality of sorting containers and sorts medicines of unknown types into the sorting containers by type,
an infrared sensor that receives infrared light emitted from the drug;
an acquisition unit that acquires waveform data indicating a relationship between a frequency and an intensity of the infrared light received by the infrared sensor;
A drug sorting device comprising: a determination unit that determines a sorting container to contain the drug of unknown type based on the waveform data of the drug of unknown type acquired by the acquisition unit and the waveform data of a drug whose destination sorting container has already been determined.
前記取得部が取得した前記波形データに対してスペクトログラム変換を実行することにより、当該波形データの周波数成分特性を表す特性画像を生成する画像生成部を備え、
前記決定部は、前記画像生成部が生成した、前記種類が未知の薬剤に対応する前記特性画像としての第1特性画像と、前記収容先の仕分容器が既に決定している薬剤に対応する前記特性画像としての第2特性画像とを用いて、前記種類が未知の薬剤を収容する仕分容器を決定する、請求項8に記載の薬剤仕分装置。
an image generating unit that generates a characteristic image representing a frequency component characteristic of the waveform data by performing a spectrogram transformation on the waveform data acquired by the acquiring unit,
The drug sorting device of claim 8, wherein the determination unit determines a sorting container to contain the drug of unknown type using a first characteristic image generated by the image generation unit as the characteristic image corresponding to the drug of unknown type, and a second characteristic image generated by the image generation unit as the characteristic image corresponding to the drug of whose destination sorting container has already been determined.
前記第1特性画像と前記第2特性画像とが一致しているかどうかを出力する学習済みモデルを備え、
前記決定部は、前記学習済みモデルが、前記第1特性画像と前記第2特性画像との入力に対して、前記第1特性画像と前記第2特性画像とが一致しているとの結果を出力した場合に、前記収容先の仕分容器が既に決定している薬剤が収容される当該仕分容器を、前記種類が未知の薬剤を収容する仕分容器として決定する、請求項9に記載の薬剤仕分装置。
A trained model is provided that outputs whether the first characteristic image and the second characteristic image match,
The drug sorting device of claim 9, wherein when the trained model outputs a result indicating that the first characteristic image and the second characteristic image match in response to the input of the first characteristic image and the second characteristic image, the determination unit determines a sorting container that contains a drug whose destination sorting container has already been determined as a sorting container that contains the drug of an unknown type.
薬剤を撮像する第1撮像部を備え、
前記決定部は、前記第1特性画像および前記第2特性画像に加え、前記第1撮像部が撮像した、前記種類が未知の薬剤の画像と、前記収容先の仕分容器が既に決定している薬剤の画像とを前記学習済みモデルに入力することにより、前記種類が未知の薬剤を収容する仕分容器を決定する、請求項10に記載の薬剤仕分装置。
A first imaging unit that images the medicine,
The drug sorting device of claim 10, wherein the determination unit determines a sorting container to contain the drug of unknown type by inputting into the trained model, in addition to the first characteristic image and the second characteristic image, an image of the drug of unknown type captured by the first imaging unit and an image of the drug whose destination sorting container has already been determined.
前記取得部が取得した波形データに対して一次微分を実行することにより、波形微分データを生成する波形生成部を備え、
前記決定部は、前記波形生成部が生成した、前記種類が未知の薬剤の前記波形微分データと、前記収容先の仕分容器が既に決定している薬剤の前記波形微分データとの類似度が所定値以上である場合に、前記収容先の仕分容器が既に決定している薬剤が収容される当該仕分容器を、前記種類が未知の薬剤を収容する仕分容器として決定する、請求項8に記載の薬剤仕分装置。
a waveform generating unit that generates waveform differential data by performing a first differentiation on the waveform data acquired by the acquiring unit,
The drug sorting device of claim 8, wherein the determination unit determines a sorting container containing a drug whose destination sorting container has already been determined as a sorting container containing the drug of unknown type when a similarity between the waveform differential data of the drug of unknown type generated by the waveform generating unit and the waveform differential data of a drug whose destination sorting container has already been determined is greater than or equal to a predetermined value.
前記赤外センサが測定対象とする薬剤を撮像する第2撮像部と、
前記第2撮像部の撮像結果に基づき、前記赤外センサに対する薬剤の位置を調整する調整部と、を備える、請求項8に記載の薬剤仕分装置。
A second imaging unit that images the drug to be measured by the infrared sensor;
The medicine sorting device according to claim 8 , further comprising: an adjustment unit that adjusts a position of the medicine relative to the infrared sensor based on an imaging result of the second imaging unit.
前記赤外センサが測定対象とする薬剤を反射する反射部を備え、
前記第2撮像部は、前記反射部が反射した薬剤を撮像する、請求項13に記載の薬剤仕分装置。
The infrared sensor includes a reflector that reflects a drug to be measured,
The medicine sorting device according to claim 13 , wherein the second imaging section images the medicine reflected by the reflecting section.
前記赤外センサは、近赤外光を受光する近赤外センサである、請求項8に記載の薬剤仕分装置。 The drug sorting device according to claim 8, wherein the infrared sensor is a near-infrared sensor that receives near-infrared light. 複数の仕分容器を備え、種類が未知の薬剤を種類毎に前記仕分容器に仕分ける薬剤仕分装置の制御方法であって、
前記薬剤仕分装置は、薬剤から発せられる赤外光を受光する赤外センサを備え、
前記赤外センサが受光した赤外光の、周波数と強度との関係を示す波形データを取得する取得ステップと、
前記取得ステップにおいて取得した、前記種類が未知の薬剤の前記波形データと、前記仕分容器に既に仕分けられた薬剤の前記波形データとに基づき、前記種類が未知の薬剤を収容する仕分容器を決定する決定ステップと、を含む、薬剤仕分装置の制御方法。
A method for controlling a medicine sorting device that includes a plurality of sorting containers and sorts medicines of unknown types into the sorting containers by type, comprising:
The medicine sorting device includes an infrared sensor that receives infrared light emitted from the medicine,
an acquiring step of acquiring waveform data indicating a relationship between a frequency and an intensity of the infrared light received by the infrared sensor;
A method for controlling a drug sorting device, comprising: a determination step of determining a sorting container to contain the drug of unknown type based on the waveform data of the drug of unknown type acquired in the acquisition step and the waveform data of drugs that have already been sorted into the sorting container.
請求項8に記載の薬剤仕分装置としてコンピュータを機能させるための薬剤仕分プログラムであって、前記取得部および前記決定部としてコンピュータを機能させるための薬剤仕分プログラム。 A drug sorting program for causing a computer to function as the drug sorting device described in claim 8, the drug sorting program causing a computer to function as the acquisition unit and the determination unit.
JP2024094619A 2023-12-07 2024-06-11 DATA CREATION DEVICE, CONTROL METHOD FOR DATA CREATION DEVICE, DATA CREATION PROGRAM, DRUG SORTION DEVICE, CONTROL METHOD FOR DRUG SORTION DEVICE, AND DRUG SORTION PROGRAM Pending JP2025092372A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2023206949 2023-12-07
JP2023206949 2023-12-07

Publications (1)

Publication Number Publication Date
JP2025092372A true JP2025092372A (en) 2025-06-19

Family

ID=96060016

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2024094619A Pending JP2025092372A (en) 2023-12-07 2024-06-11 DATA CREATION DEVICE, CONTROL METHOD FOR DATA CREATION DEVICE, DATA CREATION PROGRAM, DRUG SORTION DEVICE, CONTROL METHOD FOR DRUG SORTION DEVICE, AND DRUG SORTION PROGRAM

Country Status (1)

Country Link
JP (1) JP2025092372A (en)

Similar Documents

Publication Publication Date Title
JP7469729B2 (en) Drug sorting device and drug sorting device control method
JP7741439B2 (en) Medicine sorting device, medicine return system, medicine sorting device control method, and program
JP7695596B2 (en) Medicine sorting device
JP7606148B2 (en) Medicine sorting device
JP2025092372A (en) DATA CREATION DEVICE, CONTROL METHOD FOR DATA CREATION DEVICE, DATA CREATION PROGRAM, DRUG SORTION DEVICE, CONTROL METHOD FOR DRUG SORTION DEVICE, AND DRUG SORTION PROGRAM
JP2024000962A (en) Medicine sorting device and type discrimination device
JP7811788B2 (en) Type discrimination device, type discrimination method, and type discrimination program