source: WorldVistAEHR/trunk/r/MEDICINE-MC/MCOBRHA1.m@ 1226

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1MCOBRHA1 ; GENERATED FROM 'MCRHBRPR1' PRINT TEMPLATE (#1037) ; 10/04/96 ; (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 D T Q:'DN D N D N D N:$X>0 Q:'DN W ?0 W "MEDICATION: "
15 S I(1)=6,J(1)=701.0201 F D1=0:0 Q:$O(^MCAR(701,D0,6,D1))'>0 X:$D(DSC(701.0201)) DSC(701.0201) S D1=$O(^(D1)) Q:D1'>0 D:$X>0 T Q:'DN D A1
16 G A1R
17A1 ;
18 S X=$G(^MCAR(701,D0,6,D1,0)) D N:$X>4 Q:'DN W ?4 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695,Y,0))#2:$P(^(0),U,1),1:Y) S Y=$S(Y="":Y,$D(^PSDRUG(Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,40)
19 D N:$X>4 Q:'DN W ?4,$E($P(X,U,2),1,10)
20 D N:$X>4 Q:'DN W ?4,$E($P(X,U,3),1,10)
21 Q
22A1R ;
23 D T Q:'DN D N D N D N:$X>0 Q:'DN W ?0 W "DIAGNOSIS: "
24 S I(1)=13,J(1)=701.0615 F D1=0:0 Q:$O(^MCAR(701,D0,13,D1))'>0 X:$D(DSC(701.0615)) DSC(701.0615) S D1=$O(^(D1)) Q:D1'>0 D:$X>0 T Q:'DN D B1
25 G B1R
26B1 ;
27 S X=$G(^MCAR(701,D0,13,D1,0)) D N:$X>4 Q:'DN W ?4 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(697.5,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,50)
28 D N:$X>4 Q:'DN W ?4 S Y=$P(X,U,2) D DT
29 Q
30B1R ;
31 S I(1)="""ICD""",J(1)=701.01 F D1=0:0 Q:$O(^MCAR(701,D0,"ICD",D1))'>0 X:$D(DSC(701.01)) DSC(701.01) S D1=$O(^(D1)) Q:D1'>0 D:$X>17 T Q:'DN D C1
32 G C1R
33C1 ;
34 S X=$G(^MCAR(701,D0,"ICD",D1,0)) D N:$X>9 Q:'DN S DIWL=10,DIWR=69 S Y=$P(X,U,2) S X=Y D ^DIWP
35 D A^DIWW
36 Q
37C1R ;
38 D T Q:'DN D N D N D N:$X>0 Q:'DN W ?0 W "PROCEDURE SUMMARY: "
39 S X=$G(^MCAR(701,D0,.2)) D N:$X>9 Q:'DN S DIWL=10,DIWR=69 S Y=$P(X,U,2) S X=Y D ^DIWP
40 D A^DIWW
41 D T Q:'DN D N D N D N:$X>0 Q:'DN W ?0 W "SUMMARY: "
42 S X=$G(^MCAR(701,D0,.2)) S Y=$P(X,U,1) W:Y]"" $S($D(DXS(34,Y)):DXS(34,Y),1:Y)
43 W ?0 S MCFILE=701 D DISP^MCMAG K DIP K:DN Y
44 W ?11 K MCFILE K DIP K:DN Y
45 K Y K DIWF
46 Q
47HEAD ;
48 W !,"--------------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.