item_status()

Function:
item_status ($bnum)

Purpose:
item_status() needs to return item availability information to Locum. Locum's client class (locum_client) parses this information and formats it for Locum's calling application.

Arguments:
$bnum : (string) required An item's bibliographic number or unique identifier.

Expected Result:

Array
(
    [holds] => (int) # of holds/reserves on the bib item (default: 0)
    [on_order] => (int) Total # of items on order (default: 0)
    [orders] => Array of item records (1 for each item in the system)
        (
            [] => (string) System on-order messages for each location awaiting an order
        )
    [items] => Array of item records (1 for each item in the system)
        (
            [] => Array
                (
                    [location] => (string) Human-readable location name
                    [loc_code] => (string) Location code
                    [callnum] => (string) Call #
                    [statusmsg] => (string) Status of the item as reported by the system
                    [due] => (int) UNIX timestamp of the item's due date. (default: 0)
                    [avail] => (int) 1 = item is available, 0 = item is unavailable
                    [age] => (string) Age category as defined by you
                    [branch] => (string) Branch code/identifier
                )
        )
)

Example:
Array
(   
    [holds] => 7
    [on_order] => 5
    [orders] => Array
        (   
            [0] => 3 copies ordered for New Fiction Express on 07-21-2009.
            [1] => 2 copies ordered for New Fiction on 07-22-2009.
        )
 
    [items] => Array
        (   
            [0] => Array
                (   
                    [location] => New Fiction
                    [loc_code] => m1fgr
                    [callnum] => Fic BARBERY
                    [statusmsg] => DUE 10-07-09
                    [due] => 1254888000
                    [avail] => 0
                    [age] => adult
                    [branch] => dl
                )
 
            [1] => Array
                (   
                    [location] => New Fiction
                    [loc_code] => m1fgr
                    [callnum] => Fic BARBERY
                    [statusmsg] => DUE 09-13-09
                    [due] => 1252814400
                    [avail] => 0
                    [age] => adult
                    [branch] => nc
                )
        )
)