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