Skip to content

Commit

Permalink
Merge branch 'feat/521-add-sodium-blood-results-chem' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanWillitts committed Sep 13, 2024
2 parents 7b315dc + 813ec75 commit d6bc3ec
Show file tree
Hide file tree
Showing 6 changed files with 834 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changes
unreleased
------
- add QA reports for Missing Lab Values
- add Sodium field to Blood Result: Chemistry form (#521)
- bump to edc 0.6.12

0.1.55
Expand Down
1 change: 1 addition & 0 deletions effect_labs/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"egfr",
"magnesium",
"potassium",
"sodium",
"ggt",
"urea",
("tbil", "Total Bilirubin"),
Expand Down
55 changes: 55 additions & 0 deletions effect_reports/migrations/0006_auto_20240913_1115.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# Generated by Django 5.1.1 on 2024-09-12 14:55

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("effect_subject", "0116_alter_bloodculture_options_and_more"),
]

operations = [
migrations.AddField(
model_name="bloodresultschem",
name="sodium_abnormal",
field=models.CharField(
blank=True,
choices=[("Yes", "Yes"), ("No", "No")],
max_length=25,
null=True,
verbose_name="abnormal",
),
),
migrations.AddField(
model_name="bloodresultschem",
name="sodium_grade",
field=models.IntegerField(
blank=True,
choices=[
(0, "Not graded"),
(1, "Grade 1"),
(2, "Grade 2"),
(3, "Grade 3"),
(4, "Grade 4"),
(5, "Grade 5"),
],
null=True,
verbose_name="Grade",
),
),
migrations.AddField(
model_name="bloodresultschem",
name="sodium_grade_description",
field=models.CharField(
blank=True, max_length=250, null=True, verbose_name="Grade description"
),
),
migrations.AddField(
model_name="bloodresultschem",
name="sodium_quantifier",
field=models.CharField(
blank=True,
choices=[("=", "="), (">", ">"), (">=", ">="), ("<", "<"), ("<=", "<=")],
default="=",
max_length=10,
null=True,
verbose_name="Quantifier",
),
),
migrations.AddField(
model_name="bloodresultschem",
name="sodium_reportable",
field=models.CharField(
blank=True,
choices=[
("N/A", "Not applicable"),
("3", "Yes, grade 3"),
("4", "Yes, grade 4"),
("No", "Not reportable"),
("Already reported", "Already reported"),
("present_at_baseline", "Present at baseline"),
],
max_length=25,
null=True,
verbose_name="reportable",
),
),
migrations.AddField(
model_name="bloodresultschem",
name="sodium_units",
field=models.CharField(
blank=True,
choices=[("mmol/L", "mmol/L (millimoles/L)")],
max_length=15,
null=True,
verbose_name="units",
),
),
migrations.AddField(
model_name="bloodresultschem",
name="sodium_value",
field=models.DecimalField(
blank=True,
decimal_places=0,
max_digits=8,
null=True,
validators=[django.core.validators.MinValueValidator(0.0)],
verbose_name="Sodium (Na)",
),
),
migrations.AddField(
model_name="historicalbloodresultschem",
name="sodium_abnormal",
field=models.CharField(
blank=True,
choices=[("Yes", "Yes"), ("No", "No")],
max_length=25,
null=True,
verbose_name="abnormal",
),
),
migrations.AddField(
model_name="historicalbloodresultschem",
name="sodium_grade",
field=models.IntegerField(
blank=True,
choices=[
(0, "Not graded"),
(1, "Grade 1"),
(2, "Grade 2"),
(3, "Grade 3"),
(4, "Grade 4"),
(5, "Grade 5"),
],
null=True,
verbose_name="Grade",
),
),
migrations.AddField(
model_name="historicalbloodresultschem",
name="sodium_grade_description",
field=models.CharField(
blank=True, max_length=250, null=True, verbose_name="Grade description"
),
),
migrations.AddField(
model_name="historicalbloodresultschem",
name="sodium_quantifier",
field=models.CharField(
blank=True,
choices=[("=", "="), (">", ">"), (">=", ">="), ("<", "<"), ("<=", "<=")],
default="=",
max_length=10,
null=True,
verbose_name="Quantifier",
),
),
migrations.AddField(
model_name="historicalbloodresultschem",
name="sodium_reportable",
field=models.CharField(
blank=True,
choices=[
("N/A", "Not applicable"),
("3", "Yes, grade 3"),
("4", "Yes, grade 4"),
("No", "Not reportable"),
("Already reported", "Already reported"),
("present_at_baseline", "Present at baseline"),
],
max_length=25,
null=True,
verbose_name="reportable",
),
),
migrations.AddField(
model_name="historicalbloodresultschem",
name="sodium_units",
field=models.CharField(
blank=True,
choices=[("mmol/L", "mmol/L (millimoles/L)")],
max_length=15,
null=True,
verbose_name="units",
),
),
migrations.AddField(
model_name="historicalbloodresultschem",
name="sodium_value",
field=models.DecimalField(
blank=True,
decimal_places=0,
max_digits=8,
null=True,
validators=[django.core.validators.MinValueValidator(0.0)],
verbose_name="Sodium (Na)",
),
),
]
2 changes: 2 additions & 0 deletions effect_subject/models/lab_results/blood_results_chem.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
GgtModelMixin,
MagnesiumModelMixin,
PotassiumModelMixin,
SodiumModelMixin,
TotalBilirubinModelMixin,
UreaModelMixin,
UricAcidModelMixin,
Expand Down Expand Up @@ -51,6 +52,7 @@ class BloodResultsChem(
EgfrModelMixin,
MagnesiumModelMixin,
PotassiumModelMixin,
SodiumModelMixin,
TotalBilirubinModelMixin,
UreaModelMixin,
UricAcidModelMixin,
Expand Down
Loading

0 comments on commit d6bc3ec

Please sign in to comment.