Skip to content

Commit

Permalink
merges in v0.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Nov 23, 2018
2 parents eebc7ca + 11d3a29 commit 0d0b73a
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 17 deletions.
37 changes: 23 additions & 14 deletions apps/tb/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,12 @@ class TBConsultationPathway(pathways.PagePathway):
model=tb_models.ContactDetails,
help_text_template="pathway/steps/help_text/contact_details.html"
),
# TODO: Enable this once we are pulling from cerner.
# In the meantime it's less useful to have the placeholder
#
# HelpTextStep(
# model=tb_models.NextOfKin,
# help_text="This will be pulled in from Cerner"
# ),
# A pathway that asks for place of birth,
# immigration concerns and communication concerns
HelpTextStep(
model=tb_models.CommuninicationConsiderations,
),
HelpTextStep(
template="pathway/steps/nationality.html",
help_text_template="pathway/steps/help_text/nationality.html",
model=tb_models.Nationality,
template="pathway/steps/nationality_and_language.html",
display_name="Nationality and Language",
icon="fa fa-file-image-o"
),
HelpTextStep(
model=tb_models.AccessConsiderations,
Expand Down Expand Up @@ -218,4 +210,21 @@ class SymptomsPathway(pathways.PagePathway):
step_controller="TbSymptomComplexCrtl",
multiple=False,
),
)
)


class NationalityAndLanguage(pathways.PagePathway):
"""
A pathway that asks for place of birth,
immigration concerns and communication concerns
"""
slug = "nationality_and_language"
display_name = "Nationality And Language"
icon = "fa fa-map-signs"
steps = (
pathways.Step(
template="pathway/steps/nationality_and_language.html",
display_name="Nationality and Language",
icon="fa fa-file-image-o"
),
)
3 changes: 1 addition & 2 deletions apps/tb/templates/detail/tb.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<div class="row">
<div class="col-md-6">
{% record_panel models.ReferralRoute %}
{% record_panel models.CommuninicationConsiderations %}
{% record_panel models.Nationality %}
{% include 'panels/nationality_panel.html' %}
{% record_panel models.TBHistory %}
{% include "panels/symptoms.html" %}
{% record_panel models.Travel %}
Expand Down
70 changes: 70 additions & 0 deletions apps/tb/templates/panels/nationality_panel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3>
<i class="fa fa-map-signs"></i> Nationality and Language
{% if not request.user.profile.readonly %}
<i class="fa fa-pencil edit pull-right pointer"
open-pathway="nationality_and_language",
pathway-episode="episode"
pathway-callback="refresh()">
</i>
{% endif %}
</h3>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row content-offset-below-10" ng-show="patient.demographics[0].birth_place">
<div class="col-md-3">
<strong>Birth place:</strong>
</div>
<div class="col-md-9">
[[ patient.demographics[0].birth_place ]]
</div>
</div>


<div class="row content-offset-below-10" ng-show="patient.nationality[0].arrival_in_the_uk">
<div class="col-md-3">
<strong>Arrival in the UK:</strong>
</div>
<div class="col-md-9">
[[ patient.nationality[0].arrival_in_the_uk ]]
</div>
</div>

<div class="row content-offset-below-10" ng-show="patient.nationality[0].immigration_details.length">
<div class="col-md-3">
<strong>Immigration Details:</strong>
</div>
<div class="col-md-9">
[[ patient.nationality[0].immigration_details ]]
</div>
</div>

<div class="row content-offset-below-10" ng-show="patient.nationality[0].immigration_support_officer.length">
<div class="col-md-3">
<strong>Immigration support officer:</strong>
</div>
<div class="col-md-9">
[[ patient.nationality[0].immigration_support_officer ]]
</div>
</div>
<div class="row content-offset-below-10" ng-show="patient.communinication_considerations[0].needs_an_interpreter">
<div class="col-md-3">
<strong>Interpreter:</strong>
</div>
<div ng-show="patient.communinication_considerations[0].language" class="col-md-8">
[[ patient.communinication_considerations[0].language ]]
</div>
<div ng-show="!patient.communinication_considerations[0].language" class="col-md-8">
Unknown
</div>
</div>
<div class="row" ng-show="patient.communinication_considerations[0].sensory_impairment">
<div class="col-md-12">
<strong>The patient is sensory impaired</strong>
</div>
</div>
</li>
</ul>
</div>
7 changes: 7 additions & 0 deletions apps/tb/templates/pathway/steps/nationality_and_language.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% load forms %}

{% input field="Demographics.birth_place" %}
<div ng-show="editing.demographics.birth_place.length && editing.demographics.birth_place !== 'United Kingdom'">
{% include models.Nationality.get_form_template %}
</div>
{% include models.CommuninicationConsiderations.get_form_template %}
20 changes: 20 additions & 0 deletions elcid/migrations/0030_auto_20181122_1621.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-11-22 16:21
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('elcid', '0029_appointment'),
]

operations = [
migrations.AlterField(
model_name='referralroute',
name='referral_reason',
field=models.CharField(blank=True, choices=[(b'Symptomatic', b'Symptomatic'), (b'TB contact screening', b'TB contact screening'), (b'New entract screening', b'New entract screening'), (b'Transferred in TB Rx', b'Transferred in TB Rx'), (b'Immunosuppressant', b'Immunosuppressant'), (b'BCG Vaccination', b'BCG Vaccination'), (b'Other', b'Other')], default=b'', max_length=256),
),
]
1 change: 0 additions & 1 deletion elcid/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@

# New modular settings!
# !!! TODO: Are these how we want to discover these ?
OPAL_OPTIONS_MODULE = 'elcid.options'
OPAL_BRAND_NAME = 'elCID Royal Free Hospital'
OPAL_LOG_OUT_MINUTES = 15
OPAL_LOG_OUT_DURATION = OPAL_LOG_OUT_MINUTES*60*1000
Expand Down

0 comments on commit 0d0b73a

Please sign in to comment.