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

ONCOEOD1.m

Go to the documentation of this file.
ONCOEOD1 ;HINES OIFO/RTK - Extent of Disease EOD Code tables ;01/29/19
 ;;2.2;ONCOLOGY;**10,13,18**;Jul 31, 2013;Build 5
 ;
 ;EOD FIELDS-HELP AND INPUT TRANSFORM CODE
PTHLP ;EOD PRIMARY TUMOR (#1772) FIELD HELP
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) Q
 S ONCSCM9=ONCSCMA D CHKV9
 S EODIEN=$O(^ONCO(165.9,"B",ONCSCM9,"")) Q:EODIEN'>0
 S EODSCID=$P($G(^ONCO(165.9,EODIEN,0)),"^",1)
 S EODSCNM=$P($G(^ONCO(165.9,EODIEN,0)),"^",2)
 D HDR W !,"EOD Schema ID: ",EODSCID
 W ?23,"EOD Schema Name: ",$E(EODSCNM,1,40),! I $L(EODSCNM)>40 W ?40,$E(EODSCNM,51,80),!
 S EX=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(165.9,EODIEN,1,IEN)) Q:IEN'>0!(EX=U)  D
 .S ONCEODCD=$P($G(^ONCO(165.9,EODIEN,1,IEN,0)),U,1) W ONCEODCD
 .N DIEN F DIEN=0:0 S DIEN=$O(^ONCO(165.9,EODIEN,1,IEN,1,DIEN)) Q:DIEN'>0!(EX=U)  D
 ..S ONCEODTX=$P($G(^ONCO(165.9,EODIEN,1,IEN,1,DIEN,0)),U,1)
 ..W ?8,ONCEODTX,! D P Q:EX=U
 K EX Q
 ;
PTIT ;EOD PRIMARY TUMOR (#1772) FIELD INPUT TRANSFORM
 I X=0!(X="00") S X="000"
 I X=9!(X=99) S X=999
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) K X Q
 S ONCSCM9=ONCSCMA D CHKV9
 S ONCEDIEN=$O(^ONCO(165.9,"B",ONCSCM9,"")) I ONCEDIEN="" K X Q
 S ONCEDVAL=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(165.9,ONCEDIEN,1,IEN)) Q:IEN'>0  D
 .S ONCEDVAL=ONCEDVAL_"^"_$P($G(^ONCO(165.9,ONCEDIEN,1,IEN,0)),U,1)
 I ONCEDVAL'[X K X Q
 S ONCCDIEN=$O(^ONCO(165.9,ONCEDIEN,1,"B",X,"")) I ONCCDIEN="" W "??" K X Q
 W "  ",$P($G(^ONCO(165.9,ONCEDIEN,1,ONCCDIEN,1,1,0)),U,1)
 K ONCEDVAL Q
 ;
RNHLP ;EOD REGIONAL NODES (#1774) FIELD HELP
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) Q
 S ONCSCM9=ONCSCMA D CHKV9
 S EODIEN=$O(^ONCO(165.9,"B",ONCSCM9,"")) Q:EODIEN'>0
 S EODSCID=$P($G(^ONCO(165.9,EODIEN,0)),"^",1)
 S EODSCNM=$P($G(^ONCO(165.9,EODIEN,0)),"^",2)
 D HDR W !,"EOD Schema ID: ",EODSCID
 W ?23,"EOD Schema Name: ",$E(EODSCNM,1,40),! I $L(EODSCNM)>40 W ?40,$E(EODSCNM,51,80),!
 S EX=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(165.9,EODIEN,2,IEN)) Q:IEN'>0!(EX=U)  D
 .S ONCEODCD=$P($G(^ONCO(165.9,EODIEN,2,IEN,0)),U,1) W ONCEODCD
 .N DIEN F DIEN=0:0 S DIEN=$O(^ONCO(165.9,EODIEN,2,IEN,1,DIEN)) Q:DIEN'>0!(EX=U)  D
 ..S ONCEODTX=$P($G(^ONCO(165.9,EODIEN,2,IEN,1,DIEN,0)),U,1)
 ..W ?8,ONCEODTX,! D P Q:EX=U
 K EX Q
 ;
