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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSDSET 2923 printed Dec 13, 2024@02:26:01 Page 2
PRSDSET ;HISC/MGD-PAID DOWNLOAD SET LOGIC ;09/13/2003
+1 ;;4.0;PAID;**48,78,82**;Sep 21, 1995
LDSET ;Initial download processor
+1 SET DATA=$PIECE(RCD,":",CC)
SET DBNAME=$PIECE(FLD,";",3)
+2 IF (DBNAME="MAPRVAST")!(DBNAME="MAPRVAOT")!(DBNAME="MXSSN")
QUIT
+3 IF (DBNAME="MBSTATFR")!(DBNAME="MBSACODE")!(DBNAME="MBSADATE")!(DBNAME="MBSANOAC")
IF DATA=""
QUIT
+4 IF (DBNAME="MXFTAXEX")!(DBNAME["EXEMPTION")!(DBNAME="MXNORMHR")!(DBNAME="MXFTEEAJ")
IF DATA=""
SET DATA=0
+5 SET NODE=$PIECE(FLD,";",5)
SET PIECE=$PIECE(FLD,";",6)
SET FLDNUM=$PIECE(FLD,";",12)
+6 if (DATA'="")&($PIECE(FLD,";",7)'="")
XECUTE $PIECE(FLD,";",7)
+7 IF (NODE="LD")
IF (DATA="")
IF ($PIECE(FLD,";",7)'="")
XECUTE $PIECE(FLD,";",7)
+8 if (NODE="")!(PIECE="")
QUIT
+9 IF FLDNUM'=""
IF $DATA(^DD(450,"IX",FLDNUM))
if $DATA(^PRSPC(IEN,NODE))
SET X=$PIECE(^PRSPC(IEN,NODE),U,PIECE)
SET DA=IEN
DO KILL^PRSDXREF
+10 IF NODE'="LD"
SET $PIECE(^PRSPC(IEN,NODE),U,PIECE)=DATA
+11 IF NODE="LD"
IF (MULT)
DO LD
+12 IF FLDNUM'=""
IF $DATA(^DD(450,"IX",FLDNUM))
SET X=DATA
DO SET^PRSDXREF
+13 KILL MFLD,MULT
+14 QUIT
EPTSET ;Edit & Update, Payrun and Transfer download processor
+1 SET DBNAME=$PIECE(FLD,";",3)
+2 if (DBNAME="MAPRVAST and MAPRVAOT")!(DBNAME="MXSSN")
QUIT
+3 SET E1=$PIECE(FLD,";",5)
SET E2=$PIECE(FLD,";",6)
+4 SET NODE=$PIECE(FLD,";",7)
SET PIECE=$PIECE(FLD,";",8)
SET DATA=$EXTRACT(GRPVAL,E1,E2)
+5 ; Patch 48 - prevent overwriting FEGLI code if AAC does not implement
+6 ; their change before patch is installed.
+7 if DBNAME="MXFEGLI"&(DATA="")
QUIT
+8 SET NODE459=$PIECE(FLD,";",10)
SET PIECE459=$PIECE(FLD,";",11)
SET FLDNUM=$PIECE(FLD,";",12)
+9 SET ADDFLG=$PIECE(FLD,";",13)
DO RTS^PRSDUTIL
+10 if $PIECE(FLD,";",9)'=""
XECUTE $PIECE(FLD,";",9)
+11 if (NODE="")!(PIECE="")
QUIT
+12 IF FLDNUM'=""
IF $DATA(^DD(450,"IX",FLDNUM))
if $DATA(^PRSPC(IEN,NODE))
SET X=$PIECE(^PRSPC(IEN,NODE),U,PIECE)
SET DA=IEN
DO KILL^PRSDXREF
+13 IF NODE'="LD"
SET $PIECE(^PRSPC(IEN,NODE),U,PIECE)=DATA
+14 IF NODE="LD"
IF (MULT)
DO LD
+15 IF FLDNUM'=""
IF $DATA(^DD(450,"IX",FLDNUM))
SET X=DATA
DO SET^PRSDXREF
+16 IF TYPE="P"
IF DATA'=""
IF PP'=""
IF NODE459'=""
IF PIECE459'=""
DO SET459
+17 KILL MFLD,MULT
+18 QUIT
SET459 IF (ADDFLG="O")!('$DATA(^PRST(459,PPIEN,"P",IEN,NODE459)))
SET $PIECE(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)=DATA
QUIT
+1 IF $PIECE(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)=""
SET $PIECE(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)=DATA
QUIT
+2 SET SUM=$PIECE(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)+DATA
+3 IF DATA["."
SET NOD=$LENGTH($PIECE(DATA,".",2))
SET SUM=$JUSTIFY(SUM,0,NOD)
+4 if +SUM=0
SET SUM=""
+5 IF FLDNUM'=""
IF $DATA(^DD(450,"IX",FLDNUM))
if $DATA(^PRSPC(IEN,NODE))
SET X=$PIECE(^PRSPC(IEN,NODE),U,PIECE)
SET DA=IEN
DO KILL^PRSDXREF
+6 IF NODE'="LD"
Begin DoDot:1
+7 SET $PIECE(^PRST(459,PPIEN,"P",IEN,NODE459),U,PIECE459)=SUM
+8 SET $PIECE(^PRSPC(IEN,NODE),U,PIECE)=SUM
End DoDot:1
+9 IF NODE="LD"
IF (MULT)
Begin DoDot:1
+10 KILL PRSFDA
+11 SET IENS="?+"_MULT_","_IEN_","_PPIEN_","
+12 SET PRSFDA(459.11054,IENS,.01)=MULT
+13 SET PRSFDA(459.11054,IENS,FLD)=DATA
+14 DO UPDATE^DIE("","PRSFDA","IENS","MGD")
+15 KILL PRSFDA
+16 DO LD
End DoDot:1
+17 IF FLDNUM'=""
IF $DATA(^DD(450,"IX",FLDNUM))
SET X=SUM
DO SET^PRSDXREF
+18 KILL MFLD,MFLD,NOD
+19 QUIT
LD ; Update LABOR DISTRIBUTION Multiple (450.0757)
+1 KILL PRSFDA
+2 SET IENS="?+"_MULT_","_IEN_","
+3 SET PRSFDA(450.0757,IENS,.01)=MULT
+4 SET PRSFDA(450.0757,IENS,MFLD)=DATA
+5 DO UPDATE^DIE("","PRSFDA","IENS")
+6 QUIT