From f7519a7c2619af556f8eabc24bdb60415804ddce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Ates?= Date: Mon, 26 Oct 2015 11:32:47 +0100 Subject: [PATCH] Update interface with new patient fields. --- src/biomon/forms.py | 2 +- src/biomon/locale/fr/LC_MESSAGES/django.po | 117 ++++++++++-------- src/biomon/static/biomon/css/biomonitor.css | 17 ++- src/biomon/templates/biomon/patient_list.html | 5 +- src/biomon/views.py | 5 +- 5 files changed, 82 insertions(+), 64 deletions(-) diff --git a/src/biomon/forms.py b/src/biomon/forms.py index a38c0ec..7861397 100644 --- a/src/biomon/forms.py +++ b/src/biomon/forms.py @@ -33,7 +33,7 @@ class MainForm(forms.ModelForm): class Meta: model = models.Patient fields = ['firstname', 'lastname', 'sex', 'birthdate', 'monitoring_place', - 'medical_comment'] + 'emergency_contact', 'regular_doctor', 'medical_comment'] class SimpleAlertProfileForm(forms.ModelForm): diff --git a/src/biomon/locale/fr/LC_MESSAGES/django.po b/src/biomon/locale/fr/LC_MESSAGES/django.po index 5de4009..2052c5d 100644 --- a/src/biomon/locale/fr/LC_MESSAGES/django.po +++ b/src/biomon/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-30 10:24+0200\n" +"POT-Creation-Date: 2015-10-25 19:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Mikaël Ates mates@entrouvert.com\n" "Language-Team: Entr'ouvert\n" @@ -77,6 +77,14 @@ msgstr "Ouvert" msgid "Creation date" msgstr "Date de création" +#: src/biomon/models.py:54 +msgid "Male" +msgstr "Masculin" + +#: src/biomon/models.py:55 +msgid "Female" +msgstr "Féminin" + #: src/biomon/models.py:57 msgid "First name" msgstr "Prénom" @@ -126,7 +134,7 @@ msgstr "Lieu de surveillance" msgid "Simple monitoring profile" msgstr "Profil simple de surveillance" -#: src/biomon/models.py:122 src/biomon/templates/biomon/patient_detail.html:30 +#: src/biomon/models.py:122 src/biomon/templates/biomon/patient_detail.html:19 msgid "Monitoring profile" msgstr "Profil de surveillance" @@ -138,139 +146,138 @@ msgstr "Commentaire médical" msgid "Enabled" msgstr "Activé" -#: src/biomon/templates/biomon/alerts.html:10 -#: src/biomon/templates/biomon/patient_detail.html:12 -msgid "My patients" -msgstr "Mes patients" +#: src/biomon/templates/biomon/alerts.html:20 +#: src/biomon/templates/biomon/patient_detail.html:107 +msgid "Running episodes !" +msgstr "Épisodes en cours !" -#: src/biomon/templates/biomon/alerts.html:17 -#: src/biomon/templates/biomon/patient_list.html:18 -msgid "Filter patient by their last name." -msgstr "Filtrer les patients par leur nom de famille." +#: src/biomon/templates/biomon/alerts.html:22 +#: src/biomon/templates/biomon/patient_detail.html:109 +msgid "Closed episodes" +msgstr "Épisodes terminés" #: src/biomon/templates/biomon/base.html:7 msgid "Biomon - VEADISTA monitoring system" msgstr "Biomon - Système de surveillance VEADISTA" +#: src/biomon/templates/biomon/base.html:67 +msgid "My patients" +msgstr "Mes patients" + +#: src/biomon/templates/biomon/base.html:68 +#: src/biomon/templates/biomon/patient_detail.html:18 +#: src/biomon/templates/medibot/episode_form.html:21 +msgid "Alerts" +msgstr "Alertes" + +#: src/biomon/templates/biomon/base.html:69 +msgid "Add patient" +msgstr "Ajouter un patient" + #: src/biomon/templates/biomon/patient_alert_profile.html:5 -#: src/biomon/templates/biomon/patient_detail.html:102 -#: src/biomon/templates/biomon/patient_detail.html:149 -#: src/biomon/templates/biomon/patient_detail.html:173 -#: src/biomon/templates/biomon/patient_detail.html:179 +#: src/biomon/templates/biomon/patient_detail.html:91 +#: src/biomon/templates/biomon/patient_detail.html:138 +#: src/biomon/templates/biomon/patient_detail.html:162 +#: src/biomon/templates/biomon/patient_detail.html:168 #: src/biomon/templates/biomon/patient_edit.html:5 -#: src/biomon/templates/biomon/patient_form.html:17 +#: src/biomon/templates/biomon/patient_form.html:10 #: src/biomon/templates/medibot/episode_form.html:30 msgid "Validate" msgstr "Valider" #: src/biomon/templates/biomon/patient_dashboard.html:6 #: src/biomon/templates/biomon/patient_dashboard.html:9 -#: src/biomon/templates/biomon/patient_detail.html:38 -#: src/biomon/templates/biomon/patient_detail.html:41 +#: src/biomon/templates/biomon/patient_detail.html:27 +#: src/biomon/templates/biomon/patient_detail.html:30 msgid "Alert" msgstr "Alerte" #: src/biomon/templates/biomon/patient_dashboard.html:10 -#: src/biomon/templates/biomon/patient_detail.html:42 +#: src/biomon/templates/biomon/patient_detail.html:31 msgid "Live" msgstr "En direct" #: src/biomon/templates/biomon/patient_dashboard.html:11 -#: src/biomon/templates/biomon/patient_detail.html:43 +#: src/biomon/templates/biomon/patient_detail.html:32 msgid "Delay" msgstr "Différé" #: src/biomon/templates/biomon/patient_dashboard.html:14 -#: src/biomon/templates/biomon/patient_detail.html:46 +#: src/biomon/templates/biomon/patient_detail.html:35 msgid "Display time frame" msgstr "Plage de visualisation" #: src/biomon/templates/biomon/patient_dashboard.html:22 -#: src/biomon/templates/biomon/patient_detail.html:54 -#: src/biomon/templates/biomon/patient_detail.html:128 +#: src/biomon/templates/biomon/patient_detail.html:43 +#: src/biomon/templates/biomon/patient_detail.html:117 msgid "Heartrate" msgstr "Pouls" #: src/biomon/templates/biomon/patient_dashboard.html:29 -#: src/biomon/templates/biomon/patient_detail.html:61 +#: src/biomon/templates/biomon/patient_detail.html:50 msgid "PPM" msgstr "BPM" #: src/biomon/templates/biomon/patient_dashboard.html:32 #: src/biomon/templates/biomon/patient_dashboard.html:54 -#: src/biomon/templates/biomon/patient_detail.html:64 -#: src/biomon/templates/biomon/patient_detail.html:86 +#: src/biomon/templates/biomon/patient_detail.html:53 +#: src/biomon/templates/biomon/patient_detail.html:75 msgid "Min" msgstr "Min" #: src/biomon/templates/biomon/patient_dashboard.html:33 #: src/biomon/templates/biomon/patient_dashboard.html:55 -#: src/biomon/templates/biomon/patient_detail.html:65 -#: src/biomon/templates/biomon/patient_detail.html:87 +#: src/biomon/templates/biomon/patient_detail.html:54 +#: src/biomon/templates/biomon/patient_detail.html:76 msgid "Max" msgstr "Max" #: src/biomon/templates/biomon/patient_dashboard.html:36 #: src/biomon/templates/biomon/patient_dashboard.html:58 -#: src/biomon/templates/biomon/patient_detail.html:68 -#: src/biomon/templates/biomon/patient_detail.html:90 +#: src/biomon/templates/biomon/patient_detail.html:57 +#: src/biomon/templates/biomon/patient_detail.html:79 msgid "Mean 5 min" msgstr "Moy. 5 min" #: src/biomon/templates/biomon/patient_dashboard.html:37 #: src/biomon/templates/biomon/patient_dashboard.html:59 -#: src/biomon/templates/biomon/patient_detail.html:69 -#: src/biomon/templates/biomon/patient_detail.html:91 +#: src/biomon/templates/biomon/patient_detail.html:58 +#: src/biomon/templates/biomon/patient_detail.html:80 msgid "Mean 24 h" msgstr "Moy. 24 h" #: src/biomon/templates/biomon/patient_dashboard.html:44 -#: src/biomon/templates/biomon/patient_detail.html:76 -#: src/biomon/templates/biomon/patient_detail.html:152 +#: src/biomon/templates/biomon/patient_detail.html:65 +#: src/biomon/templates/biomon/patient_detail.html:141 msgid "Temperature" msgstr "Température" #: src/biomon/templates/biomon/patient_dashboard.html:51 -#: src/biomon/templates/biomon/patient_detail.html:83 +#: src/biomon/templates/biomon/patient_detail.html:72 msgid "°C" msgstr "°C" -#: src/biomon/templates/biomon/patient_detail.html:27 +#: src/biomon/templates/biomon/patient_detail.html:16 msgid "Dashboard" msgstr "Dashboard" -#: src/biomon/templates/biomon/patient_detail.html:28 +#: src/biomon/templates/biomon/patient_detail.html:17 msgid "Profile" msgstr "Profil" -#: src/biomon/templates/biomon/patient_detail.html:29 -#: src/biomon/templates/biomon/patient_list.html:10 -#: src/biomon/templates/medibot/episode_form.html:21 -msgid "Alerts" -msgstr "Alertes" +#: src/biomon/templates/biomon/patient_list.html:6 +msgid "Filter patient by their last name." +msgstr "Filtrer les patients par leur nom de famille." -#: src/biomon/templates/biomon/patient_detail.html:118 -msgid "Running episodes !" -msgstr "Épisodes en cours !" - -#: src/biomon/templates/biomon/patient_detail.html:120 -msgid "Closed episodes" -msgstr "Épisodes terminés" - -#: src/biomon/templates/biomon/patient_form.html:8 #: src/biomon/templates/medibot/episode_form.html:20 #: src/biomon/templates/medibot/episode_list.html:20 msgid "Home" msgstr "Accueil" -#: src/biomon/templates/biomon/patient_list.html:11 -msgid "Add patient" -msgstr "Ajouter un patient" - #: src/biomon/templates/medibot/episode_list.html:21 msgid "Add alert" msgstr "Ajouter une alerte" -#: src/biomon/views.py:121 +#: src/biomon/views.py:129 msgid "Patient record updated." msgstr "Dossier patient mis à jour." diff --git a/src/biomon/static/biomon/css/biomonitor.css b/src/biomon/static/biomon/css/biomonitor.css index 4e8f262..d6a02e4 100644 --- a/src/biomon/static/biomon/css/biomonitor.css +++ b/src/biomon/static/biomon/css/biomonitor.css @@ -257,7 +257,7 @@ transform: scale(0.4, 0.707) rotate(45deg); div#search { text-align: center; -height: 20%; +height: 70px; font-size: 50px; } @@ -310,7 +310,7 @@ color: purple; div#patient-list { text-align: center; -height: 80%; +height: 85%; overflow-y: auto; } @@ -335,8 +335,7 @@ text-align: left; } div.patient-block { -height: 200px; -width: 300px; +width: 350px; background: none repeat scroll 0% 0% rgba(255, 255, 255, 1); display: inline-block; padding: 10px; @@ -351,7 +350,11 @@ vertical-align: bottom; cursor: pointer; } -span#display_name { +div.patient-block > * { +color: black; +} + +span.display_name { font-weight: bold; } @@ -927,3 +930,7 @@ color: green !important; span#title { color: white; } + +.small{ +font-size: 0.8em; +} diff --git a/src/biomon/templates/biomon/patient_list.html b/src/biomon/templates/biomon/patient_list.html index e5dc445..a7bb5af 100644 --- a/src/biomon/templates/biomon/patient_list.html +++ b/src/biomon/templates/biomon/patient_list.html @@ -19,7 +19,10 @@ {{ item.lastname|upper }} {{ item.firstname|title }} {% if item.sex %}{% endif %} {% if item.age %} {{ item.age }}{% endif %} - {% if item.monitoring_place %}
{{ item.monitoring_place }}
{% endif %} + {% if item.monitoring_place %}
 {{ item.monitoring_place }}
{% endif %} + {% if item.emergency_contact %}
 {{ item.emergency_contact }}
{% endif %} + {% if item.regular_doctor %}
 {{ item.regular_doctor }}
{% endif %} + {% if item.medical_comment %}
 {{ item.medical_comment }}
{% endif %} {% endfor %} diff --git a/src/biomon/views.py b/src/biomon/views.py index cd15c80..cce7708 100644 --- a/src/biomon/views.py +++ b/src/biomon/views.py @@ -89,7 +89,8 @@ class PatientList(ListView): class PatientCreate(CreateView): model = models.Patient fields = ['firstname', 'lastname', 'sex', 'birthdate', 'monitoring_place', - 'medical_comment', 'enabled'] + 'emergency_contact', 'regular_doctor', 'medical_comment', + 'enabled'] def form_valid(self, form): messages.add_message(self.request, messages.INFO, u'Patient créé.') @@ -107,7 +108,7 @@ class PatientCreate(CreateView): class PatientUpdate(UpdateView): model = models.Patient fields = ['firstname', 'lastname', 'sex', 'birthdate', 'monitoring_place', - 'medical_comment'] + 'emergency_contact', 'regular_doctor', 'medical_comment'] class PatientDetail(cbv.MultiUpdateView):