Patent Description:
This application relates generally to optimizing space within a device, such as an electronic medication storage cabinets used in healthcare organizations.

Medication dispensing cabinets are frequently utilized in hospitals to serve multiple patients. Prescription medication may be placed in such dispensing cabinets. Periodically the medications stored in the cabinet may be updated to assure that medications commonly prescribed by physicians are available as prescribing patterns often change over time. When this occurs medication are removed from the dispensing cabinets to make room for other medications. However, it is often difficult to gauge how much space a particular medication will require, as well as how much space is available in the medication dispensing cabinets. With differing sizes of medications, drawers, and storage compartments within the drawers, it becomes time consuming to organize items to create adequate storage space.

Pharmacists, nurses, and other operators of the dispensing cabinets often struggle to place critical medications in cabinets that are close to full capacity. Thus, with the ever- growing need for quick, efficient, and reliable access to medication for patients, the need to efficiently place and locate medication has increased. Methods of optimizing available storage space for patient medication are desired. Document <CIT> discloses a method and device according to the preamble of claim <NUM> and represents the closest prior art.

Typically, a user, such as a pharmacy technician, when placing or loading new medications into to an electronic medication storage unit, such as an automated medication dispensing cabinet, reconfigures the electronic medication storage unit. However, the user, at the time of loading the medications into the electronic medication storage unit does not have the necessary tools to optimize the contents of the electronic medication storage unit.

Accordingly, there is a need for methods and systems that can optimize the space of an electronic medication storage unit having predefined storage capabilities and requirements, and to guide a user through the steps to optimally load the medication into the electronic medication storage unit. Disclosed implementations are able to efficiently provide optimization instructions for use in a healthcare organization.

In accordance with some implementations, a method includes providing an electronic medication storage unit comprising a plurality of drawers, each drawer configured with a plurality of storage pockets, the drawer configured with a plurality of sensors arranged to identify a positioning of the plurality of storage pockets within the drawer. The method includes receiving an indication of a new medicine container to be loaded in the electronic medication storage unit. The method includes displaying a first step of a sequence of one or more steps to load the medicine container into an electronic medication storage cabinet on a display on the electronic medication storage cabinet, wherein the sequence is generated based on a mapping algorithm. The method includes determining whether the first step of the sequence of the one or more steps is associated with one of the plurality of drawers. The method includes, in response to determining that the first step is associated with one of the plurality of drawers, automatically unlocking the associated drawer. The method includes determining whether the first step is successfully completed. The method includes, in response to determining that the first step is successfully completed, determining whether execution of any additional steps is pending. The method includes generating an alert in response to determining that execution of no additional steps is pending. Other aspects include corresponding systems, apparatus, and computer program products for implementation of the method.

In accordance with some implementations, a method includes providing an electronic medication storage cabinet having a plurality of drawers, each drawer configured with a plurality of removable storage pockets, the drawer configured with a plurality of sensors arranged to identify a positioning of the plurality of removable storage pockets within the drawer. The method includes receiving an indication of a new medicine container to be stored in the electronic medication storage cabinet which requires a new storage pocket to be added to the electronic medication storage cabinet. The method further includes determining, based on receiving the indication, that at least a subset of removable storage pockets within one or more of the plurality of drawers require repositioning to accommodate the new pocket. The method further comprises generating, based on a mapping algorithm, a new arrangement of the subset of removable storage pockets and the new pocket within the one or more of the plurality of drawers. At the electronic medication storage cabinet, execute a predetermined sequence of steps for effecting the new arrangement including: (<NUM>) automatically unlocking a first drawer of the plurality of drawers, (<NUM>) providing a first prompt to remove at least a first storage pocket of the subset of removable storage pockets, (<NUM>) verifying, via the plurality of sensors, that the first storage pocket was removed, (<NUM>) providing a second prompt to relocate the first pocket within a first available space within the one or more of the plurality of drawers, (<NUM>) verifying, via the plurality of sensors, that the first pocket was relocated, (<NUM>) providing a third prompt to insert the new pocket within a second available space of the one or more of the plurality of drawers, and (<NUM>) verifying, via the plurality of sensors, that the new pocket was inserted. Other aspects include corresponding systems, apparatus, and computer program products for implementation of the method.

In accordance with some implementations, an electronic medication storage cabinet includes one or more processors and memory storing one or more programs configured for execution by the one or more processors. The one or more programs include instructions for performing the operations of any of the methods described in this application. In accordance with some implementations, a non-transitory computer-readable storage medium stores instructions that, when executed by a server system, cause the server system to perform the operations of any of the methods described in this application.

For a better understanding of the various described implementations, reference should be made to the Description of Implementations below, in conjunction with the following drawings. Like reference numerals refer to corresponding parts throughout the figures and description.

In one or more implementations, not all of the depicted components in each figure may be required, and one or more implementations may include additional components not shown in a figure. Variations in the arrangement and type of the components may be made without departing from the scope of the subject disclosure. Additional components, different components, or fewer components may be utilized within the scope of the subject disclosure.

The detailed description set forth below is intended as a description of various configurations of the subject disclosure and is not intended to represent the only configurations in which the subject disclosure may be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of the subject disclosure. However, it will be apparent to those skilled in the art that the subject disclosure may be practiced without these specific details. In some instances, structures and components are shown in block diagram form in order to avoid obscuring the concepts of the subject disclosure. Like components are labeled with identical element numbers for ease of understanding.

It will also be understood that, although the terms "first" and "second" are used herein to describe various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, a first drawer could be termed a second drawer, and, similarly, a second drawer could be termed a first drawer, without departing from the scope of the various described implementations. The first drawer and the second drawer are both drawers, but they are not the same drawer.

The terminology used in the description of the various implementations described herein is for the purpose of describing particular implementations only and is not intended to be limiting. It will also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed terms. It will be further understood that the terms "includes," "including," "comprises," and/or "comprising" when used in the specification, specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof.

<FIG> is a block diagram of a network architecture <NUM> in accordance with some embodiments.

The network architecture <NUM> includes one or more electronic medication storage cabinets <NUM>-<NUM>, <NUM>-<NUM>,. , <NUM>-n, collectively referred to herein as electronic medication storage cabinets <NUM>. In some implementations, an electronic medication storage cabinet <NUM> may be communicatively and/or operably coupled to one or more other electronically controlled and/or managed medication storage units, such as electronically controlled and/or managed medication storage towers, electronically controlled and/or managed medication storage refrigerators, and the like.

The one or more electronic medication storage cabinets <NUM> may be communicatively coupled to an electronic medication storage system server <NUM> by one or more communication networks <NUM>. The electronic medication storage system server <NUM> may be communicatively coupled to one or more patient and/or medication related systems <NUM>-<NUM>, <NUM>-<NUM>,. , <NUM>-m, collectively referred to herein as medication systems <NUM>, by one or more communication networks <NUM>. The one or more medications systems <NUM> may be any system configured to store, maintain, and/or update data related to active and/or discharged patients, locations of the patients (e.g., within a healthcare facility), medication orders for the patients, and the like. Examples of medication systems <NUM> include, but are not limited to, an electronic medical record system, a pharmacy information system, and the like. In some implementations, the electronic medication storage cabinets <NUM> may be communicatively coupled to the medication systems <NUM> via the electronic medication storage system server <NUM>. In some implementations, the electronic medication storage cabinets <NUM> may be communicatively coupled to the medication systems <NUM> by the one or more communication networks <NUM>.

Examples of the one or more communication networks <NUM> include, but are not limited to, an intranet, the Internet, cellular telephone networks, mobile data networks, wide area networks, local area networks, metropolitan area networks, and the like. In some implementations, the one or more communication networks <NUM> include a public communication network (e.g., the Internet and/or a cellular data network), a private communications network (e.g., a private LAN or leased lines), or a combination of such communication networks. The electronic medication storage cabinets <NUM> may be configured to communicate with the electronic medication storage system server <NUM> and/or the medication systems <NUM>. In some implementations, the electronic medication storage cabinets <NUM> may be configured to receive and/or transfer patient and/or medication related data from the electronic medication storage system server <NUM> or medication systems <NUM>. Examples of patient related data include, but are not limited to, patient biographical information, electronic medical records, information related to one or more recent procedures or treatment, information related to any prescribed medication, and the like. Examples of medication related data include, but are not limited to, medications stored in the electronic medication storage cabinets <NUM>, location of medications stored in the electronic medication storage cabinets <NUM>, and the like.

In some implementations, the electronic medication storage system server <NUM> is a single computing device such as a computer server, while in other implementations, the electronic medication storage system server <NUM> is implemented by multiple computing devices working together to perform the actions of a server system (e.g., cloud computing). Additional details of the electronic medication storage system server <NUM> are described herein and with reference to <FIG>.

The electronic medication storage cabinets <NUM> may include one or more input devices (shown in <FIG>) configured to receive inputs to the electronic medication storage cabinets <NUM>. The users <NUM>-<NUM>, <NUM>-<NUM>,. , <NUM>-n, collectively referred to herein as users <NUM>, may interact with the one or more electronic medication storage cabinets <NUM> via the one or more input devices. The users <NUM> may utilize the electronic medication storage cabinets <NUM> to access the electronic medication storage system server <NUM> and/or medication systems <NUM> to participate in corresponding services provided by the electronic medication storage system server <NUM> and/or medication systems <NUM>.

The electronic medication storage cabinets <NUM> may include one or more electronically controlled and/or managed movable drawers. For example, as shown in <FIG>, the electronic medication storage cabinet <NUM>-<NUM> includes electronically controlled and/or managed movable drawers 120a, 120b, 120c, 120d, 120e, 120f, <NUM>, <NUM>, 120i, collectively referred to herein as movable drawers <NUM>. <FIG> is a front view of the electronic medication storage cabinet <NUM>-<NUM>. In some implementations, some movable drawers <NUM> may be of different sizes. In some implementations, the electronic medication storage cabinets <NUM> may be configured to associate one or more movable drawers <NUM> with one or more patients. For example, the electronic medication storage cabinet <NUM>-<NUM> may be configured to associate movable drawer 120a with a first patient, and movable drawer 120c with a second patient. In some implementations, the electronic medication storage cabinets <NUM> may be configured to associate one movable drawer <NUM> with multiple patients. For example, the electronic medication storage cabinet <NUM>-<NUM> may be configured to associate movable drawer 120c with the second patient and a fourth patient. In some implementations, the electronic medication storage cabinets <NUM> may be configured to associate a patient with one or more movable drawers <NUM> based on the medications stored in a movable drawer <NUM>. For example, if a patient is prescribed a medication or is associated with a medication, the electronic medication storage cabinet <NUM> may be configured to associate the patient with a drawer that comprises the prescribed medication.

