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

PSSDIUTX.m

Go to the documentation of this file.
PSSDIUTX ;HP/MJE - Drug Interaction Utility ;05/14/11 5:00pm
 ;;1.0;PHARMACY DATA MANAGEMENT;**175**;9/30/97;Build 9
 ;This routine can be used for PSS namespace additional code
 ;
DELDISC ;This will delete discontinued drugs from drug interaction order checks result set but not dup therapy results
 I $D(PSOSD("DISCONTINUED")) D
 .N CKSV,CKDRG,CKON,CKCT,CKVAL,CKNM,DCRCMN S (CKSV,CKDRG,CKON,CKCT,CKVAL,CKNM,DCRCMN)=""
 .F  S CKNM=$O(PSOSD("DISCONTINUED",CKNM)) Q:CKNM=""  D
 ..S DCRCNM=$P(PSOSD("DISCONTINUED",CKNM),"^") D
 ...F  S CKSV=$O(^TMP($J,LIST,"OUT","DRUGDRUG",CKSV)) Q:CKSV=""  F  S CKDRG=$O(^TMP($J,LIST,"OUT","DRUGDRUG",CKSV,CKDRG)) Q:CKDRG=""  D
 ....F  S CKON=$O(^TMP($J,LIST,"OUT","DRUGDRUG",CKSV,CKDRG,CKON)) Q:CKON=""  F  S CKCT=$O(^TMP($J,LIST,"OUT","DRUGDRUG",CKSV,CKDRG,CKON,CKCT)) Q:CKCT=""  D
 .....S CKVAL=$P($P(^TMP($J,LIST,"OUT","DRUGDRUG",CKSV,CKDRG,CKON,CKCT),"^"),";",2)
 .....I DCRCNM=CKVAL K ^TMP($J,LIST,"OUT","DRUGDRUG",CKSV,CKDRG,CKON,CKCT)
 .....I DCRCNM=$P(CKON,";",2) K ^TMP($J,LIST,"OUT","DRUGDRUG",CKSV,CKDRG,CKON,CKCT)
 K CKSV,CKDRG,CKON,CKCT,CKVAL,CKNM,DCRCMN
 Q