VAFCMSG5 ;ALB/JRP - MESSAGE BUILDER UTILITIES;12-SEP-1996
;;5.3;Registration;**91**;Jun 06, 1996
;
GETSRVR(EVNTTYPE) ;Get pointer to HL7 Server Protocol for given event type
;
;Input : EVNTTYPE - Event type to build list for (Defaults to A08)
; Currently supported events:
; A04, A08, A28
;Output : SRVRPTR - Pointer to HL7 Server Protocol (value for HLEID)
;Notes : Zero (0) will be returned if the event does not have an
; associated HL7 Server Protocol or the HL7 Server Protocol
; can not be found in the PROTOCOL file (#101)
;
;Check input
S EVNTTYPE=$G(EVNTTYPE)
S:(EVNTTYPE="") EVNTTYPE="A08"
;Declare variables
N SRVRNAME,X,OK
;Check for supported event
S OK=0
F X="A04","A08","A28" I X=EVNTTYPE S OK=1 Q
Q:('OK) 0
;Determine name of HL7 Server Protocol
S SRVRNAME="VAFC ADT-"_EVNTTYPE_" SERVER"
;Return pointer to HL7 Server Prototol
Q +$O(^ORD(101,"B",SRVRNAME,0))
;
NOW() ;Function call that returns the current date/time in FileMan format
;
;Input : None
;Output : Current date/time in FileMan format
;
;Declare variables
N %,%H,%I,X,Y
;Get current date/time
D NOW^%DTC
;Return current date/time
Q %
VAFCMSG5 ;ALB/JRP - MESSAGE BUILDER UTILITIES;12-SEP-1996
+1 ;;5.3;Registration;**91**;Jun 06, 1996
+2 ;
GETSRVR(EVNTTYPE) ;Get pointer to HL7 Server Protocol for given event type
+1 ;
+2 ;Input : EVNTTYPE - Event type to build list for (Defaults to A08)
+3 ; Currently supported events:
+4 ; A04, A08, A28
+5 ;Output : SRVRPTR - Pointer to HL7 Server Protocol (value for HLEID)
+6 ;Notes : Zero (0) will be returned if the event does not have an
+7 ; associated HL7 Server Protocol or the HL7 Server Protocol
+8 ; can not be found in the PROTOCOL file (#101)
+9 ;
+10 ;Check input
+11 SET EVNTTYPE=$GET(EVNTTYPE)
+12 IF (EVNTTYPE="")
SET EVNTTYPE="A08"
+13 ;Declare variables
+14 NEW SRVRNAME,X,OK
+15 ;Check for supported event
+16 SET OK=0
+17 FOR X="A04","A08","A28"
IF X=EVNTTYPE
SET OK=1
QUIT
+18 IF ('OK)
QUIT 0
+19 ;Determine name of HL7 Server Protocol
+20 SET SRVRNAME="VAFC ADT-"_EVNTTYPE_" SERVER"
+21 ;Return pointer to HL7 Server Prototol
+22 QUIT +$ORDER(^ORD(101,"B",SRVRNAME,0))
+23 ;
NOW() ;Function call that returns the current date/time in FileMan format
+1 ;
+2 ;Input : None
+3 ;Output : Current date/time in FileMan format
+4 ;
+5 ;Declare variables
+6 NEW %,%H,%I,X,Y
+7 ;Get current date/time
+8 DO NOW^%DTC
+9 ;Return current date/time
+10 QUIT %