Skip to content

Commit

Permalink
Merge branch 'develop' into feat/521-add-sodium-blood-results-chem
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanWillitts committed Sep 12, 2024
2 parents fec9506 + 7b315dc commit c09eeec
Show file tree
Hide file tree
Showing 24 changed files with 337 additions and 17 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ 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
5 changes: 3 additions & 2 deletions effect_edc/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@
"multisite",
"fontawesomefree",
"django_crypto_fields.apps.AppConfig",
"django_revision.apps.AppConfig",
"django_db_views",
"django_extensions",
"django_revision.apps.AppConfig",
"logentry_admin",
"simple_history",
"storages",
Expand Down Expand Up @@ -482,7 +483,7 @@
AWS_S3_OBJECT_PARAMETERS = {"CacheControl": "max-age=86400"}
AWS_LOCATION = env.str("AWS_LOCATION")
AWS_IS_GZIPPED = True
STATICFILES_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
STORAGES = {"staticfiles": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage"}}
STATIC_URL = f"{os.path.join(AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION)}/"
STATIC_ROOT = ""
else:
Expand Down
3 changes: 3 additions & 0 deletions effect_labs/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BLOOD_CULTURE = "blood_culture"
CHEMISTRY = "chemistry"
CSF_CULTURE = "csf_culture"
10 changes: 6 additions & 4 deletions effect_labs/panels.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from edc_lab import RequisitionPanel
from edc_lab_panel.constants import FBC

from .constants import BLOOD_CULTURE, CHEMISTRY, CSF_CULTURE
from .processing_profiles import (
blood_culture_processing,
chemistry_processing,
Expand All @@ -10,7 +12,7 @@
)

chemistry_panel = RequisitionPanel(
name="chemistry",
name=CHEMISTRY,
verbose_name="Chemistry: RFT, LFT, Electrolytes",
abbreviation="CHEM",
processing_profile=chemistry_processing,
Expand Down Expand Up @@ -41,7 +43,7 @@
],
)
csf_culture_panel = RequisitionPanel(
name="csf_culture",
name=CSF_CULTURE,
verbose_name="CSF culture",
abbreviation="CSFC",
processing_profile=csf_culture_processing,
Expand All @@ -65,7 +67,7 @@
)

blood_culture_panel = RequisitionPanel(
name="blood_culture",
name=BLOOD_CULTURE,
verbose_name="Blood culture",
abbreviation="BLE",
processing_profile=blood_culture_processing,
Expand All @@ -74,7 +76,7 @@

# TODO: update fbc_panel
fbc_panel = RequisitionPanel(
name="fbc",
name=FBC,
verbose_name="Full Blood Count",
processing_profile=fbc_processing,
abbreviation="FBC",
Expand Down
1 change: 1 addition & 0 deletions effect_reports/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .dbviews import OnStudyMissingLabValuesAdmin
from .serum_crag_date_admin import SerumCragDateAdmin, SerumCragDateNoteAdmin
from .unmanaged import (
Rm792KwInCurrentSxGteG3OtherAdmin,
Expand Down
1 change: 1 addition & 0 deletions effect_reports/admin/dbviews/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .on_study_missing_lab_values_admin import OnStudyMissingLabValuesAdmin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .unmanaged_model_admin import OnStudyMissingLabValuesAdmin
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from django.contrib import admin
from edc_qareports.modeladmin_mixins import OnStudyMissingValuesModelAdminMixin

from ....admin_site import effect_reports_admin
from ....models import OnStudyMissingLabValues


@admin.register(OnStudyMissingLabValues, site=effect_reports_admin)
class OnStudyMissingLabValuesAdmin(OnStudyMissingValuesModelAdminMixin, admin.ModelAdmin):

include_note_column: bool = True

instructions = ["ello"]
50 changes: 50 additions & 0 deletions effect_reports/migrations/0004_onstudymissinglabvalues_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Generated by Django 5.1.1 on 2024-09-12 09:55

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("effect_reports", "0003_serumcragdate_historicalserumcragdatenote_and_more"),
("sites", "0002_alter_domain_unique"),
]

operations = [
migrations.CreateModel(
name="OnStudyMissingLabValues",
fields=[
(
"id",
models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
("original_id", models.UUIDField(null=True)),
("label_lower", models.CharField(max_length=150, null=True)),
("subject_visit_id", models.UUIDField(null=True)),
("report_datetime", models.DateTimeField(null=True)),
("label", models.CharField(max_length=50, null=True)),
("visit_code", models.CharField(max_length=25, null=True)),
("visit_code_sequence", models.IntegerField(null=True)),
("schedule_name", models.CharField(max_length=25, null=True)),
("modified", models.DateTimeField(null=True)),
("report_model", models.CharField(max_length=50)),
("subject_identifier", models.CharField(max_length=25)),
("created", models.DateTimeField()),
],
options={
"verbose_name": "Missing lab values for on-study patient",
"verbose_name_plural": "Missing lab values for on-study patients",
"db_table": "onstudy_missing_lab_values_view",
"managed": False,
"default_permissions": ("view", "export", "viewallsites"),
},
),
migrations.AddIndex(
model_name="serumcragdate",
index=models.Index(
fields=["subject_identifier", "site"], name="effect_repo_subject_24c4b3_idx"
),
),
]
Loading

0 comments on commit c09eeec

Please sign in to comment.