FBFHLS1 ;OIFO/SAB-BUILD HL7 MESSAGE SEGMENTS (CONTINUED) ;9/9/2003
;;3.5;FEE BASIS;**61**;JULY 18, 2003
;;Per VHA Directive 10-93-142, this routine should not be modified.
Q
;
CHKREQ ; Check for required fields
; input
; FBAAIN - invoice number (or 0 if number not known)
; FBTTYP - transaction type (C,L, or X)
; FBD( array of invoice data - see FBFHLS for more info
; output
; if problems found
; ^TMP($J,"FBE",invoice number,seq number)=error text
;
; CLX transaction type
; CLX station number
; CLX FPPS claim
; CL invoice date
; X cancellation date
; CL FPPS line
;
N FBI
;
; check for required claim level data
I "^C^L^X^"'[(U_$P($G(FBD(0,"INV")),U,2)_U) D POST^FBFHLU(FBAAIN,"E","INVALID TRANSACTION TYPE")
I $P($G(FBD(0,"INV")),U)="" D POST^FBFHLU(FBAAIN,"E","MISSING INVOICE NUMBER")
I $P($G(FBD(0,"FPPS")),U)="" D POST^FBFHLU(FBAAIN,"E","MISSING FPPS CLAIM ID")
I "^C^L^"[(U_FBTTYP_U),$P($G(FBD(0,"DT")),U)="" D POST^FBFHLU(FBAAIN,"E","MISSING INVOICE DATE")
I "^X^"[(U_FBTTYP_U),$P($G(FBD(0,"CAN")),U)="" D POST^FBFHLU(FBAAIN,"E","MISSING CANCELLATION DATE")
;
; check for required line level data
I "^C^L^"[(U_FBTTYP_U) D
. S FBI=0 F S FBI=$O(FBD(FBI)) Q:'FBI D
. . I $P($G(FBD(FBI,"FPPS")),U)="" D POST^FBFHLU(FBAAIN,"E","MISSING FPPS LINE ITEM")
. . I $P($G(FBD(FBI,"AMT")),U,2)>0,$P($G(FBD(FBI,"CK")),U)="" D POST^FBFHLU(FBAAIN,"E","MISSING CHECK NUMBER")
;
Q
;
;FBFHLS1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBFHLS1 1484 printed Nov 22, 2024@17:08:33 Page 2
FBFHLS1 ;OIFO/SAB-BUILD HL7 MESSAGE SEGMENTS (CONTINUED) ;9/9/2003
+1 ;;3.5;FEE BASIS;**61**;JULY 18, 2003
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 QUIT
+4 ;
CHKREQ ; Check for required fields
+1 ; input
+2 ; FBAAIN - invoice number (or 0 if number not known)
+3 ; FBTTYP - transaction type (C,L, or X)
+4 ; FBD( array of invoice data - see FBFHLS for more info
+5 ; output
+6 ; if problems found
+7 ; ^TMP($J,"FBE",invoice number,seq number)=error text
+8 ;
+9 ; CLX transaction type
+10 ; CLX station number
+11 ; CLX FPPS claim
+12 ; CL invoice date
+13 ; X cancellation date
+14 ; CL FPPS line
+15 ;
+16 NEW FBI
+17 ;
+18 ; check for required claim level data
+19 IF "^C^L^X^"'[(U_$PIECE($GET(FBD(0,"INV")),U,2)_U)
DO POST^FBFHLU(FBAAIN,"E","INVALID TRANSACTION TYPE")
+20 IF $PIECE($GET(FBD(0,"INV")),U)=""
DO POST^FBFHLU(FBAAIN,"E","MISSING INVOICE NUMBER")
+21 IF $PIECE($GET(FBD(0,"FPPS")),U)=""
DO POST^FBFHLU(FBAAIN,"E","MISSING FPPS CLAIM ID")
+22 IF "^C^L^"[(U_FBTTYP_U)
IF $PIECE($GET(FBD(0,"DT")),U)=""
DO POST^FBFHLU(FBAAIN,"E","MISSING INVOICE DATE")
+23 IF "^X^"[(U_FBTTYP_U)
IF $PIECE($GET(FBD(0,"CAN")),U)=""
DO POST^FBFHLU(FBAAIN,"E","MISSING CANCELLATION DATE")
+24 ;
+25 ; check for required line level data
+26 IF "^C^L^"[(U_FBTTYP_U)
Begin DoDot:1
+27 SET FBI=0
FOR
SET FBI=$ORDER(FBD(FBI))
if 'FBI
QUIT
Begin DoDot:2
+28 IF $PIECE($GET(FBD(FBI,"FPPS")),U)=""
DO POST^FBFHLU(FBAAIN,"E","MISSING FPPS LINE ITEM")
+29 IF $PIECE($GET(FBD(FBI,"AMT")),U,2)>0
IF $PIECE($GET(FBD(FBI,"CK")),U)=""
DO POST^FBFHLU(FBAAIN,"E","MISSING CHECK NUMBER")
End DoDot:2
End DoDot:1
+30 ;
+31 QUIT
+32 ;
+33 ;FBFHLS1