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

IBRXUTL1.m

Go to the documentation of this file.
IBRXUTL1 ;BP/BDM - PHARMACY API CALLS ; DECEMBER 20, 2006
 ;;2.0;INTEGRATED BILLING;**347,563**;21-MAR-94;Build 12
 ;;Per VA Directive 6402, this routine should not be modified.
 ;
 ;THIS ROUTINE IS A UTILITY FUNCTION FOR PHARMACY API'S
 ;
DATA(IBDRV) ;
 N LIST,RXRET,RETURN
 K ^TMP($J,"IBDRUG")
 S LIST="IBDRUG" D ZERO^PSS50(IBDRV,,,,,LIST)
 S RXRET=$G(^TMP($J,LIST,0))
 I RXRET>0 S RETURN=1
 E  S RETURN=0
 K ^TMP($J,LIST)
 Q RETURN
 ;
DRUG(IBIEN) ;
 N LIST
 S LIST="DRUGTMP"
 D DATA^PSS50(IBIEN,,,,,LIST)
 S RETURN=$G(^TMP($J,LIST,IBIEN,.01))
 K ^TMP($J,LIST)
 Q RETURN
 ;
ICD(DFN,RXIEN,ICDCT,LIST) ;
 N ICDOUT,NODE,IBTMPARR
 I '$G(DFN) S ICDOUT="" Q ICDOUT
 I '$G(RXIEN) S ICDOUT="" Q ICDOUT
 I '$G(ICDCT) S ICDOUT="" Q ICDOUT
 I $G(LIST)="" S ICDOUT="" Q ICDOUT
 S IBTMPARR="ICDARR"
 S $P(^TMP($J,IBTMPARR),"^",1)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,.01)),"^",1)
 S $P(^TMP($J,IBTMPARR),"^",2)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,1)),"^",1)
 S $P(^TMP($J,IBTMPARR),"^",3)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,2)),"^",1)
 S $P(^TMP($J,IBTMPARR),"^",4)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,3)),"^",1)
 S $P(^TMP($J,IBTMPARR),"^",5)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,4)),"^",1)
 S $P(^TMP($J,IBTMPARR),"^",6)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,5)),"^",1)
 S $P(^TMP($J,IBTMPARR),"^",7)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,6)),"^",1)
 S $P(^TMP($J,IBTMPARR),"^",8)=$P($G(^TMP($J,LIST,DFN,RXIEN,"ICD",ICDCT,7)),"^",1)
 S ICDOUT=^TMP($J,IBTMPARR)
 K ^TMP($J,IBTMPARR)
 Q ICDOUT
 ;
DRUGF(IBDRUG,IBFLD) ; - returns a specific field from the Drug file
 N LIST,RETURN
 S LIST="IBDRUG" K ^TMP($J,LIST)
 D DATA^PSS50(IBDRUG,,,,,LIST)
 S RETURN=$G(^TMP($J,LIST,IBDRUG,IBFLD))
 K ^TMP($J,LIST)
 Q RETURN
 ;