RNIT ;EOD REGIONAL NODES (#1774) FIELD INPUT TRANSFORM
 I X=0!(X="00") S X="000"
 I X=9!(X=99) S X=999
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) K X Q
 S ONCSCM9=ONCSCMA D CHKV9
 S ONCEDIEN=$O(^ONCO(165.9,"B",ONCSCM9,"")) I ONCEDIEN="" K X Q
 S ONCEDVAL=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(165.9,ONCEDIEN,2,IEN)) Q:IEN'>0  D
 .S ONCEDVAL=ONCEDVAL_"^"_$P($G(^ONCO(165.9,ONCEDIEN,2,IEN,0)),U,1)
 I ONCEDVAL'[X K X Q
 S ONCCDIEN=$O(^ONCO(165.9,ONCEDIEN,2,"B",X,"")) I ONCCDIEN="" W "??" K X Q
 W "  ",$P($G(^ONCO(165.9,ONCEDIEN,2,ONCCDIEN,1,1,0)),U,1)
 K ONCEDVAL Q
 ;
MTHLP ;EOD METS (#1776) FIELD HELP
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) Q
 S ONCSCM9=ONCSCMA D CHKV9
 S EODIEN=$O(^ONCO(165.9,"B",ONCSCM9,"")) Q:EODIEN'>0
 S EODSCID=$P($G(^ONCO(165.9,EODIEN,0)),"^",1)
 S EODSCNM=$P($G(^ONCO(165.9,EODIEN,0)),"^",2)
 D HDR W !,"EOD Schema ID: ",EODSCID
 W ?23,"EOD Schema Name: ",$E(EODSCNM,1,40),! I $L(EODSCNM)>40 W ?40,$E(EODSCNM,51,80),!
 S EX=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(165.9,EODIEN,3,IEN)) Q:IEN'>0!(EX=U)  D
 .S ONCEODCD=$P($G(^ONCO(165.9,EODIEN,3,IEN,0)),U,1) W ONCEODCD
 .N DIEN F DIEN=0:0 S DIEN=$O(^ONCO(165.9,EODIEN,3,IEN,1,DIEN)) Q:DIEN'>0!(EX=U)  D
 ..S ONCEODTX=$P($G(^ONCO(165.9,EODIEN,3,IEN,1,DIEN,0)),U,1)
 ..W ?8,ONCEODTX,! D P Q:EX=U
 K EX Q
 ;
MTIT ;EOD METS (#1776) FIELD INPUT TRANSFORM
 I X=0!(X="00") S X="00"
 I X=9 S X=99
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) K X Q
 S ONCSCM9=ONCSCMA D CHKV9
 S ONCEDIEN=$O(^ONCO(165.9,"B",ONCSCM9,"")) I ONCEDIEN="" K X Q
 S ONCEDVAL=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(165.9,ONCEDIEN,3,IEN)) Q:IEN'>0  D
 .S ONCEDVAL=ONCEDVAL_"^"_$P($G(^ONCO(165.9,ONCEDIEN,3,IEN,0)),U,1)
 I ONCEDVAL'[X K X Q
 S ONCCDIEN=$O(^ONCO(165.9,ONCEDIEN,3,"B",X,"")) I ONCCDIEN="" W "??" K X Q
 W "  ",$P($G(^ONCO(165.9,ONCEDIEN,3,ONCCDIEN,1,1,0)),U,1)
 K ONCEDVAL Q
 ;
CHKV9 ;check for v9 (09190,09210,09721,09722,09723,09724)
 I ONCSCM9="09190" S ONCSCM9="00190"
 I ONCSCM9="09210" S ONCSCM9="00210"
 I ONCSCM9="09721" S ONCSCM9="00721"
 I ONCSCM9="09722" S ONCSCM9="00722"
 I ONCSCM9="09723" S ONCSCM9="00723"
 I ONCSCM9="09724" S ONCSCM9="00724"
 Q
