From bed4d0caa0e09f353c733ec577c686301e85e394 Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Tue, 21 May 2024 22:53:32 +0530 Subject: [PATCH] rename categories for patient_category events --- .../0438_alter_dailyround_patient_category_and_more.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/care/facility/migrations/0438_alter_dailyround_patient_category_and_more.py b/care/facility/migrations/0438_alter_dailyround_patient_category_and_more.py index 21e0f961d7..021802db0b 100644 --- a/care/facility/migrations/0438_alter_dailyround_patient_category_and_more.py +++ b/care/facility/migrations/0438_alter_dailyround_patient_category_and_more.py @@ -12,9 +12,15 @@ def rename_categories_in_events(apps, schema_editor): PatientConsultationEvent.objects.filter( event_type__name="CATEGORY", value__category="Stable" ).update(value={"category": "Mild"}) + PatientConsultationEvent.objects.filter( + event_type__name="PATIENT_CATEGORY", value__category="Stable" + ).update(value={"patient_category": "Mild"}) PatientConsultationEvent.objects.filter( event_type__name="CATEGORY", value__category="Abnormal" ).update(value={"category": "Moderate"}) + PatientConsultationEvent.objects.filter( + event_type__name="PATIENT_CATEGORY", value__category="Abnormal" + ).update(value={"patient_category": "Moderate"}) dependencies = [ ("facility", "0437_alter_dailyround_rounds_type"),