1 | ORUTL1 ; slc/dcm - OE/RR Utilities ;6/7/91 08:47
|
---|
2 | ;;3.0;ORDER ENTRY/RESULTS REPORTING;**11,66**;Dec 17, 1997
|
---|
3 | LOC ;Hospital Location Look-up
|
---|
4 | N DIC,ORIA,ORRA
|
---|
5 | S DIC=44,DIC(0)="AEQM",DIC("S")="I '$P($G(^(""OOS"")),""^"")"
|
---|
6 | D ^DIC
|
---|
7 | I Y<1 Q
|
---|
8 | I $D(^SC(+Y,"I")) S ORIA=+^("I"),ORRA=$P(^("I"),U,2)
|
---|
9 | I $S('$D(ORIA):0,'ORIA:0,ORIA>DT:0,ORRA'>DT&(ORRA):0,1:1) W $C(7),!," This location has been inactivated.",! K ORL G LOC
|
---|
10 | Q
|
---|
11 | QUE(ZTRTN,ZTDESC,ZTSAVE,ORIOPTR,ZTDTH,%ZIS,QUE,ECHO,ORION) ;Device Handling
|
---|
12 | IO ;This entry point replaced by QUE, but left for backwards compatibility
|
---|
13 | Q:'$D(ZTRTN)
|
---|
14 | N IO,ION,IOP,IOPAR,IOT,ZTSK,ZTIO,POP
|
---|
15 | I $G(QUE),'$L($G(ORIOPTR)) Q
|
---|
16 | I $L($G(ORIOPTR)),$G(QUE),$D(ORION) S ZTIO=ORION G IOQ
|
---|
17 | S:'($D(%ZIS)#2) %ZIS="Q"
|
---|
18 | I $G(QUE) S:%ZIS'["Q" %ZIS=%ZIS_"Q" S %ZIS("S")="I $S($G(^%ZIS(2,+$G(^(""SUBTYPE"")),0))'[""C-"":1,1:0)",%ZIS("B")=""
|
---|
19 | I $L($G(ORIOPTR)) S IOP=ORIOPTR
|
---|
20 | D ^%ZIS
|
---|
21 | I POP S OREND=1 Q
|
---|
22 | S ZTIO=ION
|
---|
23 | IOQ I $G(QUE)!$D(IO("Q")) D Q
|
---|
24 | . S:'$D(ZTSAVE) ZTSAVE("O*")=""
|
---|
25 | . D ^%ZTLOAD
|
---|
26 | . I $D(ZTSK),'$D(ECHO) W !,"REQUEST QUEUED"
|
---|
27 | . I '$D(ZTSK) S OREND=1
|
---|
28 | . D ^%ZISC
|
---|
29 | D @ZTRTN
|
---|
30 | D ^%ZISC
|
---|
31 | Q
|
---|