def get_medical_information(self):
ids = Dog.objects.values_list("medicine", flat=True).order_by('medicine').distinct('medicine')
list = []
for i in ids:
for med in Medicine.objects.all():
if med.id == i:
list.append(med)
return list