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

APCLAP31.m

Go to the documentation of this file.
APCLAP31 ; IHS/CMI/LAB - visits by provider process ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
START ;
 S APCLBT=$H
 K ^XTMP("APCLAP3",APCLJOB,APCLBTH)
 D XTMP^APCLOSUT("APCLAP3","PCC - ALL VISITS BY PROV")
V ; Run by visit date
 S APCLODAT=APCLSD_".9999" F  S APCLODAT=$O(^AUPNVSIT("B",APCLODAT)) Q:APCLODAT=""!((APCLODAT\1)>APCLED)  D V1
 ;
END ;
 S APCLET=$H
 Q
V1 ;
 S V="" F  S V=$O(^AUPNVSIT("B",APCLODAT,V)) Q:V'=+V  I $D(^AUPNVSIT(V,0)) S APCLVREC=^(0) D
 .K APCLSKIP
 .Q:'$P(APCLVREC,U,9)
 .Q:$P(APCLVREC,U,11)
 .Q:$$DEMO^APCLUTL($P(APCLVREC,U,5),$G(APCLDEMO))
 .I $$CHKLOC^APCLOCCK(APCLLOC,$P(APCLVREC,U,6))=0 Q
 .Q:'$D(^AUPNVPOV("AD",V))
 .Q:'$D(^AUPNVPRV("AD",V))
 .S APCLVLOC=$P(APCLVREC,U,6) Q:APCLVLOC=""
 .S APCLCAT=$P(APCLVREC,U,7)
 .S DIQ(0)="E",DA=V,DIC="^AUPNVSIT(",DR=".07" D EN^DIQ1 S APCLCAT=^UTILITY("DIQ1",$J,9000010,DA,".07","E")
 .K ^UTILITY("DIQ1",$J)
 .S B=0 F  S B=$O(^AUPNVPRV("AD",V,B)) Q:B=""  D
 ..I APCLPRIM,$P(^AUPNVPRV(B,0),U,4)'="P" Q
 ..S P=$P(^AUPNVPRV(B,0),U)
 ..S F=0
 ..D @APCLPSRT
 ..Q:'F
 ..S ^(APCLCAT)=$S($D(^XTMP("APCLAP3",APCLJOB,APCLBTH,S,APCLVLOC,APCLCAT)):^(APCLCAT)+1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