PSGVWP ;BIR/CML3-PRINT EXPANDED VIEW ;24 JAN 94 / 11:16 AM
;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
S PSGVWA="",AT="N" I PSGORD'["N" F R !!,"Show SHORT, LONG, or NO activity log? N// ",AT:DTIME D ALC^PSGVW0 Q:Q
G:AT="^" DONE S:AT'="N" PSGVWA=AT
K IO("Q"),%ZIS,IOP S PSGION=ION,%ZIS="Q",%ZIS("B")="",%ZIS("A")="Print on DEVICE: " W ! D ^%ZIS I POP S IOP=PSGION D ^%ZIS K IOP,PSGION W !," No device selected. Option terminated." G DONE
K PSGION I $D(IO("Q")) K ZTSAVE S PSGTIR="ENQ^PSGVWP",ZTDESC="UD EXPANDED VIEW"
F X="PSGP","PSGP(0)","PSGORD","PSJPAD","PSJPAGE","PSJPTD","PSJPDD","PSJPDOB","PSJPWDN","PSJPWD","PSJPRB","PSJPDX","PSGVWA","PSJPPID","PSJPWT","PSJPHT","PSJPSEX" S ZTSAVE(X)=""
I D ENTSK^PSGTI G DONE
ENQ ;
D NOW^%DTC S PSGDT=%,HDT=$$ENDTC^PSGMI(PSGDT),$P(LN2,"-",81)="",PSGOH=""
U IO D GET^PSGO,EN2^PSGVW I PSGVWA]"" S AT=PSGVWA D ENA^PSGVW0
W:(IO'=IO(0)!(IOST'["C-"))&($Y) @IOF D ^%ZISC
;
DONE ;
K AND,AT,DOB,HDT,LN2,MF,ON,PG,PN,POP,PSGVWA,PX,RCT,RF,SLS,SSN,UD,WD,WDP,WT Q
PSGVWP ;BIR/CML3-PRINT EXPANDED VIEW ;24 JAN 94 / 11:16 AM
+1 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
+2 SET PSGVWA=""
SET AT="N"
IF PSGORD'["N"
FOR
READ !!,"Show SHORT, LONG, or NO activity log? N// ",AT:DTIME
DO ALC^PSGVW0
IF Q
QUIT
+3 IF AT="^"
GOTO DONE
IF AT'="N"
SET PSGVWA=AT
+4 KILL IO("Q"),%ZIS,IOP
SET PSGION=ION
SET %ZIS="Q"
SET %ZIS("B")=""
SET %ZIS("A")="Print on DEVICE: "
WRITE !
DO ^%ZIS
IF POP
SET IOP=PSGION
DO ^%ZIS
KILL IOP,PSGION
WRITE !," No device selected. Option terminated."
GOTO DONE
+5 KILL PSGION
IF $DATA(IO("Q"))
KILL ZTSAVE
SET PSGTIR="ENQ^PSGVWP"
SET ZTDESC="UD EXPANDED VIEW"
+6 FOR X="PSGP","PSGP(0)","PSGORD","PSJPAD","PSJPAGE","PSJPTD","PSJPDD","PSJPDOB","PSJPWDN","PSJPWD","PSJPRB","PSJPDX","PSGVWA","PSJPPID","PSJPWT","PSJPHT","PSJPSEX"
SET ZTSAVE(X)=""
+7 IF $TEST
DO ENTSK^PSGTI
GOTO DONE
ENQ ;
+1 DO NOW^%DTC
SET PSGDT=%
SET HDT=$$ENDTC^PSGMI(PSGDT)
SET $PIECE(LN2,"-",81)=""
SET PSGOH=""
+2 USE IO
DO GET^PSGO
DO EN2^PSGVW
IF PSGVWA]""
SET AT=PSGVWA
DO ENA^PSGVW0
+3 IF (IO'=IO(0)!(IOST'["C-"))&($Y)
WRITE @IOF
DO ^%ZISC
+4 ;
DONE ;
+1 KILL AND,AT,DOB,HDT,LN2,MF,ON,PG,PN,POP,PSGVWA,PX,RCT,RF,SLS,SSN,UD,WD,WDP,WT
QUIT