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

APCPRLOG.m

Go to the documentation of this file.
  1. APCPRLOG ; IHS/TUCSON/LAB - OHPRD-TUCSON/LAB - UPDATE LOG IN REDO AUGUST 14, 1992 ; [ 04/30/2002 9:36 PM ]
  1. ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;**1,3,6**;APR 03, 1998
  1. ;IHS/CMI/LAB - new date format
  1. LOG ; UPDATE LOG
  1. W:'$D(ZTQUEUED) !!,APCP("COUNT")," transactions were generated."
  1. W:'$D(ZTQUEUED) !,"Updating Log entry."
  1. D NOW^%DTC S APCP("RUN STOP")=%
  1. S X="AD0"_"^"_$P(^AUTTSITE(1,1),U,3)_"^"_$P(^DIC(4,DUZ(2),0),U)_"^"_$$DATE($E(APCP("RUN START"),1,7))_"^"_$$DATE(APCP("RUN BEGIN"))_"^"_$$DATE(APCP("RUN END"))
  1. S X=X_"^"_$S(APCPO("RUN")="REDO":"R",1:"")_"^"_APCP("COUNT")_"^"_APCP("VISITS STAT")_"^"
  1. S Y=$G(APCP("ERROR COUNT"))+$G(APCP("DEMO PAT"))+$G(APCP("DEL NEVER SENT"))+$G(APCP("IN NO PP"))
  1. S X=X_Y_"^"_$G(APCP("ERROR COUNT"))_"^"_$G(APCP("DEMO PAT"))_"^"_$G(APCP("FILENAME"))
  1. S ^BAPCDATA(0)=X
  1. S X=^APCPLOG(APCP("RUN LOG"),0),$P(X,U,3)="",$P(X,U,4)="",$P(X,U,5)="",$P(X,U,6)="",$P(X,U,7)="",$P(X,U,11)="",$P(X,U,12)="",$P(X,U,13)="",$P(X,U,15)=""
  1. S $P(X,U,17)="",$P(X,U,18)="",$P(X,U,19)="",$P(X,U,21)="",$P(X,U,22)="",$P(X,U,23)="",$P(X,U,26)="",^APCPLOG(APCP("RUN LOG"),0)=X
  1. S DA=APCP("RUN LOG"),DIE="^APCPLOG(",DR=".03////"_APCP("RUN START")_";.04////"_APCP("RUN STOP")_";.05////"_APCP("ERROR COUNT")_";.06////"_APCP("COUNT")_";.15///P"
  1. D ^DIE
  1. I $D(Y) S APCP("QFLG")=30 Q
  1. S DA=APCP("RUN LOG"),DIE="^APCPLOG(",DR=".11////"_APCP("INPT")_";.14////"_APCP("CHA")_";.13////"_APCP("APC")_";.17////"_APCP("STAT")_";.18////"_$G(APCP("VISITS STAT")) D ^DIE I $D(Y) S APCP("QFLG")=30 Q
  1. S DA=APCP("RUN LOG"),DIE="^APCPLOG(",DR=".19////"_$G(APCP("DEMO PAT"))_";.21////"_$G(APCP("EVENTS"))_";.22////"_$G(APCP("DELETED"))_";.23////"_$G(APCP("IN NO PP")) D ^DIE I $D(Y) S APCP("QFLG")=30 Q
  1. S DA=APCP("RUN LOG"),DIE="^APCPLOG(",DR=".24///"_APCP("FILENAME")_";.25///"_$S(APCPO("RUN")="REDO":1,1:"")_";.26///"_APCP("DEL NEVER SENT") D ^DIE I $D(Y) S APCP("QFLG")=26 Q
  1. ;
  1. Q
  1. ;
  1. DATE(D) ;EP ;IHS/CMI/LAB - new date format - format date in YYYYMMDD format
  1. I $G(D)="" Q ""
  1. Q $E(D,1,3)+1700_$E(D,4,7)
  1. ;