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

BPCDBS.m

Go to the documentation of this file.
BPCDBS ; IHS/OIT/MJL - DIABETIC SUMMARY UTILITY FOR GUI PAT CHART ; 
 ;;1.5;BPC;;MAY 26, 2005
 ;
DBSUM(BPCRES,BPCIEN,BPCPARAM) ;EP CALL FROM REMOTE PROC: BPC GETDBS
 S U="^",XWBWRAP=1,BPCIEN=$G(BPCIEN),BPCPARAM=$G(BPCPARAM),BPCCTR=0
 S BPCRES="^XTMP(""BPC"","_$J_")" K ^XTMP("BPC",$J)
 I BPCIEN="" S ^XTMP("BPC",$J,0)=-1,^XTMP("BPC",$J,1)="NO IEN SENT!" K BPCCTR,BPCD,BPCIEN,BPCPARAM,BPCX Q
 S (DFN,APCHSPAT)=BPCIEN
 S X="APCHS9B1" X ^%ZOSF("TEST") I $T D
 .D EP2^APCHS9B1(BPCIEN)
 .D:$D(^TMP("APCHS",$J,"DCS")) SETDATA
 .I BPCCTR=0 S ^XTMP("BPC",$J,0)=-1,^(1)="NO DATA RETURNED!"
 .K BPCCTR,BPCD,BPCIEN,BPCPARAM,BPCX
 Q:'$G(BPCIEN)
 ;
 D EP2^BPCDBS1(BPCIEN) D:$D(^TMP("APCHS",$J,"DCS")) SETDATA
 K BPCCTR,BPCD,BPCIEN,BPCPARAM,BPCX
 Q
SETDATA ;
 S BPCX=0 F  S BPCX=$O(^TMP("APCHS",$J,"DCS",BPCX)) Q:BPCX=""  D
 .S BPCD=^TMP("APCHS",$J,"DCS",BPCX) S:BPCD="" BPCD=" "
 .S BPCCTR=BPCCTR+1,^XTMP("BPC",$J,BPCCTR)=BPCD
 S ^XTMP("BPC",$J,0)=BPCCTR
 Q