Function prototype | user_get_program_list (session, [user], [filter]) |
---|
API Version | 2.7.14 and higher |
---|
Supported interfaces | SOAP, REST (from API Version 2.7.25) |
---|
Returns a list of PROGRAMs with a SUBSCRIPTION in which the user in member |
Input parameters: | session: a token obtained by calling session_init () user: a USER reference. If no USER is specified, the current session user will be assumed filter: JSON structure with optional filters. See TASK FILTER (JSON) for more information. Only the following filters are supported: status: to define which TASKs should be counted (closed, opened, all) program: to calculate only the information about a program
|
Output parameters: | result/program_list: root node of the response total: summary of open and closed TASKs and EVENTs tasks: summary about the TASKs of the USER. Note that this count only includes TASKS scheduled up to the current day (i.e. it doesn’t count TASKS scheduled for future days). TASKs that are “CANCELED”, “EXPIRED” or “PAUSED” are not included in the count events: summary about the EVENTs of the USER. Note that this count only includes EVENTS scheduled up to the current day (i.e. it doesn’t count TASKS scheduled for future days) open: total number of EVENTs that the USER has not completed yet closed: total number of EVENTs that the USER has completed flagged: Number of EVENTs with a flag set (PRIORITY <> 0). Introduced in API version 2.7.15
admissions: Number of ADMISSIONs classified by status.Contains a list of subnodes indicating the number of ADMISSIONS for each status. Note that the subside for a specific status will not be present if there are no ADMISSIONs with that status. Introduced in API version 2.7.26 incomplete: number of ADMISSION with ‘INCOMPLETE’ status (ADMISSIONs that have been created without the minimum required data) enrolled: number of ADMISSION with ‘ENROLLED’ status active: number of ADMISSION with ‘ACTIVE’ status rejected: number of ADMISSION with ‘REJECTED’ status discharged: number of ADMISSION with ‘DISCHARGED’ status paused: number of ADMISSION with ‘PAUSE’ status
alerts: number of unread alerts. Introduced in API version 2.7.24 appointments: Number of APPOINTMENTS planned for today and other future dates. Introduced in API version 2.7.32 today: Number of APPOINTMENTS planned for today (in the local timezone of the active SESSION). This number will not include any APPOINTMENT planned before one hour in the past. week: Number of APPOINTMENTS planned of the next week (not including the APPOINTMENTS planned for today)
programs/program: Node with information about the PROGRAM ref: reference to the PROGRAM name: Name of the program description: Description of the program (translated to the current session language) image_info: Picture associated to the PROGRAM expressed as a LIBRARY RESOURCE INFO (JSON) tasks: summary about the TASKs of the USER events: summary about the EVENTs of the USER open: number of EVENTs that the USER has not completed yet in this PROGRAM closed: number of EVENTs that the PATIENT has completed in this PROGRAM flagged: Number of EVENTs with a flag set (PRIORITY <> 0). Introduced in API version 2.7.15
admissions: Number of ADMISSIONs classified by status. Contains a list of subnodes indicating the number of ADMISSIONS for each status. Note that the subside for a specific status will not be present if there are no ADMISSIONs with that status. Introduced in API version 2.7.26 incomplete: number of ADMISSION with ‘INCOMPLETE’ status (ADMISSIONs that have been created without the minimum required data) enrolled: number of ADMISSION with ‘ENROLLED’ status active: number of ADMISSION with ‘ACTIVE’ status rejected: number of ADMISSION with ‘REJECTED’ status discharged: number of ADMISSION with ‘DISCHARGED’ status paused: number of ADMISSION with ‘PAUSE’ status
teams: List of TEAM OWNERS of the subscriptions where the patient has an ADMISSION
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: the code of the error (if any)
|
Request example
user_get_program_list ( “LCAAAAAAAAAAAA”, 32131, "{'status': 'pending'}")
Reponse
The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API
Return Error codes
| |
---|
INVALID_TOKEN | The session token provided is not valid |
INSUFFICIENT_PRIVILEGES | The session user does not have the necessary privileges to request the list of favorite items of the CASE |
USER.NOT_FOUND | The USER reference provided does not correspond to an existing USER |
Optional filters
This function accepts a filter parameter which is expressed in JSON format. This filter allows to specify which PROGRAMs should be returned.
The possible filter fields are:
status: (pending/all). Default value = "all". Depending on the value, the list of PROGRAMs will include:
program: comma separated string with PROGRAM IDs. If provided, only the TASKs and EVENTs of the selected PROGRAMs will be counted
team: comma separated string with TEAM IDs. If provided, only the TASKs and EVENTs in SUBSCRIPTIONs owned by the indicated TEAMs will be counted
If any filter is not specified, the default value will be applied.
Example
FILTER