SMASCH

Configuration#

Configuration is separated into 3 different places:

System configuration in /etc/smasch/smasch.py#

SECRET_KEY = 'L,C2Vgp7kn4\]adyV6R:?.,K/!D&X$}N'
SERVE_STATIC = True
STATIC_ROOT = '/usr/lib/smasch/data/static'
MEDIA_ROOT = '/usr/lib/smasch/data/media'
UPLOAD_ROOT = '/usr/lib/smasch/data/upload'
ETL_ROOT = '/usr/lib/smasch/data/etl'
LOGGING = {
  'version': 1,
  'disable_existing_loggers': False,
  'handlers': {
    'file': {
      'level': 'INFO',
      'class': 'logging.FileHandler',
      'filename': '/var/log/smasch/smasch.log',
      'formatter': 'verbose'
    },
    'console': {
      'class': 'logging.StreamHandler',
      'level': 'DEBUG',
      'formatter': 'simple'
    },
  },
  'formatters': {
    'verbose': {
      'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
    },
    'simple': {
      'format': '%(levelname)s %(message)s'
    },
  },
  'loggers': {
    'django': {
      'handlers': ['file'],
      'level': 'INFO',
    },
    'web': {
      'handlers': ['file'],
      'level': 'DEBUG',
    },
  },
}
TWO_FACTOR_SMS_GATEWAY = "web.nexmo_gateway.Nexmo"
FORCE_2FA = True
NPM_ROOT_PATH = '/usr/lib/smasch/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
DEBUG = False
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'example.com']
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'your_account@gmail.com'
EMAIL_HOST_PASSWORD = 'your account’s password'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_USE_SSL = True
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

Back to top

General configuration in the UI#

Go to left panel subcategory General in Configuration. Change the Value field and click corresponding Save button for each change you made.

{:style=“display:block;margin-top:10px;”}

The table below contains explanation of the configurable parameters. The descriptions are grouped as per feature - not following the order displayed in the list at Configuration general page.

Note: Passwords/API tokens are not visible - you can only write the value, but cannot read it.

NAME DESCRIPTION EXAMPLE
COLORS settings
Color for cancelled appointments RGB value of the color that should be used to visualize cancelled appointments in calendar view. #00ff00
Color for NO SHOW appointments RGB value of the color that should be used to visualize appointments marked as NO SHOW in calendar view (patient did not show up). #00ff00
KIT REQUEST EMAIL settings
At what time kit request emails should be sent At what time the email with upcoming appointments should be sent. 17:00
At what weekday kit request emails should be sent At what days of week the email with upcoming appointments should be sent. FRIDAY
Appointment date format used in sample kits email Format used in the email with upcoming appointments (regex pattern) %Y-%m-%d %H:%M
At what time a day email with updates about virus tests should be sent Time; if field is empty - no email is sent. The email is sent to all workers with email address provided. 17:00
Number of days with sample kits included in email For how many days should the list with upcoming appointments be created. 7
Recipients of kit requests email Semicolon separated list of email addresses that should receive email with upcoming appointments. kit.receipents@kit.lu; with.semicolon@separation.lu
RED Cap settings
API Token for RED Cap integration API tokens are not visible (keep in mind that this value is never presented to the frontend, so you can modify it, but you cannot see the value in the interface).
Base url of RED Cap https://pd-redcap.uni.lu/redcap/
Redcap field for birth date cdisc_dm_brthdtc
Redcap field for deceased dm_death
Redcap field for IgA status in the visit
Redcap field for IgG status in the visit
Redcap field for language 1 dm_language_1
Redcap field for language 2 dm_language_2
Redcap field for language 3 dm_language_3
Redcap field for language 4 dm_language_4
Redcap field for mPowerId dm_mpowerid
Redcap field for sample date in the visit
Redcap field for sample kit id in the visit
Redcap field for sex cdisc_dm_sex
Redcap field for subject id cdisc_dm_usubjd
Redcap field for virus test result
2FA settings
NEXMO API KEY When Two-Factor Authentication is enabled this field contains NEXMO API KEY (keep in mind that this value is never presented to the frontend, so you can modify it, but you cannot see the value in the interface). 123452ab
NEXMO API SECRET When Two-Factor Authentication is enabled this field contains NEXMO API SECRET (keep in mind that this value is never presented to the frontend, so you can modify it, but you cannot see the value in the interface). 1234567890abcdef
The sender of the message from NEXMO (phone number or text) When Two-Factor Authentication is enabled this field defines what should be the phone number/name of the text message sent from the system. SMASCH
MISCELLANEOUS
Default email address used in the from field when sending emails The name of sender of the email ncer-pd-scheduler@uni.lu
Path to a static file containing background image, used in login.html Path /file.jpg
Should visit numbers be shown starting in 0 The number of first visit displayed in Subjects list True/False
Type of appointment assigned to imported visits
User that should be assigned to changes introduced by importer

Back to top

Two-Factor Authentication#

Smasch supports Two-Factor Authentication without any configuration. Users can enable it by clicking Security in the user profile:

{:style=“display:block;width:200px”}

This allows to use Token generator as a 2FA provider.

Additionally, there is possibility to use NEXMO for sending text messages. To enable it you must provide NEXMO API KEY and API SECRET in the global configuration. You can also specify phone number or name that will appear in the sent messages.

To make 2FA obligatory you need to set FORCE_2FA = True in /etc/smasch/smasch.py file.

Back to top