source: WorldVistAEHR/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHCG1.m@ 623

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

initial load of WorldVistAEHR

File size: 3.5 KB
RevLine 
[613]1DVBHCG1 ; GENERATED FROM 'DVBHINQ PAT-HINQ COMP' PRINT TEMPLATE (#513) ; 03/30/98 ; (continued)
2 G BEGIN
3N W !
4T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
5 S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
6 Q
7DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
8 I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
9 W Y Q
10M D @DIXX
11 Q
12BEGIN ;
13 S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
14 W ! I $D(DVBEOD(2)),DVBEOD(2)?7N S Y=DVBEOD(2) X ^DD("DD") W ?1,Y K Y K DIP K:DN Y
15 I $D(DVBRAD(2)),DVBRAD(2)?7N S Y=DVBRAD(2) X ^DD("DD") W ?15,Y K Y K DIP K:DN Y
16 I $D(DVBBOS(2)) W ?34,DVBBOS(2) K DIP K:DN Y
17 I $D(DVBCSVC(2)) W ?48,DVBCSVC(2) K DIP K:DN Y
18 I $D(DVBSN(2)) W ?62,DVBSN(2) K DIP K:DN Y
19 W ! I $D(DVBEOD(3)),DVBEOD(3)?7N S Y=DVBEOD(3) X ^DD("DD") W ?1,Y K Y K DIP K:DN Y
20 I $D(DVBRAD(3)),DVBRAD(3)?7N S Y=DVBRAD(3) X ^DD("DD") W ?15,Y K Y K DIP K:DN Y
21 I $D(DVBBOS(3)) W ?34,DVBBOS(3) K DIP K:DN Y
22 I $D(DVBCSVC(3)) W ?48,DVBCSVC(3) K DIP K:DN Y
23 I $D(DVBSN(3)) W ?62,DVBSN(3) K DIP K:DN Y
24 W ! I $D(DVBEOD(4)),DVBEOD(4)?7N S Y=DVBEOD(4) X ^DD("DD") W ?1,Y K Y K DIP K:DN Y
25 I $D(DVBRAD(4)),DVBRAD(4)?7N S Y=DVBRAD(4) X ^DD("DD") W ?15,Y K Y K DIP K:DN Y
26 I $D(DVBBOS(4)) W ?34,DVBBOS(4) K DIP K:DN Y
27 I $D(DVBCSVC(4)) W ?48,DVBCSVC(4) K DIP K:DN Y
28 I $D(DVBSN(4)) W ?62,DVBSN(4) K DIP K:DN Y
29 W !!,?34,"Patient File" K DIP K:DN Y
30 W ?44 W !,"-------------------------------------------------------------------------------" K DIP K:DN Y
31 W !," Last episode" K DIP K:DN Y
32 S X=$G(^DPT(D0,.32)) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,6) D DT
33 D N:$X>14 Q:'DN W ?14 S Y=$P(X,U,7) D DT
34 D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,5) S Y=$S(Y="":Y,$D(^DIC(23,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
35 D N:$X>47 Q:'DN W ?47 S Y=$P(X,U,4) S Y=$S(Y="":Y,$D(^DIC(25,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,20)
36 D N:$X>61 Q:'DN W ?61,$E($P(X,U,8),1,15)
37 W !," NTL episode" K DIP K:DN Y
38 S X=$G(^DPT(D0,.32)) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,11) D DT
39 D N:$X>14 Q:'DN W ?14 S Y=$P(X,U,12) D DT
40 D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,10) S Y=$S(Y="":Y,$D(^DIC(23,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
41 D N:$X>47 Q:'DN W ?47 S Y=$P(X,U,9) S Y=$S(Y="":Y,$D(^DIC(25,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,20)
42 D N:$X>61 Q:'DN W ?61,$E($P(X,U,13),1,15)
43 D T Q:'DN W ?2 W !," NNTL episode" K DIP K:DN Y
44 S X=$G(^DPT(D0,.32)) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,16) D DT
45 D N:$X>14 Q:'DN W ?14 S Y=$P(X,U,17) D DT
46 D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,15) S Y=$S(Y="":Y,$D(^DIC(23,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
47 D N:$X>47 Q:'DN W ?47 S Y=$P(X,U,14) S Y=$S(Y="":Y,$D(^DIC(25,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,20)
48 D N:$X>61 Q:'DN W ?61,$E($P(X,U,18),1,15)
49 W ?61 X DXS(8,9) K DIP K:DN Y
50 D T Q:'DN D N D N D N:$X>0 Q:'DN W ?0 W "Other Annual Retirement (PAYEE):"
51 S X=$G(^DPT(D0,.362)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,18) W:Y]"" $S($D(DXS(13,Y)):DXS(13,Y),1:Y)
52 W ?34 I $D(DVBRETT) S V=DVBRETT D TR^DVBHS6 W ?52,V K DIP K:DN Y
53 D N:$X>0 Q:'DN W ?0 W "Amt. other Annl. Ret. (PAYEE):"
54 S X=$G(^DPT(D0,.362)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,8) W:Y]"" $J(Y,9,2)
55 W ?34 I $D(DVBRETO) W ?52,DVBRETO K DIP K:DN Y
56 D N:$X>0 Q:'DN W ?0 W "Amt. other Annl. Inc. (PAYEE):"
57 S X=$G(^DPT(D0,.362)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,9) W:Y]"" $J(Y,9,2)
58 W ?34 I $D(DVBOINC) W ?52,DVBOINC K DIP K:DN Y
59 K Y
60 Q
61HEAD ;
62 W !,"--------------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.