source: WorldVistAEHR/trunk/r/PAID-PRS/PRSATP0.m@ 1800

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1PRSATP0 ;HISC/REL-Timekeeper Post Absence ;01/25/2007
2 ;;4.0;PAID;**2,51,69,111**;Sep 21, 1995;Build 2
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 S ZENT=""
5 I TC=1 S ZENT=ZENT_"NP CP "
6 E D LV^PRSATP S:$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),"^",12)&(TC>4!(TC=2)) ZENT=ZENT_"HX " S:TC>5!(TC=2) ZENT=ZENT_"TV TR "
7A1 K DIC S DIC="^PRST(457.3,",DIC(0)="AEQM",DIC("S")="I ZENT[$P(^(0),U,1)" W ! D ^DIC K DIC S:$D(DTOUT) X="^" Q:X["^" G:Y<1 A1 S LV=$P(^PRST(457.3,+Y,0),"^",1)
8ATR K DIC S DIC="^PRST(457.4,",DIC(0)="AEQM",DIC("A")="TIME REMARKS CODE: ",DIC("S")="I $P(^(0),U,3)[LV" D ^DIC S:$D(DTOUT) X="^" Q:X["^" S RM=$S(Y>0:+Y,1:"")
9 I LV="CU",RM="" D G ATR
10 .W !,*7,"TIME REMARKS CODE must be entered when CU is posted.",!
11 S Z=$G(^PRST(458,PPI,"E",DFN,"D",DAY,1)),PTY="" I Z="" S PTY=2,$P(^(2),"^",3)=LV S:RM $P(^(2),"^",4)=RM G A2
12 S ZS="",L1=1 F K=1:3:19 Q:$P(Z,"^",K)="" D
13 .S ABS=LV I $P(Z,"^",K+2),"RG"'[$P($G(^PRST(457.2,+$P(Z,"^",K+2),0)),"^",2) Q:"TR TV"[LV S ABS="UN"
14 .S $P(ZS,"^",L1)=$P(Z,"^",K),$P(ZS,"^",L1+1)=$P(Z,"^",K+1)
15 .S $P(ZS,"^",L1+2)=ABS S:RM&(ABS=LV) $P(ZS,"^",L1+3)=RM S L1=L1+4 Q
16 S Z=$G(^PRST(458,PPI,"E",DFN,"D",DAY,4)) I Z'="" F K=1:3:19 Q:$P(Z,"^",K)="" D
17 .S ABS=LV I $P(Z,"^",K+2),"RG"'[$P($G(^PRST(457.2,+$P(Z,"^",K+2),0)),"^",2) Q:"TR TV"[LV S ABS="UN"
18 .S $P(ZS,"^",L1)=$P(Z,"^",K),$P(ZS,"^",L1+1)=$P(Z,"^",K+1)
19 .S $P(ZS,"^",L1+2)=ABS S:RM&(ABS=LV) $P(ZS,"^",L1+3)=RM S L1=L1+4 Q
20 S:ZS'="" ^PRST(458,PPI,"E",DFN,"D",DAY,2)=ZS,PTY=2
21A2 S DIE="^PRST(458,PPI,""E"",DFN,""D"",",DA(2)=PPI,DA(1)=DFN,DA=DAY
22 S DR="70Remarks" D ^DIE S COM=$G(^PRST(458,PPI,"E",DFN,"D",DAY,3))
23 I LV="AA",COM="" W *7,!,"Must enter remarks when coding Authorized Absence." G A2
24 I LV="WP",RM=3,COM="" W *7,!,"Remarks must be entered for WP due to AWOL." G A2
25 S X="" Q
Note: See TracBrowser for help on using the repository browser.