GMV CLOSEST READING (2496)    REMOTE PROCEDURE (8994)

Name Value
NAME GMV CLOSEST READING
TAG CLOSEST
ROUTINE GMVGETD
RETURN VALUE TYPE SINGLE VALUE
AVAILABILITY RESTRICTED
INACTIVE ACTIVE
DESCRIPTION
This remote procedure call returns the observation date/time and reading 
of the record closest to the date/time specified for the patient and vital
type.
INPUT PARAMETER
  • GMVDFN
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   12
    REQUIRED:   YES
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
    A pointer to the Patient (#2) file (i.e., DFN).
    
  • GMVDT
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   14
    REQUIRED:   NO
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
    The date/time to search from. The default is NOW.
    
  • GMVT
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   5
    REQUIRED:   YES
    SEQUENCE NUMBER:   3
    DESCRIPTION:   
    The vital type abbreviation as it appears in FILE 120.51, Field 1 (e.g., 
    WT).
    
  • GMVFLAG
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   1
    REQUIRED:   NO
    SEQUENCE NUMBER:   4
    DESCRIPTION:   
    A flag to indicate if the search should look before or after the date/time
    specified in the GMVDT value where 1 indicates before, 2 indicates after
    and 0 indicates either direction.
    
RETURN PARAMETER DESCRIPTION
Returns a string composed of two pieces. The first piece contains the 
 > D CLOSEST(.TEST,GMVDFN,GMVDT,GMVT,GMVFLAG) ZW TEST
 > TEST="3081106.142926^135"
observation date/time (FILE 120.5, Field .01) of the record that was 
found. The second piece contains the rate (FILE 120.5, Field 1.2) of the 
record. If there is an error, the first piece will be -1 and the second 
piece will be the error text.
 
 Example:
 
 > S GMVDFN=134,GMVDT=3090225.08,GMVT="WT",GMVFLAG=0