source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXDI4.m@ 1195

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1OCXDI4 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;SEP 7,1999 at 10:30
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5S ;
6 ; Field Utilities
7 Q
8 ;
9EDITFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
10 ;
11 N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT
12 ;
13 S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
14 S OCXLVL=$L(DDPATH,",")
15 F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
16 S OCXDA=OCXDA(0) K OCXDA(0)
17 I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D
18 .N RESP
19 .Q:'OCXFLGC I (OCXFLGA) S RESP=$$READ("Y"," Do you want to change the local '"_$$FILENAME^OCXBDTD(+OCXDD)_"' field ?","YES") I 'RESP S QUIT=(RESP[U) Q
20 .S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
21 .D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL-1)
22 ;
23 Q QUIT
24 ;
25DELFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
26 ;
27 N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT,RESP
28 ;
29 S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
30 S OCXLVL=$L(DDPATH,",")
31 F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
32 S OCXDA=OCXDA(0) K OCXDA(0)
33 Q:'OCXFLGC 0 I (OCXFLGA) S RESP=$$READ("Y"," Do you want to Delete the local '"_$$FILENAME^OCXBDTD(+OCXDD)_"' value ?","YES") I 'RESP S QUIT=(RESP[U) Q QUIT
34 S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
35 D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,"@",.OCXDA,OCXLVL-1)
36 ;
37 Q QUIT
38 ;
39CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
40 ;
41 N OCXFLD,OCXGREF
42 ;
43 S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
44 ;
45 I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXBDTD(+OCXDD)_U_U
46 ;
47 S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^OCXDI1(+OCXDD,OCXFLD) D
48 .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
49 ;
50 D PUSH(.OCXDA)
51 S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
52 .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
53 D POP(.OCXDA)
54 Q
55 ;
56PUSH(OCXDA) ;
57 N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
58 S OCXDA(1)=OCXDA,OCXDA=0
59 Q
60 ;
61POP(OCXDA) ;
62 N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
63 S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
64 Q
65 ;
66APPEND(ARRAY,OCXSUB) ;
67 S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
68 Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
69 Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
70 ;
71READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
72 N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
73 Q:'$L($G(OCXZ0)) U
74 S DIR(0)=OCXZ0
75 S:$L($G(OCXZA)) DIR("A")=OCXZA
76 S:$L($G(OCXZB)) DIR("B")=OCXZB
77 F OCXLINE=1:1:($G(OCXZL)-1) W !
78 D ^DIR
79 I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
80 Q Y
81 ;
82PAUSE() Q:'OCXFLGC 0 W " Press Enter " R X:DTIME W ! Q (X[U)
83 ;
Note: See TracBrowser for help on using the repository browser.