action_list_patient ()
Function prototype | action_list_patient (session, id , action{, path = NULL} {, action_context = NULL}) |
---|---|
API Version | 2.7.8 and higher |
This function returns a list of possible actions that can be executed by a PATIENT or a PATIENT'S ASSOCIATE.Depending on the "action" parameter the function will return the available choices for the active patient. The "EVENT" action will return the possible MESSAGES that can be posted by a patient as they have been defined in the program template by associating EVENT stage, context "PATIENT" in context visibility and Insertion permission to "Patient". The difference between this function and action_list_case () is that this function is called from the PATIENT point of view, while action_list_case () is called from the PROFESSIONAL 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: |
|
Output parameters: |
|
Request sample: | patient_action_list ( “LCAAAAAAAAAAAA”, "232", "NOTIFICATION", "", "{program: 323}" ); |
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 | |
---|---|
INVALID_TOKEN | The session token provided is not valid |
INSUFFICIENT_PRIVILEGES | The session user does not have the necessary privileges to create request the 'action' indicated |
NVALID_JSON | The JSON string provided in parameter action_context has an invalid format |
CASE.NOT_FOUND | The CASE reference provided in parameter action_context does not correspond to an existing CASE |
TEAM.NOT_FOUND | The TEAM reference provided in parameter action_context does not correspond to a valid TEAM |
PROGRAM.NOT_FOUND | The PROGRAM reference provided in parameter action_context does not correspond to a valid PROGRAM |
INVALID_DATE | The date value provided in parameter action_context does not have a valid format |