The movable drawers <NUM> may include or be configured with one or more sensor devices (not shown in <FIG>). For example, movable drawers <NUM> may be configured with sensor devices on the inside portions of the floors of the movable drawers <NUM>. In some implementations, the sensor devices may be placed in one or more patterns at different locations within the movable drawers <NUM>. Examples of such patterns include, but are not limited to, grid patterns, and the like. In some implementations, the sensor devices may be placed in a grid pattern covering a major portion of the movable drawers <NUM>. For example, the sensor devices may be placed in a grid pattern covering at least a majority of the inside floor of the movable drawers <NUM>.

Each movable drawer <NUM> may have one or more pockets. For example, as shown in <FIG>, the movable drawer 120a includes pockets 130a, 130b, 130c, 130d, 130e, 130f, <NUM>, <NUM>, 130i, 130j, <NUM>, <NUM>, <NUM>, 130n, 130o, and 130p, collectively referred to herein as pockets <NUM>. <FIG> is a top view of the movable drawer 120a. In some implementations, the pockets <NUM> may be different sizes and shapes. In some implementations, one or more pockets <NUM> may be fixed to a particular location within the movable drawer <NUM>. Such pockets <NUM> are referred to herein as fixed pockets. In some implementations, one or more pockets <NUM> may be movable from a first location within the movable drawer <NUM> to a second location within the movable drawer <NUM>, and/or relocated to a different movable drawer <NUM> within the same cabinet also configured for movable pockets, and/or removed from the movable drawer <NUM>. Such pockets <NUM> may be referred to herein as dynamic pockets. In some implementations, a dynamic pocket may be moved to a drawer of another cabinet configured for movable pockets. In some implementations, contents of a pocket <NUM> of one type (e.g., dynamic or fixed) may be transferred to a pocket of the other type (e.g., fixed or dynamic) in the same cabinet. For example, the contents of a fixed type pocket <NUM> may be transferred to a dynamic type pocket <NUM>. Similarly, the contents of a dynamic type pocket <NUM> may be transferred to a fixed type pocket <NUM>.

The pockets <NUM> may include or be configured with transmitter devices (not shown in <FIG>). In some implementations, the transmitter devices of the pockets <NUM> may be light based transmitter devices (e.g., laser based transmitter, and the like). In some implementations, the pockets <NUM> may include radio-frequency identification (RFID) based electronic devices (e.g., RFID tags).

In some implementations, pockets <NUM> may be either assigned to contain a single medication for use by multiple patients ("medication-specific"), a plurality of medications for use by a specific patient ("patient-specific"), or a single medication which may be a controlled substance for use only by a specific patient ("patient-specific controlled substance").

Turning now to <FIG>, there is shown a block diagram depicting an electronic medication storage system server <NUM> in accordance with some implementations. The electronic medication storage system server <NUM> typically includes one or more processing units (processors or cores) <NUM>, one or more network or other communications interfaces <NUM>, memory <NUM>, and one or more communication buses <NUM> for interconnecting these components. The communication buses <NUM> optionally include circuitry (sometimes called a chipset) that interconnects and controls communications between system components. In some implementations, the electronic medication storage system server <NUM> may include a display device <NUM>. In some implementations, the electronic medication storage system server <NUM> may include input devices such as a keyboard, a mouse, a trackpad, and/or input buttons. In some implementations, the display device <NUM> may include a touch-sensitive surface, in which case the display is a touch-sensitive display.

In some implementations, the electronic medication storage system server <NUM> may be configured to receive data related to patients, pockets <NUM>, movable drawers <NUM>, and the like, from the electronic medication storage cabinets <NUM>. In some implementations, the electronic medication storage system server <NUM> may be configured to transmit data related to optimized processes of loading ordered medications to electronic medication storage cabinets <NUM>. The electronic medication storage system server <NUM> may be configured to receive data related to ordered medications for patients, for loading into electronic medication storage cabinets <NUM>, and the like, from medication systems <NUM>. The electronic medication storage system server <NUM> may be configured to transmit data related to dispensing of medication in medication containers, status indicating success or failure of loading the ordered medications into the electronic medication storage cabinets <NUM>, and the like, to the medication systems <NUM>. In some implementations, the electronic medication storage system server <NUM> may be located either on premises of a healthcare organization, remotely hosted by a third-party service provider (e.g., in a cloud computing environment), and/or a combination thereof.

The electronic medication storage system server <NUM> may be configured with a mapping algorithm that is configured to identify a location in an electronic medication storage cabinet to store a medication and/or a medicine container containing the medication. In some implementations, the medicine container may be a dynamic pocket described herein. The one or more processes of the mapping algorithm are described herein with reference to <FIG>. The electronic medication storage system server <NUM> may generate a sequence of one or more steps to load the medication and/or the medicine container into the identified location of an electronic medication storage cabinet based on the mapping algorithm.

The memory <NUM> may be a high-speed random-access memory, such as DRAM, SRAM, DDR RAM, or other random-access solid-state memory devices, and may include non-volatile memory, such as one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, and/or other non-volatile solid-state storage devices. In some implementations, the memory <NUM> includes one or more storage devices remotely located from the processor(s) <NUM>. The memory <NUM>, or alternatively the non-volatile memory device(s) within the memory <NUM>, includes a non-transitory computer-readable storage medium. In some implementations, the memory <NUM> or the computer-readable storage medium of the memory <NUM> stores programs, modules, and/or data structures that may be used for the performing one or more operations of the server system <NUM>. The electronic storage system server <NUM> may execute the mapping algorithm based on one or more modules described herein and/or included in the memory <NUM>. For example, the memory <NUM> may include programs, modules, and/or data structures for an operating system <NUM>, a network communication module <NUM>, a patient information module <NUM>, an access device module <NUM>, a storage identification module <NUM>, a pocket mapping module <NUM>, a pocket arrangement module <NUM>.

In some implementations, the operating system <NUM> module may include procedures for handling various basic system services and for performing hardware dependent tasks. The network communication module <NUM> may be configured for connecting the server system <NUM> to other computing devices via the one or more communication network interfaces <NUM> (wired or wireless) and one or more communication networks <NUM>. The patient information module <NUM> may be configured to store data related to patients including, but not limited to, medical history, prescription medication, allergies, and the like. The patient information module <NUM> may be configured to associate a patient with an electronic medication storage cabinet <NUM>, and store the association in memory <NUM>. The access module <NUM> may be configured to grant, deny, and/or modify access to the server system <NUM> and/or one or other computing systems or devices communicatively coupled to the server system <NUM>.

The storage identification module <NUM> may be configured to store, maintain, and/or update data related to the contents of every pocket <NUM> for each electronic medication storage cabinet <NUM> communicatively coupled to the electronic medication storage system server <NUM>. The storage identification module <NUM> may be configured to store, maintain, and/or update data related to every empty pocket <NUM> for each electronic medication storage cabinet <NUM> communicatively coupled to the electronic medication storage system server <NUM>. The electronic medication storage system <NUM> may receive data related to contents of pocket <NUM> from the electronic medication storage cabinets <NUM>, and the storage identification module <NUM> may be configured to maintain and/or update data related to contents of pocket <NUM> based on the data received from the electronic medication storage cabinets <NUM>. In some implementations, storage identification module <NUM> may be similarly configured as storage identification module <NUM> described below with reference to <FIG>.

For each electronic medication storage cabinet <NUM> communicatively coupled to the electronic medication storage system server <NUM>, the pocket mapping module <NUM> may be configured to associate the dynamic and/or fixed pockets <NUM> of each movable drawer <NUM> with corresponding locations in the movable drawer <NUM>, and store the associations in memory <NUM>. In some implementations, the pocket mapping module <NUM> may be configured to receive data related to sensors with their locations in drawers <NUM> for each electronic medication storage cabinet <NUM>, and based on the mapping, the pocket mapping module <NUM> may be configured to determine locations of pockets within the drawers <NUM>. In some implementations, the pocket mapping module <NUM> may be similarly configured as the pocket mapping module <NUM> described below with reference to <FIG>.

The pocket arrangement module <NUM> may be configured to determine processes to rearrange one or more dynamic pockets <NUM> in the electronic medication storage cabinets <NUM> based on dimensions and/or size of other dynamic pockets <NUM> in the electronic medication storage cabinets <NUM> and/or a new dynamic pocket <NUM> comprising a newly ordered medication. The pocket arrangement module <NUM> may be similarly configured as pocket arrangement module <NUM> described below with reference to <FIG>.

Each of the above identified modules and applications corresponds to a set of executable instructions for performing one or more functions as described above and/or in the methods described in this application (e.g., the computer-implemented methods and other information processing methods described herein). These modules (i.e., sets of instructions) need not be implemented as separate software programs, procedures or modules, and thus various subsets of these modules are, optionally, combined or otherwise re-arranged in various implementations. In some implementations, the memory <NUM> may store a subset of the modules and data structures identified above. In some implementations, the memory <NUM> may store additional modules and data structures not described above. Processors <NUM> may be configured to execute the above identified modules for performing the one or more above-described functions and/or techniques of optimizing loading of medications in electronic medication storage cabinet <NUM> as described herein with reference to <FIG>.

Turning now to <FIG>, there is shown a block diagram depicting an electronic medication storage cabinet <NUM>. An electronic medication storage cabinet <NUM> may include one or more processors <NUM>, one or more network or communications interfaces <NUM>, memory <NUM>, one or more communication buses <NUM>, a user interface unit <NUM>, transmitter devices <NUM>, sensor devices <NUM>. The one or more processors <NUM>, the one or more network or communication interfaces <NUM>, memory <NUM>, and the user interface unit <NUM> may be configured to communicate with one another via the one or more communication buses <NUM>. In some implementations, the communication buses <NUM> may include circuitry (sometimes called a chipset) that interconnects and controls communications between components of the electronic medication storage cabinet <NUM>. In some implementations, the electronic medication storage cabinet <NUM> may include an image/video capture device <NUM>, such as a camera.

