64 lines
2.8 KiB
Mathematica
64 lines
2.8 KiB
Mathematica
|
PRSDSET ;HISC/MGD-PAID DOWNLOAD SET LOGIC ;09/13/2003
|
||
|
;;4.0;PAID;**48,78,82**;Sep 21, 1995
|
||
|
LDSET ;Initial download processor
|
||
|
S DATA=$P(RCD,":",CC),DBNAME=$P(FLD,";",3)
|
||
|
I (DBNAME="MAPRVAST")!(DBNAME="MAPRVAOT")!(DBNAME="MXSSN") Q
|
||
|
I (DBNAME="MBSTATFR")!(DBNAME="MBSACODE")!(DBNAME="MBSADATE")!(DBNAME="MBSANOAC"),DATA="" Q
|
||
|
I (DBNAME="MXFTAXEX")!(DBNAME["EXEMPTION")!(DBNAME="MXNORMHR")!(DBNAME="MXFTEEAJ"),DATA="" S DATA=0
|
||
|
S NODE=$P(FLD,";",5),PIECE=$P(FLD,";",6),FLDNUM=$P(FLD,";",12)
|
||
|
X:(DATA'="")&($P(FLD,";",7)'="") $P(FLD,";",7)
|
||
|
I (NODE="LD"),(DATA=""),($P(FLD,";",7)'="") X $P(FLD,";",7)
|
||
|
Q:(NODE="")!(PIECE="")
|
||
|
I FLDNUM'="",$D(^DD(450,"IX",FLDNUM)) S:$D(^PRSPC(IEN,NODE)) X=$P(^PRSPC(IEN,NODE),U,PIECE),DA=IEN D KILL^PRSDXREF
|
||
|
I NODE'="LD" S $P(^PRSPC(IEN,NODE),U,PIECE)=DATA
|
||
|
I NODE="LD",(MULT) D LD
|
||
|
I FLDNUM'="",$D(^DD(450,"IX",FLDNUM)) S X=DATA D SET^PRSDXREF
|
||
|
K MFLD,MULT
|
||
|
Q
|
||
|
EPTSET ;Edit & Update, Payrun and Transfer download processor
|
||
|
S DBNAME=$P(FLD,";",3)
|
||
|
Q:(DBNAME="MAPRVAST and MAPRVAOT")!(DBNAME="MXSSN")
|
||
|
S E1=$P(FLD,";",5),E2=$P(FLD,";",6)
|
||
|
S NODE=$P(FLD,";",7),PIECE=$P(FLD,";",8),DATA=$E(GRPVAL,E1,E2)
|
||
|
; Patch 48 - prevent overwriting FEGLI code if AAC does not implement
|
||
|
; their change before patch is installed.
|
||
|
Q:DBNAME="MXFEGLI"&(DATA="")
|
||
|
S NODE459=$P(FLD,";",10),PIECE459=$P(FLD,";",11),FLDNUM=$P(FLD,";",12)
|
||
|
S ADDFLG=$P(FLD,";",13) D RTS^PRSDUTIL
|
||
|
X:$P(FLD,";",9)'="" $P(FLD,";",9)
|
||
|
Q:(NODE="")!(PIECE="")
|
||
|
I FLDNUM'="",$D(^DD(450,"IX",FLDNUM)) S:$D(^PRSPC(IEN,NODE)) X=$P(^PRSPC(IEN,NODE),U,PIECE),DA=IEN D KILL^PRSDXREF
|
||
|
I NODE'="LD" S $P(^PRSPC(IEN,NODE),U,PIECE)=DATA
|
||
|
I NODE="LD",(MULT) D LD
|
||
|
I FLDNUM'="",$D(^DD(450,"IX",FLDNUM)) S X=DATA D SET^PRSDXREF
|
||
|
I TYPE="P",DATA'="",PP'="",NODE459'="",PIECE459'="" D SET459
|
||
|
K MFLD,MULT
|
||
|
Q
|
||
|
SET459 I (ADDFLG="O")!('$D(^PRST(459,PPIEN,"P",IEN,NODE459))) S $P(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)=DATA Q
|
||
|
I $P(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)="" S $P(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)=DATA Q
|
||
|
S SUM=$P(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)+DATA
|
||
|
I DATA["." S NOD=$L($P(DATA,".",2)),SUM=$J(SUM,0,NOD)
|
||
|
S:+SUM=0 SUM=""
|
||
|
I FLDNUM'="",$D(^DD(450,"IX",FLDNUM)) S:$D(^PRSPC(IEN,NODE)) X=$P(^PRSPC(IEN,NODE),U,PIECE),DA=IEN D KILL^PRSDXREF
|
||
|
I NODE'="LD" D
|
||
|
. S $P(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)=SUM
|
||
|
. S $P(^PRSPC(IEN,NODE),U,PIECE)=SUM
|
||
|
I NODE="LD",(MULT) D
|
||
|
. K PRSFDA
|
||
|
. S IENS="?+"_MULT_","_IEN_","_PPIEN_","
|
||
|
. S PRSFDA(459.11054,IENS,.01)=MULT
|
||
|
. S PRSFDA(459.11054,IENS,FLD)=DATA
|
||
|
. D UPDATE^DIE("","PRSFDA","IENS","MGD")
|
||
|
. K PRSFDA
|
||
|
. D LD
|
||
|
I FLDNUM'="",$D(^DD(450,"IX",FLDNUM)) S X=SUM D SET^PRSDXREF
|
||
|
K MFLD,MFLD,NOD
|
||
|
Q
|
||
|
LD ; Update LABOR DISTRIBUTION Multiple (450.0757)
|
||
|
K PRSFDA
|
||
|
S IENS="?+"_MULT_","_IEN_","
|
||
|
S PRSFDA(450.0757,IENS,.01)=MULT
|
||
|
S PRSFDA(450.0757,IENS,MFLD)=DATA
|
||
|
D UPDATE^DIE("","PRSFDA","IENS")
|
||
|
Q
|