source: WorldVistAEHR/trunk/r/PAID-PRS/PRSALIB.m@ 1261

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1PRSALIB ;WIRMFO-JAH LIBRARY OF SCOPED FUNCTIONS AND PROCEDURES;
2 ;;4.0;PAID;**11**;Sep 21, 1995
3 Q
4 ;must enter thru a function or procedure call
5 ;
6PERM(PPI,DFN) ;JAHeiges- check DAY multiple, temp tour field, 4 perm status
7 ;return true if all are permanent false otherwise
8 N DAY S RTN=1
9 F DAY=1:1:14 I $P($G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),"^",3)'=0 S RTN=0
10 Q RTN
11TMPST(TYPE) ;JAHeiges-Ask tour type. (Return TYP: 0=temp,1=perm)
12 ; (function returns 0 if status question not answered, else true)
13 W ! N DIR,DIRUT
14 S DIR("A",1)="Is this tour PERMANANT."
15 S DIR("A")="Should this tour automatically move to future pay periods"
16 S DIR(0)="YO",DIR("B")="YES"
17 S DIR("?")="Answer YES to ensure permanent status for this person."
18 S DIR("?",1)="A permanent status enables an automatic move into "
19 S DIR("?",2)="future pay periods. Answer NO for a temporary status."
20 D ^DIR
21 I $D(DIRUT) S TYPE="",RTN=0
22 E S TYPE='(Y),RTN=1
23 Q RTN
24UPDSTAT(PPI,DFN,STAT) ;JAHeiges
25 ;function loops thru DAY multiple (temp tour field) and sets status
26 N DAY S RTN=1
27 F DAY=1:1:14 D
28 . S $P(^PRST(458,PPI,"E",DFN,"D",DAY,0),"^",3)=STAT
29 Q
30UPDTQ() ;JAHeiges-Ask 2 update tour status /Return 0=no 1=yes/
31 N RTN,DIR,DIRUT
32 S DIR("A")="Update Tour Status"
33 S DIR(0)="YO",DIR("B")="YES"
34 S DIR("?",1)="Answer YES to update status. Answer NO keep current."
35 S DIR("?",2)="I'll ask type of tour next, (temporary or permanent.)"
36 S DIR("?")="Update tour status"
37 D ^DIR
38 I $D(DIRUT) S RTN=0
39 E S RTN=Y
40 Q RTN
Note: See TracBrowser for help on using the repository browser.