fig1 is a block diagram illustrating communications between an attendant workstation 120 , a pharmacy computer 110 , an rf antenna and transceiver circuit 135 inside or under the patient &# 39 ; s mattress , and an attendant &# 39 ; s wireless communication device 150 . most institutions will also want hardwired communications with a nurses &# 39 ; station or other central monitoring station computer , which is not shown . a computer associated with the workstation 120 also communicates with rfid devices inside the patient &# 39 ; s room that detect medication errors , falls , bed egress and room egress ( i . e . wandering ). fig2 illustrates an rfid pillbox 100 with separate compartments 201 - 208 for pills , and pillbox lights 220 under each compartment that show pharmacy workers where to insert each prescribed medication . fig3 illustrates the pharmacy computer 110 helping pharmacy workers find a storage box 315 , where a prescribed medication is stored . a blinking cabinet light 325 indicates the quantity and location of the medication . fig4 a is a side view of a wall - mounted attendant workstation cabinet 120 containing a workstation computer 410 , a pillbox 100 and other electronics . fig4 b is a front view of the workstation cabinet 120 with the front doors removed , and fig4 c is a front view of the top door 420 and bottom door 430 of the workstation . fig5 shows the workstation cabinet 120 configured as a computer nightstand with a separate computer monitor 122 b and keyboard 435 b for patients and their guests . the pillbox 100 is stored inside a locked compartment above the patient &# 39 ; s computer monitor 122 b . fig6 shows a workstation cabinet 120 attached to a frame 600 that plugs into sockets at the foot - end of a hospital bed . a second computer monitor 122 b and wireless keyboard 435 b can be used by the patient . a camera , microphone and speaker 605 are also shown attached to the frame 600 for video communications with the patient . fig1 illustrates how a pillbox 100 is filled in a hospital pharmacy department using a pharmacy computer 110 programmed to oversee the process . fig3 shows how a blinking cabinet light 325 identifies the location and quantity of a prescribed medication . fig2 depicts pillbox lights 220 positioned under the pillbox 100 , which helps the pharmacy technician insert each identified medication into the correct compartment of the pillbox 100 . in this system , each patient is assigned unique rfid codes for a pillbox tag 102 , wrist tags 130 and 131 and optional ankle tags 132 and 133 . in an embodiment well suited for use in hospitals , the workstation cabinet 120 is mounted to wall studs just outside the patient &# 39 ; s room . an rfid reader 121 inside the workstation cabinet 120 reads the pillbox tag 102 , and an rfid reader 135 inside the patient &# 39 ; s mattress periodically reads the patient &# 39 ; s wrist tag 130 or 131 . the attendant workstation 120 communicates with both rfid readers 121 and 135 and identifies when the pillbox 100 has been delivered to the wrong patient . details about any identified errors are displayed on the workstation monitor 122 . the patient &# 39 ; s pillbox 100 is stored in a locked compartment inside the attendant workstation cabinet 120 . the pillbox compartment is unlocked when an attendant &# 39 ; s rfid badge is detected by the rfid reader 121 followed by the attendant entering a pre - approved personal identification number (“ pin ”) and / or password . the pin and / or password inputs are registered using a keypad 123 attached to the workstation 120 . each day or night , a second pillbox 101 with the same rfid tag 102 is filled with medications prescribed for the next day . at a specified time , pillbox 101 is delivered to the patient &# 39 ; s workstation cabinet 120 and exchanged for pillbox 100 . the following day or night , pillbox 100 is refilled and exchanged for pillbox 101 . the attendant workstation 120 computer communicates with the pharmacy computer 110 to determine all of the medications prescribed for the patient and a deadline for each medication . when a medication is late , a “ late medication ” message or alarm code is displayed on the attendant workstation monitor 122 and / or central workstation monitor . the message can be also transmitted to a wireless communication device 150 carried by the responsible attendant . the wireless communication device 150 can be also configured with a barcode reader 151 for reading barcode labels on patient &# 39 ; s id bracelets and for reading barcode labels on medication wrappers . in a preferred embodiment of the invention , the “ late medication ” message or code is first displayed on the central workstation monitor listing the patient &# 39 ; s name , room number , and other details . the attendant at the central workstation must press a special function key within a specified period of time to acknowledge the message . if no response is detected by the central workstation computer , then a similar wireless message is automatically transmitted by the central workstation computer to the responsible attendant &# 39 ; s wireless communication device 150 . the central workstation monitor can be located at the responsible nurses &# 39 ; station . the wireless communication device 150 can be also used for other text , audio and video communications , e . g . displaying other alarm codes , displaying distorted video images of floor areas where patient falls have been detected and seeing a clear video image of the patient during nurse call communications . these video options must be pre - approved by the patient during the admissions process . the wireless communication device 150 can be a pda , a cell phone , or a small laptop computer . if pharmaceutical companies switch from barcode labels to rfid tags on medication wrappers , the same rfid reader 121 inside the attendant workstation cabinet 120 can be used to read all of the rfid medication tags inside the pillbox 100 and can thereby detect when a medication has been removed from the pillbox 100 at the wrong time . the rfid reader 121 can also identify when any medications are missing at the time the pillbox 100 arrives at the attendant workstation 120 or when an arriving medication or dosage is incorrect . the attendant workstation computer can be programmed to display these error messages on the workstation monitor 122 and to also report these delivery errors to the pharmacy computer 110 . in some applications , the rfid tag 102 on the pillbox 100 may be designed to operate at a different frequency than the rfid tags on wrapped medications . in this situation , a different rfid reader inside the workstation 120 will read the medication tags . most hospital patients will be expected to wear both rfid wrist tags 130 and 131 , which will improve the accuracy for detecting medication errors , falls , bed egress and room egress . patients with a history of wandering will also wear ankle tags 132 and 133 attached to ankle bracelets or socks . rf antennas under hallway flooring coverings will identify ankle tags 132 and 133 and will detect when a patient with a history of wandering has entered an unsafe area . the computer associated with the attendant workstation 120 will monitors the interfacing circuits connecting to rf antennas under floor coverings inside the patient room and under the shower tub to detect when either wrist tag 130 or 131 remains close to the floor at these locations , which will be interpreted as a patient fall . bed egress will be indicated when neither wrist tag 130 nor 131 is detected by an rf antenna 135 inside or under the mattress . room egress will be detected when an rf antenna inside the entry door or door frame detects close proximity of either wrist tag 130 or 131 . bed egress can be also indicated when either ankle tag 132 or 133 is detected by a floor antenna next to the bed , and room egress can be identified when either ankle tag 132 or 133 is detected by a door antenna , door frame antenna or floor antenna next to the door . fig2 shows more details about pillbox 100 . a passive rfid tag 102 is attached . to the pillbox 100 . when the rfid tag 102 is triggered to transmit , it conveys an alphanumeric code which is assigned to the patient during the admissions process . the pillbox 100 has separate compartments 201 , 202 , 203 , 204 , 205 , 206 . . . for holding medications which are scheduled for delivery to the patient at marked standard times , e . g . 6 am , 10 am , 2 pm , 6 pm , 10 pm , 2 am , etc . additional compartments 207 , 208 are for medications prescribed as needed or at non - standard times . each patient is assigned two identical pillboxes 100 and 101 ( pillbox 101 is not shown ). an identical rfid tag 102 number is attached to both pillboxes 100 and 101 , thereby identifying that the pillboxes 100 and 101 are both assigned to the same known patient . fig3 shows how the pharmacy computer 110 helps a pharmacy technician refill pillbox 100 and other pillboxes assigned to other patients . the patient &# 39 ; s name , allergies , preferred language , room number and other information are determined via the rfid tag 102 and associated patient records . the pharmacy technician uses an rfid reader 305 to read the rfid tag 102 . the pharmacy computer 110 then looks up the patient &# 39 ; s prescriptions , and the computer monitor 310 displays a drawing of the pillbox 100 and other details about the patient . the pillbox 100 is then inserted into a refill tray 210 with a different edge 215 at one corner which matches one corner of the pillbox 100 , thereby forcing the pillbox 100 into a preferred orientation inside the refill tray 210 . alternatively , hinges 225 and 226 can be used that only fit into the refill tray 210 when properly aligned . many other alignment schemes can be employed . a collection of pillbox lights 220 , 221 , 222 , 223 , 224 . . . are mounted at the bottom of the refill tray 210 with each pillbox light able to project light through the bottom surface of one of the compartments of the pillbox 100 . all of the stock medications are stored in a collection of storage boxes 315 positioned on shelves of an instrumented cabinet 320 . when the pharmacy computer 110 determines all of the medications prescribed for the patient , the pharmacy computer 110 turns on a cabinet light 325 under each of the storage boxes 315 containing medications which have been prescribed for the patient . each cabinet light 325 blinks a number of times that indicates the number of pills which need to be inserted into the pillbox 100 for the identified patient . after blinking , each cabinet light 325 remains off for a short period of time , and then automatically repeats the sequence of blinks . the pharmacy technician must walk along each shelf and collect the correct number of pills from each storage box 315 , as indicated by the blinking light below each storage box 315 . in an alternative design , the cabinet lights 325 can be mounted above the storage boxes 315 . also , a small 2 - digit display can be mounted under or over each storage box 315 to show the number of pills needed . other liquid medications and supplies can be selected via the same scheme . the pharmacy worker must next use a barcode reader 330 to read the barcode label on each wrapped medication . the barcode reader 330 can be built into the pharmacy computer 110 or it can be a handheld barcode reader ( not shown ). the pharmacy computer 110 then looks up the patient &# 39 ; s prescription records and displays an arrow 340 or other indicator on the pharmacy monitor 310 , showing the pharmacy technician where to put the medication in the pillbox 100 . to assist the technician , a pillbox light 222 under the pillbox 100 turns on to further indicate where the medication should be placed in the pillbox 100 . the pillbox light 222 remains on until the next medication barcode label is read . a sound is triggered each time a medication label is successfully read . a different sound is triggered each time a medication label is detected but not identified . when all of the barcode labels have been read , any missing medications are listed on the computer monitor 310 , and the corresponding cabinet lights 325 on the instrumented cabinet 320 blink to show the pharmacy technician the location and quantity of the remaining medications needed . the pharmacy worker must again use the barcode reader 330 to read each of the remaining medication labels . the pharmacy monitor 310 and appropriate pillbox light show the pharmacy worker where to place each of the missing medications . if any medications are wrong , the pharmacy computer 110 will help the pharmacy worker identify the storage boxes 315 which may contain the wrong medications . the pharmacy monitor 310 will display a warning message instructing the pharmacy technician to check each of the suspected storage boxes 315 marked by a rapidly blinking cabinet light 325 . the cabinet lights 325 will blink rapidly one at a time , and the pharmacy monitor 310 will list the medication that should be in the identified storage box . if pharmaceutical companies shift from barcode labels to rfid tags on wrapped medications , the rfid reader 305 can be used to read each medication tag . alternatively , a separate rfid antenna could be mounted around each of the pillbox lights 220 to read all of the medication tags inside each pillbox compartment 201 . the pillbox 100 could be fabricated with a clear plastic bottom , a metal lid , and metal sides around each compartment 201 . this design would shield the tags in adjacent compartments . each pillbox 100 is stored inside a locked attendant workstation cabinet 120 , exemplified as a wall - mounted cabinet in fig4 a , 4 b , and 4 c . this cabinet design is recommended for hospitals . the wall - mounted cabinet 120 is designed to fit between wall studs and protrude out of the wall as little as possible . fig4 a shows a side view of the cabinet and contents ; fig4 b shows a front view with both the top and bottom doors removed ; and fig4 c shows the top and bottom doors with several electronic devices attached to each door . on the first day , the pillbox 100 is filled and delivered by the pharmacy department with medications prescribed for the first day . the pillbox 101 is filled and exchanged for the pillbox 100 before the morning of the second day . the hospital version of the attendant workstation cabinet 120 can be located inside or just outside the patient &# 39 ; s room . a wall - mounted cabinet just outside the patient &# 39 ; s room will have significant advantages of ( 1 ) giving the nurses more privacy when reading or typing patient records and preparing each medication delivery ; ( 2 ) making it easier for pharmacy technicians to deliver the pillboxes without losing site of their delivery cart ; ( 3 ) keeping the medications and supplies away from infectious organisms inside the patient &# 39 ; s room ; and ( 4 ) displaying alarm codes and email messages on the workstation monitor at a more visible location that will be less likely to frighten the patient . in fig4 , the rfid reader 121 is used to read the rfid tag 102 attached to each pillbox 100 , 101 and to also read each attendant &# 39 ; s rfid badge . the attendant can access the locked workstation 120 by swiping his / her rfid badge close to the rfid reader 121 and by next inputting a pre - approved pin and / or password using the keypad 123 . a biometric reader ( e . g . fingerprint reader , palm reader , or face recognition camera ) can be provided with the attendant workstation 120 to add another level of security . most biometric readers are expensive ; therefore , this option is not shown in fig4 . three levels of security can be created by requiring each attendant to first swipe an rfid badge near the rfid reader 121 and to next input a long - term pin followed by a second short - term pin . the short - term pin could be changed each week or month at any workstation 120 . as previously described in the context of fig1 , rfid tags 130 , 131 , 132 and 133 remain close to each patient &# 39 ; s body , for example on wristbands and attached to nonskid socks or ankle bracelets . some institutions may not require all patients to wear ankle tags 132 and 133 , but these rfid tags can be hidden inside non - skid socks and will prevent wandering and falls at minimal cost to the institution . rf antennas under floor coverings or floor mats in hallways , bathrooms and next to the bed identify when the patient is standing or walking at these locations . the workstation computer 410 can be programmed to first identify the patient and then access patient records to determine whether any wandering limits or bed egress restrictions have been imposed for the patient . the workstation computer 410 can then respond accordingly via alarm codes or prerecorded voice commands to the patient in the patient &# 39 ; s preferred language . an rfid antenna and transceiver 135 inside or below the patient &# 39 ; s mattress are used to periodically read the patient &# 39 ; s wrist tags 130 or 131 . the workstation computer 410 periodically communicates with the rfid transceiver 135 ( shown in fig1 ) to identify the patient while lying in the bed . when a pillbox rfid tag 102 ( shown in fig1 ) is identified by the workstation rfid reader 121 , the workstation computer 410 verifies that the patient is receiving the correct pillbox 100 . any errors are displayed on the attendant workstation monitor 122 mounted to the upper door 420 of the workstation cabinet 120 . fans 421 , 422 , and 423 are mounted to the upper door 420 to cool the computer 410 and workstation monitor 122 . a back - up batter power supply 424 is mounted above or below the workstation computer 410 for short periods of power loss . hospital generators will supply power to the workstation 120 during prolonged periods of power loss . the upper door 420 has a vertical hinge 425 , allowing the upper door 420 to swing outward to access the computer 410 and other electronics . an attendant can unlock the lower door 430 to access the storage compartment 431 by first swiping a pre - authorized rfid badge close to the rfid reader 121 and by next inputting a pre - approved pin and / or password using the keypad 123 . the hinge 432 for the lower door 430 is horizontal , allowing this door 430 to swing downward and remain in a horizontal position . a keyboard 435 is then positioned at a comfortable location for accessing patient records and typing email messages or patient records . each wrapped medication inside the pillbox 100 is marked with a distinctive barcode label . a barcode reader 440 mounted inside the storage compartment 431 is used to read the barcode label on each medication before the medication is delivered to the patient . the attendant workstation computer 410 communicates with the pharmacy computer 110 and with the mattress rfid transceiver 135 to identify any medication errors , e . g . incorrect medications , incorrect dosages , missing medications , or timing errors . error messages are displayed on the workstation monitor 122 and reported to the pharmacy computer 110 . when the patient is out of the bed , a wireless barcode reader near the patient &# 39 ; s bed can be used to read either barcode label printed on both of the patient &# 39 ; s id bracelets , i . e . next to the rfid tags 130 and 131 . some institutions may prefer to provide each attendant with a wireless communication device 150 configured with a barcode reader 151 . the workstation computer 410 communicates with the pharmacy computer 110 at periodic intervals to determine prescribed medications and deadlines for medication deliveries for the identified wrist tag 130 or 131 . whenever a critical medication has not been identified by the barcode reader 440 or 151 before the prescribed deadline indicated by the pharmacy computer 110 , a “ late medication ” message is sent to a central monitoring station , and the message can be optionally forwarded to the responsible attendants wireless communication device 150 . if the workstation computer 410 does not identify that the late medication has been delivered in a specified period of time , the “ late medication ” alarm code is sent again and repeated at specified intervals until the medication is identified . some institutions may want their attendants to carry a wireless pda 150 , which can be easily configured with a barcode reader 151 . the attendant can use the wireless pda 150 and attached barcode reader 151 to read barcode labels in the patient &# 39 ; s room , to receive and transmit text or audio messages , and to also see a video image of a patient . if an institution is not able or willing to provide wireless pda &# 39 ; s 150 for their attendants , alarm codes can be transmitted to responsible attendants using less expensive telephone pagers . for example , a telephone pager message of “ 042 - 0891 ” could signify that a code “ 042 ” ( decoded as a late medication ) has been detected by the workstation computer 410 at room “ 0891 .” other number codes could be used to indicate patient falls , wet sheets , bed egress , room egress , and when weight - shifts are needed . in hospitals and nursing homes with more than one bed per room , a larger compartment inside the workstation cabinet 120 can be provided for multiple pillboxes . when a pillbox is identified and the patients inside the room are identified via an rfid antenna and transceiver inside or below each mattress 135 , the workstation monitor 122 displays a drawing of the room , an optional photograph of the patient and indicates which bed the patient is residing . in this situation , a second barcode check inside the patient room is particularly important , i . e . reading the barcode label on the patient &# 39 ; s id bracelet and the barcode label on each medication . the attendant workstation cabinet 120 can be attached to a wall as described above or contained inside a computer desk as depicted in fig5 . this design will be less appealing to most hospitals for the reasons described above , but may be more appealing to assistive living centers and nursing homes . fig5 shows a workstation computer 410 and back - up battery supply 424 , two keyboards 435 a and 435 b , two workstation monitors 122 a and 122 b , one rfid reader 121 , three storage compartments 431 a , 431 b , and 431 c , a locked cabinet door 430 with a horizontal hinge 432 , and pillbox 100 . the lowest storage compartment 431 c can also contain an optional refrigerator for intravenous bags . the workstation computer 410 can be set up to allow patients to use the desktop keyboard 435 b , computer monitor 122 b and middle storage drawer 431 b . the other two storage compartments 431 a and 431 c can be locked , requiring a pre - approved rfid badge and pin to access these compartments . the upper keyboard 435 a slides outward toward the attendant for inputting the attendant &# 39 ; s pin and accessing patient records . the upper cabinet door 430 a has two square holes ( not shown ) for accessing the rfid reader 121 and for viewing the upper computer monitor 122 when the cabinet door 430 a is in a locked position . the cabinet door 430 a rotates upward to access the pillbox 100 and upper storage compartment 431 a . fig6 shows another configuration of the attendant workstation cabinet 120 mounted to the foot - end of a hospital bed , e . g . plugging the workstation frame 600 into the sockets provided on most hospital beds for an over - bed trapeze frame . a second computer monitor 122 b is mounted to the workstation frame 600 to allow the patient to see the monitor 122 b while lying in the bed , and a wireless keyboard and mouse pad 435 b is available to the patient and guests for a variety of computer applications including internet access . a digital camera , microphone and audio speaker 605 can be attached to the frame 600 or enclosed with the computer monitor 122 b for audio and video communications with attendants , physicians and family members . a multi - lead electrical connector 610 will need to be installed near the headwall with appropriate electrical connections for the workstation computer 410 and other electronics provided with the workstation 120 . a mobile version of the bed frame workstation 120 could be offered with the workstation frame 600 attached to a stand that rolls under the foot - end of the bed . the workstation computer 410 in each of the above configurations monitors rf antennas at different locations in the patient &# 39 ; s room , for example ( 1 ) the rf antenna ( s ) 135 inside the mattress for reading either wrist tag 130 or 131 at periodic intervals to detect medication errors ; ( 2 ) the same rf antenna ( s ) 135 inside the mattress for identifying when neither wrist tag 130 nor 131 are close to the mattress which will be interpreted as bed egress ; ( 3 ) the rf antenna ( s ) under floor coverings or floor mats for identifying prolonged proximity of either wrist tag 130 or 131 which will be interpreted as a patient fall ; ( 4 ) the rf antenna ( s ) under a shower tub for identifying prolonged proximity of either wrist tag 130 or 131 which will be interpreted as a patient fall in the shower tub ; ( 5 ) the rf antenna ( s ) inside the entry door or door frame for identifying close proximity of either wrist tag 130 or 131 which will be interpreted as room egress ; and ( 6 ) the rf antenna ( s ) under floor coverings or floor mats in hallways , at doorways next to the bed , next to the toilet and at other locations for identifying close proximity of either ankle tag 132 or 133 . these rf antennas and tags will be used to detect wandering outside the patient &# 39 ; s room and will also detect when a patient gets out of the bed and when the patient has entered the bathroom . if the patient is wearing rfid tags , the antennas transmit and receive rfid signals via transceiver circuits . if the patient is wearing battery powered rf tags that automatically transmit an rf signal at periodic intervals , then the antennas are only used to receive the rf signals , and receiver circuits amplify the signals . it should be understood that the foregoing relates only to the exemplary embodiments of the present invention , and that numerous changes may be made therein without departing from the spirit and scope of the invention as defined by the following claims .