-
Notifications
You must be signed in to change notification settings - Fork 3
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 #1657 from openhealthcare/opat-report-with-breakdown
Opat report with breakdown
- Loading branch information
Showing
22 changed files
with
5,138 additions
and
3,906 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ | |
|
||
DEBUG = True | ||
|
||
BASE_URL = "http://elcidl" | ||
|
||
ADMINS = ( | ||
('Support', '[email protected]',), | ||
) | ||
|
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
41 changes: 0 additions & 41 deletions
41
infectiousdiseases/templates/reports/infectiousdiseases/id_liasion_report.html
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.8 on 2018-08-17 19:22 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
PATIENT_OUTCOME_MAPPING = dict( | ||
Cure='Cured', | ||
Improved='Improved', | ||
Failure='Failed' | ||
) | ||
|
||
OPAT_OUTCOME_MAPPING = { | ||
'Success': 'Success', | ||
'Partial Success': 'Parcial', | ||
'Failure of OPAT': 'Failed', | ||
'Intermidiate Outcome': 'Undeterminate' | ||
} | ||
|
||
|
||
def forward(apps, *args): | ||
OPATOutcome = apps.get_model('opat', 'OPATOutcome') | ||
for i, v in PATIENT_OUTCOME_MAPPING.items(): | ||
OPATOutcome.objects.filter( | ||
patient_outcome=i | ||
).update( | ||
patient_outcome=v | ||
) | ||
for i, v in OPAT_OUTCOME_MAPPING.items(): | ||
OPATOutcome.objects.filter( | ||
opat_outcome=i | ||
).update( | ||
opat_outcome=v | ||
) | ||
|
||
|
||
def backwards(apps, *args): | ||
OPATOutcome = apps.get_model('opat', 'OPATOutcome') | ||
for i, v in PATIENT_OUTCOME_MAPPING.items(): | ||
OPATOutcome.objects.filter( | ||
patient_outcome=v | ||
).update( | ||
patient_outcome=i | ||
) | ||
for i, v in OPAT_OUTCOME_MAPPING.items(): | ||
OPATOutcome.objects.filter( | ||
opat_outcome=v | ||
).update( | ||
opat_outcome=i | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('opat', '0007_auto_20180303_1431'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forward, reverse_code=backwards) | ||
] |
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,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.8 on 2018-08-17 19:42 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('opat', '0008_opat_outcome'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='opatoutcome', | ||
name='opat_outcome', | ||
field=models.CharField(blank=True, choices=[(b'Success', b'Success'), (b'Parcial', b'Parcial'), (b'Failed', b'Failed'), (b'Undeterminate', b'Undeterminate')], max_length=200, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='opatoutcome', | ||
name='patient_outcome', | ||
field=models.CharField(blank=True, choices=[(b'Cured', b'Cured'), (b'Improved', b'Improved'), (b'Failed', b'Failed')], max_length=200, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.8 on 2018-08-19 10:11 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
MAPPINGS = { | ||
('opal', 'Line_complication',): { | ||
"Infection - Phelbitis": "Infection - Phlebitis" | ||
}, | ||
('opal', 'Antimicrobial_adverse_event',): { | ||
"Esosinophilia": "Eosinophilia" | ||
} | ||
} | ||
|
||
|
||
def forward(apps, *args, **kwargs): | ||
for model, translations in MAPPINGS.items(): | ||
some_model = apps.get_model(*model) | ||
for from_translation, to_translation in translations.items(): | ||
some_model.objects.filter( | ||
name=from_translation | ||
).update( | ||
name=to_translation | ||
) | ||
|
||
|
||
def backwards(apps, *args, **kwargs): | ||
for model, translations in MAPPINGS.items(): | ||
some_model = apps.get_model(*model) | ||
for from_translation, to_translation in translations.items(): | ||
some_model.objects.filter( | ||
name=to_translation | ||
).update( | ||
name=from_translation | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('opat', '0009_auto_20180817_2042'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forward, reverse_code=backwards) | ||
] |
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.