DFgetparam.rpc

DFgetparam.rpc — Retrieve and evaluate the value of the requested configuration parameter

Synopsis

DFgetparam.rpc [-n] [-s #] {param}

Description

DFgetparam.rpc is the recommended way of determining the value of the master daemon's or a study server's configuration parameter. The current value of the parameter is printed on the standard output without a trailing new line character, unless -n is given. This is a format suitable for command line substitution by the shell.

When DFgetparam.rpc is running as user datafax, if the environment variable DFUSER is set, DFgetparam.rpc runs as that user. Thus for example requesting USER_PERMISSION will get the permissions associated with DFUSER, not the permissions for user datafax. This is important in DFexplore for shell scripts run by dfexecute in edit checks, and in study reports run under the Reports View.

The following configuration parameters can be retrieved from the master configuration:

AUTO_SLAVES

hostnames on which slaves are started when DFdiscover is started

MAILEE

email address for delivery of important system messages

PRINTER

default printer for DFadmin application

PASSWORD_RULES

a tuple of values in the following format: length,complexity,expiry,reuse,lockout,failures,email,reset. The meaning of these values can be found in System Administrator Guide, DFmaster.cf

ROUTER_USERS

list of users that have permission to use the router

The following parameters can be retrieved from a study configuration:

AUTO_LOGOUT

a compound value containing two numbers that represent, in minutes, the minimum and maximum settable automatic logout intervals

SITES

database of participating clinical sites (CENTERS has been deprecated)

DATABASE_DIR

study database directory

FILE_MAP

lists all plates defined for the study

PAGE_DIR

CRF page images root directory

PRINTER

default printer for the study and all study applications

REPORTS_DIR

study reports directory

SCHEMA

study database schema

SETUP

study setup defintion (JSON format)

STUDY_DIR

study home directory

STUDY_HINTS

information for ICR to locate data fields

STUDY_NAME

descriptive study title, or acronym

STUDY_NUMBER

DFdiscover study number

USER_PERMISSION

the restrictions, if any, on which records the current user can access. The output is:

  • the word unrestricted if the user has no access restrictions, or

  • one or more concatenated 5-tuples describing the access restrictions. In each | delimited 5-tuple, the ordered fields identify the restrictions: 1st field is site ID, 2nd is subject ID, 3rd is visit number, 4th is plate number, and 5th is validation level.

VISIT_MAP

subject assessment schedule

WORKING_DIR

study work directory

Options

-n

append a newline character to the end of the output. The default is to not emit a trailing newline.

-s #

the DFdiscover study number. If this argument is missing, the parameter request is made of the master daemon's configuration.

param

the name of the configuration parameter to be retrieved and evaluated (required).

Exit Status

DFgetparam.rpc exits with one of the following statuses:

0

The command was successful.

36

The required command-line arguments were not present or were incorrectly specified.

> 0

The command failed because the master/server could not be contacted, or communication with the master/server failed.

Examples

Example 3.49. Determine the working directory for study 123

In this case, the value is assigned to a new shell variable, work.

% work=`DFgetparam.rpc -s 123 WORKING_DIR`


Example 3.50. Echo the value of the default printer for the master daemon

% echo `DFgetparam.rpc PRINTER`

Example 3.51. Determine the access permissions for study 253 for the current user

%  DFgetparam.rpc -s 253 USER_PERMISSION
1-10|||||||0,1||||||1-44,46-90||

In this example, 3 access permission rules apply to the user:

  • 1-10|||||: all records for sites 1 through 10, inclusive

  • ||0,1|||: all records for visits 0 or 1

  • ||2|1-44,46-90||: all records for plates 1 through 44 and 46 through 90, inclusive, at visit 2

The user will be granted access to data records that meet at least one of these permission rules.