Skip to content

Commit

Permalink
adding char fields to fill in when they had previous TB
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Aug 26, 2016
1 parent 8909b0a commit 642d19c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/opal-tb/tb/migrations/0042_auto_20160826_1217.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('tb', '0041_auto_20160822_1054'),
]

operations = [
migrations.AddField(
model_name='tbhistory',
name='date_of_other_tb_contact',
field=models.CharField(max_length=255, null=True, verbose_name=b'Date of TB Contact', blank=True),
),
migrations.AddField(
model_name='tbhistory',
name='date_of_previous_tb_infection',
field=models.CharField(max_length=255, null=True, verbose_name=b'Date of Previous TB Infection', blank=True),
),
]
2 changes: 2 additions & 0 deletions lib/opal-tb/tb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ class TBHistory(models.PatientSubrecord):
_icon = 'fa fa-wpforms'
_title = "History of TB"
personal_history_of_tb = fields.TextField(blank=True, null=True, verbose_name="Personal History of TB")
date_of_previous_tb_infection = fields.CharField(max_length=255, blank=True, null=True, verbose_name="Date of Previous TB")
other_tb_contact = fields.TextField(blank=True, null=True, verbose_name="Other TB Contact")
date_of_other_tb_contact = fields.CharField(max_length=255, blank=True, null=True, verbose_name="Date of TB Contact")

class BCG(models.PatientSubrecord):
_icon = 'fa fa-asterisk'
Expand Down
2 changes: 2 additions & 0 deletions lib/opal-tb/tb/templates/forms/tb_history_form.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% load forms %}
{% textarea field="TBHistory.personal_history_of_tb" %}
{% input field="TBHistory.date_of_previous_tb_infection" show="editing.tb_history.personal_history_of_tb[0].length" %}
{% textarea field="TBHistory.other_tb_contact" %}
{% input field="TBHistory.date_of_other_tb_contact" show="editing.tb_history.other_tb_contact[0].length" %}

0 comments on commit 642d19c

Please sign in to comment.