BARFX001 ; IHS/SD/LSL - DATA DICTIONARY FIX
;;1.8;IHS ACCOUNTS RECEIVABLE;**23**;OCT 26, 2005
;P.OTTIS FEB 2013 NEW ROUTINE
;(1) ERA DIC FIX: ADD VARIABLE VCLMDATE (DTM DOS 472)
;(2) RE-INDEXING XTMP('BARPAS')
;(3) ADDING NEW ALLOWANCE CAT (MODIFYING EXISTING NODE)
;(4) CHANGE A/R DEBT LETTER FILE ACCESS CODES
;(5) FIX DL#4
Q
AUTO ;CALLED FROM BAR*1.8*23 AUTO-INSTALLED: BAREV823
NEW MODE
S MODE="SILENT"
D FIX1(MODE)
D FIX2(MODE)
D FIX3(MODE)
D FIX4(MODE)
D FIX5(MODE)
QUIT
FIX S MODE="VERBOSE"
D FIX1(MODE)
D FIX2(MODE)
D FIX3(MODE)
D FIX4(MODE)
Q
FIX1(MODE) ;
NEW FND,X
W !,"FIXING DATA DICTIONARY ^BAREDI(... "
S FND=0,X=0 F S X=$O(^BAREDI("1T",X)) Q:X="" S Y=$G(^BAREDI("1T",X,0)) I Y["5010" D FOUND(X)
I MODE="VERBOSE" D
. I FND=2 W !,"DATA DICTIONARY ALREADY FIXED."
. I 'FND W "DATA DICTIONARY FOR ERA TRANSPORT FILE 5010 NOT FOUND."
I MODE="VERBOSE" W !," DONE."
Q
FOUND(X) ;
I $D(^BAREDI("1T",X,70,18,0)) I $D(^BAREDI("1T",X,70,"B","VCLMDATE",18)) S FND=2 Q
NEW BARNAME,BARDATA
S FND=1
S BARNAME=$NA(^BAREDI("1T",X,70,18,0))
S BARDATA="VCLMDATE^CLMDATE|BAR50PA1"
S @BARNAME=BARDATA ;11/21/2013
I MODE="VERBOSE" W !,^BAREDI("1T",X,70,18,0)
S BARNAME=$NA(^BAREDI("1T",X,70,"B","VCLMDATE",18))
S BARDATA=""
S @BARNAME=BARDATA
I MODE="VERBOSE" W !,^BAREDI("1T",X,70,"B","VCLMDATE",18)
Q
; ^BAREDI("I",1575,"F","EFT196758300410",101,1)
FIX2(MODE) ;
I MODE="VERBOSE" W !,"RE-INDEXING XTMP('BARPAS')"
D FIXPAS^BARMPAS5 ;;;D TEST^BARMPAS5
I MODE="VERBOSE" W !," DONE."
Q
FIX3(MODE) ;
;OLD: ^DD(90051.02,7,0)="Allowance Category^S^MCR:Medicare;MCD:Medicaid;PVT:Private Insurance;OTH:Other;^0;7^Q"
NEW BARNAME,BARDATA
I MODE="VERBOSE" W !,"ADDING NEW ALLOWANCE CAT" ;MODIFYING EXISTING NODE
S BARNAME="^DD(90051.02,7,0)"
S BARDATA="Allowance Category^S^MCR:Medicare;MCD:Medicaid;PVT:Private Insurance;V:Veterans Medical Benefit;OTH:Other;^0;7^Q"
S @BARNAME=BARDATA
I MODE="VERBOSE" W " .... ",BARNAME," DONE."
QUIT
FIX4(MODE) ;CHANGE A/R DEBT LETTER FILE ACCESS CODES
NEW BARNAME,BARDATA,BARTYP
S BARSEC("DD")="@"
S BARSEC("RD")="V"
S BARSEC("WR")="V"
S BARSEC("DEL")="@"
S BARSEC("LAYGO")="V"
S BARSEC("AUDIT")="@"
D FILESEC^DDMOD(90053.05,.BARSEC)
D FILESEC^DDMOD(90053.08,.BARSEC)
I MODE="VERBOSE" W !,"A/R DEBT LETTER FILES ACCESS CODES CHANGED."
Q
FIX5(MODE) ;FIX A/R DEBT LETTER #4 Replacing '(Collection clerk)' with BARSTF."
I MODE="VERBOSE" D FIXDL^BARDL4FX(1) Q
D FIXDL^BARDL4FX(2)
Q
;---EOR------------
BARFX001 ; IHS/SD/LSL - DATA DICTIONARY FIX
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;**23**;OCT 26, 2005
+2 ;P.OTTIS FEB 2013 NEW ROUTINE
+3 ;(1) ERA DIC FIX: ADD VARIABLE VCLMDATE (DTM DOS 472)
+4 ;(2) RE-INDEXING XTMP('BARPAS')
+5 ;(3) ADDING NEW ALLOWANCE CAT (MODIFYING EXISTING NODE)
+6 ;(4) CHANGE A/R DEBT LETTER FILE ACCESS CODES
+7 ;(5) FIX DL#4
+8 QUIT
AUTO ;CALLED FROM BAR*1.8*23 AUTO-INSTALLED: BAREV823
+1 NEW MODE
+2 SET MODE="SILENT"
+3 DO FIX1(MODE)
+4 DO FIX2(MODE)
+5 DO FIX3(MODE)
+6 DO FIX4(MODE)
+7 DO FIX5(MODE)
+8 QUIT
FIX SET MODE="VERBOSE"
+1 DO FIX1(MODE)
+2 DO FIX2(MODE)
+3 DO FIX3(MODE)
+4 DO FIX4(MODE)
+5 QUIT
FIX1(MODE) ;
+1 NEW FND,X
+2 WRITE !,"FIXING DATA DICTIONARY ^BAREDI(... "
+3 SET FND=0
SET X=0
FOR
SET X=$ORDER(^BAREDI("1T",X))
IF X=""
QUIT
SET Y=$GET(^BAREDI("1T",X,0))
IF Y["5010"
DO FOUND(X)
+4 IF MODE="VERBOSE"
Begin DoDot:1
+5 IF FND=2
WRITE !,"DATA DICTIONARY ALREADY FIXED."
+6 IF 'FND
WRITE "DATA DICTIONARY FOR ERA TRANSPORT FILE 5010 NOT FOUND."
End DoDot:1
+7
*** ERROR ***
+8 QUIT
FOUND(X) ;
+1 IF $DATA(^BAREDI("1T",X,70,18,0))
IF $DATA(^BAREDI("1T",X,70,"B","VCLMDATE",18))
SET FND=2
QUIT
+2 NEW BARNAME,BARDATA
+3 SET FND=1
+4 SET BARNAME=$NAME(^BAREDI("1T",X,70,18,0))
+5 SET BARDATA="VCLMDATE^CLMDATE|BAR50PA1"
+6 ;11/21/2013
SET @BARNAME=BARDATA
+7 IF MODE="VERBOSE"
WRITE !,^BAREDI("1T",X,70,18,0)
+8 SET BARNAME=$NAME(^BAREDI("1T",X,70,"B","VCLMDATE",18))
+9 SET BARDATA=""
+10 SET @BARNAME=BARDATA
+11 IF MODE="VERBOSE"
WRITE !,^BAREDI("1T",X,70,"B","VCLMDATE",18)
+12 QUIT
+13 ; ^BAREDI("I",1575,"F","EFT196758300410",101,1)
FIX2(MODE) ;
+1 IF MODE="VERBOSE"
WRITE !,"RE-INDEXING XTMP('BARPAS')"
+2 ;;;D TEST^BARMPAS5
DO FIXPAS^BARMPAS5
+3 IF MODE="VERBOSE"
WRITE !," DONE."
+4 QUIT
FIX3(MODE) ;
+1 ;OLD: ^DD(90051.02,7,0)="Allowance Category^S^MCR:Medicare;MCD:Medicaid;PVT:Private Insurance;OTH:Other;^0;7^Q"
+2 NEW BARNAME,BARDATA
+3 ;MODIFYING EXISTING NODE
IF MODE="VERBOSE"
WRITE !,"ADDING NEW ALLOWANCE CAT"
+4 SET BARNAME="^DD(90051.02,7,0)"
+5 SET BARDATA="Allowance Category^S^MCR:Medicare;MCD:Medicaid;PVT:Private Insurance;V:Veterans Medical Benefit;OTH:Other;^0;7^Q"
+6 SET @BARNAME=BARDATA
+7 IF MODE="VERBOSE"
WRITE " .... ",BARNAME," DONE."
+8 QUIT
FIX4(MODE) ;CHANGE A/R DEBT LETTER FILE ACCESS CODES
+1 NEW BARNAME,BARDATA,BARTYP
+2 SET BARSEC("DD")="@"
+3 SET BARSEC("RD")="V"
+4 SET BARSEC("WR")="V"
+5 SET BARSEC("DEL")="@"
+6 SET BARSEC("LAYGO")="V"
+7 SET BARSEC("AUDIT")="@"
+8 DO FILESEC^DDMOD(90053.05,.BARSEC)
+9 DO FILESEC^DDMOD(90053.08,.BARSEC)
+10 IF MODE="VERBOSE"
WRITE !,"A/R DEBT LETTER FILES ACCESS CODES CHANGED."
+11 QUIT
FIX5(MODE) ;FIX A/R DEBT LETTER #4 Replacing '(Collection clerk)' with BARSTF."
+1 IF MODE="VERBOSE"
DO FIXDL^BARDL4FX(1)
QUIT
+2 DO FIXDL^BARDL4FX(2)
+3 QUIT
+4 ;---EOR------------