ABME3GC0 ; IHS/ASDST/SDR - HCFA-1500 NSF 3.01 RECORD GC0 (Claim Root Segment) ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;
;
START ;START HERE
K ABMREC(63)
D SET^ABMERUTL
D LOOP
K ABM,ABME,ABMRV
Q
LOOP ;LOOP HERE
F I=10:10:160 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),63,I)) D @(^(I))
.D ADD
S ABMEF("LINE")=ABMREC(63)
D WRITE^ABMEF20
Q
ADD ;ADD TO RECORD
I '$G(ABMP("NOFMT")) S ABMREC(63)=$G(ABMREC(63))_ABMR(63,I)
Q
10 ;1-3 Record type
S ABMR(63,10)="GC0"
Q
20 ;4-5 Sequence
S ABMR(63,20)=1
S ABMR(63,20)=$$FMT^ABMERUTL(ABMR(63,20),"2NR")
Q
30 ;6-22 Patient Control Number
S ABMR(63,30)=ABMP("PCN")
S ABMR(63,30)=$$FMT^ABMERUTL(ABMR(63,30),17)
Q
40 ;23-39 Reserved
S ABMR(63,40)=""
S ABMR(63,40)=$$FMT^ABMERUTL(ABMR(63,40),17)
Q
50 ;40-47 Initial Treatment Date
S ABMR(63,50)=$P($G(^ABMDBILL(DUZ(2),ABMP("BDFN"),8)),"^",6)
S ABMR(63,50)=$$Y2KD2^ABMDUTL(ABMR(63,50))
S ABMR(63,50)=$$FMT^ABMERUTL(ABMR(63,50),8)
Q
60 ;48-55 Date of Last X-Ray
S ABMR(63,60)=$P($G(^ABMDBILL(DUZ(2),ABMP("BDFN"),9)),"^",13)
S ABMR(63,60)=$$Y2KD2^ABMDUTL(ABMR(63,60))
S ABMR(63,60)=$$FMT^ABMERUTL(ABMR(63,60),8)
Q
70 ;56-62 Number in Series
S ABMR(63,70)=""
S ABMR(63,70)=$$FMT^ABMERUTL(ABMR(63,70),7)
Q
80 ;63-69 Level of Subluxation
S ABMR(63,80)=""
S ABMR(63,80)=$$FMT^ABMERUTL(ABMR(63,80),8)
Q
90 ;70-72 Treatment Month/Years
S ABMR(63,90)=""
S ABMR(63,90)=$$FMT^ABMERUTL(ABMR(63,90),3)
Q
100 ;73-74 No Treatments - Month
S ABMR(63,100)=""
S ABMR(63,100)=$$FMT^ABMERUTL(ABMR(63,100),2)
Q
110 ;75-75 Nature of Condition
S ABMR(63,110)=""
S ABMR(63,110)=$$FMT^ABMERUTL(ABMR(63,110),1)
Q
120 ;76-83 Date of Acute Manifestation
S ABMR(63,120)=""
S ABMR(63,120)=$$FMT^ABMERUTL(ABMR(63,120),8)
Q
130 ;84-84 Complication Indicator
S ABMR(63,130)=""
S ABMR(63,130)=$$FMT^ABMERUTL(ABMR(63,130),1)
Q
140 ;85-244 Symptoms Description
S ABMR(63,140)=""
S ABMR(63,140)=$$FMT^ABMERUTL(ABMR(63,140),160)
Q
150 ;245-245 X-Ray Indicator
S ABMR(63,150)=""
S ABMR(63,150)=$$FMT^ABMERUTL(ABMR(63,150),1)
Q
160 ;246-320 Filler - National
S ABMR(63,160)=""
S ABMR(63,160)=$$FMT^ABMERUTL(ABMR(63,160),75)
Q
EX(ABMX,ABMY,ABMZ) ;EXTRINSIC FUNCTION HERE
;X=data element, Y=bill internal entry number
S ABMP("BDFN")=ABMY D SET^ABMERUTL
I '$G(ABMP("NOFMT")) S ABMP("FMT")=0
D @ABMX
S Y=ABMR(63,ABMX)
I $D(ABMP("FMT")) S ABMP("FMT")=1
K ABMR(63,ABMX),ABME,ABMX,ABMY,ABMZ,ABM
Q Y
ABME3GC0 ; IHS/ASDST/SDR - HCFA-1500 NSF 3.01 RECORD GC0 (Claim Root Segment) ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;
+3 ;
START ;START HERE
+1 KILL ABMREC(63)
+2 DO SET^ABMERUTL
+3 DO LOOP
+4 KILL ABM,ABME,ABMRV
+5 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:160
Begin DoDot:1
+2 DO @I
+3 IF $DATA(^ABMEXLM("AA",+$GET(ABMP("INS")),+$GET(ABMP("EXP")),63,I))
DO @(^(I))
+4 DO ADD
End DoDot:1
+5 SET ABMEF("LINE")=ABMREC(63)
+6 DO WRITE^ABMEF20
+7 QUIT
ADD ;ADD TO RECORD
+1 IF '$GET(ABMP("NOFMT"))
SET ABMREC(63)=$GET(ABMREC(63))_ABMR(63,I)
+2 QUIT
10 ;1-3 Record type
+1 SET ABMR(63,10)="GC0"
+2 QUIT
20 ;4-5 Sequence
+1 SET ABMR(63,20)=1
+2 SET ABMR(63,20)=$$FMT^ABMERUTL(ABMR(63,20),"2NR")
+3 QUIT
30 ;6-22 Patient Control Number
+1 SET ABMR(63,30)=ABMP("PCN")
+2 SET ABMR(63,30)=$$FMT^ABMERUTL(ABMR(63,30),17)
+3 QUIT
40 ;23-39 Reserved
+1 SET ABMR(63,40)=""
+2 SET ABMR(63,40)=$$FMT^ABMERUTL(ABMR(63,40),17)
+3 QUIT
50 ;40-47 Initial Treatment Date
+1 SET ABMR(63,50)=$PIECE($GET(^ABMDBILL(DUZ(2),ABMP("BDFN"),8)),"^",6)
+2 SET ABMR(63,50)=$$Y2KD2^ABMDUTL(ABMR(63,50))
+3 SET ABMR(63,50)=$$FMT^ABMERUTL(ABMR(63,50),8)
+4 QUIT
60 ;48-55 Date of Last X-Ray
+1 SET ABMR(63,60)=$PIECE($GET(^ABMDBILL(DUZ(2),ABMP("BDFN"),9)),"^",13)
+2 SET ABMR(63,60)=$$Y2KD2^ABMDUTL(ABMR(63,60))
+3 SET ABMR(63,60)=$$FMT^ABMERUTL(ABMR(63,60),8)
+4 QUIT
70 ;56-62 Number in Series
+1 SET ABMR(63,70)=""
+2 SET ABMR(63,70)=$$FMT^ABMERUTL(ABMR(63,70),7)
+3 QUIT
80 ;63-69 Level of Subluxation
+1 SET ABMR(63,80)=""
+2 SET ABMR(63,80)=$$FMT^ABMERUTL(ABMR(63,80),8)
+3 QUIT
90 ;70-72 Treatment Month/Years
+1 SET ABMR(63,90)=""
+2 SET ABMR(63,90)=$$FMT^ABMERUTL(ABMR(63,90),3)
+3 QUIT
100 ;73-74 No Treatments - Month
+1 SET ABMR(63,100)=""
+2 SET ABMR(63,100)=$$FMT^ABMERUTL(ABMR(63,100),2)
+3 QUIT
110 ;75-75 Nature of Condition
+1 SET ABMR(63,110)=""
+2 SET ABMR(63,110)=$$FMT^ABMERUTL(ABMR(63,110),1)
+3 QUIT
120 ;76-83 Date of Acute Manifestation
+1 SET ABMR(63,120)=""
+2 SET ABMR(63,120)=$$FMT^ABMERUTL(ABMR(63,120),8)
+3 QUIT
130 ;84-84 Complication Indicator
+1 SET ABMR(63,130)=""
+2 SET ABMR(63,130)=$$FMT^ABMERUTL(ABMR(63,130),1)
+3 QUIT
140 ;85-244 Symptoms Description
+1 SET ABMR(63,140)=""
+2 SET ABMR(63,140)=$$FMT^ABMERUTL(ABMR(63,140),160)
+3 QUIT
150 ;245-245 X-Ray Indicator
+1 SET ABMR(63,150)=""
+2 SET ABMR(63,150)=$$FMT^ABMERUTL(ABMR(63,150),1)
+3 QUIT
160 ;246-320 Filler - National
+1 SET ABMR(63,160)=""
+2 SET ABMR(63,160)=$$FMT^ABMERUTL(ABMR(63,160),75)
+3 QUIT
EX(ABMX,ABMY,ABMZ) ;EXTRINSIC FUNCTION HERE
+1 ;X=data element, Y=bill internal entry number
+2 SET ABMP("BDFN")=ABMY
DO SET^ABMERUTL
+3 IF '$GET(ABMP("NOFMT"))
SET ABMP("FMT")=0
+4 DO @ABMX
+5 SET Y=ABMR(63,ABMX)
+6 IF $DATA(ABMP("FMT"))
SET ABMP("FMT")=1
+7 KILL ABMR(63,ABMX),ABME,ABMX,ABMY,ABMZ,ABM
+8 QUIT Y