source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUDEV.m@ 901

Last change on this file since 901 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1TIUDEV ; SLC/JER - Device Handling Utilities ;6/19/98@16:24:11
2 ;;1.0;TEXT INTEGRATION UTILITIES;**1,20**;Jun 20, 1997
3DEVICE(IO,TIUDEV,TIUZIS,TIUSCR,TIUIOP) ; Calls to Device Handler
4 N %I,%T,%Y,POP,%ZIS,IOP
5 I $G(TIUDEV)="LAST" S TIUDEV=$$LAST
6 S:$D(TIUDEV) %ZIS("B")=TIUDEV
7 S:$G(TIUSCR)]"" %ZIS("S")=TIUSCR
8 S:$D(TIUIOP) IOP=TIUIOP
9 S %ZIS=$G(TIUZIS,"Q") D ^%ZIS
10 I +$G(POP) S ION="" W !,$C(7),"TRY LATER"
11 Q ION
12QUE(ZTRTN,ZTIO) ; Queue output
13 N %,ZTDTH,ZTSAVE,ZTSK
14 Q:'$D(ZTRTN) K IO("Q"),ZTSAVE
15 F %="DA","DFN","TIU*","VALM*","^TMP(""TIURIDX"",$J," S ZTSAVE(%)=""
16 F %="OR*","^TMP(""OR"",$J," S ZTSAVE(%)=""
17 S:'$D(ZTDESC) ZTDESC="PRINT DOCUMENTS"
18 D ^%ZTLOAD W !,$S($D(ZTSK):"Request Queued!",1:"Request Cancelled!")
19 K ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE D ^%ZISC
20 S IOP="HOME" D ^%ZIS
21 Q
22LAST() ; Get last device
23 N TIUDIEN,TIUDNM
24 S TIUDIEN=$G(^DISV(DUZ,"^%ZIS(1,"))
25 I +TIUDIEN'>0 S TIUDNM="" G LASTX
26 I $L($G(^%ZIS(1,+TIUDIEN,"TYPE"))),(";HFS;MT;BAR;VTRM;RES;CHAN;IMPC;"[(";"_^("TYPE")_";")) S TIUDNM="" G LASTX
27 S TIUDNM=$P($G(^%ZIS(1,TIUDIEN,0)),U)
28LASTX Q $G(TIUDNM)
Note: See TracBrowser for help on using the repository browser.