Compounding system
BACKGROUND OF THE INVENTION 
     The present invention pertains to a process and apparatus for precisely and rapidly mixing base solutions. More particularly, it pertains to such a process and apparatus especially useful for the compounding of hyperalimentation solutions. 
     Hyperalimentation therapy is the intravenous feeding of, for example, a protein-carbohydrate mixture to a patient. It is used primarily to meet the patient&#39;s protein and caloric requirements which are unable to be satisfied by oral feeding. The protein may be in the form of free-amino acids or protein hydrolysate and the carbohydrate commonly is dextrose. In addition to the protein and carbohydrate, vitamins (water-soluble and fat-soluble) and electrolytes also can be supplied in this therapy. 
     Each of these parenteral ingredients and the combination thereof are particularly susceptible to the growth of deleterious organisms and it is desirable that they be administered to the patient in a sterile condition. Thus, because these protein and carbohydrate solutions cannot be pre-compounded by the manufacturer, but must be combined at the time of their use, their compounding must be performed under sterile conditions to avoid organism growth. 
     A known apparatus and process for compounding hyperalimentation solutions utilizes a solution transfer system including a receiving container and a Y-transfer set. The Y-transfer set includes two separate tubes, each having an end attached to a common juncture by which solutions delivered through the tubes will pass through the juncture into the receiving container. The other end of one tube of the set is attached to the protein holding container and of the other tube of the set to the carbohydrate holding container. The desired volume of each solution being transferred to the container is controlled by a clamp placed on each tube. The solutions may be allowed to flow into the receiving container by gravity flow. However, it has been found to be useful to transfer the solutions under the influence of a vacuum applied to the receiving container. When the receiving container is a flexible plastic container, the vacuum is created in a vacuum chamber into which the container is placed. 
     It has been known in the past that to ensure sterility during the compounding of hyperalimentation solutions, compounding should be performed under a laminar flow hood. Laminar flow hoods are used for reducing the risk of air-borne contamination of such solutions. These units operate by taking room air and passing it through a pre-filter to remove gross contaminates, such as dust and lint. The air is then compressed and channeled through a bacterial retentive filter in the hood in a laminar flow fashion. The purified air flows out over the entire work surface of the hood in parallel lines at a uniform velocity. The bacterial retentive type of filter is designed to remove all bacteria from the air being filtered. 
     Compounding under a laminar flow hood aids in preventing airborne contamination, but it is relatively cumbersome and expensive and would not be useful for eliminating any other source of contamination, such as contamination caused by handling. When using a hood the operator may inadvertently perform the work at the end or outside of the hood and not within the recommended space, at least six (6) inches within the hood, which insures the benefits of the air being purified. Time must be taken and care must be exercised to maintain a direct open path between the filter and the compounding area. Solution bottles and other non-sterile objects cannot be placed at the back of the hood work area next to the filter because these objects could contaminate everything downstream and disrupt the laminar flow pattern of the purified air. Also, in using a laminar flow hood, it is necessary routinely to clean the work surface of the hood before any compounding is performed. 
     Other manually controlled devices are known from the prior art for mixing base solutions. These devices use peristaltic pumps to transfer specified quantities of solution to transfer specified quantities of solution to a container. The desired quantities of solution to be transferred are determined in advance and entered by hand into the control unit of the pumping apparatus. The pumping apparatus them delivers the desired quantity of solutions to the mixture container. Such an apparatus and method are disclosed in U.S. patent application Ser. Nos. 391,758 and 391,759, both filed on June 24, 1982 and entitled respectively &#34;Flow Monitoring Method and Apparatus&#34; now U.S. Pat. No. 4,467,844 and &#34;High Speed Bulk Compounder.&#34; Said applications have been assigned to the assignee of the present invention. 
     In order to use the devices and methods disclosed in the above identified applications it is usually necessary to manually translate a prescription from a short-hand designation to a set of parameters that includes the type, concentration and volume of each of the base solutions to be mixed. After the base solutions have been mixed, additives such as trace elements or vitamins can be added to make the final mixture. 
     The manual translation to a set of volumetric parameters is both time consuming and expensive as the process is usually carried out by a pharmacist. In addition, errors can occur during the calculation process. Further, the manual calculations to a certain extent are only approximations in that the small volumetric additions of the additives are often not taken into consideration. 
     If a group of prescriptions is to be compounded, once the manual translations have been completed, the order in which the members of the group are compounded becomes important. Compounders of the type disclosed in the above two applications are designed such that a container of base solution that has been partly emptied cannot be removed from the compounder and later reinserted. The containers of base solution which include dextrose, lipids and sterile water are expensive. It is therefore desirable to completely empty each container before removing it from the compounder. 
     To minimize over-all cost it would be desirable to optimize the compounding of a group of prescriptions by minimizing the needed number of containers of base solution. This requires a careful ordering of all prescriptions to be prepared at one time. Finally, labels must be prepared to identify each mixed prescription. 
     The process and method of the present invention provide for the translation from a prescription name to a detailed set of parameters without manual calculations. In addition, the compounding of a group of prescriptions can be optimized by the present invention by sorting the prescriptions in accordance with the type of base solution and then compounding them in the sorted order. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention a system and a method are provided for compounding a plurality of selected mixtures from one or more base solutions. The system includes a storage device for storing sets of parameters for a group of mixtures which are to be compounded from the base solutions. A compounder is electrically connected to the storage device, and in combination with the storage device, compounds a selected mixture on receiving a set of parameters which define the base solutions to be used and the amounts thereof. The storage device can be part of a host computer system which transfers information to, and receives information from the compounder by means of a communications link. 
     A program in the host computer maintains a data base of patient information. Associated with each patient entry are one or more mixtures for the patient which can be compounded from the base solutions. Both patient information and a set of parameters to define a mixture for the patient may be entered through a video display terminal or similar data entry device. The parameters for the base solutions of a mixture may be entered in the form of the volumes of the desired base solutions, the percentages of the total volume of the final mixture that each base solution represents, or as a nutritional contribution of each base solution to the final mixture. Each of the three forms of specifying the base solutions of a given mixture is essentially equivalent to the other two and the other two may be derived therefrom. 
     Additionally, the system provides a library function whereby a group of standard mixtures may be prestored as sets of parameters with a given name and called up or associated with a selected patient. 
     A set of parameters which defines a mixture for a given patient, referred to as a bag, is placed in one or more time slots or queues in the host computer to provide for one or more dosages to be given to a patient during a twenty-four hour period. Each queue corresponds to a given time interval within a twenty-four hour day. 
     The host computer provides facilities for a pharmacist to review each set of parameters, or bags, in a given queue and to authorize the compounding, or creation of the base solution mixture, during an initial part of each time period or shift. The host computer then sorts all of the authorized bags based on the specified base solutions. Compounding the mixtures in their sorted order results in a minimal number of containers of the base solutions being necessary. This results in minimal overall cost. 
     An important advantage of the present invention that results from sorting the authorized bags is the minimization of changes of tubing in the compounding apparatus. This unexpected result provides for lower overall cost. A further advantage is due to the ability of the host computer to take into account the small volumes of the additives when calculating the desired volumes of base solution. 
     Once a group of authorized bags has been sorted the system prints a set of labels corresponding to the sorted order of the group. 
     The types of base solutions and quantities for each authorized set of parameters, or bag, for a given time slot or queue are then presented in sorted order to the compounding apparatus. The compounding apparatus requires that the volumes of the base solutions be specified. Hence, volumetric information for each authorized bag is transmitted to the compounding apparatus in the sorted order. During the compounding process the set of preprinted labels provides a cross-check to ensure that the correct base solutions, amounts, and concentrations are provided for each mixed bag. 
     A log which keeps track of each operation is also created by the host computer. The log may be in the form of a printed copy or a disk file or both. The logged operations include entering new patient information, entering a new set of parameters, defining a bag, altering a set of parameters, and compounding one or more bags of solution. 
     Provision is made in the compounding apparatus for operator verification of the type, quantity and concentration of base solution to be compounded into the final mixture. Additionally, provision is made at the compounding apparatus to provide for entry of a patient identification number so that a bag can be prepared out of order should the need arise. Provision is also made in the host computer to inform the compounding apparatus of any change in the type or concentration of solution being used to enable the host computer to monitor the current base solutions being used. 
     The method of the present invention includes storing parameters for one or more mixtures; transferring base solution information from a storing location to a compounding location and compounding the desired mixtures. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a overall block diagram of a system in accordance with the present invention. 
     FIG. 2 is a perspective view of a compounding apparatus configured in accordance with the present invention. 
     FIG. 3 is a front view of the control panel of the compounding apparatus configured in accordance with the present invention. 
     FIG. 4 is a schematic block diagram of the compounding apparatus configured in accordance with the present invention. 
     FIG. 5 is an overall flow diagram of the operation of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring now to FIG. 1, a system 2 embodying the present invention is illustrated. The system 2 includes a host computer 4 having at least one cathode ray tube terminal 4a, a disk drive 4b and a printer 4c connected thereto. The host computer 4 can be selected from a variety of small computers including the IBM PC and PCXT or a comparable system. If desired, a larger computer system such as a Digital Equipment Corporation VAX could also be used. The computer 4 can be coupled through an RS 232 communications link 6 to a compounder 8. Additional compounders or other devices may be coupled through communications links to the host computer 4. The communications link 6 provides bidirectional communication between the host computer 4 and compounder 8. Alternately, the computer 4 could be hardwired to the compounder 8. 
     The host computer stores on its disk drive 4b programs for data input, for generating commands to drive the compounder 8, for handling input of authorizations for compounding prescriptions, for scheduling and sorting, for communications, for report generation and for audit trail generation. The host computer 4 also stores on its disk drive 4b patient information as well as sets of parameters of mixtures or prescriptions to be prepared for patients. A set of parameters corresponds to a prescription and might be input to the system 2 with only a name of a known standard mixture to be prepared for a patient. Attached hereto as Exhibit A is a copy of an exemplary VAX control program for use with the host computer 4. 
     FIG. 2 is a perspective view of a portion of the mechanical apparatus of the compounder 8. The compounder 8 includes a framework 10 upon which is hung a plurality of base solution containers 12, 14 and 16. Typical base solutions include amino acids, dextrose, and lipids, all of which are available in different concentrations, as well as sterile water. Base solutions are sometimes referred to as base component solutions. An output bag 18 is supported on the framework 10 and receives solutions from the containers 12 through 16 in quantities determined by the host computer 4 and the information stored therein. Base solutions are transferred from the containers 12 through 16 by means of peristaltic pumps 20 through 24. A control panel 26 is available to provide displays of information from the host computer 4 as well as to provide a means for operator input of control and feedback information concerning the status of the compounder 8. A housing 30 supports the framework 10 as well as the pumps 20 through 24. A front cover 34 covers the pumps. 
     The supply container 12 is coupled with the collection container 18 by flexible tubing 36. The flexible tubing 36 enters the housing 30 at inlet 38 and is placed around rollers (not shown) of the peristaltic pump 20. The flexible tubing 36 can be connected to another portion of flexible tubing (not shown) for placement around the rollers of the peristaltic pump. The tubing 36 then exits the housing 30 at outlet 40 and enters a junction block 42 coupled to the collection container 18. The junction block 42 provides a channel through which solutions being pumped through a flexible tube can flow to the collection bag 18. 
     The peristaltic pump 20, in operation, transfers the sterile solution in the supply container 12 to the collection bag 18 by movement of the rollers (not shown) in the pump 20. This movement causes a compression of the walls of the flexible tubing 36 forcing the solution therein forward in a capillary tube action. Retainers 44 and 46 are placed around the flexible tubing 36 at its entrance to and exit from the housing 30 to keep the tubing 36 in place during the operation of the pump 20. 
     The supply container 14 is coupled with the collection bag 18 by the flexible tubing 48. The sterile solution in the container 14 is delivered to the bag 18 by the peristaltic pump 22 in a similar fashion to the fluid delivered from container 12 caused by the pump 20. The flexible tubing 48 also has retainers 50 and 52 placed in a similar manner to the retainers 44 and 46 of the flexible tubing 36. The supply container 16 is coupled with the collection bag 18 by flexible tubing 54 with the peristaltic pump 24 therebetween. The tubing 54 has retainers 56 and 58 identical in placement and purpose to the retainers 44, 46, 50 and 52. 
     A manually operable compounder and method of operating same is disclosed in U.S. patent application Ser. No. 391,758, filed June 24, 1982, now allowed as U.S. Pat. No. 4,467,844, entitled &#34;Flow Monitoring Method and Apparatus&#34; and assigned to the assignee of the present invention. A manually operated compounder is also disclosed in U.S. patent application Ser. No. 391,759 filed June 24, 1982 entitled &#34;High Speed Bulk Compounder&#34; assigned to the assignee of the present invention. The above two applications discuss the theory of operation of manually controlled compounders similar mechanically to the compounder 8. The disclosures of said two applications are incorporated herein by reference. 
     FIG. 3 is a view of the control panel 60 of the control unit 26. Panel 60 includes a 16 key keyboard 62 which is manually operable having digits 0 through 9, a recall key 64 a clear keyboard key 66 and 4 keys 68 labeled AI, for Auto I/D, MI, for Manual I/D, ST for standard manual operation and V.I, for Verify I.D. The key switches 68 are used by the operator when the compounder 8 is under control of the host computer 4. Each of the supply containers 12 through 16 is associated with a base solution volume to be delivered which is displayed at various times on the displays 70 through 74. Additionally, patient I/D codes can be displayed thereon. A set of switches 79 through 82 provides for manual entry of volumic parameters of base solutions that are then displayed on display 70 through 74 when the compounder 8 is operating in a manual mode. A specific gravity display 84 through 88 and a set of specific gravity entry switches 90 through 94 are also used for entering respective specific gravity information when operating in a manual mode. A total delivered display 102 provides an indicia of the quantity of solution delivered to the output bag 18 during a given compounding operation. Alternately when operating in connection with the host computer 4 a bag identification number is displayed at times in display unit 102. Lights 96, and 104 through 108 provide manually viewable indicia for the operator of the status of the compounder 8 and can be sensed by the host computer 4 when running in the automatic mode. 
     FIG. 4 is a schematic block diagram of the electronics of the compounder 8. The compounder 8 includes a control unit 110 which can be a Motorola 6802 microcomputer chip, read only memory 112 (ROM), random access memory 114 (RAM), a communications port 116 an analog to digital converter 118 and a load cell 120. Outputs from the control unit 110 drive the pumps 20 through 24. 
     The ROM memory 112 of FIG. 4 includes a control program, copy attached hereto as Exhibit B, for operating the compounder 8 in connection with the host computer 4. 
     FIG. 5 is an overall flow diagram showing the operation of the system 2. In an initial step 130 patient information is entered by means of cathode ray tube display 4a. Typical patient information is shown in Display 1 attached hereto in Exhibit C. The information includes a patient identification number, patient name, room number and related information. Once the patient information has been entered, the next step 132 is to enter a prescription to be compounded. The prescription is entered into one or more available queues. For example, 4 compounding queues can be used and can be allocated to six hour intervals during a twenty-four hour day. Patient information such as shown in Display 1 of Exhibit C attached, as well as prescription information entered in step 132 are all stored on the disk drive 4b for subsequent use. 
     Display 2 of Exhibit C is an exemplary set of parameters for a given prescription. Display 2 attached, in Exhibit C, discloses in the top section 132a the parameters for the base solutions for a given bag. The amino acids, dextrose and lipids are specified as a volume to be added to the final mixture. As can be seen from Display 2, the amino acids, dextrose and lipids represent 300 milliliters of the final mixture. In addition to the base solutions, amino acids, dextrose and lipids shown in the top portion of display two, a category of &#34;other&#34; solutions is available. Water is added to provide the desired total volume. Additionally, Display 2 also shows in the upper right 132b the concentrations of each of the base solutions to be used in creating the final mixture. The lower part of Display 2, 132c, illustrates additives including additional solutions, vitamins, elements or trace minerals to be added once the base solutions have been mixed in the bag 18. 
     A prescription can be entered by using the name of a prestored mixture and associating it with a given patient. A library of prestored prescriptions is maintained on the disk drive 4b. Each member of the library can be accessed merely by using a shorthand name. The library feature enables a short name to be used to define all of the parameters shown in Display 2 of Exhibit C for a given prescription. The standard parameter values can then be altered if necessary. This ability to refer to standard, prestored mixtures eliminates many of the manual calculations now carried out by pharmacists and provides for a substantial increase in the productivity of the person who otherwise would have to transfer a prescription to the detailed set of parameters shown in display 2 of Exhibit C. Standard prescriptions can be added to or deleted from the library maintained on the disk drive 4b as needed. 
     The compounder 8 under control of the host computer 4 receives sets of parameters for the base solutions of a prescription, such as shown in Display 2. The information sent to the compounder 8 defines the volume of amino acid, dextrose, lipids, water and &#34;Other&#34; base solutions. The compounder 8 then fills the bag 18 with required amounts of each of the base solutions corresponding to the parameters of Display 2. The base solution information 132a, b shown in Display 2 can also be viewed as a set of parameters for a mixture to be compounded. The additives, the additional solutions, trace elements or vitamins 132c of Display 2, Exhibit C such as sodium chloride, or iron are added once the base solutions have been mixed in the bag 18. 
     Display 3, Exhibit C attached, shows an alternate and substantially equivalent form of representing the base solution parameters of the desired mixture. The form of Display 3 shows the base solutions, the amino acids, dextrose, lipids and &#34;Other&#34; category 133a, to be added to the mixture by the compounder 8 in terms of a percent of the desired final mixture. Volumetric information 132a of the type shown in Display 2 is the form actually transmitted by the host computer 4 to the compounder 8. A third form 133b of the base solution parameters is shown in Display 4 of Exhibit C wherein the nutritional contribution in terms of calories and protein of the various constituent elements of the final solution are shown. The forms of the base solution parameters shown in Displays 2 through 4 are substantially equivalent. The form of the additives 132c remains unchanged in Displays 2-4. 
     An operator may input and/or alter any one of the three forms of base solution parameters and the host computer will automatically update the other two forms. Similarly, in the library of prestored sets of parameters any or all three of the forms of Displays 2-4 can be stored for subsequent recall. Each of the Displays 2-4 represents a set of parameters associated with a given patient identification number and a given bag number. The bag number refers to the identification number to be applied to the mixture bag 18. Further, the bag number also identifies a given prescription with the data base of the host computer 4. 
     After a set of parameters for a bag had been defined in one of the available forms, the host computer 4 converts the form of the input set into the alternate equivalent forms available, step 134. A given set of parameters for a bag, or a prescription, may be entered into one or more of the available queues which determines how many times during a given twenty-four hour period the prescription or bag is eligible for compounding. Additionally, the host computer 4 also determines how much sterile water needs to be added to the specified base solutions to arrive at the volume ordered. The calculation for water can also take into account the very small volume contributions of the additives which are often ignored when such calculations are manually carried out. 
     In the next step 136 as shown in FIG. 5, each of the sets of the parameters or members of a given queue is reviewed by a qualified professional, usually a pharmacist, to determine if any changes or corrections need to be made to the defined parameters and also to authorize actual compounding of the mixture in a given time interval. Information for a given set of parameters is not sent to the compounder 8 by the host computer 4 unless compounding of that particular bag or set of parameters has been previously authorized for a given shift or queue. Authorization is carried out by operator intervention through the video display terminal 4a. Absent express authorization, a given set of parameters, or bag, will not be compounded. 
     After all of the members of a given queue have been reviewed for authorization the authorized members of the queue are sorted by the host computer 4 based on the specified types of base solution families a base component solution family includes all concentrations of a given type, for example dextrose, of base component solution. 
     The sorted sequence of sets of authorized parameters or bags can also be sorted a second time in accordance with the required base solution concentrations. It would also be possible to conduct a third sort based on the size of the needed bag 18 for each set of parameters. 
     It is a significant and important aspect of the present invention that extensive prescription information can be recalled from a library using a shorthand name for a desired mixture. Additionally, the required mixture bags 18 can now be compounded at a minimum cost since the set of authorized bags has been sorted according to the type of base solutions needed. Minimum cost is achieved by making the fewest number of changes to the base solution containers such as 12 through 16 during the compounding process of a large number of mixture bags 18. The containers 12 through 16, as noted above, cannot be placed back in the compounder 8 if it is necessary to remove them before they are empty. As a result, partly empty base solution containers 12 through 16 are thrown away and increase cost. By sorting the authorized sets of parameters, or bags, as described above, the fewest number of base solution containers 12 through 16 will be required. As a result, wasted base solution will be minimized. 
     As a further advantage, because the system initially sorts in accordance with base component solution families, the need to flush the lines, such as the lines 36, 48, 54 is minimized. This is important in that it minimizes labor on the part of the operator. It further is important in that it reduces the possibility of contamination of the base component solutions. Finally, it is important in that with respect to some types of solutions, merely flushing the compounder lines is inadequate. In such cases the entire set of lines 36, 48, 52 as well as block 42 must be disposed of and replaced with a new, sterile set which further contributes to the overall cost. Sorting thus minimizes the need to change sets of lines. 
     Once the authorized sets of parameters or bags have been sorted in a given queue, a print queue is formed in a step 142 and the host computer 4 prints a sequence of labels on the printer 4c in the same sorted order. The labels printed in the step 142 will be used during the actual compounding process for the purpose of assisting the operator and verifying that the proper mixture is being prepared. 
     Attached hereto as Exhibit D is an exemplary three part label set. Label Part 1 is used by an operator during the compounding process and includes the patient identification number and bag number. Additionally in the &#34;Base Component&#34; Section it discloses the volumic parameters of the base solutions as well as the solution codes, specific gravities and concentrations thereof. Hence, the operator is able to verify that the not only are the proper base solution containers 12 through 16 mounted on the compounder 8 but that base solution containers of the proper concentration are being used. In addition, as will be discussed subsequently, the operator is able to compare each volume parameter shown in milliliters in Label Part 1 of Exhibit D to the quantities shown on the volumetric displays 70 through 74 of the compounder 8 that have been received from the host computer 4. The solution identification codes and specific gravities are also displayed on the display units 84 through 88 of the compounder 8. These additional displays provide an opportunity for the operator to further verify that the proper mixture is being prepared. Part 2 of the printed label, shown in Exhibit D, is attached to the mixture bag 18 for identification and delivery purposes. Part 3 of the label of Exhibit D, contains detailed information of the mixture provided and is designed for insertion into the patient&#39;s medical records. 
     After all of the mixture labels have been printed a Summary Label is prepared, Exhibit E attached, for all bags to be compounded from a given queue. As can be seen from Exhibit E, the Summary Label provides information as to the total volume and concentration of each type of base solution to be provided, and the number of mixture bags, such as bag 18 that will be needed. 
     After the labels have been printed in step 142, assuming the compounder 8 is available and is ready for receiving data, the operator depresses the AI key, 68a. The AI key signals the host computer 4 that the compounder 8 is ready to proceed. The host computer 4 transmits to the compounder 8 parameters defining the base solutions for the first member of the queue to be compounded. The compounder 8 first displays the patient I/D code in the Displays 70-74, the bag I/D code in display 102 and three solution codes in the displays 84 through 88, respectively. If the patient I/D, bag I/D and solution codes match those present in the Formula, Label Part 1 of Exhibit D, the operator depresses the VI key switch 68b. 
     To insure that the operator does in fact varify that the displayed patient I/D, bag I/D and base solution codes match those of the corresponding pre-printed label, a delay of, for example, 5 seconds can be built into the control program in the ROM 112 of the compounder 8. A depression of the VI key switch 68b will not be responded to by the compounder 8 until said delay period has passed. Thus the operator must wait for at least the delay period before going on to the next step. 
     After a depression of the VI key switch has been sensed, the compounder 8 then transmits a verification code to the host computer 4. The host computer 4 then supplies base solution volumetric information to the compounder 8 which is displayed in the display units 70 through 74 as well as specific gravity information which is displayed in the units 84 through 88. Assuming the volume information shown in the displays 70 through 74 and the specific gravity information shown in the displays 84 through 88 matches the information on Label Part 1 of Exhibit D the operator, after a delay period has elapsed, presses the Start key 100 which in turns starts the compounder 8. 
     The compounder 8 then measures out the base solution volumes as described in the above referenced patent applications. To restart the compounder once the process has been completed the operator again depresses the AI key switch 68a. The host computer 4 continues to send sets of base solution parameters to the compounder 8 until the queue is empty. 
     In the event that the operator for some reason wishes to temporarily jump ahead to mix a bag which is further down in the queue, perhaps because of some emergency, the operator depresses the MI key switch 68c. The MI key switch alerts the compounder 8 to the fact that the operator wishes to manually enter a patient I/D code through the numeric pad of the key switches 62. Once the patient I/D code has been entered through the numeric pad of the key switches 62 the operator again presses the MI key switch 68c. The compounder 8 then transfers the patient identification code across the communications link 6 to the host computer 4. 
     When the host computer 4 has sensed the patient identification code, it searches forward in the queue looking for the corresponding set of parameters. It should be noted that only a search forward through the queue can be carried out. The prescription for a patient number corresponding to a prior member of the queue will already have been compounded. 
     When the corresponding set of parameters or bag has been located in the queue, the host computer 4 then transmits base solution information to the compounder 8 which mixes the identified bag. Once this out of sequence compounding operation has been completed, the operator then depresses the AI key 68a which causes the host computer 4 to return to the prior location in the queue and to send the next member or set of parameters in the queue to the compounder 8. 
     It should be noted that after each set of parameters or bag has been sent to the compounder 8, the authorization flag for that particular bag is reset by the host computer 4. As a result, that particular prescription or set of parameters will have to be reauthorized to be compounded the next time the respective queue is sorted. 
     Additionally, in a step 148 an audit trail can be generated by the host computer 4 on the printer 4c or other storage device. An exemplary audit trail is shown in Exhibit F which identifies, at a given time what operation has taken place and by whom. 
     In a preferred mode of operation the host computer 4 has at least two and preferably three operator authorization levels. The lowest level merely permits an operator to input prescription data through the video display terminal 4a. The next level permits an authorized operator to change sets of parameters or bags in the data base on the disk drive 4b and to authorize the compounding of mixtures or prescriptions. In a third or maintenance level, prescriptions and other records can be deleted from the system. 
     Modification and variations of the present invention are possible in the light of the above teachings, for example, different sorting methods may be used. Bag parameters may be stored in groups not organized in queues and different display formats can be used all without departing from the spirit and scope of the present invention. Additionally, the host computer can be used to control a group of compounders or other devices essentially simultaneously. The host computer can also be used to generate accounting or management control reports based on the bags that have been compounded. ##SPC1##