-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed patient category labels (#2187)
* rename patient category labels * rename the categories in the events * rename categories for patient_category events
- Loading branch information
1 parent
5c715f8
commit ba98656
Showing
2 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
care/facility/migrations/0438_alter_dailyround_patient_category_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Generated by Django 4.2.10 on 2024-05-21 12:29 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
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="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"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="dailyround", | ||
name="patient_category", | ||
field=models.CharField( | ||
choices=[ | ||
("Comfort", "Comfort Care"), | ||
("Stable", "Mild"), | ||
("Moderate", "Moderate"), | ||
("Critical", "Critical"), | ||
], | ||
max_length=8, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="patientconsultation", | ||
name="category", | ||
field=models.CharField( | ||
choices=[ | ||
("Comfort", "Comfort Care"), | ||
("Stable", "Mild"), | ||
("Moderate", "Moderate"), | ||
("Critical", "Critical"), | ||
], | ||
max_length=8, | ||
null=True, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters