Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ONCCPC0

ONCCPC0.m

Go to the documentation of this file.
  1. ONCCPC0 ;HIRMFO/GWB - PCE Study of Colorectal Cancer;2/7/97
  1. ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
  1. ;Check PCE eligibility
  1. ;Check if ACCESSION YEAR = 1997
  1. I $P(^ONCO(165.5,ONCONUM,0),U,7)'=1997 S MSG="The Accession Year is not 1997." D ERRMSG G EXIT
  1. ;Check if microscopically confirmed
  1. S DC=$P($G(^ONCO(165.5,ONCONUM,2)),U,6) I (DC'=1)&(DC'=2)&(DC'=4) S MSG="The Diagnostic Confirmation code is not 1, 2 or 4." D ERRMSG G EXIT
  1. ;Check if Class of Case is either 1, 2 or 6.
  1. S COC=$P($G(^ONCO(165.5,ONCONUM,0)),U,4) I (COC'=1)&(COC'=2)&(COC'=6) S MSG="The Class of Case code is not 1, 2 or 6." D ERRMSG G EXIT
  1. ;Check if HISTOLOGY and BEHAVIOR is eligible
  1. S HIST=$P($G(^ONCO(165.5,ONCONUM,2)),U,3)
  1. S HIST1234=$E(HIST,1,4),BEH=$E(HIST,5)
  1. I HIST="" S MSG="There is no HISTOLOGY for this primary." D ERRMSG G EXIT
  1. I (BEH'=2)&(BEH'=3) S MSG="The BEHAVIOR code is not 2 (in situ) or 3 (malignant)." D ERRMSG G EXIT
  1. S HIST(8140)=""
  1. S HIST(8141)=""
  1. S HIST(8143)=""
  1. S HIST(8144)=""
  1. S HIST(8145)=""
  1. S HIST(8147)=""
  1. S HIST(8150)=""
  1. S HIST(8154)=""
  1. S HIST(8160)=""
  1. S HIST(8190)=""
  1. S HIST(8200)=""
  1. S HIST(8210)=""
  1. S HIST(8211)=""
  1. S HIST(8220)=""
  1. S HIST(8221)=""
  1. S HIST(8244)=""
  1. S HIST(8250)=""
  1. S HIST(8251)=""
  1. S HIST(8260)=""
  1. S HIST(8261)=""
  1. S HIST(8262)=""
  1. S HIST(8263)=""
  1. S HIST(8270)=""
  1. S HIST(8280)=""
  1. S HIST(8290)=""
  1. S HIST(8300)=""
  1. S HIST(8310)=""
  1. S HIST(8312)=""
  1. S HIST(8320)=""
  1. S HIST(8322)=""
  1. S HIST(8323)=""
  1. S HIST(8330)=""
  1. S HIST(8331)=""
  1. S HIST(8332)=""
  1. S HIST(8340)=""
  1. S HIST(8350)=""
  1. S HIST(8370)=""
  1. S HIST(8380)=""
  1. S HIST(8400)=""
  1. S HIST(8401)=""
  1. S HIST(8410)=""
  1. S HIST(8420)=""
  1. S HIST(8441)=""
  1. S HIST(8450)=""
  1. S HIST(8460)=""
  1. S HIST(8470)=""
  1. S HIST(8480)=""
  1. S HIST(8481)=""
  1. S HIST(8490)=""
  1. S HIST(8500)=""
  1. S HIST(8503)=""
  1. S HIST(8504)=""
  1. S HIST(8510)=""
  1. S HIST(8520)=""
  1. S HIST(8530)=""
  1. S HIST(8550)=""
  1. S HIST(8560)=""
  1. S HIST(8570)=""
  1. S HIST(8571)=""
  1. S HIST(8572)=""
  1. S HIST(8573)=""
  1. S HIST(9070)=""
  1. S HIST(9110)=""
  1. I '$D(HIST(HIST1234)) S MSG="The Histology of "_$E(HIST,1,4)_"/"_$E(HIST,5)_" is not eligible." D ERRMSG G EXIT
  1. S $P(^ONCO(165.5,ONCONUM,7),U,15)="COL"
  1. S ^ONCO(165.5,"APCE","COL",ONCONUM)=""
  1. K DIR D HEAD
  1. S DIR(0)="SO^1:General Information;2:Initial Diagnosis/Cancer Identification;3:Extent of Disease and AJCC Stage;4:First Course of Treatment;5:Quality of Life;6:First Recurrence;7:Status at Last Contact;8:All;"
  1. S DIR(0)=DIR(0)_"9:Print Colorectal Cancer PCE"
  1. S DIR("A")="Select Table" D ^DIR
  1. G:$D(DIRUT)!($D(DIROUT)) EXIT
  1. I Y=8 S OUT="" D G MENU
  1. .D ^ONCCPC1 Q:$G(OUT)="Y"
  1. .D ^ONCCPC2 Q:$G(OUT)="Y"
  1. .D ^ONCCPC3 Q:$G(OUT)="Y"
  1. .D ^ONCCPC4 Q:$G(OUT)="Y"
  1. .D ^ONCCPC5 Q:$G(OUT)="Y"
  1. .D ^ONCCPC6 Q:$G(OUT)="Y"
  1. .D ^ONCCPC7 Q:$G(OUT)="Y"
  1. I Y=9 D ^ONCCPC9 G MENU
  1. S SUB="^ONCCPC"_Y D @SUB G MENU
  1. ERRMSG ;Error message
  1. I ONCOANS=5 W !!,?10,"This primary does not satisfy the PCE eligibility criteria:",!,?10,MSG R Z:10
  1. K MSG Q
  1. W @IOF,!,?1,PATNAM,?SITTAB,SITEGP,!,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD,!,DASHES
  1. S HDL=$L("Patient Care Evaluation Study of Colorectal Cancer"),TAB=(80-HDL)\2,TAB=TAB-1
  1. W !,?TAB,"Patient Care Evaluation Study of Colorectal Cancer",!,DASHES
  1. Q
  1. EXIT ;Kill variables and exit
  1. K COC,DC,HDL,HIST,HIS1234,BEH,MSG,ONCONUM,ONCOPA,OUT,SUB,TAB
  1. K DIC,DIQ,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
  1. Q