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

APCDFQA1.m

Go to the documentation of this file.
APCDFQA1 ; IHS/CMI/LAB - DE FQA ;
 ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
P ; Run by posting date
 S APCDVCNT=0,APCDODAT=APCDSD_".9999" F  S APCDODAT=$O(^APCDFORM("B",APCDODAT)) Q:APCDODAT=""!((APCDODAT\1)>APCDED)  S APCDDFN=$O(^APCDFORM("B",APCDODAT,"")) D V1
 Q
V1 ;
 S APCDC=0 F  S APCDC=$O(^APCDFORM(APCDDFN,11,APCDC)) Q:APCDC'=+APCDC  S APCDVDFN=$P(^APCDFORM(APCDDFN,11,APCDC,0),U) I APCDVDFN]"",$D(^AUPNVSIT(APCDVDFN,0)) D PROC
 Q
PROC ;
 I APCDPROV'=$P(^APCDFORM(APCDDFN,11,APCDC,0),U,2) Q
 S APCDVREC=^AUPNVSIT(APCDVDFN,0)
 Q:'$P(APCDVREC,U,9)
 Q:$P(APCDVREC,U,11)
 Q:'$D(^AUPNVPOV("AD",APCDVDFN))
 I APCDCLN]"",APCDCLN'=$P(APCDVREC,U,8) Q
 D CHKPOV
 I $D(APCDSCT),'$D(APCDSCT($P(^AUPNVSIT(APCDVDFN,0),U,7))) Q
 Q
CHKPOV ;
 I $D(^XTMP("APCDFQA",APCDJOB,APCDBT,"DEPOV","ALL")) D CNT Q
 S (APCD1,APCD2)=0 F  S APCD1=$O(^AUPNVPOV("AD",APCDVDFN,APCD1)) Q:APCD1'=+APCD1  S APCDICDP=$P(^AUPNVPOV(APCD1,0),U) I $D(^XTMP("APCDFQA",APCDJOB,APCDBT,"DEPOV","ICDDFN",APCDICDP)) S APCD2=APCD2+1
 I APCD2>0 D CNT
 Q
CNT ;
 S APCDVCNT=APCDVCNT+1,^XTMP("APCDFQA",APCDJOB,APCDBT,"DEQAV",APCDVCNT,APCDVDFN)=""
 Q
 ;
 ;