source: FOIAVistA/tag/r/PAID-PRS/PRSASAL.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: 2.1 KB
Line 
1PRSASAL ; HISC/REL-Supervisor Alert Utilities ;5/31/95 14:01
2 ;;4.0;PAID;;Sep 21, 1995
3AL ; Check for Alerts
4 G:'$D(^PRST(455.5,"AS",DUZ)) A1
5 N X1,X2 F X1=0:0 S X1=$O(^PRST(455.5,"AS",DUZ,X1)) Q:X1<1 D
6 .S X2=$G(^PRST(455.5,X1,0)) Q:'$P(X2,"^",10)
7 .S MSG="!T&L "_$P(X2,"^",1)_" has "_$P(X2,"^",10)_" actions to certify." D SET^XUS1A(MSG) Q
8A1 Q:'$D(^PRST(455.5,"AA",DUZ))
9 N X1,X2 S X2=0 F X1=0:0 S X1=$O(^PRST(455.5,"AA",DUZ,X1)) Q:X1<1 D
10 .S X2=X2+$P($G(^PRST(455.5,X1,0)),"^",11) Q
11 I X2 S MSG="!PAID has "_X2_" OT/CT/Prior Pay Period actions to approve." D SET^XUS1A(MSG)
12 Q
13UPD ; Update T&L Pending count
14 N DA,NN,NUM,DFN,PPI,SSN S NUM=0
15 S NN="",CKS=1 F S NN=$O(^PRSPC("ATL"_TLE,NN)) Q:NN="" F DFN=0:0 S DFN=$O(^PRSPC("ATL"_TLE,NN,DFN)) Q:DFN<1 D CHK
16 S CKS=0 F VA2=0:0 S VA2=$O(^PRST(455.5,"ASX",TLE,VA2)) Q:VA2<1 S SSN=$P($G(^VA(200,VA2,1)),"^",9) I SSN'="" S DFN=$O(^PRSPC("SSN",SSN,0)) I DFN,$P($G(^PRSPC(+DFN,0)),"^",8)'=TLE D CHK
17 S $P(^PRST(455.5,TLI,0),"^",10)=NUM Q
18CHK ; Check for needed approvals
19 I CKS S SSN=$P($G(^PRSPC(DFN,0)),"^",9) I SSN S EDUZ=+$O(^VA(200,"SSN",SSN,0)) I $D(^PRST(455.5,"AS",EDUZ,TLI)) Q:$P($G(^PRST(455.5,TLI,"S",EDUZ,0)),"^",2)'=TLE
20 F DA=0:0 S DA=$O(^PRST(458.1,"AR",DFN,DA)) Q:DA<1 S NUM=NUM+1
21 F DA=0:0 S DA=$O(^PRST(458.2,"AR",DFN,DA)) Q:DA<1 S NUM=NUM+1
22 F DA=0:0 S DA=$O(^PRST(458.3,"AR",DFN,DA)) Q:DA<1 S NUM=NUM+1
23 I $D(^PRST(458,"ATC",DFN)) F PPI=0:0 S PPI=$O(^PRST(458,"ATC",DFN,PPI)) Q:PPI<1 S NUM=NUM+1
24 I $D(^PRST(458,"AXR",DFN)) F PPI=0:0 S PPI=$O(^PRST(458,"AXR",DFN,PPI)) Q:PPI<1 F AUN=0:0 S AUN=$O(^PRST(458,"AXR",DFN,PPI,AUN)) Q:AUN<1 S NUM=NUM+1
25 Q
26APP ; Update T&L Approval Count
27 N DA,NN,NUM,DFN,PPI,AUN S NUM=0
28 S NN="" F S NN=$O(^PRSPC("ATL"_TLE,NN)) Q:NN="" F DFN=0:0 S DFN=$O(^PRSPC("ATL"_TLE,NN,DFN)) Q:DFN<1 I $D(^PRST(458.2,"AS",DFN)) D
29 .F DA=0:0 S DA=$O(^PRST(458.2,"AS",DFN,DA)) Q:DA<1 S NUM=NUM+1
30 .Q
31 F DFN=0:0 S DFN=$O(^PRST(458,"AXS",DFN)) Q:DFN<1 F PPI=0:0 S PPI=$O(^PRST(458,"AXS",DFN,PPI)) Q:PPI<1 D
32 .I $E($G(^PRST(458,PPI,"E",DFN,5)),22,24)'=TLE Q
33 .F AUN=0:0 S AUN=$O(^PRST(458,"AXS",DFN,PPI,AUN)) Q:AUN<1 S NUM=NUM+1
34 .Q
35 S $P(^PRST(455.5,TLI,0),"^",11)=NUM Q
Note: See TracBrowser for help on using the repository browser.