Skip to content

Commit

Permalink
Add expanded comorbidities to profile (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudigiesler committed Nov 13, 2020
1 parent 71a9cf5 commit 57559b3
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
41 changes: 41 additions & 0 deletions eventstore/migrations/0037_add_expanded_comorbidities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by Django 2.2.13 on 2020-11-06 07:41

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [("eventstore", "0036_auto_20201007_1040")]

operations = [
migrations.AddField(
model_name="dbeonbehalfofprofile",
name="asthma",
field=models.BooleanField(default=None, null=True),
),
migrations.AddField(
model_name="dbeonbehalfofprofile",
name="cardiac",
field=models.BooleanField(default=None, null=True),
),
migrations.AddField(
model_name="dbeonbehalfofprofile",
name="immuno",
field=models.BooleanField(default=None, null=True),
),
migrations.AddField(
model_name="dbeonbehalfofprofile",
name="pregnant",
field=models.BooleanField(default=None, null=True),
),
migrations.AddField(
model_name="dbeonbehalfofprofile",
name="respiratory",
field=models.BooleanField(default=None, null=True),
),
migrations.AddField(
model_name="dbeonbehalfofprofile",
name="tb",
field=models.BooleanField(default=None, null=True),
),
]
12 changes: 12 additions & 0 deletions eventstore/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,12 @@ def update_or_create_from_healthcheck(
"diabetes": healthcheck.data.get("diabetes"),
"hypertension": healthcheck.data.get("hypertension"),
"cardio": healthcheck.data.get("cardio"),
"asthma": healthcheck.data.get("asthma"),
"tb": healthcheck.data.get("tb"),
"pregnant": healthcheck.data.get("pregnant"),
"respiratory": healthcheck.data.get("respiratory"),
"cardiac": healthcheck.data.get("cardiac"),
"immuno": healthcheck.data.get("immuno"),
},
)

Expand All @@ -646,6 +652,12 @@ class DBEOnBehalfOfProfile(models.Model):
diabetes = models.BooleanField(null=True, default=None)
hypertension = models.BooleanField(null=True, default=None)
cardio = models.BooleanField(null=True, default=None)
asthma = models.BooleanField(null=True, default=None)
tb = models.BooleanField(null=True, default=None)
pregnant = models.BooleanField(null=True, default=None)
respiratory = models.BooleanField(null=True, default=None)
cardiac = models.BooleanField(null=True, default=None)
immuno = models.BooleanField(null=True, default=None)

objects = DBEOnBehalfOfProfileManager()

Expand Down

0 comments on commit 57559b3

Please sign in to comment.