In some implementations, the electronic medication storage cabinet <NUM> may be configured with the mapping algorithm, and one or more processors <NUM> of the electronic medication storage cabinet <NUM> may be configured to identify a location in the electronic medication storage cabinet <NUM> to store a medication and/or a medicine container containing the medication. In some implementations, the medicine container may be a dynamic pocket described herein. As described above, the one or more processes of the mapping algorithm are described herein with reference to <FIG>. The electronic medication storage cabinet <NUM> may generate a sequence of one or more steps to load the medication and/or the medicine container into the identified location of an electronic medication storage cabinet based on the mapping algorithm.

The user interface unit <NUM> may include a display <NUM>, one or more input devices <NUM>, such as a keyboard or a mouse, one or more audio output devices <NUM>, and/or one or more audio input devices <NUM>. In some implementations, the display <NUM> may include a touch sensitive display or surface <NUM>, which is configured to receive inputs from a user <NUM>. The one or more audio output devices <NUM> may include, but are not limited to, speakers, interfaces configured to transfer audio related data to a device configured to project audio, and the like. The one or more input devices <NUM> may include, but are not limited to, microphones, interfaces configured to receive audio related data from a device configured to receive audio.

The movable drawers <NUM> of the electronic medication storage cabinet <NUM> may include or be configured with one or more sensor devices, such as sensor devices <NUM>. For example, movable drawers <NUM> may be configured with sensor devices <NUM> on the inside portions of the floors of the movable drawers <NUM>. In some implementations, the sensor devices may be placed in one or more patterns at different locations within the movable drawers <NUM>. Examples of such patterns include, but are not limited to, grid patterns, and the like. In some implementations, the sensor devices may be placed in a grid pattern covering a major portion of the movable drawers <NUM>. For example, the sensor devices may be placed in a grid pattern, forming a grid array of sensors, covering at least a majority of the inside floor of the movable drawers <NUM>. In some implementations, the sensor devices <NUM> may be placed around a perimeter of the movable drawer <NUM> such that they from a grid of light or signals.

The pockets <NUM> may include or be configured with transmitter devices, such as transmitter devices <NUM>. In some implementations, the transmitter devices <NUM> may be light based transmitter devices (e.g., laser based transmitter, and the like). In some implementations, the transmitter devices <NUM> may be radio-frequency identification (RFID) based devices (e.g., RFID tags).

The sensor devices <NUM> may be configured to receive signals from the transmitter devices <NUM> and output signals based on signals received from transmitter devices <NUM>. For example, a sensor device <NUM> may be configured to detect whether a transmitter device <NUM> is placed near the sensor device <NUM> based on a signal received from the transmitter device <NUM> and produce a signal indicating that a pocket associated with that transmitter device <NUM> is placed near that sensor device <NUM>.

The one or more modules (e.g. the pocket mapping module <NUM>) described herein, and/or processor <NUM>, may be configured to determine a location of a pocket <NUM> within the electronic medication storage cabinet <NUM> based on the signals or output data from sensors <NUM>. For example, if the sensor devices <NUM> are placed in a grid pattern, forming a grid array of sensors, in a movable drawer <NUM>, then based on sensor devices <NUM> in the grid pattern that detect a signal from the transmitter device associated with the pocket <NUM>, the one or more modules (e.g., the pocket mapping module <NUM>) may be configured to determine the location of the pocket <NUM> on the grid array of sensor devices <NUM> and within the drawer <NUM>. Similarly, based on the signals or output data from the sensor devices <NUM>, the one or more modules (e.g. the pocket mapping module <NUM>) may be configured to determine if a pocket <NUM> has been removed from its current location within the electronic medication storage cabinet <NUM>. Similarly, based on the signals or output data from the sensor devices <NUM>, the one or more modules (e.g. the pocket mapping module <NUM>) may be configured to determine if a pocket <NUM> has been placed in a certain or new location within the electronic medication storage cabinet <NUM>.

The memory <NUM> includes high-speed random-access memory, such as DRAM, SRAM, DDR RAM or other random-access solid-state memory devices; and may include non-volatile memory, such as one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. In some implementations, the memory <NUM> includes one or more storage devices remotely located from the processor(s) <NUM>. The memory <NUM>, or alternatively the non-volatile memory device(s) within the memory <NUM>, includes a non-transitory computer-readable storage medium. In some implementations, the memory <NUM> or the computer-readable storage medium of the memory <NUM> stores the programs, modules, and data structures that may be used for performing operations of the electronic medication storage cabinets <NUM> and for performing techniques described herein for optimization of loading or one or more medications into an electronic medication storage cabinet. In some implementations, the electronic storage cabinet <NUM> may execute the mapping algorithm based on one or more modules described herein and/or included in the memory <NUM>. The memory <NUM> may include an operating system <NUM>, a network communication module <NUM>, an image/video capture module <NUM>, an audio input/output module <NUM>, a storage identification module <NUM>, an access module <NUM>, a pocket mapping module <NUM>, a pocket arrangement module <NUM>, and/or a patient information module <NUM>.

The operating system <NUM> may be configured to perform procedures of execution of various system services of the electronic medication storage cabinet <NUM>, including, but not limited to, hardware, and software dependent tasks. The network communication module <NUM> may be configured to execute instructions to connect the electronic medication storage cabinet <NUM>. to one or more other computing devices, such as the healthcare server system <NUM>, third party servers <NUM>, and the like, via the one or more communication interfaces <NUM> and communication networks, such as the communication network <NUM>. The image/video capture module <NUM> may be configured to execute instructions to capture images or a continuous stream of images. The audio input module <NUM> may be configured process received input data and transmit instructions and/or related data to one or more other components of the electronic medication storage cabinet <NUM>. The access module <NUM> may be configured grant, deny, and/or modify access to the electronic medication storage cabinet <NUM>. For example, the access module <NUM> may be configured to grant or deny access to the electronic medication storage cabinet <NUM> based on received login credentials for the electronic medication storage cabinet <NUM>.

The storage identification module <NUM> may be configured for storing a list of empty pockets <NUM> within the electronic medication storage cabinet <NUM>. In some implementations, each of the pockets <NUM> within the electronic medication storage cabinet <NUM> may be associated with a unique identifier and the storage identification module <NUM> may be configured to generate and/or update the list of empty pockets with the unique identifiers of the pockets <NUM> that are empty. As described above, the pockets <NUM> may include transmitter devices <NUM> that are RFID tags, and in some implementations, the RFID tag of the pocket may include data related to medication within the pocket <NUM>.

The pocket mapping module <NUM> may be configured to associate the dynamic and/or fixed pockets <NUM> of the electronic medication storage cabinet <NUM> with locations within a movable drawer <NUM>. In some implementations, the pocket mapping module <NUM> may be configured to use data from sensor devices <NUM> located within drawers <NUM>, and/or data from transmitter devices <NUM> included within or configured with pockets <NUM> to determine locations of the pockets <NUM> within movable drawers <NUM>. In some implementations, the pocket mapping module <NUM> may be configured to associate a pocket <NUM> with one or more nearby sensor devices in response to the pocket <NUM> being placed at a particular location within the drawer <NUM>.

In some implementations, the pocket mapping module <NUM> may be configured to generate a mapping of the sensors with their particular location within the drawer <NUM>, and based on the mapping, the pocket mapping module <NUM> may be configured to determine the location of a particular pocket within the drawer <NUM>. For example, a subset of sensor devices <NUM> of the electronic medication storage cabinet <NUM>-<NUM> may be located within a movable drawer 120a, and the pocket mapping module <NUM> may be configured to determine the location of pocket 130d based on one or more sensor devices <NUM> associated with pocket 130d and the mapping of the associated sensor devices <NUM> with location of the removable drawer 120a. The pocket mapping module <NUM> may be configured to map a medication with a pocket in which it is stored and store the mapping of the medications to pockets in data storage unit.

The pocket arrangement module <NUM> may be configured to rearrange pockets <NUM> within the electronic medication storage cabinet <NUM> based on dimensions and/or size of a new pocket <NUM> and/or ordered medication. The pocket arrangement module <NUM> may be configured to identify one or more dynamic pockets in the electronic medication storage cabinet <NUM>, which when rearranged to other drawers <NUM> or within the same drawer <NUM> will create sufficient contiguous space in one of the drawers <NUM> to place the new dynamic pocket <NUM>. For example, based on dimensions and/or size of a new dynamic pocket <NUM>, the pocket arrangement module <NUM> may identify pocket 130e and 130f in drawer 120a that if moved to a different drawer <NUM> (e.g., 120b, 120c) will create sufficient space within the first drawer 120a for the new pocket <NUM>. Continuing with the example, for each of the identified pockets 130e and 130f, the pocket arrangement module <NUM> may be configured to determine, based on their respective dimensions and/or size, if sufficient contiguous space is available within the other drawers of the electronic medication storage cabinet <NUM> to successfully move the pockets 130e and 130f from the drawer 120a a to the other drawers. In some implementations, in response to determining that the identified pockets may be successfully moved to other drawers, the pocket arrangement module <NUM> may send a message to the one or more processors <NUM> indicating that one or more pockets <NUM> can be rearranged to create sufficient contiguous space for the new pocket <NUM>.

The patient information module <NUM> may be configured to store, and/or access patient data of patients associated with the electronic medication storage cabinet <NUM>. The patient information module <NUM> may be configured to store data in and/or access patient data from a data storage unit of the electronic medication storage cabinet <NUM> or operably coupled to the electronic medication storage cabinet <NUM>. Additional details of the load optimization steps and/or techniques are described herein with reference to <FIG>.

Each of the above identified modules and applications corresponds to a set of executable instructions for performing one or more functions as described above and/or in the methods described in this application (e.g., the computer-implemented methods and other information processing methods described herein). These modules (i.e., sets of instructions) need not be implemented as separate software programs, procedures or modules, and thus various subsets of these modules are, optionally, combined or otherwise re-arranged in various implementations. In some implementations, the memory <NUM> and/or the memory <NUM> store a subset of the modules and data structures identified above. In some implementations, the memory <NUM> and/or the memory <NUM> stores additional modules and data structures not described above. Processors <NUM> may be configured to execute the above identified modules for performing the one or more above-described functions and/or techniques of optimizing loading of medications in an electronic medication storage cabinet as described herein with reference to <FIG>.

