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

HLOAPI6.m

Go to the documentation of this file.
  1. HLOAPI6 ;OIFO-OAK/RBN - VDEF HLO User interface API ;10/02/2008
  1. ;;1.6;HEALTH LEVEL SEVEN;**139**;Oct 13, 1995;Build 11
  1. ;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. ;
  1. ; No direct calls - must use $$VDEFPCK^HLOAPI5
  1. ;
  1. Q
  1. ;
  1. VDEFPCK(LINK,APP,TYPE,EVENT) ;; VDEF PARAMETER CHECK function
  1. ;;
  1. ;; REQUIREMENT #4 HL*1.6*139
  1. ;;
  1. ;;
  1. ;; Description:
  1. ;; This API is provided to allow VDEF to verify that HLO is installed,
  1. ;; running and has all the required parameters for a specific HL7
  1. ;; message type and HL7 event type. These parameters must be defined
  1. ;; prior to use by VDEF users before VDEF can use HLO.
  1. ;;
  1. ;; Inputs :
  1. ;; The input parameters are all required if used.
  1. ;; 1 LINK : Name of HL7 logical link.
  1. ;; 2 APP : Name of HLO application.
  1. ;; 3 TYPE : HL7 Message Type.
  1. ;; 4 EVENT: HL7 Event type.
  1. ;;
  1. ;; Outputs: Returns
  1. ;; With input parameters:
  1. ;; 1 VDEF Event 'xxxxx' parameters exists HLO Engine.
  1. ;; 0 HLO running but parameters for VDEF Event 'xxxx'don't exist.
  1. ;; -1 HLO installed but not running on target system.
  1. ;; -2 HLO not installed on target system.
  1. ;;
  1. ;; If input parameters are null:
  1. ;; 1 HLO installed and running.
  1. ;; -1 HLO installed but not running on target system.
  1. ;; -2 HLO not installed on target system.
  1. ;;
  1. ;; Variables used:
  1. ;; .
  1. ;; PARM1 - IEN of link in HL&7 Logical Link file (#870)
  1. ;; PARM2 - IEN of application in HLO APPLICATION registry file (#779.2)
  1. ;; PARM3 - IEN of message type in MESSAGE TYPE ACTION subfile (#779.21)
  1. ;; RESULT - Return value.
  1. ;;
  1. ;
  1. N RESULT,PARM1,PARM2,PARM3
  1. S RESULT=-2
  1. ; Is HLO installed?
  1. Q:$D(^HLD(779.1))=0 RESULT
  1. ;
  1. ; Is HLO running?
  1. S RESULT=-1
  1. Q:$P($G(^HLD(779.1,1,0)),"^",9)=0 RESULT
  1. ;
  1. ; null parameters, so exit with a 1
  1. S RESULT=1
  1. Q:'$G(LINK)&'$G(APP)&'$G(TYPE)&'$G(EVENT) RESULT
  1. ;
  1. ; Are the link, app and event setup?
  1. S RESULT=0
  1. S (PARM1,PARM2,PARM3)=""
  1. S PARM1=$O(^HLCS(870,"B",LINK,PARM1))
  1. S PARM2=$O(^HLD(779.2,"B",APP,PARM2))
  1. I (PARM1&PARM2) D
  1. . S PARM3=$O(^HLD(779.2,PARM2,1,"B",TYPE,PARM3))
  1. . ; Yes, so return a 1
  1. . I PARM3 D
  1. . . S:$P(^HLD(779.2,PARM2,1,PARM3,0),"^",2)=EVENT RESULT=1
  1. Q RESULT