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

APCPRPV.m

Go to the documentation of this file.
APCPRPV ; IHS/TUCSON/LAB - PCC Operational Summary AUGUST 14, 1992 ; [ 04/07/99 11:46 AM ]
 ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;**1**;APR 03, 1998
 ;IHS/CMI/LAB - XTMP
 ;
START ;
 W:$D(IOF) @IOF
 W !,"**********          PCC DATA TRANSMISSION SUMMARY REPORT          **********",!
 W !!,"This report will list all visits that were exported during a PCC export.",!!,"WARNING:  This report can be very long!!!",!!
LOG ;
 S APCPRPV("LOG")=""
 K DIC S DIC="^APCPLOG(",DIC(0)="AEQM" D ^DIC I Y<0 G XIT
 S APCPRPV("LOG")=+Y
 I '$D(^APCPLOG(APCPRPV("LOG"),21)) W !!,"Visit data has already been purged!!" G LOG
 S X=^APCPLOG(APCPRPV("LOG"),0),APCPRPV("RUN BEGIN")=$P(X,U),APCPRPV("RUN END")=$P(X,U,2),APCPRPV("COUNT")=$P(X,U,6),APCPRPV("ORIG TX DATE")=$P($P(X,U,3),".")
 S Y=APCPRPV("RUN BEGIN") X ^DD("DD") S APCPRPV("PRINT BEGIN")=Y
 S Y=APCPRPV("RUN END") X ^DD("DD") S APCPRPV("PRINT END")=Y
 S APCPRPV("VISITS")=$P(^APCPLOG(APCPRPV("LOG"),21,0),U,4)
 W !!,"Log entry ",APCPRPV("LOG"),", was for date range ",APCPRPV("PRINT BEGIN")," through",!,APCPRPV("PRINT END")," and generated ",APCPRPV("COUNT")," transactions from ",APCPRPV("VISITS")," visits.",!!
ZIS ;
 S Y=DT D DD^%DT S APCPRPV("DTP")=Y
 S XBRC="PROCESS^APCPRPV",XBRP="^APCPRPV1",XBRX="XIT^APCPRPV",XBNS="APCP"
 D ^XBDBQUE
 D XIT
 Q
PROCESS ; Entry point for Taskman
 S APCPJOB=$J,APCPBTH=$H
 K ^XTMP("APCPRPV",APCPJOB,APCPBTH)
 S ^XTMP("APCPRPV",0)=$$FMADD^XLFDT(DT,14)_"^"_DT_"^"_"PCC DATA TX VISIT RPT"
 S APCPRPV("BT")=$H
 S APCDOVRR=1
V ;
 S APCPRPV("V")=0 F  S APCPRPV("V")=$O(^APCPLOG(APCPRPV("LOG"),21,APCPRPV("V"))) Q:APCPRPV("V")'=+APCPRPV("V")!($D(APCPRPV("QUIT")))  D PROC
 Q
PROC ;
 Q:'$P(^APCPLOG(APCPRPV("LOG"),21,APCPRPV("V"),0),U,7)
 S ^("TOTAL")=$S($D(^XTMP("APCPRPV",APCPJOB,APCPBTH,"GEN","TOTAL")):(+^("TOTAL")+1),1:1)
 S ^XTMP("APCPRPV",APCPJOB,APCPBTH,"VISITS",APCPRPV("V"))=""
 Q
XIT ;
 K DA,DIE,DIC,DIR,DFN
 K APCPRPV,APCPS,APCDOVRR,APCPV0,APCPJOB,APCPBTH
 Q