Skip to content

Commit

Permalink
Remove unused components
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshhari committed Dec 27, 2024
1 parent 8e8829b commit 5e4a841
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
13 changes: 0 additions & 13 deletions care/facility/api/serializers/facility.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,8 @@ class FacilityBasicInfoSerializer(serializers.ModelSerializer):
child=serializers.ChoiceField(choices=FEATURE_CHOICES),
required=False,
)
patient_count = serializers.SerializerMethodField()
bed_count = serializers.SerializerMethodField()

def get_bed_count(self, facility):
return Bed.objects.filter(facility=facility).count()

def get_patient_count(self, facility):
return PatientRegistration.objects.filter(
facility=facility, is_active=True
).count()

def get_facility_type(self, facility):
return {
Expand All @@ -88,8 +80,6 @@ class Meta:
"facility_type",
"read_cover_image_url",
"features",
"patient_count",
"bed_count",
)


Expand All @@ -102,7 +92,6 @@ class FacilitySerializer(FacilityBasicInfoSerializer):
child=serializers.ChoiceField(choices=FEATURE_CHOICES),
required=False,
)
bed_count = serializers.SerializerMethodField()

facility_flags = serializers.SerializerMethodField()

Expand Down Expand Up @@ -143,8 +132,6 @@ class Meta:
"expected_type_c_cylinders",
"expected_type_d_cylinders",
"read_cover_image_url",
"patient_count",
"bed_count",
"facility_flags",
]
read_only_fields = ("modified_date", "created_date")
Expand Down
3 changes: 0 additions & 3 deletions care/facility/api/serializers/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ class PatientListSerializer(serializers.ModelSerializer):
district_object = DistrictSerializer(source="district", read_only=True)
state_object = StateSerializer(source="state", read_only=True)

last_consultation = PatientConsultationSerializer(read_only=True)

blood_group = ChoiceField(choices=BLOOD_GROUP_CHOICES, required=True)
disease_status = ChoiceField(
choices=DISEASE_STATUS_CHOICES, default=DiseaseStatusEnum.SUSPECTED.value
Expand Down Expand Up @@ -140,7 +138,6 @@ class MedicalHistorySerializer(serializers.Serializer):
child=MedicalHistorySerializer(), required=False
)

last_consultation = PatientConsultationSerializer(read_only=True)
facility_object = FacilitySerializer(source="facility", read_only=True)

source = ChoiceField(
Expand Down
1 change: 0 additions & 1 deletion care/facility/api/serializers/patient_consultation.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class PatientConsultationSerializer(serializers.ModelSerializer):

last_edited_by = UserBaseMinimumSerializer(read_only=True)
created_by = UserBaseMinimumSerializer(read_only=True)
last_daily_round = DailyRoundSerializer(read_only=True)

current_bed = ConsultationBedSerializer(read_only=True)

Expand Down

0 comments on commit 5e4a841

Please sign in to comment.