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

ONCOTNE.m

Go to the documentation of this file.
ONCOTNE ;Hines OIFO/GWB,RTK - TNM STAGING ERROR & BYPASS MESSAGES ;9/27/93
 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
 ;
BRST ;Screening or Biopsy Procedures (Breast)
 S TOPSITE=$P($G(^ONCO(165.5,D0,2)),U,1) I TOPSITE="" S Y="@395" Q
 I TOPSITE>67499,TOPSITE<67510 D  Q
 .W !!,"------------------------------"
 .W !,"SCREENING OR BIOPSY PROCEDURES"
 .W !,"------------------------------"
 S $P(^ONCO(165.5,D0,2.1),U,14)=0
BRSTF0 S $P(^ONCO(165.5,D0,2.1),U,15)=0
 S $P(^ONCO(165.5,D0,2.1),U,16)=0
 S $P(^ONCO(165.5,D0,2.1),U,17)=0
 S Y="@1445"
 Q
BRSTF9 ;
 S $P(^ONCO(165.5,D0,2.1),U,15)=9
 S $P(^ONCO(165.5,D0,2.1),U,16)=9
 S $P(^ONCO(165.5,D0,2.1),U,17)=9
 S Y="@1445"
 Q
BRWRIT ;
 K ONCBR S DIC="^ONCO(165.5,",DA=DA,DIQ="ONCBR(",DIQ(0)="E"
 S DR="142;143;144" D EN^DIQ1
 F I=142,143,144 S X=ONCBR(165.5,D0,I) D UCASE S ONCBR(165.5,D0,I)=X
 W !,"GUIDANCE..............: "_ONCBR(165.5,DA,142,"E")
 W !,"PALPABILITY OF PRIMARY: "_ONCBR(165.5,DA,143,"E")
 W !,"FIRST DETECTED BY.....: "_ONCBR(165.5,DA,144,"E")
 K ONCBR
 W ! K DIR S DIR(0)="E" D ^DIR
 S Y="@1445"
 Q
PRST ;Screening or Biopsy Procedures (Prostate)
 S TOPSITE=$P($G(^ONCO(165.5,D0,2)),U,1) I TOPSITE="" S Y="@395" Q
 I TOPSITE=67619 D  Q
 .W !,"------------------------------"
 .W !,"SCREENING OR BIOPSY PROCEDURES"
 .W !,"------------------------------"
 S $P(^ONCO(165.5,D0,2.1),U,18)=0
PRSTF0 S $P(^ONCO(165.5,D0,2.1),U,19)=0
 S $P(^ONCO(165.5,D0,2.1),U,20)=0
 S $P(^ONCO(165.5,D0,2.1),U,21)=0
 S Y="@395"
 Q
PRSTF9 ;
 S $P(^ONCO(165.5,D0,2.1),U,19)=9
 S $P(^ONCO(165.5,D0,2.1),U,20)=9
 S $P(^ONCO(165.5,D0,2.1),U,21)=9
 S Y="@395"
 Q
PRWRIT ;
 K ONCPR S DIC="^ONCO(165.5,",DA=DA,DIQ="ONCPR(",DIQ(0)="E"
 S DR="146;147;148" D EN^DIQ1
 F I=146,147,148 S X=ONCPR(165.5,D0,I) D UCASE S ONCPR(165.5,D0,I)=X
 W !,"GUIDANCE......................: "_ONCPR(165.5,DA,146,"E")
 W !,"APPROACH FOR BIOPSY OF PRIMARY: "_ONCPR(165.5,DA,147,"E")
 W !,"BIOPSY OF OTHER THAN PRIMARY..: "_$E(ONCPR(165.5,DA,148,"E"),1,35)
 K ONCPR
 W ! K DIR S DIR(0)="E" D ^DIR
 S Y="@395"
 Q
 ;
BPGUCHK ; CALLED FROM INPUT TRANFORM OF #141/142 TO CHECK TOPOG
 S TOPSITE=$P($G(^ONCO(165.5,D0,2)),U,1) I TOPSITE="" S BPSITE="" Q
 S BPSITE=$P($G(^ONCO(164,TOPSITE,0)),U,16)
 Q
 ;
BPCHECK ;SCREENING OR BIOPSY PROCEDURES
 S TOPSITE=$P($G(^ONCO(165.5,D0,2)),U,1) I TOPSITE="" S Y="@395" Q
 I TOPSITE>67499,TOPSITE<67510 S BPSITE=67500 D DSP Q
 I TOPSITE=67619 S BPSITE=67619 D DSP Q
 D STUFF0 S Y="@395"
 Q
 ;
