BARUPCH2 ; IHS/SD/LSL - CHECK 3P UPLOAD ;
;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
;
; Global changes for new indirect global ABMA - @ABMA@
;;
BILL ; EP
; check bill
K ^TMP("BAR",$J,"BARTMPBL",$J)
S BARDSP=$G(^TMP("BAR",$J,"BARUPDSP",$J))
S BARNULL=0
D ENP^XBDIQ1(90050.01,BARUPDA,".01;.1;3;13;15;17;20;102;103;18:20;113;114;201:207;101;108;112","^TMP(""BAR"",$J,""BARTMPBL"",$J,","I")
N A,B,C,X,Y,Z
I '$L(^TMP("BAR",$J,"BARTMPBL",$J,101)) S BARNULL=1,BARDIF=1 G NULL
; resolve vp to insurer pointers
F Z=3,205,206,207 D
. S ^TMP("BAR",$J,"BARTMPBL",$J,Z,"V")=""
. I ^TMP("BAR",$J,"BARTMPBL",$J,Z,"I") D
. . K BARLSL
. . S BARLSL=^TMP("BAR",$J,"BARTMPBL",$J,Z,"I")
. . S ^TMP("BAR",$J,"BARTMPBL",$J,Z,"V")=$$GET1^DIQ(90050.02,BARLSL,1.001)
. . K BARLSL
F I=1:1 S X=$T(MAPBL+I),Y=$P(X,";;",2),X=$P(Y,";"),C=$P(Y,";",3),Y=$P(Y,";",2) Q:X="""END""" Q:BARNULL D
.S A="@BAR3PUP@("_X_")"
.S A=@A
.S B="^TMP(""BAR"",$J,""BARTMPBL"",$J,"_Y_")"
.S B=@B
.I $L(B) S:C="+" B=+B
.I X["PROV200" S X="""PROV"""
.S BARBLDIF=0
.; screen for odd items
.I X["INS",A="",B=@BAR3PUP@("PTNM") Q
.I X["INS",A="",B'=@BAR3PUP@("PTNM") D Q
..S BARBLDIF=1,BARDIF=1
..S ^TMP("BAR",$J,"BARUPCHK","DIF",BARUPDA,"BL",X)=A
..S ^TMP("BAR",$J,"BARUPCHK","DIF",BARUPDA,"BL",X,Y)=B
.I X["DTBILL",A="" Q
.I A'=B D
..S BARBLDIF=1,BARDIF=1
..S ^TMP("BAR",$J,"BARUPCHK","DIF",BARUPDA,"BL",X)=A
..S ^TMP("BAR",$J,"BARUPCHK","DIF",BARUPDA,"BL",X,Y)=B
.I BARBLDIF,BARSHOW W !,X,?15,A,?30,B,?45,BARBLDIF,?50,Y
;
NULL ;
Q
; *********************************************************************
;
IT ; EP
; check bill - to reload A/R items from 3P everytime
D DELITM^BARUP1
D SETITM^BARUP1
Q
; *********************************************************************
;
MAPBL ;; map between 3p and a/r bill
;;"BLNM";.01
;;"BLDA";17
;;"BLAMT";13
;;"PTNM";101,"I"
;;"CLNC";112,"I"
;;"INS";3,"V"
;;"PRIM";205,"V"
;;"SEC";206,"V"
;;"TERT";207,"V"
;;"PROV";113,"I"
;;"VSLC";108,"I"
;;"VSTP";114,"I"
;;"DOSB";102,"I"
;;"DOSE";103,"I"
;;"DTAP";18,"I"
;;"DTBILL";19,"I"
;;"CREDIT";20
;;"END";
;;"POHL";201
;;"POLN";201
MAPIT ;; map between 3p and a/r item
BARUPCH2 ; IHS/SD/LSL - CHECK 3P UPLOAD ;
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
+2 ;
+3 ; Global changes for new indirect global ABMA - @ABMA@
+4 ;;
BILL ; EP
+1 ; check bill
+2 KILL ^TMP("BAR",$JOB,"BARTMPBL",$JOB)
+3 SET BARDSP=$GET(^TMP("BAR",$JOB,"BARUPDSP",$JOB))
+4 SET BARNULL=0
+5 DO ENP^XBDIQ1(90050.01,BARUPDA,".01;.1;3;13;15;17;20;102;103;18:20;113;114;201:207;101;108;112","^TMP(""BAR"",$J,""BARTMPBL"",$J,","I")
+6 NEW A,B,C,X,Y,Z
+7 IF '$LENGTH(^TMP("BAR",$JOB,"BARTMPBL",$JOB,101))
SET BARNULL=1
SET BARDIF=1
GOTO NULL
+8 ; resolve vp to insurer pointers
+9 FOR Z=3,205,206,207
Begin DoDot:1
+10 SET ^TMP("BAR",$JOB,"BARTMPBL",$JOB,Z,"V")=""
+11 IF ^TMP("BAR",$JOB,"BARTMPBL",$JOB,Z,"I")
Begin DoDot:2
+12 KILL BARLSL
+13 SET BARLSL=^TMP("BAR",$JOB,"BARTMPBL",$JOB,Z,"I")
+14 SET ^TMP("BAR",$JOB,"BARTMPBL",$JOB,Z,"V")=$$GET1^DIQ(90050.02,BARLSL,1.001)
+15 KILL BARLSL
End DoDot:2
End DoDot:1
+16 FOR I=1:1
SET X=$TEXT(MAPBL+I)
SET Y=$PIECE(X,";;",2)
SET X=$PIECE(Y,";")
SET C=$PIECE(Y,";",3)
SET Y=$PIECE(Y,";",2)
IF X="""END"""
QUIT
IF BARNULL
QUIT
Begin DoDot:1
+17 SET A="@BAR3PUP@("_X_")"
+18 SET A=@A
+19 SET B="^TMP(""BAR"",$J,""BARTMPBL"",$J,"_Y_")"
+20 SET B=@B
+21 IF $LENGTH(B)
IF C="+"
SET B=+B
+22 IF X["PROV200"
SET X="""PROV"""
+23 SET BARBLDIF=0
+24 ; screen for odd items
+25 IF X["INS"
IF A=""
IF B=@BAR3PUP@("PTNM")
QUIT
+26 IF X["INS"
IF A=""
IF B'=@BAR3PUP@("PTNM")
Begin DoDot:2
+27 SET BARBLDIF=1
SET BARDIF=1
+28 SET ^TMP("BAR",$JOB,"BARUPCHK","DIF",BARUPDA,"BL",X)=A
+29 SET ^TMP("BAR",$JOB,"BARUPCHK","DIF",BARUPDA,"BL",X,Y)=B
End DoDot:2
QUIT
+30 IF X["DTBILL"
IF A=""
QUIT
+31 IF A'=B
Begin DoDot:2
+32 SET BARBLDIF=1
SET BARDIF=1
+33 SET ^TMP("BAR",$JOB,"BARUPCHK","DIF",BARUPDA,"BL",X)=A
+34 SET ^TMP("BAR",$JOB,"BARUPCHK","DIF",BARUPDA,"BL",X,Y)=B
End DoDot:2
+35 IF BARBLDIF
IF BARSHOW
WRITE !,X,?15,A,?30,B,?45,BARBLDIF,?50,Y
End DoDot:1
+36 ;
NULL ;
+1 QUIT
+2 ; *********************************************************************
+3 ;
IT ; EP
+1 ; check bill - to reload A/R items from 3P everytime
+2 DO DELITM^BARUP1
+3 DO SETITM^BARUP1
+4 QUIT
+5 ; *********************************************************************
+6 ;
MAPBL ;; map between 3p and a/r bill
+1 ;;"BLNM";.01
+2 ;;"BLDA";17
+3 ;;"BLAMT";13
+4 ;;"PTNM";101,"I"
+5 ;;"CLNC";112,"I"
+6 ;;"INS";3,"V"
+7 ;;"PRIM";205,"V"
+8 ;;"SEC";206,"V"
+9 ;;"TERT";207,"V"
+10 ;;"PROV";113,"I"
+11 ;;"VSLC";108,"I"
+12 ;;"VSTP";114,"I"
+13 ;;"DOSB";102,"I"
+14 ;;"DOSE";103,"I"
+15 ;;"DTAP";18,"I"
+16 ;;"DTBILL";19,"I"
+17 ;;"CREDIT";20
+18 ;;"END";
+19 ;;"POHL";201
+20 ;;"POLN";201
MAPIT ;; map between 3p and a/r item