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

ATXDEL.m

Go to the documentation of this file.
ATXDEL ; IHS/OHPRD/TMJ -  ICD CODES FOR A GIVEN TAXONOMY BEFORE MODIFICATION ; 
 ;;5.1;TAXONOMY;**11**;FEB 04, 1997;Build 48
 ;
 S U="^",ATXDEL="",ATXFLG="",ATXSTP="" ;ATXDEL ALLOWS DELETING OF A TAXONOMY
 ;SINCE A DELETE NODE FOR THE TAXONOMY FILE CHECKS $D(ATXDEL)
 D START  ;F ATXL=0:0 D START Q:ATXSTP
 D EOJ
 Q
 ;
START ;
 D ASK Q:ATXSTP
 Q
 ;
ASK ;
 S ATXSTP=0
 S DIC="^ATXAX(",DIC(0)="AEMQ",DIC("DR")="",DIC("S")="I $P(^(0),U,5)=DUZ,$P(^(0),U,4)=""""" D ^DIC K DIC
 I Y<1 S ATXSTP=1 Q
 W !,$C(7),"Are you sure you want to delete this entire taxonomy" S %=1 D YN^DICN
 I %=1 S ATXX=+Y,ATXQT="" D TSKMN Q
 I %=2 Q
 I %=0 G ASK
 I %=-1 S ATXSTP=1 Q
 Q
 ;
ANY ;EP
 D ASKANY
 D EOJ
 Q
ASKANY ;
 S ATXSTP=0
 S DIC="^ATXAX(",DIC(0)="AEMQ",DIC("DR")="",DIC("S")="I $P(^(0),U,4)=""""" D ^DIC K DIC
 I Y<1 S ATXSTP=1 Q
 W !,$C(7),"Are you sure you want to delete this entire taxonomy" S %=1 D YN^DICN
 I %=1 S ATXX=+Y,ATXQT="" D TSKMN Q
 I %=2 Q
 I %=0 G ASKANY
 I %=-1 S ATXSTP=1 Q
 Q
TSKMN ;
 ;S ^TMP("ATXTAX",ATXX)=" being deleted."
 ;K ZTSAVE F %="ATXX","ATXQT" S ZTSAVE(%)=""
 ;W !!,$C(7),"The taxonomy will now be deleted in background by Taskman!",!
 ;S ZTRTN="ZTM^ATXDEL",ZTDESC="DELETE TAXONOMY",ZTIO="",ZTDTH=DT D ^%ZTLOAD K ZTSK
 I $P(^ATXAX(ATXX,0),U,8) D ZTM Q
 S DA=ATXX,DIK="^ATXAX(" D ^DIK K DA,DIK
 ;K ^TMP("ATXTAX",ATXX)
 Q
 ;
ZTM ;ENTRY POINT FOR TASKMAN
 D DFNS
 D CALLDIK
 ;K ^TMP("ATXTAX",ATXX)
 ;I $D(ZTQUEUED) S ZTREQ="@"
 ;D EOJ
 Q
 ;
DFNS ;EP - GET LO AND HIGH DFNS FOR THIS TAXONOMY
 K ATXARR
 D BLDTAX^ATXAPI($P(^ATXAX(ATXX,0),U,1),"ATXARR",ATXX,"")
 S ATX1="",ATXQ=0 F  S ATX1=$O(ATXARR(ATX1)) Q:ATX1=""  D
 .;set icd9 41 multiple
 .Q:'$D(^ICD9(ATXX,9999999.41,ATX1,0))#2
 .S DIE="^ICD9(",DR="9999999.41///"_"`"_ATXX,DR(2,80.999999941)=".01///@",DA=ATXDFN D ^DIE K DIE
 Q
 ;
CALLDIK ;
 I $P(^ATXAX(ATXX,0),U,7) S DIK="^XMB(3.6,",DA=$P(^(0),U,7) D ^DIK K DIK
 S DIK="^ATXAX(",DA=ATXX D ^DIK K DIK
 S DIK="^ATXPAT(",DA=ATXX D ^DIK K DIK
 Q
 ;
EOJ ;
 D EN^XBVK("ATX")
 Q
 ;