goal_get ( )
Function prototype | goal_get (session, [data_code], [level], [ref], [type], [date]) |
---|---|
API Version | 2.6.15 and higher |
SOAP, REST (Since API Version 2.8.1) |
Description
Returns the list of GOAL OBJECT that match the filter defined by the input parametersDetailed explanation of the function.
Restrictions: though all the parameters are optional, there are some combinations that have a special behavior or are prohibited
If level = ADMISSION, it is mandatory to provide a valid ref (to avoid retrieving GOALS for all ADMISSIONS in the system)
If level <> ADMISSION, then the GOALS at ADMISSION level are not included (to avoid retrieving GOALS for all ADMISSIONS in the system)
Required permissions: The active user must have role XXXX. Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.
Input parameters: |
|
Output parameters: |
|
Request example
goal_get ( “LCAAAAAAAAAAAA”, "WEIGHT", "ADMISSION", 12342, "MAX", "2018-01-03");
Response
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
ERROR CODE |
|
---|---|
INVALID_TOKEN | Invalid session token |
OBJECT_NOT_FOUND | The object referenced by ref in the specified level (ADMISSION, PROGRAM...) does not exist |
INSUFFICIENT_PRIVILEGES | The session user does not have enough privileges to create a GOAL OBJECT |
WRONG_PARAMS | Any of the parameters passed to the function does not have a valid value |
INVALID_DATE | The date provided does not have a valid value |
EMPTY_PARAMS | A mandatory parameter is empty |