Settings to activate CV2 readind and set xml files path.

This commit is contained in:
Mikaël Ates 2015-01-13 12:17:25 +01:00
parent 50584085f2
commit 1eb103dd72
2 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,7 @@ from calebasse.facturation.invoice_header import render_to_pdf_file
from calebasse.decorators import validator_only
from ..utils import get_service_setting
class NewPatientRecordView(cbv.FormView, cbv.ServiceViewMixin):
form_class = forms.NewPatientRecordForm
@ -345,6 +346,9 @@ class PatientRecordAddrView(cbv.ServiceViewMixin, cbv.NotificationDisplayView, c
ctx = super(PatientRecordAddrView, self).get_context_data(**kwargs)
ctx['nb_place_of_lifes'] = ctx['object'].addresses.filter(place_of_life=True).count()
ctx['addresses'] = ctx['object'].addresses.order_by('-place_of_life', 'id')
cv_files_path = get_service_setting('cv_files_path')
if cv_files_path and os.path.isdir(cv_files_path):
ctx['cv2_reading'] = True
return ctx
tab3_addresses = PatientRecordAddrView.as_view()

View File

@ -305,6 +305,8 @@ SERVICE_SETTINGS = {}
# - show_overlapping_appointments: boolean (default: False)
# - age_format: string, string (default: None, alternative behaviour to have
# age always displayed in months: "months_only")
# - cv_files_path : Set a path where xml files of CV2 cards are read
# (activate CV2 reading btw).
# Pdftk binary path (pdftk is used to complete CERFA)
PDFTK_PATH = '/usr/bin/pdftk'