GMTSPD2 ; SLC/JER,SBW - Interactive Print-by-Loc (cont) ; 02/27/2002
;;2.7;Health Summary;**49**;Oct 20, 1995
;
; External References
; DBIA 10026 ^DIR
; DBIA 10076 ^XUSEC("GMTS VIEW ONLY"
; DBIA 10086 ^%ZIS
; DBIA 10063 ^%ZTLOAD
; DBIA 10089 ^%ZISC
;
RXAP() ; Ask about inclusion of OP Rx Action Profile
N %,DIR,X,Y
I $P($G(^GMT(142.99,1,0)),U,2)'="Y" S Y=0 G RXAPX
S DIR(0)="YO",DIR("A")="Include Outpatient Pharmacy Action Profile (Y/N)"
S DIR("B")="NO" D ^DIR
RXAPX ; Rx Action Profile Exit
Q Y
HSOUT ; Device Handling/Output control
N IOP,%ZIS
I $D(^XUSEC("GMTS VIEW ONLY",DUZ)) D NOQUE Q
S %ZIS="Q",%ZIS("B")="HOME" D ^%ZIS Q:POP
D @$S(+$G(GMPSAP)&(IO'=IO(0)):"QUE",$D(IO("Q")):"QUE",1:"NOQUE")
Q
QUE ; Set ZT parameters and tasks ^GMTSPL
N ZTSAVE,ZTDESC,ZTDTH,ZTIO,ZTRTN,% K IO("Q")
F %="U","GMTSTYP","GMTSCDT","GMTSSC(","GMPSAP" S ZTSAVE(%)=""
S ZTRTN="^GMTSPL",ZTDESC="HEALTH SUMMARY (BY LOCATION)",ZTIO=ION
D ^%ZTLOAD W !,$S($D(ZTSK):"Request Queued!",1:"Request Cancelled!")
D ^%ZISC
Q
NOQUE ; Calls ^GMTSPL in interactive mode
U:IO'=IO(0) IO D ^GMTSPL,^%ZISC
Q
LOCTXT(LOC) ; Change hospital location code to text name
Q $S(LOC="W":"Ward",LOC="OR":"Operating Room",LOC="C":"Clinic",1:"Hospital Location")
GMTSPD2 ; SLC/JER,SBW - Interactive Print-by-Loc (cont) ; 02/27/2002
+1 ;;2.7;Health Summary;**49**;Oct 20, 1995
+2 ;
+3 ; External References
+4 ; DBIA 10026 ^DIR
+5 ; DBIA 10076 ^XUSEC("GMTS VIEW ONLY"
+6 ; DBIA 10086 ^%ZIS
+7 ; DBIA 10063 ^%ZTLOAD
+8 ; DBIA 10089 ^%ZISC
+9 ;
RXAP() ; Ask about inclusion of OP Rx Action Profile
+1 NEW %,DIR,X,Y
+2 IF $PIECE($GET(^GMT(142.99,1,0)),U,2)'="Y"
SET Y=0
GOTO RXAPX
+3 SET DIR(0)="YO"
SET DIR("A")="Include Outpatient Pharmacy Action Profile (Y/N)"
+4 SET DIR("B")="NO"
DO ^DIR
RXAPX ; Rx Action Profile Exit
+1 QUIT Y
HSOUT ; Device Handling/Output control
+1 NEW IOP,%ZIS
+2 IF $DATA(^XUSEC("GMTS VIEW ONLY",DUZ))
DO NOQUE
QUIT
+3 SET %ZIS="Q"
SET %ZIS("B")="HOME"
DO ^%ZIS
IF POP
QUIT
+4 DO @$SELECT(+$GET(GMPSAP)&(IO'=IO(0)):"QUE",$DATA(IO("Q")):"QUE",1:"NOQUE")
+5 QUIT
QUE ; Set ZT parameters and tasks ^GMTSPL
+1 NEW ZTSAVE,ZTDESC,ZTDTH,ZTIO,ZTRTN,%
KILL IO("Q")
+2 FOR %="U","GMTSTYP","GMTSCDT","GMTSSC(","GMPSAP"
SET ZTSAVE(%)=""
+3 SET ZTRTN="^GMTSPL"
SET ZTDESC="HEALTH SUMMARY (BY LOCATION)"
SET ZTIO=ION
+4 DO ^%ZTLOAD
WRITE !,$SELECT($DATA(ZTSK):"Request Queued!",1:"Request Cancelled!")
+5 DO ^%ZISC
+6 QUIT
NOQUE ; Calls ^GMTSPL in interactive mode
+1 IF IO'=IO(0)
USE IO
DO ^GMTSPL
DO ^%ZISC
+2 QUIT
LOCTXT(LOC) ; Change hospital location code to text name
+1 QUIT $SELECT(LOC="W":"Ward",LOC="OR":"Operating Room",LOC="C":"Clinic",1:"Hospital Location")