source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXBDT5.m@ 1270

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

initial load of WorldVistAEHR

File size: 6.1 KB
RevLine 
[613]1OCXBDT5 ;SLC/RJS,CLA - BUILD OCX PACKAGE DIAGNOSTIC ROUTINES (Build Runtime Library Routine OCXDI1) ;8/04/98 13:21
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 R,LINE,TEXT,NOW,RUCI,XCM
8 S NOW=$$NOW^OCXBDT3,RUCI=$$CUCI^OCXBDT
9 F LINE=1:1:999 S TEXT=$P($T(TEXT+LINE),";",2,999) Q:TEXT S TEXT=$P(TEXT,";",2,999) S R(LINE,0)=$$CONV^OCXBDT3(TEXT)
10 ;
11 M ^TMP("OCXBDT",$J,"RTN")=R
12 ;
13 S DIE="^TMP(""OCXBDT"","_$J_",""RTN"",",XCN=0,X="OCXDI1"
14 W !,X X ^%ZOSF("SAVE") W " ... ",XCM," Lines filed" K ^TMP("OCXBDT",$J,"RTN")
15 ;
16 Q XCM
17 ;
18TEXT ;
19 ;;OCXDI1 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;|NOW|
20 ;;|OCXLIN2|
21 ;;|OCXLIN3|
22 ;; ;
23 ;;S ;
24 ;; ;
25 ;; Q
26 ;; ;
27 ;; ;
28 ;;COMPARE(L,R) ;
29 ;; ;
30 ;; Q:'$L($O(L(""))) $$ADDREC^OCXDI2("R")
31 ;; ;
32 ;; N C,OCXDD M C=L,C=R S OCXDD=$O(C("")) Q $$MULT("C",OCXDD)
33 ;; ;
34 ;; Q 0
35 ;; ;
36 ;;MULT(CREF,OCXDD) ;
37 ;; ;
38 ;; N OCXSUB,LREF,RREF,QUIT,OCXFLD
39 ;; S LREF="L"_$E(CREF,2,$L(CREF)),RREF="R"_$E(CREF,2,$L(CREF))
40 ;; S QUIT=0,OCXFLD="" F S OCXFLD=$O(@CREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) D Q:QUIT
41 ;; .I (OCXFLD[":") D Q:QUIT
42 ;; ..Q:$$EXFLD(+OCXFLD,0)
43 ;; ..I '$D(@LREF@(OCXDD,OCXFLD,.01,"E")) D M @LREF@(OCXDD,OCXFLD)=@RREF@(OCXDD,OCXFLD)
44 ;; ...D WARN("Missing multiple:",CREF,OCXDD,OCXFLD)
45 ;; ...S QUIT=$$ADDMULT^OCXDI3(CREF,OCXDD,OCXFLD)
46 ;; ..I '$D(@RREF@(OCXDD,OCXFLD,.01,"E")) D M @RREF@(OCXDD,OCXFLD)=@LREF@(OCXDD,OCXFLD)
47 ;; ...D WARN("Extra multiple:",CREF,OCXDD,OCXFLD)
48 ;; ...S QUIT=$$DELMULT^OCXDI3($$APPEND(CREF,OCXDD),OCXFLD)
49 ;; .;
50 ;; .I (OCXFLD=+OCXFLD),'$$EXFLD(+OCXDD,OCXFLD) D
51 ;; ..I ($O(@CREF@(OCXDD,OCXFLD,""))="E") D Q
52 ;; ...I $L($G(@RREF@(OCXDD,OCXFLD,"E"))),'$L($G(@LREF@(OCXDD,OCXFLD,"E"))) D Q
53 ;; ....D WARN("Data Value Missing in "_$$CUCI^OCXBDT,CREF,OCXDD,OCXFLD,"E")
54 ;; ....S QUIT=$$EDITFLD^OCXDI4(CREF,OCXDD,OCXFLD,"E")
55 ;; ...I $L($G(@LREF@(OCXDD,OCXFLD,"E"))),'$L($G(@RREF@(OCXDD,OCXFLD,"E"))) D Q
56 ;; ....D WARN("Extra Data Value in "_$$CUCI^OCXBDT,CREF,OCXDD,OCXFLD,"E")
57 ;; ....S QUIT=$$DELFLD^OCXDI4(CREF,OCXDD,OCXFLD,"E")
58 ;; ...I '(@LREF@(OCXDD,OCXFLD,"E")=@RREF@(OCXDD,OCXFLD,"E")) D
59 ;; ....D WARN("Inconsistent Data",CREF,OCXDD,OCXFLD,"E")
60 ;; ....S QUIT=$$EDITFLD^OCXDI4(CREF,OCXDD,OCXFLD,"E")
61 ;; ..S OCXSUB=0 F Q:QUIT S OCXSUB=$O(@CREF@(OCXDD,OCXFLD,OCXSUB)) Q:'OCXSUB I '($G(@RREF@(OCXDD,OCXFLD,OCXSUB))=$G(@LREF@(OCXDD,OCXFLD,OCXSUB))) D Q
62 ;; ...D WARN("Inconsistent word Data",CREF,OCXDD,OCXFLD,OCXSUB)
63 ;; ...S QUIT=$$LOADWORD^OCXDI2(RREF,OCXDD,OCXFLD,OCXSUB)
64 ;; .;
65 ;; .I 'QUIT,(OCXFLD[":") S QUIT=$$MULT($$APPEND(CREF,OCXDD),OCXFLD)
66 ;; Q QUIT
67 ;; ;
68 ;;APPEND(ARRAY,OCXSUB) ;
69 ;; S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
70 ;; Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
71 ;; Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
72 ;; ;
73 ;;EXFLD(FILE,OCXFLD) ;
74 ;; N OCXFNAM
75 ;; S OCXFNAM=$$FIELD^OCXBDTD(FILE,OCXFLD,"LABEL")
76 ;; I (OCXFNAM["UNIQUE OBJECT IDENTIFIER") Q 1
77 ;; I (FILE=860.2),(OCXFLD=.02) Q 1
78 ;; I (FILE=860.22),(OCXFLD=4) Q 1
79 ;; I (FILE=860.3),(OCXFLD=3) Q 1
80 ;; I (FILE=860.9),(OCXFLD=1) Q 1
81 ;; I (FILE=860.91) Q 1
82 ;; I (FILE=19),(OCXFLD=.15) Q 1
83 ;; I (FILE=19),(OCXFLD=.16) Q 1
84 ;; I (FILE=19),(OCXFLD=.26) Q 1
85 ;; I (FILE=19),(OCXFLD=1.1) Q 1
86 ;; I (FILE=19),(OCXFLD=3.6) Q 1
87 ;; I (FILE=19),(OCXFLD=14) Q 1
88 ;; I (FILE=19),(OCXFLD=99) Q 1
89 ;; I (FILE=19),(OCXFLD=99.1) Q 1
90 ;; I (FILE=19),(OCXFLD=200) Q 1
91 ;; I (FILE=19),(OCXFLD=201) Q 1
92 ;; I (FILE=19),(OCXFLD=203) Q 1
93 ;; I ($E(OCXFNAM,1)="*") Q 1
94 ;; Q 0
95 ;; ;
96 ;;WARN(MSG,CREF,OCXDD,OCXFLD,OCXSUB) ;
97 ;; ;
98 ;; Q:$G(OCXAUTO)
99 ;; ;
100 ;; N D0,DASH,OCXDDPTH,OCXDPTR,FILE,FILEID,LREF,OCXPTR,RREF
101 ;; ;
102 ;; Q:'OCXFLGR
103 ;; ;
104 ;; S DASH="",$P(DASH,"-",(55-$L(MSG)))="-"
105 ;; W !!,"----WARNING-",MSG,DASH
106 ;; D DSPHDR(CREF,OCXDD,OCXFLD)
107 ;; I $D(OCXSUB) D DSPFLD(CREF,OCXDD,OCXFLD,OCXSUB)
108 ;; I '$D(OCXSUB) D DSPREC(CREF,OCXDD,OCXFLD)
109 ;; ;
110 ;; W ! Q
111 ;; ;
112 ;;DSPREC(CREF,OCXDD,OCXFLD) ;
113 ;; ;
114 ;; N OCXDPTR,OCXDDPTH,LEVL,OCXCREF,OCXSUB
115 ;; S OCXCREF=$$APPEND($$APPEND(CREF,OCXDD),OCXFLD)
116 ;; S OCXDDPTH=$P($P(OCXCREF,"(",2),")",1),LEVL=$L(OCXDDPTH,",")
117 ;; S OCXSUB="" F S OCXSUB=$O(@OCXCREF@(OCXSUB)) Q:'$L(OCXSUB) D
118 ;; .;
119 ;; .I '(OCXSUB[":"),'((OCXSUB=.01)&$O(@OCXCREF@(OCXSUB))) D
120 ;; ..N LINE
121 ;; ..Q:$$EXFLD(+OCXFLD,OCXSUB)
122 ;; ..I OCXFLD W !,?(5+((LEVL)*4)),$$FIELD^OCXBDTD(+OCXFLD,OCXSUB,"LABEL"),": ",$G(@OCXCREF@(OCXSUB,"E"))
123 ;; ..S LINE=0 F S LINE=$O(@OCXCREF@(OCXSUB,LINE)) Q:'LINE D
124 ;; ...W !,?(5+(LEVL*4)),$J(LINE,3),">",@OCXCREF@(OCXSUB,LINE)
125 ;; .;
126 ;; .I (OCXSUB[":") D
127 ;; ..N D0,OCXDD,FILENAME
128 ;; ..S D0=+$P(OCXSUB,":",2),OCXDD=+OCXSUB
129 ;; ..S FILENAME=$$FILENAME^OCXBDTD(OCXDD)
130 ;; ..I $L(FILENAME) W !,?(5+($L(LEVL)*4)),FILENAME
131 ;; ..E W !!,?(5+(LEVL*4)),FILENAME
132 ;; ..W " ",D0,": ",$G(@OCXCREF@(OCXSUB,.01,"E"))
133 ;; ..D DSPREC($$APPEND(CREF,OCXDD),OCXFLD,OCXSUB)
134 ;; ;
135 ;; Q
136 ;; ;
137 ;;DSPHDR(CREF,OCXDD,OCXFLD) ;
138 ;; ;
139 ;; N D0,FILE,FILEID,OCXPTR,OCXDDPTH
140 ;; S OCXDDPTH=$P($P($$APPEND($$APPEND(CREF,OCXDD),OCXFLD),"(",2),")",1)
141 ;; S FILE="" F OCXPTR=1:1:$L(OCXDDPTH,",") D
142 ;; .N OCXDD,D0,FILEID
143 ;; .S FILEID=$P(OCXDDPTH,",",OCXPTR)
144 ;; .I (FILEID[":") D
145 ;; ..S D0=+$P(FILEID,":",2),OCXDD=+$E(FILEID,2,$L(FILEID))
146 ;; ..W !,?(5+(OCXPTR*4)),$$FILENAME^OCXBDTD(OCXDD)
147 ;; ..S:$L(FILE) FILE=FILE_"," S FILE=FILE_FILEID
148 ;; ..I $D(@("L("_FILE_",.01,""E"")")) W ": ",@("L("_FILE_",.01,""E"")") W:D0 " [",D0,"]"
149 ;; ..E I $D(@("R("_FILE_",.01,""E"")")) W ": ",@("R("_FILE_",.01,""E"")") W:D0 " [",D0,"]"
150 ;; ;
151 ;; Q
152 ;; ;
153 ;;DSPFLD(CREF,OCXDD,OCXFLD,OCXSUB) ;
154 ;; ;
155 ;; N OCXDPTR,LREF,RREF,OCXDDPTH
156 ;; ;
157 ;; S OCXDDPTH=$P($P($$APPEND(CREF,OCXDD),"(",2),")",1)
158 ;; S LREF="L("_OCXDDPTH_")",RREF="R("_OCXDDPTH_")"
159 ;; W !,?(5+(($L(OCXDDPTH,",")+1)*4)),$$FIELD^OCXBDTD(OCXDD,OCXFLD,"LABEL")," field [",OCXFLD,"]"
160 ;; I OCXSUB W " Line #",OCXSUB
161 ;; ;
162 ;; W:($D(@RREF@(OCXFLD,OCXSUB))) !,?(5+(($L(OCXDDPTH,",")+2)*4)),"(R) |RUCI|: ",@RREF@(OCXFLD,OCXSUB)
163 ;; W:($D(@LREF@(OCXFLD,OCXSUB))) !,?(5+(($L(OCXDDPTH,",")+2)*4)),"(L) ",$$CUCI^OCXBDT,": ",@LREF@(OCXFLD,OCXSUB)
164 ;; ;
165 ;; Q
166 ;; ;
167 ;; W !,?10 Q 0 Q $$PAUSE
168 ;; ;
169 ;;PAUSE() Q:'OCXFLGC 0 W " Press Enter " R X:DTIME W ! Q (X[U)
170 ;; ;
171 ;;NOW() N X,Y,%DT S X="N",%DT="T" D ^%DT S Y=$$DATE^OCXBDTD(Y) S:(Y["@") Y=$P(Y,"@",1)_" at "_$P(Y,"@",2) Q Y
172 ;; ;
173 ;;$
174 ;1;
175 ;
Note: See TracBrowser for help on using the repository browser.