MHV7B0 ;WAS/GPM - HL7 MESSAGE BUILDER FOR MFN^Z01 ; 1/21/08 5:18pm
;;1.0;My HealtheVet;**2**;Aug 23, 2005;Build 22
;;Per VHA Directive 2004-038, this routine should not be modified.
;
MFNZ01(MSGROOT,ADM,ERR,DATAROOT,LEN,HL) ;Build MFN^Z01
;
; Input:
; MSGROOT - (required) Global root of message
; ADM - (required) Array of administrative data
; ERR - (Not used) For compatibility with MHV7T
; DATAROOT - (Not used) For compatibility with MHV7T
; HL - (required) Array of HL package variables
;
; Output:
; MFN^Z01 message in MSGROOT
; MSH,MFI,MFE,ZHV
; LEN - Length of formatted message
;
N CNT
D LOG^MHVUL2("MFN-Z01 BUILDER","BEGIN","S","TRACE")
K @MSGROOT
S CNT=1,@MSGROOT@(CNT)=$$MFI(.HL),LEN=$L(@MSGROOT@(CNT))
S CNT=CNT+1,@MSGROOT@(CNT)=$$MFE(.ADM,.HL),LEN=LEN+$L(@MSGROOT@(CNT))
S CNT=CNT+1,@MSGROOT@(CNT)=$$ZHV(.ADM,.HL),LEN=LEN+$L(@MSGROOT@(CNT))
D LOG^MHVUL2("MFN-Z01 BUILDER","END","S","TRACE")
Q
;
MFI(HL) ;build MFI segment
N MFI
S MFI(0)="MFI"
S MFI(1,1,1)="MHV"
S MFI(3)="UPD"
S MFI(6)="NE"
Q $$BLDSEG^MHV7U(.MFI,.HL)
;
MFE(ADM,HL) ;build MFE segment
N MFE
S MFE(0)="MFE"
S MFE(1)="MUP"
S MFE(4)=$G(ADM("SITE NUMBER"))
S MFE(5)="CE"
Q $$BLDSEG^MHV7U(.MFE,.HL)
;
ZHV(ADM,HL) ;build ZHV segment
N ZHV
S ZHV(0)="ZHV"
S ZHV(1,1,1)=$G(ADM("SITE NUMBER"))
S ZHV(1,1,2)=$$ESCAPE^MHV7U($G(ADM("SITE NAME")),.HL)
S ZHV(2)=$G(ADM("DOMAIN"))
S ZHV(3)=$G(ADM("IP ADDRESS"))
S ZHV(4)=$G(ADM("HL7 LISTENER PORT"))
S ZHV(5)=$G(ADM("RPC BROKER PORT"))
S ZHV(6,1,1)=$G(ADM("VERSION"))
S ZHV(7)=$$ESCAPE^MHV7U($G(ADM("PATCH NUMBER")),.HL)
S ZHV(8)=$G(ADM("SYSTEM TYPE"))
Q $$BLDSEG^MHV7U(.ZHV,.HL)
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMHV7B0 1751 printed Nov 22, 2024@17:25:40 Page 2
MHV7B0 ;WAS/GPM - HL7 MESSAGE BUILDER FOR MFN^Z01 ; 1/21/08 5:18pm
+1 ;;1.0;My HealtheVet;**2**;Aug 23, 2005;Build 22
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ;
MFNZ01(MSGROOT,ADM,ERR,DATAROOT,LEN,HL) ;Build MFN^Z01
+1 ;
+2 ; Input:
+3 ; MSGROOT - (required) Global root of message
+4 ; ADM - (required) Array of administrative data
+5 ; ERR - (Not used) For compatibility with MHV7T
+6 ; DATAROOT - (Not used) For compatibility with MHV7T
+7 ; HL - (required) Array of HL package variables
+8 ;
+9 ; Output:
+10 ; MFN^Z01 message in MSGROOT
+11 ; MSH,MFI,MFE,ZHV
+12 ; LEN - Length of formatted message
+13 ;
+14 NEW CNT
+15 DO LOG^MHVUL2("MFN-Z01 BUILDER","BEGIN","S","TRACE")
+16 KILL @MSGROOT
+17 SET CNT=1
SET @MSGROOT@(CNT)=$$MFI(.HL)
SET LEN=$LENGTH(@MSGROOT@(CNT))
+18 SET CNT=CNT+1
SET @MSGROOT@(CNT)=$$MFE(.ADM,.HL)
SET LEN=LEN+$LENGTH(@MSGROOT@(CNT))
+19 SET CNT=CNT+1
SET @MSGROOT@(CNT)=$$ZHV(.ADM,.HL)
SET LEN=LEN+$LENGTH(@MSGROOT@(CNT))
+20 DO LOG^MHVUL2("MFN-Z01 BUILDER","END","S","TRACE")
+21 QUIT
+22 ;
MFI(HL) ;build MFI segment
+1 NEW MFI
+2 SET MFI(0)="MFI"
+3 SET MFI(1,1,1)="MHV"
+4 SET MFI(3)="UPD"
+5 SET MFI(6)="NE"
+6 QUIT $$BLDSEG^MHV7U(.MFI,.HL)
+7 ;
MFE(ADM,HL) ;build MFE segment
+1 NEW MFE
+2 SET MFE(0)="MFE"
+3 SET MFE(1)="MUP"
+4 SET MFE(4)=$GET(ADM("SITE NUMBER"))
+5 SET MFE(5)="CE"
+6 QUIT $$BLDSEG^MHV7U(.MFE,.HL)
+7 ;
ZHV(ADM,HL) ;build ZHV segment
+1 NEW ZHV
+2 SET ZHV(0)="ZHV"
+3 SET ZHV(1,1,1)=$GET(ADM("SITE NUMBER"))
+4 SET ZHV(1,1,2)=$$ESCAPE^MHV7U($GET(ADM("SITE NAME")),.HL)
+5 SET ZHV(2)=$GET(ADM("DOMAIN"))
+6 SET ZHV(3)=$GET(ADM("IP ADDRESS"))
+7 SET ZHV(4)=$GET(ADM("HL7 LISTENER PORT"))
+8 SET ZHV(5)=$GET(ADM("RPC BROKER PORT"))
+9 SET ZHV(6,1,1)=$GET(ADM("VERSION"))
+10 SET ZHV(7)=$$ESCAPE^MHV7U($GET(ADM("PATCH NUMBER")),.HL)
+11 SET ZHV(8)=$GET(ADM("SYSTEM TYPE"))
+12 QUIT $$BLDSEG^MHV7U(.ZHV,.HL)
+13 ;