/
admission_referral_list ()

admission_referral_list ()

Function prototype

admission_referral_list (session, admission , type, team)

API Version

2.7.12 and higher

Returns a list of TEAMs or USERs that can be referrals of an ADMISSION

A TEAM can be a REFERRAL of an ADMISSION if:

  • Is the SUBSCRIPTION OWNER and contains at least one PROFESSIONAL with role “Case Manager”

  • OR is a member of the ADMISSION’s SUBSCRIPTION with ROLE “Case Manager” and contains at least one PROFESSIONAL with role “Case Manager”

A USER can be a REFERRAL of an ADMISSION if:

  • Is a member of the SUBSCRIPTION owner with ROLE “Case Manager”

  • Is “Case Manager” in a TEAM that is member of the ADMISSION’s SUBSCRIPTION with ROLE “Case Manager”

Input parameters:

  • session: is the session token obtained in the session_init() call

  • admission: reference to the ADMISSION

  • type: “USER” or “TEAM”. Default value is “TEAM”. Use this parameter to define the type of object that will be returned

  • team: (used only if type=”USER”). The function will return only USERS that are members of the specified TEAM. Note that the TEAM must be “Case Manager” of the SUBSCRIPTION, otherwise no USER will be returned

Output parameters:

  • result: XML with the list of referrals.

    • teams/team: returned only if the type of object requested is “TEAM”. Contains a list of teams

      • ref: reference of the TEAM

      • type: type of TEAM (“UNIT”, “HOSPITAL”…)

      • name: Name of the TEAM

    • users/user: returned only if the type of object requested is “USER”. Contains a list of users.

      • ref: reference of the USER

      • name: Name of the USER

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

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

Request sample:

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

Response sample:

<result> <admission_referrals> <teams> <team> <ref>1</ref> <type>COMPANY</type> <name>Linkcare</name> </team> <team> <ref>12</ref> <type>UNIT</type> <name>Test Team5</name> </team> </teams> <users> <user> <ref>16701</ref> <name>Eleanor McAllan</name> </user> </users> </admission_referrals> </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