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

BPCRC.m

Go to the documentation of this file.
BPCRC ; IHS/OIT/MJL - REFERRED CARE GUI RPC ROUTINES ;
 ;;1.5;BPC;;MAY 26, 2005
CPTLIST(BPCRES,BPCX,BPCMAX,BPCMORE,BPCPARAM) ;EP CALL FROM REMOTE PROC: BPC GETCPTCATS
 ;
 S BPCGUI=1
EN3 ;
 S U="^",XWBWRAP=1,BPCCTR=0,BPCSUB=$J,BPCC="",BPCMORE=$G(BPCMORE),BPCGUI=$G(BPCGUI),BPCMAX=$G(BPCMAX),BPCX=$G(BPCX),BPCPARAM=$G(BPCPARAM),BPCLEN=$L(BPCX)
 S BPCRES="^BPCRES("_BPCSUB_")",BPCN="" S:BPCX'="" BPCN=$O(^BMCTSVC("B",BPCX),-1)
 S:'BPCMAX BPCMAX=$S(BPCGUI:50,1:1E10) ;
 K ^BPCRES(BPCSUB)
 I BPCMORE'="" D MORECPT,KILL Q
 D GETCPT1,KILL
 Q
GETCPT1 ;
 S BPCFLAG=0 F  S BPCN=$O(^BMCTSVC("B",BPCN)) Q:BPCN=""  D GETCPT2 Q:BPCFLAG
 S ^BPCRES(BPCSUB,0)=BPCCTR
 Q
