From 4ba98f86c3370664959a2c8b33c7cac1f18a5841 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Wed, 17 Jan 2024 18:02:37 +0530 Subject: [PATCH 1/2] Delete unused meta icd11 diagnosis table --- care/facility/admin.py | 2 -- .../0407_delete_metaicd11diagnosis.py | 15 ++++++++++ care/facility/models/__init__.py | 1 - care/facility/models/meta_icd11_diagnosis.py | 30 ------------------- 4 files changed, 15 insertions(+), 33 deletions(-) create mode 100644 care/facility/migrations/0407_delete_metaicd11diagnosis.py delete mode 100644 care/facility/models/meta_icd11_diagnosis.py diff --git a/care/facility/admin.py b/care/facility/admin.py index 2ec44090ff..bc5b3fb650 100644 --- a/care/facility/admin.py +++ b/care/facility/admin.py @@ -24,7 +24,6 @@ Inventory, InventoryItem, InventoryLog, - MetaICD11Diagnosis, PatientExternalTest, PatientInvestigation, PatientInvestigationGroup, @@ -212,4 +211,3 @@ class FacilityUserAdmin(DjangoQLSearchMixin, admin.ModelAdmin, ExportCsvMixin): admin.site.register(AssetBed) admin.site.register(Asset) admin.site.register(Bed) -admin.site.register(MetaICD11Diagnosis) diff --git a/care/facility/migrations/0407_delete_metaicd11diagnosis.py b/care/facility/migrations/0407_delete_metaicd11diagnosis.py new file mode 100644 index 0000000000..3caa4dc66f --- /dev/null +++ b/care/facility/migrations/0407_delete_metaicd11diagnosis.py @@ -0,0 +1,15 @@ +# Generated by Django 4.2.8 on 2024-01-17 12:31 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("facility", "0406_merge_20240116_2346"), + ] + + operations = [ + migrations.DeleteModel( + name="MetaICD11Diagnosis", + ), + ] diff --git a/care/facility/models/__init__.py b/care/facility/models/__init__.py index 92cf8dc70b..31e3fd556d 100644 --- a/care/facility/models/__init__.py +++ b/care/facility/models/__init__.py @@ -8,7 +8,6 @@ from .facility import * # noqa from .icd11_diagnosis import * # noqa from .inventory import * # noqa -from .meta_icd11_diagnosis import * # noqa from .patient import * # noqa from .patient_consultation import * # noqa from .patient_external_test import * # noqa diff --git a/care/facility/models/meta_icd11_diagnosis.py b/care/facility/models/meta_icd11_diagnosis.py deleted file mode 100644 index 8d5a16bee0..0000000000 --- a/care/facility/models/meta_icd11_diagnosis.py +++ /dev/null @@ -1,30 +0,0 @@ -from django.db import models - - -class MetaICD11Diagnosis(models.Model): - """ - Not for production use. For Metabase purposes only. Do not build relations to this model. - - Deprecated in favor of ICD11Diagnosis. This table will be removed in the future. - """ - - id = models.CharField(max_length=255, primary_key=True) - _id = models.IntegerField() - average_depth = models.IntegerField() - is_adopted_child = models.BooleanField() - parent_id = models.CharField(max_length=255, null=True) - class_kind = models.CharField(max_length=255) - is_leaf = models.BooleanField() - label = models.CharField(max_length=255) - breadth_value = models.DecimalField(max_digits=24, decimal_places=22) - chapter = models.CharField(max_length=255) - chapter_short = models.CharField(max_length=255, null=True) - root_block = models.CharField(max_length=255, null=True) - root_category = models.CharField(max_length=255, null=True) - deleted = models.BooleanField(default=False) - - class Meta: - db_table = "meta_icd11_diagnosis" - - def __str__(self): - return self.label From e46a13b11cdcf506622f08c5b7637d67f8a99b10 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Mon, 5 Feb 2024 12:01:48 +0530 Subject: [PATCH 2/2] rebase migrations --- ...etaicd11diagnosis.py => 0408_delete_metaicd11diagnosis.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename care/facility/migrations/{0407_delete_metaicd11diagnosis.py => 0408_delete_metaicd11diagnosis.py} (62%) diff --git a/care/facility/migrations/0407_delete_metaicd11diagnosis.py b/care/facility/migrations/0408_delete_metaicd11diagnosis.py similarity index 62% rename from care/facility/migrations/0407_delete_metaicd11diagnosis.py rename to care/facility/migrations/0408_delete_metaicd11diagnosis.py index 3caa4dc66f..926a9e0f14 100644 --- a/care/facility/migrations/0407_delete_metaicd11diagnosis.py +++ b/care/facility/migrations/0408_delete_metaicd11diagnosis.py @@ -1,11 +1,11 @@ -# Generated by Django 4.2.8 on 2024-01-17 12:31 +# Generated by Django 4.2.8 on 2024-02-05 06:31 from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ("facility", "0406_merge_20240116_2346"), + ("facility", "0407_alter_dailyround_additional_symptoms_and_more"), ] operations = [