Turning now to <FIG>, there are shown flowcharts illustrating an optimized process of identifying a location to store a medication in an electronic medication storage cabinet. For the purpose of illustrating a clear example, components of the network architecture <NUM>, shown and described with reference to <FIG>, components of the electronic medication storage system server <NUM>, shown and described with reference to <FIG>, and components of the electronic medication storage cabinets <NUM>, shown and described with reference to <FIG>, may be used to describe the optimized process of loading a medication in an electronic medication storage cabinet <NUM>. In some implementations, the optimized process of loading a medication in an electronic medication storage cabinet <NUM> described herein with reference to <FIG> may be performed and/or executed by electronic medication storage system server <NUM> via processors <NUM> and its modules, and in some implementations, by electronic medication storage cabinet <NUM> via processors <NUM> and its modules.

The method <NUM> includes receiving, by one or more processors <NUM> of the electronic medication storage system server <NUM>, an order for a medication (block <NUM>). The order for the medication may be received via a message from a medication system <NUM>. As described above, a medication system <NUM> may be a medication ordering system and/or a medication prescribing system, such as an electronic medical record system, a pharmacy information system, and the like, of a medical facility, such as a hospital. In some implementations, the processors <NUM> may be configured to determine, via the patient information module <NUM>, whether the medication is ordered for a patient associated with an electronic medication storage cabinet <NUM>. The one or more processors <NUM> may be configured to determine whether the ordered medication is chosen (e.g., by a user) to be loaded in the electronic medication storage cabinet <NUM>. (block <NUM>). The one or more processors <NUM> may be configured to determine whether the ordered medication is chosen to be loaded in the electronic medication storage cabinet <NUM> based on a received message specifying the ordered medication. The received message may specify the choice of a user, such as a pharmacist or a pharmacist technician, of a medication system <NUM> to load the ordered medication into the electronic medication storage cabinet <NUM>. The user of the medication system <NUM> may provide the choice to load the ordered medication via an input to the medication system <NUM>, and the medication system <NUM> may include information related to the choice in the message received by the medication storage cabinet <NUM>. For example, the received message specifying the order may include a field that indicates whether the medication is chosen to be stored in the electronic medication storage cabinet or dispensed in some other manner.

If the one or more processors <NUM> determine that the ordered medication is chosen not be stored in the electronic medication storage cabinet ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. At block <NUM>, the one or more processors <NUM> determine that the medication will be dispensed as a patient specific medication (block <NUM>). In some implementations, a user, such as a pharmacy technician, may specify for the ordered medication to be dispensed as a patient specific medication in electronic medication storage cabinet <NUM>. In some implementations, a user, may provide an input to the electronic medication storage cabinet <NUM> to store the patient specific medication in electronic medication storage cabinet <NUM>. For example, a user, when delivering the ordered medication, may desire to store the medication in the electronic medication storage cabinet <NUM> rather than in a different storage area, and may provide an input, to the electronic medication storage cabinet <NUM>, to store the ordered medication in the electronic medication storage cabinet <NUM>. In such implementations, in response to receiving such an input, the one or more processors <NUM> of the electronic medication storage cabinet <NUM> may be configured to transmit a message to the electronic medication storage system server <NUM> indicating that the ordered medication to be dispensed as patient specific medication, and the one or more processors <NUM> may initiate the method <NUM> from block <NUM>.

Returning to block <NUM>, if the one or more processors <NUM> determine that the ordered medication is chosen to be stored in the electronic medication storage cabinet <NUM>, then the method proceeds to block <NUM>. The one or more processors <NUM> determine whether the ordered medication can be stored in the electronic medication storage cabinet <NUM> (block <NUM>). The processors <NUM> may be configured to determine, based on a set of predetermined rules stored in a memory of the electronic medication storage system server <NUM>, whether the ordered medication can be stored in the electronic medication storage cabinet <NUM>. For example, the set of predetermined rules may specify that a set of medications must be refrigerated, and the one or more processors <NUM> may be configured to determine that the ordered medication cannot be stored in the electronic medication storage cabinet <NUM> if the ordered medication is within the set of medications. Similarly, the set of predetermined rules may specify that certain types and/or classification of medications must be stored in a electronically controlled and/or managed storage tower, and the one or more processors <NUM> may be configured to determine that ordered medication cannot be stored in the electronic medication storage cabinet <NUM> if a type or a classification of the ordered medication matches one of the specified types or classifications.

If the one or more processors <NUM> determine that the ordered medication cannot be stored in the electronic medication storage cabinet <NUM> ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>-a. In some implementations, in response to the one or more processors <NUM> determining that the ordered medication cannot be stored in the electronic medication storage cabinet <NUM>, the one or more processors <NUM> maybe configured to generate and transmit an alert to medication system <NUM>. The alert may indicate that the ordered medication cannot be loaded into the electronic medication storage cabinet <NUM>, and may be configured to cause the generated alert to be provided and/or displayed to the user (e.g., on a display screen) by sending the alert to the medication system <NUM>.

At block <NUM>-a, the one or processors <NUM> determine whether the ordered medication can be refrigerated (block <NUM>-a). As described above, the one or more processors <NUM> may be configured to determine whether a medication can be refrigerated based on a set of rules. If the one or more processors <NUM> determines that the medication can be refrigerated ('YES' at block <NUM>-a), then the method <NUM> proceeds to block <NUM>-b. The one or more processors <NUM> transmit a message to medication system <NUM> for storage of the ordered medication in a medication storage refrigerator (block <NUM>-b). The one or more processors <NUM> may create steps to assist a user, such as a pharmacy technician, to load the ordered medication in the refrigerator and transmit the created steps and instructions to electronic medication storage cabinet <NUM>. As described above, in some implementations, the electronic medication storage cabinet <NUM> may be associated with or communicatively coupled to an electronically controlled and/or managed refrigerator. The one or more processors <NUM> may be configured to provide and/or cause the created steps to be displayed on a display device associated with the electronic medication storage cabinet <NUM> for the user. For example, a user may scan the ordered medication and/or a package containing the ordered medication at the electronic medication storage cabinet <NUM>, and the one or more processors <NUM> may be configured to provide the received created steps on a display device associated with the electronic medication storage cabinet <NUM>.

Returning to block <NUM>-a, if the one or more processors <NUM> determine that the ordered medication cannot be refrigerated ('NO' at block <NUM>-a), then the method <NUM> continues to block <NUM>-a. At block <NUM>-a, the one or more processors <NUM> may be configured to determine whether the ordered medication can be stored in a tower configured to store medication (block <NUM>-a). Similar to the refrigerator, in some implementations, the electronic medication storage cabinet <NUM> may be associated with and/or communicatively coupled to an electronically controlled and/or managed medication storage tower. If the one or more processors <NUM> determine that the ordered medication can be stored in the electronically controlled and/or managed medication storage tower ('YES' at block <NUM>-a), then the method <NUM> proceeds to block <NUM>-b. The processors <NUM> transmit a message to the medication system <NUM> for storage of the ordered medication in a medication storage tower (block <NUM>-b). The one or more processors <NUM> may be configured to create and transmit steps and instructions to electronic medication storage cabinet <NUM> to assist a user to store the ordered medication in the electronically controlled and/or managed tower. If the one or more processors <NUM> determine that the ordered medication cannot be stored in the tower ('NO' at block <NUM>-a), then the method <NUM> proceeds to the block <NUM>. In some implementations, the one or more processors <NUM> may generate an alert that the ordered medication will have to be dispensed as a patient specific medication responsive to the one or more processors <NUM> determining that the ordered medication cannot be stored in the tower. The alert may be transmitted to the medication system <NUM>.

Returning to block <NUM>, if the one or more processors <NUM> determine that the ordered medication can be stored in the electronic medication storage cabinet <NUM> ('YES' at block <NUM>), then the method <NUM> continues to block <NUM>. The one or more processors <NUM> determine whether the ordered medication is a patient-specific medication (block <NUM>). In some implementations, information specifying whether the ordered medication is a patient-specific medication is received by the electronic medication storage system server <NUM>, and the one or more processors <NUM> may be configured to determine whether the ordered medication is a patient-specific medication based on the received information. For example, the message received from the medication system <NUM> may comprise information specifying whether the ordered medication is patient-specific or not, and the one or more processors <NUM> determine that the ordered medication is patient-specific based on the information in the message.

If the one or more processors <NUM> determine that the ordered medication is patient-specific ('YES' at block <NUM>), then the method <NUM> continues to block <NUM>. Additional details of the method <NUM> at block <NUM> are described herein with reference to <FIG>. If the one or more processors <NUM> determine that the ordered medication is not patient-specific ('NO' at block <NUM>), then the method <NUM> continues to block <NUM>. At block <NUM>, the one or more processors <NUM> determine whether the electronic medication storage cabinet <NUM> at which the ordered medication can be loaded supports dynamic pockets (block <NUM>). In some implementations, configuration data of the electronic medication storage cabinet <NUM> may specify whether the electronic medication storage cabinet <NUM> supports dynamic pockets, and the configuration data or information related to that configuration data may be stored in the electronic medication storage system server <NUM> (e.g., in a storage unit of and/or associated with the electronic medication storage system <NUM>). The one or more processors <NUM> may be configured to determine whether the electronic medication storage cabinet <NUM> supports dynamic pockets based on the configuration data.

If the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> supports dynamic pockets ('YES' at block <NUM>), then the method <NUM> continues to block <NUM>. At block <NUM>, the one or more processors <NUM> determine whether the ordered medication can be stored in a dynamic pocket of the electronic medication storage cabinet <NUM>. As described above, an electronic medication storage cabinet <NUM> may include dynamic pockets, fixed pockets, and a combination thereof. The one or more processors <NUM> may be configured to determine whether medications can be stored in dynamic pockets based on a set of rules that specify whether certain medications are permitted to be stored in dynamic pockets. For example, the set of rules may specify a list of identifiers of medications that may only be stored in certain type of pockets of an automated drug dispensing cabinet <NUM>, and the one or more processors <NUM> may be configured to check if an identifier of the ordered medication is within the list and determine that the ordered medication cannot be stored in a dynamic pocket if the identifier of the ordered medication is within that specified list. Similarly, the set of rules may specify that certain types of medications, such as controlled substances, may only be stored in secured pockets or pockets with a lid, such as a dynamic pocket in some implementations, and if the one or more processors <NUM> determines that the ordered medication is such a type of medication, then the processors <NUM> determine that the ordered medication can be stored in a dynamic pocket.

