Command Line module

 

Managing DCRs and SDVs with the Command Line

Create DCR/SDV

Edit status or text of an existing DCR

 

DCRs and SDVs are known collectively as ‘MI Messages’ (Monitor/Investigator Messages) along with Notes which are not included in this version of the Command Line module.

 

You can use the Command Line module to raise a DCR or create a Planned, Queried or Done SDV with the following usual limitations:

 

·       You can create or edit an SDV on a subject, visit, eForm or question, but each MACRO object can only have one SDV attached.

·       The CreateSdv command creates a new SDV for the specified object if no SDV already exists, or changes the SDV status if an SDV already exists.

·       An SDV can have a status Planned, Queried, Done or Cancelled but a new SDV cannot be created with the status Cancelled.

·       A DCR can only be created on a question and it will automatically have the status Raised. A single question can have any number of DCRs attached to it.

·       You cannot raise a DCR or create/edit an SDV on a locked object (but you can do so on a frozen object).

 

From each MIMessage 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.

 

 

Create a DCR/SDV

This routine enables you to create a new DCR with status Raised on the specified response, and optionally return the unique DCR ID.

Parameters

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

 

Parameter

Description

Functionality identifier

"MiMessage"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"CreateDcr" or "CreateSdv"

Study

Study name

Site

Site code

Subject Id From

Starting subject id (integer) - include blank parameter for first subject

Subject Id To

End subject id (integer) - include blank parameter for last subject, same as From for single subject

Visit

Visit code (include blank parameter when creating a DCR/SDV for a subject)

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 (include blank parameter when creating a DCR/SDV for a subject or visit)

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 (include blank parameter when creating a DCR/SDV for a subject, visit or eForm)

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)

Text

The text for the DCR query or SDV details

Priority or Status

The priority when calling “CreateDcr” (which must be an integer from 1 to 10), or the status when calling “CreateSdv” (Planned, Queried, Done or Cancelled)

Command Line and result format

Creating a DCR:

/MIMessage/Username/Password/Database/Role/CreateDcr/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/eForm/eFormcycle/Question/Questioncycle/DCRText/DCRPriority

ResultCode,CreateDcr,DCRPriority,Study,Site,SubjectId,Visit,Visitcycle,eForm,eFormcycle,Question,Questioncycle,DCRID

 

Creating a question SDV:

/MIMessage/Username/Password/Database/Role/CreateSdv/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/eForm/eFormcycle/Question/Questioncycle/SDVText/SDVStatus

ResultCode,CreateSdv,SdvStatus,Study,Site,SubjectId,Visit,Visitcycle,eForm,eFormcycle,Question,Questioncycle

 

Creating an eForm SDV:

/MIMessage/Username/Password/Database/Role/CreateSdv/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/eForm/eFormcycle///SDVText/SDVStatus

ResultCode,CreateSdv,SdvStatus,Study,Site,SubjectId,Visit,Visitcycle,eForm,eFormcycle

 

Creating a visit SDV:

/MIMessage/Username/Password/Database/Role/CreateSdv/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/////SDVText/SDVStatus

ResultCode,CreateSdv,SdvStatus,Study,Site,SubjectId,Visit,Visitcycle

 

Creating a subject SDV:

/MIMessage/Username/Password/Database/Role/CreateSdv/Study/Site/SubjectIdFrom/SubjectIdTo///////SDVText/SDVStatus

ResultCode,CreateSdv,SdvStatus,Study,Site,SubjectId

Examples

To create a DCR on Date of Birth question for subject 3:

InferMed.M40.MACRO_CL.exe /MIMessage/rde/macrotm/MACRO460/FullUser/CreateDcr/Demostudy40/elsevier/3/3/screening/1/cover/1/dobirth/1/Subject too old/5

Success,CreateDcr,5,Demostudy40,elsevier,3,screening,1,cover,1,dobirth,1,elsevier-27-Server

 

To create a Planned SDV on Date of Birth question  for all Demostudy40 subjects at site elsevier:

InferMed.M40.MACRO_CL.exe /MIMessage/ rde/macrotm/MACRO460/DMUser/CreateSdv/Demostudy40/elsevier/1//screening/1/cover/1/dobirth/1/Check DOB/Planned

 

