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

IBCIMSG1.m

Go to the documentation of this file.
IBCIMSG1 ;DSI/SLM - BUILD MESSAGE FOR CLAIMSMANAGER CONT'D ;16-JAN-2001
 ;;2.0;INTEGRATED BILLING;**161**;21-MAR-94
 ;;Per VHA Directive 10-93-142, this routine should not be modified.
 ;
INIT1 ;continued from ibcimsg, building the line segments message
 N I
 S IBCILSEG=0 F  S IBCILSEG=$O(^IBA(351.9,IBIFN,5,IBCILSEG)) Q:'IBCILSEG  D
 .S X=$G(^IBA(351.9,IBIFN,5,IBCILSEG,0)) D TCK^IBCIUT4() S NODE50=X
 .S X=$G(^IBA(351.9,IBIFN,5,IBCILSEG,1)) D TCK^IBCIUT4() S NODE51=X
 .S X=$G(^IBA(351.9,IBIFN,5,IBCILSEG,2)) D TCK^IBCIUT4() S NODE52=X K X
 .S IBCIXLID(IBCILSEG)=$P(NODE50,U,2)
 .S X=IBCIXLID(IBCILSEG),X1=25,IBCIXLID(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,20)=IBCIXLID(IBCILSEG)
 .S IBCIOGID(IBCILSEG)=$P(NODE50,U,3)
 .S X=IBCIOGID(IBCILSEG),X1=20,IBCIOGID(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,21)=IBCIOGID(IBCILSEG)
 .S IBCIOID(IBCILSEG)=$P(NODE50,U,4)
 .S X=IBCIOID(IBCILSEG),X1=20,IBCIOID(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,22)=IBCIOID(IBCILSEG)
 .S IBCILSTA(IBCILSEG)=$$LSTA^IBCIUT1(IBCISNT)
 .S X=IBCILSTA(IBCILSEG),X1=3,X4="T",IBCILSTA(IBCILSEG)=$$FILL^IBCIUT2 K X4
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,23)=IBCILSTA(IBCILSEG)
 .S IBCIBDOS(IBCILSEG)=$P(NODE50,U,6)
 .S X=IBCIBDOS(IBCILSEG),X1=16,IBCIBDOS(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,24)=IBCIBDOS(IBCILSEG)
 .S IBCIEDOS(IBCILSEG)=$P(NODE50,U,7)
 .S X=IBCIEDOS(IBCILSEG),X1=16,IBCIEDOS(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,25)=IBCIEDOS(IBCILSEG)
 .S IBCIPOS(IBCILSEG)=$P(NODE50,U,8)
 .S X=IBCIPOS(IBCILSEG),X1=3,X4="T",IBCIPOS(IBCILSEG)=$$FILL^IBCIUT2 K X4
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,26)=IBCIPOS(IBCILSEG)
 .S IBCISPC(IBCILSEG)=$P(NODE50,U,9)
 .S X=IBCISPC(IBCILSEG),X1=25,IBCISPC(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,27)=IBCISPC(IBCILSEG)
 .S IBCIAPC(IBCILSEG)=$P(NODE50,U,10)
 .S X=IBCIAPC(IBCILSEG),X1=25,IBCIAPC(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,28)=IBCIAPC(IBCILSEG)
 .S IBCISAMT(IBCILSEG)=$P(NODE50,U,11)
 .;
 .; esg - 7/5/01 - correct the format of the $ amount
 .S IBCISAMT(IBCILSEG)=+$TR($FN(IBCISAMT(IBCILSEG),"",2),".")
 .S X=IBCISAMT(IBCILSEG),X1=15,IBCISAMT(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,29)=IBCISAMT(IBCILSEG)
 .S IBCIPAC(IBCILSEG)=$P(NODE50,U,12)
 .S X=IBCIPAC(IBCILSEG),X1=15,IBCIPAC(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,30)=IBCIPAC(IBCILSEG)
 .S IBCISPID(IBCILSEG)=$P(NODE50,U,13)
 .S X=IBCISPID(IBCILSEG),X1=20,IBCISPID(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,31)=IBCISPID(IBCILSEG)
 .S IBCISPLA(IBCILSEG)=$P(NODE51,U,1)
 .S X=IBCISPLA(IBCILSEG),X1=40,IBCISPLA(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,32)=IBCISPLA(IBCILSEG)
 .S IBCISPMI(IBCILSEG)=$P(NODE51,U,2)
 .S X=IBCISPMI(IBCILSEG),X1=20,IBCISPMI(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,33)=IBCISPMI(IBCILSEG)
 .S IBCISPFI(IBCILSEG)=$P(NODE51,U,3)
 .S X=IBCISPFI(IBCILSEG),X1=20,IBCISPFI(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,34)=IBCISPFI(IBCILSEG)
 .S IBCISPTI(IBCILSEG)=$P(NODE51,U,4)
 .S X=IBCISPTI(IBCILSEG),X1=5,X4="T",IBCISPTI(IBCILSEG)=$$FILL^IBCIUT2 K X4
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,35)=IBCISPTI(IBCILSEG)
 .S IBCISPDE(IBCILSEG)=$P(NODE51,U,5)
 .S X=IBCISPDE(IBCILSEG),X1=20,IBCISPDE(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,36)=IBCISPDE(IBCILSEG)
 .S IBCISPSP(IBCILSEG)=$P(NODE51,U,6)
 .S X=IBCISPSP(IBCILSEG),X1=10,IBCISPSP(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,37)=IBCISPSP(IBCILSEG)
 .S IBCISPDI(IBCILSEG)=$P(NODE51,U,7)
 .S X=IBCISPDI(IBCILSEG),X1=10,IBCISPDI(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,38)=IBCISPDI(IBCILSEG)
 .S IBCISPUP(IBCILSEG)=$P(NODE51,U,8)
 .S X=IBCISPUP(IBCILSEG),X1=10,IBCISPUP(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,39)=IBCISPUP(IBCILSEG)
 .S IBCIBPID(IBCILSEG)=$P(NODE51,U,9)
 .S X=IBCIBPID(IBCILSEG),X1=20,IBCIBPID(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,40)=IBCIBPID(IBCILSEG)
 .S IBCIBPLA(IBCILSEG)=$P(NODE52,U,1)
 .S X=IBCIBPLA(IBCILSEG),X1=40,IBCIBPLA(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,41)=IBCIBPLA(IBCILSEG)
 .S IBCIBPMI(IBCILSEG)=$P(NODE52,U,2)
 .S X=IBCIBPMI(IBCILSEG),X1=20,IBCIBPMI(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,42)=IBCIBPMI(IBCILSEG)
 .S IBCIBPFI(IBCILSEG)=$P(NODE52,U,3)
 .S X=IBCIBPFI(IBCILSEG),X1=20,IBCIBPFI(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,43)=IBCIBPFI(IBCILSEG)
 .S IBCIBPTI(IBCILSEG)=$P(NODE52,U,4)
 .S X=IBCIBPTI(IBCILSEG),X1=5,X4="T",IBCIBPTI(IBCILSEG)=$$FILL^IBCIUT2 K X4
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,44)=IBCIBPTI(IBCILSEG)
 .S IBCIBPDE(IBCILSEG)=$P(NODE52,U,5)
 .S X=IBCIBPDE(IBCILSEG),X1=20,X4="T",IBCIBPDE(IBCILSEG)=$$FILL^IBCIUT2 K X4
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,45)=IBCIBPDE(IBCILSEG)
 .S IBCIBPSP(IBCILSEG)=$P(NODE52,U,6)
 .S X=IBCIBPSP(IBCILSEG),X1=10,IBCIBPSP(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,46)=IBCIBPSP(IBCILSEG)
 .S IBCIBPDI(IBCILSEG)=$P(NODE52,U,7)
 .S X=IBCIBPDI(IBCILSEG),X1=10,IBCIBPDI(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,47)=IBCIBPDI(IBCILSEG)
 .S IBCIBPUP(IBCILSEG)=$P(NODE52,U,8)
 .S X=IBCIBPUP(IBCILSEG),X1=10,IBCIBPUP(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,48)=IBCIBPUP(IBCILSEG)
 .S IBCIPPID(IBCILSEG)=$P(NODE52,U,9)
 .S X=IBCIPPID(IBCILSEG),X1=20,IBCIPPID(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,49)=IBCIPPID(IBCILSEG)
 .S IBCISPAI(IBCILSEG)=$P(NODE52,U,10)
 .S X=IBCISPAI(IBCILSEG),X1=20,IBCISPAI(IBCILSEG)=$$FILL^IBCIUT2
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,50)=IBCISPAI(IBCILSEG)
 .S IBCITOS(IBCILSEG)=$P(NODE52,U,11)
 .S X=IBCITOS(IBCILSEG),X1=3,X4="T",IBCITOS(IBCILSEG)=$$FILL^IBCIUT2 K X4
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,51)=IBCITOS(IBCILSEG)
 .S IBCIUNIT(IBCILSEG)=$P(NODE52,U,12)
 .S X=IBCIUNIT(IBCILSEG),X1=5,X4="T",IBCIUNIT(IBCILSEG)=$$FILL^IBCIUT2 K X4
 .S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,52)=IBCIUNIT(IBCILSEG)
CPT .;get cpt modifiers
 .S IBCICPT(IBCILSEG,0)=$P($G(^IBA(351.9,IBIFN,5,IBCILSEG,3)),U)
 .I IBCICPT(IBCILSEG,0)["," F I=1:1 Q:$P(IBCICPT(IBCILSEG,0),",",I)']""  D
 ..S IBCICPT(IBCILSEG,I)=$P(IBCICPT(IBCILSEG,0),",",I)
 .E  S IBCICPT(IBCILSEG,1)=IBCICPT(IBCILSEG,0)
 .S (CT,I)=0 F  S I=$O(IBCICPT(IBCILSEG,I)) Q:'I  D
 ..S X=IBCICPT(IBCILSEG,I) D CCK^IBCIUT4(),TCK^IBCIUT4()
 ..S ^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,54,I)=IBCICPT(IBCILSEG,I)
 ..S CT=CT+1,^TMP("IBCIMSG",$J,IBIFN,IBCICLNP,IBCILSEG,54,0)=CT_U
Q Q