Added some changes to AssignedMedicamentFactory