source: FOIAVistA/tag/r/ONCOLOGY-ONC/ONCOXNC.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 5.3 KB
Line 
1ONCOXNC ; GENERATED FROM 'ONCO XINCIDENCE RPRT' PRINT TEMPLATE (#872) ; 07/02/04 ; (FILE 165.5, MARGIN=80)
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 I $D(DXS)<9 M DXS=^DIPT(872,"DXS")
15 S I(0)="^ONCO(165.5,",J(0)=165.5
16 S I(100)="^ONCO(160,",J(100)=160 S I(0,0)=D0 S DIP(1)=$S($D(^ONCO(165.5,D0,0)):^(0),1:"") S X=$P(DIP(1),U,2),X=X S D(0)=+X S D0=D(0) I D0>0 D A1
17 G A1R
18A1 ;
19 W ?0 X $P(^DD(160,1000,0),U,5,99) S Y(160,1000.1,1)=X S X=Y(160,1000.1,1),X=$J("",$S($D(DIWR)+$D(DIWL)=2:DIWR-DIWL+1,$D(IOM):IOM,1:80)-$L(X)\2-$X)_X W $E(X,1,96) K Y(160,1000.1)
20 D T Q:'DN W ?0 X $P(^DD(160,1001,0),U,5,99) S Y(160,1001.1,1)=X S X=Y(160,1001.1,1),X=$J("",$S($D(DIWR)+$D(DIWL)=2:DIWR-DIWL+1,$D(IOM):IOM,1:80)-$L(X)\2-$X)_X W $E(X,1,96) K Y(160,1001.1)
21 D T Q:'DN W ?0 X $P(^DD(160,1002,0),U,5,99) S Y(160,1002.1,1)=X S X=Y(160,1002.1,1),X=$J("",$S($D(DIWR)+$D(DIWL)=2:DIWR-DIWL+1,$D(IOM):IOM,1:80)-$L(X)\2-$X)_X W $E(X,1,96) K Y(160,1002.1)
22 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
23 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
24 S X=$G(^ONCO(160,D0,0)) D N:$X>4 Q:'DN W ?4 S Y=$P(X,U,1) S C=$P(^DD(160,.01,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,30)
25 D N:$X>44 Q:'DN W ?44 X "N I,Y "_$P(^DD(160,1003,0),U,5,99) S DIP(101)=X S X="State Hospital No: "_DIP(101) K DIP K:DN Y W X
26 D N:$X>4 Q:'DN W ?4 S X="" D SA1^ONCOES W $J(X,16) K Y(160,.111)
27 D N:$X>4 Q:'DN W ?4 S X="" D ZIPCT^ONCOES W $J(X,31) K Y(160,.118)
28 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
29 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
30 D N:$X>19 Q:'DN W ?19 W "****************************************" K DIP K:DN Y
31 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
32 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
33 D N:$X>4 Q:'DN W ?4 X "N I,Y "_$P(^DD(160,2,0),U,5,99) S DIP(101)=X S X="SSN: "_DIP(101) K DIP K:DN Y W X
34 W ?4 D DOB^ONCOES K DIP K:DN Y
35 D N:$X>44 Q:'DN W ?44 W "DOB: "_X K DIP K:DN Y
36 D N:$X>4 Q:'DN W ?4 S DIP(102)=$C(59)_$P($G(^DD(160,10,0)),U,3),DIP(101)=$S($D(^ONCO(160,D0,0)):^(0),1:"") S X="SEX: "_$P($P(DIP(102),$C(59)_$P(DIP(101),U,8)_":",2),$C(59)) K DIP K:DN Y W X
37 D N:$X>44 Q:'DN W ?44 S DIP(101)=$S($D(^ONCO(160,D0,0)):^(0),1:"") S X="POB: "_$P($G(^ONCO(165.2,+$P(DIP(101),U,5),0)),U) K DIP K:DN Y W X
38 D N:$X>4 Q:'DN W ?4 S DIP(101)=$S($D(^ONCO(160,D0,0)):^(0),1:"") S X="RACE: "_$P($G(^ONCO(164.46,+$P(DIP(101),U,6),0)),U) K DIP K:DN Y W X
39 D N:$X>44 Q:'DN W ?44 X DXS(1,9) K DIP K:DN Y W $E(X,1,36)
40 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
41 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
42 D N:$X>19 Q:'DN W ?19 W "****************************************" K DIP K:DN Y
43 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
44 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
45 Q
46A1R ;
47 K J(100),I(100) S:$D(I(0,0)) D0=I(0,0)
48 D N:$X>4 Q:'DN W ?4 W "DATE DX: " K DIP K:DN Y
49 S X=$G(^ONCO(165.5,D0,0)) D N:$X>13 Q:'DN W ?13 S Y=$P(X,U,16) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,10)
50 D N:$X>44 Q:'DN W ?44 S DIP(1)=$S($D(^ONCO(165.5,D0,2)):^(2),1:"") S X="IDCO SITE: "_$P($G(^ONCO(164,+$P(DIP(1),U,1),0)),U) K DIP K:DN Y W X
51 D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^ONCO(165.5,D0,2.2)):^(2.2),1:"") S X="HISTOLOGY (ICD-O-3): "_$P($G(^ONCO(169.3,+$P(DIP(1),U,3),0)),U) K DIP K:DN Y W $E(X,1,38)
52 D N:$X>44 Q:'DN W ?44 X DXS(2,9) K DIP K:DN Y W $E(X,1,36)
53 D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^ONCO(165.5,D0,2)):^(2),1:"") S X="GRADE: "_$$EXTERNAL^DIDU(165.5,24,"",$P(DIP(1),U,5)) K DIP K:DN Y W X
54 D N:$X>44 Q:'DN W ?44 X DXS(3,9) K DIP K:DN Y W $E(X,1,36)
55 D N:$X>4 Q:'DN W ?4 X DXS(4,9) K DIP K:DN Y W X
56 D N:$X>44 Q:'DN W ?44 X DXS(5,9) K DIP K:DN Y W $E(X,1,36)
57 D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^ONCO(165.5,D0,0)):^(0),1:"") S X="Sequence Number: "_$P(DIP(1),U,6) K DIP K:DN Y W X
58 D N:$X>44 Q:'DN W ?44 S DIP(1)=$S($D(^ONCO(165.5,D0,0)):^(0),1:"") S X="Primary Physician: "_$P($G(^ONCO(165,+$P(DIP(1),U,12),0)),U) K DIP K:DN Y W $E(X,1,35)
59 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
60 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
61 D N:$X>19 Q:'DN W ?19 W "***************************************" K DIP K:DN Y
62 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
63 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
64 W ?0 D PDLC^ONCOCRF,DATEOT^ONCOES K DIP K:DN Y
65 D N:$X>4 Q:'DN W ?4 W "DATE of LAST CONTACT: "_X K DIP K:DN Y
66 D N:$X>44 Q:'DN W ?44 X "N I,Y "_$P(^DD(165.5,.091,0),U,5,99) S DIP(1)=X S X="VITAL STATUS: "_DIP(1) K DIP K:DN Y W X
67 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
68 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
69 D N:$X>19 Q:'DN W ?19 W "***************************************" K DIP K:DN Y
70 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
71 D N:$X>0 Q:'DN W ?0 W " " K DIP K:DN Y
72 D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^ONCO(165.5,D0,7)):^(7),1:"") S X="ABSTRACTER: "_$P($G(^VA(200,+$P(DIP(1),U,3),0)),U) K DIP K:DN Y W X
73 D N:$X>44 Q:'DN W ?44 W "DATE CASE COMPLETED: " K DIP K:DN Y
74 S X=$G(^ONCO(165.5,D0,7)) D N:$X>65 Q:'DN W ?65 S Y=$P(X,U,1) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,10)
75 K Y
76 Q
77HEAD ;
78 W !,"--------------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.