VEJDWPB GET VISITS ONLY

TITLEVALUE
NAMEVEJDWPB GET VISITS ONLY
DESCRIPTIONThis loops through the Visit file (#9000010) AA cross reference to find
all visits for a patient and date range
TAGVS
ROUTINEVEJDVST2
INPUT PARAMETERSSEQUENCE NUMBER1
INPUT PARAMETERDFN
DESCRIPTIONThis is the pointer value to the Patient file
PARAMETER TYPELITERAL
REQUIREDYES
MAXIMUM DATA LENGTH12

INPUT PARAMETERSSEQUENCE NUMBER2
INPUT PARAMETERBEG
DESCRIPTIONOptional - this is the starting date for the search in internal fileman
date/time format of the visit. If not passed, then a date of T-365 will
be used.
PARAMETER TYPELITERAL
REQUIREDNO
MAXIMUM DATA LENGTH14

INPUT PARAMETERSSEQUENCE NUMBER3
INPUT PARAMETEREND
DESCRIPTIONOptional - this is the ending date/time for the search in internal fileman
format. If not passed, then a date of DT+.5 will be used.
PARAMETER TYPELITERAL
REQUIREDNO
MAXIMUM DATA LENGTH14

INPUT PARAMETERSSEQUENCE NUMBER4
INPUT PARAMETERZLOC
DESCRIPTIONOptional - you can look for visits for specific locations (file 44). The
LC array is expected to be in the format LC(ien)="" where ien is the
pointer to file 44.
PARAMETER TYPELIST
REQUIREDNO
MAXIMUM DATA LENGTH15

INPUT PARAMETERSSEQUENCE NUMBER5
INPUT PARAMETERCAT
DESCRIPTIONThis flag controls whether service categories should be screened or not.
It is optional, the default value is to screen entries.

I +CAT then do not screen entries.
I '$G(CAT) then do not return entries whose service category is E,D,X,N,
or C
PARAMETER TYPELITERAL
REQUIREDNO
MAXIMUM DATA LENGTH1

INPUT PARAMETERSSEQUENCE NUMBER6
INPUT PARAMETERVECLIN
DESCRIPTION VECLIN is a local array which contains a list of clinics to be used to
screen appointment list. Only those appointments in these clinics will
be returned.
VECLIN - optional - passed by reference
VECLIN(#) = clinic name or ien
PARAMETER TYPELIST
REQUIREDNO
MAXIMUM DATA LENGTH

INPUT PARAMETERSSEQUENCE NUMBER7
INPUT PARAMETERSCODE
DESCRIPTION This is a list of 3-digit stop codes used to screen appointments
returned. Only those clinic locations whose stop code is in this list
will be returned.

SCODE - optional - passed by reference
SCODE(#) = 3-digit stop code (lookup on C xref)
PARAMETER TYPELIST
REQUIREDNO
MAXIMUM DATA LENGTH

INPUT PARAMETERSSEQUENCE NUMBER8
INPUT PARAMETERVEDIV
DESCRIPTION This is a list of divisions to be used to screen appointments. Only
appointments in clinics for divisions in this list will be returned.

VEDIV - optional - passed by reference
VEDIV(#) = division name or ien
PARAMETER TYPELIST
REQUIREDNO
MAXIMUM DATA LENGTH

RETURN VALUE TYPEGLOBAL ARRAY
RETURN PARAMETER DESCRIPTIONThe data is passed to the broker in the ^TMP("VEJD",$J,"VSIT",#) where
^TMP("VEJD",$J,"VSIT",#) = p1^p2^p3^p4^p5^p6 where
p1 := A (if admission) or V (if visit)
p2 := visit file pointer (#9000010)
p3 := visit/admission external date/time
p4 := location name (file 44)
p5 := visit/admission internal fileman date/time
p6 := pointer to location (file 44)

Or it will return
-1^No Patient DFN or
-1^No visits found
AVAILABILITYAGREEMENT
INACTIVE
CLIENT MANAGER
WORD WRAP ONTRUE
VERSION
SUPPRESS RDV USER SETUP
APP PROXY ALLOWED