diff --git a/api/fixtures/api.json b/api/fixtures/api.json index 92ece88..050896f 100644 --- a/api/fixtures/api.json +++ b/api/fixtures/api.json @@ -1 +1,494 @@ -[{"fields": {}, "model": "pttrack.contactmethod", "pk": "Email"}, {"fields": {}, "model": "pttrack.contactmethod", "pk": "Phone"}, {"fields": {}, "model": "pttrack.contactmethod", "pk": "Snail Mail"}, {"fields": {}, "model": "pttrack.referraltype", "pk": "Other"}, {"fields": {}, "model": "pttrack.referraltype", "pk": "PCP: chronic condition management"}, {"fields": {}, "model": "pttrack.referraltype", "pk": "PCP: gateway to specialty care"}, {"fields": {}, "model": "pttrack.referraltype", "pk": "PCP: other acute conditions"}, {"fields": {}, "model": "pttrack.referraltype", "pk": "PCP: preventative care (following well check up)"}, {"fields": {}, "model": "pttrack.referraltype", "pk": "Specialty care"}, {"fields": {"name": "Back to SNHC", "address": ""}, "model": "pttrack.referrallocation", "pk": 1}, {"fields": {"name": "SNHC Depression and Anxiety Specialty Night", "address": ""}, "model": "pttrack.referrallocation", "pk": 2}, {"fields": {"name": "SNHC Dermatology Specialty Night", "address": ""}, "model": "pttrack.referrallocation", "pk": 3}, {"fields": {"name": "SNHC OB/GYN Specialty Night", "address": ""}, "model": "pttrack.referrallocation", "pk": 4}, {"fields": {"name": "Barnes Jewish Center for Outpatient Health (COH)", "address": ""}, "model": "pttrack.referrallocation", "pk": 5}, {"fields": {"name": "BJC Behavioral Health (for Psych)", "address": ""}, "model": "pttrack.referrallocation", "pk": 6}, {"fields": {"name": "St. Louis Dental Education and Oral Health Clinic", "address": ""}, "model": "pttrack.referrallocation", "pk": 7}, {"fields": {"name": "St. Louis County Department of Health: South County Health Center", "address": ""}, "model": "pttrack.referrallocation", "pk": 8}, {"fields": {"name": "Other", "address": ""}, "model": "pttrack.referrallocation", "pk": 9}, {"fields": {}, "model": "pttrack.language", "pk": "Arabic"}, {"fields": {}, "model": "pttrack.language", "pk": "Armenian"}, {"fields": {}, "model": "pttrack.language", "pk": "Bengali"}, {"fields": {}, "model": "pttrack.language", "pk": "Chinese"}, {"fields": {}, "model": "pttrack.language", "pk": "Croatian"}, {"fields": {}, "model": "pttrack.language", "pk": "Czech"}, {"fields": {}, "model": "pttrack.language", "pk": "Danish"}, {"fields": {}, "model": "pttrack.language", "pk": "Dutch"}, {"fields": {}, "model": "pttrack.language", "pk": "English"}, {"fields": {}, "model": "pttrack.language", "pk": "Finnish"}, {"fields": {}, "model": "pttrack.language", "pk": "French"}, {"fields": {}, "model": "pttrack.language", "pk": "French Creole"}, {"fields": {}, "model": "pttrack.language", "pk": "German"}, {"fields": {}, "model": "pttrack.language", "pk": "Greek"}, {"fields": {}, "model": "pttrack.language", "pk": "Hebrew"}, {"fields": {}, "model": "pttrack.language", "pk": "Hindi/Urdu"}, {"fields": {}, "model": "pttrack.language", "pk": "Hungarian"}, {"fields": {}, "model": "pttrack.language", "pk": "Italian"}, {"fields": {}, "model": "pttrack.language", "pk": "Japanese"}, {"fields": {}, "model": "pttrack.language", "pk": "Korean"}, {"fields": {}, "model": "pttrack.language", "pk": "Lithuanian"}, {"fields": {}, "model": "pttrack.language", "pk": "Persian"}, {"fields": {}, "model": "pttrack.language", "pk": "Polish"}, {"fields": {}, "model": "pttrack.language", "pk": "Portuguese"}, {"fields": {}, "model": "pttrack.language", "pk": "Romanian"}, {"fields": {}, "model": "pttrack.language", "pk": "Russian"}, {"fields": {}, "model": "pttrack.language", "pk": "Samoan"}, {"fields": {}, "model": "pttrack.language", "pk": "Serbocroatian"}, {"fields": {}, "model": "pttrack.language", "pk": "Slovak"}, {"fields": {}, "model": "pttrack.language", "pk": "Spanish"}, {"fields": {}, "model": "pttrack.language", "pk": "Swedish"}, {"fields": {}, "model": "pttrack.language", "pk": "Tagalog"}, {"fields": {}, "model": "pttrack.language", "pk": "Thai/Laotian"}, {"fields": {}, "model": "pttrack.language", "pk": "Turkish"}, {"fields": {}, "model": "pttrack.language", "pk": "Ukrainian"}, {"fields": {}, "model": "pttrack.language", "pk": "Vietnamese"}, {"fields": {}, "model": "pttrack.language", "pk": "Yiddish"}, {"fields": {}, "model": "pttrack.ethnicity", "pk": "American Indian or Alaska Native"}, {"fields": {}, "model": "pttrack.ethnicity", "pk": "Asian"}, {"fields": {}, "model": "pttrack.ethnicity", "pk": "Black or African American"}, {"fields": {}, "model": "pttrack.ethnicity", "pk": "Hispanic or Latino"}, {"fields": {}, "model": "pttrack.ethnicity", "pk": "Native Hawaiian or Other Pacific Islander"}, {"fields": {}, "model": "pttrack.ethnicity", "pk": "Other"}, {"fields": {}, "model": "pttrack.ethnicity", "pk": "White"}, {"fields": {}, "model": "pttrack.actioninstruction", "pk": "Lab Follow-Up"}, {"fields": {}, "model": "pttrack.actioninstruction", "pk": "Other"}, {"fields": {}, "model": "pttrack.actioninstruction", "pk": "PCP Follow-Up"}, {"fields": {}, "model": "pttrack.actioninstruction", "pk": "Vaccine Reminder"}, {"fields": {"long_name": "Attending Physician", "signs_charts": true}, "model": "pttrack.providertype", "pk": "Attending"}, {"fields": {"long_name": "Clinical Medical Student", "signs_charts": false}, "model": "pttrack.providertype", "pk": "Clinical"}, {"fields": {"long_name": "Coordinator", "signs_charts": false}, "model": "pttrack.providertype", "pk": "Coordinator"}, {"fields": {"long_name": "Preclinical Medical Student", "signs_charts": false}, "model": "pttrack.providertype", "pk": "Preclinical"}, {"fields": {"short_name": "F"}, "model": "pttrack.gender", "pk": "Female"}, {"fields": {"short_name": "M"}, "model": "pttrack.gender", "pk": "Male"}, {"fields": {"short_name": "O"}, "model": "pttrack.gender", "pk": "Other"}, {"fields": {"last_name": "McNath", "alternate_phone_3_owner": null, "alternate_phone_2_owner": null, "id": 1, "city": "St. Louis", "first_name": "Frankie", "history_type": "+", "middle_name": "Lane", "alternate_phone_1_owner": null, "patient_comfortable_with_english": true, "alternate_phone_4_owner": null, "state": "MO", "date_of_birth": "1989-08-09", "history_user": null, "needs_workup": true, "zip_code": "", "pcp_preferred_zip": null, "phone": "501-233-1234", "address": "6310 Scott Ave.", "preferred_contact_method": null, "history_date": "2016-01-02T22:37:48.542Z", "alternate_phone_3": null, "alternate_phone_2": null, "alternate_phone_1": null, "alternate_phone_4": null, "country": "USA", "gender": "Male"}, "model": "pttrack.historicalpatient", "pk": 1}, {"fields": {"last_name": "McNath", "alternate_phone_3_owner": null, "alternate_phone_2_owner": null, "city": "St. Louis", "first_name": "Frankie", "middle_name": "Lane", "alternate_phone_1_owner": null, "patient_comfortable_with_english": true, "alternate_phone_4_owner": null, "state": "MO", "date_of_birth": "1989-08-09", "needs_workup": true, "zip_code": "", "languages": ["English"], "pcp_preferred_zip": null, "phone": "501-233-1234", "address": "6310 Scott Ave.", "preferred_contact_method": null, "alternate_phone_3": null, "alternate_phone_2": null, "alternate_phone_1": null, "alternate_phone_4": null, "ethnicities": ["White"], "gender": "Male", "country": "USA"}, "model": "pttrack.patient", "pk": 1}, {"fields": {}, "model": "pttrack.documenttype", "pk": "Silly picture"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Cardiovascular"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Dermatological"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Endocrine"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Eyes and ENT"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "GI"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Infectious Disease (e.g. flu or HIV)"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Mental Health"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Musculoskeletal"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Neurological"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "OB/GYN"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Other"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Physical Exam"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Respiratory"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Rx Refill"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Urogenital"}, {"fields": {}, "model": "workup.diagnosistype", "pk": "Vaccination/PPD"}, {"fields": {"name": "Basic Care Clinic"}, "model": "workup.clinictype", "pk": 1}, {"fields": {"name": "Depression & Anxiety Clinic"}, "model": "workup.clinictype", "pk": 2}, {"fields": {"name": "Dermatology Clinic"}, "model": "workup.clinictype", "pk": 3}, {"fields": {"name": "Muscle and Joint Pain Clinic"}, "model": "workup.clinictype", "pk": 4}] \ No newline at end of file +[ + {% load i18n %}, + { + "fields": {}, + "model": "pttrack.contactmethod", + "pk": "Email" +}, { + "fields": {}, + "model": "pttrack.contactmethod", + "pk": "Phone" +}, { + "fields": {}, + "model": "pttrack.contactmethod", + "pk": "Snail Mail" +}, { + "fields": {}, + "model": "pttrack.referraltype", + "pk": "Other" +}, { + "fields": {}, + "model": "pttrack.referraltype", + "pk": "PCP: chronic condition management" +}, { + "fields": {}, + "model": "pttrack.referraltype", + "pk": "PCP: gateway to specialty care" +}, { + "fields": {}, + "model": "pttrack.referraltype", + "pk": "PCP: other acute conditions" +}, { + "fields": {}, + "model": "pttrack.referraltype", + "pk": "PCP: preventative care (following well check up)" +}, { + "fields": {}, + "model": "pttrack.referraltype", + "pk": "Specialty care" +}, { + "fields": { + "name": "Back to SNHC", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 1 +}, { + "fields": { + "name": "SNHC Depression and Anxiety Specialty Night", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 2 +}, { + "fields": { + "name": "SNHC Dermatology Specialty Night", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 3 +}, { + "fields": { + "name": "SNHC OB/GYN Specialty Night", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 4 +}, { + "fields": { + "name": "Barnes Jewish Center for Outpatient Health (COH)", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 5 +}, { + "fields": { + "name": "BJC Behavioral Health (for Psych)", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 6 +}, { + "fields": { + "name": "St. Louis Dental Education and Oral Health Clinic", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 7 +}, { + "fields": { + "name": "St. Louis County Department of Health: South County Health Center", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 8 +}, { + "fields": { + "name": "Other", + "address": "" + }, + "model": "pttrack.referrallocation", + "pk": 9 +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Arabic" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Armenian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Bengali" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Chinese" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Croatian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Czech" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Danish" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Dutch" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "English" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Finnish" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "French" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "French Creole" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "German" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Greek" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Hebrew" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Hindi/Urdu" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Hungarian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Italian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Japanese" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Korean" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Lithuanian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Persisch" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Polish" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Portuguese" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Romanian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Russian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Samoan" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Serbocroatian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Slovak" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Spanish" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Swedish" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Tagalog" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Thai/Laotian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Turkish" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Ukrainian" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Vietnamese" +}, { + "fields": {}, + "model": "pttrack.language", + "pk": "Yiddish" +}, { + "fields": {}, + "model": "pttrack.ethnicity", + "pk": "American Indian or Alaska Native" +}, { + "fields": {}, + "model": "pttrack.ethnicity", + "pk": "Asian" +}, { + "fields": {}, + "model": "pttrack.ethnicity", + "pk": "Black or African American" +}, { + "fields": {}, + "model": "pttrack.ethnicity", + "pk": "Hispanic or Latino" +}, { + "fields": {}, + "model": "pttrack.ethnicity", + "pk": "Native Hawaiian or Other Pacific Islander" +}, { + "fields": {}, + "model": "pttrack.ethnicity", + "pk": "Other" +}, { + "fields": {}, + "model": "pttrack.ethnicity", + "pk": "{% trans 'white'%}" +}, { + "fields": {}, + "model": "pttrack.actioninstruction", + "pk": "Lab Follow-Up" +}, { + "fields": {}, + "model": "pttrack.actioninstruction", + "pk": "Other" +}, { + "fields": {}, + "model": "pttrack.actioninstruction", + "pk": "PCP Follow-Up" +}, { + "fields": {}, + "model": "pttrack.actioninstruction", + "pk": "Vaccine Reminder" +}, { + "fields": { + "long_name": "Attending Physician", + "signs_charts": true + }, + "model": "pttrack.providertype", + "pk": "Attending" +}, { + "fields": { + "long_name": "Clinical Medical Student", + "signs_charts": false + }, + "model": "pttrack.providertype", + "pk": "Clinical" +}, { + "fields": { + "long_name": "Coordinator", + "signs_charts": false + }, + "model": "pttrack.providertype", + "pk": "Coordinator" +}, { + "fields": { + "long_name": "Preclinical Medical Student", + "signs_charts": false + }, + "model": "pttrack.providertype", + "pk": "Preclinical" +}, { + "fields": { + "short_name": "F" + }, + "model": "pttrack.gender", + "pk": "{% trans 'Female' %}" +}, { + "fields": { + "short_name": "M" + }, + "model": "pttrack.gender", + "pk": "{% trans 'Male' %}" +}, { + "fields": { + "short_name": "O" + }, + "model": "pttrack.gender", + "pk": "{% trans 'Other' %}" +}, { + "fields": { + "last_name": "McNath", + "alternate_phone_3_owner": null, + "alternate_phone_2_owner": null, + "id": 1, + "city": "St. Louis", + "first_name": "Frankie", + "history_type": "+", + "middle_name": "Lane", + "alternate_phone_1_owner": null, + "patient_comfortable_with_english": true, + "alternate_phone_4_owner": null, + "state": "MO", + "date_of_birth": "1989-08-09", + "history_user": null, + "needs_workup": true, + "zip_code": "", + "pcp_preferred_zip": null, + "phone": "501-233-1234", + "address": "6310 Scott Ave.", + "preferred_contact_method": null, + "history_date": "2016-01-02T22:37:48.542Z", + "alternate_phone_3": null, + "alternate_phone_2": null, + "alternate_phone_1": null, + "alternate_phone_4": null, + "country": "USA", + "gender": "Male" + }, + "model": "pttrack.historicalpatient", + "pk": 1 +}, { + "fields": { + "last_name": "McNath", + "alternate_phone_3_owner": null, + "alternate_phone_2_owner": null, + "city": "St. Louis", + "first_name": "Frankie", + "middle_name": "Lane", + "alternate_phone_1_owner": null, + "patient_comfortable_with_english": true, + "alternate_phone_4_owner": null, + "state": "MO", + "date_of_birth": "1989-08-09", + "needs_workup": true, + "zip_code": "", + "languages": ["English"], + "pcp_preferred_zip": null, + "phone": "501-233-1234", + "address": "6310 Scott Ave.", + "preferred_contact_method": null, + "alternate_phone_3": null, + "alternate_phone_2": null, + "alternate_phone_1": null, + "alternate_phone_4": null, + "ethnicities": ["{% trans 'white'%}"], + "gender": "Male", + "country": "USA" + }, + "model": "pttrack.patient", + "pk": 1 +}, { + "fields": {}, + "model": "pttrack.documenttype", + "pk": "Silly picture" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Cardiovascular" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Dermatological" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Endocrine" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Eyes and ENT" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "GI" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Infectious Disease (e.g. flu or HIV)" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Mental Health" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Musculoskeletal" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Neurological" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "OB/GYN" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Other" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Physical Exam" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Respiratory" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Rx Refill" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Urogenital" +}, { + "fields": {}, + "model": "workup.diagnosistype", + "pk": "Vaccination/PPD" +}, { + "fields": { + "name": "Basic Care Clinic" + }, + "model": "workup.clinictype", + "pk": 1 +}, { + "fields": { + "name": "Depression & Anxiety Clinic" + }, + "model": "workup.clinictype", + "pk": 2 +}, { + "fields": { + "name": "Dermatology Clinic" + }, + "model": "workup.clinictype", + "pk": 3 +}, { + "fields": { + "name": "Muscle and Joint Pain Clinic" + }, + "model": "workup.clinictype", + "pk": 4 +}] \ No newline at end of file diff --git a/appointment/forms.py b/appointment/forms.py index 192c1de..352c5b4 100644 --- a/appointment/forms.py +++ b/appointment/forms.py @@ -3,6 +3,7 @@ from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from bootstrap3_datetime.widgets import DateTimePicker +from django.utils.translation import gettext as _ from .models import Appointment @@ -21,4 +22,4 @@ class Meta: def __init__(self, *args, **kwargs): super(AppointmentForm, self).__init__(*args, **kwargs) self.helper = FormHelper(self) - self.helper.add_input(Submit('submit', 'Submit')) + self.helper.add_input(Submit('submit', _('Submit'))) diff --git a/appointment/models.py b/appointment/models.py index 9c55cca..da8ca85 100644 --- a/appointment/models.py +++ b/appointment/models.py @@ -3,6 +3,7 @@ from django.core.exceptions import ValidationError from django.conf import settings from pttrack.models import Note +from django.utils.translation import gettext as _ from simple_history.models import HistoricalRecords @@ -31,19 +32,19 @@ class Meta: (VACCINE, "Vaccine Followup") ) - clindate = models.DateField(verbose_name="Appointment Date") + clindate = models.DateField(verbose_name=_("Appointment Date")) clintime = models.TimeField( - verbose_name="Time of Appointment", + verbose_name=_("Time of Appointment"), default=generate_default_appointment_time) appointment_type = models.CharField( max_length=15, choices=APPOINTMENT_TYPES, - verbose_name='Appointment Type', default=CHRONIC_CARE) - comment = models.TextField( - help_text="What should happen at this appointment?") + verbose_name=_('Appointment Type'), default=CHRONIC_CARE) + comment = models.TextField(verbose_name=_('Comment'), + help_text=_("What should happen at this appointment?")) pt_showed = models.NullBooleanField( - verbose_name="Patient Showed", - blank=True, help_text="Did the patient come to this appointment?") + verbose_name=_("Patient Showed"), + blank=True, help_text=_("Did the patient come to this appointment?")) history = HistoricalRecords() diff --git a/appointment/templates/appointment/appointment_list.html b/appointment/templates/appointment/appointment_list.html index f81c749..ac658c2 100644 --- a/appointment/templates/appointment/appointment_list.html +++ b/appointment/templates/appointment/appointment_list.html @@ -1,14 +1,17 @@ {% extends "pttrack/base.html" %} +{% load i18n %} + + {% load bootstrap3 %} {% block title %} -Appointment List +{% blocktrans %}Appointment List{% endblocktrans %} {% endblock %} {% block header %}