/
† case_action_list ()

† case_action_list ()

Definitively removed in API Version 2.8.1

DEPRECATED IN API VERSION 2.7.8 (replaced by action_list_case ())

Function prototype

case_action_list (session, case, [program = NULL], [team = NULL] , action, [path = NULL], [parameter = “TODAY”])

API Version

ALL

This function returns a list of possible actions that a PROFESSIONAL can execute for a CASE.

The difference between this function and patient_action_list() is that this function is called from the PROFESSIONAL point of view, while patient_action_list() is called from the PATIENT point of view (a professional can execute actions on a patient that are not allowed to the patient itself).

The input parameter “action” describes the type of action

Input

parameters:

  • session: is the session token obtained in the session_init() call

  • case: is a CASE reference id (mandatory)

  • program: (optional, default = NULL) If provided it will be used to return only the actions for a specific PROGRAM

  • team: (optional, default = NULL) If provided it will be used to return only the actions for the PROGRAMS where the subscription owner is the selected TEAM

  • action:

    • EVENT: the function will return all the available EVENT actions for the CASE

    • MNG: the function will return all the possible ENROLL actions for a CASE. A CASE can only be enrolled in existing SUBSCRIPTIONS where

      • The active USER is owner or member of the SUBSCRIPTION with ROLE "Case Manager" or "Staff"

      • The selected CASE does not already have an active ADMISSION in that SUBSCRIPTION

  • path: currently this function does not use the path parameter. Reserved for future use. The goal of this parameter is to organize the actions hierarchically (as in a file tree where path represents the subdirectory)

  • parameter: is the date that will be associated to the action. If no date is specified, then the current date will be used

Output

parameters:

  • result: XML with the list of possible actions. Each action in the XML contains:

    • ref: action reference. If the action is of class PATH, then this it can be used to call again the function passing the value in the path parameter to obtain a new list of actions

    • name: short name in the active session’s language

    • description: description in the active session’s language

    • class: PATH | ACTION

    • type: action type

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request

sample:

case_action_list ( “LCAAAAAAAAAAAA”, "232", , ,"MNG" );

Response

sample:

 

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <result> <actions> <description>Select an action</description> <action> <ref>action_token</ref> <name>short_name</name> <description>desc</description> <class>ACTION</class> </action> <action>...</action> </actions> </result> <ErrorMsg></ErrorMsg> <ErrorCode></ErrorCode>

 

 

Notes:

 

Return Error codes

ERROR CODE

 

ERROR CODE

 

INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to create an ADMISSION in the SUBSCRIPTION or the TEAM reference provided is not a member of the SUBSCRIPTION

CASE.NOT_FOUND

The CASE reference provided does not correspond to an existing CASE

TEAM.NOT_FOUND

The TEAM reference provided does not correspond to a valid TEAM

PROGRAM.NOT_FOUND

The PROGRAM reference provided does not correspond to a valid PROGRAM

WRONG_PARAMS

Any of the parameters passed to the function has an invalid value

 

Related content