Skip to content

Commit

Permalink
rename the categories in the events
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed May 21, 2024
1 parent b22061b commit a9a1ec3
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@


class Migration(migrations.Migration):
def rename_categories_in_events(apps, schema_editor):
PatientConsultationEvent = apps.get_model(
"facility", "PatientConsultationEvent"
)

PatientConsultationEvent.objects.filter(
event_type__name="CATEGORY", value__category="Stable"
).update(value={"category": "Mild"})
PatientConsultationEvent.objects.filter(
event_type__name="CATEGORY", value__category="Abnormal"
).update(value={"category": "Moderate"})

dependencies = [
("facility", "0437_alter_dailyround_rounds_type"),
]
Expand Down

0 comments on commit a9a1ec3

Please sign in to comment.