- MHV7B1P ;KUM - HL7 message builder ACK^P03 WLC Filer ; 1/11/15 3:06pm
- ;;1.0;My HealtheVet;**11**;Aug 23, 2005;Build 61
- ;;Per VHA Directive 2004-038, this routine should not be modified.
- ;
- Q
- ;
- ERR(MSGROOT,DATAROOT,CNT,LEN,HL) ; Build ERR segment for Workload Credit Filer Results data
- ;
- ; Walks data in DATAROOT to populate MSGROOT with RDT segments
- ; sequentially numbered starting at CNT
- ;
- ; Integration Agreements:
- ; 10103 : FMTHL7^XLFDT
- ;
- ; Input:
- ; MSGROOT - Root of array holding the message
- ; DATAROOT - Root of array to hold extract data
- ; CNT - Current message line counter
- ; LEN - Current message length
- ; HL - HL7 package array variable
- ;
- ; Output:
- ; - Populated message array
- ; - Updated LEN and CNT
- ;
- ; POPULATE SEQUENCE NUMBER
- N I,APP,ERR
- D LOG^MHVUL2("MHV7B1P","BEGIN ERR","S","TRACE")
- F I=1:1 Q:'$D(@DATAROOT@(I)) D
- . S APP=@DATAROOT@(I)
- . S ERR(0)="ERR"
- . S ERR(4,1,4)=$$ESCAPE^MHV7U($P(APP,"^",5),.HL) ;Visit IEN
- . S ERR(4,1,1)=$$ESCAPE^MHV7U($P(APP,"^",1),.HL) ;Success/Failure Flag
- . S ERR(4,1,2)=$$ESCAPE^MHV7U($P(APP,"^",2),.HL) ;Success/Failure Message
- . S ERR(4,1,3)=$$ESCAPE^MHV7U($P(APP,"^",4),.HL) ;Workload IEN
- . S CNT=CNT+1
- . S @MSGROOT@(CNT)=$$BLDSEG^MHV7U(.ERR,.HL)
- . S LEN=LEN+$L(@MSGROOT@(CNT))
- . Q
- D LOG^MHVUL2("MHV7B1P","END ERR","S","TRACE")
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMHV7B1P 1418 printed Jan 18, 2025@03:16:47 Page 2
- MHV7B1P ;KUM - HL7 message builder ACK^P03 WLC Filer ; 1/11/15 3:06pm
- +1 ;;1.0;My HealtheVet;**11**;Aug 23, 2005;Build 61
- +2 ;;Per VHA Directive 2004-038, this routine should not be modified.
- +3 ;
- +4 QUIT
- +5 ;
- ERR(MSGROOT,DATAROOT,CNT,LEN,HL) ; Build ERR segment for Workload Credit Filer Results data
- +1 ;
- +2 ; Walks data in DATAROOT to populate MSGROOT with RDT segments
- +3 ; sequentially numbered starting at CNT
- +4 ;
- +5 ; Integration Agreements:
- +6 ; 10103 : FMTHL7^XLFDT
- +7 ;
- +8 ; Input:
- +9 ; MSGROOT - Root of array holding the message
- +10 ; DATAROOT - Root of array to hold extract data
- +11 ; CNT - Current message line counter
- +12 ; LEN - Current message length
- +13 ; HL - HL7 package array variable
- +14 ;
- +15 ; Output:
- +16 ; - Populated message array
- +17 ; - Updated LEN and CNT
- +18 ;
- +19 ; POPULATE SEQUENCE NUMBER
- +20 NEW I,APP,ERR
- +21 DO LOG^MHVUL2("MHV7B1P","BEGIN ERR","S","TRACE")
- +22 FOR I=1:1
- if '$DATA(@DATAROOT@(I))
- QUIT
- Begin DoDot:1
- +23 SET APP=@DATAROOT@(I)
- +24 SET ERR(0)="ERR"
- +25 ;Visit IEN
- SET ERR(4,1,4)=$$ESCAPE^MHV7U($PIECE(APP,"^",5),.HL)
- +26 ;Success/Failure Flag
- SET ERR(4,1,1)=$$ESCAPE^MHV7U($PIECE(APP,"^",1),.HL)
- +27 ;Success/Failure Message
- SET ERR(4,1,2)=$$ESCAPE^MHV7U($PIECE(APP,"^",2),.HL)
- +28 ;Workload IEN
- SET ERR(4,1,3)=$$ESCAPE^MHV7U($PIECE(APP,"^",4),.HL)
- +29 SET CNT=CNT+1
- +30 SET @MSGROOT@(CNT)=$$BLDSEG^MHV7U(.ERR,.HL)
- +31 SET LEN=LEN+$LENGTH(@MSGROOT@(CNT))
- +32 QUIT
- End DoDot:1
- +33 DO LOG^MHVUL2("MHV7B1P","END ERR","S","TRACE")
- +34 QUIT
- +35 ;