DT
Size: a a a
DT
DT
MB
DT
MB
F
F
DT
F
DT
DT
F
DT
app_ids = DoctorAppointment.objects.annotate(cnt=Count('doc_appointment_and_documents_case')).filter(cnt__gt=0).values_list('case_id', flat=True)
Referral.objects.filter(id__in=app_ids)
DT
F
app_ids = DoctorAppointment.objects.annotate(cnt=Count('doc_appointment_and_documents_case')).filter(cnt__gt=0).values_list('case_id', flat=True)
Referral.objects.filter(id__in=app_ids)
F
F
DT
DT