source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCOSA1.m@ 1421

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1ONCOSA1 ;WASH ISC/SRR-ANNUAL CROSS TABS-CANNED REPORTS-TASKED JOB ;12/14/99
2 ;;2.11;ONCOLOGY;**5,25**;Mar 07, 1995
3 Q ;NOT A RUN ROUTINE
4 ;
5TSK ;Tasked job to print all cross tab tables
61 S J=0 F NM="NON ANAL","ANALYTIC","ALLCASES" S D0=$O(^DIBT("F165.5","ONCOS RANGE-"_NM,0)) Q:D0="" S KD(J)=D0,$P(^DIBT(D0,0),U,2)=DT,J=J+1 K ^DIBT(D0,1)
7 S RG=ONCOS("RG"),Y1=$P(RG,U),Y2=$P(RG,U,2) F YR=Y1:1:Y2 S D0=0 D
8 .F S D0=$O(^ONCO(165.5,"AY",YR,D0)) Q:D0'>0 I $$DIV^ONCFUNC(D0)=DUZ(2) S CC=+$P(^ONCO(165.5,D0,0),U,20),^DIBT(KD(CC),1,D0)="",^DIBT(KD(2),1,D0)=""
92 F J=0 F NM="NON ANAL","ANALYTIC","ALLCASES" S D0=$O(^DIBT("F165.5","ONCOS ANNUAL-"_NM,0)) Q:D0="" S XD(J)=D0,$P(^DIBT(D0,0),U,2)=DT,J=J+1 K ^DIBT(D0,1)
10 S YR=+ONCOS("YR"),D0=0 F S D0=$O(^ONCO(165.5,"AY",YR,D0)) Q:D0="" I $$DIV^ONCFUNC(D0)=DUZ(2) S CC=+$P(^ONCO(165.5,D0,0),U,20),^DIBT(XD(CC),1,D0)="",^DIBT(XD(2),1,D0)=""
113 ;Setup templates for Stage/Treatment
12 F G="0","I","II","III","IV","U","NA" D
13 .S D0=$O(^DIBT("F165.5","ONCOS ANAL/STAGE "_G,0)) Q:D0'>0 K ^DIBT(D0,1) S XD(G)=D0,$P(^DIBT(D0,0),U,2)=DT
14 S D0=0 F S D0=$O(^ONCO(165.5,"AG",1,D0)) Q:D0'>0 I $$DIV^ONCFUNC(D0)=DUZ(2) S G=$P($G(^ONCO(165.5,D0,2)),U,28) I G'="" S ^DIBT(XD(G),1,D0)=""
15 ;
164 F G=0,"I","II","III","IV","U","NA" D
17 .S D0=$O(^DIBT("F165.5","ONCOS ANNUAL ANAL/STAGE "_G,0)) Q:D0'>0 K ^DIBT(D0,1) S XD(G)=D0,$P(^DIBT(D0,0),U,2)=DT
18 S D0=0 F S D0=$O(^ONCO(165.5,"AY",YR,D0)) Q:D0'>0 I $$DIV^ONCFUNC(D0)=DUZ(2) S G=$P($G(^ONCO(165.5,D0,2)),U,28) I G'="" S ^DIBT(XD(G),1,D0)=""
19TAB ;Call to do crosstabs for each case
20 ;Given ONCOS("R")=row,ONCOS("P")=percentages
21 ;Reset ONCOS("C") and ONCOS("T")
22 S ONCOEX=0,ONCOS("TK")=1,ONCOS("F")="ONCOLOGY PRIMARY",(ONCOS("N"),ONCOS("Y"))=""
23R S ONCOS("T")="ONCOS RANGE-ALLCASES",ONCOS("C")="CLASS CATEGORY" D PRINT^ONCOSCT Q:ONCOEX
24 F NM="ALLCASES","NON ANAL","ANALYTIC" Q:ONCOEX S ONCOS("T")="ONCOS RANGE-"_NM D
25 .F I=2:1:13 Q:ONCOEX D
26 ..S ONCOS("C")=$P($T(COL+I),";",3) D PRINT^ONCOSCT
27 Q:ONCOEX F I=14:1:17 Q:ONCOEX D
28 .S ONCOS("C")=$P($T(COL+I),";",3) D PRINT^ONCOSCT
29 Q:ONCOEX F G=0,"I","II","III","IV","U","NA" Q:ONCOEX D
30 .S ONCOS("T")="ONCOS ANAL/STAGE "_G,ONCOS("C")="TREATMENT" D PRINT^ONCOSCT
31 ;ANNUAL CASES
32AN Q:ONCOEX S ONCOS("T")="ONCOS ANNUAL-ALLCASES",ONCOS("C")="CLASS CATEGORY" D PRINT^ONCOSCT Q:ONCOEX
33 Q:ONCOEX F NM="ALLCASES","NON ANAL","ANALYTIC" Q:ONCOEX S ONCOS("T")="ONCOS ANNUAL-"_NM D
34T .F I=2:1:13 Q:ONCOEX D
35 ..S ONCOS("C")=$P($T(COL+I),";",3) D PRINT^ONCOSCT
36 Q:ONCOEX F I=14:1:17 Q:ONCOEX D
37 .S ONCOS("C")=$P($T(COL+I),";",3) D PRINT^ONCOSCT
38 Q:ONCOEX F G=0,"I","II","III","IV","U","NA" Q:ONCOEX D
39 .S ONCOS("T")="ONCOS ANNUAL ANAL/STAGE "_G,ONCOS("C")="TREATMENT" D PRINT^ONCOSCT
40EX ;EXIT
41 K ONCOS,RG,YR,Y1,Y2,D0,ONCOEX,ONCOION,ONCOIOM
42 Q
43COL ;List of fields for Columns
44 ;;CLASS CATEGORY
45 ;;ACCESSION YEAR
46 ;;CLASS NO.
47 ;;STATUS
48 ;;SEX
49 ;;RACE
50 ;;RACE-SEX
51 ;;SEX-RACE
52 ;;DX AGE-GP
53 ;;PLACE OF BIRTH
54 ;;MARITAL STATUS AT DX
55 ;;STATE
56 ;;ST-COUNTY
57 ;;SUMMARY STAGE
58 ;;HISTOLOGY
59 ;;STAGE GROUPING-AJCC
60 ;;TREATMENT
61 ;;GP-G AJCC SUMMARY STAGE
Note: See TracBrowser for help on using the repository browser.