Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRSALIB

PRSALIB.m

Go to the documentation of this file.
  1. PRSALIB ;WIRMFO-JAH LIBRARY OF SCOPED FUNCTIONS AND PROCEDURES;
  1. ;;4.0;PAID;**11**;Sep 21, 1995
  1. Q
  1. ;must enter thru a function or procedure call
  1. ;
  1. PERM(PPI,DFN) ;JAHeiges- check DAY multiple, temp tour field, 4 perm status
  1. ;return true if all are permanent false otherwise
  1. N DAY S RTN=1
  1. F DAY=1:1:14 I $P($G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),"^",3)'=0 S RTN=0
  1. Q RTN
  1. TMPST(TYPE) ;JAHeiges-Ask tour type. (Return TYP: 0=temp,1=perm)
  1. ; (function returns 0 if status question not answered, else true)
  1. W ! N DIR,DIRUT
  1. S DIR("A",1)="Is this tour PERMANANT."
  1. S DIR("A")="Should this tour automatically move to future pay periods"
  1. S DIR(0)="YO",DIR("B")="YES"
  1. S DIR("?")="Answer YES to ensure permanent status for this person."
  1. S DIR("?",1)="A permanent status enables an automatic move into "
  1. S DIR("?",2)="future pay periods. Answer NO for a temporary status."
  1. D ^DIR
  1. I $D(DIRUT) S TYPE="",RTN=0
  1. E S TYPE='(Y),RTN=1
  1. Q RTN
  1. UPDSTAT(PPI,DFN,STAT) ;JAHeiges
  1. ;function loops thru DAY multiple (temp tour field) and sets status
  1. N DAY S RTN=1
  1. F DAY=1:1:14 D
  1. . S $P(^PRST(458,PPI,"E",DFN,"D",DAY,0),"^",3)=STAT
  1. Q
  1. UPDTQ() ;JAHeiges-Ask 2 update tour status /Return 0=no 1=yes/
  1. N RTN,DIR,DIRUT
  1. S DIR("A")="Update Tour Status"
  1. S DIR(0)="YO",DIR("B")="YES"
  1. S DIR("?",1)="Answer YES to update status. Answer NO keep current."
  1. S DIR("?",2)="I'll ask type of tour next, (temporary or permanent.)"
  1. S DIR("?")="Update tour status"
  1. D ^DIR
  1. I $D(DIRUT) S RTN=0
  1. E S RTN=Y
  1. Q RTN