source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCGPC0.m@ 1361

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1ONCGPC0 ;Hines OIFO/GWB - 2001 Gastric Cancers PCE Study ;02/27/01
2 ;;2.11;ONCOLOGY;**29**;Mar 07, 1995
3 ;Check PCE eligibility
4 ;
5 ;ACCESSION YEAR (165.5,.07) = 2001
6 I $P(^ONCO(165.5,ONCONUM,0),U,7)'=2001 S MSG="The Accession Year is not 2001." D ERRMSG G EXIT
7 ;
8 ;DIAGNOSTIC CONFIRMATION (165.5,26) = 1, 2, or 4
9 S DC=$P($G(^ONCO(165.5,ONCONUM,2)),U,6)
10 I (DC'=1)&(DC'=2)&(DC'=4) S MSG="The Diagnostic Confirmation code is not 1, 2 or 4." D ERRMSG G EXIT
11 ;
12 ;CLASS OF CASE (165.5,.04) = 0, 1 or 2
13 S COC=$P($G(^ONCO(165.5,ONCONUM,0)),U,4)
14 I (COC'=0)&(COC'=1)&(COC'=2) S MSG="The Class of Case code is not 0, 1 or 2." D ERRMSG G EXIT
15 ;
16 ;BEHAVIOR = 3.
17 I HIST1234=8936 S MSG="GI stromal sarcomas (8936) are being collected via paper data form." D ERRMSG G EXIT ;GI stromal sarcomas
18 I BEH'=3 S MSG="The Behavior Code is not 3 (Malignant)." D ERRMSG G EXIT
19 ;
20HIST ;HISTOLOGY (165.5,22)
21 S ADENOCA=0,LYMPHOMA=0
22 I (HIST1234>8139)&(HIST1234<8577) S ADENOCA=1 G MENU ;Adenocarcinomas
23 I HIST1234=8941 S ADENOCA=1 G MENU ;Adenocarcinoma
24 I HIST1234=8890 G MENU ;Leiomyosarcoma
25 ;I HIST1234=8936 G MENU ;GIST
26 I HIST1234=9140 G MENU ;Kaposi sarcoma
27 I (HIST1234>9589)&(HIST1234<9730) S LYMPHOMA=1 G MENU ;Lymphomas
28 S MSG="Invalid Histology code." D ERRMSG G EXIT
29 ;
30MENU ;Gastric Cancers PCE menu
31 S SEX=$P(^ONCO(160,ONCOPA,0),U,8) ;SEX (160,10)
32 S $P(^ONCO(165.5,ONCONUM,7),U,15)="GAS"
33 S ^ONCO(165.5,"APCE","GAS",ONCONUM)=""
34 K DIR D HEAD
35 S DIR(0)="SO^1:Patient Information;2:Tumor Identification and Diagnosis;3:First Course of Treatment;4:Treatment Complications;5:Case Registration;6:All;7:Print Gastric PCE"
36 S DIR("A")="Select section" D ^DIR
37 G:$D(DIRUT)!($D(DIROUT)) EXIT
38 I Y=6 S OUT="" D G MENU
39 .D ^ONCGPC1 Q:$G(OUT)="Y"
40 .D ^ONCGPC2 Q:$G(OUT)="Y"
41 .D ^ONCGPC3 Q:$G(OUT)="Y"
42 .D ^ONCGPC4 Q:$G(OUT)="Y"
43 .D ^ONCGPC5 Q:$G(OUT)="Y"
44 S SUB="^ONCGPC"_Y D @SUB G MENU
45 ;
46ERRMSG ;Error message
47 I ONCOANS=5 W !!,?8,"This primary does not satisfy the PCE eligibility criteria:",!!,?8,MSG R Z:10
48 K MSG Q
49 ;
50HEAD ;PCE header
51 W @IOF,!,?1,PATNAM,?SITTAB,SITEGP
52 W !,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD
53 W !,DASHES
54 S HDL=$L("2001 Patient Care Evaluation Study of Gastric Cancers")
55 S TAB=(80-HDL)\2,TAB=TAB-1
56 W !,?TAB,"2001 Patient Care Evaluation Study of Gastric Cancers"
57 W !,DASHES
58 Q
59 ;
60EXIT ;Kill variables and exit
61 K ADENOCA,HDL,LYMPHOMA,ONCONUM,ONCOPA,OUT,SUB,TAB
62 K DIC,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
63 Q
Note: See TracBrowser for help on using the repository browser.