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

IBTRHLI.m

Go to the documentation of this file.
  1. IBTRHLI ;ALB/JWS - Receive and store 278 Response message ;05-JUN-2014
  1. ;;2.0;INTEGRATED BILLING;**517**;21-MAR-94;Build 240
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. Q
  1. ;
  1. EN ; This is the entry point for receiving a 278 Response Message
  1. ; Starting point - put message into a TMP global
  1. N EVENT,HLFS,IBPRTCL,SEGMT,TAG,CNT,SEGCNT,HLNODE
  1. ; EXPECTS HLMTIEN=entry in file 772 ^HL(772) HL7 MESSAGE TEXT
  1. ; ALSO HLNEXT = "D HLNEXT^HLCSUTL"
  1. ; ALSO HLQUIT = "" OR 0
  1. ; ALSO HLNODE is = data string of HL7 segment, set in HLNEXT^HLCSUTL
  1. K ^TMP($J,"IBTRHLI")
  1. F SEGCNT=1:1 X HLNEXT Q:'HLQUIT D
  1. . S CNT=0
  1. . S ^TMP($J,"IBTRHLI",SEGCNT,CNT)=HLNODE
  1. . I SEGCNT=1 S SEGMT=HLNODE
  1. . F S CNT=$O(HLNODE(CNT)) Q:'CNT D
  1. .. S ^TMP($J,"IBTRHLI",SEGCNT,CNT)=HLNODE(CNT)
  1. .. I SEGCNT=1 S SEGMT=$G(SEGMT)_HLNODE(CNT)
  1. . Q
  1. S HLFS=$E(SEGMT,4)
  1. S EVENT=$P(SEGMT,HLFS,9),IBPRTCL=""
  1. ; Determine which protocol to use
  1. ; The event type determines protocol
  1. I EVENT="RPA^I08" S TAG="RSP",IBPRTCL="IBTR HCSR IN"
  1. I IBPRTCL="" G XIT
  1. ; Initialize the HL7 variables
  1. D INIT^HLFNC2(IBPRTCL,.HL)
  1. ; Call the event tag
  1. D @TAG
  1. ;
  1. XIT ;
  1. K ^TMP($J,"IBTRHLI"),HL,HLNEXT,HLNODE,HLQUIT
  1. Q
  1. ;
  1. RSP ; Response Processing
  1. D EN^IBTRHLI1
  1. K ^TMP($J,"IBTRHLI"),HL,HLNEXT,HLNODE,HLQUIT
  1. Q
  1. ;
  1. TEST ;
  1. S $ET="D ^%ZTER"
  1. R !,"HLMTIEN= ",HLMTIEN:120 Q:HLMTIEN=""
  1. S HLQUIT=0
  1. S HLNEXT="D HLNEXT^HLCSUTL"
  1. G EN