source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY2434.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.9 KB
Line 
1ORY2434 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*243) ;NOV 2,2006 at 12:05
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17,1997;Build 242
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:(OCXFLAG["D")
20 .I (OCXFLAG["A") S RESP=$$READ("Y"," Do you want to change the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' field ?","YES") I 'RESP S QUIT=(RESP[U) Q
21 .S OCXGREF=$$GETREF^ORY2432(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
22 .D DIE^ORY2432(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL-1)
23 ;
24 Q QUIT
25 ;
26DELFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
27 ;
28 N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT,RESP
29 ;
30 S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
31 S OCXLVL=$L(DDPATH,",")
32 F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
33 S OCXDA=OCXDA(0) K OCXDA(0)
34 Q:(OCXFLAG["D") 0
35 I (OCXFLAG["A") S RESP=$$READ("Y"," Do you want to Delete the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' value ?","YES") I 'RESP S QUIT=(RESP[U) Q QUIT
36 S OCXGREF=$$GETREF^ORY2432(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
37 D DIE^ORY2432(OCXDD,OCXGREF,OCXFLD,"@",.OCXDA,OCXLVL-1)
38 ;
39 Q QUIT
40 ;
41CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
42 ;
43 N OCXFLD,OCXGREF
44 ;
45 S OCXGREF=$$GETREF^ORY2432(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
46 ;
47 I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXSENDD(+OCXDD)_U_U
48 ;
49 S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^ORY2431(+OCXDD,OCXFLD) D
50 .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^ORY2432(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
51 ;
52 D PUSH(.OCXDA)
53 S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
54 .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
55 D POP(.OCXDA)
56 Q
57 ;
58PUSH(OCXDA) ;
59 N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
60 S OCXDA(1)=OCXDA,OCXDA=0
61 Q
62 ;
63POP(OCXDA) ;
64 N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
65 S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
66 Q
67 ;
68APPEND(ARRAY,OCXSUB) ;
69 S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
70 Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
71 Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
72 ;
73READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
74 N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
75 Q:'$L($G(OCXZ0)) U
76 S DIR(0)=OCXZ0
77 S:$L($G(OCXZA)) DIR("A")=OCXZA
78 S:$L($G(OCXZB)) DIR("B")=OCXZB
79 F OCXLINE=1:1:($G(OCXZL)-1) W !
80 D ^DIR
81 I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
82 Q Y
83 ;
84PAUSE() W " Press Enter " R X:DTIME W ! Q (X[U)
85 ;
Note: See TracBrowser for help on using the repository browser.