/
case_get_educational_tasks ()

case_get_educational_tasks ()

Function prototype

case_get_educational_tasks (session, case , filter)

API Version

2.7.25 and higher

Returns the list of EDUCATIONAL TASKS assigned to the CASE

Returns the list of TASKS marked as “EDUCATIONAL MATERIAL” of all ADMISSIONS of a CASE.

For any purpose, an EDUCATIONAL TASK is a normal TASK with an special behavior and some restrictions (see EDUCATIONAL TASKS for more information)

This operation is restricted by privileges granted to the session's user. It is only allowed if:

  • If the CASE corresponds to the same session's user then: 

    • If the SESSION's user active ROLE is “PATIENT”, then only existing TASKS assigned to the CASE (role = PATIENT) will be returned

    • If the SESSION's user active ROLE is any PROFESSIONAL ROLE (e.g. “CASE MANAGER”) then all existing TASKS will be returned

  • Otherwise, if the session's user is a PROFESSIONAL (doctor): all existing TASKS from SUBSCRIPTIONS where the PROFESSIONAL ia member will be returned

  • Otherwise, if the session's user is an ASSOCIATE of the CASE and the permission #PERMISSIONS.TASK_DELEGATE is granted for browsing or editing: all existing TASKS assigned to the CASE (role = PATIENT) will be returned

  • Otherwise: an error will be returned (no permissions)

Output parameters:

  • tasks: a list of TASKS and/or EVENTS with complementary information 

    • task: summarised information about a TASK

      • forms: Summary of FORMs included in the TASK. For each FORM the following information is provided:

        • ref: Reference to the FORM

        • code: FORM CODE. Introduced in API version 2.7.15

        • description: Name of the FORM

  • ErrorMsg: any fault in the call, either in the validation of input parameters, errors in the connection to the database or any other error, this parameter returns the error message produced

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

Request sample:

api_function ( “LCAAAAAAAAAAAA”, "xxx", "yyy" );

Response sample:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <result> <tasks> <task> <ref>55380</ref> <code>HW_RECOMMENDATIONS</code> <description>Hand Washing Recommendations</description> <type>EDU</type> <locked>false</locked> <external>false</external> <date>2022-06-28 00:00:00</date> <last_modification>2022-06-28 00:00:00</last_modification> <status>OPEN</status> <image_info>{"resource_ref":14324,"description":"","mimeType":"jpg","code":"","scope":"PROGRAM"}<image_info> <admission> <ref>21844</ref> </admission> <subscription> <ref>9876</ref> </subscription> <program> <ref></ref> <description></description> </program> <progress>55</progress> <forms> <form> <ref>12312</ref> <code>FRM_1</code> <description>Form 1</description> </form> <form> <ref>12313</ref> <code>FRM_2</code> <description>Form 2</description> </form> </forms> </task> </tasks> </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 …



Related content