/
ACTION TOKENS

ACTION TOKENS

An ACTION TOKEN is a sequence of characters that contains the information necessary to execute an action by means of an invocation to API function action_exec () .

The information stored in the action token is structured in the same way as the query parameters in an URL:

  • A list of parameters separated by a “&” symbol

  • Each parameter is a pair on {parameter name, parameter value} separated by a '=' symbol.

Example:

ACTION=MESSAGE&PROGRAM_ID=376&DIRECTION=2&EVENT_CODE=#EVENT:CARE

In this example, the parameters encoded in the action token with their respective values are:

  • ACTION = “MESSAGE”

  • PROGRAM_ID = “376”

  • DIRECTION = 2

  • EVENT_CODE = “#EVENT:CARE”

The “ACTION” parameter

Al ACTION TOKENS must have at least the parameter “ACTION”, because it is the one that informs about the action that will be executed. The list of values supported is:

“ACTION” PARAMETER VALUE

Action executed

Additional parameters

“ACTION” PARAMETER VALUE

Action executed

Additional parameters

ADMISSION_TRANSFER

Discharges an ADMISSION and creates a new one in another one (for the same CASE) in the PROTOCOL specified

  • ADMISSION_ID: Reference to the affected ADMISSION

  • PROTOCOL_ID: Destination protocol

  • DATE (optional): Date of transfer. If empty, the current date will be used

  • TRIAL: (optional) Used in “TRIAL” PROGRAMs. Allows to indicate type of TRIAL (“I”: Intervention, “C”: Control) of the ADMISSION transferred to the new PROTOCOL

ADMISSION_JOIN

Changes the PROTOCOL and/or the TRIAL property of an ADMISSION

  • ADMISSION_ID: Reference to the affected ADMISSION

  • PROTOCOL_ID: (optional) Destination protocol

  • TRIAL: (optional) Used in “TRIAL” PROGRAMs. Allows to indicate type of TRIAL (“I”: Intervention, “C”: Control) of the ADMISSION transferred to the new PROTOCOL

ADMISSION_REJECT

Rejects an ADMISSION

  • ADMISSION_ID: Reference to the affected ADMISSION

ADMISSION_RESUME

Resumes a paused ADMISSION

  • ADMISSION_ID: Reference to the affected ADMISSION

ADMISSION_PAUSE

Pauses an ADMISSION

  • ADMISSION_ID: Reference to the affected ADMISSION

ADMISSION_DISCHARGE

Discharges an ADMISSION

  • ADMISSION_ID: Reference to the affected ADMISSION

ADMISSION_ENROLL

Creates a new ADMISSION.

It will be created in a SUBSCRIPTION of the PROGRAM_ID where the active user is member with the active TEAM

  • PROGRAM_ID: Reference to the PROGRAM for which the ADMISSION will be created

  • CASE_ID: Reference to the CASE for whom the ADMISSION will be created

MESSAGE

Creates a new EVENT

  • CASE_ID: (optional) The EVENT will be associated to the CASE referenced by CASE_ID

  • ADMISSION_ID: (optional) The EVENT will be associated to the ADMISSION referenced by ADMISSION_ID

  • PROGRAM_ID: (optional) This parameter is ignored if ADMISSION_ID has a value. The EVENT will be associated to the PROGRAM referenced by PROGRAM_ID

  • PROTOCOL_ID: (optional) This parameter is ignored if ADMISSION_ID has a value. The EVENT will be associated to the PROTOCOL referenced by PROTOCOL_ID

  • EVENT_CODE: (optional) EVENT CODE assigned to the EVENT. If a PROGRAM_ID has been provided, then the system will try to locate an EVENT TEMPLATE defined in the PROGRAM with the EVENT_CODE provided

  • TARGET_ROLE: (optional): Assign the EVENT to the ROLE referenced by TARGET_ROLE

  • TARGET_TEAM: (optional): Assign the EVENT to the TEAM referenced by TARGET_TEAM

  • TARGET_USER: (optional): Assign the EVENT to the USER referenced by TARGET_USER

  • SUBSCRIPTION_TEAM: (optional) This parameter is ignored if ADMISSION_ID has a value. The value of SUBSCRIPTION_TEAM is used along with PROGRAM_ID and CASE_ID to locate an ADMISSION that will be assigned to the EVENT.

  • DATE: (optional) Date assigned to the EVENT

  • ISSUER_TYPE: (optional) “POSTER”/”PATIENT”/”OTHER”. Type of issuer of the EVENT (default value is “POSTER”)

  • ISSUER_NAME: (optional): This parameter is only used if ISSUER_TYPE = “OTHER”

  • CHANNEL: (optional) Type of channel assigned to the EVENT (EMAIL, PHONE…)

