source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOCMP7.m@ 1361

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1OCXOCMP7 ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Build Local Extrinsic Functions) ;10/29/98 12:37
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5 ;
6EN(OCXFUNC,OCXCODE) ;
7 ;
8 N OCXLN,OCXTXT,OCXRTN,OCXRLN,OCXTR,OCXFLN,OCXRNAM
9 S OCXRTN=$O(^OCXS(860.8,"C",OCXFUNC,0)) Q:'OCXRTN
10 S OCXCODE=$G(OCXCODE),OCXFLN=$O(OCXCODE(""),-1)+1,OCXRNAM=$P($G(^OCXS(860.8,+OCXRTN,0)),U,1)
11 ;
12 S OCXLN=0 F S OCXLN=$O(^OCXS(860.8,OCXRTN,"CODE",OCXLN)) Q:'OCXLN D
13 .S OCXTXT=$G(^(OCXLN,0))
14 .S OCXRLN=$P(OCXTXT,";",2,999)
15 .S OCXTR=$P(OCXTXT,";",1)
16 .S:'$L(OCXRLN) OCXRLN=" ;"
17 .;
18 .F Q:'(OCXRLN["%%%%") S OCXRLN=$P(OCXRLN,"""%%%%""",1)_"||LNTAG||"_$P(OCXRLN,"""%%%%""",2,999)
19 .;
20 .I '(OCXTR["T"),'(OCXTR["L") S OCXCODE=OCXCODE+$L(OCXRLN),OCXCODE($O(OCXCODE(""),-1)+1)=OCXRLN Q
21 .;
22 .I (OCXTR["T"),(OCXTR["-"),'$G(OCXTRACE) S OCXCODE=OCXCODE+$L(OCXRLN),OCXCODE($O(OCXCODE(""),-1)+1)=OCXRLN Q
23 .I (OCXTR["T"),(OCXTR["+"),$G(OCXTRACE) S OCXCODE=OCXCODE+$L(OCXRLN),OCXCODE($O(OCXCODE(""),-1)+1)=OCXRLN Q
24 .;
25 .I (OCXTR["L"),(OCXTR["-"),'$G(OCXTLOG) S OCXCODE=OCXCODE+$L(OCXRLN),OCXCODE($O(OCXCODE(""),-1)+1)=OCXRLN Q
26 .I (OCXTR["L"),(OCXTR["+"),$G(OCXTLOG) S OCXCODE=OCXCODE+$L(OCXRLN),OCXCODE($O(OCXCODE(""),-1)+1)=OCXRLN Q
27 ;
28 I $L(OCXRNAM),$D(OCXCODE(OCXFLN)) S OCXCODE(OCXFLN)=OCXCODE(OCXFLN)_" ; "_OCXRNAM
29 ;
30 Q
31 ;
32METACODE(OCXFUNC,OCXCODE) ;
33 ;
34 N OCXELE,INDEX
35 S OCXELE=+$P(OCXFUNC,"E",2) Q:'OCXELE
36 D FILE(OCXFUNC_"() ; Verify Event/Element: '"_$P($G(^OCXS(860.3,+OCXELE,0)),U,1)_"'")
37 D FILE(" ;")
38 S INDEX1=$O(^TMP("OCXCMP",$J,"METACODE","B",OCXELE,0))
39 I INDEX1 S INDEX2=0 F S INDEX2=$O(^TMP("OCXCMP",$J,"METACODE",INDEX1,INDEX2)) Q:'INDEX2 D FILE(" "_^(INDEX2))
40 D FILE(" ;")
41 Q
42 ;
43FILE(X) ;
44 S OCXCODE($O(OCXCODE(999999),-1)+1)=X,OCXCODE=$G(OCXCODE)+$L(X)
45 Q
46 ;
47DFLIST(OCXELE) ;
48 ;
49 N LIST,DF
50 S LIST="",DF=0 F S DF=$O(^TMP("OCXCMP",$J,"ELEMENT",OCXELE,"DATA",DF)) Q:'DF S:$L(LIST) LIST=LIST_"," S LIST=LIST_DF
51 Q LIST
52 ;
Note: See TracBrowser for help on using the repository browser.