-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into sainak/feat/new-asset-methods
- Loading branch information
Showing
43 changed files
with
1,029 additions
and
779 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
* @coronasafe/care-developers | ||
*.yml @tomahawk-pilot @mathew-alex | ||
* @ohcnetwork/care-developers | ||
*.yml @tomahawk-pilot |
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
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
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
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
60 changes: 60 additions & 0 deletions
60
care/facility/migrations/0450_corrections_for_io_balance_fields.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,60 @@ | ||
# Generated by Django 4.2.10 on 2024-08-20 12:38 | ||
|
||
from django.core.paginator import Paginator | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
""" | ||
Migration to correct the entries with spelling mistake for "Rules Tube Aspiration" | ||
to "Ryles Tube Aspiration" in both DailyRound's output JSONField. | ||
""" | ||
|
||
dependencies = [ | ||
("facility", "0449_merge_20240822_1343"), | ||
] | ||
|
||
def forward_rename_dailyround_entries(apps, schema_editor): | ||
DailyRound = apps.get_model("facility", "DailyRound") | ||
|
||
paginator = Paginator( | ||
DailyRound.objects.filter( | ||
output__contains=[{"name": "Rules Tube Aspiration"}] | ||
).order_by("id"), | ||
1000, | ||
) | ||
|
||
for page_number in paginator.page_range: | ||
bulk = [] | ||
for instance in paginator.page(page_number).object_list: | ||
for entry in instance.output: | ||
if entry["name"] == "Rules Tube Aspiration": | ||
entry["name"] = "Ryles Tube Aspiration" | ||
bulk.append(instance) | ||
DailyRound.objects.bulk_update(bulk, ["output"]) | ||
|
||
def reverse_rename_dailyround_entries(apps, schema_editor): | ||
DailyRound = apps.get_model("facility", "DailyRound") | ||
|
||
paginator = Paginator( | ||
DailyRound.objects.filter( | ||
output__contains=[{"name": "Ryles Tube Aspiration"}] | ||
).order_by("id"), | ||
1000, | ||
) | ||
|
||
for page_number in paginator.page_range: | ||
bulk = [] | ||
for instance in paginator.page(page_number).object_list: | ||
for entry in instance.output: | ||
if entry["name"] == "Ryles Tube Aspiration": | ||
entry["name"] = "Rules Tube Aspiration" | ||
bulk.append(instance) | ||
DailyRound.objects.bulk_update(bulk, ["output"]) | ||
|
||
operations = [ | ||
migrations.RunPython( | ||
forward_rename_dailyround_entries, | ||
reverse_code=reverse_rename_dailyround_entries, | ||
), | ||
] |
64 changes: 64 additions & 0 deletions
64
care/facility/migrations/0452_remove_patientconsultation_deprecated_diagnosis_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,64 @@ | ||
# Generated by Django 4.2.10 on 2024-08-23 10:57 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("facility", "0451_merge_20240823_1642"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="deprecated_diagnosis", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="deprecated_icd11_diagnoses", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="deprecated_icd11_principal_diagnosis", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="deprecated_icd11_provisional_diagnoses", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="discharge_advice", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="discharge_prescription", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="discharge_prn_prescription", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="prn_prescription", | ||
), | ||
migrations.RemoveField( | ||
model_name="dailyround", | ||
name="deprecated_additional_symptoms", | ||
), | ||
migrations.RemoveField( | ||
model_name="dailyround", | ||
name="deprecated_other_symptoms", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="deprecated_other_symptoms", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="deprecated_symptoms", | ||
), | ||
migrations.RemoveField( | ||
model_name="patientconsultation", | ||
name="deprecated_symptoms_onset_date", | ||
), | ||
] |
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,13 @@ | ||
# Generated by Django 4.2.10 on 2024-08-24 15:10 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("facility", "0450_corrections_for_io_balance_fields"), | ||
("facility", "0452_remove_patientconsultation_deprecated_diagnosis_and_more"), | ||
] | ||
|
||
operations = [] |
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
Oops, something went wrong.