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

BCHEXCP.m

Go to the documentation of this file.
BCHEXCP ; IHS/CMI/LAB - PRNT RECORD REVIEW ; 
 ;;2.0;IHS RPMS CHR SYSTEM;;OCT 23, 2012;Build 27
 ;IHS/CMI/LAB - tmp to xtmp
 ;
 ;IHS/TUCSON/LAB - PATCH 3 CHANGED FILE NUMBERS AND FIELD NUMBER ON CHR DISPLAY
 ;Print export record check report.
 ;
START ;
 S BCH80E="==============================================================================="
 S BCH80D="-------------------------------------------------------------------------------"
 S Y=BCHBD D DD^%DT S BCHBDD=Y S Y=BCHED D DD^%DT S BCHEDD=Y
 S BCHPG=0 D HEAD I '$D(^XTMP("BCHEXC",BCHJOB,BCHBT)) W !,"No errors to report",! G DONE
 S BCHR=0 K BCHQUIT
 F  S BCHR=$O(^XTMP("BCHEXC",BCHJOB,BCHBT,"ERRORS",BCHR)) Q:BCHR=""!($D(BCHQUIT))  D PROC
 G:$D(BCHQUIT) DONE
 I $Y>(IOSL-6) D HEAD G:$D(BCHQUIT) DONE
DONE ;
 D DONE^BCHUTIL1
 K ^XTMP("BCHEXC",BCHJOB,BCHBT)
 Q
PROC ;
 I $Y>(IOSL-5) D HEAD Q:$D(BCHQUIT)
 S Y=$P(^BCHR(BCHR,0),U) D DD^%DT S BCHDATE=Y
 S BCHNAME=$P(^BCHR(BCHR,0),U,4) I BCHNAME]"" S BCHNAME=$E($P(^DPT(BCHNAME,0),U),1,20)
 I BCHNAME="" S BCHNAME=$P($G(^BCHR(BCHR,11)),U)
 S BCHHRCN="" I $P(^BCHR(BCHR,0),U,4) S BCHHRCN=$S($D(^AUPNPAT($P(^BCHR(BCHR,0),U,4),41,DUZ(2),0)):$P(^(0),U,2),1:"<none>")
 S BCHPROG=$E($$VAL^XBDIQ1(90002,BCHR,.02),1,5)
 K ^UTILITY("DIQ1",$J)
 K DIQ,DIC,DA,DR
 S DIC="^BCHR(",DR=".03",DA=BCHR,DIQ(0)="E" D EN^DIQ1 K DIC,DA,DR,DIQ
 S BCHCAT=$E(^UTILITY("DIQ1",$J,90002,BCHR,.03,"E"),1,14) ;ihs/tucson/lab - patch 3 changed file #
 K ^UTILITY("DIQ1",$J)
 K DIQ,DIC,DA,DR
 S DIC="^BCHR(",DR=".06",DA=BCHR,DIQ(0)="E" D EN^DIQ1 K DIC,DA,DR,DIQ
 S BCHACT=$E(^UTILITY("DIQ1",$J,90002,BCHR,.06,"E"),1,7) ;IHS/TUCSON/LAB - changed file number patch 3
 W !!,BCHDATE,?22,BCHNAME,?43,BCHHRCN,?50,BCHPROG,?56,BCHCAT,?74,BCHACT,!,^XTMP("BCHEXC",BCHJOB,BCHBT,"ERRORS",BCHR)
 Q
CHKDISC ;
 Q:'$D(^VA(200,BCHAP))
 S BCHDISC=$$PPCLSC^BCHUTIL(BCHRPROC)
 S BCHINI=$$PPINI^BCHUTIL(BCHRPROC)
 Q
 I 'BCHPG G HEAD1
 I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BCHQUIT="" Q
HEAD1 ;
 W:$D(IOF) @IOF S BCHPG=BCHPG+1
 W ?(80-$L($P(^DIC(4,DUZ(2),0),U))/2),$P(^DIC(4,DUZ(2),0),U),?72,"Page ",BCHPG,!
 S BCHLENG=26
 W ?((80-BCHLENG)/2),"CHR EXPORT RECORD REVIEW",!
 W ?15,"Record Posting Dates:  ",BCHBDD," and ",BCHEDD,!
 W !!,"RECORD DATE",?22,"PATIENT",?43,"HRN",?51,"PGM",?56,"CHR",?72,"ACT LOC" ;IHS/TUCSON/LAB - 6/27/97 - TYPE to CHR
 W !,BCH80D
 Q