source: WorldVistAEHR/trunk/r/DENTAL-DEN/DENTDCQ1.m@ 1133

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

initial load of WorldVistAEHR

File size: 4.1 KB
RevLine 
[613]1DENTDCQ1 ;WASH ISC/TJK-HELP FROM DIC (MODIFIED ) ;9/8/92 07:58
2 ;;1.2;DENTAL;***15**;Oct 08, 1992
3 S Y=$S('$D(%Y):0,%Y:%Y-.00000001,1:%Y),DS=DS_X,X=-1 I DIZ S DIY=$L($P(DO,U,3))+DIY+5 S:Y="" Y=0
4 E S X=$S(Y=0:-1,1:Y),Y=0
5 D Y I $D(DIC("W")),$D(DEBDIC),DIX[DEBDIC_DEDF S DIY=" I $D("_DIC_"Y,0)) X:$D(DIC(""W"")) DIC(""W"")" S:$L(DS)+$L(DIY)<254 DS=DS_DIY S DIY=99
6 I $D(DIC("W")),'$D(DEBDIC) S DIY=" I $D("_DIC_"Y,0)) X:$D(DIC(""W"")) DIC(""W"")" S:$L(DS)+$L(DIY)<254 DS=DS_DIY S DIY=99
7LST W !?3 S DD=DIY+3 I $Y>21 R "Press <RETURN> to Continue, '^' to Quit: ",%Y:DTIME X:%Y'?1"^" DJCP Q:%Y?1"^" W $C(13),$J("",15),$C(13),?3 G 0:%Y?1P D Y
8L X DIX I G 0
9 S DIW=$X X DS Q:$G(%Y)=U I DIW-$X G LST:DD+DIY>79,LST:$Y>21 W ?DD S DD=DD+DIY
10 G L
11 ;
12WOV S %DIC=DIC,DIC=%Z,%WW=Y,Y=%Y
13W1 S %X=$O(^DD(%W,0,"ID",%X)) I %X]"" S %=^(%X) X "W "" "",$E("_%Z_%Y_",0),0)",% G W1
14 S DIC=%DIC,Y=%WW K %DIC,%W,%X,%WW,%Z Q
15 ;
16Y ;I $D(^("OS",^DD("OS"),"XY")) S DIZ=^("XY") I DIZ?1U.E S (IOX,IOY)=0 X DIZ K IOX,IOY
17 S DIZ=$Y+21 Q
18CONT R !," Press <RETURN> to Continue, '^' to Quit: ",%Y:DTIME Q
19 ;
20S S DS(1)=X,DS(2)=Y I 1 X:$D(DIC("S")) DIC("S")
21 I $T S Y=DS(2) D SCR:$D(DO("SCR"))
22 S X=DS(1),Y=DS(2)
23 IF D I 1 ; clear bottom of screen if necessary
24 . IF $Y>21 D
25 .. D CONT
26 .. I %Y'=U X DJCP
27 .. Q
28 . ;END IF
29 . ;
30 . Q
31 ;END IF
32 ;
33 Q
34 ;
35SCR I @("$D("_DIC_"Y,0))") X DO("SCR")
36 Q
37 ;
38DT W:$E(%,4,5) +$E(%,4,5)_"-" W:$E(%,6,7) +$E(%,6,7)_"-" W $E(%,1,3)+1700 W:%["." " ("_$E(%_0,9,10)_":"_$E(%_"000",11,12)_")" Q
39 ;
400 ;
41 K DIW,DIZ,DS Q:DIC(0)'["L" S XQH=-1 I $D(%Y) S:%Y="??" DZ=%Y S:%Y?1P DZ="?"
42 I $S($D(DLAYGO):DO(2)\1-DLAYGO,1:1),$D(^DIC(+DO(2),0,"LAYGO")),DUZ(0)'="@" F X=1:1 S Y=$E(^("LAYGO"),X) I DUZ(0)[Y G RCR:Y="" Q
43 I $D(DZ)#2,DZ="?" W:$X>3 ! W ?3,"YOU MAY ENTER A NEW ",$P(DO,U,1),", IF YOU WISH" D CONT Q:%Y=U
44 I X DJCP F DG=3,12 I $D(^DD(+DO(2),.01,DG)) S X=^(DG) F %=$L(X," "):-1:1 I $L($P(X," ",1,%))<70 W !?5,$P(X," ",1,%) W:%'=$L(X," ") !?5,$P(X," ",%+1,99) Q
45 S DZ1=DO(2),DZ1(0)=DIC(0),DZ1(1)=DO
46 I $D(^DD(+DO(2),.01,4)) X ^(4)
47 IF $G(DZ)?1"??".E D
48 . IF $D(^DD(+DO(2),.01,22)) D
49 .. S XQH=^DD(+DO(2),.01,22)
50 .. D EN1^XQH
51 .. Q
52 . ;END IF
53 . ;
54 . IF XQH=-1,$D(^DD(+DZ1,.01,21)) D
55 .. IF $P(^DD(+DZ1,.01,21,0),"^",4)+$Y>21 D
56 ... D CONT
57 ... I %Y'=U X DJCP
58 ... Q
59 .. ;END IF
60 .. ;
61 .. I $G(%Y)'=U F X=1:1 Q:'$D(^DD(+DZ1,.01,21,X,0)) W !,^(0)
62 .. Q
63 . ;END IF
64 . ;
65 . Q
66 ;END IF
67 ;
68 I $G(%Y)=U Q
69 S DO(2)=$S(DJ4["S":DJ4,1:DZ1),DIC(0)=DZ1(0),DO=DZ1(1) K DZ1
70 I $Y>21 D CONT Q:%Y=U X DJCP
71 I $D(DZ),DO(2)["S" W !,"CHOOSE FROM: " F X=1:1 S Y=$P($P(^DD(+DO(2),.01,0),U,3),";",X) D CONT:Y="" Q:Y="" W !?7,$P(Y,":",1),?15," ",$P(Y,":",2) I $Y>21,$P($P(^(0),U,3),";",X+1)'="" D CONT Q:%Y=U X DJCP
72 I DO(2)["V" S DU=+DO(2),D=.01 D V
73RCR Q:DO(2)'["P"!$D(DZ(1)) S DZ(1)=DIC,DZ(0)=DIC(0),DS=^DD(+DO(2),.01,0),DIC=U_$P(DS,U,3),DIC(0)=$E("L",$P(DS,U,2)'["'")
74 F Y=1:1:3 S X=$E("VWS",Y) S:$D(DIC(X)) DZ(X)=DIC(X) K DO K:Y<3!'DS DIC(X)
75 K:DS DZ(3) D DQ^DENTDCQ K DICW,DICS S DIC=DZ(1),DIC(0)=DZ(0) F Y=1:1:3 S X=$E("VWS",Y) K DO,DIC(X) S:$D(DZ(Y)) DIC(X)=DZ(Y)
76 Q
77V W:$X ! W ?5,"Enter one of the following:",!?7
78 F Y=0:0 S Y=$O(^DD(DU,D,"V",Y)) S:Y="" Y=-1 Q:Y'>0 I $D(^(Y,0)) S Y(0)=^(0) X:$D(DIC("V")) DIC("V") I W:$D(^DIC(+Y(0),0)) $P(Y(0),U,4)_".EntryName to select a "_$P(Y(0),U,2),!?7
79 W !?5,"To see the entries in any particular file, type <Prefix.?>",! S DU="" I DZ'?1"??".E K X,DZ Q
80T F DG=2:1 S X=$T(T+DG) Q:X="" W !?5,$E(X,4,99)
81 K X,DZ Q
82 ;;If you simply enter the name then the system will search each of
83 ;;the above files for the name you have entered. If a match is
84 ;;found the system will ask you if it is the entry that you desire.
85 ;;
86 ;;However, if you know the file name of the entry you want
87 ;;then you can speed up processing by using the following
88 ;;syntax to choose the entry:
89 ;; <Prefix>.<entry name>
90 ;; or
91 ;; <Message>.<entry name>
92 ;; or
93 ;; <File Name>.<entry name>
94 ;;
95 ;;Also, you do NOT need to enter the entire file name or message
96 ;;to direct the look up. Using the first few characters will
97 ;;be enough information.
Note: See TracBrowser for help on using the repository browser.