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

IBCEST1.m

Go to the documentation of this file.
  1. IBCEST1 ;ALB/ESG - IB 837 EDI Status Message Processing Cont ;18-JUL-2005
  1. ;;2.0;INTEGRATED BILLING;**320,397,552**;21-MAR-94;Build 1
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. Q
  1. ;
  1. CHKSUM(IBARRAY) ; Incoming 277STAT status message checksum calculation
  1. ; This function calculates the checksum of the raw 277stat data from
  1. ; the data in array IBARRAY. This is done to prevent duplicates.
  1. ; Input parameter IBARRAY is the array reference where the data exists
  1. ; at @IBARRAY@(n,0) where n is a sequential #
  1. ; For file 364.2, IBARRAY = "^IBA(364.2,IBTDA,2)" where IBTDA = the ien
  1. ; of the entry in file 364.2 being evaluated
  1. ;
  1. NEW Y,LN,DATA,IBREC,POS,STSFLG
  1. S Y=0,STSFLG=0
  1. S LN=0
  1. F S LN=$O(@IBARRAY@(LN)) Q:'LN D
  1. . S DATA=$$EXT($G(@IBARRAY@(LN,0))) Q:DATA=""
  1. . S IBREC=$P(DATA,U,1)
  1. . I IBREC="277STAT" S STSFLG=1 Q ; set the STS flag
  1. . ;IB*552 - ticket 1120403 only evaluate 2 digit numbers <MAXNUMBER> error
  1. . I $L(IBREC)>2 Q
  1. . I IBREC<1 Q ; rec# too low
  1. . I IBREC'<99 Q ; rec# too high
  1. . F POS=1:1:$L(DATA) S Y=Y+($A(DATA,POS)*POS)
  1. . Q
  1. ;
  1. I 'STSFLG S Y=0 ; if this array is not a 277stat message
  1. Q Y
  1. ;
  1. EXT(DATA) ; Extracts from the text in DATA if the text contains
  1. ; "##RAW DATA: "
  1. Q $S(DATA["##RAW DATA: ":$P(DATA,"##RAW DATA: ",2,99),1:DATA)
  1. ;
  1. SCODE(Z0) ; status code for message
  1. N IBFD,IBI,IBRD S IBFD=0
  1. F IBI=1:1 S IBRD=$P($T(CODE+IBI),";;",2,999) Q:IBRD=""!IBFD D
  1. . I IBRD[Z0 S IBFD=1
  1. Q IBFD
  1. ;
  1. CODE ; *397
  1. ;;A3^AC^A7^A8^AA^2P^10^11
  1. ;;19^20^21^30^40^221^960^1AE^1AF^1AG^1AI^1AJ^1AK^1AL^1AS^1BS^1BV^1BY
  1. ;;2B^2D^2H^2M^2U^3A^3C^3E^3F^3G^3I^3K^3L^3N^3P^3S
  1. ;;4B^4C^4D^4E^4H^4I^4J^4P^4S^4T^4U^4X^4Y^7A^7D^7I^7U^7V
  1. ;;A0^A9^ACCEPT^ACCEPTED^AE^AP^APPROVE^C01^CI^CP^CTRL!99001^INQUIRY
  1. ;;OA7^OAH^OAI^OAK^OAT^OAV^OAY^OAZ^OB9^OBX^OCU^PG^PN5
  1. ;;TE^W!00000117^Z3^ZAI^ZAN
  1. ;