source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXBDTA.m@ 1314

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

initial load of FOIAVistA 6/30/08 version

File size: 4.2 KB
Line 
1OCXBDTA ;SLC/RJS,CLA - BUILD OCX PACKAGE DIAGNOSTIC ROUTINES (Build Runtime Library Routine OCXDIAG) ;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,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^OCXBDT3(TEXT)
10 ;
11 M ^TMP("OCXBDT",$J,"RTN")=R
12 ;
13 S DIE="^TMP(""OCXBDT"","_$J_",""RTN"",",XCN=0,X="OCXDIAG"
14 W !,X X ^%ZOSF("SAVE") W " ... ",XCM," Lines filed" K ^TMP("OCXBDT",$J,"RTN")
15 ;
16 Q XCM
17 ;
18 ;
19TEXT ;
20 ;;OCXDIAG ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;|NOW|
21 ;;|OCXLIN2|
22 ;;|OCXLIN3|
23 ;; ;
24 ;;S ;
25 ;; ;
26 ;; N QUIT,LINE,TEXT,REMOTE,LOCAL,D0,OPCODE,REF,OCXFLGA,OCXFLGC,OCXFLGR,OCXFLGD S QUIT=0
27 ;; ;
28 ;; D DOT
29 ;; I $L($T(VERSION^OCXOCMP)),($$VERSION^OCXOCMP="|CVER|"),1
30 ;; E D Q
31 ;; .W !
32 ;; .W !,"Diagnostic aborted, version mismatch."
33 ;; .W !,"Current Local version: ",$$VERSION^OCXOCMP
34 ;; .W !," Diagnostic Version: |CVER|"
35 ;; I '$D(DTIME) W !!,"DTIME not defined !!",!! Q
36 ;; W !!,"Order Check Expert System Diagnostic Tool"
37 ;; W !," Created: |NOW| in UCI: |RUCI|"
38 ;; W !," Current Date: ",$$NOW^OCXDI0," Current UCI: ",$$CUCI^OCXBDT,!!
39 ;; S LASTFILE=0 K ^TMP("OCXDIAG",$J)
40 ;; S ^TMP("OCXDIAG",$J)=($P($H,",",2)+($H*86400)+(4*60*60))_" <- ^TMP ENTRY EXPIRATION DATE FOR ^OCXOPURG"
41 ;; S (OCXFLGR,OCXFLGC,OCXFLGA)=1
42 ;; S OCXFLGC=$$READ^OCXDI2("Y"," Do you want ^OCXDIAG to fix differences ?","YES") Q:(OCXFLGC[U)
43 ;; I OCXFLGC S OCXFLGA=$$READ^OCXDI2("Y"," Do you want to stop and ask before each change ?","YES") Q:(OCXFLGA[U)
44 ;; S OCXFLGD=$$READ^OCXDI2("Y"," Do you want ^OCXDIAG to check for extra local records ?","NO") Q:(OCXFLGD[U)
45 ;; ;
46 ;;RUN ;
47 ;; ;
48 ;; ; OCXFLGR = 0-> NO REPORT 1-> REPORT
49 ;; ; OCXFLGA = 0-> NO ASK 1-> ASK
50 ;; ; OCXFLGC = 0-> NO CHANGE 1-> CHANGE
51 ;; ; OCXFLGD = 0-> NO CHECK FOR EXTRAS 1-> CHECK
52 ;; ;
53 ;; D MESG("Loading Data ") D ^OCXDI001
54 ;; ;
55 ;; S LINE=0 F S LINE=$O(^TMP("OCXDIAG",$J,LINE)) Q:'LINE D Q:QUIT
56 ;; .D:'(LINE#50) STATUS^OCXOPOST(LINE,$O(^TMP("OCXDIAG",$J," "),-1))
57 ;; .S TEXT=$G(^TMP("OCXDIAG",$J,LINE)) I $L(TEXT) D Q:QUIT
58 ;; ..S TEXT=$P(TEXT,";",2,999),OPCODE=$P(TEXT,U,1),TEXT=$P(TEXT,U,2,999)
59 ;; ..;
60 ;; ..I OPCODE="RTN" K RSUM S RSUM(0)=TEXT Q
61 ;; ..I OPCODE="RSUM" S RSUM($O(RSUM(""),-1)+1)=TEXT Q
62 ;; ..I OPCODE="RND" S QUIT=$$RTN^OCXDI0(.RSUM) Q
63 ;; ..I OPCODE="REND" K RSUM D MESG("Scanning Data Files ") Q
64 ;; ..I OPCODE="RSTRT" D MESG("Scanning Routines ") Q
65 ;; ..I OPCODE="KEY" D DOT S LOCAL="",D0=$$GETFILE^OCXDI0(+$P(TEXT,U,1),$P(TEXT,U,2),.LOCAL) S QUIT=(D0=(-10)) Q
66 ;; ..I OPCODE="R" S REF="REMOTE("_$P($P(TEXT,U,1),":",1)_":"_D0_$P($P(TEXT,U,1),":",2,99)_")" Q
67 ;; ..I OPCODE="D",$D(REF) S @REF=$P(TEXT,U,1,999) K REF Q
68 ;; ..;
69 ;; ..I OPCODE="EOR" S QUIT=$$COMPARE^OCXDI1(.LOCAL,.REMOTE) K LOCAL,REMOTE Q
70 ;; ..I OPCODE="EOF" S QUIT=$$LISTFILE^OCXDI0(U_$P(TEXT,U,1),(+$P(TEXT,U,2)&OCXFLGD)) K LOCAL,REMOTE Q
71 ;; ..I OPCODE="SOF" D MESG(" Scanning '"_(TEXT)_"' file ") S:(('OCXFLGA)&(+TEXT=101.41)) OCXFLGC=0 Q
72 ;; ..I OPCODE="ROOT" D Q
73 ;; ...N FILE,DATA
74 ;; ...S FILE=U_$P(TEXT,U,1),DATA=$P(TEXT,U,2,3)
75 ;; ...Q:$D(@FILE)
76 ;; ...S @FILE=DATA
77 ;; ...D MESG(" Restoring file #"_(+$P(DATA,U,2))_" zero node")
78 ;; ..;
79 ;; ..W !,"Unknown OpCode: ",OPCODE," in: ",TEXT S QUIT=$$PAUSE^OCXDI0 W !
80 ;; ;
81 ;; D MESG("Checking protocols ") Q:$$EN^OCXDI5
82 ;; ;
83 ;; K ^TMP("OCXDIAG",$J)
84 ;; ;
85 ;; D MESG("Diagnostic Finished...")
86 ;; ;
87 ;; Q
88 ;; ;
89 ;;AUTO ;
90 ;; ;
91 ;; N QUIT,LINE,TEXT,REMOTE,LOCAL,D0,OPCODE,REF,OCXFLGA,OCXFLGC,OCXFLGR,OCXFLGD S QUIT=0
92 ;; ;
93 ;; S LASTFILE=0 K ^TMP("OCXDIAG",$J)
94 ;; S ^TMP("OCXDIAG",$J)=($P($H,",",2)+($H*86400)+(4*60*60))_" <- ^TMP ENTRY EXPIRATION DATE FOR ^OCXOPURG"
95 ;; S (OCXFLGD,OCXFLGA,OCXFLGR)=0,(OCXAUTO,OCXFLGC)=1
96 ;; ;
97 ;; D MESG(" ")
98 ;; D MESG("Order Check Expert System Diagnostic Tool")
99 ;; D MESG(" Created: |NOW| in UCI: |RUCI|")
100 ;; D MESG(" Current Date: "_($$NOW^OCXDI0)_" Current UCI: "_($$CUCI^OCXBDT))
101 ;; D MESG(" ")
102 ;; D MESG(" ")
103 ;; ;
104 ;; D RUN
105 ;; ;
106 ;; Q
107 ;; ;
108 ;;MESG(X) ;
109 ;; ;
110 ;; I '$G(OCXAUTO) W !,X
111 ;; E D BMES^XPDUTL(.X)
112 ;; Q
113 ;; ;
114 ;; ;
115 ;;DOT Q:$G(OCXAUTO) W:($X>70) ! W " ." Q
116 ;; ;
117 ;;$
118 ;1;
Note: See TracBrowser for help on using the repository browser.