source: FOIAVistA/tag/r/PAID-PRS/PRSAOTR.m@ 812

Last change on this file since 812 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PRSAOTR ;HISC/REL-OT/CT Request/Cancel ;12-SEP-00
2 ;;4.0;PAID;**2,34,61**;Sep 21, 1995
3 S PRSTLV=2 D ^PRSAUTL G:TLI<1 EX
4O1 K DIC S DIC("A")="Select EMPLOYEE: ",DIC("S")="I $P(^(0),""^"",8)=TLE",DIC(0)="AEQM",DIC="^PRSPC(",D="ATL"_TLE W ! D IX^DIC S DFN=+Y K DIC G:DFN<1 EX
5 D ^PRSAENT S ZENT=$S($E(ENT,12):"OT",1:"")_" "_$S($E(ENT,28):"CT",1:"")
6 I ZENT=" " W !!?5,"This Employee is Not Entitled to Either OT or CT/CH" G O1
7O2 L +^PRST(458.2,0) K DDSFILE,DA,DR
8N1 S DA=$P(^PRST(458.2,0),"^",3)+1 I $D(^PRST(458.2,DA)) S $P(^PRST(458.2,0),"^",3)=DA G N1
9 S $P(^PRST(458.2,0),"^",3)=DA,$P(^(0),"^",4)=$P(^(0),"^",4)+1 L -^PRST(458.2,0)
10 S ^PRST(458.2,DA,0)=DA_"^"_DFN,^PRST(458.2,"B",DA,DA)="",^PRST(458.2,"C",DFN,DA)=""
11 S DDSFILE=458.2,DR="[PRSA OT REQ]" D ^DDS K DS
12 S %=$P(^PRST(458.2,DA,0),"^",3) I '% S DIK="^PRST(458.2," D ^DIK K DIK G EX
13 D NOW^%DTC S $P(^PRST(458.2,DA,0),"^",8)="R",$P(^(0),"^",11,12)=DUZ_"^"_%,^PRST(458.2,"AR",DFN,DA)=""
14 S X=$P($G(^PRSPC(DFN,0)),"^",29) I X S:X>100 X=X/2080 S $P(^PRST(458.2,DA,0),"^",10)=+$J(X*1.5*$P(^PRST(458.2,DA,0),"^",6),0,2)
15 D UPD^PRSASAL G O1
16CAN ; Cancel OT Request
17 S PRSTLV=2 D ^PRSAUTL G:TLI<1 EX
18 K DIC S DIC("A")="Select EMPLOYEE: ",DIC("S")="I $P(^(0),""^"",8)=TLE",DIC(0)="AEQM",DIC="^PRSPC(",D="ATL"_TLE W ! D IX^DIC S DFN=+Y K DIC
19 I DFN<1 G EX
20 D HDR^PRSAOTS
21 K %DT S %DT="AEFX",%DT("A")="Begin with Date: ",%DT("B")="T" W ! D ^%DT K %DT S:$D(DTOUT) Y=0 G:Y<1 EX S DTI=Y
22 S NUM=1 D DISP^PRSAOTS
23 G:'CNT EX
24X1 R !!,"Cancel Which Request #? ",X:DTIME G:'$T!("^"[X) EX I X'?1N.N!(X<1)!(X>CNT) W *7," Enter # of Request to Cancel" G X1
25 S X=+X,DA=R(X),$P(^PRST(458.2,DA,0),"^",8)="X" K ^PRST(458.2,"AR",DFN,DA),^PRST(458.2,"AS",DFN,DA)
26 D UPD^PRSASAL W " ... done"
27EX G KILL^XUSCLEAN
Note: See TracBrowser for help on using the repository browser.