If the one or more processors <NUM> determine that the ordered medication may be stored in the dynamic pockets of the electronic medication storage cabinet <NUM>, then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine current locations of dynamic pockets in the electronic medication storage cabinet <NUM> (block <NUM>). As described above, the pocket mapping module <NUM> may be configured to associate the dynamic and/or fixed pockets <NUM> of the electronic medication storage cabinet <NUM> with locations within the movable drawers <NUM>. The one or more processors <NUM>, via the pocket mapping module <NUM>, may determine the locations of one or more dynamic pockets.

The one or more processors <NUM> determine a size of a dynamic pocket for the ordered medication (block <NUM>). A user, such as a pharmacy technician, after reviewing the medication, may place the ordered medication in a dynamic pocket, referred to herein as an unassigned dynamic pocket. The unassigned dynamic pocket may be outside of the electronic medication storage cabinet <NUM> and not in any drawers <NUM> of the electronic medication storage cabinet <NUM>. In some implementations, the electronic medication storage system server <NUM> may receive the size and/or dimensions of the unassigned dynamic pocket from the medication system <NUM>.

The one or more processors <NUM> may associate the unassigned dynamic-pocket with the ordered medication. In some implementations, the electronic medication storage system server <NUM> may be configured to receive an identifier of the unassigned dynamic-pocket and an identifier of the ordered medication from the medication system <NUM>, and the one or more processors <NUM> may be configured to associate the unassigned dynamic pocket with the ordered medication by associating the respective identifiers with each other. In some implementations, the one or more processors <NUM> may be configured to access medication system <NUM> to determine an identifier of the unassigned dynamic-pocket, and associate the ordered medication with the identifier of the unassigned dynamic-pocket. In some implementations, the electronic medication storage system server <NUM> may be configured with a set of rules that specify sizes and/or dimensions of dynamic pockets for various medications (e.g., identifiers of medications). The one or more processors <NUM>, based on the ordered medication (e.g., identifier of the ordered medication) and the specified size and/or dimension of dynamic pocket in the set of rules, may be configured to determine size and/or dimensions of an unassigned dynamic pocket for the ordered medication.

The one or more processors <NUM> determines whether sufficient contiguous space is available in the electronic medication storage cabinet (block <NUM>). In some implementations, the one or more processors <NUM>, via pocket mapping module <NUM>, may be configured to determine the dimensions of the movable drawers <NUM> of the electronic medication storage cabinets <NUM>. In some implementations, the one or more processors <NUM>, via pocket mapping module <NUM>, may be configured to identify the locations in the electronic medication storage cabinet <NUM> that are not associated with any dynamic pockets, and calculate, based on the locations that are not associated with any dynamic pockets and dimensions of the movable drawers <NUM>, the amount of contiguous space available in the electronic medication storage cabinet <NUM>.

In some implementations, the one or more processors <NUM> may be configured to determine whether the calculated amount of contiguous space satisfies the dimensions and/or size of the unassigned dynamic pocket, and, if the calculated amount of contiguous space satisfies the dimensions and/or size of the unassigned dynamic pocket, then the one or more processors <NUM> may be configured to determine that sufficient contiguous space is available in the electronic medication storage cabinet <NUM>. In some implementations, the one or more processors <NUM>, may provide an alert to user (e.g., via a display device of the medication system <NUM>) that indicates that the ordered medication can be stored in a dynamic pocket if the one or more processors <NUM> determine that sufficient contiguous free space is available for the unassigned dynamic pocket.

If the one or more processors <NUM> determine that sufficient contiguous space is available in the electronic medication storage cabinet <NUM> ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. At block <NUM>, the one or more processors <NUM> transmit a message to the medication systems <NUM> indicating that the ordered medication can be dispensed in a dynamic pocket (block <NUM>). In some implementations, the one or more processors <NUM> may be configured to specify instructions to dispense the ordered medications into the unassigned dynamic pocket. In some implementations, the one or more processors <NUM> may be configured to provide the medication system <NUM> access to an electronically controlled cabinet comprising dynamic pockets. In some implementations, the one or more processors <NUM> may identify a next available dynamic pocket for use by a user of the medication system <NUM> and transmit that information to the medication system <NUM>.

In some implementations, the one or more processors <NUM>, via the pocket mapping module <NUM>, may be configured to assign one or more contiguous locations in the electronic medication storage cabinet <NUM> with the unassigned dynamic pocket. The one or more processors <NUM> create steps to place the unassigned dynamic pocket in the electronic medication storage cabinet <NUM> (block <NUM>). The created steps may be sequential graphical steps. In some implementations, the one or more processors <NUM> generate an alert that the unassigned dynamic pocket is assigned space in the electronic medication storage cabinet <NUM>. In some implementations, the one or more processors <NUM> may associate the created steps with the ordered medication and/or the unassigned dynamic pocket, and store the association in a storage unit of the electronic medication storage system server <NUM>. The one or more processors <NUM> may be configured to transmit the created steps associated with an ordered medication and/or an unassigned dynamic pocket to electronic medication storage cabinet <NUM>. As described below, the created steps may be displayed on a display device, such as display device <NUM>, when the ordered medication is delivered to the electronic medication storage cabinet <NUM>. Additional details of delivering an ordered medication to the electronic medication storage cabinet <NUM> are described herein in with reference to <FIG> and <FIG>. The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM> (block <NUM>). In some implementations, the one or more processors <NUM> may be configured to store data related to whether an ordered medication is successfully delivered to the electronic medication storage cabinet <NUM>. In some implementations, the one or more processors <NUM> may transmit instructions to the electronic medication storage cabinet <NUM> indicating that an ordered medication is scheduled to be delivered to the electronic medication storage cabinet <NUM>.

Returning to block <NUM>, if the one or more processors <NUM> determine that sufficient contiguous space is not available ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether any dynamic-pockets can be reorganized to create the sufficient contiguous space (block <NUM>). For example, the one or more processors <NUM>, via pocket arrangement module <NUM>, may be configured to determine if sufficient contiguous space can be created in the electronic medication storage cabinet <NUM> by reorganizing or rearranging the one or more dynamic-pockets that are in the electronic medication storage cabinet <NUM>. If sufficient contiguous space can be created by reorganizing the dynamic pockets, then the one or more processors <NUM> determine that dynamic-pockets can be reorganized. If the one or more processors <NUM> determine that one or more dynamic pockets can be reorganized to create sufficient contiguous space ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. At block <NUM>, similar to block <NUM>, the one or more processors <NUM> transmit a message to the medication system <NUM> indicating that the ordered medication can be dispensed or placed in a dynamic pocket.

The one or more processors <NUM> create steps to rearrange the dynamic-pockets (block <NUM>). Similar to the created steps to place the unassigned dynamic pocket in the electronic medication storage cabinet <NUM>, the created steps to rearrange the dynamic-pockets may be graphical, and the one or more processors <NUM>, may be configured to transmit the created steps to the electronic medication storage cabinet <NUM>. The one or more processors <NUM> create steps to place the unassigned dynamic pocket in the electronic medication storage cabinet <NUM> (block <NUM>). The one or more processors <NUM> may be configured to transmit the created steps of placing the unassigned dynamic pocket in the electronic medication storage cabinet <NUM> to the electronic medication storage cabinet <NUM>. The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM> (block <NUM>).

Returning to block <NUM>, if the one or more processors <NUM> determine that sufficient contiguous space is not available ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether contents of a dynamic pocket in the electronic medication storage cabinet <NUM> can be combined with contents of another dynamic pocket of in the electronic medication storage cabinet <NUM> (block <NUM>). In some implementations, the one or more processors <NUM> may be configured to determine that contents of a first dynamic pocket can be combined with contents of another dynamic pocket if a unique identifier of the medication in the first dynamic pocket is the same as a unique identifier of the medication in another dynamic pocket. In some implementations, the one or more processors <NUM> may be configured to determine the unique identifier of a medication based on received data related to the medications from the medication systems <NUM> and/or electronic medication storage cabinet <NUM>. The electronic medication storage system server <NUM> may receive data related to a medication and a pocket <NUM> in which it is placed in an electronic medication storage cabinet <NUM> and store the data in a storage unit associated with the electronic medication storage system server <NUM>. Based on such data, the one or more processors <NUM> may be configured to determine the pockets that contain medications with the same identifiers.

If the one or more processors <NUM> determine that the contents of the dynamic pocket can be combined with contents of another dynamic pocket, then the method <NUM> proceeds to block <NUM>. At block <NUM>, similar to blocks <NUM> and <NUM>, the one or more processors <NUM> transmit a message to the medication system <NUM> indicating that the ordered medication can be dispensed or placed in a dynamic pocket.

The one or more processors <NUM> create steps to combine dynamic pockets (block <NUM>). For example, the one or more processors <NUM>, via pocket mapping module <NUM>, may be configured to create steps to combine medication of one dynamic-pocket with medication of another dynamic-pocket. The one or more processors <NUM> create steps to remove the freed or the empty dynamic-pocket in the electronic medication storage cabinet <NUM> (block <NUM>). The one or more processors <NUM> create steps to place the unassigned dynamic-pocket in the electronic medication storage cabinet <NUM> (block <NUM>). The one or more processors <NUM> may create steps to place the unassigned dynamic-pocket in a location of the freed dynamic pocket in the electronic medication storage cabinet <NUM>. The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM> (block <NUM>).

Returning to block <NUM>, if the one or more processors <NUM> determine that the contents of a dynamic pocket in the electronic medication storage cabinet <NUM> cannot be combined with contents of another dynamic pocket of in the electronic medication storage cabinet <NUM> ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether current inventory in any dynamic pockets can be removed. (block <NUM>). To determine whether current inventory may be removed from pockets of the electronic medication storage cabinet <NUM>, the one or more processors <NUM> may be configured to determine whether there are any patient-specific medications for patients who were transferred or discharged from the medical facility or a unit of medical facility (block <NUM> in <FIG>). In some implementations, each patient-specific medication may be associated with a patient for whom the medication is ordered. The associations may be stored in a storage unit associated with the electronic medication storage system server <NUM> and/or electronic medication storage cabinet <NUM>. The one or more processors <NUM>, based on the stored associations, may determine if any of the medications in the pockets are associated with transferred out or discharged patients.

