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

ATXXREF.m

Go to the documentation of this file.
  1. ATXXREF ;GDIT/HSCD/ALA-Taxonomy Cross-reference ; 07 Aug 2015 2:38 PM
  1. ;;5.1;TAXONOMY;**13**;FEB 4, 1997;Build 13
  1. ;
  1. BUILDAC ;EP
  1. ;called to initially build AC index
  1. NEW TAXARR
  1. S TAXARR=$NA(^ATXAX(DA,21,"AC"))
  1. D BLDTAX^ATXAPI($P(^ATXAX(DA,0),U),.TAXARR,DA)
  1. Q
  1. ICDTX(F) ;EP
  1. NEW %
  1. S %=$P($G(^ATXAX(F,0)),U,15)
  1. I %=80 Q 1
  1. I %=81 Q 1
  1. I %=80.1 Q 1
  1. Q 0
  1. ;
  1. SETAC ;EP - called from cross reference
  1. ;set this multiple into the "AC"
  1. ;build the list and then merge it into the AC
  1. NEW TAXARR,ATXL,ATXH,CODE
  1. K ^ATXAX(DA(1),21,"AC")
  1. S TAXARR=$NA(^ATXAX(DA(1),21,"AC"))
  1. D BLDTAX^ATXAPI($P(^ATXAX(DA(1),0),U),.TAXARR,DA(1))
  1. Q
  1. KILLAC2 ;EP - called from xref on value multiple to kill entries out of AC
  1. ;this is overkill but have to deal with @ of the .02 and changing of the .02
  1. ;FIRST KILL OFF ALL IN THE OLD .01 THROUGH OLD .02 VALUE RANGE
  1. NEW TAXARR,ATXL,ATXH
  1. S TAXARR="TAXARR"
  1. S ATXL=$$STRIP^XLFSTR($P(^ATXAX(DA(1),21,DA,0),U,1))
  1. S ATXH=$$STRIP^XLFSTR(X)
  1. D LST^ATXAPI($P(^ATXAX(DA(1),21,DA,0),U,3),$P(^ATXAX(DA(1),0),U,15),ATXL_"-"_ATXH,"","TAXARR")
  1. S ATXL=0 F S ATXL=$O(TAXARR(ATXL)) Q:ATXL'=+ATXL K ^ATXAX(DA(1),21,"AC",ATXL)
  1. ;NOW RESET WHAT IS IN THE .01 VALUE THROUGH .02
  1. K TAXARR
  1. S ATXL=$$STRIP^XLFSTR($P(^ATXAX(DA(1),21,DA,0),U,1))
  1. S ATXH=$$STRIP^XLFSTR($P(^ATXAX(DA(1),21,DA,0),U,2)) I ATXH="" S ATXH=ATXL
  1. D LST^ATXAPI($P(^ATXAX(DA(1),21,DA,0),U,3),$P(^ATXAX(DA(1),0),U,15),ATXL_"-"_ATXH,"","TAXARR")
  1. S ATXL=0 F S ATXL=$O(TAXARR(ATXL)) Q:ATXL'=+ATXL S ^ATXAX(DA(1),21,"AC",ATXL)=""
  1. Q
  1. KILLAC1 ;
  1. ;this is overkill but have to deal with @ of the .01 and changing of the .01
  1. ;FIRST KILL OFF ALL IN THE old .01 THROUGH OLD .02 VALUE RANGE
  1. ;if it is a change it will get taken care of in the set xref logic
  1. ;if it is a delete of the multiple "@" at the .01 then all entries for this range will be gone
  1. NEW TAXARR,ATXL,ATXH
  1. S TAXARR="TAXARR"
  1. S ATXL=X
  1. S ATXH=$$STRIP^XLFSTR($P(^ATXAX(DA(1),21,DA,0),U,2))
  1. D LST^ATXAPI($P(^ATXAX(DA(1),21,DA,0),U,3),$P(^ATXAX(DA(1),0),U,15),ATXL_"-"_ATXH,"","TAXARR")
  1. S ATXL=0 F S ATXL=$O(TAXARR(ATXL)) Q:ATXL'=+ATXL K ^ATXAX(DA(1),21,"AC",ATXL)
  1. Q