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

ACDRR2CB.m

Go to the documentation of this file.
ACDRR2CB ;IHS/ADC/EDE/KML - BROKE UP ACDRR2C;
 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
 ;
INTERV ; EP - PROCESS ALL INTERVENTIONS WITHIN DATE RANGE
 S ACDIDATE=$O(^ACDINTV("B",ACDDTLO),-1)
 F  S ACDIDATE=$O(^ACDINTV("B",ACDIDATE)) Q:ACDIDATE=""!(ACDIDATE>ACDDTHI)  D
 .  S ACDINTV=0
 .  F  S ACDINTV=$O(^ACDINTV("B",ACDIDATE,ACDINTV)) Q:'ACDINTV  D INTERV2
 .  Q
 Q
 ;
INTERV2 ; PROCESS ONE INTERVENTION
 Q:'$D(^ACDINTV(ACDINTV,0))  ;          bad xref
 S ^("COUNT")=$G(^TMP("ACDRR2",ACDJOB,ACDBT,"VISIT TYPE","INTV","COUNT"))+1
 S X=^ACDINTV(ACDINTV,0)
 S ACDHRS=$P(X,U,26)
 I 'ACDHRS S ^("HOURS NR")=$G(^TMP("ACDRR2",ACDJOB,ACDBT,"VISIT TYPE","INTV","HOURS NR"))+1 Q
 S ^("HOURS")=$G(^TMP("ACDRR2",ACDJOB,ACDBT,"VISIT TYPE","INTV","HOURS"))+ACDHRS
 S ^("HOURS CNT")=$G(^TMP("ACDRR2",ACDJOB,ACDBT,"VISIT TYPE","INTV","HOURS CNT"))+1
 S ACDINTVM=0
 F  S ACDINTVM=$O(^ACDINTV(ACDINTV,2,ACDINTVM)) Q:'ACDINTVM  S X=^(ACDINTVM,0) D INTVM
 Q
 ;
INTVM ; PROCESS ONE INTERVENTIONS MEMEBER (PROVIDER)
 S ACDWPROV=$P(X,U) ;                      provider
 ;D PFTV^XBPFTV(6,ACDWPROV,.ACDWPROV) ; ** ^DIC(6, **
 S ACDWPROV=$P($G(^VA(200,ACDWPROV,0)),U)
 S:ACDWPROV="" ACDWPROV=$P(X,U)
 S ^("COUNT")=$G(^TMP("ACDRR2",ACDJOB,ACDBT,"PROV",ACDWPROV,"VT","INTV","COUNT"))+1
 S ^("HOURS")=$G(^TMP("ACDRR2",ACDJOB,ACDBT,"PROV",ACDWPROV,"VT","INTV","HOURS"))+ACDHRS
 S ^("HOURS CNT")=$G(^TMP("ACDRR2",ACDJOB,ACDBT,"PROV",ACDWPROV,"VT","INTV","HOURS CNT"))+1
 Q