/
subscription_update()

subscription_update()

 

Function prototype

subscription_update (session, subscription)

API Version

ALL

 

Updates the version of the SUBSCRIPTION to the most recent published version of the associated PROGRAM TEMPLATE

This function is used when a SUBSCRIPTION is bound to a version of a PROGRAM TEMPLATE is not the most recent.

When a new ADMISSION is created in a SUBSCRIPTION, it uses the templates (TASK, REPORTS, EVENTs…) defined in the PROGRAM TEMPLATE bound to the SUBSCRIPTION. For this reason is convenient to update SUBSCRIPTIONs that use a deprecated version of a PROGRAM TEMPLATE.

The active user must have role LIBRARY MANAGER in the SUBSCRIPTION

Input parameters:

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

  • subscription: Id of the subscription that will be updated

Output parameters:

  • result: the new program version

  • 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:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <result>2</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 update the SUBSCRIPTION



Related content