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

BGPD31.m

Go to the documentation of this file.
  1. BGPD31 ; IHS/CMI/LAB - indicator 31 ;
  1. ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
  1. ;
  1. I31 ;EP ;EP - indicator 31
  1. ;Q:'$D(BGPIND(29))
  1. S BGPP=$$HIV(DFN,BGPEDATE)
  1. I BGPP D S(BGPRPT,$S(BGPTIME=1:19,BGPTIME=0:49,BGPTIME=8:89,1:999),10,1)
  1. ;I $D(BGPLIST(29)),BGPTIME=1 S ^XTMP("BGPD",BGPJ,BGPH,"LIST",29,$S($P($G(^AUPNPAT(DFN,11)),U,18)]"":$P(^AUPNPAT(DFN,11),U,18),1:"UNKNOWN"),$P(^DPT(DFN,0),U,2),BGPAGEE,DFN)=BGPP
  1. Q
  1. S(R,N,P,V) ;
  1. I 'V Q ;no value to add
  1. S $P(^BGPD(R,N),U,P)=$P($G(^BGPD(R,N)),U,P)+V
  1. Q
  1. ;
  1. HIV(P,EDATE) ;is patient hiv
  1. I $G(P)="" Q ""
  1. ;check povs
  1. NEW X,E,BGPG,Y
  1. K BGPG
  1. S Y="BGPG("
  1. S X=P_"^LAST DX [BGP HIV/AIDS DXS;DURING "_$$FMTE^XLFDT($P(^DPT(P,0),U,3))_"-"_$$FMTE^XLFDT(EDATE) S E=$$START1^APCLDF(X,Y)
  1. I $D(BGPG(1)) Q 1 ;has a dx
  1. Q 0
  1. ;