DSIC GET VISITS/APPOINTMENT

TITLEVALUE
NAMEDSIC GET VISITS/APPOINTMENT
DESCRIPTIONThis will call the DSIC GET SCHED APPTS rpc to get the scheduled
appointments for the user inputted date range. It uses SELECTED^VSIT to
find all visits. It uses IN5^VADPT to get the current admission. It
will also get historical admission data, but manipulate the hospital
location pointer values to the Visit LOCATION (#9999999.06) file,
that points to the INSTITUTION (#4) file.
TAGVSIT
ROUTINEDSICVT0
INPUT PARAMETERSSEQUENCE NUMBER1
INPUT PARAMETERDATA
DESCRIPTION DATA - required - DFN ^ BEG ^ END ^ ZLOC ^ FLG ^ MODS ^ CAT
DFN - required - pointer to file 2
BEG - optional - starting Fileman date/time
END - optional - ending fileman date/time - default = DT+.5
ZLOC - optional - clinic, either name or file 44 ien retained for
backwards compatibility
FLG - optional - type of appts to return
0 - active/kept appts (past) - default
1 - future appts only
2 - both past and future appts
MODS - optional - string of codes determine which encounters to return
default value = ASV
MODS["A" - return current admission regardless of date
MODS["S" - return schedule appts
MODS["V" - return visit file entries (#9000010)
CAT - optional - default value is 0 screen visits by service category
1 - return all visits
0 or - do not return historical type visits
PARAMETER TYPELITERAL
REQUIREDYES
MAXIMUM DATA LENGTH

INPUT PARAMETERSSEQUENCE NUMBER2
INPUT PARAMETERSCR
DESCRIPTIONSCR - optional - added 7/3/2002 - sgm
passed by reference
format: SCR(subscript) = code ^ value where
code = C for hospital location #44
D for medical center division #40.8
S for 3-digit stop code from file 40.7 (not ien)
value = for codes C,D - any unique lookup value or ien
for code S - 3-digit stop code (not ien to 40.7)
PARAMETER TYPELIST
REQUIREDNO
MAXIMUM DATA LENGTH250

RETURN VALUE TYPEGLOBAL ARRAY
RETURN PARAMETER DESCRIPTIONIt returns to the broker, via the global array ^TMP("DSIC",$J,"VSIT",#)
1. All visits and current admission
2. Any scheduled visit for which there is no corresponding visit file
entry for the same date/time and clinic.
3. Format of data returned p1^p2^p3^p4^p5^p6 where
p1 := A (if admission) V (if visit) S (if scheduled appt)
p2 := visit file ien
p3 := date/time in external format
p4 := location name (from file 44)
p5 := date/time in internal fileman format
p6 := location file (#44) ien

p4 & p6 may be entries from the INSTITUTION (#4) file. The
SELECTED^VSIT API has different meanings for historical
hospitalizations versus Outpatient Visits. For visits, the
meanings above apply. For Hospitalizations, p6 is a pointer to the
INSTITUTION (#4) file and p4 is null.


4. If no matching data was found then return
-1^Invalid patient DFN
-1^No visits or appointments found
AVAILABILITYAGREEMENT
INACTIVE
CLIENT MANAGER
WORD WRAP ONTRUE
VERSION
SUPPRESS RDV USER SETUP
APP PROXY ALLOWED