source: FOIAVistA/tag/r/PAID-PRS/PRS8OT.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1PRS8OT ;HISC/MRL-DECOMPOSITION, SCHEDULED OT ;3/26/93 12:34
2 ;;4.0;PAID;;Sep 21, 1995
3 ;
4 ;This routine is used to determine whether OT/CT was scheduled
5 ;in advance of the workweek for the date being processed. OT/CT
6 ;is considered scheduled in advance of the workweek if:
7 ;
8 ; o There is a 1098 request on file in file 458.2 for the
9 ; date being processed, and:
10 ; o The request was made before the workweek on which the OT/
11 ; CT is worked, e.g., the ENTRY DATE/TIME was before the
12 ; SUNDAY preceeding the date worked, AND:
13 ; o The request WAS NOT cancelled or disapproved. Requests
14 ; which were scheduled but pending approval are, for this
15 ; purpose, considered to be approved unless cancelled or
16 ; disapproved.
17 ; o In addition, once the above three criteria are met, the
18 ; T&L on which the OT/CT was worked must be one where
19 ; premium pay is usually paid.
20 ;
21 ;Called by Routines: PRS8PP
22 ;
23 S OK=0,X=$P(PPD,"^",DAY) D ^%DT ;get today's date as Y
24 S (X,NDD)=Y D H^%DTC ;get day number
25 S X1=NDD,X2="-"_(%Y+1) D C^%DTC S NDD(1)=X ;get previous Saturday
26 F ND=0:0 S ND=$O(^PRST(458.2,"AD",DFN,NDD,ND)) Q:ND'>0!(OK) D
27 .S X=^PRST(458.2,ND,0) ;zeroth node of the ot request file
28 .I "DX"[$P(X,"^",8) Q ;disapproved or cancelled
29 .S X1=$P(X,"^",12) Q:'X1 ;no ENTRY DATE
30 .I X1'>NDD(1) S OK=1,X=$P(X,"^",9)
31 S ND=OK G END:'ND
32 I $L(X)=3 D ;check T&L for premium ok
33 .S X=$O(^PRST(455.5,"B",X,0)) Q:'X
34 .S X=$P($G(^PRST(455.5,+X,0)),"^",7)
35 .S ND=+X ;reset ok to premium status
36 ;
37END ; --- done with this process
38 K NDD,OK,X,X1,X2 Q
Note: See TracBrowser for help on using the repository browser.