GETCPT2 ;
 I BPCX'="",$E(BPCN,1,BPCLEN)'=BPCX S BPCFLAG=1 Q
 S BPCIEN="" F  S BPCIEN=$O(^BMCTSVC("B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q
MORECPT ;
 S BPCFLAG=0,BPCN=$P(BPCMORE,"|",1),BPCIEN=$P(BPCMORE,"|",2) D GETRES3 Q:BPCFLAG
 F  S BPCIEN=$O(^BMCTSVC("B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q:BPCFLAG
 D GETCPT1
 Q
ICDLIST(BPCRES,BPCX,BPCMAX,BPCMORE,BPCPARAM) ;EP CALL FROM REMOTE PROC: BPC GETICDCATS
 ;
 S BPCGUI=1
EN2 ;
 S U="^",XWBWRAP=1,BPCCTR=0,BPCSUB=$J,BPCC="",BPCMORE=$G(BPCMORE),BPCGUI=$G(BPCGUI),BPCMAX=$G(BPCMAX),BPCX=$G(BPCX),BPCPARAM=$G(BPCPARAM),BPCLEN=$L(BPCX)
 S BPCRES="^BPCRES("_BPCSUB_")",BPCN="" S:BPCX'="" BPCN=$O(^BMCTDXC("B",BPCX),-1)
 S:'BPCMAX BPCMAX=$S(BPCGUI:50,1:1E10) ;
 K ^BPCRES(BPCSUB)
 I BPCMORE'="" D MOREICD,KILL Q
 D GETICD1,KILL
 Q
GETICD1 ;
 S BPCFLAG=0 F  S BPCN=$O(^BMCTDXC("B",BPCN)) Q:BPCN=""  D GETICD2 Q:BPCFLAG
 S ^BPCRES(BPCSUB,0)=BPCCTR
 Q
GETICD2 ;
 I BPCX'="",$E(BPCN,1,BPCLEN)'=BPCX S BPCFLAG=1 Q
 S BPCIEN="" F  S BPCIEN=$O(^BMCTDXC("B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q
MOREICD ;
 S BPCFLAG=0,BPCN=$P(BPCMORE,"|",1),BPCIEN=$P(BPCMORE,"|",2) D GETRES3 Q:BPCFLAG
 F  S BPCIEN=$O(^BMCTDXC("B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q:BPCFLAG
 D GETICD1
 Q
PRVLIST(BPCRES,BPCX,BPCMAX,BPCMORE,BPCPARAM) ;EP CALL FROM REMOTE PROC: BPC GETPROVIDERS
 ;
 S BPCGUI=1
EN1 ;
 S U="^",XWBWRAP=1,BPCCTR=0,BPCSUB=$J,BPCC="",BPCMORE=$G(BPCMORE),BPCGUI=$G(BPCGUI),BPCMAX=$G(BPCMAX),BPCX=$G(BPCX),BPCPARAM=$G(BPCPARAM),BPCLEN=$L(BPCX)
 S BPCRES="^BPCRES("_BPCSUB_")",BPCN="" S:BPCX'="" BPCN=$O(^VA(200,"B",BPCX),-1)
 S:'BPCMAX BPCMAX=$S(BPCGUI:50,1:1E10) ;
 K ^BPCRES(BPCSUB)
 I BPCMORE'="" D MOREPRV,KILL Q
 D GETPRV1,KILL
 Q
GETPRV1 ;
 S BPCFLAG=0 F  S BPCN=$O(^VA(200,"B",BPCN)) Q:BPCN=""  D GETPRV2 Q:BPCFLAG
 S ^BPCRES(BPCSUB,0)=BPCCTR
 Q
GETPRV2 ;
 I BPCX'="",$E(BPCN,1,BPCLEN)'=BPCX S BPCFLAG=1 Q
 S BPCIEN="" F  S BPCIEN=$O(^VA(200,"B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q
MOREPRV ;
 S BPCFLAG=0,BPCN=$P(BPCMORE,"|",1),BPCIEN=$P(BPCMORE,"|",2) D GETRES3 Q:BPCFLAG
 F  S BPCIEN=$O(^VA(200,"B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q:BPCFLAG
 D GETPRV1
 Q
LOCLIST(BPCRES,BPCX,BPCMAX,BPCMORE,BPCPARAM) ;EP CALL FROM REMOTE PROC: BPC GETLOCATIONS
 ;
 S BPCGUI=1
EN ;
 S U="^",XWBWRAP=1,BPCCTR=0,BPCSUB=$J,BPCC="",BPCMORE=$G(BPCMORE),BPCGUI=$G(BPCGUI),BPCMAX=$G(BPCMAX),BPCX=$G(BPCX),BPCPARAM=$G(BPCPARAM),BPCLEN=$L(BPCX)
 S BPCRES="^BPCRES("_BPCSUB_")",BPCN="" S:BPCX'="" BPCN=$O(^DIC(4,"B",BPCX),-1)
 S:'BPCMAX BPCMAX=$S(BPCGUI:50,1:1E10) ;
 K ^BPCRES(BPCSUB)
 I BPCMORE'="" D MORE,KILL Q
 D GETRES1,KILL
 Q
GETRES1 ;
 S BPCFLAG=0 F  S BPCN=$O(^DIC(4,"B",BPCN)) Q:BPCN=""  D GETRES2 Q:BPCFLAG
 S ^BPCRES(BPCSUB,0)=BPCCTR
 Q
GETRES2 ;
 I BPCX'="",$E(BPCN,1,BPCLEN)'=BPCX S BPCFLAG=1 Q
 S BPCIEN="" F  S BPCIEN=$O(^DIC(4,"B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q
GETRES3 ;
 I BPCCTR=BPCMAX D SETMORE S BPCFLAG=1 Q
 S BPCCTR=BPCCTR+1,^BPCRES(BPCSUB,BPCCTR)=BPCN_U_BPCIEN
 Q
SETMORE ;
 S BPCCTR=BPCCTR+1,^BPCRES(BPCSUB,BPCCTR)="..MORE"_U_BPCN_"|"_BPCIEN
 Q
MORE ;
 S BPCFLAG=0,BPCN=$P(BPCMORE,"|",1),BPCIEN=$P(BPCMORE,"|",2) D GETRES3 Q:BPCFLAG
 F  S BPCIEN=$O(^DIC(4,"B",BPCN,BPCIEN)) Q:BPCIEN=""  D GETRES3 Q:BPCFLAG
 Q:BPCFLAG
 D GETRES1
 Q
 ;
KILL ;
 K BPCC,BPCCTR,BPCFLAG,BPCGUI,BPCIEN,BPCLEN,BPCMAX,BPCMORE,BPCN,BPCPARAM,BPCSUB,BPCX
 Q