ONCLPC0 ;Hines OIFO/GWB - 2001 2001 Lung (NSCLC) PCE Study ;05/04/01
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;Check PCE eligibility
;
;ACCESSION YEAR (165.5,.07) = 2001
I $P(^ONCO(165.5,ONCONUM,0),U,7)'=2001 S MSG="The Accession Year is not 2001." D ERRMSG G EXIT
;
;DIAGNOSTIC CONFIRMATION (165.5,26) = 1, 2, or 4
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
;
;CLASS OF CASE (165.5,.04) = 0, 1 or 2
S COC=$P($G(^ONCO(165.5,ONCONUM,0)),U,4)
I (COC'=0)&(COC'=1)&(COC'=2) S MSG="The Class of Case code is not 0, 1 or 2." D ERRMSG G EXIT
;
;BEHAVIOR = 3.
I HIST1234=8936 S MSG="GI stromal sarcomas (8936) are being collected via paper data form." D ERRMSG G EXIT ;GI stromal sarcomas
I BEH'=3 S MSG="The Behavior Code is not 3 (Malignant)." D ERRMSG G EXIT
;
HIST ;HISTOLOGY (165.5,22)
I (HIST1234=8041)!(HIST1234=8042)!(HIST1234=8043)!(HIST1234=8044)!(HIST1234=8045) G MSG ;exclude Small cell Carcinoma
I HIST1234=8240 G MSG ;exclude Carcinoid tumor
I (HIST1234>8011)&(HIST1234<8577) G MENU
MSG S MSG="Invalid Histology code." D ERRMSG G EXIT
;
S $P(^ONCO(165.5,ONCONUM,7),U,15)="LNG"
S ^ONCO(165.5,"APCE","LNG",ONCONUM)=""
K DIR D HEAD
S DIR(0)="SO^1:Patient Information;2:Tumor Identification and Diagnosis;3:Tumor Evaluation;4:Pathology;5:First Course of Treatment;6:Treatment Complications;7:Case Registration;8:All;9:Print Lung (NSCLC) PCE"
S DIR("A")="Select section" D ^DIR
G:$D(DIRUT)!($D(DIROUT)) EXIT
I Y=8 S OUT="" D G MENU
.D ^ONCLPC1 Q:$G(OUT)="Y"
.D ^ONCLPC2 Q:$G(OUT)="Y"
.D ^ONCLPC3 Q:$G(OUT)="Y"
.D ^ONCLPC4 Q:$G(OUT)="Y"
.D ^ONCLPC5 Q:$G(OUT)="Y"
.D ^ONCLPC6 Q:$G(OUT)="Y"
.D ^ONCLPC7 Q:$G(OUT)="Y"
S SUB="^ONCLPC"_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
W !,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD
W !,DASHES
S HDL=$L("2001 Patient Care Evaluation Study of Non-Small Cell Lung Carcinoma")
S TAB=(80-HDL)\2,TAB=TAB-1
W !,?TAB,"2001 Patient Care Evaluation Study of Non-Small Cell Lung Carcinoma"
W !,DASHES
Q
;
EXIT ;Kill variables and exit
K HDL,ONCONUM,ONCOPA,OUT,SUB,TAB
K DIC,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCLPC0 2453 printed Oct 16, 2024@18:24:12 Page 2
ONCLPC0 ;Hines OIFO/GWB - 2001 2001 Lung (NSCLC) PCE Study ;05/04/01
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;Check PCE eligibility
+3 ;
+4 ;ACCESSION YEAR (165.5,.07) = 2001
+5 IF $PIECE(^ONCO(165.5,ONCONUM,0),U,7)'=2001
SET MSG="The Accession Year is not 2001."
DO ERRMSG
GOTO EXIT
+6 ;
+7 ;DIAGNOSTIC CONFIRMATION (165.5,26) = 1, 2, or 4
+8 SET DC=$PIECE($GET(^ONCO(165.5,ONCONUM,2)),U,6)
+9 IF (DC'=1)&(DC'=2)&(DC'=4)
SET MSG="The Diagnostic Confirmation code is not 1, 2 or 4."
DO ERRMSG
GOTO EXIT
+10 ;
+11 ;CLASS OF CASE (165.5,.04) = 0, 1 or 2
+12 SET COC=$PIECE($GET(^ONCO(165.5,ONCONUM,0)),U,4)
+13 IF (COC'=0)&(COC'=1)&(COC'=2)
SET MSG="The Class of Case code is not 0, 1 or 2."
DO ERRMSG
GOTO EXIT
+14 ;
+15 ;BEHAVIOR = 3.
+16 ;GI stromal sarcomas
IF HIST1234=8936
SET MSG="GI stromal sarcomas (8936) are being collected via paper data form."
DO ERRMSG
GOTO EXIT
+17 IF BEH'=3
SET MSG="The Behavior Code is not 3 (Malignant)."
DO ERRMSG
GOTO EXIT
+18 ;
HIST ;HISTOLOGY (165.5,22)
+1 ;exclude Small cell Carcinoma
IF (HIST1234=8041)!(HIST1234=8042)!(HIST1234=8043)!(HIST1234=8044)!(HIST1234=8045)
GOTO MSG
+2 ;exclude Carcinoid tumor
IF HIST1234=8240
GOTO MSG
+3 IF (HIST1234>8011)&(HIST1234<8577)
GOTO MENU
MSG SET MSG="Invalid Histology code."
DO ERRMSG
GOTO EXIT
+1 ;
+1 SET $PIECE(^ONCO(165.5,ONCONUM,7),U,15)="LNG"
+2 SET ^ONCO(165.5,"APCE","LNG",ONCONUM)=""
+3 KILL DIR
DO HEAD
+4 SET DIR(0)="SO^1:Patient Information;2:Tumor Identification and Diagnosis;3:Tumor Evaluation;4:Pathology;5:First Course of Treatment;6:Treatment Complications;7:Case Registration;8:All;9:Print Lung (NSCLC) PCE"
+5 SET DIR("A")="Select section"
DO ^DIR
+6 if $DATA(DIRUT)!($DATA(DIROUT))
GOTO EXIT
+7 IF Y=8
SET OUT=""
Begin DoDot:1
+8 DO ^ONCLPC1
if $GET(OUT)="Y"
QUIT
+9 DO ^ONCLPC2
if $GET(OUT)="Y"
QUIT
+10 DO ^ONCLPC3
if $GET(OUT)="Y"
QUIT
+11 DO ^ONCLPC4
if $GET(OUT)="Y"
QUIT
+12 DO ^ONCLPC5
if $GET(OUT)="Y"
QUIT
+13 DO ^ONCLPC6
if $GET(OUT)="Y"
QUIT
+14 DO ^ONCLPC7
if $GET(OUT)="Y"
QUIT
End DoDot:1
GOTO MENU
+15 SET SUB="^ONCLPC"_Y
DO @SUB
GOTO MENU
+16 ;
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
+3 ;
HEAD ;PCE header
+1 WRITE @IOF,!,?1,PATNAM,?SITTAB,SITEGP
+2 WRITE !,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD
+3 WRITE !,DASHES
+4 SET HDL=$LENGTH("2001 Patient Care Evaluation Study of Non-Small Cell Lung Carcinoma")
+5 SET TAB=(80-HDL)\2
SET TAB=TAB-1
+6 WRITE !,?TAB,"2001 Patient Care Evaluation Study of Non-Small Cell Lung Carcinoma"
+7 WRITE !,DASHES
+8 QUIT
+9 ;
EXIT ;Kill variables and exit
+1 KILL HDL,ONCONUM,ONCOPA,OUT,SUB,TAB
+2 KILL DIC,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
+3 QUIT