source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXSEND8.m@ 1284

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

revised back to 6/30/08 version

File size: 3.8 KB
Line 
1OCXSEND8 ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (Build Library Routine 4) ;1/31/01 08:44
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,96,105**;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^OCXSEND3,RUCI=$$NETNAME^OCXSEND
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^OCXSEND3(TEXT)
10 ;
11 M ^TMP("OCXSEND",$J,"RTN")=R
12 ;
13 S DIE="^TMP(""OCXSEND"","_$J_",""RTN"",",XCN=0,X=$$RNAME^OCXSEND3(4,1)
14 W !,X X ^%ZOSF("SAVE") W " ... ",XCM," Lines filed" K ^TMP("OCXSEND",$J,"RTN")
15 ;
16 Q XCM
17 ;
18TEXT ;
19 ;;|$$RNAME^OCXSEND3(4,1)| ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE |OCXPATCH| ;|NOW|
20 ;;|OCXLIN2|
21 ;;|OCXLIN3|
22 ;; ;
23 ;;S ;
24 ;; ; Field Utilities
25 ;; Q
26 ;; ;
27 ;;EDITFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
28 ;; ;
29 ;; N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT
30 ;; ;
31 ;; S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
32 ;; S OCXLVL=$L(DDPATH,",")
33 ;; F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
34 ;; S OCXDA=OCXDA(0) K OCXDA(0)
35 ;; I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D
36 ;; .N RESP
37 ;; .Q:(OCXFLAG["D")
38 ;; .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
39 ;; .S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
40 ;; .D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL-1)
41 ;; ;
42 ;; Q QUIT
43 ;; ;
44 ;;DELFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
45 ;; ;
46 ;; N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT,RESP
47 ;; ;
48 ;; S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
49 ;; S OCXLVL=$L(DDPATH,",")
50 ;; F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
51 ;; S OCXDA=OCXDA(0) K OCXDA(0)
52 ;; Q:(OCXFLAG["D") 0
53 ;; 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
54 ;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
55 ;; D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,"@",.OCXDA,OCXLVL-1)
56 ;; ;
57 ;; Q QUIT
58 ;; ;
59 ;;CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
60 ;; ;
61 ;; N OCXFLD,OCXGREF
62 ;; ;
63 ;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
64 ;; ;
65 ;; I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXSENDD(+OCXDD)_U_U
66 ;; ;
67 ;; S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^|$$RNAME^OCXSEND3(1,1)|(+OCXDD,OCXFLD) D
68 ;; .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
69 ;; ;
70 ;; D PUSH(.OCXDA)
71 ;; S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
72 ;; .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
73 ;; D POP(.OCXDA)
74 ;; Q
75 ;; ;
76 ;;PUSH(OCXDA) ;
77 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
78 ;; S OCXDA(1)=OCXDA,OCXDA=0
79 ;; Q
80 ;; ;
81 ;;POP(OCXDA) ;
82 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
83 ;; S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
84 ;; Q
85 ;; ;
86 ;;APPEND(ARRAY,OCXSUB) ;
87 ;; S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
88 ;; Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
89 ;; Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
90 ;; ;
91 ;;READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
92 ;; N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
93 ;; Q:'$L($G(OCXZ0)) U
94 ;; S DIR(0)=OCXZ0
95 ;; S:$L($G(OCXZA)) DIR("A")=OCXZA
96 ;; S:$L($G(OCXZB)) DIR("B")=OCXZB
97 ;; F OCXLINE=1:1:($G(OCXZL)-1) W !
98 ;; D ^DIR
99 ;; I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
100 ;; Q Y
101 ;; ;
102 ;;PAUSE() W " Press Enter " R X:DTIME W ! Q (X[U)
103 ;; ;
104 ;;$
105 ;1;
106 ;
Note: See TracBrowser for help on using the repository browser.