PRSPEM ;WOIFO/MGD - PTP ENTER MEMORANDUM ;06/01/05 ;;4.0;PAID;**93**;Sep 21, 1995;Build 7 ;;Per VHA Directive 2004-038, this routine should not be modified. ; ;The following routine will allow HR to enter a Part Time Physician's ;Memorandum of Service Level Expectations. Memorandums will cover 364 ;days (26 full Pay Periods) and the Agreed Hours must be equally ;divisible by 26. ; Q MAIN ; Main Driver N DFN,STDAT,ENDAT,AHRS,ICOM,ESOK ; Prompt for Part Time Physician D PTP I PRSIEN'>0 D KILL Q ; Display Header info to validate the correct employee was chosen D HDR ; Prompt and validate Start Date. Calculate and display End Date S QUIT=0 F D Q:QUIT!('OVERLAP) . S OVERLAP=0 . D START . Q:QUIT . D END I QUIT D KILL Q ; ; Prompt and validate Agreed Hours D AHRS I Y'>0 D KILL Q ; Prompt for Initial Comments D ICOM I Y="^" D KILL Q ; Prompt for E-Sig and save if confirmed D ESIG Q ; PTP ; Prompt for Part Time Physician N SSN W ! S DIC="^PRSPC(",DIC(0)="AEMQZ",DIC("A")="Select EMPLOYEE: " D ^DIC K DIC S PRSIEN=+Y Q:PRSIEN<1 ; ; determine associated NEW PERSON entry S SSN=$$GET1^DIQ(450,PRSIEN_",",8,"I") S IEN200=$S(SSN="":"",1:$O(^VA(200,"SSN",SSN,0))) I 'IEN200 D . W $C(7),!!,"Can't find an entry in the NEW PERSON file for this employee." . W !,"They must be added as a user before the memorandum is created." . S PRSIEN=-1 Q ; HDR ; Display PTP info S SCRTTL="Enter PT Physician Memoranda" D HDR^PRSPUT1(PRSIEN,SCRTTL) W ! Q ; START ; Prompt for Start Date ; This subroutine prompts for the date then goes through several ; checks if any check fails we give an explanation message and ; reprompt for the date. If no checks fail we set valid to ; quit. The user must ^ or timeout to quit. ; N VALID S VALID=0 F D Q:QUIT!(VALID) . N Y,DIR,DIRUT S DIR(0)="458.7,1A0",DIR("A")="Start Date: " D ^DIR .; Validate that the Start Date is the first day of a Pay Period. . I $D(DIRUT) S QUIT=1 Q . S D1=+Y . D PP^PRSAPPU . I DAY'=1 D Q . . D SILMO^PRSLIB01(D1) . . W !,"You entered ",$$EXTERNAL^DILFD(458.7,1,,D1) . . W !!,"The Start Date must be the first day of a Pay Period." . . W !,"Please re-enter.",! . S STDAT=D1 .; Check to see if this employee's timecard for this PP is .; in a status other than Timekeeper . S PPI=$P($G(^PRST(458,"AD",D1)),U) . I (D1