From 1d0d828fe00fc31ab624ecfac0a1f7dbb57637da Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Wed, 15 May 2024 22:38:10 +0530 Subject: [PATCH 1/2] Removes unused temperature measured at field --- .../management/commands/load_event_types.py | 5 +---- ..._remove_dailyround_temperature_measured_at.py | 16 ++++++++++++++++ care/facility/models/daily_round.py | 1 - 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 care/facility/migrations/0436_remove_dailyround_temperature_measured_at.py diff --git a/care/facility/management/commands/load_event_types.py b/care/facility/management/commands/load_event_types.py index 5d3e034295..6118787d98 100644 --- a/care/facility/management/commands/load_event_types.py +++ b/care/facility/management/commands/load_event_types.py @@ -112,10 +112,7 @@ class Command(BaseCommand): "children": ( { "name": "TEMPERATURE", - "fields": ( - "temperature", - "temperature_measured_at", # todo remove field - ), + "fields": ("temperature",), }, {"name": "SPO2", "fields": ("spo2",)}, {"name": "PULSE", "fields": ("pulse",)}, diff --git a/care/facility/migrations/0436_remove_dailyround_temperature_measured_at.py b/care/facility/migrations/0436_remove_dailyround_temperature_measured_at.py new file mode 100644 index 0000000000..9a0524d7d3 --- /dev/null +++ b/care/facility/migrations/0436_remove_dailyround_temperature_measured_at.py @@ -0,0 +1,16 @@ +# Generated by Django 4.2.8 on 2024-05-15 17:07 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("facility", "0435_merge_20240515_1301"), + ] + + operations = [ + migrations.RemoveField( + model_name="dailyround", + name="temperature_measured_at", + ), + ] diff --git a/care/facility/models/daily_round.py b/care/facility/models/daily_round.py index 4d7a00e4d7..7958bc9b39 100644 --- a/care/facility/models/daily_round.py +++ b/care/facility/models/daily_round.py @@ -139,7 +139,6 @@ class InsulinIntakeFrequencyType(enum.Enum): spo2 = models.DecimalField( max_digits=4, decimal_places=2, blank=True, null=True, default=None ) - temperature_measured_at = models.DateTimeField(null=True, blank=True) physical_examination_info = models.TextField(null=True, blank=True) additional_symptoms = MultiSelectField( choices=SYMPTOM_CHOICES, From 437ff2847af5f0a61d70aee2cf0622ebfbb3c690 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Thu, 16 May 2024 09:45:36 +0530 Subject: [PATCH 2/2] revert changes in load_event_types --- care/facility/management/commands/load_event_types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/care/facility/management/commands/load_event_types.py b/care/facility/management/commands/load_event_types.py index 6118787d98..5d3e034295 100644 --- a/care/facility/management/commands/load_event_types.py +++ b/care/facility/management/commands/load_event_types.py @@ -112,7 +112,10 @@ class Command(BaseCommand): "children": ( { "name": "TEMPERATURE", - "fields": ("temperature",), + "fields": ( + "temperature", + "temperature_measured_at", # todo remove field + ), }, {"name": "SPO2", "fields": ("spo2",)}, {"name": "PULSE", "fields": ("pulse",)},