Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1983 from coronasafe/staging
Production release v24.12.0 | March week 3
- Loading branch information
Showing
4 changed files
with
87 additions
and
106 deletions.
There are no files selected for viewing
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
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
32 changes: 32 additions & 0 deletions
32
care/facility/migrations/0420_migrate_shifting_facility_type.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,32 @@ | ||
# Generated by Django 4.2.10 on 2024-03-14 10:18 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def update_facility_types(apps, schema_editor): | ||
Facility = apps.get_model("facility", "ShiftingRequest") | ||
facilities_to_update = { | ||
801: 800, # 24x7 Public Health Centres to Primary Health Centres | ||
820: 800, # Urban Primary Health Center to Primary Health Centres | ||
831: 830, # Taluk Headquarters Hospitals to Taluk Hospitals | ||
850: 860, # General hospitals to District Hospitals | ||
900: 910, # Co-operative hospitals to Autonomous healthcare facility | ||
950: 870, # Corona Testing Labs to Govt. Labs | ||
1000: 3, # Corona Care Centre to Other | ||
8: 870, # Govt Hospital to Govt Medical College Hospitals | ||
} | ||
|
||
for old_id, new_id in facilities_to_update.items(): | ||
Facility.objects.filter(assigned_facility_type=old_id).update( | ||
assigned_facility_type=new_id | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("facility", "0419_alter_patientconsultation_patient_no"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(update_facility_types, migrations.RunPython.noop), | ||
] |
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