If the one or more processors <NUM> determines that a pocket <NUM> in the electronic medication storage cabinet <NUM> includes medications for transferred or discharged patients ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. At block <NUM>, the one or more processors <NUM> determine that the patient-specific medication can be removed. The one or more processors <NUM> may be configured to create steps for removal of patient-specific medication and transfer the steps to the electronic medication storage cabinet <NUM>. If the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> does not include any patient-specific medications for transferred or discharged patients ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether any pockets in the electronic medication storage cabinet <NUM> include any discontinued medication (block <NUM>). In some implementations, a set of rules may specify a list of patient-specific medication that are discontinued, and the one or more processors <NUM> may be configured to determine that a patient-specific medication in a pocket is discontinued if the medication matches a medication in the specified list.

If the one or more processors <NUM> determine that a pocket includes a discontinued medication ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine that the patient-specific medication can be removed. The one or more processors <NUM>, similar to block <NUM>, may be configured to create steps for removal of patient-specific medication and transfer the steps to the electronic medication storage cabinet <NUM>. If the one or more processors <NUM> determine that the discontinued medications are not stored in the electronic medication storage cabinet <NUM> ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. At block <NUM>, the one or more processors <NUM> determine whether a medication in a pocket <NUM> of the electronic medication storage cabinet is a standard stock item. In some implementations, a set of rules may specify a list of medications that are predetermined to be standard stock type of medications, and the one or more processors <NUM> may determine if a medication in a pocket is standard stock based on the specified list of medications.

If the one or more processors <NUM> determine that the medication in the pocket <NUM> is of a standard stock type ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine that the medication should not be removed from the electronic medication storage cabinet <NUM> (block <NUM>). If the one or more processors <NUM> determine that the medication in the pocket is not of a standard stock type ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether there are any active orders for a medication in a pocket <NUM> at an electronic medication storage cabinet <NUM> (block <NUM>). In some implementations, the one or more processors <NUM> may store and update a list of current active orders and corresponding medications for the orders in a storage unit of the electronic medication storage cabinet <NUM>. In some implementations, the one or more processors <NUM> may determine whether there are any active orders for a medication based on the stored list specifying the current active orders.

If the one or more processors <NUM> determine there is an active order for a medication ('YES' at block <NUM>), then the proceeds to block <NUM>, and the one or more processors <NUM> determine that the medication cannot be removed (block <NUM>). If the one or more processors <NUM> determine there are no active orders for medications in any pocket <NUM> of the electronic medication storage cabinet <NUM> ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine if any of the medications are potentially expired in the electronic medication storage cabinet <NUM> (block <NUM>). If the one or more processors <NUM> determine that there are medications that may be potentially expired in the electronic medication storage cabinet <NUM> ('YES' at block <NUM>), then the method proceeds to block <NUM>, and the one or more processors <NUM> determine that the expired medication can be removed. The one or more processors <NUM> may be configured to create steps to remove the expired medication from the electronic medication storage cabinet <NUM> and transmit the created steps to the electronic medication storage cabinet <NUM>. If the one or more processors <NUM> determine that there are no medications in any pockets <NUM> of the electronic medication storage cabinet <NUM> that are potentially expired ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>.

The one or more processors <NUM> determine if a medication in a pocket <NUM> has been withdrawn and/or used for a patient within a threshold number of days (block <NUM>). The one or processors <NUM> may receive data for medications stored in electronic medication storage cabinets <NUM> that were used for patients and a date and time at which they were used, and based on such data, the one or more processors <NUM> may be configured to determine whether a medication in an electronic medication storage cabinet <NUM> has been withdrawn and/or used for a patient within the threshold number of days. If the one or more processors <NUM> determines that the medication in a pocket has been withdrawn and/or used within a threshold number of days ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>, and the one or more processors <NUM> determines that the medication cannot be removed (block <NUM>). If the one or more processors <NUM> determines that the medication in the pocket <NUM> has not been withdrawn and/or used within a threshold number of days ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine that the medication in the pocket <NUM> can be removed (block <NUM>).

Returning to block <NUM> in <FIG>, if the one or more processors <NUM> determine that inventory in a dynamic pocket <NUM> can be removed ('YES' at block <NUM>), then the method proceeds to block <NUM>. At block <NUM>, similar to blocks <NUM>, <NUM>, <NUM>, the one or more processors <NUM> transmit a message to the medication system <NUM> indicating that the ordered medication can be dispensed or placed in a dynamic pocket.

The one or more processors <NUM> create steps to remove one or more dynamic pockets that include inventory (e.g., medications) that can be removed (block <NUM>). The one or more processors <NUM> may transmit the created steps to remove the one or more dynamic pockets to the electronic medication storage cabinet <NUM>. The one or more processors <NUM> create steps to place the unassigned dynamic pocket in the electronic medication storage cabinet <NUM> (block <NUM>). The created steps may indicate that the unassigned dynamic pocket may be placed in the same location as the dynamic pocket that was removed. The one or more processors <NUM> may be configured to transmit to the electronic medication storage cabinet <NUM>, the created steps to place the unassigned dynamic pocket in the electronic medication storage cabinet <NUM>. The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM> (block <NUM>).

Returning to block <NUM>, if the one or more processors <NUM> determine that current inventory in any dynamic pockets <NUM> cannot be removed ('NO' at block <NUM>), then the method proceeds to block <NUM>. In some implementations, at block <NUM>, if the one or more processors <NUM> determine that current inventory in any dynamic pockets <NUM> cannot be removed, then the one or more processors <NUM> may be configured to transmit a message to medication systems <NUM> indicating that the ordered medication cannot be dispensed and/or placed in a dynamic pocket in the electronic medication storage cabinet <NUM>.

Returning to block <NUM>, if the one or more processors <NUM> determine that the medications cannot be stored in a dynamic pocket ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. And at block <NUM>, if the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> does not support any dynamic pockets ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>.

At block <NUM>, the one or more processors <NUM> determine whether a valid fixed pocket is available. In some implementations, the one or more processors <NUM> may be configured to determine that a valid fixed-pocket is available if the list of empty pockets stored by the storage identification module <NUM> includes the fixed-pocket. If the one or more processors <NUM> determine that a valid fixed-pocket is available ('YES' at block <NUM>), then the method proceeds to block <NUM>. The one or more processors <NUM> assigns the valid-fixed pocket to the ordered medication (block <NUM>). The one or more processors <NUM> may be configured to associate the ordered medication with the assigned valid fixed-pocket and store the mapping in a storage unit.

The one or more processors <NUM> transmit a message to the medication systems <NUM> indicating that the ordered medication can be dispensed in a baggie (block <NUM>). The term "baggie" as used herein may be any type of a container to hold a medication. The one or more processors <NUM> create steps to fill the valid fixed-pocket (block <NUM>). The one or more processors <NUM> may be configured to create the steps based on certain characteristics of the fixed pocket. For example, if the fixed pocket is configured with a lid, then the one or more processors <NUM> may create a step to open the lid and the close lid after the ordered is successfully placed in the pocket. Similarly, if the fixed pocket is an open pocket or without a lid, then the one or more processors <NUM> may be configured to not create a step for opening a lid. The one or more processors <NUM> may be configured to receive data related to such characteristics of pockets <NUM> from the electronic medication storage cabinets <NUM>, and the one or more processors <NUM> may associate each pocket <NUM> with its corresponding characteristics and store the association in a storage unit associated with the electronic medication storage system server <NUM>.

In some implementations, the created steps may be a sequence of graphical steps configured to instruct a user to fill the pocket in an appropriate manner. In some implementations, the one or more processors <NUM> may associate the created steps with the ordered medication, and store the association in a storage unit associated with the electronic medication storage system server <NUM>. The one or more processors <NUM> may transmit the association and the created steps to the electronic medication storage cabinet <NUM>. The one or more processors <NUM> may be configured to cause the display of the created steps associated with an ordered medication on a display device, such as display device <NUM> of the electronic medication storage cabinet <NUM>, when the ordered medication is delivered to the electronic medication storage cabinet <NUM>. The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM> (block <NUM>). Additional details of delivering an ordered medication to the electronic medication storage cabinet are described herein in with reference to <FIG> and <FIG>.

Returning to block <NUM>, if the one or more processors <NUM> determine that a valid fixed pocket is not available ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether contents of a fixed pocket can be combined with contents of another fixed pocket (block <NUM>). The one or more processors <NUM> may be configured to determine that contents of a first fixed pocket can be combined with contents of another fixed pocket if a unique identifier of the medication in the first fixed pocket is the same as a unique identifier of the medication in another fixed pocket. As described above, in some implementations, the one or more processors <NUM> may be configured to determine the unique identifier of a medication based on received data related to the medications from the medication systems <NUM> and/or electronic medication storage cabinet <NUM>. The one or more processors <NUM> may be configured to determine the pockets that contain medications with the same identifiers based on data related to a medication and a pocket <NUM> in which it is placed in an electronic medication storage cabinet <NUM>.

If the one or more processors <NUM> determine that contents of a fixed pocket can be combined with contents of another fixed pocket ('YES' at block <NUM>), then the method proceeds to block <NUM>. The one or more processors <NUM> creates steps to instruct the user to dispense the ordered medication in a baggie (block <NUM>). The one or more processors <NUM> creates steps to combine the contents from one fixed pocket with contents from another fixed pocket (block <NUM>). The one or more processors <NUM> may be configured to create steps to combine inventory. In some implementations, the created steps may be a sequence of graphical steps configured to instruct a user to remove contents from a first pocket and store contents in a second pocket. In some implementations, the one or more processors <NUM> associate the freed fixed-pocket to the ordered medication. The one or more processors <NUM> create steps to fill the freed or empty fixed-pocket (block <NUM>). The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM>. (block <NUM>).

