Procedure to sort portions of medicines in dispensing packages according to the needs using an automated warehouse, in which a plurality of containers of different medications are stored chaotically utilizing the space in an optimal way on storage areas of funds shelves flat or inclined boxes, in which medicine containers are introduced with the help of at least one handling apparatus controlled by a computer on the storage areas or they are discharged from the storage areas, wherein: (a) identify blister packs of different dimensions, containing, respectively, several portions of medicaments of a particular type in several receiving chambers, can be arranged receiving chambers differently in different blister packs and inserted in the automated warehouse, so that the automated warehouse contains, besides medicine containers, also containers of individual blisters, being stored data identifying containers individual blisters in association with identifications of their respective places of storage, wherein (a1) a medication container, containing in an outer packaging at least one blister pack, is transported to a station repacking, (a2) the at least one blister pack is removed from the outer packaging, (a3) information identifying the medicine container are received and recorded as identification data at least one blister pack removed, (a4) the at least one blister pack is inserted into the automated warehouse, being associated with the identification information, received as identification data, the identification of sites storage, (b) at least prepares a dispensing package to be filled in an automatic station lle swimming and filled according to need, in which for each type of portions of medication to fill the dispensing package: (b1) a blister pack containing this type is discharged through the handling apparatus or one the handling apparatus from the automated warehouse and is transported to the filling station, (b2) from a device for individualizing portions