TASK

Inserts a new TASK in an ADMISSION

  • ADMISSION_ID: Reference to the affected ADMISSION

  • WORKPLAN: Reference to the WORKPLAN used as TEMPLATE to create the new TASK

  • DATE: (optional) Date assigned to the new TASK

  • EVENT_ID: (optional) If provided, the TASK will be linked to the EVENT referenced by EVENT_ID

FORM_TASK

Adds a new FORM in a TASK

  • ID: Reference to the TASK where the new FORM will be created

  • TEMPLATE_ID: Reference to a FORM TEMPLATE used to create the new FORM

FORM_EVENT

Adds a new FORM to an EVENT

  • ID: Reference to the EVENT where the new FORM will be created

  • TEMPLATE_ID: Reference to a FORM TEMPLATE used to create the new FORM

PROGRAM_ADD_DIAGNOSIS

Adds a new DIAGNOSIS label to a PROGRAM

  • PROGRAM: Reference to the PROGRAM

  • CODE_ID: ID of the DIAGNOSIS assigned

  • CODE: Codification system of CODE_ID (e.g. “DIAGNOSIS.MDC“)

PROGRAM_ADD_CATEGORY

Adds a new CATEGORY label to a PROGRAM

  • PROGRAM: Reference to the PROGRAM

  • CODE_ID: ID of the CATEGORY assigned

  • CODE: Codification system of CODE_ID (e.g. “PROGRAM.CATEGORY“)

PROGRAM_ADD_SPONSOR

Adds a SPONSOR to a PROGRAM

  • PROGRAM: Reference to the PROGRAM to which the SPONSORwill be added

  • TEAM_ID: Reference to the TEAM added as SPONSOR

PROGRAM_ADD_AUTHOR

Changes the OWNER of a PROGRAM

  • PROGRAM: Reference to the PROGRAM

  • TEAM_ID: Reference to the TEAM that will be the OWNER of the PROGRAM

PROGRAM_REQUEST

Inserts an EVENT inviting a USER to join a PROGRAM

  • PROGRAM: Reference to the PROGRAM

  • VERSION: Version of the PROGRAM

  • TEAM: Reference to the TEAM that will be the OWNER of the PROGRAM

ITEM_DELETE

Removes an ACTIVITY, FORM or EVENT from a WORKPLAN

  • WORKPLAN: Reference to the WORKPLAN affected by the action

  • ACTIVITY: (optional) Reference to the ACTIVITY that will be removed from the WORKPLAN

  • REPORT: (optional) Reference to the REPORT that will be removed from the WORKPLAN

  • TEMPLATE: (optional) Reference to the FORM TEMPLATE that will be removed from the WORKPLAN

ITEM_INSERT

Adds a new ACTIVITY, FORM or EVENT from a WORKPLAN

  • PLAN: Reference to the WORKPLAN affected by the action

  • PROGRAM: Reference to the PROGRAM

  • TEMPLATE: Possible values:

    • “NEW” to create a new ACTIVITY TEMPLATE

    • A reference to an existing TEMPLATE

REPORT_INSERT

Adds a new REPORT TEMPLATE to a WORKPLAN

  • PLAN: Reference to the WORKPLAN affected by the action

  • PROGRAM: Reference to the PROGRAM

PLAN_INSERT

Adds a new WORKPLAN to a PROGRAM

  • PROGRAM: Reference to the PROGRAM where the WORKPLAN will be inserted

  • PROTOCOL: Reference to the PROTOCOL where the WORKPLAN will be inserted

TEAM_NEW_USER

