synthea_webservice/webservice/apps/synthea/apps.py

40 lines
1.5 KiB
Python

from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
class SyntheaConfig(AppConfig):
name = 'apps.synthea'
label = 'synthea'
verbose_name = _('Synthea')
verbose_name_plural = _('Synthea')
try:
assert settings.SYNTHEA_BASE_DIR
except AttributeError:
# We only load this setting, if it is not available in the overall settings.py file
settings.SYNTHEA_BASE_DIR = settings.BASE_DIR / '../synthea'
try:
assert settings.SYNTHEA_OUTPUT_DIR
except AttributeError:
# We only load this setting, if it is not available in the overall settings.py file
settings.SYNTHEA_OUTPUT_DIR = settings.BASE_DIR / '../synthea_output'
try:
assert settings.SYNTHEA_MODULE_DIR
except AttributeError:
# We only load this setting, if it is not available in the overall settings.py file
settings.SYNTHEA_MODULE_DIR = settings.SYNTHEA_BASE_DIR / 'src/main/resources/modules/'
try:
assert settings.SYNTHEA_RESOURCE_DIR
except AttributeError:
# We only load this setting, if it is not available in the overall settings.py file
settings.SYNTHEA_RESOURCE_DIR = settings.SYNTHEA_BASE_DIR / 'src/main/resources/'
try:
assert settings.SYNTHEA_EXPORT_TYPE
except AttributeError:
# We only load this setting, if it is not available in the overall settings.py file
settings.SYNTHEA_EXPORT_TYPE = 'fhir_stu3'