Function prototype | task_get (session, task, context) |
---|---|
API Version | All |
API Version | Changes respect to previous version |
---|---|
2.7.25 | Calculation of previous and next TASKs have been removed. See Changes in version 2.7.25 for more details |
IMPORTANT: Remember to call session_init() indicating the appropriate API Version |
Returns all information about a TASK OBJECT.
Input parameters: |
|
Output parameters: |
|
Request sample: | task_get (“LCAAAAAAAAA”, task_id{@source}) |
Response sample: | <?xml version="1.0" encoding="UTF-8"?> <result> <task> <ref>10627</ref> <refs> <task_code>TASK_CMP</task_code> <activity>14</activity> <next> <ref>40882</ref> <status>DONE</status> </next> <prev> <ref>40884</ref> <status>DONE</status> </prev> </refs> <description>HSOM l'utilitza actualment en l'inclusió de programa</description> <name>HSOM l'utilitza actualment en l'inclusió de programa</name> <modified> <date>2014-03-25</date> <hour>14:22:22</hour> <user> <id>6117</id> <nickname>Call C.</nickname> <name_complete>Call Center</name_complete> </user> </modified> <assignments> <assignment> <team> <id>1</id> <description>Linkcare</description> </team> <role> <id>23</id> <description>Enfermero</description> </role> <user> <id>1056</id> <nickname>Call C.</nickname> <name_complete>Call Center</name_complete> </user> </assignment> <assignment> <team> <id>1</id> <description>Linkcare</description> </team> <role> <id>22</id> <description>Gestor de Casos</description> </role> <user> <id>1056</id> <nickname>Call C.</nickname> <name_complete>Call Center</name_complete> </user> </assignment> </assignments> <forms> <form> <ref>87738</ref> <description>Medication plan</description> </form> </forms> <type>CARE</type> <class>PRO_TASK</class> <category> <id>11</id> <description>PATIENT</description> </category> <date>2011-03-25</date> <hour>11:19:11</hour> <duration>20</duration> <follow_report>N</follow_report> <status>DONE</status> <recursive>DAY</recursive> <admission> <ref>10</ref> </admission> <program> <ref>367</ref> <name>OSAKIDETZA ESPIRO</name> <description>Remote spirometry program for OSAKIDETZA</description> <image_info></image_info> </program> <case> <ref>1234</ref> </case> <group_task_cases> <case> <ref>324242</ref> <nickname>Raul P.M.</nickname> <admission> <ref>12312</ref> </admission> </case> </group_task_cases> <task_code_tasks> <task> <ref>54529</ref> <name>Specialist Visit</name> <state>NOT_DONE</state> <date>2014-09-29 09:52:17</date> </task> </task_code_tasks> <permissions> <edit>false</edit> <delete>true</delete> <allow_add_activity>true</allow_add_activity> </permissions> <record> <ref>ref</ref> </record> <locked>false</locked> <image_info>{"resource_ref":14324,"description":"","mimeType":"jpg","code":"","scope":"PROGRAM"}</image_info> </task> </result> <ErrorMsg></ErrorMsg> <ErrorCode></ErrorCode> |
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 get information about the TASK |
TASK.NOT_FOUND | The TASK reference provided in parameter task does not correspond to an existing TASK |
TASK.NOT_AVAILABLE | The TASK reference provided in parameter task does not corresponds to a TASK that is no longer available (this generally means that the TASK status is cancelled, and the active user cannot access cancelled TASKs) |
Changes in version 2.7.25
Calculation of previous and next TASK were removed in version 2.7.25.
In previous versions there existed the nodes <prev> and <next> as follows:
- refs
- next or prev:
- ref: the next or previous task reference
- status: the status of the task, can be DONE/PENDING
- next or prev:
<?xml version="1.0" encoding="UTF-8"?> <result> <task> ... <refs> ... <next> <ref>40882</ref> <status>DONE</status> </next> <prev> <ref>40884</ref> <status>DONE</status> </prev> </refs>