VPS GET ALL CLINICS (3367)    REMOTE PROCEDURE (8994)

Name Value
NAME VPS GET ALL CLINICS
TAG ALLCLN
ROUTINE VPSRPC10
RETURN VALUE TYPE GLOBAL ARRAY
AVAILABILITY RESTRICTED
WORD WRAP ON TRUE
VERSION 1
DESCRIPTION
This RPC returns a list of hospital locations (defined in the HOSPITAL LOCATION file), which conform the criteria.
INPUT PARAMETER
  • HLTYPES
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
    List of location types separated by commas (internal values of the TYPE field of the HOSPITAL LOCATION file):
     
    Only locations of the types defined by this parameter are selected by the remote procedure. By default ($G(HLTYPES)=""), all locations are selected.
      C  Clinic
      F  File Area
      I  Imaging
      M  Module
      N  Non-Clinic Stop
      OR Operating Room
      W  Ward
      Z  Other Location
    
  • DIVIEN
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
    Division IEN. If this parameter is defined and greated than zero then only the locations associated with this division are selected.
    
  • PART
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   30
    SEQUENCE NUMBER:   3
    DESCRIPTION:   
    The partial match restriction.
    
  • FLAGS
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   4
    DESCRIPTION:   
    Flags that control the execution (can be combined):
     
      A  Include active locations (default)
      B  Backwards. Traverses the index in the opposite
         direction of normal traversal.
      I  Include inactive locations
    
  • NUMBER
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   5
    DESCRIPTION:   
    Maximum number of entries to return. A value of "*" or no value in this parameter designates all entries
    
  • FROM
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   6
    DESCRIPTION:   
    The index entry(s) from which to begin the list
      ^01: From Name
      ^02: From IEN
     
    For example, a FROM value of "VA" would list entries following VA. You can use the 2nd and 3rd "^"- pieces of the @RESULT@(0) node to continue the listing in the subsequent procedure calls.
     
    NOTE: The FROM value itself is not included in the resulting list
    See description of the LIST^DIC for more details about the PART, NUMBER, and FROM parameters.
    
RETURN PARAMETER DESCRIPTION
A negative value of the first "^"-piece of the RESULTS(0) indicates that an error occurred during the execution of the remote procedure. In this case, the second piece of the RESULT(0) will contain number of the error descriptors returned in the
                       ^01: Number of locations
                       ^02: From Name
                       ^03: From IEN
 
  RESULTS(1..n)       Hospital Location
                       ^01: IEN
                       ^02: Name
                       ^03: Location Type (internal)
                       ^04: Institution IEN
                       ^05: Division IEN
 subsequent nodes of the RESULTS array:
                       ^06: Active (0/1)
NOTE: The 6th "^"-piece of the location record (Active) is populated only if both "A" and "I" flags are used.
  RESULTS(0)         Result Descriptior
                     ^01: The last error code
                     ^02: Message
 
Othewise, number of hospital locations and the value of the FROM parameter for the next procedure call are return in the RESULTS(0) and the subsequent nodes of the global array contain the locations.
 
  RESULTS(0)          Result Descriptor