source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOCMPU.m@ 1484

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1OCXOCMPU ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Build Local Term Translator) ;2/02/99 11:33
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5 Q
6 ;
7TERMLKUP ;
8 ;
9 N OCXSR,OCXD0,OCXD1,OCXNAME,TEXT,OCXREC,OCXFILE
10 ;
11 S OCXSR=""
12 D INCLUDE("TERMLKUP(OCXTERM,OCXLIST) ;")
13 ;
14 I OCXTRACE D
15 .D INCLUDE(" W:$G(OCXTRACE) !,||LNTAG||,?27,""Compiler Function TERMLKUP(OCXTERM,OCXLIST) Execution trace. """)
16 .D INCLUDE(" W:$G(OCXTRACE) !,?35,"" OCXTERM: "",$G(OCXTERM)")
17 .D INCLUDE(" ;")
18 D INCLUDE(" Q $$||LINE:"_$$LINE^OCXOCMP4("TERM","OCXTERM","OCXLIST")_"||(OCXTERM,.OCXLIST)")
19 D INCLUDE(" ;")
20 ;
21 K ^TMP("OCXCMP",$J,"INCLUDE","TERMLKUP")
22 M ^TMP("OCXCMP",$J,"INCLUDE","TERMLKUP")=OCXSR
23 ;
24 Q
25 ;
26TERM ;
27 ;
28 N OCXSR,OCXD0,OCXD1,OCXNAME,TEXT,OCXREC,OCXFILE
29 ;
30 D IN(" Q:'$L(OCXTERM) 0")
31 D IN(" ;")
32 ;
33 D IN(" N FILE,IEN,LINE,LTERM,NTERM,TEXT S FILE=0 K OCXLIST")
34 D IN(" F LINE=1:1:999 S TEXT=$T(TERM+LINE) Q:$P(TEXT,"";"",2) I ($E(TEXT,2,3)="";;"") D")
35 D IN(" .S TEXT=$P(TEXT,"";;"",2)")
36 D IN(" .S NTERM=$P(TEXT,U,1) Q:'$L(NTERM) Q:'(OCXTERM=NTERM)")
37 D IN(" .S FILE=$P(TEXT,U,2),IEN=$P(TEXT,U,3),LTERM=$P(TEXT,U,4)")
38 D IN(" .S OCXLIST(IEN)=LTERM,OCXLIST(""B"",LTERM,IEN)=""""")
39 D IN(" ;")
40 ;
41 I (OCXTRACE) D
42 .D IN(" I $G(OCXTRACE) S IEN=0 F S IEN=$O(OCXLIST(IEN)) Q:'IEN D")
43 .D IN(" .W:$G(OCXTRACE) !,?35,"" OCXLIST: "",$J(IEN,7),"" = "",OCXLIST(IEN)")
44 .D IN(" W:$G(OCXTRACE) !,||LNTAG||,?30,""TERM RESULT: (FILE: "",+$G(FILE),"") "",$G(COUNT),"" Local term(s) found.""")
45 .D IN(" ;")
46 ;
47 D IN(" Q FILE")
48 D IN(" ;")
49 ;
50 D IN(" ;TERM DATA;")
51 S OCXD0=0 F S OCXD0=$O(^OCXS(860.9,OCXD0)) Q:'OCXD0 D
52 .K OCXREC M OCXREC=^OCXS(860.9,OCXD0)
53 .S OCXNAME=$P(OCXREC(0),U,1) Q:'$L(OCXNAME)
54 .S OCXFILE=$P(OCXREC(0),U,2) Q:'$L(OCXFILE)
55 .;Q:'$O(OCXREC(1,0))
56 .S OCXD1=0 F S OCXD1=$O(OCXREC(1,OCXD1)) Q:'OCXD1 D
57 ..N IEN,NAME
58 ..S NAME=$P($G(OCXREC(1,OCXD1,0)),"^",1) Q:'$L(NAME)
59 ..S IEN=$P($G(OCXREC(1,OCXD1,0)),"^",2) Q:'IEN
60 ..D IN(" ;;"_OCXNAME_U_OCXFILE_U_IEN_U_NAME)
61 D IN(" ;1;")
62 D IN(" ;")
63 ;
64 Q
65 ;
66IN(CODE) D IN^OCXOCMP4("TERM",CODE,"Y",16000) Q
67 ;
68INCLUDE(LINE) ;
69 S OCXSR($O(OCXSR(" "),-1)+1,0)=LINE
70 Q
71 ;
Note: See TracBrowser for help on using the repository browser.