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

PRSDADD.m

Go to the documentation of this file.
PRSDADD ;HISC/GWB-PAID ADD NEW EMPLOYEES ;8/20/93  10:44
 ;;4.0;PAID;;Sep 21, 1995
 I TYPE="T" S OLDSSN=$P(^XTMP("PRS",SUB,DATE,TYPE,STA,SSN,TMPIEN),":",10) I OLDSSN'="" D CHGSSN^PRSDERR Q:IEN
 I NAME="" S ERRMSG="SSN "_$E(SSN,1,3)_"-"_$E(SSN,4,5)_"-"_$E(SSN,6,9)_" not found" D ERR^PRSDSERV Q
 S DIC="^PRSPC(",DIC(0)="L",DIC("DR")="8///"_SSN,DLAYGO=450,X=NAME
 K DD,DO D FILE^DICN
 I Y=-1 S ERRMSG="Error adding "_NAME_" to PAID EMPLOYEE File" D ERR^PRSDSERV Q
 S IEN=+Y,^TMP($J,"PRS",NAME,SSN)=""
 I $D(^VA(200,"SSN",SSN)) S VAIEN=$O(^VA(200,"SSN",SSN,0)),$P(^PRSPC(IEN,200),"^",1)=VAIEN,$P(^VA(200,VAIEN,450),"^",1)=IEN
 I '$D(^VA(200,"SSN",SSN)) S ^TMP($J,"PRSNP",NAME,SSN)=""