ONCBRP0 ;HINES CIOFO/GWB - BREAST PCE 1998 ;6/1/98
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
CHECK ;Check PCE eligibility
;Check if ACCESSION YEAR = 1998
I $P(^ONCO(165.5,ONCONUM,0),U,7)'=1998 S MSG="The Accession Year is not 1998." D ERRMSG G EXIT
;Check if histologically confirmed
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
;Check if Class of Case is either 1, 2 or 6.
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
;Check if Behavior is either 2 or 3.
I (BEH'=2)&(BEH'=3) S MSG="The Behavior Code is not 2 (In situ) or 3 (Malignant)." D ERRMSG G EXIT
;Check Sex, T-code, P-code and Histology
S HST(82012)=""
S HST(82112)=""
S HST(85002)=""
S HST(85012)=""
S HST(85032)=""
S HST(85102)=""
S HST(85122)=""
S HST(85222)=""
S SEX=$P(^ONCO(160,ONCOPA,0),U,8) ;#10 Sex
I (SEX'=1)&(SEX'=2) S MSG="Sex is neither 1 (Male) nor 2 (Female)." D ERRMSG G EXIT
S CT=$P($G(^ONCO(165.5,ONCONUM,2)),U,25) ;#37.1 Clinical T
S PT=$P($G(^ONCO(165.5,ONCONUM,2.1)),U,1) ;#85 Pathologic T
I SEX=1 G MENU
I SEX=2,(CT="1MIC")!(CT="1A")!(PT="1MIC")!(PT="1A") G MENU
I SEX=2,$D(HST(HIST)) G MENU
E S MSG="Female patient has neither DCIS nor AJCC tumor size of T1mic or T1a." D ERRMSG G EXIT
S SEX=$P($G(^ONCO(160,ONCOPA,0)),U,8)
K HST
S HST(82013)=""
S HST(82113)=""
S HST(85003)=""
S HST(85013)=""
S HST(85033)=""
S HST(85103)=""
S HST(85123)=""
S HST(85223)=""
S IDC=0 I $D(HST(HIST)) S IDC=1
S $P(^ONCO(165.5,ONCONUM,7),U,15)="BRE"
S ^ONCO(165.5,"APCE","BRE",ONCONUM)=""
K DIR D HEAD
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"
S DIR("A")="Select Table" D ^DIR
G:$D(DIRUT)!($D(DIROUT)) EXIT
I Y=8 S OUT="" D G MENU
.D ^ONCBRP1 Q:$G(OUT)="Y"
.D ^ONCBRP2 Q:$G(OUT)="Y"
.D ^ONCBRP3 Q:$G(OUT)="Y"
.D ^ONCBRP4 Q:$G(OUT)="Y"
.D ^ONCBRP5 Q:$G(OUT)="Y"
.D ^ONCBRP6 Q:$G(OUT)="Y"
.D ^ONCBRP7 Q:$G(OUT)="Y"
S SUB="^ONCBRP"_Y D @SUB G MENU
ERRMSG ;Error message
I ONCOANS=5 W !!,?8,"This primary does not satisfy the PCE eligibility criteria:",!,?8,MSG R Z:10
K MSG Q
HEAD ;PCE HEADER
W @IOF,!,?1,PATNAM,?SITTAB,SITEGP,!,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD,!,DASHES
S HDL=$L(" 1998 Patient Care Evaluation Study of Breast Cancer"),TAB=(80-HDL)\2,TAB=TAB-1
W !,?TAB,"1998 Patient Care Evaluation Study of Breast Cancer",!,DASHES
Q
EXIT ;Kill Variables and Exit.
K HDL,ONCONUM,ONCOPA,OUT,SUB,TAB,SEX,CT,PT,HST,IDC
K DIC,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCBRP0 2854 printed Dec 13, 2024@02:22:16 Page 2
ONCBRP0 ;HINES CIOFO/GWB - BREAST PCE 1998 ;6/1/98
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
CHECK ;Check PCE eligibility
+1 ;Check if ACCESSION YEAR = 1998
+2 IF $PIECE(^ONCO(165.5,ONCONUM,0),U,7)'=1998
SET MSG="The Accession Year is not 1998."
DO ERRMSG
GOTO EXIT
+3 ;Check if histologically confirmed
+4 SET DC=$PIECE($GET(^ONCO(165.5,ONCONUM,2)),U,6)
IF DC'=1
SET MSG="The Diagnostic Confirmation code is not 1 (Positive histology)."
DO ERRMSG
GOTO EXIT
+5 ;Check if Class of Case is either 1, 2 or 6.
+6 SET COC=$PIECE($GET(^ONCO(165.5,ONCONUM,0)),U,4)
IF (COC'=1)&(COC'=2)&(COC'=6)
SET MSG="The Class of Case code is not 1, 2 or 6."
DO ERRMSG
GOTO EXIT
+7 ;Check if Behavior is either 2 or 3.
+8 IF (BEH'=2)&(BEH'=3)
SET MSG="The Behavior Code is not 2 (In situ) or 3 (Malignant)."
DO ERRMSG
GOTO EXIT
+9 ;Check Sex, T-code, P-code and Histology
+10 SET HST(82012)=""
+11 SET HST(82112)=""
+12 SET HST(85002)=""
+13 SET HST(85012)=""
+14 SET HST(85032)=""
+15 SET HST(85102)=""
+16 SET HST(85122)=""
+17 SET HST(85222)=""
+18 ;#10 Sex
SET SEX=$PIECE(^ONCO(160,ONCOPA,0),U,8)
+19 IF (SEX'=1)&(SEX'=2)
SET MSG="Sex is neither 1 (Male) nor 2 (Female)."
DO ERRMSG
GOTO EXIT
+20 ;#37.1 Clinical T
SET CT=$PIECE($GET(^ONCO(165.5,ONCONUM,2)),U,25)
+21 ;#85 Pathologic T
SET PT=$PIECE($GET(^ONCO(165.5,ONCONUM,2.1)),U,1)
+22 IF SEX=1
GOTO MENU
+23 IF SEX=2
IF (CT="1MIC")!(CT="1A")!(PT="1MIC")!(PT="1A")
GOTO MENU
+24 IF SEX=2
IF $DATA(HST(HIST))
GOTO MENU
+25 IF '$TEST
SET MSG="Female patient has neither DCIS nor AJCC tumor size of T1mic or T1a."
DO ERRMSG
GOTO EXIT
+1 SET SEX=$PIECE($GET(^ONCO(160,ONCOPA,0)),U,8)
+2 KILL HST
+3 SET HST(82013)=""
+4 SET HST(82113)=""
+5 SET HST(85003)=""
+6 SET HST(85013)=""
+7 SET HST(85033)=""
+8 SET HST(85103)=""
+9 SET HST(85123)=""
+10 SET HST(85223)=""
+11 SET IDC=0
IF $DATA(HST(HIST))
SET IDC=1
+12 SET $PIECE(^ONCO(165.5,ONCONUM,7),U,15)="BRE"
+13 SET ^ONCO(165.5,"APCE","BRE",ONCONUM)=""
+14 KILL DIR
DO HEAD
+15 SET 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"
+16 SET DIR("A")="Select Table"
DO ^DIR
+17 if $DATA(DIRUT)!($DATA(DIROUT))
GOTO EXIT
+18 IF Y=8
SET OUT=""
Begin DoDot:1
+19 DO ^ONCBRP1
if $GET(OUT)="Y"
QUIT
+20 DO ^ONCBRP2
if $GET(OUT)="Y"
QUIT
+21 DO ^ONCBRP3
if $GET(OUT)="Y"
QUIT
+22 DO ^ONCBRP4
if $GET(OUT)="Y"
QUIT
+23 DO ^ONCBRP5
if $GET(OUT)="Y"
QUIT
+24 DO ^ONCBRP6
if $GET(OUT)="Y"
QUIT
+25 DO ^ONCBRP7
if $GET(OUT)="Y"
QUIT
End DoDot:1
GOTO MENU
+26 SET SUB="^ONCBRP"_Y
DO @SUB
GOTO MENU
ERRMSG ;Error message
+1 IF ONCOANS=5
WRITE !!,?8,"This primary does not satisfy the PCE eligibility criteria:",!,?8,MSG
READ Z:10
+2 KILL MSG
QUIT
HEAD ;PCE HEADER
+1 WRITE @IOF,!,?1,PATNAM,?SITTAB,SITEGP,!,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD,!,DASHES
+2 SET HDL=$LENGTH(" 1998 Patient Care Evaluation Study of Breast Cancer")
SET TAB=(80-HDL)\2
SET TAB=TAB-1
+3 WRITE !,?TAB,"1998 Patient Care Evaluation Study of Breast Cancer",!,DASHES
+4 QUIT
EXIT ;Kill Variables and Exit.
+1 KILL HDL,ONCONUM,ONCOPA,OUT,SUB,TAB,SEX,CT,PT,HST,IDC
+2 KILL DIC,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
+3 QUIT