-
Notifications
You must be signed in to change notification settings - Fork 300
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 #2290 from coronasafe/rithviknishad/feat/expand-pr…
…escription-units-and-routes Adds additional units and route to prescriptions
- Loading branch information
Showing
3 changed files
with
146 additions
and
2 deletions.
There are no files selected for viewing
143 changes: 143 additions & 0 deletions
143
care/facility/migrations/0444_alter_medicineadministration_dosage_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,143 @@ | ||
# Generated by Django 4.2.8 on 2024-07-05 10:47 | ||
|
||
from django.db import migrations, models | ||
|
||
import care.utils.models.validators | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("facility", "0443_remove_patientconsultation_consent_records_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="medicineadministration", | ||
name="dosage", | ||
field=models.CharField( | ||
blank=True, | ||
max_length=100, | ||
null=True, | ||
validators=[ | ||
care.utils.models.validators.DenominationValidator( | ||
allow_floats=True, | ||
max_amount=5000, | ||
min_amount=0.0001, | ||
precision=4, | ||
units={ | ||
"ampule(s)", | ||
"mg", | ||
"g", | ||
"tsp", | ||
"drop(s)", | ||
"mcg", | ||
"unit(s)", | ||
"ml", | ||
}, | ||
) | ||
], | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="prescription", | ||
name="base_dosage", | ||
field=models.CharField( | ||
blank=True, | ||
max_length=100, | ||
null=True, | ||
validators=[ | ||
care.utils.models.validators.DenominationValidator( | ||
allow_floats=True, | ||
max_amount=5000, | ||
min_amount=0.0001, | ||
precision=4, | ||
units={ | ||
"ampule(s)", | ||
"mg", | ||
"g", | ||
"tsp", | ||
"drop(s)", | ||
"mcg", | ||
"unit(s)", | ||
"ml", | ||
}, | ||
) | ||
], | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="prescription", | ||
name="max_dosage", | ||
field=models.CharField( | ||
blank=True, | ||
max_length=100, | ||
null=True, | ||
validators=[ | ||
care.utils.models.validators.DenominationValidator( | ||
allow_floats=True, | ||
max_amount=5000, | ||
min_amount=0.0001, | ||
precision=4, | ||
units={ | ||
"ampule(s)", | ||
"mg", | ||
"g", | ||
"tsp", | ||
"drop(s)", | ||
"mcg", | ||
"unit(s)", | ||
"ml", | ||
}, | ||
) | ||
], | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="prescription", | ||
name="route", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[ | ||
("ORAL", "Oral"), | ||
("IV", "IV"), | ||
("IM", "IM"), | ||
("SC", "S/C"), | ||
("INHALATION", "Inhalation"), | ||
("NASOGASTRIC", "Nasogastric/Gastrostomy tube"), | ||
("INTRATHECAL", "intrathecal injection"), | ||
("TRANSDERMAL", "Transdermal"), | ||
("RECTAL", "Rectal"), | ||
("SUBLINGUAL", "Sublingual"), | ||
], | ||
max_length=100, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="prescription", | ||
name="target_dosage", | ||
field=models.CharField( | ||
blank=True, | ||
max_length=100, | ||
null=True, | ||
validators=[ | ||
care.utils.models.validators.DenominationValidator( | ||
allow_floats=True, | ||
max_amount=5000, | ||
min_amount=0.0001, | ||
precision=4, | ||
units={ | ||
"ampule(s)", | ||
"mg", | ||
"g", | ||
"tsp", | ||
"drop(s)", | ||
"mcg", | ||
"unit(s)", | ||
"ml", | ||
}, | ||
) | ||
], | ||
), | ||
), | ||
] |
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