2020-11-13 15:31:14 +01:00
|
|
|
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')
|
2020-11-16 16:30:41 +01:00
|
|
|
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'
|