Executes no action. When action_exec() is invoked it just returns a value to inform the client that it should present a screen to create a new USER and add it as member of an existing TEAM referenced by TEAM_REQUESTER

  • TEAM_REQUESTER: Reference to the TEAM where the new USER should be added as member

TEAM_NEW_TEAM

Executes no action. When action_exec() is invoked it just returns a value to inform the client that it should present a screen to create a new TEAM as member of an existing TEAM referenced by TEAM_REQUESTER

  • TEAM_REQUESTER: Reference to the TEAM where the new TEAM should be added as member

TEAM_EXISTING_USER

Invite an existing USER to become member of a TEAM

  • REPLYER: Reference to the USER that is invited

  • TEAM_REQUESTER: Reference to the TEAM that sends the INVITATION

TEAM_EXISTING_TEAM

Invite an existing TEAM to become member of a TEAM

  • REPLYER: Reference to the TEAM that is invited

  • TEAM_REQUESTER: Reference to the TEAM that sends the INVITATION

TEAM_MEMBERSHIP

Send a request to become member of an existing TEAM

  • REPLYER: Reference to the TEAM requested

  • TEAM_REQUESTER: Reference to the TEAM that sends the request to become a member of REPLYER

TEAM_EVENT

 

 

TEAM_PROGRAM :

 

 

GROUP_TASK

 

 

PROGRAM_CREATE

Create a new PROGRAM

  • FORM: Questionnaire with the properties of the new PROGRAM (Stratified, Trial, Exclusion, Randomized)

  • TEAM: (optional) If a reference to a TEAM is provided, a SUBSCRIPTION to the new PROGRAM will be automatically created

  • VERSION: Version assigned to the PROGRAM created

PROGRAM_DRAFT

Create a DRAFT version of a PROGRAM

  • PROGRAM: Reference to the PROGRAM for which the DRAFT version will be created

PROGRAM_DELETE

Delete a PROGRAM

  • PROGRAM: Reference to the PROGRAM to delete

  • VERSION: Version of the PROGRAM to delete

PROGRAM_PUBLISH

Publish a DRAFT version of a PROGRAM

  • PROGRAM: Reference to the PROGRAM to publish

  • VERSION: Version of the PROGRAM to publish

SUBSCRIPTION_ADD_MEMBER

Add a member USER or TEAM to a SUBSCRIPTION

  • SUBSCRIPTION: Reference to the SUBSCRIPTION to delete

  • TYPE: (“USER”/”TEAM”) type of member added

  • ID: Reference to the USER or TEAM (depending on the value of TYPE)

  • PROGRAM: Used only if the SUBSCRIPTION does not exist yet. A new SUBSCRIPTION to the PROGRAM will be created

  • TEAM: Used only if the SUBSCRIPTION does not exist yet. A new SUBSCRIPTION will be created for the specified TEAM.

SUBSCRIPTION_DELETE

Delete a SUBSCRIPTION

  • SUBSCRIPTION: Reference to the SUBSCRIPTION to delete

QUESTION_SELECT

Create a new ITEM TEMPLATE (QUESTION) in a FORM TEMPLATE

  • ID: Reference to the FORM TEMPLATE where the ITEM will be inserted

  • TYPE: Type of ITEM (“VALUE”, “VAS”, “FILE”, “ACTION”…)

QUESTION_DELETE

Remove an ITEM TEMPLATE (QUESTION) from a FORM TEMPLATE

  • TEMPLATE: Reference to the FORM TEMPLATE

  • QUESTION: Reference to the ITEM

NEW_PROTOCOL

Create a new PROTOCOL in a PROGRAM

  • PROGRAM: Reference to the PROGRAM

  • VERSION: Version of the PROGRAM

PROTOCOL_DELETE

Remove a PROTOCOL from a PROGRAM

  • PROTOCOL: Reference to the PROTOCOL to delete

  • PROGRAM: Reference to the PROGRAM

  • VERSION: Version of the PROGRAM

CONTACT_MERGE

Merge the information of 2 contacts

  • FROM: Reference to a PERSON object whose contact information will be added to the PERSON referenced by TO. At the end of the process this PERSON will be deleted

  • TO: Reference to the PERSON that will hold the merged information

Related content