At block <NUM>, if the one or more processors <NUM> determine that the contents of a fixed-pocket cannot be combined with contents of another fixed-pocket ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether any of the current inventory in any fixed-pocket of the electronic medication storage cabinet <NUM> can be removed (block <NUM>). As described above, the method proceeds to block <NUM> to determine whether current inventory may be removed from pockets of the electronic medication storage cabinet <NUM>. If the one or more processors <NUM> determine that the current inventory cannot be removed ('NO' at block <NUM>), then the one or more processors <NUM> determine and store an indicator in a storage unit (e.g., a flag in a register of a storage unit), which represents that for the ordered medication space in fixed pockets of an electronic medication storage cabinet <NUM> is not available. The method <NUM> proceeds to the block <NUM>, and at block <NUM>, the one or more processors <NUM> may be configured to determine if space in fixed pockets is available for this ordered medication based on the stored indicator. If the one or more processors <NUM> determines that the space in fixed pockets is not available for the ordered medication, then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine that the ordered medication can be packaged and labeled for uncontrolled storage (block <NUM>). The one or more processors <NUM> may transmit a message to the medication system <NUM> indicating that the ordered medication can be packaged and labelled for uncontrolled storage.

Returning to block <NUM>, if the one or more processors <NUM> determine that the current inventory can be removed ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> create steps to instruct the user to dispense the ordered medication in a baggie (block <NUM>). The one or more processors <NUM> create steps to remove contents from a fixed-pocket (block <NUM>). The one or more processors <NUM> create steps to fill the freed or empty pocket (block <NUM>). The one or more processors <NUM> may associate the freed pocket with the ordered medication. The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM> (block <NUM>).

Returning to block <NUM>, if the one or more processors <NUM> determine that the ordered medication is a patient-specific medication, then the method <NUM> proceeds to block <NUM>, as shown in <FIG>. The one or more processors <NUM> determines whether the ordered medication is a controlled substance (block <NUM>). In some implementations, the one or more processors <NUM> may determine if the ordered medication is a controlled substance based on a stored set of rules that specify a list of medications that are predetermined to be controlled substances. If the one or more processors <NUM> determine that the ordered medication is a controlled substance ('YES' at block <NUM>), then the method proceeds to block <NUM>. The one or more processors <NUM> determine whether the electronic medication storage cabinet <NUM> supports dynamic pockets (block <NUM>). If the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> supports dynamic pockets ('YES' at block <NUM>), then the method proceeds to block <NUM>. The one or more processors <NUM> initiate the process of checking for available space in the dynamic pockets of the electronic medication storage cabinet <NUM> (block <NUM>), and the method <NUM> proceeds to block <NUM>.

If the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> does not support dynamic pockets ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether the electronic medication storage cabinet <NUM> supports fixed-pockets (block <NUM>). If the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> supports fixed-pockets ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> initiate the process of checking for available space in fixed-pockets of the electronic medication storage cabinet <NUM> (block <NUM>), and the method <NUM> proceeds to block <NUM>. If the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> does not support fixed pockets, then the method <NUM> proceeds to block <NUM>. In some implementations, if the one or more processors <NUM> determine that the electronic medication storage cabinet <NUM> does not support fixed pockets, then the one or more processors <NUM> determine and store an indicator in a storage unit (e.g., a flag in a register of a storage unit), which represents that space is unavailable in the pockets of the electronic medication storage cabinet <NUM>. The method <NUM> proceeds to the block <NUM>, and at block <NUM>, the one or more processors <NUM> may be configured to determine if space in the pockets is available for the ordered medication based on the stored indicator. If the one or more processors <NUM> determines that the space in the pockets is unavailable for the ordered medication, then the method <NUM> proceeds to block <NUM>.

At block <NUM>, if the one or more processors <NUM> determine that ordered medication is not a controlled substance, then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether the patient is associated with a particular pocket (block <NUM>). As described above, the electronic medication storage system server <NUM> may receive data related to patients and pockets <NUM> of electronic medication storage cabinets <NUM>, including associations between patients and one or more pockets <NUM> in an electronic medication storage cabinet <NUM>. Based on the received data, the one or more processors <NUM> may determine whether the patient is associated with a pocket <NUM> in the electronic medication storage cabinet <NUM>. If the one or more processors <NUM> determine that the patient is not associated with a pocket ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. If the one or more processors <NUM> determine that the patient is associated with a pocket ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether sufficient space is available in the associated pocket (block <NUM>). If the one or more processors <NUM> determine that sufficient space is not available in the associated pocket ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. If the one or more processors <NUM> determine that sufficient space is available in the associated pocket ('YES' at block <NUM>), then the one or more processors <NUM> determine that the medication can be placed in the pocket <NUM> associated with the patient. The method <NUM> proceeds to block <NUM>. The one or more processors <NUM> schedule the ordered medication for delivery to the electronic medication storage cabinet <NUM> (block <NUM>).

Turning now to <FIG>, there are shown flowcharts illustrating an optimized process of loading a medication in an electronic medication storage cabinet. For the purpose of illustrating a clear example, components of the network architecture <NUM>, shown and described with reference to <FIG>, components of the electronic medication storage system server <NUM>, shown and described with reference to <FIG>, and components of the electronic medication storage cabinet <NUM>, shown and described with reference to <FIG>, and processes described with reference to <FIG> may be used to describe the optimized process of loading a medication in an electronic medication storage cabinet.

The method <NUM> includes receiving, by one or more processors <NUM> of the electronic medication storage cabinet <NUM> (e.g., electronic medication storage cabinet <NUM>-<NUM>), a user login information (block <NUM>). The one or more processors <NUM> may be configured to determine whether the user is authorized user. The one or more processors <NUM> cause a prompt to be displayed on a display device (e.g., display device <NUM>) associated with the electronic medication storage cabinet <NUM> for scan of an ordered medication (block <NUM>). The one or more processors <NUM> receive information of the scanned medication (block <NUM>). Based on the received information of the scanned medication, the one or more processors <NUM> determine whether the scanned medication can be placed in a dynamic pocket in the electronic medication storage cabinet <NUM> (block <NUM>). The one or more processors <NUM> determine whether the scanned medication will be stored in a dynamic pocket based on information generated for the scanned medication based on the processes described with reference to <FIG>.

If the one or more processors <NUM> determine that the scanned medication will be loaded into a dynamic pocket ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> cause the electronic medication storage cabinet <NUM> to open a movable drawer <NUM> in which the unassigned dynamic pocket containing the scanned medication will be placed (block <NUM>). The one or more processors <NUM> may be configured to select a drawer <NUM> based on the steps created by the electronic medication storage system server <NUM> for the scanned medication based on the processes described with reference to <FIG>.

The one or more processors <NUM> determine if loading the scanned medication in the electronic medication storage cabinet <NUM> requires reorganization of one or more dynamic pockets of the electronic medication storage cabinet <NUM> (block <NUM>). Based on the steps created by the electronic medication storage system server <NUM>, the one or more processors <NUM> determine whether the reorganization of the one or more dynamic pockets is required. For example, if the electronic medication storage cabinet <NUM> has not received any data related to steps created for reorganizing one or more dynamic pockets, then the one or more processors <NUM> determine that reorganization of dynamic pockets are not required for loading the scanned medication in the electronic medication storage cabinet <NUM>.

If the one or more processors <NUM> determine that loading the scanned medication in the electronic medication storage cabinet <NUM> requires reorganization of one or more dynamic pockets <NUM> ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> provide the created steps to reorganize one or more dynamic pockets for display (block <NUM>). The one or more processors <NUM> may provide the created steps for display on a display device associated with the electronic medication storage cabinet <NUM>. The one or more processors <NUM> may provide the created steps in a sequence for display. For each of the created steps, the one or more processors <NUM> may be configured to determine whether the step is successfully completed. Additional details of determining whether the created steps are successfully completed are described below with reference to FIG. The method proceeds to block <NUM>.

If the one or more processors <NUM> determine that loading the scanned medication in the electronic medication storage cabinet <NUM> does not require reorganization of one or more dynamic pockets <NUM> ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether loading the scanned medication in the electronic medication storage cabinet <NUM> require combining contents of one or more dynamic pockets (block <NUM>). The one or more processors <NUM> may be configured to determine whether combining contents of one or more dynamic pockets with another pocket is required based on the set of created steps received for the scanned medication. If the received set of created steps do not indicate combining contents of dynamic pockets with other pockets, then the one or more processors <NUM> determine that combining contents of one or more dynamic pockets is not required for loading the scanned medication in the electronic medication storage cabinet <NUM>. Similarly if the received set of created steps indicate combining contents of one or more dynamic pockets, then the one or more processors <NUM> determine that combining contents is not necessary for loading the scanned medication in the electronic medication storage cabinet <NUM>.

