Contents

1. Database Settings

1.1 Adapters

SPARCRequest has been designed to use the mysql2 adapter, however fairly extensive testing has also been done with the sqlite3 adapter. No postgresql adapters have been tested with the system, however they may well work. If you desire to use any adapter other than mysql2 heavy testing is advised, starting with the test suite to attempt to probe for issues.

1.2 Environments

SPARCRequest Rails environment configurations are mostly standard. However the following method:

config.action_mailer.default_url_options

will need to be set in each environment according to the sending url. Also in the development environment the letter_opener gem is utilized and thus the option:

config.action_mailer.delivery_method = :letter_opener

should be set.

In the production environment ExceptionNotifier is setup, and its options will need to be set to the individuals that you would like to send and receive notifications when exceptions occur in production, i.e.:

config.middleware.use ExceptionNotifier, sender_address: 'no-reply@example.com', exception_recipients: ['user@example.com']

2. Settings & Configuration (Most of the Settings can now be managed from SPARCAdmin module by Site Admin users)

SPARCRequest utilizes a number of settings to allow you to customize content and enable or disable functionality based on your institution's needs. These settings are stored in the settings database table and are populated from config/defaults.json.

We highly recommend saving your environment's settings to avoid losing your settings. To do this, first run the following commands:

# application.yml will hold the majority of your stored setting values cp config/application.yml.example config/application.yml # epic.yml will hold your epic configuration values cp config/epic.yml.example config/epic.yml # ldap.yml will hold your ldap configuration values cp config/ldap.yml.example config/ldap.yml

These files will hold your setting values. When the application imports settings, it will prioritize the values specified in these files for your current environment. Note: You may add or remove environemnts from these files as needed.

To manually import new settings, run the following command:

rake data:import_settings

To entirely refresh your settings, run the following command:

rake data:regenerate_settings

2.1 Generic Settings

SPARCRequest has many settings that are used internally to customize content and configurations.

Emails

Links and URLs

Statuses

Other Settings

2.2 Configuring Omniauth

Your institution may opt to use Omniauth authentication plugins such as CAS and Shibboleth for user authentication in SPARCRequest. Only CAS and Shibboleth are supported at this time, but support for other Omniauth plugins may be implemented.

Omniauth Configuration

2.3 Configuring LDAP

Your institution may opt to use LDAP for managing identities in SPARCRequest. You should save your environment's LDAP settings by overriding the values in config/ldap.yml.

LDAP Configuration

LDAP Fields

2.4 Configuring Epic

Your institution may opt to use Epic to store health records from SPARCRequest. You should save your environment's Epic settings by overriding the values in config/epic.yml.

Epic Configuration

Epic Fields

2.5 Configuring RMID

Your institution may opt to use Research Master ID (RMID) to connect records between SPARCRequest and other systems, such as eIRB and Coeus.

RMID Configuration

2.6 SPARCFulfillment

Your institution may opt to use SPARCFulfillment, aka Clinical Work Fulfillment (CWF) to allow service providers to fulfill and track the clinical and non-clinical services they provide.

2.7 SPARCFunding

Your institution may opt to use the SPARCFunding module to keep track of funding opportunities.

2.8 SPARCRequest API

Your institution may opt to use the SPARCRequest API to communicate with external applications, such as SPARCFulfillment.

2.9 Configuring SPARC / OnCore API

2.10 Right Navigation

SPARCRequest provides various configurable help links below the service cart (AKA Right Navigation). These include Feedback, Frequently Asked Questions, Contact Us, and Short Interaction buttons.

"Feedback" Button

"Help/FAQs" Button

"Contact Us" Button

"Short Interaction" Button

2.11 Google Calendar

Your institution may opt to integrate Google Calendar to display events on the SPARCRequest homepage.

2.12 News Feed

Your institution may opt to integrate an external blog to display posts in the news feed on the SPARCRequest homepage.

There are currently two ways to retrieve posts for the news feed - through an external API, or by parsing an HTML document for specific CSS selectors.

You may opt to use an external API to retrieve posts. Currently the application allows the use of an Atlassian Confluence API. If you wish to integrate new APIs, you will need to create an adapter in app/lib/news_feed that extends the ApiAdapter class. This adapter should be named <YourAPIName>Adapter, where <YourAPIName> is the value of the news_feed_api setting.

