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

ONCSGA8H.m

Go to the documentation of this file.
ONCSGA8H ;HINES OIFO/RTK - AJCC 8th Ed Automatic Staging Tables ;01/23/19
 ;;2.2;ONCOLOGY;**10,12,17,20**;Jul 31, 2013;Build 5
 ;
 ;STAGE GROUP HELP CODE AND INPUT TRANSFORM
INP ;
 D HELP I ONCODLST'[X K X,ONCSHLST Q
 K ONCSHLST Q
HELP ;
 S ONCODLST=""
 D GTAJIEN^ONCSCHMG I '$D(ONCAJCHP) Q
 I ONCAJCHP="" Q
 N ONCHP S ONCHP=$P(ONCAJCHP,".",1)_$P(ONCAJCHP,".",2)
 I ONCHP=181,$P($G(^ONCO(165.5,D0,"AJCC8")),U,1)="18.2" S ONCHP=182
 I ONCHP=6 S ONCODLST="3^4A^4B^4C^99"
 I (ONCHP=7)!(ONCHP=8)!(ONCHP=111)!(ONCHP=112)!(ONCHP=121)!(ONCHP=122)!(ONCHP=131)!(ONCHP=132)!(ONCHP=133) S ONCODLST="0^1^2^3^4A^4B^4C^99"
 I ONCHP=9 S ONCODLST="0^1^2^3^4A^4B^99"
 I (ONCHP=10)!(ONCHP=29)!(ONCHP=30)!(ONCHP=31)!(ONCHP=32)!(ONCHP=34) S ONCODLST="1^2^3^4^99"
 I (ONCHP=14)!(ONCHP=163)!(ONCHP=182)!(ONCHP=382)!(ONCHP=383)!(ONCHP=40)!(ONCHP=42)!(ONCHP=45)!(ONCHP=65)!(ONCHP=66)!(ONCHP=671)!(ONCHP=69)!(ONCHP=70)!(ONCHP=71)!(ONCHP=72)!(ONCHP=75)!(ONCHP=795) S ONCODLST="88"
 I ONCHP=15 S ONCODLST="0^1^2^3^4^99"
 I ONCHP=161,STGIND="C" S ONCODLST="0^1^2^3^4A^4B^99"
 I ONCHP=161,STGIND="P" S ONCODLST="0^1A^1B^2A^2B^3A^3B^4A^4B^99"
 I ONCHP=161,STGIND="PT" S ONCODLST="1^2^3A^3B^4A^4B^99"
 I ONCHP=162,STGIND="C" S ONCODLST="0^1^2A^2B^3^4A^4B^99"
 I ONCHP=162,STGIND="P" S ONCODLST="0^1A^1B^1C^2A^2B^3A^3B^4A^4B^99"
 I ONCHP=162,STGIND="PT" S ONCODLST="1^2^3A^3B^4A^4B^99"
 I ONCHP=17,STGIND="C" S ONCODLST="0^1^2A^2B^3^4A^4B^99"
 I ONCHP=17,STGIND="P" S ONCODLST="0^1A^1B^2A^2B^3A^3B^3C^4^4A^4B^99"
 I ONCHP=17,STGIND="PT" S ONCODLST="1^2^3^4^99"
 I ONCHP=181 S ONCODLST="0^1^2A^2B^3A^3B^4^99"
 I ONCHP=182 S ONCODLST="88"
 I (ONCHP=19)!(ONCHP=20) S ONCODLST="0^1^2A^2B^2C^3A^3B^3C^4A^4B^4C^99"
 I ONCHP=21 D
 .I $P($G(^ONCO(165.5,D0,0)),"^",16)>3221231 S ONCODLST="1^2A^2B^3A^3B^3C^4^99" Q
 .S ONCODLST="0^1^2A^2B^3A^3B^3C^4^99" Q
 I ONCHP=22 S ONCODLST="1A^1B^2^3A^3B^4A^4B^99"
 I ONCHP=23 S ONCODLST="0^1A^1B^2^3A^3B^4^99"
 I ONCHP=24 S ONCODLST="0^1^2A^2B^3A^3B^4A^4B^4C^99"
 I ONCHP=25 S ONCODLST="0^1^2^3A^3B^3C^4A^4B^99"
 I ONCHP=26 S ONCODLST="0^1^2A^2B^3A^3B^4^99"
 I ONCHP=27 S ONCODLST="0^1A^1B^2A^2B^3A^3B^4^99"
 I ONCHP=28 S ONCODLST="0^1A^1B^2A^2B^3^4^99"
 I ONCHP=33 S ONCODLST="1^2A^2B^3A^3B^4^99"
 I ONCHP=35 S ONCODLST="1^2^3A^3B^4A^4B^99"
 I ONCHP=36 S ONCODLST="OccultCarcinoma^0^1A1^1A2^1A3^1B^2A^2B^3A^3B^3C^4A^4B^99"
 I (ONCHP=37)!(ONCHP=41)!(ONCHP=431)!(ONCHP=44) S ONCODLST="1A^1B^2^3A^3B^4^99"
 I ONCHP=381 S ONCODLST="1A^1B^2A^2B^3^4A^4B^99"
 I ONCHP=432 S ONCODLST="1^2^3A^3B^4^99"
 I ONCHP=45 S ONCODLST="3^4A^4B^4C^88^99"
 I (ONCHP=46)&(STGIND="C") S ONCODLST="0^1^2A^2B^3^4^88^99"
 I (ONCHP=46)&(STGIND'="C") S ONCODLST="0^1^2A^2B^3A^3B^4^88^99"
 I (ONCHP=47)&((STGIND="C")!(STGIND="PT")) S ONCODLST="0^1A^1B^2A^2B^2C^3^4^99"
 I ONCHP=47,STGIND="P" S ONCODLST="0^1A^1B^2A^2B^2C^3A^3B^3C^3D^4^99"
 I ONCHP=48 S ONCODLST="0^1A^1B^2A^2B^3A^3B^3C^4^88^99"
 I ONCHP=50 S ONCODLST="1^1A^1B^2^3^3A^3B^3C^4^4A^4B^99"
 I ONCHP=51 S ONCODLST="1A^1B^2A^2B^3^4A^4B^99"
 I ONCHP=52 D
 .I $P($G(^ONCO(165.5,D0,0)),"^",16)>3201231 S ONCODLST="1^1A^1A1^1A2^1B^1B1^1B2^1B3^2^2A^2A1^2A2^2B^3^3A^3B^3C1^3C2^4A^4B^99" Q
 .S ONCODLST="1^1A^1A1^1A2^1B^1B1^1B2^2^2A^2A1^2A2^2B^3^3A^3B^4A^4B^99" Q
 I ONCHP=53 S ONCODLST="1^1A^1B^2^3^3A^3B^3C1^3C2^4A^4B^99"
 I ONCHP=541 S ONCODLST="1^1A^1B^2^3A^3B^3C^4A^4B^99"
 I ONCHP=542 S ONCODLST="1^1A^1B^1C^2^3A^3B^3C^4A^4B^99"
 I ONCHP=55 S ONCODLST="1^1A^1B^1C^2^2A^2B^3A1^3A2^3B^3C^4^4A^4B^99"
 I (ONCHP=56)!(ONCHP=60)!(ONCHP=68)!(ONCHP=76)!(ONCHP=77) S ONCODLST="1^2^3^4^99"
 I ONCHP=57 S ONCODLST="0is^0a^1^2A^2B^3A^3B^4^99"
 I ONCHP=58 S ONCODLST="1^2A^2B^2C^3A^3B^3C^4A^4B^99"
 I ONCHP=59 S ONCODLST="0^1^1A^1B^1S^2^2A^2B^2C^3^3A^3B^3C^99"
 I (ONCHP=611)!(ONCHP=612)!(ONCHP=631)!(ONCHP=632)!(ONCHP=633)!(ONCHP=634) S ONCODLST="0a^0is^1^2^3^4^99"
 I (ONCHP=621)!(ONCHP=622) S ONCODLST="0a^0is^1^2^3A^3B^4A^4B^99"
 I ONCHP=64 S ONCODLST="0^1A^1B^2A^2B^3A^3B^4^99"
 I ONCHP=672 S ONCODLST="1^2A^2B^3A^3B^3C^4^99"
 I ONCHP=731 S ONCODLST="1^2^3^4A^4B^99"
 I ONCHP=732 S ONCODLST="4A^4B^4C^99"
 I ONCHP=74 S ONCODLST="1^2^3^4A^4B^4C^99"
 I (ONCHP=79)!(ONCHP=790)!(ONCHP=791)!(ONCHP=792)!(ONCHP=793)!(ONCHP=794)!(ONCHP=795)!(ONCHP=796)!(ONCHP=797)!(ONCHP=801) S ONCODLST="1^1E^2^2E^2 bulky^3^4^99"
 I ONCHP=802 S ONCODLST="1^2^3^4^88^99"
 I ONCHP=811 S ONCODLST="1A^1B^2A^2B^3^3A^3B^4A1^4A2^4B^99"
 I ($E(ONCHP,1,2)=82)!($E(ONCHP,1,2)=83) S ONCODLST="1^2^3^88^99"
 I (ONCHP=812) S ONCODLST="88"
 D SHLIST
 Q
SHLIST ;
 I $G(ONCSHLST)="NO" Q  ;for input transform don't show list
 I ONCODLST="" W !?4,"No Stage Group Codes for this AJCC ID",!?4,"See AJCC Cancer Staging Manual, Eighth Edition",! Q
 W !?4,"Select Stage Group from the list:",!
 I ONCHP=56 N NNN D  K ONCSHLST Q
 .F NNN=0:1:25 W !?4,"1:",NNN,?12,"2:",NNN,?20,"3:",NNN,?28,"4:",NNN
 N NNN F NNN=1:1:25 W !?4,$P(ONCODLST,"^",NNN) Q:$P(ONCODLST,"^",NNN)=""
 K ONCSHLST Q