source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOCONV.m@ 949

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

initial load of WorldVistAEHR

File size: 2.4 KB
RevLine 
[613]1OCXOCONV ;SLC/RJS,CLA - EXPERT SYSTEM CONVERSION (PRE 1T13 -> 1T14) ;10/29/98 12:37
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5EN ;
6 ;
7 N OCXOETIM,OCXTOT,OCXCUR,OCXX,OCXY,OCXZ
8 S OCXOETIM=$H
9 ;
10 I '$D(^OCX) D BMES^XPDUTL(" The ^OCX global is missing, Conversion Aborted...") H 3 Q
11 ;
12 F OCXZ="^OCXS","^OCXD" I $D(@OCXZ) D
13 .D BMES^XPDUTL(" Purging files in the "_OCXZ_" global...")
14 .S OCXX=0 F S OCXX=$O(@OCXZ@(OCXX)) Q:'OCXX D
15 ..I $D(@OCXZ@(OCXX)) S OCXY=$P(@OCXZ@(OCXX,0),U,1,2) K @OCXZ@(OCXX) S @OCXZ@(OCXX,0)=OCXY
16 ;
17 I $D(^OCX(10)) S OCXZ=$P(^OCX(10,0),U,1,2) D BMES^XPDUTL(" Purging the "_$P(OCXZ,U,1)_" file...") K ^OCX(10) S ^OCX(10,0)=OCXZ
18 ;
19 D BMES^XPDUTL(" Initializing scan, One moment please...")
20 S OCXQUIT=0,GLREF="^OCX" F OCXTOT=0:1 S GLREF=$Q(@GLREF) Q:'$L(GLREF)
21 D BMES^XPDUTL(" Scanning ^OCX global for ^OCX( references...")
22 S OCXQUIT=0,GLREF="^OCX" F OCXCUR=0:1 S GLREF=$Q(@GLREF) Q:'$L(GLREF) D Q:OCXQUIT
23 .D:'(OCXCUR#10) STATUS(OCXCUR,OCXTOT)
24 .N GLVAL,DELIM
25 .S GLVAL=@GLREF
26 .Q:'(GLVAL["^OCX(")
27 .S GLVAL=$$CONV(GLVAL)
28 .S @GLREF=GLVAL
29 ;
30 D STATUS(10,10)
31 H 1
32 D STATUS(0,10)
33 ;
34 D BMES^XPDUTL(" Seperating ^OCX into ^OCXD and ^OCXS...")
35 D BMES^XPDUTL(" ^OCXD contains the 'Dynamic' files likely to shrink and grow...")
36 D BMES^XPDUTL(" ^OCXS contains the 'Static' files likely to remain the same size...")
37 D BMES^XPDUTL(" Initializing, One moment please...")
38 S OCXZ=0 F OCXTOT=0:1 S OCXZ=$O(^OCX(OCXZ)) Q:'OCXZ
39 D BMES^XPDUTL(" Scanning ^OCX global moving files")
40 S OCXZ=0 F OCXCUR=0:1 S OCXZ=$O(^OCX(OCXZ)) Q:'OCXZ D
41 .N NEWREF,OLDREF
42 .S OLDREF="^OCX("_OCXZ_")"
43 .S NEWREF=$$CONV("^OCX("_OCXZ)_")"
44 .M @NEWREF=@OLDREF
45 .D STATUS(OCXCUR,OCXTOT)
46 ;
47 D STATUS(10,10)
48 H 1
49 D STATUS(0,10)
50 ;
51 Q
52CONV(V) ;
53 F Q:'(V["^OCX(") D
54 .N FILE,GL,NFILE
55 .S FILE=+$P($P(V,"^OCX(",2),",",1)
56 .;W !,"FILE: ",FILE
57 .S GL="^OCXS("
58 .S:(FILE=1) GL="^OCXD("
59 .S:(FILE=7) GL="^OCXD("
60 .S:(FILE=10) GL="^OCXD("
61 .S:(FILE="""LOG""") GL="^OCXD("
62 .S NFILE=0
63 .S:FILE NFILE=FILE/10+860 S:(FILE="""LOG""") NFILE=861
64 .I 'NFILE Q
65 .S V=$P(V,"^OCX("_FILE,1)_GL_NFILE_$P(V,"^OCX("_FILE,2,999)
66 ;
67 Q V
68 ;
69DATE() N X,Y,%DT S X="N",%DT="T" D ^%DT X ^DD("DD") Q Y
70 ;
71DTCONV(Y) Q:'(Y["@") Y Q $P(Y,"@",1)_" at "_$P(Y,"@",2,99)
72 ;
73STATUS(CURRENT,XPDIDTOT) ;
74 ;
75 I '$D(XPDIDVT) N XPDIDVT
76 S XPDIDVT=$G(XPDIDVT)
77 D UPDATE^XPDID(CURRENT)
78 ;
79 Q
80 ;
Note: See TracBrowser for help on using the repository browser.