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

PRCHOV.m

Go to the documentation of this file.
  1. PRCHOV ;WISC/ERC-Overage Report ;7/24/00 23:25
  1. ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. N:'$G(PRCBUGS) L,DIC,BY,FLDS,PRC,DIS,PRCF,STFLG,Y,%
  1. ASK ; Ask user if report should be for one station.
  1. S %=1,PRC("SST")="",STFLG=""
  1. W !!,"Would you like this report for a single STATION NUMBER?: " D YN^DICN Q:%<0 I %=0 W !!,"Enter 'Y' if you would like to limit the report to one station." G ASK
  1. G:%=2 PRINT
  1. S PRCF("X")="S" D ^PRCFSITE Q:'$D(PRC("SITE")) S STFLG=1
  1. ASK2 ;Ask user if report should be for one substation.
  1. I '$D(^PRC(411,"UP",+PRC("SITE"))) G PRINT
  1. I $D(^PRC(411,"UP",+PRC("SITE"))) S %=1 W !!,"Would you like this report for a single sub-station?: " D YN^DICN Q:%<0 I %=0 W !!,"Enter 'Y' if you would like to limit the report to one sub-staion." G ASK2
  1. G:%=2 PRINT
  1. S DIC="^PRC(411,",DIC(0)="AEQZ",DIC("A")="Select SUBSTATION: ",DIC("S")="I $E($G(^PRC(411,+Y,0)),1,3)=PRC(""SITE"")" D ^DIC I Y>0 S PRC("SST")=+Y,STFLG=2
  1. PRINT ;
  1. S L=0,DIC="^PRC(442,",FLDS="[PRCH OVERAGE]",BY="[PRCH OVERAGE]"
  1. S DHD="OVERAGE REPORT FOR "_$S(STFLG=1:PRC("SITE"),STFLG=2:$S($D(^PRC(411,PRC("SST"),50)):$P(^PRC(411,PRC("SST"),50),U,1)_" "_$P(^PRC(411,PRC("SST"),50),U,2),1:PRC("SITE")),1:"ALL STATIONS")
  1. S:STFLG=1 DIS(0)="I $D(^PRC(442,D0,0))>0,PRC(""SITE"")=$P($P(^PRC(442,D0,0),U),""-"")"
  1. S:STFLG=2 DIS(0)="I $D(^PRC(442,D0,0))>0,$D(^PRC(442,D0,23))>0,PRC(""SITE"")=$P($P(^PRC(442,D0,0),U),""-"")&($S($P(^PRC(442,D0,23),U,7):PRC(""SST"")=$P(^PRC(442,D0,23),U,7),1:0))"
  1. D EN1^DIP
  1. Q