/
library_program_list ()

library_program_list ()

Function prototypelibrary_program_list ( session, [target] , [active], [filter_type], [filter_id])
API VersionAll

Returns a list of PROGRAMSThe version of each returned PROGRAM is the last published version or DRAFT if there is no published version.

If target is not “ALL” returns a list of the active/all programs were the selected target TEAM is the OWNER of the program or OWNER of a SUBSCRIPTION to the PROGRAM. If the target is “ALL” retrieves all the PROGRAMS were the active TEAM is “library manager” of the PROGRAM OWNER or of any of the PROGRAM’s SUBSCRIPTION OWNER.

The programs, shown in the list when target = "ALL" are:

  • PROGRAMs where the PROGRAM OWNER is the active TEAM
  • PROGRAMs where the active TEAM is MEMBER of the PROGRAM OWNER TEAM with role 37 (Lib Manager)
  • PROGRAMs with SUBSCRIPTIONs where the SUBSCRIPTION OWNER is the active TEAM
  • PROGRAMs with SUBSCRIPTIONs where the active TEAM is MEMBER of the SUBSCRIPTION OWNER TEAM with role 37 (Lib Manager)

Input

parameters:

  • session: a token obtained by calling session_init ()
  • target: the TEAM that must be OWNER or the program or OWNER of a subscription to the program. It can be selected from the team_membership_list ()
  • active: a choice to show just the active programs or all programs. Non active programs can only be retrieved by a Center Manager user’s active role.
  • filter_type: FAV for Favorites/PRG for Programs/MDC for Main Diagnose Codes. Multiple values can be declared with the "|" separator.
  • filter_id: The code of the selected filter type. Multiple values can be declared with the "|" separator.

Output

parameters:

  • programs: a list of programs
    • program: a program object
      • ref: program reference
      • name
      • description: program description in the active session language
      • active: Y|N If no reported, defalt value is “Y” (yes)
  • 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: If any error occurs, then this value contains any of the standard ERROR CODES

Request

sample:

library_program_list ( “LCAAAAAAAAAAAA”, team_id, , "PRG|MDC", "12|13" )

Response

sample:


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<result>
  <programs>
    <program>
      <ref>322</ref>
      <name>ACTIVE</name>
      <description>#library.program.new_name</description>
      <version>1</version>
      <active>Y</active>
    </program>
    <program>
      <ref>260</ref>
      <name>AISBE</name>
      <description>AISBE</description>
      <version>0</version>
      <active>Y</active>
    </program>
  </programs>
</result>
<ErrorMsg></ErrorMsg>

Notes:

<version> tag is showved only when function is called with context = 'LIBRARY'

Related content