Command Line module

 

Entering a single question response with the Command Line

You can use the Command Line module to enter a single response for a subject, using either the subject ID or the subject label as the subject identifier.

 

You can also import multiple question responses from a file.

 

From each call, a Command Line error may be returned if the command line is not in the correct format, e.g. missing or unexpected parameters. Otherwise a comma-separated message is output with the appropriate result code. Parameters not specified in the Command Line will not be included in the output.

 

 

Parameters

Ensure you follow the required conventions when specifying user credentials and visit/eForm parameters.

 

Parameter

Description

Functionality identifier

"DataEntry"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"InputSubjectData" or “InputSubjectDataByLabel”

Study

Study name

Site

Site code

Subject Id/Subject Label

Subject ID or label

Visit

Visit code

Visit cycle number

Visit cycle number (if you specify a visit code, you must also specify a cycle number as an integer greater than zero)

eForm

eForm code

eForm cycle number

eForm cycle number (if you specify an eForm code, you must also specify a cycle number as an integer greater than zero)

Question

Question code

Question cycle number

Question repeat number (if you specify a question code, you must also specify a cycle number as an integer greater than zero)

Response Value

The value to be entered

Timestamp

The date and time associated with the response (optional). This must be in the format yyyy-MM-dd hh:mm:ss (because the command line uses slashes to separate input parameters you must use hyphens instead). If you don't specify a timestamp, the current date/time will be used.

Timezone

The time zone associated with the response (optional). If you don't specify a timezone, the current timezone from your machine will be used.

Command Line and result format

Entering data using the subject ID:

/DataEntry/Username/Password/Database/Role/InputSubjectData/Study/Site/SubjectId/Visit/VisitCycle/eForm/eFormCycle/Question/QuestionCycle/ResponseValue/Timestamp/Timezone

ResultCode,Operation,Study,Site,SubjectId,Visit,VisitCycle,eForm,eFormCycle,Question,QuestionCycle,ResponseValue,Timestamp,Timezone

 

Entering data using the subject label:

/DataEntry/Username/Password/Database/Role/InputSubjectDataByLabel/Study/Site/SubjectLabel/Visit/VisitCycle/eForm/eFormCycle/Question/QuestionCycle/ResponseValue/Timestamp/Timezone

ResultCode,Operation,Study,Site,SubjectLabel,Visit,VisitCycle,eForm,eFormCycle,Question,QuestionCycle,ResponseValue,Timestamp,Timezone

Examples

This will enter a value of JPW for the Initials question on the Cover sheet in the Screening visit for subject 1 at the London site. The timestamp will be set to midday on 1st Jan 2018, at one hour ahead of GMT:

InferMed.M40.MACRO_CL.exe /DataEntry/rde/macrotm/MACRO490/FullUser/InputSubjectData/Demostudy40/london/1/screening/1/cover/1/initials/1/JPW/2018-01-01 12:00:00/GMT+01:00

Success,InputSubjectData,Demostudy40,london,1,screening,1,cover,1,initials,1,JPW,2018-01-01 12:00:00,GMT+01:00

 

This will enter a value of Wilson for the Clinician question on the Cover sheet in the Screening visit for subject JPW 1 at the London site. The timestamp will be set as the current day/time, with the current timezone offset:

InferMed.M40.MACRO_CL.exe /DataEntry/rde/macrotm/MACRO490/FullUser/InputSubjectDataByLabel/Demostudy40/london/JPW 1/screening/1/cover/1/clinician/1/Wilson

Success,InputSubjectDataByLabel,Demostudy40,london,JPW 1,screening,1,cover,1,clinician,Wilson

Return to top

 

Data entry result codes

Each operation returns an individual result to the console as a comma-separated message with one of the following result codes:

 

Value

Description

Success

No errors occurred; all data was added successfully, and no validations were fired (Warnings or Rejects)

InvalidXML

The XML input data was incomplete (e.g. questions or question values missing) or contained a syntax error

SubjectNotExist

The specified subject does not exist in the MACRO database

SubjectNotOpened

For some reason the specified subject could not be loaded. The reason is given in the message description

VisitNotExist

Either the named visit does not exist in the study, or the particular cycle of the visit does not exist for this subject

EFormNotExist

Either the named eForm does not exist in the study, or the particular cycle of the eForm within the current visit does not exist for this subject

QuestionNotExist

Either the named question does not exist in the study, or the particular question does not exist on the current eForm within the current visit for this subject

EFormInUse

Another MACRO user has this eForm open for data entry

VisitLockedFrozen

The visit has been locked or frozen by a data manager and therefore no data can be entered

EFormLockedFrozen

The eForm has been locked or frozen by a data manager and therefore no data can be entered

QuestionNotEnterable

Data cannot be entered for this question, which may be because it is locked or frozen, or it is a derived value, or it is disabled (its status is Not Applicable), or it is hidden

NoVisitEformDate

The eForm cannot be saved because the visit date or eForm date is missing

NoLockForSave

The eForm cannot be saved because another user is currently saving data for this subject

ValueRejected

A question value has been rejected, either because of an incorrect data type, or because of a “Reject” validation condition

ValueWarning

A warning validation has been fired

InvalidLab

A laboratory code has been specified which either does not exist or is not valid for the site

UserNoDataPermission

The user attempting to add or change data does not have the required permission to do so

DataError

General Data error

NoEformResponses

The user attempting to add or change data does not have access to the eForm, according to the eForm access rules

Return to top

 

Related Topics