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 |
---|---|---|
ADMISSION_TRANSFER | Discharges an ADMISSION and creates a new one in another one (for the same CASE) in the PROTOCOL specified |
|
ADMISSION_JOIN | Changes the PROTOCOL and/or the TRIAL property of an ADMISSION |
|
ADMISSION_REJECT | Rejects an ADMISSION |
|
ADMISSION_RESUME | Resumes a paused ADMISSION |
|
ADMISSION_PAUSE | Pauses an ADMISSION |
|
ADMISSION_DISCHARGE | Discharges an 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 |
|
MESSAGE | Creates a new EVENT |
|
TASK | Inserts a new TASK in an ADMISSION |
|
FORM_TASK | Adds a new FORM in a TASK |
|
FORM_EVENT | Adds a new FORM to an EVENT |
|
PROGRAM_ADD_DIAGNOSIS | Adds a new DIAGNOSIS label to a PROGRAM |
|
PROGRAM_ADD_CATEGORY | Adds a new CATEGORY label to a PROGRAM |
|
PROGRAM_ADD_SPONSOR | Adds a SPONSOR to a PROGRAM |
|
PROGRAM_ADD_AUTHOR | Changes the OWNER of a PROGRAM |
|
PROGRAM_REQUEST | Inserts an EVENT inviting a USER to join a PROGRAM |
|
ITEM_DELETE | Removes an ACTIVITY, FORM or EVENT from a WORKPLAN |
|
ITEM_INSERT | Adds a new ACTIVITY, FORM or EVENT from a WORKPLAN |
|
REPORT_INSERT | Adds a new REPORT TEMPLATE to a WORKPLAN |
|
PLAN_INSERT | Adds a new WORKPLAN to a PROGRAM |
|
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_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_EXISTING_USER | Invite an existing USER to become member of a TEAM |
|
TEAM_EXISTING_TEAM | Invite an existing TEAM to become member of a TEAM |
|
TEAM_MEMBERSHIP | Send a request to become member of an existing TEAM |
|
TEAM_EVENT |
|
|
TEAM_PROGRAM : |
|
|
GROUP_TASK |
|
|
PROGRAM_CREATE | Create a new PROGRAM |
|
PROGRAM_DRAFT | Create a DRAFT version of a PROGRAM |
|
PROGRAM_DELETE | Delete a PROGRAM |
|
PROGRAM_PUBLISH | Publish a DRAFT version of a PROGRAM |
|
SUBSCRIPTION_ADD_MEMBER | Add a member USER or TEAM to a SUBSCRIPTION |
|
SUBSCRIPTION_DELETE | Delete a SUBSCRIPTION |
|
QUESTION_SELECT | Create a new ITEM TEMPLATE (QUESTION) in a FORM TEMPLATE |
|
QUESTION_DELETE | Remove an ITEM TEMPLATE (QUESTION) from a FORM TEMPLATE |
|
NEW_PROTOCOL | Create a new PROTOCOL in a PROGRAM |
|
PROTOCOL_DELETE | Remove a PROTOCOL from a PROGRAM |
|
CONTACT_MERGE | Merge the information of 2 contacts |
|