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

ONCBRP0.m

Go to the documentation of this file.
  1. ONCBRP0 ;HINES CIOFO/GWB - BREAST PCE 1998 ;6/1/98
  1. ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
  1. CHECK ;Check PCE eligibility
  1. ;Check if ACCESSION YEAR = 1998
  1. I $P(^ONCO(165.5,ONCONUM,0),U,7)'=1998 S MSG="The Accession Year is not 1998." D ERRMSG G EXIT
  1. ;Check if histologically confirmed
  1. S DC=$P($G(^ONCO(165.5,ONCONUM,2)),U,6) I DC'=1 S MSG="The Diagnostic Confirmation code is not 1 (Positive histology)." 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 Behavior is either 2 or 3.
  1. I (BEH'=2)&(BEH'=3) S MSG="The Behavior Code is not 2 (In situ) or 3 (Malignant)." D ERRMSG G EXIT
  1. ;Check Sex, T-code, P-code and Histology
  1. S HST(82012)=""
  1. S HST(82112)=""
  1. S HST(85002)=""
  1. S HST(85012)=""
  1. S HST(85032)=""
  1. S HST(85102)=""
  1. S HST(85122)=""
  1. S HST(85222)=""
  1. S SEX=$P(^ONCO(160,ONCOPA,0),U,8) ;#10 Sex
  1. I (SEX'=1)&(SEX'=2) S MSG="Sex is neither 1 (Male) nor 2 (Female)." D ERRMSG G EXIT
  1. S CT=$P($G(^ONCO(165.5,ONCONUM,2)),U,25) ;#37.1 Clinical T
  1. S PT=$P($G(^ONCO(165.5,ONCONUM,2.1)),U,1) ;#85 Pathologic T
  1. I SEX=1 G MENU
  1. I SEX=2,(CT="1MIC")!(CT="1A")!(PT="1MIC")!(PT="1A") G MENU
  1. I SEX=2,$D(HST(HIST)) G MENU
  1. E S MSG="Female patient has neither DCIS nor AJCC tumor size of T1mic or T1a." D ERRMSG G EXIT
  1. S SEX=$P($G(^ONCO(160,ONCOPA,0)),U,8)
  1. K HST
  1. S HST(82013)=""
  1. S HST(82113)=""
  1. S HST(85003)=""
  1. S HST(85013)=""
  1. S HST(85033)=""
  1. S HST(85103)=""
  1. S HST(85123)=""
  1. S HST(85223)=""
  1. S IDC=0 I $D(HST(HIST)) S IDC=1
  1. S $P(^ONCO(165.5,ONCONUM,7),U,15)="BRE"
  1. S ^ONCO(165.5,"APCE","BRE",ONCONUM)=""
  1. K DIR D HEAD
  1. S DIR(0)="SO^1:General Information;2:Initial Diagnosis;3:Tumor Markers and Prognostic Tests;4:Extent of Disease and AJCC Stage;5:First Course of Treatment;6:First Recurrence;7:Status at Last Contact;8:All;9:Print Breast 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 ^ONCBRP1 Q:$G(OUT)="Y"
  1. .D ^ONCBRP2 Q:$G(OUT)="Y"
  1. .D ^ONCBRP3 Q:$G(OUT)="Y"
  1. .D ^ONCBRP4 Q:$G(OUT)="Y"
  1. .D ^ONCBRP5 Q:$G(OUT)="Y"
  1. .D ^ONCBRP6 Q:$G(OUT)="Y"
  1. .D ^ONCBRP7 Q:$G(OUT)="Y"
  1. S SUB="^ONCBRP"_Y D @SUB G MENU
  1. ERRMSG ;Error message
  1. I ONCOANS=5 W !!,?8,"This primary does not satisfy the PCE eligibility criteria:",!,?8,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(" 1998 Patient Care Evaluation Study of Breast Cancer"),TAB=(80-HDL)\2,TAB=TAB-1
  1. W !,?TAB,"1998 Patient Care Evaluation Study of Breast Cancer",!,DASHES
  1. Q
  1. EXIT ;Kill Variables and Exit.
  1. K HDL,ONCONUM,ONCOPA,OUT,SUB,TAB,SEX,CT,PT,HST,IDC
  1. K DIC,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
  1. Q