DSP ;Display SCREENING OR BIOPSY PROCEDURES
 I (COC=5)!(COC=8) D  S Y="@395" Q
 .S $P(^ONCO(165.5,D0,2.1),U,14)=6
 .S:BPSITE=67500 $P(^ONCO(165.5,D0,2.1),U,15)=9
 .S:BPSITE=67619 $P(^ONCO(165.5,D0,2.1),U,15)=5
 .F PIECE=16:1:19 S $P(^ONCO(165.5,D0,2.1),U,PIECE)=9
 I BPSITE=67500 S $P(^ONCO(165.5,D0,2.1),U,18)="",$P(^ONCO(165.5,D0,2.1),U,19)=""
 I BPSITE=67619 S $P(^ONCO(165.5,D0,2.1),U,16)="",$P(^ONCO(165.5,D0,2.1),U,17)=""
 S HDL=$L("Stage of Disease at Diagnosis"),TAB=(80-HDL)\2,TAB=TAB-1
 W @IOF,DASHES
 W !,?1,PATNAM,?TAB,"Stage of Disease at Diagnosis",?SITTAB,SITEGP
 W !,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD
 W !,DASHES
 W !," SCREENING OR BIOPSY PROCEDURES"
 W !," ------------------------------"
 N DI,DIC,DR,DA,DIQ,ONC
 S DIC="^ONCO(165.5,"
 S DR="141:146"
 S DA=D0,DIQ="ONC" D EN^DIQ1
 F I=141,142,143,144,145,146 S X=ONC(165.5,D0,I) D UCASE S ONC(165.5,D0,I)=X
 W !," Biopsy procedure..............: ",ONC(165.5,D0,141)
 W !," Guidance......................: ",ONC(165.5,D0,142)
 W:BPSITE=67500 !," Palpability of primary........: ",ONC(165.5,D0,143)
 W:BPSITE=67500 !," First detected by.............: ",ONC(165.5,D0,144)
 W:BPSITE=67619 !," Approach for biopsy of primary: ",ONC(165.5,D0,145)
 W:BPSITE=67619 !," Biopsy of other than primary..: ",ONC(165.5,D0,146)
 W !,DASHES
 Q
STUFF0 ; IF SITE DOESN'T HAVE BIOPSY PROCEDURE, STUFF ALL 0'S
 S $P(^ONCO(165.5,D0,2.1),U,14)=1
 S $P(^ONCO(165.5,D0,2.1),U,15)=1
 F PIECE=16:1:19 S $P(^ONCO(165.5,D0,2.1),U,PIECE)=0
 Q
NOBP ; IF NO BIOPSY PROCEDURE, STUFF 0'S
 ; D STUFF0,STFMSG
 I BPSITE=67500 D  D STFMSG S Y="@1423" Q
 .S $P(^ONCO(165.5,D0,2.1),U,15)=1
 .S $P(^ONCO(165.5,D0,2.1),U,18)=0
 .S $P(^ONCO(165.5,D0,2.1),U,19)=0
 .Q
 I BPSITE=67619 D  D STFMSG S Y="@1456" Q
 .S $P(^ONCO(165.5,D0,2.1),U,15)=1
 .S $P(^ONCO(165.5,D0,2.1),U,16)=0
 .S $P(^ONCO(165.5,D0,2.1),U,17)=0
 .S $P(^ONCO(165.5,D0,2.1),U,18)=0
 .Q
 Q
UNKBP ; IF UNK BIOPSY PROCEDURE, STUFF 9'S
 F BP=0:0 S BP=$O(^ONCO(164,BPSITE,"BP5",BP)) Q:BP="B"  S LAST=BP
 S $P(^ONCO(165.5,D0,2.1),U,14)=LAST
 F GU=0:0 S GU=$O(^ONCO(164,BPSITE,"GU5",GU)) Q:GU="B"  S LAST=GU
 S $P(^ONCO(165.5,D0,2.1),U,15)=LAST
 I BPSITE=67500 D  D STFMSG S Y="@1423" Q
 .S $P(^ONCO(165.5,D0,2.1),U,18)=0
 .S $P(^ONCO(165.5,D0,2.1),U,19)=0
 .Q
 I BPSITE=67619 D  D STFMSG S Y="@1456" Q
 .S $P(^ONCO(165.5,D0,2.1),U,16)=0
 .S $P(^ONCO(165.5,D0,2.1),U,17)=0
 .S $P(^ONCO(165.5,D0,2.1),U,18)=9
 .Q
 Q
STFMSG ;
 I BPSITE=67500 D
 .K ONCBR S DIC="^ONCO(165.5,",DA=DA,DIQ="ONCBR(",DIQ(0)="E"
 .S DR="142" D EN^DIQ1
 .F I=142 S X=ONCBR(165.5,D0,I) D UCASE S ONCBR(165.5,D0,I)=X
 .W !,"GUIDANCE........: "_ONCBR(165.5,DA,142,"E")
 .S Y="@1423"
 .K ONCBR Q
 I BPSITE=67619 D
 .K ONCPR S DIC="^ONCO(165.5,",DA=DA,DIQ="ONCPR(",DIQ(0)="E"
 .S DR="142;145" D EN^DIQ1
 .F I=142,145 S X=ONCPR(165.5,D0,I) D UCASE S ONCPR(165.5,D0,I)=X
 .W !,"GUIDANCE......................: "_ONCPR(165.5,DA,142,"E")
 .W !,"APPROACH FOR BIOPSY OF PRIMARY: "_ONCPR(165.5,DA,145,"E")
 .S Y="@1456"
 .K ONCPR Q
 Q
 ;
UCASE S X=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
 Q