From b5f90d2581468b084ea16dfe46f82ee6f56e6fbb Mon Sep 17 00:00:00 2001 From: Elias Bernardo Date: Sat, 12 May 2018 18:33:30 -0300 Subject: [PATCH 01/48] Creating Populate DB script Adding populate.py in utility Adding __init__.py in utility Co-authored-by: Geovana Ramos --- utility/__init__.py | 1 + utility/populate.py | 201 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 utility/__init__.py create mode 100644 utility/populate.py diff --git a/utility/__init__.py b/utility/__init__.py new file mode 100644 index 00000000..8d1c8b69 --- /dev/null +++ b/utility/__init__.py @@ -0,0 +1 @@ + diff --git a/utility/populate.py b/utility/populate.py new file mode 100644 index 00000000..b57dd7b6 --- /dev/null +++ b/utility/populate.py @@ -0,0 +1,201 @@ +import os.path +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) + + +def create_super_user(username, email, password): + ''' + o try/except é pra garantir que crie um super_user e no caso de erro você saiba + ''' + try: + u = User.objects.create_superuser(username, email, password,is_active = True) + EmailAddress.objects.create( + user=u, email=email, + primary=True, verified=True) + u.set_password(password) + u.save() + print ('\nSuperUser:', User.objects.get(is_superuser=True).username) + + return u + except IntegrityError: + pass + + +def create_user(first_name, last_name, name, username, email, password): + """ + mesma ideia do de cima, mas aqui pro user. + """ + try: + u = User.objects.create_user( + first_name=first_name, + last_name=last_name, + name=name, + username=username, + email=email, + password=password, + birthday='1998-04-05', + telephone='(22)22222-2222', + gender='M', + created_at='2018-04-05', + updated_at='2018-04-05', + is_active=True, + ) + """ + O EmailAdress é pra poder confirmar o email aqui na criação. Sem isso + você precisa confimar o email manualmente + """ + EmailAddress.objects.create( + user=u, email=email, + primary=True, verified=True) + + u.set_password(password) + u.save() + + print ('Criando usuário - {0} {1}'.format(str(u.first_name), str(u.last_name))) + return u + except IntegrityError: + pass + +def populate(): + + print ('\n----------------------') + print ('Populating Database...') + print ('----------------------\n') + + create_super_user('admin', 'admin@admin.com', 'senhafacil') + + user_employee = create_user( + 'Pedro', + 'Victor', + 'Pedro', + 'pedro', + 'pedro@gmail.com', + 'pedro123456', + ) + + user_patient = create_user( + 'Enzo', + 'Gabriel', + 'Enzo', + 'enzo', + 'enzo@gmail.com', + 'enzo123456', + + ) + + user_responsible = create_user( + 'Maria', + 'Joaquina', + 'Maria', + 'maria', + 'maria@gmail.com', + 'maria123456', + ) + + user_healthteam = create_user( + 'Laura', + 'Nsei', + 'Laura', + 'laura', + 'laura@gmail.com', + 'laura123456', + ) + + user_patient_with_responsible = create_user( + 'Huiller', + 'Victor', + 'Huiller', + 'huiller', + 'huiller@gmail.com', + 'huiller123456', + ) + + user_test = create_user( + 'teste', + 'teste', + 'teste', + 'teste', + 'teste@gmail.com', + 'teste123456', + ) + + Employee.objects.create( + cpf="974.220.200-16", + user=user_employee, + departament=Employee.ADMINISTRATION + ) + + HealthTeam.objects.create( + cpf="057.641.271-65", + user=user_healthteam, + speciality=HealthTeam.NEUROLOGY, + council_acronym=HealthTeam.CRM, + register_number="1234567", + registration_state=HealthTeam.DF, + ) + + Patient.objects.create( + ses="1234567", + user=user_patient, + priority=1, + mother_name="Mãe", + father_name="Pai", + ethnicity=3, + sus_number="12345678911", + civil_registry_of_birth="12345678911", + declaration_of_live_birth="12345678911" + ) + + responsible = Responsible.objects.create( + cpf="914.479.730-38", + user=user_responsible + ) + + Patient.objects.create( + ses="1234568", + user=user_patient_with_responsible, + responsible=responsible, + priority=1, + mother_name="Mãe", + father_name="Pai", + ethnicity=3, + sus_number="12345678912", + civil_registry_of_birth="12345678912", + declaration_of_live_birth="12345678912" + ) + + category1 = Category.objects.create( + name='Medicamentos', + description='Fórum de discussão sobre medicamentos', + slug='med', + + ) + + category2 = Category.objects.create( + name='Espaço dos pais', + description='Um lugar para os pais discutirem e trocarem infrmações', + slug='event', + ) + + + print ('------------------------------\n') + print ('Database populated with sucess') + print ('------------------------------\n') + + + +import django + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') +django.setup() +from drdown.users.models.model_employee import Employee +from drdown.users.models.model_responsible import Responsible +from drdown.users.models.model_health_team import HealthTeam +from drdown.users.models.model_user import User +from drdown.users.models.model_patient import Patient +from drdown.forum.models.model_category import Category +from django.db import IntegrityError +import allauth.app_settings +from allauth.account.models import EmailAddress + +populate() From 7491f33f627b6191fc365afe3b15ac20d6668a15 Mon Sep 17 00:00:00 2001 From: Elias Bernardo Date: Sat, 12 May 2018 18:42:49 -0300 Subject: [PATCH 02/48] Adding populate to Makefile Adding 'make populete' to the list of commands Co-authored-by: Geovana Ramos --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 07c37205..5c5aa6eb 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,10 @@ sql: manage.py # Show SQL commands sudo docker-compose -f ${file} run --rm ${container} python manage.py sqlmigrate ${app_label} ${migration_name} +populate: manage.py + # Populate the database + sudo docker-compose -f ${file} run --rm ${container} python utility/populate.py + # TESTS -------------------------------------------------------- local := "**/tests/" From 6cb12f55ced43e2802d7b5a1a696985fee586dc6 Mon Sep 17 00:00:00 2001 From: Elias Bernardo Date: Sat, 12 May 2018 19:06:01 -0300 Subject: [PATCH 03/48] The password is now created randomly and displayed in the terminal Addint create_password() function in populate.py Co-authored-by: Geovana Ramos --- utility/populate.py | 71 +++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/utility/populate.py b/utility/populate.py index b57dd7b6..8bd1ed3b 100644 --- a/utility/populate.py +++ b/utility/populate.py @@ -1,30 +1,54 @@ import os.path import sys +import random +import string + sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -def create_super_user(username, email, password): +def create_password(): + ''' + Generates random passwords for each user + ''' + + password = ''.join(random.choice(string.ascii_uppercase + + string.ascii_lowercase + + string.digits) for _ in range(9) + ) + return password + + +def create_super_user(username, email): ''' - o try/except é pra garantir que crie um super_user e no caso de erro você saiba + Creates the superuser and ensures that if any error occurs the + script does not continue ''' + + password = create_password() try: - u = User.objects.create_superuser(username, email, password,is_active = True) + u = User.objects.create_superuser(username, + email, + password, + is_active=True) EmailAddress.objects.create( user=u, email=email, primary=True, verified=True) u.set_password(password) u.save() print ('\nSuperUser:', User.objects.get(is_superuser=True).username) + print('username: {0} -- password: {1} \n'. format(username, password)) return u except IntegrityError: - pass + raise ValidationError("An error occurred. Stopping the script") -def create_user(first_name, last_name, name, username, email, password): +def create_user(first_name, last_name, name, username, email, birthday): """ - mesma ideia do de cima, mas aqui pro user. + Creates the user and ensures that if any error occurs the + script does not continue """ + password = create_password() try: u = User.objects.create_user( first_name=first_name, @@ -40,21 +64,21 @@ def create_user(first_name, last_name, name, username, email, password): updated_at='2018-04-05', is_active=True, ) - """ - O EmailAdress é pra poder confirmar o email aqui na criação. Sem isso - você precisa confimar o email manualmente - """ + + # EmailAdress is for validating email confirmation on user creation EmailAddress.objects.create( user=u, email=email, primary=True, verified=True) - - u.set_password(password) u.save() - print ('Criando usuário - {0} {1}'.format(str(u.first_name), str(u.last_name))) + print('User: - {0} {1}'. + format(str(u.first_name), str(u.last_name))) + print('username: {0} -- password: {1} \n'. format(username, password)) + return u except IntegrityError: - pass + raise ValidationError("An error occurred. Stopping the script") + def populate(): @@ -62,7 +86,7 @@ def populate(): print ('Populating Database...') print ('----------------------\n') - create_super_user('admin', 'admin@admin.com', 'senhafacil') + create_super_user('admin', 'admin@admin.com') user_employee = create_user( 'Pedro', @@ -70,7 +94,7 @@ def populate(): 'Pedro', 'pedro', 'pedro@gmail.com', - 'pedro123456', + '1998-04-05', ) user_patient = create_user( @@ -79,8 +103,7 @@ def populate(): 'Enzo', 'enzo', 'enzo@gmail.com', - 'enzo123456', - + '1998-04-05', ) user_responsible = create_user( @@ -89,7 +112,7 @@ def populate(): 'Maria', 'maria', 'maria@gmail.com', - 'maria123456', + '1998-04-05', ) user_healthteam = create_user( @@ -98,7 +121,7 @@ def populate(): 'Laura', 'laura', 'laura@gmail.com', - 'laura123456', + '1998-04-05', ) user_patient_with_responsible = create_user( @@ -107,7 +130,7 @@ def populate(): 'Huiller', 'huiller', 'huiller@gmail.com', - 'huiller123456', + '1998-04-05', ) user_test = create_user( @@ -116,7 +139,7 @@ def populate(): 'teste', 'teste', 'teste@gmail.com', - 'teste123456', + '1998-04-05', ) Employee.objects.create( @@ -177,13 +200,11 @@ def populate(): slug='event', ) - print ('------------------------------\n') print ('Database populated with sucess') print ('------------------------------\n') - import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') @@ -194,8 +215,8 @@ def populate(): from drdown.users.models.model_user import User from drdown.users.models.model_patient import Patient from drdown.forum.models.model_category import Category +from django.core.exceptions import ValidationError from django.db import IntegrityError -import allauth.app_settings from allauth.account.models import EmailAddress populate() From 27767ce2ed1834219f6afa26b6276a08b1ba206f Mon Sep 17 00:00:00 2001 From: Elias Bernardo Date: Sat, 12 May 2018 21:27:12 -0300 Subject: [PATCH 04/48] Adding new users and methods in populate.py script Adding create user, patient, healthteam, responsible and employee methods Adding all necessary users Adding required posts to forum Co-authored-by: Geovana Ramos --- utility/populate.py | 317 +++++++++++++++++++++++++++++++++----------- 1 file changed, 240 insertions(+), 77 deletions(-) diff --git a/utility/populate.py b/utility/populate.py index 8bd1ed3b..f5364b53 100644 --- a/utility/populate.py +++ b/utility/populate.py @@ -36,14 +36,15 @@ def create_super_user(username, email): u.set_password(password) u.save() print ('\nSuperUser:', User.objects.get(is_superuser=True).username) - print('username: {0} -- password: {1} \n'. format(username, password)) + print('username: {0} -- password: {1} \n'.format(username, password)) return u + except IntegrityError: raise ValidationError("An error occurred. Stopping the script") -def create_user(first_name, last_name, name, username, email, birthday): +def create_user(first_name, last_name, name, username, email, birthday, gender): """ Creates the user and ensures that if any error occurs the script does not continue @@ -57,9 +58,9 @@ def create_user(first_name, last_name, name, username, email, birthday): username=username, email=email, password=password, - birthday='1998-04-05', + birthday=birthday, telephone='(22)22222-2222', - gender='M', + gender=gender, created_at='2018-04-05', updated_at='2018-04-05', is_active=True, @@ -73,9 +74,68 @@ def create_user(first_name, last_name, name, username, email, birthday): print('User: - {0} {1}'. format(str(u.first_name), str(u.last_name))) - print('username: {0} -- password: {1} \n'. format(username, password)) + print('username: {0} -- password: {1} \n'.format(username, password)) return u + + except IntegrityError: + raise ValidationError("An error occurred. Stopping the script") + + +def create_patient(user, n, responsible): + + try: + Patient.objects.create( + ses='11234561'+str(n), + user=user, + priority=1, + mother_name="Janaína Roussef", + father_name="João das neves", + ethnicity=3, + sus_number='1234567891'+str(n), + civil_registry_of_birth='1234567891'+str(n), + declaration_of_live_birth='1234567891'+str(n), + responsible=responsible + ) + + except IntegrityError: + raise ValidationError("An error occurred. Stopping the script") + + +def create_healthteam(user, n, cpf): + try: + HealthTeam.objects.create( + cpf=cpf, + user=user, + speciality=HealthTeam.NEUROLOGY, + council_acronym=HealthTeam.CRM, + register_number='123456'+str(n), + registration_state=HealthTeam.DF, + ) + except IntegrityError: + raise ValidationError("An error occurred. Stopping the script") + + +def create_responsible(user, cpf): + try: + responsible = Responsible.objects.create( + cpf=cpf, + user=user + ) + return responsible + + except IntegrityError: + raise ValidationError("An error occurred. Stopping the script") + + +def create_employee(user, cpf): + + try: + Employee.objects.create( + cpf=cpf, + user=user, + departament=Employee.ADMINISTRATION + ) except IntegrityError: raise ValidationError("An error occurred. Stopping the script") @@ -88,110 +148,179 @@ def populate(): create_super_user('admin', 'admin@admin.com') - user_employee = create_user( - 'Pedro', - 'Victor', - 'Pedro', - 'pedro', - 'pedro@gmail.com', + print ('\n------------------------') + print ('Creating Health Teams...') + print ('------------------------\n') + + healthteam_1 = create_user( + 'Laura', + 'Oliveira', + 'Laura', + 'laura', + 'laura@email.com', '1998-04-05', + 'F' ) - user_patient = create_user( - 'Enzo', - 'Gabriel', - 'Enzo', - 'enzo', - 'enzo@gmail.com', + healthteam_2 = create_user( + 'Maura', + 'Oliveira', + 'Maura', + 'maura', + 'maura@email.com', '1998-04-05', + 'F' ) - user_responsible = create_user( - 'Maria', - 'Joaquina', - 'Maria', - 'maria', - 'maria@gmail.com', + healthteam_3 = create_user( + 'Sara', + 'Oliveira', + 'Sara', + 'sara', + 'sara@email.com', '1998-04-05', + 'F' ) - user_healthteam = create_user( - 'Laura', - 'Nsei', - 'Laura', - 'laura', - 'laura@gmail.com', + create_healthteam(healthteam_1, 1, '326.763.330-38') + create_healthteam(healthteam_2, 2, '875.076.060-23') + create_healthteam(healthteam_3, 3, '452.347.400-13') + + print ('\n------------------------') + print ('Creating Responsibles...') + print ('------------------------\n') + + responsible_1 = create_user( + 'José', + 'Vaz', + 'José', + 'jose', + 'jose@email.com', '1998-04-05', + 'M' ) - user_patient_with_responsible = create_user( - 'Huiller', - 'Victor', - 'Huiller', - 'huiller', - 'huiller@gmail.com', + responsible_2 = create_user( + 'Ana', + 'Vitória', + 'Ana', + 'ana', + 'ana@email.com', '1998-04-05', + 'F' ) - user_test = create_user( - 'teste', - 'teste', - 'teste', - 'teste', - 'teste@gmail.com', + responsible_3 = create_user( + 'Júlio', + 'Tavares', + 'Júlio', + 'julio', + 'julio@email.com', '1998-04-05', + 'M' ) - Employee.objects.create( - cpf="974.220.200-16", - user=user_employee, - departament=Employee.ADMINISTRATION + responsible1 = create_responsible(responsible_1, "902.876.510-70") + responsible2 = create_responsible(responsible_2, "715.643.220-68") + responsible3 = create_responsible(responsible_3, "445.821.390-35") + + print ('\n----------------------') + print ('Creating Patients...') + print ('----------------------\n') + + print ('(Minnor)') + patient_3 = create_user( + 'Enzo', + 'Gabriel', + 'Enzo', + 'enzo', + 'enzo@email.com', + timezone.now() - timezone.timedelta(days=3650), + 'M', ) - HealthTeam.objects.create( - cpf="057.641.271-65", - user=user_healthteam, - speciality=HealthTeam.NEUROLOGY, - council_acronym=HealthTeam.CRM, - register_number="1234567", - registration_state=HealthTeam.DF, + print ('(Minnor)') + patient_4 = create_user( + 'Valentina', + 'Valente', + 'Valentina', + 'valentina', + 'valentina@email.com', + timezone.now() - timezone.timedelta(days=1), + 'F' ) - Patient.objects.create( - ses="1234567", - user=user_patient, - priority=1, - mother_name="Mãe", - father_name="Pai", - ethnicity=3, - sus_number="12345678911", - civil_registry_of_birth="12345678911", - declaration_of_live_birth="12345678911" + print ('(18+)') + patient_1 = create_user( + 'Gabriel', + 'dos Santos', + 'Gabriel', + 'gabriel', + 'gabriel@email.com', + '1998-04-05', + 'M' ) - responsible = Responsible.objects.create( - cpf="914.479.730-38", - user=user_responsible + print ('(18+)') + patient_2 = create_user( + 'Carla', + 'Júlia', + 'Carla', + 'carla', + 'carla@email.com', + '1998-04-05', + 'F' ) - Patient.objects.create( - ses="1234568", - user=user_patient_with_responsible, - responsible=responsible, - priority=1, - mother_name="Mãe", - father_name="Pai", - ethnicity=3, - sus_number="12345678912", - civil_registry_of_birth="12345678912", - declaration_of_live_birth="12345678912" + create_patient(patient_3, 3, responsible1) + create_patient(patient_4, 4, responsible2) + create_patient(patient_1, 1, None) + create_patient(patient_2, 2, None) + + print ('\n------------------------') + print ('Creating Employees...') + print ('------------------------\n') + + employee_1 = create_user( + 'Pedro', + 'Victor', + 'Pedro', + 'pedro', + 'pedro@email.com', + '1998-04-05', + 'M' + ) + + employee_2 = create_user( + 'Raíssa', + 'Parente', + 'Raíssa', + 'raissa', + 'raissa@email.com', + '1998-04-05', + 'F' ) + create_employee(employee_1, "112.954.800-77") + create_employee(employee_2, "832.164.830-45") + category1 = Category.objects.create( name='Medicamentos', description='Fórum de discussão sobre medicamentos', slug='med', + ) + + post1 = Post.objects.create( + title="Qual medicamento tomar?", + message="Tenho dores de cabeça", + created_by=patient_1, + category=category1, + ) + Commentary.objects.create( + message='Gostaria de saber também', + post=post1, + created_by=patient_2, ) category2 = Category.objects.create( @@ -200,21 +329,55 @@ def populate(): slug='event', ) + post2 = Post.objects.create( + title="Meu filho não tá legal", + message="Ele não fala com ninguém. É normal?", + created_by=responsible_1, + category=category2, + ) + + Commentary.objects.create( + message='O meu conversa com os amigos normalmente. Veja com um médico.', + post=post2, + created_by=responsible_2, + ) + + category3 = Category.objects.create( + name='Dúvidas', + description='Espaço de dúvidas', + slug='event', + ) + + post3 = Post.objects.create( + title="Onde achar um bom site sobre SD?", + message="Gostaria de achar um site muito bom sobre SD", + created_by=employee_1, + category=category3, + ) + + Commentary.objects.create( + message='Você está nele :D', + post=post3, + created_by=employee_2, + ) + print ('------------------------------\n') print ('Database populated with sucess') print ('------------------------------\n') - import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') django.setup() +from django.utils import timezone from drdown.users.models.model_employee import Employee from drdown.users.models.model_responsible import Responsible from drdown.users.models.model_health_team import HealthTeam from drdown.users.models.model_user import User from drdown.users.models.model_patient import Patient from drdown.forum.models.model_category import Category +from drdown.forum.models.model_post import Post +from drdown.forum.models.model_commentary import Commentary from django.core.exceptions import ValidationError from django.db import IntegrityError from allauth.account.models import EmailAddress From e6395e459b4a5b940abc10df4607d20362fc6001 Mon Sep 17 00:00:00 2001 From: Elias Bernardo Date: Sat, 12 May 2018 21:41:29 -0300 Subject: [PATCH 05/48] Adding Confirmation Text to the User and fixing Forum template Adding a condition for displaying the return button in forum categories Adding a warning text and a input Co-authored-by: Geovana Ramos --- drdown/forum/templates/forum/category_list.html | 4 +++- utility/populate.py | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drdown/forum/templates/forum/category_list.html b/drdown/forum/templates/forum/category_list.html index 60ea288a..c015cf2e 100644 --- a/drdown/forum/templates/forum/category_list.html +++ b/drdown/forum/templates/forum/category_list.html @@ -9,10 +9,12 @@

{% trans "Categories" %}

+ {% if user.is_authenticated %} {% trans 'Return' %} + {% endif %}
- +
{% for category in category_list %} diff --git a/utility/populate.py b/utility/populate.py index f5364b53..261ea56a 100644 --- a/utility/populate.py +++ b/utility/populate.py @@ -361,7 +361,18 @@ def populate(): created_by=employee_2, ) - print ('------------------------------\n') + print ('================================================================') + print ('WARNING:\n') + print ('All passwords displayed on this terminal ' + 'are generated randomly\n and can not be ' + 'displayed again. Be sure to save them in ' + 'a safe \nplace before continuing, otherwise' + 'you will have to redo the whole\n process.') + print ('================================================================\n') + + input("I saved the passwords in a safe place (press enter to continue...)") + + print ('\n------------------------------\n') print ('Database populated with sucess') print ('------------------------------\n') From 58d4974c97623ae2b820161cdd843f85273e393b Mon Sep 17 00:00:00 2001 From: Daniel Maike Date: Mon, 14 May 2018 13:32:38 -0300 Subject: [PATCH 06/48] Placing schedule of vaccine in tabs Creating tab of "of birth to the 6 years old" Creating tab of "From 9 years old" Co-authored-by: Gabriela Medeiros --- .../core/templates/core/vaccine_schedule.html | 751 +++++++++--------- 1 file changed, 384 insertions(+), 367 deletions(-) diff --git a/drdown/core/templates/core/vaccine_schedule.html b/drdown/core/templates/core/vaccine_schedule.html index 5dcf4108..573afafc 100644 --- a/drdown/core/templates/core/vaccine_schedule.html +++ b/drdown/core/templates/core/vaccine_schedule.html @@ -16,379 +16,396 @@ {% block content %}






+

{% trans "Vaccine Schedule" %}

{% trans "Vaccination Locations" %}
-
- - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

{% trans 'Vaccines'%}

{% trans 'OF BIRTH TO THE 6 YEARS OF AGE'%}
{% trans 'At Birth'%}{% trans '1 Month'%}{% trans '2 Months'%}{% trans '3 Months'%}{% trans '4 Months'%}{% trans '5 Months'%}{% trans '6 Months'%}{% trans '7 Months'%}{% trans '8 Months'%}{% trans '9 Months'%}{% trans '12 Months'%}{% trans '15 Months'%}{% trans '18 Months'%}{% trans '24 Months'%}{% trans '4 Years'%}{% trans '5 Years'%}{% trans '6 Years'%}
{% trans 'BCG ID'%}{% trans 'One dose'%}{% trans 'Vaccinate the previously unvaccinated'%}{% trans 'Vaccinate people who contacted leprosy'%}
{% trans 'Hepatitis B'%}{% trans 'Three or four doses from birth'%}{% trans 'Vaccinate the previously unvaccinated'%}
{% trans 'Rotavirus'%}{% trans 'Two or three doses. Initiate vaccination before 15 weeks of age'%}{% trans 'CONTRAINDICATED'%}
{% trans 'Bacterial triple (DTPw, DTPa, ou dTpa)'%}{% trans 'Four doses of DTPa or DTPw starting at 2 months of age'%}{% trans 'Reinforcement with DTPa, DTPw or dTpa'%}
{% trans 'Haemophilus influenzae type b'%}{% trans 'Four doses starting at 2 months of age'%}{% trans 'Vaccinate the previously unvaccinated'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Poliomyelitis (inactivated virus)'%}{% trans 'Five doses starting at 2 months of age'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Pneumococcal conjugate'%}{% trans 'Four doses starting at 2 months of age - VPC10 or VPC13'%}{% trans 'VPC10 or VPC13 - Vaccinate the previously unvaccinated'%}{% trans 'PCV13: vaccinating people in special risk situations'%}
{% trans 'Meningococcal conjugate C or ACWY'%}{% trans 'With menACWY: three doses beginning at 3 months of age. Or with menC: two doses beginning at 3 months of age'%}{% trans 'REINFORCEMENT'%}{% trans 'REINFORCEMENT'%}
{% trans 'Meningococcal B'%}{% trans 'Three doses beginning at 3 months of age'%}{% trans 'REINFORCEMENT'%}{% trans 'For those not previously vaccinated: two doses'%}
{% trans 'Oral poliomyelitis (live attenuated virus)'%}{% trans 'NATIONAL VACCINATION CAMPAIGNS'%}
{% trans 'Influenza (flu)'%}{% trans 'ANNUAL VACCINATION'%}
{% trans 'Yellow fever'%}{% trans 'IN REGIONS WITH RECOMMENDATION OF VACCINATION (ACCORDING TO CLASSIFICATION OF MS) - single dose at 9 months of age. Not previously vaccinated: single dose'%}
{% trans 'Viral triple (measles, mumps and rubella)'%}{% trans 'Two doses after 12 months'%}{% trans 'Vaccinate the previously unvaccinated'%}
{% trans 'Varicella (chickenpox)'%}{% trans 'Two doses after 12 months'%}{% trans 'Vaccinate previously unvaccinated susceptibles'%}
{% trans 'Hepatitis A'%}{% trans 'Two doses after 12 months'%}{% trans 'Vaccinate the previously unvaccinated'%}
{% trans 'Pneumococcal 23 courageous'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Dengue'%}{% trans 'CONTRAINDICATED'%}

{% trans 'Vaccines'%}

{% trans 'At Birth'%}{% trans '1 Month'%}{% trans '2 Months'%}{% trans '3 Months'%}{% trans '4 Months'%}{% trans '5 Months'%}{% trans '6 Months'%}{% trans '7 Months'%}{% trans '8 Months'%}{% trans '9 Months'%}{% trans '12 Months'%}{% trans '15 Months'%}{% trans '18 Months'%}{% trans '24 Months'%}{% trans '4 Years'%}{% trans '5 Years'%}{% trans '6 Years'%}
{% trans 'OF BIRTH TO THE 6 YEARS OF AGE'%}
{% trans 'Subtitle: '%}
{% trans 'Routine'%}
{% trans 'Vaccinate Unvaccinated'%}
{% trans 'Special Situations'%}
{% trans 'Contraindicated'%}
-
-

- -
- - - - - - - - - +

{% trans 'Vaccines'%}

{% trans '9 TO 10 YEARS OLD'%}{% trans 'ADOLESCENT'%}{% trans 'ADULT'%}{% trans 'OLD MAN'%}
+ + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

{% trans 'Vaccines'%}

{% trans 'OF BIRTH TO THE 6 YEARS OF AGE'%}
{% trans 'At Birth'%}{% trans '1 Month'%}{% trans '2 Months'%}{% trans '3 Months'%}{% trans '4 Months'%}{% trans '5 Months'%}{% trans '6 Months'%}{% trans '7 Months'%}{% trans '8 Months'%}{% trans '9 Months'%}{% trans '12 Months'%}{% trans '15 Months'%}{% trans '18 Months'%}{% trans '24 Months'%}{% trans '4 Years'%}{% trans '5 Years'%}{% trans '6 Years'%}
{% trans '9 Years'%}{% trans '10 Years'%}{% trans '11-19 Years'%}{% trans '20-59 Years'%}{% trans '60+ Years'%}
{% trans 'BCG ID'%}{% trans 'Vaccinate people who contacted leprosy'%}
{% trans 'Hepatitis B'%}{% trans 'Vaccinate the previously unvaccinated'%}
{% trans 'Rotavirus'%}{% trans 'CONTRAINDICATED'%}
{% trans 'Bacterial triple (DTPw, DTPa, ou dTpa)'%}{% trans 'Reinforcement with dTpa from 9 years of age and every 10 years (or, in the case of dTpa, do dT)'%}{% trans 'Reinforcement with dTpa from 9 years of age and every 10 years (or, in the case of dTpa, do dT)'%}
{% trans 'Haemophilus influenzae type b'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Poliomyelitis (inactivated virus)'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Pneumococcal conjugate'%}{% trans 'PCV13: vaccinating people in special risk situations'%}{% trans 'VPC13: one dose'%}
{% trans 'Meningococcal conjugate C or ACWY'%}{% trans 'REINFORCED at age 11. For those not previously vaccinated: two doses'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Meningococcal B'%}{% trans 'For those not previously vaccinated: two doses'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Influenza (flu)'%}{% trans 'ANNUAL VACCINATION'%}
{% trans 'Yellow fever'%}{% trans 'IN REGIONS WITH RECOMMENDATION OF VACCINATION (ACCORDING TO CLASSIFICATION OF MS) - single dose at 9 months of age. Not previously vaccinated: single dose'%}
{% trans 'Viral triple (measles, mumps and rubella)'%}{% trans 'Vaccinate the previously unvaccinated'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'Varicella (chickenpox)'%}{% trans 'Vaccinate previously unvaccinated susceptibles'%}
{% trans 'Hepatitis A'%}{% trans 'Vaccinate the previously unvaccinated'%}{% trans 'Vaccinate people in special risk situations'%}
{% trans 'HPV'%}{% trans 'Three doses for girls and boys'%}{% trans 'Vaccinate the previously unvaccinated'%}{% trans 'Vaccinate the non-vaccinated formerly: at the discretion of the physician'%}
{% trans 'Pneumococcal 23 courageous'%}{% trans 'Vaccinate people in special risk situations'%}{% trans 'Two doses at five-year intervals'%}
{% trans 'Herpes zoster'%}{% trans 'From 50 to 59 years old: at medical discretion'%}{% trans 'One dose'%}
{% trans 'Dengue'%}{% trans 'To vaccinate people aged 9 to 45 years previously infected with the virus (seropositive) with three doses: 0 - 6 - 12 months'%}{% trans 'CONTRAINDICATED'%}

{% trans 'Vaccines'%}

{% trans '9 Years'%}{% trans '10 Years'%}{% trans '11-19 Years'%}{% trans '20-59 Years'%}{% trans '60+ Years'%}
{% trans '9 TO 10 YEARS OLD'%}{% trans 'ADOLESCENT'%}{% trans 'ADULT'%}{% trans 'OLD MAN'%}
+ + + + + {% trans 'BCG ID'%} + {% trans 'One dose'%} + {% trans 'Vaccinate the previously unvaccinated'%} + {% trans 'Vaccinate people who contacted leprosy'%} + + + {% trans 'Hepatitis B'%} + {% trans 'Three or four doses from birth'%} + {% trans 'Vaccinate the previously unvaccinated'%} + + + {% trans 'Rotavirus'%} + + + {% trans 'Two or three doses. Initiate vaccination before 15 weeks of age'%} + {% trans 'CONTRAINDICATED'%} + + + {% trans 'Bacterial triple (DTPw, DTPa, ou dTpa)'%} + + + {% trans 'Four doses of DTPa or DTPw starting at 2 months of age'%} + + {% trans 'Reinforcement with DTPa, DTPw or dTpa'%} + + + + {% trans 'Haemophilus influenzae type b'%} + + + {% trans 'Four doses starting at 2 months of age'%} + {% trans 'Vaccinate the previously unvaccinated'%} + {% trans 'Vaccinate people in special risk situations'%} + + + {% trans 'Poliomyelitis (inactivated virus)'%} + + + {% trans 'Five doses starting at 2 months of age'%} + {% trans 'Vaccinate people in special risk situations'%} + + + {% trans 'Pneumococcal conjugate'%} + + + {% trans 'Four doses starting at 2 months of age - VPC10 or VPC13'%} + {% trans 'VPC10 or VPC13 - Vaccinate the previously unvaccinated'%} + {% trans 'PCV13: vaccinating people in special risk situations'%} + + + {% trans 'Meningococcal conjugate C or ACWY'%} + + + + {% trans 'With menACWY: three doses beginning at 3 months of age. Or with menC: two doses beginning at 3 months of age'%} + {% trans 'REINFORCEMENT'%} + + {% trans 'REINFORCEMENT'%} + + + {% trans 'Meningococcal B'%} + + + + {% trans 'Three doses beginning at 3 months of age'%} + {% trans 'REINFORCEMENT'%} + {% trans 'For those not previously vaccinated: two doses'%} + + + {% trans 'Oral poliomyelitis (live attenuated virus)'%} + + + + + + + + {% trans 'NATIONAL VACCINATION CAMPAIGNS'%} + + + + {% trans 'Influenza (flu)'%} + + + + + + + {% trans 'ANNUAL VACCINATION'%} + + + {% trans 'Yellow fever'%} + + + + + + + + + + {% trans 'IN REGIONS WITH RECOMMENDATION OF VACCINATION (ACCORDING TO CLASSIFICATION OF MS) - single dose at 9 months of age. Not previously vaccinated: single dose'%} + + + {% trans 'Viral triple (measles, mumps and rubella)'%} + + + + + + + + + + + {% trans 'Two doses after 12 months'%} + {% trans 'Vaccinate the previously unvaccinated'%} + + + {% trans 'Varicella (chickenpox)'%} + + + + + + + + + + + {% trans 'Two doses after 12 months'%} + {% trans 'Vaccinate previously unvaccinated susceptibles'%} + + + {% trans 'Hepatitis A'%} + + + + + + + + + + + {% trans 'Two doses after 12 months'%} + {% trans 'Vaccinate the previously unvaccinated'%} + + + {% trans 'Pneumococcal 23 courageous'%} + + + + + + + + + + + + + + {% trans 'Vaccinate people in special risk situations'%} + + + {% trans 'Dengue'%} + {% trans 'CONTRAINDICATED'%} + + + + +

{% trans 'Vaccines'%}

+ {% trans 'At Birth'%} + {% trans '1 Month'%} + {% trans '2 Months'%} + {% trans '3 Months'%} + {% trans '4 Months'%} + {% trans '5 Months'%} + {% trans '6 Months'%} + {% trans '7 Months'%} + {% trans '8 Months'%} + {% trans '9 Months'%} + {% trans '12 Months'%} + {% trans '15 Months'%} + {% trans '18 Months'%} + {% trans '24 Months'%} + {% trans '4 Years'%} + {% trans '5 Years'%} + {% trans '6 Years'%} + + + {% trans 'OF BIRTH TO THE 6 YEARS OF AGE'%} + + + +
{% trans 'Subtitle: '%}
+ +
{% trans 'Routine'%}
+ +
{% trans 'Vaccinate Unvaccinated'%}
+ +
{% trans 'Special Situations'%}
+ +
{% trans 'Contraindicated'%}
+ + +
+
+ + -

+ +

{% endblock content %} From 5fa50e54c1f67f87ea14711bb6704a79fc014011 Mon Sep 17 00:00:00 2001 From: Daniel Maike Date: Mon, 14 May 2018 13:42:41 -0300 Subject: [PATCH 07/48] Changing text-colors of tab texts Co-authored-by: Gabriela Medeiros --- .../core/templates/core/vaccine_schedule.html | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drdown/core/templates/core/vaccine_schedule.html b/drdown/core/templates/core/vaccine_schedule.html index 573afafc..4d85100f 100644 --- a/drdown/core/templates/core/vaccine_schedule.html +++ b/drdown/core/templates/core/vaccine_schedule.html @@ -15,16 +15,16 @@ {% block content %} -






- -

{% trans "Vaccine Schedule" %}

- {% trans "Vaccination Locations" %} -
+






+ +

{% trans "Vaccine Schedule" %}

+{% trans "Vaccination Locations" %} +
@@ -257,17 +257,6 @@ {% trans 'OF BIRTH TO THE 6 YEARS OF AGE'%} - -
{% trans 'Subtitle: '%}
- -
{% trans 'Routine'%}
- -
{% trans 'Vaccinate Unvaccinated'%}
- -
{% trans 'Special Situations'%}
- -
{% trans 'Contraindicated'%}
- From e885dcd1c0927b0b82143fd4747e9e54b6dfc763 Mon Sep 17 00:00:00 2001 From: guilherme1guy Date: Mon, 14 May 2018 14:51:05 -0300 Subject: [PATCH 08/48] Changes in model Removing model specific exams Making changes in model exams Co-authored-by: joberth rogers --- drdown/medicalrecords/admin.py | 2 - drdown/medicalrecords/forms/exam_forms.py | 2 +- .../forms/specific_exams_forms.py | 10 --- .../migrations/0004_auto_20180514_1749.py | 46 ++++++++++++++ drdown/medicalrecords/models/model_exams.py | 42 ++++++++----- .../models/model_specific_exams.py | 62 ------------------- drdown/medicalrecords/urls.py | 17 +---- drdown/medicalrecords/views/__init__.py | 1 - .../views/view_medical_record.py | 2 - .../views/view_specific_exams.py | 22 ------- 10 files changed, 73 insertions(+), 133 deletions(-) delete mode 100644 drdown/medicalrecords/forms/specific_exams_forms.py create mode 100644 drdown/medicalrecords/migrations/0004_auto_20180514_1749.py delete mode 100644 drdown/medicalrecords/models/model_specific_exams.py delete mode 100644 drdown/medicalrecords/views/view_specific_exams.py diff --git a/drdown/medicalrecords/admin.py b/drdown/medicalrecords/admin.py index fd590f7a..d3b179ec 100644 --- a/drdown/medicalrecords/admin.py +++ b/drdown/medicalrecords/admin.py @@ -2,13 +2,11 @@ from .models.model_medical_record import MedicalRecord from .models.model_static_data import StaticData from .models.model_medicines import Medicine -from .models.model_specific_exams import SpecificExam from .models.model_complaint import Complaint from .models.model_exams import Exam admin.site.register(MedicalRecord) admin.site.register(StaticData) admin.site.register(Medicine) -admin.site.register(SpecificExam) admin.site.register(Complaint) admin.site.register(Exam) diff --git a/drdown/medicalrecords/forms/exam_forms.py b/drdown/medicalrecords/forms/exam_forms.py index ff94375d..b286738e 100644 --- a/drdown/medicalrecords/forms/exam_forms.py +++ b/drdown/medicalrecords/forms/exam_forms.py @@ -6,4 +6,4 @@ class ExamForm(forms.ModelForm): class Meta: model = Exam - fields = ["file", "day", "status", "name"] + fields = ["file", "day", "category", "observations"] diff --git a/drdown/medicalrecords/forms/specific_exams_forms.py b/drdown/medicalrecords/forms/specific_exams_forms.py deleted file mode 100644 index 4b99d68f..00000000 --- a/drdown/medicalrecords/forms/specific_exams_forms.py +++ /dev/null @@ -1,10 +0,0 @@ -from drdown.medicalrecords.models.model_specific_exams import SpecificExam -from django import forms - - -class SpecificExamsForm(forms.ModelForm): - - class Meta: - model = SpecificExam - fields = ["structured_physical_exam", "vision", "ear", "hearth", - "muscle_skeletal_system", "nervous_system"] diff --git a/drdown/medicalrecords/migrations/0004_auto_20180514_1749.py b/drdown/medicalrecords/migrations/0004_auto_20180514_1749.py new file mode 100644 index 00000000..12e6d16b --- /dev/null +++ b/drdown/medicalrecords/migrations/0004_auto_20180514_1749.py @@ -0,0 +1,46 @@ +# Generated by Django 2.0.3 on 2018-05-14 17:49 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('medicalrecords', '0003_complaint_exam_medicine_specificexam_staticdata'), + ] + + operations = [ + migrations.RemoveField( + model_name='specificexam', + name='author', + ), + migrations.RemoveField( + model_name='specificexam', + name='patient', + ), + migrations.RemoveField( + model_name='exam', + name='author', + ), + migrations.RemoveField( + model_name='exam', + name='name', + ), + migrations.RemoveField( + model_name='exam', + name='status', + ), + migrations.AddField( + model_name='exam', + name='category', + field=models.IntegerField(choices=[(None, 'select a category'), (0, 'Others'), (1, 'Structured Physical Exam'), (2, 'Vision Exam'), (3, 'Ear Exam'), (4, 'Hearth Exam'), (5, 'Muscle skeletal system Exam'), (6, 'Nervous system Exam')], help_text='Please, insert the category of the exam', null=True, verbose_name='Category'), + ), + migrations.AddField( + model_name='exam', + name='observations', + field=models.CharField(blank=True, default='', max_length=200, verbose_name='Observations'), + ), + migrations.DeleteModel( + name='SpecificExam', + ), + ] diff --git a/drdown/medicalrecords/models/model_exams.py b/drdown/medicalrecords/models/model_exams.py index df02b6bc..4c843cec 100644 --- a/drdown/medicalrecords/models/model_exams.py +++ b/drdown/medicalrecords/models/model_exams.py @@ -22,31 +22,39 @@ class Exam(models.Model): help_text=_('Day the exam was performed'), ) - STATUS = ( - (3, _('Executed')), - (2, _('Collected')), - (1, _('Marked examination')), + CATEGORIES = ( + (None, _("select a category")), + (0, _("Others")), + (1, _('Structured Physical Exam')), + (2, _('Vision Exam')), + (3, _('Ear Exam')), + (4, _('Hearth Exam')), + (5, _('Muscle skeletal system Exam')), + (6, _('Nervous system Exam')), ) - status = models.IntegerField( - _('Status'), - choices=STATUS, - help_text=_("Please, insert the status of the exam"), + category = models.IntegerField( + _('Category'), + choices=CATEGORIES, + help_text=_("Please, insert the category of the exam"), + null=True, + blank=False, ) - name = models.CharField( - _('Exam Name'), - max_length=200 - ) - author = models.ForeignKey( - HealthTeam, - on_delete=models.CASCADE, - verbose_name=_("Author") + observations = models.CharField( + _('Observations'), + max_length=200, + blank=True, + default="" ) + def __str__(self): - return self.patient.user.get_username() + " - " + self.name + return ( + self.patient.user.get_username() + + " - " + self.get_category_display() + ) class Meta: verbose_name = _("Exam") diff --git a/drdown/medicalrecords/models/model_specific_exams.py b/drdown/medicalrecords/models/model_specific_exams.py deleted file mode 100644 index 034f796e..00000000 --- a/drdown/medicalrecords/models/model_specific_exams.py +++ /dev/null @@ -1,62 +0,0 @@ -from django.db import models -from drdown.users.models.model_health_team import HealthTeam -from drdown.users.models.model_patient import Patient -from django.utils.translation import ugettext_lazy as _ - - -class SpecificExam(models.Model): - - patient = models.OneToOneField( - Patient, - on_delete=models.CASCADE, - verbose_name=_('Patient') - ) - - structured_physical_exam = models.FileField( - upload_to='media/medicalrecords/specificexams', - blank=True, - verbose_name=_('Structured Physical Exam') - ) - - vision = models.FileField( - upload_to='media/medicalrecords/specificexams', - blank=True, - verbose_name=_('Vision Exam') - ) - - ear = models.FileField( - upload_to='media/medicalrecords/specificexams', - blank=True, - verbose_name=_('Ear Exam') - ) - - hearth = models.FileField( - upload_to='media/medicalrecords/specificexams', - blank=True, - verbose_name=_('Hearth Exam') - ) - - muscle_skeletal_system = models.FileField( - upload_to='media/medicalrecords/specificexams', - blank=True, - verbose_name=_('Muscle skeletal system Exam') - ) - - nervous_system = models.FileField( - upload_to='media/medicalrecords/specificexams', - blank=True, - verbose_name=_('Nervous system Exam') - ) - - author = models.ForeignKey( - HealthTeam, - on_delete=models.CASCADE, - verbose_name=_("Author") - ) - - def __str__(self): - return self.patient.user.get_username() - - class Meta: - verbose_name = _("Specific Exam") - verbose_name_plural = _("Specific Exams") diff --git a/drdown/medicalrecords/urls.py b/drdown/medicalrecords/urls.py index 6a2199cf..20fb2550 100644 --- a/drdown/medicalrecords/urls.py +++ b/drdown/medicalrecords/urls.py @@ -4,9 +4,8 @@ from drdown.medicalrecords.forms.static_data_forms import StaticDataForm from drdown.medicalrecords.forms.medicines_forms import MedicineForm from drdown.medicalrecords.forms.complaint_forms import ComplaintForm -from drdown.medicalrecords.forms.specific_exams_forms import SpecificExamsForm from drdown.medicalrecords.views import view_medical_record, view_static_data,\ - view_medicines, view_specific_exams, view_complaint, view_exams + view_medicines, view_complaint, view_exams app_name = 'medicalrecords' urlpatterns = [ @@ -37,13 +36,6 @@ name='create_medicine_medicalrecords' ), - url( - regex=r'^(?P[\w.@+-]+)/new-specific-exam/$', - view=view_specific_exams.SpecificExamCreateView.as_view( - form_class=SpecificExamsForm), - name='create_specific_exam_medicalrecords' - ), - url( regex=r'^(?P[\w.@+-]+)/new-complaint/$', view=view_complaint.ComplaintCreateView.as_view( @@ -58,13 +50,6 @@ name='create_exam_medicalrecords' ), - url( - regex=r'^(?P[\w.@+-]+)/update-exams/$', - view=view_specific_exams.SpecificExamUpdateView.as_view( - form_class=SpecificExamsForm), - name='update_exams_medicalrecords' - ), - url( regex=r'^(?P[\w.@+-]+)/update-static-data/$', view=view_static_data.StaticDataUpdateView.as_view( diff --git a/drdown/medicalrecords/views/__init__.py b/drdown/medicalrecords/views/__init__.py index ef0db865..e1007f12 100644 --- a/drdown/medicalrecords/views/__init__.py +++ b/drdown/medicalrecords/views/__init__.py @@ -3,7 +3,6 @@ view_complaint, view_exams, view_medicines, - view_specific_exams, view_static_data, views_base, ) diff --git a/drdown/medicalrecords/views/view_medical_record.py b/drdown/medicalrecords/views/view_medical_record.py index 4259ab8a..914d1454 100644 --- a/drdown/medicalrecords/views/view_medical_record.py +++ b/drdown/medicalrecords/views/view_medical_record.py @@ -1,7 +1,6 @@ from drdown.users.models.model_health_team import HealthTeam from ..models.model_medical_record import MedicalRecord from ..models.model_static_data import StaticData -from ..models.model_specific_exams import SpecificExam from ..models.model_medicines import Medicine from ..models.model_exams import Exam from ..models.model_complaint import Complaint @@ -64,7 +63,6 @@ def get_context_data(self, **kwargs): context['complaints'] = complaints context['exams'] = exams context['medicines'] = medicines - context['specificexams'] = specificexams context['staticdata'] = staticdata context['medicalrecordlist'] = context['object_list'] context['related_patient'] = patient diff --git a/drdown/medicalrecords/views/view_specific_exams.py b/drdown/medicalrecords/views/view_specific_exams.py deleted file mode 100644 index 0a9bc5ad..00000000 --- a/drdown/medicalrecords/views/view_specific_exams.py +++ /dev/null @@ -1,22 +0,0 @@ -from drdown.users.models.model_health_team import HealthTeam -from ..models.model_specific_exams import SpecificExam -from drdown.users.models.model_user import User -from drdown.users.models.model_patient import Patient -from django.views.generic import CreateView, UpdateView -from django.urls import reverse_lazy -from ..forms.specific_exams_forms import SpecificExamsForm -from ..views.views_base import BaseViewForm, BaseViewUrl - - -class SpecificExamCreateView(BaseViewForm, BaseViewUrl, CreateView): - model = SpecificExam - form_class = SpecificExamsForm - template_name = 'medicalrecords/medicalrecord_specific_exams_form.html' - - -class SpecificExamUpdateView(BaseViewUrl, UpdateView): - model = SpecificExam - form_class = SpecificExamsForm - template_name = 'medicalrecords/medicalrecord_specific_exams_form.html' - slug_url_kwarg = 'username' - slug_field = 'patient__user__username' From 7937d6c6f03d6d0e667a0603b317f4e023b98bfc Mon Sep 17 00:00:00 2001 From: Daniel Maike Date: Mon, 14 May 2018 15:04:57 -0300 Subject: [PATCH 09/48] Adding image to core Adding subtitle image to vaccine shedule Co-authored-by: Gabriela Medeiros --- drdown/core/static/core/images/Subtitle.png | Bin 0 -> 11167 bytes .../core/templates/core/vaccine_schedule.html | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 drdown/core/static/core/images/Subtitle.png diff --git a/drdown/core/static/core/images/Subtitle.png b/drdown/core/static/core/images/Subtitle.png new file mode 100644 index 0000000000000000000000000000000000000000..f7f76fc1e739d32dbe8c8ca84b27267ed6d64856 GIT binary patch literal 11167 zcmd6N^+S|h&^DcduyliTN(e}IigYcFfRwa!Hz>lA5|Yy0Eg_wfi!6q4*WuN z(^QZ~s2r#K34B4ZmU=0LfKU^MePfOae8+TF1iK+1;P$|O5C@!!f#vMalw_r}y-fBq zeIYutU$(b9uUU%N(nR=_Dz~dNYt>f?lezegf{{%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H)7FORs@;~;^}8XGi@inQunC zn0q50cspK~4f6#!b4Ij6xee$|2d4Gq)#Z=E^*rCI^IOIw$nBRKF6f%*YU*e-+xCt2 zEY01tA0~Kue!6z@?L6LGtLu3FmY56TS8)$o+%-P_F?=FTXtL0f4x_V3;;^%J@bv{N z*;=`{Yy)ID@!PEbCCjb6-3FLAH|GtBF2NgjBCpqV2R<#n%LAx#Zvg5>jLtu5#ZavW zcYOPCKZU=){}|^8ImwtBROh2k$_tqX{$V&0OFuX=MuQ<==hb)8Qd?W2dKL{mJzX&4 z%T**G(8XXANO?_pq&o + +

{% endblock content %} From 7f313e0a4b6b9d78c97f8082ca08f03618babb98 Mon Sep 17 00:00:00 2001 From: Daniel Maike Date: Mon, 14 May 2018 16:03:31 -0300 Subject: [PATCH 10/48] Adding css to vaccine schedule Adding colored nav Creating vaccine_schedule.css Co-authored-by: Gabriela Medeiros --- .../core/static/core/css/vaccineshedule.css | 60 +++++++++++++++++++ .../core/templates/core/vaccine_schedule.html | 14 +++-- 2 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 drdown/core/static/core/css/vaccineshedule.css diff --git a/drdown/core/static/core/css/vaccineshedule.css b/drdown/core/static/core/css/vaccineshedule.css new file mode 100644 index 00000000..0b02a18e --- /dev/null +++ b/drdown/core/static/core/css/vaccineshedule.css @@ -0,0 +1,60 @@ +.search{ + padding: 20px; +} + +.align-photo{ + position: relative; + padding-right: 20px; + padding-bottom: 25px; + max-width:200px; + max-height:150px; + width: auto; + height: auto; + +} + +.margintoleft{ + width: 50%; + height: 70%; + position: relative; + top:-170px; + right: -200px; + +} + +.size-cont{ + width: 70%; + height: 370px; + position: relative; + left: 100px; +} + +.size-text{ + word-wrap: break-word; + +} + +.tab-pane { + + border-left: 2px solid #ddd; + border-right: 2px solid #ddd; + border-bottom: 2px solid #ddd; + border-radius: 0px 0px 5px 5px; + padding: 10px; +} + +.nav-tabs-extension { + margin-bottom: 0; + background: transparent; +} + +.nav-link-extension{ + color: #ddd; + background: #2C3E50; +} + +.nav-link-extension:hover{ + font-weight: bold; + color: #ddd; + background: #1a252f; +} diff --git a/drdown/core/templates/core/vaccine_schedule.html b/drdown/core/templates/core/vaccine_schedule.html index 209b0ca6..f56f9dcf 100644 --- a/drdown/core/templates/core/vaccine_schedule.html +++ b/drdown/core/templates/core/vaccine_schedule.html @@ -5,12 +5,14 @@ - + + + {% endblock css %} {% block content %} @@ -22,9 +24,9 @@
@@ -261,7 +263,7 @@ - + + + + + diff --git a/drdown/medicalrecords/urls.py b/drdown/medicalrecords/urls.py index 20fb2550..c05d6c61 100644 --- a/drdown/medicalrecords/urls.py +++ b/drdown/medicalrecords/urls.py @@ -56,4 +56,17 @@ form_class=StaticDataForm), name='update_static_data_medicalrecords' ), + url( + regex=r'^(?P[\w.@+-]+)/new-medicine/$', + view=view_medicines.MedicinesCreateView.as_view( + form_class=MedicineForm), + name='create_medicine' + ), + url( + regex=r'(?P[\w.@+-]+)/update-medicine/(?P\d+)/$', + view=view_medicines.MedicinesUpdateView.as_view( + form_class=MedicineForm), + name='update_medicine' + ), + ] From b58b06876ea0a184ff6c36c205f695a264dc06a8 Mon Sep 17 00:00:00 2001 From: guilherme1guy Date: Tue, 15 May 2018 13:40:30 -0300 Subject: [PATCH 21/48] Add tab on template Adds tab for complaints on medical record template Co-authored-by: joberth rogers --- .../medicalrecords/medicalrecord_list.html | 73 ++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html index de3b3378..c3cfd9ab 100644 --- a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html +++ b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html @@ -360,7 +360,9 @@
{% empty %} -

{% trans 'There are no registered exams for this patient.' %}

+ +

{% trans 'There are no exams registered for this patient.'%}

+ {% endfor %} @@ -425,7 +427,7 @@

{% trans 'Patient Medicine' %}

{% else %} -

{% trans 'There are no registered medicines for this patient.' %}

+

{% trans 'There are no medicines registered for this patient.'%}

{% endif %} @@ -438,6 +440,73 @@

{% trans 'Patient Medicine' %}

From 7c3363732642a8ffb3c817bbb4456fdc9aa95965 Mon Sep 17 00:00:00 2001 From: guilherme1guy Date: Tue, 15 May 2018 13:43:01 -0300 Subject: [PATCH 22/48] Bugfix on view Now the list of medical records is properly filtered Co-authored-by: joberth rogers --- drdown/medicalrecords/views/view_medical_record.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drdown/medicalrecords/views/view_medical_record.py b/drdown/medicalrecords/views/view_medical_record.py index c4792e34..983a480f 100644 --- a/drdown/medicalrecords/views/view_medical_record.py +++ b/drdown/medicalrecords/views/view_medical_record.py @@ -61,7 +61,11 @@ def get_context_data(self, **kwargs): context['complaints'] = complaints context['medicines'] = medicines context['staticdata'] = staticdata - context['medicalrecordlist'] = context['object_list'] + + context['medicalrecordlist'] = context['object_list'].filter( + patient=patient + ) + context['related_patient'] = patient exams = Exam.objects.filter(patient=patient) From ff27bd44c15215a04baabe72b08fd0dc04ae7736 Mon Sep 17 00:00:00 2001 From: guilherme1guy Date: Tue, 15 May 2018 13:58:25 -0300 Subject: [PATCH 23/48] Renaming tab Changing from 'Important Notes' to 'Evolution' Co-authored-by: joberth rogers --- .../templates/medicalrecords/medicalrecord_list.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html index c3cfd9ab..ceb5f356 100644 --- a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html +++ b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html @@ -58,7 +58,7 @@

{% trans 'Medical Record' %}: {{ related_patient.user. - - +
+ +
{% endblock %} From 5bdf1661528e4c76ad167becfb1a67dadd9eef69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Sconetto?= Date: Wed, 16 May 2018 15:56:06 -0300 Subject: [PATCH 37/48] Removing environment key Chaging environment key from travis file to travis administration site Co-authored-by: Victor Arnaud --- .travis.yml | 1 - mkdocs-build.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b05aa604..57f140e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ addons: - 159.203.182.32 env: global: - - secure: "wrb7hIKvhTmybgkW/kAubZmmdnIeKlXG6vczz8ct2ZbvVBvPflOQCDLQuqoRWDHDPs8PdLHwLZ6J3zlFCtkxBX0AKrSC1fCedkZSoTYEzrI3hj3k+IhTthWPao1GYuIyE+/GUIY82+4b8AHuE3weTSjl0JlOVpxIFfOXL9T2oRhZxjxdGJmUkJgWLXZIsDjvX1bmBZ/SbdMgGGer1YSu8UoiAAr94IrEU5dyJ9Yc8sX6HTZnCdkGgMckPMyZkVwbW9sw9DcjSCB0W/h3aYIP86zocBUk1xGD0tzbnd1mEYaScXRU1rxVBYoe0XnTmFAhyAae1NTtw+6Pqrz1RDudbfTxJBLvkkaBse1w5XN3oBUeuOFLGyoagItnxqzbprt3QN6Tno23LLrefhShVAvzemRceB/Ie6NWRmyhDbsEJpLgAhUpdAGY+Phh2iFRjAsfCnsHT1AKJIoNBoJoi8d79dSOHTK1XxgdBJi9zfhIXB3jjFPhKIx0UHd4aNsIzfuTQWWC8cm05UcdWiTAxunWumoh94jQ6flkIk7RdNyeM+dytJW9mqTvw2lxCRAuyYo7eGs5jqTMqokSAuSDzRFPMUDlP+t/lewAsuwLsxXVOjrMn8TnT28yimay4bK4ZocYP6M3EJPg1DsJ/QOyCqFIFqEMs8lAqJDNky/cJ/79ZIY=" - CC_TEST_REPORTER_ID=bf64f4cd10722061b8cad12ca638ebfa7d3c1494df117613b2acd357bfd7aeb0 notifications: slack: diff --git a/mkdocs-build.sh b/mkdocs-build.sh index c72c169f..7be48c8a 100755 --- a/mkdocs-build.sh +++ b/mkdocs-build.sh @@ -8,7 +8,8 @@ rev=$(git rev-parse --short HEAD) ( git config user.name "${GH_USER_NAME}" git config user.email "${GH_USER_EMAIL}" - git remote set-url origin "https://${GH_TOKEN}@${GH_REF}" + git remote remove origin + git remote add origin "https://${GH_TOKEN}@${GH_REF}" git fetch origin ) From 0e25c0ea0f7681a659395b6bfade2a7d2fd9140c Mon Sep 17 00:00:00 2001 From: Daniel Maike Date: Thu, 17 May 2018 11:22:06 -0300 Subject: [PATCH 38/48] Correcting translations of vaccine schedule Correcting translation of tab Co-authored-by: Gabriela Medeiros --- drdown/core/locale/pt_BR/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drdown/core/locale/pt_BR/LC_MESSAGES/django.po b/drdown/core/locale/pt_BR/LC_MESSAGES/django.po index 1f8ed6d5..f90cb6f0 100644 --- a/drdown/core/locale/pt_BR/LC_MESSAGES/django.po +++ b/drdown/core/locale/pt_BR/LC_MESSAGES/django.po @@ -744,7 +744,7 @@ msgstr "DO NASCIMENTO AOS 6 ANOS DE IDADE" #: drdown/core/templates/core/vaccine_schedule.html:28 #| msgid "9 TO 10 YEARS OLD" msgid "FROM 9 YEARS OLD" -msgstr "9 ATÉ 10 ANOS DE IDADE" +msgstr "DOS 9 ANOS EM DIANTE" #: drdown/core/templates/core/vaccine_schedule.html:39 #: drdown/core/templates/core/vaccine_schedule.html:236 From 920ef82745e102ee0172a0778c8083e72b99b38e Mon Sep 17 00:00:00 2001 From: GeovanaRamos Date: Thu, 17 May 2018 12:51:42 -0300 Subject: [PATCH 39/48] Correcting exams forms Correcting indents and line spacing on template Adding date format input Co-authored-by: joberth rogers Co-authored-by: Guilherme Guy --- drdown/medicalrecords/forms/exam_forms.py | 3 + .../medicalrecord_exam_form.html | 103 +++++++++--------- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/drdown/medicalrecords/forms/exam_forms.py b/drdown/medicalrecords/forms/exam_forms.py index b286738e..d9795424 100644 --- a/drdown/medicalrecords/forms/exam_forms.py +++ b/drdown/medicalrecords/forms/exam_forms.py @@ -7,3 +7,6 @@ class ExamForm(forms.ModelForm): class Meta: model = Exam fields = ["file", "day", "category", "observations"] + widgets = { + 'day': forms.DateInput(attrs={'type': 'date'}) + } diff --git a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_exam_form.html b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_exam_form.html index 9f3acf81..aeadd2a2 100644 --- a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_exam_form.html +++ b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_exam_form.html @@ -9,66 +9,63 @@ {% endblock %} {% block content %} -
+
-
-
-

{% trans 'Add Exam' %}

+
+
+

{% trans 'Add Exam' %}

+
+
+ +
+
+
+ {% csrf_token %} + {% for field in form %} +
+
+ + {% if field.errors %} +
+ {{ field.errors }} +
+ {% endif %} + +
+ {{ field.label_tag }} +
+ +
+ {{ field }} +
+ + {% if field.help_text %} + {{ field.help_text|safe }} + {% endif %} + +
-
-
+ {% endfor %} +
+
- - - - {% csrf_token %} - - {% for field in form %} - -
- -
- - - {% if field.errors %} -
- {{ field.errors }} -
- {% endif %} - - -
- {{ field.label_tag }} -
- -
- {{ field }} -
- -
- -
- - {% endfor %} -
- -
-
- -
- -
- - -
- +
+
+
-
+ + +
+ + +
+
+ {% endblock %} From c34187598b79200ca80e7576ca664233f565f575 Mon Sep 17 00:00:00 2001 From: GeovanaRamos Date: Thu, 17 May 2018 13:38:49 -0300 Subject: [PATCH 40/48] Correcting medical record list Checking if user is health team to add exam Correcting indents and line spacing Co-authored-by: joberth rogers Co-authored-by: Guilherme Guy --- .../medicalrecords/medicalrecord_list.html | 779 +++++++----------- 1 file changed, 316 insertions(+), 463 deletions(-) diff --git a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html index fe083ad6..7216b843 100644 --- a/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html +++ b/drdown/medicalrecords/templates/medicalrecords/medicalrecord_list.html @@ -10,27 +10,27 @@ {% block script %} - + - + }) + + {%endblock script%} @@ -39,483 +39,336 @@
-
-
-

{% trans 'Medical Record' %}: {{ related_patient.user.name }}

-
- - - +
+
+

{% trans 'Medical Record' %}: {{ related_patient.user.name }}

+ +
+ +
+
+ + +
+
+
+
+ {% if related_patient.user.photo %} + + {% else %} + + {% endif %} +
-
-
- - -
- -
- -
- -
- {% if related_patient.user.photo %} - - {% else %} - - {% endif %} -
- -
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + {% if related_patient.user.cpf %} +
+ {{ related_patient.cpf }} +
+ {% endif %} +
+
+
-
- -
- +