- MHV7B1K ;KUM - HL7 message builder RTB^K13 DSS Units ; 9/9/14 3:06pm
- ;;1.0;My HealtheVet;**11**;Aug 23, 2005;Build 61
- ;;Per VHA Directive 2004-038, this routine should not be modified.
- ;
- Q
- ;
- RDF(MSGROOT,CNT,LEN,HL) ; Build RDF segment for DSS Units data
- ;
- ; Input:
- ; MSGROOT - Root of array holding the message
- ; CNT - Current message line counter
- ; LEN - Current message length
- ; HL - HL7 package array variable
- ;
- ; Output:
- ; - Populated message array
- ; - Updated LEN and CNT
- ;
- N RDF
- S RDF(0)="RDF"
- S RDF(1)=6
- S RDF(2,1,1)="Location IEN",RDF(2,1,2)="NM",RDF(2,1,3)=10
- S RDF(2,2,1)="Location Name",RDF(2,2,2)="NM",RDF(2,2,3)=20
- S RDF(2,3,1)="DSSUNIT IEN",RDF(2,3,2)="NM",RDF(2,3,3)=10
- S RDF(2,4,1)="DSSUNIT Name",RDF(2,4,2)="ST",RDF(2,4,3)=50
- S RDF(2,5,1)="Inactive Flag",RDF(2,5,2)="ST",RDF(2,5,3)=1
- S RDF(2,6,1)="Send To PCE Flag",RDF(2,6,2)="ST",RDF(2,6,3)=1
- ;
- S CNT=CNT+1
- S @MSGROOT@(CNT)=$$BLDSEG^MHV7U(.RDF,.HL)
- S LEN=LEN+$L(@MSGROOT@(CNT))
- Q
- ;
- RDT(MSGROOT,DATAROOT,CNT,LEN,HL) ; Build RDT segments for DSSUnits 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,RDT
- D LOG^MHVUL2("MHV7B1K","BEGIN RDT","S","TRACE")
- F I=1:1 Q:'$D(@DATAROOT@(I)) D
- . S APP=@DATAROOT@(I)
- . S RDT(0)="RDT"
- . S RDT(1)=$P(APP,"^") ;Location IEN
- . S RDT(2)=$$ESCAPE^MHV7U($P(APP,"^",2),.HL) ;Location Name
- . S RDT(3)=$$ESCAPE^MHV7U($P(APP,"^",3),.HL) ;DSS Unit IEN
- . S RDT(4)=$$ESCAPE^MHV7U($P(APP,"^",4),.HL) ;DSS Unit Name
- . S RDT(5)=$$ESCAPE^MHV7U($P(APP,"^",5),.HL) ;Inactive Flag
- . S RDT(6)=$$ESCAPE^MHV7U($P(APP,"^",6),.HL) ;Send to PCE Flag
- . S CNT=CNT+1
- . S @MSGROOT@(CNT)=$$BLDSEG^MHV7U(.RDT,.HL)
- . S LEN=LEN+$L(@MSGROOT@(CNT))
- . Q
- D LOG^MHVUL2("MHV7B1K","END RDT","S","TRACE")
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMHV7B1K 2364 printed Feb 18, 2025@23:41:51 Page 2
- MHV7B1K ;KUM - HL7 message builder RTB^K13 DSS Units ; 9/9/14 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 ;
- RDF(MSGROOT,CNT,LEN,HL) ; Build RDF segment for DSS Units data
- +1 ;
- +2 ; Input:
- +3 ; MSGROOT - Root of array holding the message
- +4 ; CNT - Current message line counter
- +5 ; LEN - Current message length
- +6 ; HL - HL7 package array variable
- +7 ;
- +8 ; Output:
- +9 ; - Populated message array
- +10 ; - Updated LEN and CNT
- +11 ;
- +12 NEW RDF
- +13 SET RDF(0)="RDF"
- +14 SET RDF(1)=6
- +15 SET RDF(2,1,1)="Location IEN"
- SET RDF(2,1,2)="NM"
- SET RDF(2,1,3)=10
- +16 SET RDF(2,2,1)="Location Name"
- SET RDF(2,2,2)="NM"
- SET RDF(2,2,3)=20
- +17 SET RDF(2,3,1)="DSSUNIT IEN"
- SET RDF(2,3,2)="NM"
- SET RDF(2,3,3)=10
- +18 SET RDF(2,4,1)="DSSUNIT Name"
- SET RDF(2,4,2)="ST"
- SET RDF(2,4,3)=50
- +19 SET RDF(2,5,1)="Inactive Flag"
- SET RDF(2,5,2)="ST"
- SET RDF(2,5,3)=1
- +20 SET RDF(2,6,1)="Send To PCE Flag"
- SET RDF(2,6,2)="ST"
- SET RDF(2,6,3)=1
- +21 ;
- +22 SET CNT=CNT+1
- +23 SET @MSGROOT@(CNT)=$$BLDSEG^MHV7U(.RDF,.HL)
- +24 SET LEN=LEN+$LENGTH(@MSGROOT@(CNT))
- +25 QUIT
- +26 ;
- RDT(MSGROOT,DATAROOT,CNT,LEN,HL) ; Build RDT segments for DSSUnits 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,RDT
- +21 DO LOG^MHVUL2("MHV7B1K","BEGIN RDT","S","TRACE")
- +22 FOR I=1:1
- if '$DATA(@DATAROOT@(I))
- QUIT
- Begin DoDot:1
- +23 SET APP=@DATAROOT@(I)
- +24 SET RDT(0)="RDT"
- +25 ;Location IEN
- SET RDT(1)=$PIECE(APP,"^")
- +26 ;Location Name
- SET RDT(2)=$$ESCAPE^MHV7U($PIECE(APP,"^",2),.HL)
- +27 ;DSS Unit IEN
- SET RDT(3)=$$ESCAPE^MHV7U($PIECE(APP,"^",3),.HL)
- +28 ;DSS Unit Name
- SET RDT(4)=$$ESCAPE^MHV7U($PIECE(APP,"^",4),.HL)
- +29 ;Inactive Flag
- SET RDT(5)=$$ESCAPE^MHV7U($PIECE(APP,"^",5),.HL)
- +30 ;Send to PCE Flag
- SET RDT(6)=$$ESCAPE^MHV7U($PIECE(APP,"^",6),.HL)
- +31 SET CNT=CNT+1
- +32 SET @MSGROOT@(CNT)=$$BLDSEG^MHV7U(.RDT,.HL)
- +33 SET LEN=LEN+$LENGTH(@MSGROOT@(CNT))
- +34 QUIT
- End DoDot:1
- +35 DO LOG^MHVUL2("MHV7B1K","END RDT","S","TRACE")
- +36 QUIT
- +37 ;