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

ONCOAIT.m

Go to the documentation of this file.
ONCOAIT ;HINES OIFO/GWB - Topography functions, Comorbidity List, SEER; 8/05/10
 ;;2.2;ONCOLOGY;**1,4,6,12,18**;Jul 31, 2013;Build 5
TOP() ;Called by ONCO ABSTRACT-I input template
 N ONCOFLD
 N ONCOED S ONCOED=$$TNMED^ONCOU55(D0)
 N TOP3 S TOP3=$E(TOP,3,5)
 I ONCOED<5,(TOP3=700)!($E(TOP3,1,2)=71) S ONCOFLD=21.5 ;INFRA/SUPRA for 4th edition brain cases
 E  I TOP3=694 S ONCOFLD=21.51 ;IRIS/CILIARY BODY for Malignant Melanoma of the Uvea
 E  I ONCOED<5,TOP3=529 S ONCOFLD=21.52 ;UPPER/LOWER for vagina cases
 E  S ONCOFLD=100 ;proceed to TEXT-PRIMARY SITE
 Q ONCOFLD
 ;
SEER(ONCDD5) ;SEER State layout v16 P2.2*6
 ;ONCDD5 = dd data field of 165.5
 S DATEDX=$$GET1^DIQ(165.5,IEN,3,"I")
 S ACDANS=$$GET1^DIQ(165.5,IEN,ONCDD5,"I")
 S:($G(ONCRCL)=2)&((DATEDX<3040000)!(DATEDX>3151231)) ACDANS=""
 S:($G(ONCRCL)=3)&(DATEDX<3040000) ACDANS=""
 K DATEDX
 Q ACDANS
 ;
SEERFLG(ONCDD5) ;SEER derived flag
 S ACDANS=""
 S DATEDX=$$GET1^DIQ(165.5,IEN,3,"I")
 S ONCSX=$$GET1^DIQ(165.5,IEN,ONCDD5,"I")
 S:ONCSX'="" ACDANS=1
 S:($G(ONCRCL)=2)&((DATEDX<3040000)!(DATEDX>3151231)) ACDANS=""
 S:($G(ONCRCL)=3)&(DATEDX<3040000) ACDANS=""
 K ONCSX,DATEDX
 Q ACDANS
 ;
NCST(ACDANS,ONCPHI) ;Comorbidity extract, p2.2*4
 ;ACDANS -- input/output variable
 ;ONCPHI -- input- 1 if excluded; 0 if NOT excluded
 ;old logic
 ;S ACDANS=$$GET1~DIQ(160,ACD160,25,""I"")
 ;S:ACDANS'="""" ACDANS=$$GET1~DIQ(80,ACDANS,.01,""I"") S ACDANS=$P(ACDANS,""."",1)_$P(ACDANS,""."",2)"
 ;
 I $G(EXTRACT)'=3 S ONCPHI=1
 I $G(ONCPHI)'=1 S:ACDANS'="" ACDANS=$$GET1^DIQ(80,ACDANS,.01,"I") S ACDANS=$P(ACDANS,".",1)_$P(ACDANS,".",2) Q ACDANS
 N ONCMO1,ONCMO2,ONCI1,ONCJ1,ONCD9
 K ^TMP($J,"ONCOMO")
 F ONCI1=1:1 S ONCMO1=$P($T(COMO+ONCI1),";",3) Q:ONCMO1=""  F ONCJ1=1:1 S ONCMO2=$P(ONCMO1,"^",ONCJ1) Q:ONCMO2=""  D
 .S ^TMP($J,"ONCOMO",ONCMO2)=""
 S ONCD9=$$GET1^DIQ(80,ACDANS,.01,"I")
 I $G(ONCPHI),(ONCD9'=""),'($D(^TMP($J,"ONCOMO",ONCD9))) S ACDANS=$P(ONCD9,".",1)_$P(ONCD9,".",2)
 I $G(ONCPHI),(ONCD9'=""),($D(^TMP($J,"ONCOMO",ONCD9))) S ACDANS=""
 K ^TMP($J,"ONCOMO")
 Q ACDANS
 ;
COMO ;list of comorbidity codes, p2.2*4, Updated in p#18
 ;;291.1^291.2^291.3^291.4^291.5^291.9^292.0^292.2^303.91^303.92^303.93^305.01^305.02^305.03^760.71^760.72^790.3^977.3^980.1^980.2
 ;;980.9^291.0^303.90^305.00^980.0^E860.2^E860.3^E860.9^E947.3^291.89^291.81^291.82^291.8^303.00^303.01^303.02^303.03^303.90
 ;;303.01^303.02^303.03^357.5^357.6^425.5^535.3^571.1^571.2^571.3^303.00^571.0^E860.0^E860.1^E860.8^535.30^535.31^V11.3^272.4
 ;;292.20^980.8^042.0^042.1^042.2^042.9^043.0^043.1^043.2^043.3^043.9^044.0^044.9^079.53^042.^795.71^V08.^V65.44^V61.41
 ;;282.60^282.61^282.62^282.63^282.64^282.68^282.69^282.41^282.42^292.81^292.82^292.83^292.84^292.385^292.89^292.9^760.73
 ;;304.00^304.01^304.02^304.03^304.09^304.10^304.11^304.12^304.13^304.14^304.15^304.16^304.17^304.18^304.19^304.20^304.21
 ;;304.22^304.23^304.30^304.31^304.32^304.33^304.39^304.40^304.41^304.42^304.43^304.49^304.50^304.51^304.52^304.53^304.59
 ;;304.60^304.61^304.62^304.63^304.70^304.71^304.72^304.73^304.80^304.81^304.82^304.83^304.90^304.91^304.92^304.92^304.93
 ;;304.99^305.00^305.01^305.02^305.03^305.29^305.30^305.31^305.32^305.33^305.39^305.40^760.74^760.75^V79.1
 ;;305.41^305.42^305.43^305.44^305.45^305.46^305.47^305.48^305.49^305.50^305.51^305.52^305.53^305.59^305.6^305.60^305.61
 ;;305.62^305.63^305.70^305.71^305.72^305.73^305.79^305.80^305.81^305.82^305.83^305.90^305.91^305.92^305.93^305.99