source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORUTL1.m@ 613

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1ORUTL1 ; slc/dcm - OE/RR Utilities ;5/30/07 13:46
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**11,66,243**;Dec 17, 1997;Build 242
3LOC ;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
11QUE(ZTRTN,ZTDESC,ZTSAVE,ORIOPTR,ZTDTH,%ZIS,QUE,ECHO,ORION) ;Device Handling
12IO ;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
23IOQ 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
32 ;
33DPI(PATCH) ;Function returns date patch installed - added in patch 243
34 ;PATCH is set to patch designation, for example, "SR*3.0*157"
35 ;Output is the fileman date/time that patch was installed on this system
36 ;A return value of -1 is given if patch hasn't been installed
37 N ORVALUE,ORDAT,ORERR,VER,PKG,DATE,NUM
38 S DATE=-1
39 I '$$PATCH^XPDUTL(PATCH) Q DATE ;If patch hasn't been installed yet quit
40 S ORVALUE=$P(PATCH,"*") ;Package
41 D FIND^DIC(9.4,,,"MO",.ORVALUE,,,,,"ORDAT","ORERR")
42 S PKG=$G(ORDAT("DILIST",2,1)) I 'PKG Q DATE
43 S ORVALUE=$P(PATCH,"*",2) ;Version
44 D FIND^DIC(9.49,(","_PKG_","),,"X",.ORVALUE,,,,,"ORDAT","ORERR")
45 S VER=$G(ORDAT("DILIST",2,1)) I 'VER Q DATE
46 S ORVALUE=$P(PATCH,"*",3) ;Patch number
47 D FIND^DIC(9.4901,(","_VER_","_PKG_","),,,.ORVALUE,,,,,"ORDAT","ORERR")
48 S NUM=$G(ORDAT("DILIST",2,1)) I 'NUM Q DATE
49 S DATE=$$GET1^DIQ(9.4901,(NUM_","_VER_","_PKG_","),.02,"I")
50 Q DATE
Note: See TracBrowser for help on using the repository browser.