source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOED11.m@ 1046

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

initial load of WorldVistAEHR

File size: 2.8 KB
RevLine 
[613]1OCXOED11 ;SLC/RJS,CLA - Rule Editor (Data Field Display) ;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 ;
6S ;
7 ;
8 Q
9EN(OCXD0) ;
10 ;
11 N OCXACT,OCXRD
12 F K OCXRD,OCXACT S (OCXRD,OCXACT)="" D DISP(OCXD0,.OCXRD,.OCXACT) Q:$$EN^OCXOED12(OCXD0,.OCXRD,.OCXACT)
13 ;
14 Q
15 ;
16DISP(OCXD0,OCXRD,OCXACT) ;
17 ;
18 N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN,OCXD1
19 ;
20 S OCXTNLN=$C(27,91,48,109),OCXTRLN=$C(27,91,55,109),OCXTULN=$C(27,91,52,109),OCXTHLN=$C(27,91,49,109)
21 ;
22 S OCXD1=0 D GETDATA(OCXD0,OCXD1,.OCXRD)
23 ;
24 F S OCXD1=$O(^OCXS(860.4,OCXD0,"LINK",OCXD1)) Q:'OCXD1 D GETDATA(OCXD0,OCXD1,.OCXRD)
25 ;
26 W @IOF,OCXTNLN
27 W !,$$CENTER($$FIELD("Data Field Edit Screen"),80),!!
28 W !," ",$$OPT^OCXOEDT("Edit","EDIT","12",.OCXACT,OCXD0)
29 W " ",$$FIELD("Data Field:")," ",$$DATA($G(OCXRD("DF",OCXD0,.01,"E")),50)
30 W !," ",$$FIELD("Abbrev:")," ",$$DATA($G(OCXRD("DF",OCXD0,1,"E")),50)
31 ;
32 W !!,$$SEP("Meta Dictionary Links"),!
33 S OCXD1=0 F S OCXD1=$O(OCXRD("DF",OCXD0,"LINK",OCXD1)) Q:'OCXD1 D
34 .N OCXLINK,OCXCON,OCXAM
35 .S OCXLINK=$G(OCXRD("DF",OCXD0,"LINK",OCXD1,1,"E"))
36 .S OCXCON=$G(OCXRD("DF",OCXD0,"LINK",OCXD1,.01,"Z",.02,"E"))
37 .S OCXAM=$G(OCXRD("DF",OCXD0,"LINK",OCXD1,.01,"Z",1,"E"))
38 .W !!
39 .W " ",$$OPT^OCXOEDT("Link"_OCXD1,"EDLINK","12",.OCXACT,""""_OCXLINK_""","_OCXD1)
40 .W " ",$$FIELD("Link:")," ",$$DATA(OCXLINK_" ( "_OCXCON_" "_OCXAM_" )",50)
41 ;
42 W !!
43 W " ",$$OPT^OCXOEDT("Add Link","LOPT","12",.OCXACT,"""ADD"","_OCXD0,"AL")
44 W " ",$$OPT^OCXOEDT("Delete Link","LOPT","12",.OCXACT,"""DEL"","_OCXD0,"DL")
45 ;
46 Q
47 ;
48CENTER(X,M) ;
49 N SP S SP="",$P(SP," ",80)=" " Q $E(SP,1,((M\2)-($L(X)\2)))_X
50 ;
51SEP(OCXHDR) ;
52 ;
53 N SPACES S SPACES="",$P(SPACES," ",80-$L(OCXHDR))=" " Q OCXTNLN_OCXTHLN_OCXTULN_$G(OCXHDR)_SPACES_OCXTNLN
54 ;
55FIELD(OCXHDR) ;
56 ;
57 Q OCXTHLN_$G(OCXHDR)_OCXTNLN
58 ;
59DATA(OCXVAL,OCXLEN) ;
60 ;
61 N SPACES S SPACES="",$P(SPACES," ",OCXLEN+5)=" ",OCXVAL=$G(OCXVAL)
62 I ($L(OCXVAL)>OCXLEN) Q $E(OCXVAL,1,OCXLEN-3)_"..."
63 Q $E((OCXVAL_SPACES),1,OCXLEN)
64 ;
65GETDATA(OCXD0,OCXD1,OCXD) ;
66 ;
67 N OCXDIQ,OCXSRC,OCXX S OCXDIQ=""
68 ;
69 I 'OCXD1 D DIQ("^OCXS(860.4,",OCXD0,"IEN",.OCXDIQ) M OCXD("DF")=OCXDIQ(860.4) Q
70 ;
71 D DIQ("^OCXS(860.4,"_OCXD0_",""LINK"",",OCXD1,"IEN",.OCXDIQ) M OCXD("DF",OCXD0,"LINK")=OCXDIQ(860.41)
72 ;
73 K OCXDIQ S OCXDIQ="" D DIQ("^OCXS(860.6,",OCXD1,"IEN",.OCXDIQ)
74 M OCXD("DF",OCXD0,"LINK",OCXD1,.01,"Z")=OCXDIQ(860.6,OCXD1) K OCXDIQ S OCXDIQ=""
75 ;
76 Q
77 ;
78DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
79 ;
80 N DIC,X,Y
81 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
82 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
83 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
84 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
85 S:$L($G(OCXDR)) DIC("DR")=OCXDR
86 D ^DIC Q:(Y<1) 0 Q Y
87 ;
88DIQ(DIC,DA,OCXDIQ0,OCXARY) ;
89 N DR,DIQ S DR=".01:99999",DIQ="OCXARY(",DIQ(0)=$G(OCXDIQ0) D EN^DIQ1
90 Q
91 ;
Note: See TracBrowser for help on using the repository browser.