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

ABME3HA0.m

Go to the documentation of this file.
ABME3HA0 ; IHS/ASDST/SDR - HCFA-1500 NSF 3.01  RECORD HA0 (Claim Root Segment) ;     
 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
 ;
 ;
START ;START HERE
 K ABMREC(64)
 D SET^ABMERUTL
 D LOOP
 K ABM,ABME,ABMRV
 Q
LOOP ;LOOP HERE
 F I=10:10:50 D
 .D @I
 .I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),64,I)) D @(^(I))
 .D ADD
 S ABMEF("LINE")=ABMREC(64)
 D WRITE^ABMEF20
 Q
ADD ;ADD TO RECORD
 I '$G(ABMP("NOFMT")) S ABMREC(64)=$G(ABMREC(64))_ABMR(64,I)
 Q
10 ;1-3 Record type
 S ABMR(64,10)="HA0"
 Q
20 ;4-5 Sequence 
 S ABMR(64,20)=1
 S ABMR(64,20)=$$FMT^ABMERUTL(ABMR(64,20),"2NR")
 Q
30 ;6-22 Patient Control Number
 S ABMR(64,30)=ABMP("PCN")
 S ABMR(64,30)=$$FMT^ABMERUTL(ABMR(64,30),17)
 Q
40 ;23-39 Line Item Control Number
 S ABMR(64,40)=""
 S ABMR(64,40)=$$FMT^ABMERUTL(ABMR(64,40),17)
 Q
50 ;40-320 Extra Narrative Data
 S ABMR(64,50)=$P($G(^ABMDBILL(DUZ(2),ABMP("BDFN"),10)),U)
 S ABMR(64,50)=$$FMT^ABMERUTL(ABMR(64,50),281)
 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(64,ABMX)
 I $D(ABMP("FMT")) S ABMP("FMT")=1
 K ABMR(64,ABMX),ABME,ABMX,ABMY,ABMZ,ABM
 Q Y