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