NEOHLP ;NEOADJUVANT THERAPY TREATMENT EFFECT (#1634) FIELD HELP
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) Q
 N ONC1659,ONC1676,NEOIEN,NEISCID,NEOSCNM
 S ONCNEOSC=$P($G(^ONCO(165.5,D0,"SSD1")),"^",1) I ONCNEOSC="" Q
 S ONC1659=$O(^ONCO(165.9,"B",ONCNEOSC,"")) Q:ONC1659'>0
 S ONC1676=$P($G(^ONCO(165.9,ONC1659,0)),"^",3) I ONC1676="" S ONC1676=9
 S NEOSCID=$P($G(^ONCO(167.6,ONC1676,0)),"^",1)
 S NEOSCNM=$P($G(^ONCO(167.6,ONC1676,0)),"^",2)
 D HDR W !,"Neoadjuvant Schema ID: ",NEOSCID,!,"Schemas: ",NEOSCNM,!!
 S EX=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(167.6,ONC1676,1,IEN)) Q:IEN'>0!(EX=U)  D
 .S ONCNEOCD=$P($G(^ONCO(167.6,ONC1676,1,IEN,0)),U,1) W ONCNEOCD
 .N DIEN F DIEN=0:0 S DIEN=$O(^ONCO(167.6,ONC1676,1,IEN,1,DIEN)) Q:DIEN'>0!(EX=U)  D
 ..S ONCNEOTX=$P($G(^ONCO(167.6,ONC1676,1,IEN,1,DIEN,0)),U,1)
 ..W ?4,ONCNEOTX,! D P Q:EX=U
 K EX,ONCNEOS Q
 ;
NEOIT ;NEOADJUVANT THERAPY TREATMENT EFFECT (#1634) FIELD INPUT TRANSFORM
 D ^ONCSCHMA I '$D(ONCSCMA)!(ONCSCMA=0) K X Q
 N ONC1659,ONC1676
 S ONCNEOSC=$P($G(^ONCO(165.5,D0,"SSD1")),"^",1) I ONCNEOSC="" Q
 S ONC1659=$O(^ONCO(165.9,"B",ONCNEOSC,"")) Q:ONC1659'>0
 S ONC1676=$P($G(^ONCO(165.9,ONC1659,0)),"^",3) I ONC1676="" S ONC1676=9
 S ONCNEOVL=""
 N IEN F IEN=0:0 S IEN=$O(^ONCO(167.6,ONC1676,1,IEN)) Q:IEN'>0  D
 .S ONCNEOVL=ONCNEOVL_"^"_$P($G(^ONCO(167.6,ONC1676,1,IEN,0)),U,1)
 I ONCNEOVL'[X K X Q
 S ONCCDIEN=$O(^ONCO(167.6,ONC1676,1,"B",X,"")) I ONCCDIEN="" W "??" K X Q
 W "  ",$P($G(^ONCO(167.6,ONC1676,1,ONCCDIEN,1,1,0)),U,1)
 K ONCNEOVL Q
 ;
NEODSP ;NEOADJUVANT THERAPY - TX EFFECT DISPLAY CALLED FROM ONCOPA2
 I NEOXVAL="" Q
 N ONC1659,ONC1676
 S ONCNEOSC=$P($G(^ONCO(165.5,IEN,"SSD1")),"^",1) I ONCNEOSC="" Q
 S ONC1659=$O(^ONCO(165.9,"B",ONCNEOSC,"")) Q:ONC1659'>0
 S ONC1676=$P($G(^ONCO(165.9,ONC1659,0)),"^",3) I ONC1676="" S ONC1676=9
 S ONCCDIEN=$O(^ONCO(167.6,ONC1676,1,"B",NEOXVAL,"")) I ONCCDIEN="" W "??" Q
 W "  ",$P($G(^ONCO(167.6,ONC1676,1,ONCCDIEN,1,1,0)),"^",1)
 K ONC1659,ONC1676,ONCNEOSC,ONCNEOVL
 Q
 ;
P ;Enter RETURN to continue
 I $Y>(IOSL-4) D  Q:EX=U  W !
 .I $E(IOST,1,2)="C-" W ! K DIR S DIR(0)="E",DIR("A")="Enter RETURN to see more or '^' to exit Help" D ^DIR I 'Y S EX=U Q
 .D HDR Q
 Q
 ;
HDR ;Header
 W @IOF
 Q