If the one or more processors <NUM> determine that combining contents of one or more dynamic pockets is required for loading the scanned medication in the electronic medication storage cabinet <NUM> ('YES' at block <NUM>) to place the unassigned pocket in the electronic medication storage cabinet <NUM>, then the method <NUM> proceeds to block <NUM>. At block <NUM>, the one or more processors <NUM> cause display of the created steps to combine pockets. The one or more processors <NUM> cause display of created steps to remove the empty dynamic pocket (block <NUM>). After the one or more processors <NUM> determine that the steps for combining pockets and removing empty pockets are successfully completed, the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determines whether loading of the scanned medication require removal of any medications in the electronic medication storage cabinet <NUM> (block <NUM>). If the one or more processors <NUM> determine that removal of medications is needed to load the scanned drug (' YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>.

The one or more processors <NUM> cause display of created steps to remove contents from dynamic pockets of the electronic medication storage cabinet <NUM> (block <NUM>), and the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> causes display of created steps to place the dynamic pocket in the electronic medication storage cabinet <NUM>. The method <NUM> proceeds to block <NUM>. At block <NUM>, the one or more processors <NUM> determine whether there are any more medications to be delivered to the electronic medication storage cabinet <NUM>. If the one or more processors <NUM> determine that there are additional medications to be delivered to the electronic medication storage cabinet <NUM> ('YES' at block <NUM>-a), then the method <NUM> proceeds to block <NUM>. If the one or more processors <NUM> determine that there are no additional medications to be delivered ('NO' at block <NUM>-b), then the method <NUM> proceeds to block <NUM>-b. The one or more processors <NUM> determine whether further optimization of the electronic storage cabinet <NUM> is desired (block <NUM>-b). The one or more processors <NUM> may be configured to receive an input from a user of the electronic storage cabinet <NUM> indicating whether the user desires further optimization of the electronic storage cabinet <NUM>. Based on the user input, if the one or more processors <NUM> determine that the further optimization is desired ('YES' at block <NUM>-b), then the method <NUM> proceeds to block <NUM>. Based on the user input, if the one or more processors <NUM> determine that further optimization is not desired ('NO' at block <NUM>-b), then the method <NUM> ends.

In some implementations, the one or more processors <NUM> may be configured to transmit a message to electronic storage server system <NUM> in response to determining that further optimization is desired, and the one or more processors <NUM> may be configured to determine further optimizations based on the process described with reference to <FIG>. In some implementations, the one or more processors <NUM> may be configured to determine optimizations of the electronic storage cabinet <NUM> based on the process described above in <FIG>.

At block <NUM>, the one or more processors <NUM> determine whether any of the pockets of the electronic storage cabinet <NUM> include any expired medications. As described above, the one or more processors <NUM> may be configured to determine the contents of each pocket, and in some implementations, based on the contents, the one or more processors <NUM> may be configured to determine whether medication in a pocket has expired. If the one or more processors <NUM> determine that medications in pockets have not expired ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. If the one or more processors <NUM> determine that medication in a pocket has expired ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> provide, for display, steps generated for removal of the expired items (block <NUM>). After the one or more processors <NUM> determine that the steps generated for removal of the expired items are successfully completed, the method <NUM> proceeds to block <NUM>.

The one or more processors <NUM> determine whether other contents of pockets can be removed (block <NUM>). In some implementations, the one or more processors <NUM> may be configured to determine whether contents of a pocket will be removed based on determining whether any of the pockets have medications for discharged patients. Additional details of removing medications of discharged patients are described above with reference to <FIG>. If the one or more processors <NUM> determine that other contents of pockets do not have to be removed ('NO' at block <NUM>), then the method proceeds to block <NUM>. If the one or more processors <NUM> determine that other contents of pockets can be combined ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine a ty pe of the pocket from which contents can be removed (block <NUM>).

If the one or more processors <NUM> determine that the pocket is a dynamic pocket ('Dynamic Pocket' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> provide for display steps generated to remove the dynamic pocket (block <NUM>). After the one or more processors <NUM> determine that the steps for removing the dynamic pockets were successfully completed, then the method <NUM> proceeds to block <NUM>. If the one or more processors <NUM> determine that the pocket is a fixed pocket ('Fixed Pocket' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> provide for display steps generated to remove contents from the fixed pocket (block <NUM>) After the one or more processors <NUM> determine that the steps for removing the contents from the fixed pocket were successfully completed, then the method <NUM> proceeds to block <NUM>.

The one or more processors <NUM> determine whether contents of any pockets may be combined (block <NUM>). The one or more processors <NUM> may be configured to combine medications of one pocket with another pocket if the medications in the two pockets have the same unique identifier. If the one or more processors <NUM> determine that the contents of the pockets may not be combined ('NO' at block <NUM>), then the method <NUM> ends. If the one or more processors <NUM> determine that the contents of pockets may be combined ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> provide for display steps generated for combining contents of one pocket with another pocket (block <NUM>). The one or more processors <NUM> determine a type of the pocket (block <NUM>).

If the one or more processors <NUM> determine that the type of the pocket is a fixed pocket ('Fixed Pockets' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> provide for display steps generated to unload freed pocket (block <NUM>). After the one or more processors <NUM> confirm that the steps are successfully completed, the method <NUM> proceeds block <NUM>. If the one or more processors <NUM> determine that the type of the pocket is dynamic pocket ('Dynamic Pockets' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> provide for display steps generated to remove the freed dynamic pocket. After the one or more processors <NUM> confirm that the steps are successfully completed, the method <NUM> proceeds block <NUM>. At block <NUM>, when the one or more processors <NUM> determine that no pockets can be combined ('NO' at block <NUM>), then the method <NUM> ends.

Returning block <NUM>, if the one or more processors <NUM> determine scanned medication will not be stored in the dynamic pocket ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> determine whether the scanned medication should be refrigerated (block <NUM>). If the one or more processors determine that the scanned medication should be refrigerated ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> cause display of a prompt to place the scanned medication in the refrigerator. If the one or more processors <NUM> determine that the scanned medication should not be refrigerated ('NO' at block <NUM>), then the method proceeds to block <NUM>. The one or more processors <NUM> determine whether the scanned medication should be placed in a tower (block <NUM>). If the one or more processors <NUM> determine that the scanned medication should be placed in the tower ('YES' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> cause the display of a prompt to a user to place the scanned medication in the tower (block <NUM>).

If the one or more processors <NUM> determine that the scanned medication should not be placed in tower ('NO' at block <NUM>), then the method <NUM> proceeds to block <NUM>. The one or more processors <NUM> cause a drawer of the electronic medication storage cabinet <NUM> to be opened. The opened drawer may include one or more fixed pockets. The method <NUM> proceeds to block <NUM>, and at block <NUM>, the one or more processors <NUM> determine whether loading of the scanned medication will require contents of any fixed pocket to be combined with contents of another fixed pocket. If the one or more processors <NUM> determine that the contents will need to be combined ('YES' at block <NUM>), then the method proceeds to block <NUM>. The one or more processors <NUM> cause display of the created steps to combine contents of one fixed pocket with contents of another fixed pocket (block <NUM>). The method <NUM> proceeds to block <NUM>. At block <NUM>, if the one or more processors <NUM> determine that the contents of one fixed pocket are not required to be combined with contents of another fixed pocket ('NO at block <NUM>), then the method proceeds to block <NUM>.

The one or more processors <NUM> determines whether removal of any contents of any fixed pockets is required for loading scanned medication (block <NUM>). If the one or more processors <NUM> determine that removal is needed ('YES' at block <NUM>), then the method proceeds to block <NUM>. The one or more processors <NUM> causes display of the created steps to remove contents of a fixed pocket (block <NUM>), and the method proceeds to block <NUM>. If the one or more processors <NUM> determine that removal is not needed ('NO' at block <NUM>), then the method proceeds to block <NUM>. At block <NUM>, the one or more processors <NUM> cause display of the created steps to place the scanned medication into the freed or empty pocket. The method continues to block <NUM>.

In some implementations, the one or more processors <NUM> determine whether a step of the created steps is successfully completed. In some implementations, the one or more processors <NUM> may be configured to determine that a current step of the created steps is successfully completed based on data from one or more sensors of the electronic medication storage cabinet. For example, if the current step requires placing a pocket <NUM> in a certain location of the drawer <NUM> of the electronic medication storage cabinet <NUM>, the processor <NUM> may be configured to determine whether pocket was placed in the correct location based on the data from sensors associated with that location that indicate that the pocket was placed in that location.

In some implementations, if the processor <NUM> determines that a current step is not successfully completed then the one or more processors <NUM> may be configured to generate a remedial step. The one or more processors <NUM> may be configured to generate the remedial step based on user inputs. For example, if the one or more processors <NUM>, via the one or more sensor devices, determine that the pocket is placed in a location different from the expected location, then the processor <NUM> may be configured to generate a remedial step that corrects the error by providing instructions to remove the pocket from that location. The one or more processors <NUM> may cause the remedial step to be displayed. The one or more processors <NUM> may determine whether the remedial step is successfully completed. For example, the one or more processors <NUM> may be configured to determine that the remedial step of removing the pocket from the wrong location is successfully completed based on data from sensors associated with that location.

Although some of various drawings illustrate a number of logical stages in a particular order, stages that are not order dependent may be reordered and other stages may be combined or broken out. While some reordering or other groupings are specifically mentioned, others will be obvious to those of ordinary skill in the art, so the ordering and groupings presented herein are not an exhaustive list of alternatives. Moreover, it should be recognized that the stages could be implemented in hardware, firmware, software, or any combination thereof.

The foregoing description, for purpose of explanation, has been described with reference to specific implementations. However, the illustrative discussions above are not intended to be exhaustive or to limit the scope of the claims to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The implementations were chosen in order to best explain the principles underlying the claims and their practical applications, to thereby enable others skilled in the art to best use the implementations with various modifications as are suited to the particular uses contemplated.

There may be many other ways to implement the subject technology. Various functions and elements described herein may be partitioned differently from those shown without departing from the scope of the subject technology. Various modifications to these configurations will be readily apparent to those skilled in the art, and generic principles defined herein may be applied to other configurations. Thus, many changes and modifications may be made to the subject technology, by one having ordinary skill in the art, without departing from the scope of the subject technology.

Furthermore, to the extent that the term "include," "have," or the like is used in the description or the claims, such term is intended to be inclusive in a manner similar to the term "comprise" as "comprise" is interpreted when employed as a transitional word in a claim. " Any embodiments described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.

In one or more aspects, the terms "about," "substantially," and "approximately" may provide an industry-accepted tolerance for their corresponding terms and/or relativity between items.

Claim 1:
A method, comprising:
providing an electronic medication storage cabinet (<NUM>) comprising a plurality of drawers (<NUM>) and a plurality of sensors configured to identify a positioning of a plurality of storage pockets (<NUM>) within the plurality of drawers;
receiving an indication of a new storage pocket associated with a new medicine container to be loaded in the electronic medication storage cabinet;
generating a sequence of steps (<NUM>, <NUM>, <NUM>) to load the new storage pocket into the electronic medication storage cabinet, characterized by the generated sequence of steps including moving a first storage pocket of the plurality of storage pockets from a first location in a respective drawer of the storage cabinet to a second location in the storage cabinet to create sufficient space within the respective drawer for the new storage pocket;
displaying, on a display screen associated with the electronic medication storage cabinet, a first step of the sequence of steps, including a first prompt to remove the first storage pocket from the first location;
automatically unlocking the respective drawer;
determining that the first storage pocket is removed from the first location based on first signals received from the plurality of sensors of the respective drawer; and
in response to determining that the first storage pocket is removed, indicating via the display screen, a second prompt to place the first storage pocket in a second location within the plurality of drawers,
verifying, by the one or more processors, via the plurality of sensors, that the first storage pocket was relocated; providing, by the one or more processors, responsive to verifying that the first storage pocket was removed and relocated, a third prompt to insert the new storage pocket within the available space created for the new storage pocket in the respective drawer based on the removal and relocation of the first storage pocket.