PSOQTIU4 ;VAPA/ELZ - tiu utility routine ; 30 Nov 2007 8:01 AM
;;7.0;OUTPATIENT PHARMACY;**294**;DEC 1997;Build 13
;
;
PHONE(DFN) ; -- entry point for pt's home phone number
N VAPA
D ADD^VADPT
Q VAPA(8)
;
ADDRESS(DFN,TARGET) ; -- entry point for pt's home address
N LINE,DA,VAPA
K @TARGET S LINE=0
D ADD^VADPT
F DA=1:1:3 D
. Q:VAPA(DA)=""
. S LINE=LINE+1
. S @TARGET@(LINE,0)=VAPA(DA)
. W "."
S LINE=LINE+1,@TARGET@(LINE,0)=VAPA(4)_", "_$P(VAPA(5),U,2)_" "_VAPA(6)
I VAPA(9)'="" S LINE=LINE+1,@TARGET@(LINE,0)="Temporary Address Start: "_$P(VAPA(9),U,2) ;dc-3/18/98
I VAPA(10)'="" S LINE=LINE+1,@TARGET@(LINE,0)="Temporary Address Stop: "_$P(VAPA(10),U,2) ;dc-3/18/98
S @TARGET@(0)="^^"_LINE_"^"_LINE_"^"_DT_"^^"
Q "~@"_$NA(@TARGET)
;
NEXTAPPT(DFN) ; -- entry point for next scheduled appointment
N INFO
D SDA^VADPT
S INFO=$S($D(^UTILITY("VASD",$J,1,"E")):$P(^("E"),U)_" "_$P(^("E"),U,2),1:"No Future Appointments Scheduled")
K ^UTILITY("VASD",$J)
Q INFO
PSOQTIU4 ;VAPA/ELZ - tiu utility routine ; 30 Nov 2007 8:01 AM
+1 ;;7.0;OUTPATIENT PHARMACY;**294**;DEC 1997;Build 13
+2 ;
+3 ;
PHONE(DFN) ; -- entry point for pt's home phone number
+1 NEW VAPA
+2 DO ADD^VADPT
+3 QUIT VAPA(8)
+4 ;
ADDRESS(DFN,TARGET) ; -- entry point for pt's home address
+1 NEW LINE,DA,VAPA
+2 KILL @TARGET
SET LINE=0
+3 DO ADD^VADPT
+4 FOR DA=1:1:3
Begin DoDot:1
+5 IF VAPA(DA)=""
QUIT
+6 SET LINE=LINE+1
+7 SET @TARGET@(LINE,0)=VAPA(DA)
+8 WRITE "."
End DoDot:1
+9 SET LINE=LINE+1
SET @TARGET@(LINE,0)=VAPA(4)_", "_$PIECE(VAPA(5),U,2)_" "_VAPA(6)
+10 ;dc-3/18/98
IF VAPA(9)'=""
SET LINE=LINE+1
SET @TARGET@(LINE,0)="Temporary Address Start: "_$PIECE(VAPA(9),U,2)
+11 ;dc-3/18/98
IF VAPA(10)'=""
SET LINE=LINE+1
SET @TARGET@(LINE,0)="Temporary Address Stop: "_$PIECE(VAPA(10),U,2)
+12 SET @TARGET@(0)="^^"_LINE_"^"_LINE_"^"_DT_"^^"
+13 QUIT "~@"_$NAME(@TARGET)
+14 ;
NEXTAPPT(DFN) ; -- entry point for next scheduled appointment
+1 NEW INFO
+2 DO SDA^VADPT
+3 SET INFO=$SELECT($DATA(^UTILITY("VASD",$JOB,1,"E")):$PIECE(^("E"),U)_" "_$PIECE(^("E"),U,2),1:"No Future Appointments Scheduled")
+4 KILL ^UTILITY("VASD",$JOB)
+5 QUIT INFO