ONCSPC0 ;HIRMFO/GWB - PCE Study of Soft Tissue Sarcoma ;8/23/96
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;Check PCE eligibility
;Check if ACCESSION YEAR = 1996
I $P(^ONCO(165.5,ONCONUM,0),U,7)'=1996 S MSG="The Accession Year is not 1996." D ERRMSG G EXIT
;Check if microscopically confirmed
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
;Check if Class of Case is either 1 or 2.
S COC=$P($G(^ONCO(165.5,ONCONUM,0)),U,4) I (COC'=1)&(COC'=2) S MSG="The Class of Case code is not 1 or 2." D ERRMSG G EXIT
;Check if HISTOLOGY is eligible
S HIST=$P($G(^ONCO(165.5,ONCONUM,2)),U,3),HIST123=$E(HIST,1,3)
I HIST="" S MSG="There is no HISTOLOGY for this primary." D ERRMSG G EXIT
S HIST(868)=""
S HIST(869)=""
S HIST(870)=""
S HIST(871)=""
S HIST(880)=""
S HIST(881)=""
S HIST(882)=""
S HIST(883)=""
S HIST(884)=""
S HIST(885)=""
S HIST(886)=""
S HIST(887)=""
S HIST(888)=""
S HIST(889)=""
S HIST(890)=""
S HIST(891)=""
S HIST(892)=""
S HIST(899)=""
S HIST(904)=""
S HIST(905)=""
S HIST(912)=""
S HIST(913)=""
S HIST(915)=""
S HIST(916)=""
S HIST(917)=""
S HIST(918)=""
S HIST(919)=""
S HIST(920)=""
S HIST(921)=""
S HIST(922)=""
S HIST(923)=""
S HIST(924)=""
S HIST(925)=""
S HIST(926)=""
S HIST(927)=""
S HIST(928)=""
S HIST(929)=""
S HIST(930)=""
S HIST(931)=""
S HIST(932)=""
S HIST(933)=""
S HIST(934)=""
S HIST(937)=""
S HIST(949)=""
S HIST(950)=""
S HIST(954)=""
S HIST(955)=""
S HIST(956)=""
S HIST(957)=""
S HIST(958)=""
I $E(ICDO,2,3)=44,$E(HIST,1,4)'=8832 S MSG="Skin sites are only allowed for patients with dermatofibrosarcoma." D ERRMSG G EXIT
I ('$D(HIST(HIST123)))!($E(HIST,5)'=3) S MSG="The Histology of "_$E(HIST,1,4)_"/"_$E(HIST,5)_" is not eligible." D ERRMSG G EXIT
S $P(^ONCO(165.5,ONCONUM,7),U,15)="STS"
S ^ONCO(165.5,"APCE","STS",ONCONUM)=""
K DIR D HEAD
S DIR(0)="SO^1:General Information;2:Initial Diagnosis/Cancer Identification;3:Extent of Disease and AJCC Stage;4:First Course of Therapy;5:First Recurrence and Subsequent Treatment;6:Status at Last Contact;7:All;"
S DIR(0)=DIR(0)_"8:Print Soft Tissue Sarcoma PCE"
S DIR("A")="Select Table" D ^DIR
G:$D(DIRUT)!($D(DIROUT)) EXIT
I Y=7 S OUT="" D G MENU
.D ^ONCSPC1 Q:$G(OUT)="Y"
.D ^ONCSPC2 Q:$G(OUT)="Y"
.D ^ONCSPC3 Q:$G(OUT)="Y"
.D ^ONCSPC4 Q:$G(OUT)="Y"
.D ^ONCSPC5 Q:$G(OUT)="Y"
.D ^ONCSPC6 Q:$G(OUT)="Y"
I Y=8 D ^ONCSPC8 G MENU
S SUB="^ONCSPC"_Y D @SUB G MENU
ERRMSG ;Error message
I ONCOANS=5 W !!,?10,"This primary does not satisfy the PCE eligibility criteria:",!,?10,MSG R Z:10
K MSG Q
HEAD ;Soft Tissue Sarcoma PCE header
W @IOF,!,?1,PATNAM,?SITTAB,SITEGP,!,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD,!,DASHES
S HDL=$L("Patient Care Evaluation Study of Soft Tissue Sarcoma"),TAB=(80-HDL)\2,TAB=TAB-1
W !,?TAB,"Patient Care Evaluation Study of Soft Tissue Sarcoma",!,DASHES
Q
EXIT ;Kill variables and exit
K COC,DC,HDL,HIST,MSG,ONCONUM,ONCOPA,OUT,SUB,TAB
K DIC,DIQ,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCSPC0 3188 printed Dec 13, 2024@02:28:34 Page 2
ONCSPC0 ;HIRMFO/GWB - PCE Study of Soft Tissue Sarcoma ;8/23/96
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;Check PCE eligibility
+3 ;Check if ACCESSION YEAR = 1996
+4 IF $PIECE(^ONCO(165.5,ONCONUM,0),U,7)'=1996
SET MSG="The Accession Year is not 1996."
DO ERRMSG
GOTO EXIT
+5 ;Check if microscopically confirmed
+6 SET DC=$PIECE($GET(^ONCO(165.5,ONCONUM,2)),U,6)
IF (DC'=1)&(DC'=2)&(DC'=4)
SET MSG="The Diagnostic Confirmation code is not 1, 2 or 4."
DO ERRMSG
GOTO EXIT
+7 ;Check if Class of Case is either 1 or 2.
+8 SET COC=$PIECE($GET(^ONCO(165.5,ONCONUM,0)),U,4)
IF (COC'=1)&(COC'=2)
SET MSG="The Class of Case code is not 1 or 2."
DO ERRMSG
GOTO EXIT
+9 ;Check if HISTOLOGY is eligible
+10 SET HIST=$PIECE($GET(^ONCO(165.5,ONCONUM,2)),U,3)
SET HIST123=$EXTRACT(HIST,1,3)
+11 IF HIST=""
SET MSG="There is no HISTOLOGY for this primary."
DO ERRMSG
GOTO EXIT
+12 SET HIST(868)=""
+13 SET HIST(869)=""
+14 SET HIST(870)=""
+15 SET HIST(871)=""
+16 SET HIST(880)=""
+17 SET HIST(881)=""
+18 SET HIST(882)=""
+19 SET HIST(883)=""
+20 SET HIST(884)=""
+21 SET HIST(885)=""
+22 SET HIST(886)=""
+23 SET HIST(887)=""
+24 SET HIST(888)=""
+25 SET HIST(889)=""
+26 SET HIST(890)=""
+27 SET HIST(891)=""
+28 SET HIST(892)=""
+29 SET HIST(899)=""
+30 SET HIST(904)=""
+31 SET HIST(905)=""
+32 SET HIST(912)=""
+33 SET HIST(913)=""
+34 SET HIST(915)=""
+35 SET HIST(916)=""
+36 SET HIST(917)=""
+37 SET HIST(918)=""
+38 SET HIST(919)=""
+39 SET HIST(920)=""
+40 SET HIST(921)=""
+41 SET HIST(922)=""
+42 SET HIST(923)=""
+43 SET HIST(924)=""
+44 SET HIST(925)=""
+45 SET HIST(926)=""
+46 SET HIST(927)=""
+47 SET HIST(928)=""
+48 SET HIST(929)=""
+49 SET HIST(930)=""
+50 SET HIST(931)=""
+51 SET HIST(932)=""
+52 SET HIST(933)=""
+53 SET HIST(934)=""
+54 SET HIST(937)=""
+55 SET HIST(949)=""
+56 SET HIST(950)=""
+57 SET HIST(954)=""
+58 SET HIST(955)=""
+59 SET HIST(956)=""
+60 SET HIST(957)=""
+61 SET HIST(958)=""
+62 IF $EXTRACT(ICDO,2,3)=44
IF $EXTRACT(HIST,1,4)'=8832
SET MSG="Skin sites are only allowed for patients with dermatofibrosarcoma."
DO ERRMSG
GOTO EXIT
+63 IF ('$DATA(HIST(HIST123)))!($EXTRACT(HIST,5)'=3)
SET MSG="The Histology of "_$EXTRACT(HIST,1,4)_"/"_$EXTRACT(HIST,5)_" is not eligible."
DO ERRMSG
GOTO EXIT
+1 SET $PIECE(^ONCO(165.5,ONCONUM,7),U,15)="STS"
+2 SET ^ONCO(165.5,"APCE","STS",ONCONUM)=""
+3 KILL DIR
DO HEAD
+4 SET DIR(0)="SO^1:General Information;2:Initial Diagnosis/Cancer Identification;3:Extent of Disease and AJCC Stage;4:First Course of Therapy;5:First Recurrence and Subsequent Treatment;6:Status at Last Contact;7:All;"
+5 SET DIR(0)=DIR(0)_"8:Print Soft Tissue Sarcoma PCE"
+6 SET DIR("A")="Select Table"
DO ^DIR
+7 if $DATA(DIRUT)!($DATA(DIROUT))
GOTO EXIT
+8 IF Y=7
SET OUT=""
Begin DoDot:1
+9 DO ^ONCSPC1
if $GET(OUT)="Y"
QUIT
+10 DO ^ONCSPC2
if $GET(OUT)="Y"
QUIT
+11 DO ^ONCSPC3
if $GET(OUT)="Y"
QUIT
+12 DO ^ONCSPC4
if $GET(OUT)="Y"
QUIT
+13 DO ^ONCSPC5
if $GET(OUT)="Y"
QUIT
+14 DO ^ONCSPC6
if $GET(OUT)="Y"
QUIT
End DoDot:1
GOTO MENU
+15 IF Y=8
DO ^ONCSPC8
GOTO MENU
+16 SET SUB="^ONCSPC"_Y
DO @SUB
GOTO MENU
ERRMSG ;Error message
+1 IF ONCOANS=5
WRITE !!,?10,"This primary does not satisfy the PCE eligibility criteria:",!,?10,MSG
READ Z:10
+2 KILL MSG
QUIT
HEAD ;Soft Tissue Sarcoma PCE header
+1 WRITE @IOF,!,?1,PATNAM,?SITTAB,SITEGP,!,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD,!,DASHES
+2 SET HDL=$LENGTH("Patient Care Evaluation Study of Soft Tissue Sarcoma")
SET TAB=(80-HDL)\2
SET TAB=TAB-1
+3 WRITE !,?TAB,"Patient Care Evaluation Study of Soft Tissue Sarcoma",!,DASHES
+4 QUIT
EXIT ;Kill variables and exit
+1 KILL COC,DC,HDL,HIST,MSG,ONCONUM,ONCOPA,OUT,SUB,TAB
+2 KILL DIC,DIQ,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
+3 QUIT