A result is output  for each of the Demostudy40 subjects at site elsevier, such as:

Success,CreateSdv,Planned,Demostudy40,elsevier,1,screening,1,cover,1,dobirth,1

Success,CreateSdv,Planned,Demostudy40,elsevier,2,screening,1,cover,1,dobirth,1

 

To change the Planned SDV on Date of Birth question  to Done for subject 3:

InferMed.M40.MACRO_CL.exe /MIMessage/ rde/macrotm/MACRO460/DMUser/CreateSdv/Demostudy40/elsevier/3/3/screening/1/cover/1/dobirth/1/Check DOB completed/Done

Success,CreateSdv,Done,Demostudy40,elsevier,3,screening,1,cover,1,dobirth,1

 

To create a Queried SDV on Screening visit  for subject  4 :

InferMed.M40.MACRO_CL.exe /MIMessage/ rde/macrotm/MACRO460/DMUser/CreateSdv/Demostudy40/elsevier/4/4/screening/1/////Check Screening/Queried

Success,CreateSdv,Queried,Demostudy40,elsevier,4,screening,1

 

To create a Planned SDV on all subjects at site london :

InferMed.M40.MACRO_CL.exe /MIMessage/ User2/macrotm2/MACRODB/DRUser/CreateSdv/Demostudy40/london/////////Subject verification/Planned

 

A result is output  for each of the Demostudy40 subjects at site london, such as:

Success,CreateSdv,Planned,Demostudy40,london,1

Success,CreateSdv,Planned,Demostudy40,london,2

Return to top

 

Edit DCR status or text

This routine enables you to change the status of an existing DCR to Responded, Closed or Raised, and to edit the DCR text.

 

Only Raised DCRs can be set to Responded.

Raised and Responded DCRs can be set to Closed.

Only Responded DCRs can be re-raised.

 

Each change to DCR text is saved in the DCR audit trail, visible from the DCR browser.

 

From each MIMessage 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.

 

Parameter

Description

Functionality identifier

"MiMessage"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"EditDcr"

Action

"Respond", "Reraise", "Close" or "Edit"

DCRId

Unique DCR ID, as returned from CreateDcr, or viewed in the DCR browser in Web DE/DR

DCRText

The new text for the DCR

Command Line and result format

/MIMessage/Username/Password/Database/Role/EditDcr/Action/DCRId/DCRText

ResultCode,EditDcr,Action,DCRId,ErrorMessage

Examples

To close a DCR:

InferMed.M40.MACRO_CL.exe /MIMessage/rde/macrotm/MACRO460/FullUser/EditDcr/Close/paris-27-Server/Closing DCR

Success,EditDcr,Close,paris-27-Server

 

To edit the DCR text:

InferMed.M40.MACRO_CL.exe /MIMessage/rde/macrotm/MACRO460/FullUser/EditDcr/Edit/paris-27-Server/Assigned to DM

Success,EditDcr,Edit,paris-27-Server

Return to top

 

MIMessage 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

Operation completed successfully

NoPermission

User does not have permission to carry out this operation

SubjectNotFound

Specified subject was not found

VisitNotFound

Specified visit was not found

EFormNotFound

Specified eForm was not found

QuestionNotFound

Specified question was not found

ResponseNotFound

No response data found for this visit, visit cycle, eForm, eform cycle, question and question cycle

NoLockForSave

Subject is open for editing in DE

SDVExists

An SDV of this status already exists for this object

InvalidPriority

Specified DCR priority is not valid (priority must be an integer from 1 to 10)

InvalidStatus

Specified status is not valid (eg a new SDV cannot have the status Cancelled)

ObjectLocked

Specified object has a status of Locked so any associated DCRs or SDVs cannot be edited

StudySuspended

The study has a status of Suspended

DcrNotFound

The DCR ID is not recognised

InvalidOperation

The operation is not allowed, e.g. trying to Respond to a Closed DCR

Unknown

Unexpected error occurred

 

Return to top

 

Related Topics

About DCRs

About SDV marks

Managing DCRs and SDVs with the API