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

BKM100P1.m

Go to the documentation of this file.
BKM100P1 ;PRXM/HC/ALA-BKM 1.00 Patch 1 ; 27 Sep 2006  10:29 AM
 ;;2.0;HIV MANAGEMENT SYSTEM;;May 29, 2009
 ;
CND ;  Check candidate list and remove entries
 NEW DFN,MED,DFLG,STAT,TAX
 S DFN=0
 F  S DFN=$O(^BKM(90451.2,DFN)) Q:'DFN  D
 . S STAT=$P(^BKM(90451.2,DFN,0),U,3)
 . I STAT="NOT"!(STAT="REM") Q
 . S MED=0,DFLG=0
 . F  S MED=$O(^BKM(90451.2,DFN,3,MED)) Q:'MED  D  Q:DFLG
 .. S TAX=$P(^BKM(90451.2,DFN,3,MED,0),U,3)
 .. I TAX="BKMV EI MEDS"!(TAX="BKMV NNRTI MEDS")!(TAX="BKMV NRTI MEDS")!(TAX="BKMV PI MEDS") S DFLG=1 Q
 . I DFLG D
 .. NEW DA,DIK
 .. S DA=DFN,DIK="^BKM(90451.2," D ^DIK
 ;
TX ;  Check taxonomies
 NEW TAX,DIC,X,TDA,Y
 S DIC="^ATXAX(",DIC(0)="Z"
 S TAX="BKMV EI MEDS",X=TAX D ^DIC S TDA=+Y
 I TDA'=-1 D
 . NEW DA,VALUE
 . S DA(1)=TDA,DA=0
 . F  S DA=$O(^ATXAX(TDA,21,DA)) Q:'DA  D
 .. S VALUE=$P(^ATXAX(TDA,21,DA,0),U,1)
 .. I VALUE=5201!(VALUE=83677)!(VALUE=84151) D
 ... S DIK="^ATXAX("_DA(1)_",21," D ^DIK
 ;
 NEW TAX,DIC,X,TDA,Y
 S DIC="^ATXAX(",DIC(0)="Z"
 S TAX="BKMV NNRTI MEDS",X=TAX D ^DIC S TDA=+Y
 I TDA'=-1 D
 . NEW DA,VALUE
 . S DA(1)=TDA,DA=0
 . F  S DA=$O(^ATXAX(TDA,21,DA)) Q:'DA  D
 .. S VALUE=$P(^ATXAX(TDA,21,DA,0),U,1)
 .. I VALUE=84282!(VALUE=84317)!(VALUE=84318) D
 ... S DIK="^ATXAX("_DA(1)_",21," D ^DIK
 ;
 NEW TAX,DIC,X,TDA,Y
 S DIC="^ATXAX(",DIC(0)="Z"
 S TAX="BKMV NRTI MEDS",X=TAX D ^DIC S TDA=+Y
 I TDA'=-1 D
 . NEW DA,VALUE
 . S DA(1)=TDA,DA=0
 . F  S DA=$O(^ATXAX(TDA,21,DA)) Q:'DA  D
 .. S VALUE=$P(^ATXAX(TDA,21,DA,0),U,1)
 .. I VALUE=83981!(VALUE=84378)!(VALUE=84431)!(VALUE=84317)!(VALUE=84089) D
 ... S DIK="^ATXAX("_DA(1)_",21," D ^DIK
 ;
 NEW TAX,DIC,X,TDA,Y
 S DIC="^ATXAX(",DIC(0)="Z"
 S TAX="BKMV PI MEDS",X=TAX D ^DIC S TDA=+Y
 I TDA'=-1 D
 . NEW DA,VALUE
 . S DA(1)=TDA,DA=0
 . F  S DA=$O(^ATXAX(TDA,21,DA)) Q:'DA  D
 .. S VALUE=$P(^ATXAX(TDA,21,DA,0),U,1)
 .. I VALUE=84281!(VALUE=84374)!(VALUE=84318) D
 ... S DIK="^ATXAX("_DA(1)_",21," D ^DIK
 Q