Your API may require additional settings to be added in order to properly configure.

For an Atlassian Confluence API:

You may also opt to simply parse an HTML document for CSS selectors. This will be done by default if use_news_feed_api is set to false. Simply assign the CSS selectors for individual posts (generally some kind of container), title, link, and date.

2.13 Tableau

Your institution may opt to integrate a Tableau Dashboard on the SPARCRequest homepage. You will need to enable guest viewing access to allow user to view the dashboard without logging in. In addition, the Dashboard may need to be scaled to fit properly onto the homepage.

2.14 System Satisfaction Survey

Your institution may opt to provide users with a system satisfaction survey prior to submitting a service request.

2.15 navigation.yml

config/navigation.yml lays out the navigation instructions for the service request portion of SPARCRequest. Aside from changing the 'step_text' or the 'css_class' of steps, the contents of this file should not be edited unless you have made significant changes to the application. Each 'step' has certain parameters:

This would mean that on the service details page, when navigating to the catalog page, protocol page, or the save_and_exit page, that the 'service_details_back' group of validations should fire. If the user attempts to navigate to the 'service_calendar' page (which in this case would be by pressing the 'Save and Continue' button) it will fire the validations in the 'service_details' category (fields which are validated can be found in the Service Request model).

3. Permissible Values & Constants

3.1 Permissible Values (Most of the Permissible Values can now be managed from SPARCAdmin module by Site Admin users)

Permissible Values are options and labels used across SPARCRequest, most of which can be customized for your institution. These are stored in the permissible_values database table and categorized by their category attribute.

The data that generates Permissible Values is stored in various CSV files located in db/seeds/permissible_values/2.0.5(see below for descriptions of the various types of Permissible Values). To customize these values for your institution, simply edit these files, then run the following rake task in your terminal:

rake:import_permissible_values

Protocol Options

These Permissible Values are used when creating or updating a Study or Project

In addition to these values, you will also find a list of Study Phases in the study_phases database table.

Authorized User Options

These Permissible Values are used when creating or updating an Authorized User on a Study or Project.

General Options

3.2 constants.yml

config/constants.yml contains a number of labels and environment settings. These should remain unchanged. Changing these could require substantial other changes throughout the application.

4. DotENV

SPARCRequest stores several environment variables specific to each institution. To access these variables, first you must create a .env file. The easiest way to do this is to copy the example file:

cp dotenv.example .env

The environment variables are as follows:

5. Localization

SPARCRequest uses the I18n gem which allows each institution to customize any text content throughout the application. All of the text content of a page can be found in one of the locales files found in config/locales. Each file contains text specific to the corresponding portion of the application, with shared values stored in en.yml.

If your institution wishes to use SPARCRequest in a language other than English, simply copy each .en.yml file and replace en with the identifier corresponding to the language. Then, replace the en: key in each file with the same identifier and translate the text as needed. Lastly, set the default locale in config/application.rb:

config.18n.default_locale = :your_identifier

You can view a list of available locales by running the following command in your Rails Console:

I18n.available_locales

6. Data Flags

6.1 Organization Tags

An organization can be given tags to either aid in categorization, or to apply specific functionality. A Catalog Manager can add whatever tags they would like for their own convenience, however there are some tags that ascribe specific functionality to any sub service requests that belong to that organization. Tags are entered as a comma separated list such as:

hospital, nursing, services

There are currently two tags which ascribe additional functionality:

Any functional tags that your organization will need will need to have changes made in the codebase to take effect, otherwise they will simply be non-functional.

6.2 Catalog Overlords

Catalog Overlord is an attribute on identities (which can be set to true or false) that determines whether a given identity, when accessing the catalog_manager, has the ability to check or uncheck the 'edit historic pricing' flag on catalog managers that have been assigned to organizations. If this flag is checked, then that identity will then be able to modify pricing maps/pricing setups that have display/effective dates in the past.

The catalog_overlord attribute is not able to be set within the application itself. It has to be done by a developer either through the rails console, or via direct SQL manipulation.