source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXSENDA.m@ 1141

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

revised back to 6/30/08 version

File size: 3.8 KB
RevLine 
[623]1OCXSENDA ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (Build Main Routine) ;6/12/02 12:03
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,74,96,105,143**;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,CVER=$$VERSION^OCXOCMP
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(0,0)
14 W !,X X ^%ZOSF("SAVE") W " ... ",XCM," Lines filed" K ^TMP("OCXSEND",$J,"RTN")
15 ;
16 Q XCM
17 ;
18 ;
19TEXT ;
20 ;;|$$RNAME^OCXSEND3(0,0)| ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE |OCXPATCH| ;|NOW|
21 ;;|OCXLIN2|
22 ;;|OCXLIN3|
23 ;; ;
24 ;;S ;
25 ;; ;
26 ;; N OCXDIER,QUIT,LINE,TEXT,REMOTE,LOCAL,D0,OPCODE,REF,OCXFLAG S QUIT=0
27 ;; N OCXAUTO,OCZSCR
28 ;; ;
29 ;; D DOT
30 ;; I $L($T(VERSION^OCXOCMP)),($$VERSION^OCXOCMP="|CVER|"),1
31 ;; E D Q
32 ;; .W !
33 ;; .W !,"Rule Transport aborted, version mismatch."
34 ;; .W !,"Current Local version: ",$$VERSION^OCXOCMP
35 ;; .W !," Rule Transport Version: |CVER|"
36 ;; I '$D(DTIME) W !!,"DTIME not defined !!",!! Q
37 ;; W !!,"Order Check Expert System Rule Transporter"
38 ;; W !," Created: |NOW| at |RUCI|"
39 ;; W !," Current Date: ",$$NOW^|$$RNAME^OCXSEND3(0,1)|," at ",$$NETNAME^OCXSEND,!!
40 ;; S LASTFILE=0 K ^TMP("OCXRULE",$J)
41 ;; S ^TMP("OCXRULE",$J)=($P($H,",",2)+($H*86400)+(1*60*60))_" <- ^TMP ENTRY EXPIRATION DATE FOR ^OCXOPURG"
42 ;; S OCXFLAG="|OCXASK|"
43 ;; ;
44 ;;RUN ;
45 ;; ;
46 ;; W !,"Loading Data " D ^|$$RNAME^OCXSEND3(1,2)|
47 ;; ;
48 ;; S LINE=0 F S LINE=$O(^TMP("OCXRULE",$J,LINE)) Q:'LINE D Q:QUIT
49 ;; .D:'(LINE#50) STATUS^OCXOPOST(LINE,$O(^TMP("OCXRULE",$J," "),-1))
50 ;; .S TEXT=$G(^TMP("OCXRULE",$J,LINE)) I $L(TEXT) D Q:QUIT
51 ;; ..S TEXT=$P(TEXT,";",2,999),OPCODE=$P(TEXT,U,1),TEXT=$P(TEXT,U,2,999)
52 ;; ..;
53 ;; ..I OPCODE="KEY" D DOT S LOCAL="",D0=$$GETFILE^|$$RNAME^OCXSEND3(0,1)|(+$P(TEXT,U,1),$P(TEXT,U,2),.LOCAL) S QUIT=(D0=(-10)) Q
54 ;; ..I OPCODE="R" S REF="REMOTE("_$P(TEXT,":",1)_":"_D0_$P(TEXT,":",2,99)_")" Q
55 ;; ..I OPCODE="D",$D(REF) S @REF=$P(TEXT,U,1,999) K REF Q
56 ;; ..;
57 ;; ..I OPCODE="EOR" S QUIT=$$COMPARE^|$$RNAME^OCXSEND3(1,1)|(.LOCAL,.REMOTE) K LOCAL,REMOTE Q
58 ;; ..I OPCODE="EOF" K LOCAL,REMOTE Q
59 ;; ..I OPCODE="SOF" W !," Installing '",TEXT,"' records... " Q
60 ;; ..I OPCODE="ROOT" D Q
61 ;; ...N FILE,DATA
62 ;; ...S FILE=U_$P(TEXT,U,1),DATA=$P(TEXT,U,2,3)
63 ;; ...I ($P($G(@FILE),U,1,2)=DATA) Q
64 ;; ...S $P(@FILE,U,1,2)=DATA
65 ;; ...W !," Restoring file #",(+$P(DATA,U,2))," zero node"
66 ;; ..;
67 ;; ..W !,"Unknown OpCode: ",OPCODE," in: ",TEXT S QUIT=$$PAUSE^|$$RNAME^OCXSEND3(0,1)| W !
68 ;; ;
69 ;; K ^TMP("OCXRULE",$J)
70 ;; ;
71 ;; I $D(^OCXS) D
72 ;; .N FILE,DO,PD0,CNT
73 ;; .S FILE=0 F S FILE=$O(^OCXS(FILE)) Q:'FILE D
74 ;; ..S D0=0 F CNT=0:1 S PD0=D0,D0=$O(^OCXS(FILE,D0)) Q:'D0
75 ;; ..S $P(^OCXS(FILE,0),U,3,4)=CNT_U_PD0
76 ;; ;
77 ;; I $G(OCXDIER) D
78 ;; .W !!!!!!!
79 ;; .W !,?5,"******************** Warning ******************** "
80 ;; .W !,?7,+$G(OCXDIER)," data filing error",$S(($G(OCXDIER)=1):"",1:"s"),"."
81 ;; .W !,?7,"Some expert system rules may be incomplete."
82 ;; .W !,?5,"******************** Warning ******************** "
83 ;; I '$G(OCXDIER) W !!,?5," No data filing errors."
84 ;; W !!,"Transport Finished..."
85 ;; ;
86 ;; D
87 ;; .N OCXOETIM
88 ;; .D BMES^XPDUTL("---Creating Order Check Routines-----------------------------------")
89 ;; .D AUTO^OCXOCMP
90 ;; ;
91 ;; Q
92 ;; ;
93 ;;DOT Q:$G(OCXAUTO) W:($X>70) ! W " ." Q
94 ;; ;
95 ;;READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
96 ;; N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
97 ;; Q:'$L($G(OCXZ0)) U
98 ;; S DIR(0)=OCXZ0
99 ;; S:$L($G(OCXZA)) DIR("A")=OCXZA
100 ;; S:$L($G(OCXZB)) DIR("B")=OCXZB
101 ;; F OCXLINE=1:1:($G(OCXZL)-1) W !
102 ;; D ^DIR
103 ;; I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
104 ;; Q Y
105 ;; ;
106 ;;$
107 ;1;
Note: See TracBrowser for help on using the repository browser.