Description

The HL7SegmentMergeReceiver merges data from two or more segmented data files, generated from the SegmentDataCreatorReceiver, into HL7 formatted output.

HL7 (Health Level Seven) is a standard for exchanging information between medical applications. The format of the HL7 formatted output is determined by reading a configuration file and associated XML templates.


In This Article


When should this Receiver be used? 

  • Any time you want to generate nested HL7 formatted output.


When should this Receiver not be used? 

  • Any time you want to generate another type of nested output.


Are any additional items required to use this Receiver? 

  • SegmentDataCreatorReceiver- Must be assigned to each Domain, except the Merge Domain.
    • Note: The HL7SegmentMergeReceiver should only be assigned to the Merge Domain that merges the generated segments.

  • Configuration File - Used to determine the XML output format. This is typically named "config.xml" but can be named differently. This file will need to be created manually for this Receiver. 
    • Note: When named differently, the name must also be changed for the configName parameter within the Receiver.

  • Template Files - Referenced within the configuration file to determine the XML output format. These files will also need to be manually created for this Receiver. 


List of Steps to Generate Nested HL7 Format

  1. Set up a Project with Domains, Parent-Child Relationships, and Scenarios.
  2. For each Domain except the Merge Domain, complete the following: 
  3. Create a Merge Domain with just an id Attribute 
    • Note: This may have already been done if Domains were imported.
  4. Add the HL7SegmentMergeReceiver to the Merge Domain and configure it, as discussed in this article. 
  5. Create a Scenario Chain with all Domain Scenarios. Make sure the Merge Scenario is in the last position.
  6. Manually create a Configuration File as discussed in this article. 
  7. Manually create the Template Files that are referenced by the Configuration File.
  8. Download the Scenario Chain to your local computer.
  9. Make sure the Configuration File and Template Files are located in the appropriate location on your local machine. 


Receiver Parameters

The HL7SegmentMergeReceiver requires the following parameters to be defined. Items with an asterisk* are required.

  • outputPath* - Defines the location to store the newly generated HL7 file(s).
  • outputSubDirectory* - Defines the prefix name of subdirectories that are auto-created under the outputPath and then appended with a number.
  • configName* - Defines the name of the configuration file.
  • configPath*- Defines the location where the configuration file is to be stored.
  • configSubDir - Defines the subdirectory under the configPath directory where the configuration file is to be stored.
  • segmentPath* - Defines the path to the Segment directory where all segment subdirectories can be found.
  • segmentSubDirectory* - Defines the subdirectory under the segmentPath where segment files can be found.
  • filesPerOutputSubDir* - Defines the number of files to be generated per output subdirectory.
  • overrideFileName - Defines the fileName, which will override the fileName provided in the configuration file.
  • deleteOutputSubDir - Defines whether to delete the generated or an existing outputSubDir or not during the execution of the Scenario.


Receiver Attribute Property Keys

There are no property keys necessary for this Receiver.


Configuration File

The configuration file defines the following elements of information:

  1. fileNameSegments - contains subelements that define how the file names will be created for each HL7 generated document. 

  2. templateFiles - contains subelements that define the template file to read and an optional segment to read for the merge process.

  3. segments - contains nested segments which define the nesting of the templates that will define the HL7 output.


Example Patient Story

The examples given below will be based on the generation of segmented data for eight Domains. There are eight Domains that represent the following hierarchy in parent-child relationships:

  • HeaderRecordDomain is the Root Domain
  • PatientRecordDomain is a child of the HeaderRecordDomain
  • OrderRecordDomain is a child of the PatientRecordDomain
  • ResultRecordDomain is a child of the OrderRecordDomain
  • CommentRecordDomain is a child of the ResultRecordDomain
  • AddendumRecordDomain is a child of the CommentRecordDomain
  • ReissuedReportRecordDomain is a child of the ResultRecordDomain
  • BatchTrailRecordDomain is a trailer Domain


Each Domain will use a SegmentCreatorReceiver to generate segmented data output with referential integrity with regard to parent-child relationships. The last Domain, Merge, will also use an HL7SegmentMergeReceiver to merge the segmented data generated for each Domain into one or more nested HL7 formatted output files. 


Nine Scenarios will be created, out of which Eight Scenarios will be containing the instruction on how much-segmented data to generate for each Domain, and the last Scenario will merge the segments together to generate the output. 


Lastly, the Scenarios can be chained together so that they can be run with one command instead of eight separate commands.



Example Configuration File

This is an example configuration file and is defined to allow eight segment files to be merged into one or more HL7 formatted nested output files. The format of the segmented data must produce nested output which meets the following rules:

  • There must be three header records generated, and each to its own nested HL7 formatted file.
  • Each header record must have one patient record
  • Each patient record must have one order record
  • Each order record must have three result record
  • Each result record must have three comment record
  • Each comment record must have six addendum record
  • Each result record must have one reissued report record
  • There must be one batch trail record generated for each batch, i.e., to the last HL7 formatted file.


The XML configuration file

<HL7MergeConfig segmentSeparator="\r">
    <fileNameSegments>
        <fileNameSegment segmentType="Constant" value="ASTMPHP-"/>
        <fileNameSegment segmentType="TimeStamp" value="yyyyMMddHH"/>
        <fileNameSegment segmentType="Constant" value="-"/>
        <fileNameSegment segmentType="Counter" value="1"/>
        <fileNameSegment segmentType="Constant" value=".txt"/>
    </fileNameSegments>
    <segments>
        <segment domainName="HeaderRecord" templateFile="HeaderRecordTemplate.xml" segmentFile="HeaderRecordSegment.xml"/>
        <segment domainName="PatientRecord" templateFile="PatientRecordTemplate.xml" segmentFile="PatientRecordSegment.xml"/>
        <segment domainName="OrderRecord" templateFile="OrderRecordTemplate.xml" segmentFile="OrderRecordSegment.xml"/>
        <segment domainName="ResultRecord" templateFile="ResultRecordTemplate.xml" segmentFile="ResultRecordSegment.xml"/>
        <segment domainName="CommentRecord" templateFile="CommentRecordTemplate.xml" segmentFile="CommentRecordSegment.xml"/>
        <segment domainName="AddendumRecord" templateFile="AddendumRecordTemplate.xml" segmentFile="AddendumRecordSegment.xml"/>
        <segment domainName="ReissuedReportRecord" templateFile="ReissuedReportRecordTemplate.xml" segmentFile="ReissuedReportRecordSegment.xml"/>
        <segment domainName="BatchTrailerRecord" templateFile="BatchTrailerRecordTemplate.xml" segmentFile="BatchTrailerRecordSegment.xml"/>
    </segments>
    <segmentHierarchy>
        <segment domainName="HeaderRecord">
            <segment domainName="PatientRecord">
                <segment domainName="OrderRecord">
                    <segment domainName="ResultRecord">
                        <segment domainName="CommentRecord">
                            <segment domainName="AddendumRecord"/>
                        </segment>
                        <segment domainName="ReissuedReportRecord"/>
                    </segment>
                </segment>
            </segment>
        </segment>
        <segment domainName="BatchTrailerRecord"/>
    </segmentHierarchy>
</HL7MergeConfig>


The example configuration file defines the following information.


FileNameSegments

The subelements will produce a file naming convention that looks like the following:

  • ASTMPHP-2020010603-1.xml
  • ASTMPHP-2020010603-2.xml
  • ASTMPHP-2020010603-3.xml


TemplateFiles

The following template files will be loaded and used to create the XML output when merged with segment data.

  • HeaderRecordTemplate.xml
  • PatientRecordTemplate.xml
  • OrderRecordTemplate.xml
  • ResultRecordTemplate.xml
  • CommentRecordTemplate.xml
  • AddendumRecordTemplate.xml
  • ReissuedReportRecordTemplate.xml
  • BatchTrailerRecord.xml


SegmentFiles

The following segment files will be loaded, and their data used in the merge process.

  • HeaderRecordSegment.xml

  • PatientRecordSegment.xml

  • OrderRecordSegment.xml

  • ResultRecordSegment.xml

  • CommentRecordSegment.xml

  • AddendumRecordSegment.xml

  • ReissuedReportRecordSegment.xml

  • BatchTrailerSegment.xml


Segments

The nested segments determine the sequence and structure of the nested XML output.

 

<headerRecord>
    <patientRecord>
        <orderRecord>
            <resultRecord>
                <commentRecord>
                    <addendumRecord>
                 <reissuedReportRecord>
 <batchTrailerRecord>


Template Files

Each template file below represents a block of XML elements used for merging with segment data that, combined together, will create a nested HL7 formatted file.


HeaderRecord Template

This template will be used for data segment merging with <segment name="headerRecord">


<HL7segment name="HeaderRecord">
    <separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
    <composites>
        <composite position="1" fieldName="messageType" length="1"/>
        <composite position="2" fieldName="delimiters" length="5"/>
        <composite position="5">
            <composite position="1" fieldName="originatingLab" length="3"/>
            <composite position="2" fieldName="clientNumber" length="8"/>
            <composite position="3" fieldName="masterClientNumber" length="8"/>
            <composite position="4" fieldName="daardClientFlag" length="1"/>
        </composite>
        <composite position="14" fieldName="messageSentTime" length="12"/>
    </composites>
</HL7segment>


PatientRecord Template

This template will be used for data segment merging with <segment name="patientRecord">


<HL7segment name="PatientRecord">
	<separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
    <composites>
        <composite position="1" fieldName="messageType" length="1" example="P"/>
		<composite position="2" fieldName="patientSequenceNumber" length="5" example="5"/>
		<composite position="3" fieldName="patientId" length="25" example="67598589"/>
		<composite position="4" fieldName="accessionNumber" length="16" example="KP054746P"/>
		<composite position="5" fieldName="socialSecurityNumber" length="9" example="345234588"/>
		<composite position="6">
			<composite position="1" fieldName="lastName" length="75" example="VERMA"/>
			<composite position="2" fieldName="firstName" length="30" example="DEEPTI"/>
			<composite position="3" fieldName="middleName" length="1" example="S"/>
		</composite>
		<composite position="7" fieldName="cancelledAccessionIndicator" length="1" example="X"/>
		<composite position="8">
			<composite position="1" fieldName="patientAge" length="3" example="27"/>
			<composite position="2" fieldName="patientDOB" length="8" example="19900729"/>
		</composite>
		<composite position="9">
			<composite position="1" fieldName="sex" length="1" example="F"/>
			<composite position="2" fieldName="species" length="1" />
		</composite>
		<composite position="10" fieldName="dateOfService" length="12" example="201806202341"/>
		<composite position="14">
			<composite position="1" fieldName="UPIN" length="6" example="B39099"/>
			<composite position="2" fieldName="referringPhysicianName" length="25" example="COLMENAR,ANTONIO B"/>
			<composite position="3" fieldName="NPI" length="10" example="1053325811"/>
		</composite>
		<composite position="15">
			<composite position="1" fieldName="NPPId" length="15"/>
			<composite position="2" fieldName="NPPName" length="25"/>
		</composite>
		<composite position="17" fieldName="internalCommentLine1" length="250" example="THIS IS A TEST ACCESSION FOR ANTIPSYCHOTICS PROJECT"/>
		<composite position="18" fieldName="internalCommentLine2" length="250" example=" THIS IS INTERNAL COMMENT LINE 2"/>
		<composite position="19" fieldName="ICDRequistionDiagnosis" length="8" />
		<composite position="22" fieldName="reportCommentLine1" length="60"/>
		<composite position="23" fieldName="reportCommentLine2" length="60"/>
		<composite position="24" fieldName="originatingSiteCode" length="3" example="NL1"/>
		<composite position="25" fieldName="labReferenceNumber" length="20"/>
		<composite position="26">
			<composite position="1" fieldName="patientRoomNumber" length="10"/>
			<composite position="2" fieldName="patientRoomBed" length="5"/>
			<composite position="3" fieldName="location" length="10"/>
			<composite position="4" fieldName="ward" length="10"/>
		</composite>
		<composite position="27" fieldName="fastingFlag" length="1" example="Y"/>
		<composite position="28" fieldName="specimenCT" length="98"/>
		<composite position="29" fieldName="legalEntity" length="3" example="WHC"/>
		<composite position="30">
			<composite position="1" fieldName="patientAddressLine1" length="50" example="4444 "/>
			<composite position="2" fieldName="patientAddressLine2" length="50" example="LINK ROAD"/>
			<composite position="3" fieldName="city" length="30" example="BUFFALO"/>
			<composite position="4" fieldName="state" length="2" example="NY"/>
			<composite position ="5" fieldName="zipCode" length="10" example="14205"/>
		</composite>
		<composite position="31">
			<composite position="1" fieldName="medicalRecordsNumber" length="20"/>
			<composite position="2" fieldName="chartId" length="20"/>
			<composite position="3" fieldName="admissionDate" length="10" example="20180620"/>
			<composite position="4" fieldName="DAARDAccnFlag" length="1" example="N"/>
		</composite>
		<composite position="32">
			<composite position="1" fieldName="enterpriseId" length="20"/>
			<composite position="2" fieldName="healthId" length="29"/>
		</composite>
		<composite position="33" fieldName="orderEntryMethod" length="1" example="M"/>
    </composites>
</HL7segment>


OrderRecord Template

This template will be used for data segment merging with <segment name="orderRecord">


<HL7segment name="OrderRecord">
	<separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
	<composites>
		<composite position="1" fieldName="messageType" length="3" example="OBR"/>
		<composite position="2" fieldName="orderSequenceNumber" length="4" example="1"/>
		<composite position="3" fieldName="requisitionNumber" length="7" example="0066652"/>
		<composite position="4" fieldName="accessionNumber" length="16" example="CW028631A"/>
		<composite position="5">
			<composite position="1" fieldName="orderingMnemonic" length="15"/>
			<composite position="2" fieldName="componentMnemonic" length="15" example="733QHO="/>
			<composite position="3" fieldName="reportTitle1" length="25" example="POTASSIUM"/>
			<composite position="4" fieldName="reportTitle2" length="23" />
			<composite position="5" fieldName="profileUnitCode" length="10" example="2607332529"/>
			<composite position="6" fieldName="componentUnitCode" length="10" example="2607332529"/>
			<composite position="7" fieldName="billCode" length="9" example="0000733"/>
			<composite position="8" fieldName="customPanel" length="6"/>
			<composite position="9" fieldName="NTCProfile" length="15"/>
			<composite position="10" fieldName="NTCComponentCOde" length="15" example="733"/>
			<composite position="11" fieldName="customPanelScanId" length="5"/>
			<composite position="12" fieldName="nonStdCompendiumId" length="20"/>
			<composite position="13" fieldName="compendiumEffectiveDate" length="8" example="20180620"/>
			<composite position="14" fieldName="nonStdProfile" length="15"/>
			<composite position="15" fieldName="nonStandardComponent" length="15"/>
			<composite position="16" fieldName="nonStandardCustomPanel" length="15"/>
		</composite>
		<composite position="6" fieldName="priority" length="1" example="R"/>
		<composite position="7" fieldName="miniLongDateTime" length="12" example="201806202341"/>
		<composite position="8" fieldName="collectionDateTime" length="12" example="201806202341"/>
		<composite position="10" fieldName="collectionVolume" length="7" />
		<composite position="12" fieldName="actionCode" length="1" example="N"/>
		<composite position="17" fieldName="referringPhysicianName" length="25" example="B39099|COLMENAR,ANTONIO B"/>
		<composite position="21">
			<composite position="1" fieldName="siteCode" length="3" example="QHO"/>
			<composite position="2" fieldName="siteName" length="20"/>
			<composite position="3" fieldName="address" length="81"/>
			<composite position="4" fieldName="city" length="16"/>
			<composite position="5" fieldName="state" length="2"/>
			<composite position="6" fieldName="zipCode" length="10"/>
		</composite>
		<composite position="23" fieldName="reportDateTime" length="12" example="201806202341"/>
		<composite position="26" fieldName="orderResults" length="1" example="F"/>
		<composite position="27" fieldName="profileName" length="75"/>
		<composite position="28" fieldName="informedConsentFlag" length="1" example="N"/>
		<composite position="29">
			<composite position="1" fieldName="orderCodeAlert" length="10"/>
			<composite position="2" fieldName="orderCodeType" length="30"/>
		</composite>
		<composite position="30" fieldName="deptIdNumber" length="25"/>
	</composites>
</HL7segment>


ResultRecord Template

This template will be used for data segment merging with <segment name="resultRecord">


<HL7segment name="ResultRecord">
	<separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
	<composites>
		<composite position="1" fieldName="messageType" length="3" example="OBX"/>
		<composite position="2" fieldName="resultSequenceNumber" length="1" example="4"/>
		<composite position="3">
			<composite position="1" fieldName="analyteNumber" length="9" example="25000500"/>
			<composite position="2" fieldName="reportName1" length="25" example="POTASSIUM"/>
			<composite position="3" fieldName="reportName2" length="25" />
			<composite position="4" fieldName="LOINCCode" length="12"/>
			<composite position="5" fieldName="reportableFlag" length="1" example="N"/>
			<composite position="6" fieldName="reportStatus" length="1" example="Y"/>
			<composite position="7" fieldName="referralFlag" length="1" example="2"/>
			<composite position="8" fieldName="nonStdCompendium" length="20" />
			<composite position="9" fieldName="nonStdCompendiumEffectiveDate" length="8" example="20180622"/>
			<composite position="10" fieldName="nonStdAnalyteCode" length="10"/>
		</composite>
		<composite position="4">
			<composite position="1" fieldName="numericResult" length="25" />
			<composite position="2" fieldName="alphaResult" length="225"/>
		</composite>
		<composite position="5" fieldName="unitsOfMeasure" length="15" example="mmol/L"/>
		<composite position="6">
			<composite position="1" fieldName="reportNormals" length="13" example="3.8-5.1"/>
			<composite position="2" fieldName="lowNormals" length="10" example="3.8"/>
			<composite position="3" fieldName="highNormals" length="10" example="5.1"/>
			<composite position="4" fieldName="alphaNormalFlag" length="1" />
		</composite>
		<composite position="7" fieldName="abnormalFlag" length="2"/>
		<composite position="8" fieldName="natureOfAbnormalCheck" length="1" example="N"/>
		<composite position="9" fieldName="resultStatus" length="1" example="F"/>
		<composite position="10">
			<composite position="1" fieldName="workList" length="12" example="SBQHOCHEM"/>
			<composite position="2" fieldName="department" length="6" example="QHO"/>
		</composite>
		<composite position="11">
			<composite position="1" fieldName="resultEnteredBy" length="6" example="HQAK27"/>
			<composite position="2" fieldName="resultReleasedBy" length="6" example="HQAK27"/>
			<composite position="3" fieldName="releasedDateOfResults" length="12" example="201806222341"/>
		</composite>
		<composite position="12">
			<composite position="1" fieldName="lastName" length="40" example="VERMA"/>
			<composite position="2" fieldName="firstName" length="25" example="DEEPTI"/>
			<composite position="3" fieldName="date" length="12" example="201806222341"/>
			<composite position="4" fieldName="actionTaken" length="45"/>
		</composite>
		<composite position="13" fieldName="TNPFlag" length="1"/>
		<composite position="14" fieldName="priorityIndicator" length="6"/>
		<composite position="15">
			<composite position="1" fieldName="grossSiteDisclosure" length="5"/>
			<composite position="2" fieldName="readingOrProfessionalLocation" length="5"/>
			<composite position="3" fieldName="technicalLocation" length="5"/>
		</composite>
	</composites>
</HL7segment>


CommentRecord Template

This template will be used for data segment merging with <segment name="commentRecord">


<HL7segment name="CommentRecord">
	<separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
	<composites>
		<composite position="1" fieldName="messageType" length="1" example="C"/>
		<composite position="2" fieldName="commentSequence" length="4" example="1"/>
		<composite position="3" fieldName="commentSource" length="1" example="L"/>
		<composite position="4">
			<composite position="1" fieldName="commentCode" length="10" example="TWWTSH6"/>
			<composite position="2" fieldName="commentText" length="78" example="Reference Range"/>
		</composite>
		<composite position="5" fieldName="commentSourceApplication" length="6"/>
	</composites>
</HL7segment>


AddendumRecord Template

This template will be used for data segment merging with <segment name="addendumRecord">


<HL7segment name="AddendumRecord">
	<separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
	<composites>
		<composite position="1" fieldName="messageType" length="1" example="A"/>
		<composite position="2" fieldName="continuationOfPreviousRecord" length="252" example="1-19 Years 0.50-4.30"/>
	</composites>
</HL7segment>


ReissuedReportRecord Template

This template will be used for data segment merging with <segment name="reissuedReportRecord">


<HL7segment name="ReissuedReportRecord">
  <separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
  <composites>
    <composite position="1" fieldName="messageType" length="3" example="RRT"/>
    <composite position="2" fieldName="resultSequenceNumberFromOBX" length="4" example="1"/>
    <composite position="3" fieldName="eventSequenceNumberwithinOBX" length="4" example="1"/>
    <composite position="4" fieldName="eventAccessionStatus" length="3" example="REL"/>
    <composite position="5" fieldName="eventWorklistStatus" length="3" example="REL"/>
    <composite position="6" fieldName="eventBusinessStatus" length="3" example="REL"/>
    <composite position="7" fieldName="eventInternalStatus" length="3" example="REL"/>
    <composite position="8" fieldName="rootCause" length="2" example="C"/>
    <composite position="9" fieldName="eventType" length="2" example="M"/>
    <composite position="10" fieldname="eventResultReleaseDate" length="12" example="201806222341"/>
    <composite position="11" fieldName="originalUserId" length="8" example="HQAK27"/>
    <composite position="12" fieldName="changedUserId" length="8" example="HQAK27"/>
    <composite position="13" fieldName="eventResultReportDate" length="12" example="201806222341"/>
  </composites>
</HL7segment>


BatchTrailRecord Template

This template will be used for data segment merging with <segment name="batchTrailRecord">


<HL7segment name="BatchTrailRecord">
  <separators compositeSeparator="|" subCompositeSeparator="^" repeatSeparator="~" escapeSeparator="\" subSubCompositeSeparator="&amp;"/>
  <composites>
    <composite position="1" fieldName="messageType" length="1" example="L"/>
    <composite position="2" fieldName="trailerSequence" length="1" example="1"/>
    <composite position="4" fieldName="patientCount" length="4" example="215"/>
  </composites>
</HL7segment>


Example Files

All of the example files below were generated by GenRocket.


Example merged nested XML file

The following is an example of a merged XML file for the first header record generated.


H||^^|||PAW^10000002^20000002^N|||||||||202001090340
P|3|z4MP19RdiUn3|KP250002P|345204590|OTERO^ABBIE^E|X|2^19410727|M^G|202006270340||||B57165^MESSICK,ABBIE R^0WeKV9okPP|DquJLunxOHXEPxc^Lorem ipsum dolor sit am||THIS IS A TEST ACCESSION FOR ANTIPSYCHOTICS PROJECT|THIS IS INTERNAL COMMENT LINE 2|HPTEGYRJ|||Lorem ipsum dolor sit amet|Lorem ipsum dolor sit amet|RZ1|ePLZvnKAIawhHsHG2k4l|6743600303^16360^LOCATION3^WARD889242|N|Lorem ipsum dolor sit amet consetetur|IZM|1002 Jefferson Ct^Perth and Kinross^Saint Paul^MN^55101|eqiesi277lNTgIcM^1b8^20190626^N|QPZ0XGNIWF5S87QD7FQ5^AKV2TISSW3NZH8YQNTQSCMSAPXN1Z|M
OBR|3|0025727|ZN4QXLXYU0H|75000950^3IJIXHSEW^SODIUM^TWHPXKKXCLSNUGMDYKOZMR^8031907670^5211858071^0000759^ASHWSS^GLQJOZLGSGRDKNK^^fsAZx^PvB5akAwgqqcPBdgBLNd^20200710^GKKORNLKURPTVNQ^EWSGOTUUFUCSCSB^MZEZUJXYTPZGTBC|R|202108090340|202107300340||0cuXpDW||N|||||QL7WNB|GAMACHE,ABBIE Q||||QHO^Travis^1002 E Jefferson Ct^Austin^TX^733017701||202204270340|||F|TgW1mjFDADvgOGMt8FHH3v2c21gN4PucjExDipFQTXHr4y5Kia6EK3qQDZzkXKkSwpWiQ13l45c|N|BTaqtVRFxt^8cmOmMrFTHlxx8fsG9zX5Zei8o4jWc|a64cYc5bqbql4YaUirHNbBLQL
OBX|9|8PkoH38R^Magnesium^Potassium^hMOAKnr3DH1C^N^Y^8^IROOGVYJXBDXIHPIUTIA^20210726^TPBYVQDAS|7WQ6s5G3678Gcyr1NibLAmmSE^KMTVILQZKWQGMWZPHUSWMWJTE|mmol/L|3.8-5.1^3.8^5.1^W|OV|N|F|FTPFANRWVWE^QHO|LUNIKJ^WWN6VP^202108140340|HARMON^ABIGAIL^202006220340^dolor ipsum sit Lorem|R|PRI512|GSDIS^RPLOC^TELOC|
C|13|L|ZTRRZFHD^ipsum consetetur sadipscing dolor Lorem sit amet|806841
A|addendum73 30-5.60
A|addendum74 35-7.65
A|addendum75 40-7.70
A|addendum76 45-8.75
A|addendum77 50-1.80
A|addendum78 20-4.85
C|14|L|KWOMJGYHO^amet dolor ipsum sit Lorem|596877
A|addendum79 25-2.90
A|addendum80 30-8.95
A|addendum81 35-1.50
A|addendum82 40-7.55
A|addendum83 45-6.60
A|addendum84 50-7.65
C|15|L|QHQBQLHL^amet elitr sed dolor Lorem sadipscing consetetur diam sit ipsum|680115
A|addendum85 20-9.70
A|addendum86 25-7.75
A|addendum87 30-8.80
A|addendum88 35-6.85
A|addendum89 40-9.90
A|addendum90 45-6.95
RRT|3|2|REL|REL|REL|REL|C|M||CQPCOQIH|HMWMBHZ|202204240340
OBX|6|m1Ao0TaFy^Magnesium^Potassium^hgfWZnTI9cw2^N^Y^4^GQFTYXXLYKHJRCGBVXFL^20200328^XD5LTVBRO|Lf1CywyYWTLSNzma56TLtljUo^FLFMPOQMONQHSLHSLETLEDAEG|mmol/L|3.8-5.1^3.8^5.1^M|IN|N|F|ZQDJGDYYND^QHO|JCZJRT^NJKAMW^202202120340|GRABOWSKI^ADA^202206250340^Lorem dolor ipsum sit|K|PRI127|GSDIS^RPLOC^TELOC|
C|16|L|XHQTUYM^dolor sit sadipscing consetetur amet sed ipsum Lorem diam elitr|259446
A|addendum91 50-3.50
A|addendum92 20-1.55
A|addendum93 25-9.60
A|addendum94 30-2.65
A|addendum95 35-4.70
A|addendum96 40-4.75
C|17|L|GNFVVUHEJ^consetetur ipsum Lorem sit amet dolor|419851
A|addendum97 45-6.80
A|addendum98 50-8.85
A|addendum99 20-6.90
A|addendum100 25-1.95
A|addendum101 30-9.50
A|addendum102 35-7.55
C|18|L|RHGKEUK^Lorem amet sadipscing consetetur sed dolor sit elitr ipsum|906860
A|addendum103 40-8.60
A|addendum104 45-6.65
A|addendum105 50-4.70
A|addendum106 20-2.75
A|addendum107 25-8.80
A|addendum108 30-9.85
RRT|2|3|REL|REL|REL|REL|C|M||YMBOQEIO|JVVDFFSB|202008090340
OBX|9|VD9VlUkJ^Magnesium^Potassium^BYYxC9usUGSp^N^Y^1^WKWAKABPETRIUFNFCMLV^20200319^ACITNWVIR|9nFFXIR5Td5W4EABHAWHt6Tr6^SWXQTMQBSUACNZVMIXKLNSTYX|mmol/L|3.8-5.1^3.8^5.1^U|SO|N|F|YTYRQQBMRBK^QHO|TMAHWD^V2QZGD^202002240340|HUSKEY^ADDIE^202202050340^ipsum Lorem dolor sit|G|PRI610|GSDIS^RPLOC^TELOC|
C|19|L|OSTTWKD^amet ipsum sit Lorem consetetur dolor|596846
A|addendum109 35-9.90
A|addendum110 40-2.95
A|addendum111 45-5.50
A|addendum112 50-9.55
A|addendum113 20-9.60
A|addendum114 25-6.65
C|20|L|KGTDNLD^Lorem sit ipsum consetetur amet dolor|540122
A|addendum115 30-2.70
A|addendum116 35-7.75
A|addendum117 40-4.80
A|addendum118 45-7.85
A|addendum119 50-6.90
A|addendum120 20-8.95
C|21|L|MONRUTVL^Lorem consetetur sadipscing dolor sit amet ipsum|103373
A|addendum121 25-9.50
A|addendum122 30-2.55
A|addendum123 35-8.60
A|addendum124 40-5.65
A|addendum125 45-9.70
A|addendum126 50-8.75
RRT|2|1|REL|REL|REL|REL|C|M||DFSXHTTF|TEBUAB|202001170340
L|1||3


Example Segment Files

The following are eight example segmented data files used to generate the merged nested HL7 formatted files.


HeaderRecordSegment.xml 

This file will contain three segments, each having one data element containing the header record attributes, a loopCount equal to one, and no parentId since the header record is the root Domain and does not have a parent Domain.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[H]]></attribute>
    <attribute name="delimiters"><![CDATA[|^^]]></attribute>
    <attribute name="originatingLab"><![CDATA[PAW]]></attribute>
    <attribute name="clientNumber"><![CDATA[10000000]]></attribute>
    <attribute name="masterClientNumber"><![CDATA[20000000]]></attribute>
    <attribute name="daardClientFlag"><![CDATA[N]]></attribute>
    <attribute name="messageSentTime"><![CDATA[202001070340]]></attribute>
  </segment>
  <segment id="2" setId="2">
    <attribute name="id"><![CDATA[2]]></attribute>
    <attribute name="messageType"><![CDATA[H]]></attribute>
    <attribute name="delimiters"><![CDATA[|^^]]></attribute>
    <attribute name="originatingLab"><![CDATA[PAW]]></attribute>
    <attribute name="clientNumber"><![CDATA[10000001]]></attribute>
    <attribute name="masterClientNumber"><![CDATA[20000001]]></attribute>
    <attribute name="daardClientFlag"><![CDATA[N]]></attribute>
    <attribute name="messageSentTime"><![CDATA[202001080340]]></attribute>
  </segment>
  <segment id="3" setId="3">
    <attribute name="id"><![CDATA[3]]></attribute>
    <attribute name="messageType"><![CDATA[H]]></attribute>
    <attribute name="delimiters"><![CDATA[|^^]]></attribute>
    <attribute name="originatingLab"><![CDATA[PAW]]></attribute>
    <attribute name="clientNumber"><![CDATA[10000002]]></attribute>
    <attribute name="masterClientNumber"><![CDATA[20000002]]></attribute>
    <attribute name="daardClientFlag"><![CDATA[N]]></attribute>
    <attribute name="messageSentTime"><![CDATA[202001090340]]></attribute>
  </segment>
</segments>


PatientRecordSegment.xml

This file will contain three segments, each having three data elements containing the patient record attributes, a loopCount equal to three, and a parentId given each set of patient record referential integrity to a header record defined within HeaderRecordSegment.xml.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[P]]></attribute>
    <attribute name="patientSequenceNumber"><![CDATA[1]]></attribute>
    <attribute name="patientId"><![CDATA[waqAnHDsxHF0]]></attribute>
    <attribute name="accessionNumber"><![CDATA[KP050000P]]></attribute>
    <attribute name="socialSecurityNumber"><![CDATA[345204588]]></attribute>
    <attribute name="lastName"><![CDATA[BALOGH]]></attribute>
    <attribute name="firstName"><![CDATA[AARON]]></attribute>
    <attribute name="middleName"><![CDATA[J]]></attribute>
    <attribute name="cancelledAccessionIndicator"><![CDATA[X]]></attribute>
    <attribute name="patientAge"><![CDATA[6]]></attribute>
    <attribute name="patientDOB"><![CDATA[19411026]]></attribute>
    <attribute name="sex"><![CDATA[M]]></attribute>
    <attribute name="species"><![CDATA[A]]></attribute>
    <attribute name="dateOfService"><![CDATA[202003300340]]></attribute>
    <attribute name="UPIN"><![CDATA[B69538]]></attribute>
    <attribute name="referringPhysicianName"><![CDATA[ISLEY,AARON F]]></attribute>
    <attribute name="NPI"><![CDATA[579X5gOvmi]]></attribute>
    <attribute name="NPPId"><![CDATA[fuGaMFbU4M8SkPh]]></attribute>
    <attribute name="NPPName"><![CDATA[Lorem ipsum dolor sit amet]]></attribute>
    <attribute name="internalCommentLine1"><![CDATA[THIS IS A TEST ACCESSION FOR ANTIPSYCHOTICS PROJECT]]></attribute>
    <attribute name="internalCommentLine2"><![CDATA[THIS IS INTERNAL COMMENT LINE 2]]></attribute>
    <attribute name="ICDRequistionDiagnosis"><![CDATA[NSQSMELP]]></attribute>
    <attribute name="reportCommentLine1"><![CDATA[Lorem ipsum dolor sit amet]]></attribute>
    <attribute name="reportCommentLine2"><![CDATA[Lorem ipsum dolor sit amet]]></attribute>
    <attribute name="originatingSiteCode"><![CDATA[RE1]]></attribute>
    <attribute name="labReferenceNumber"><![CDATA[QcAfglQpZ6mQKRQDA8j2]]></attribute>
    <attribute name="patientRoomNumber"><![CDATA[6577404591]]></attribute>
    <attribute name="patientRoomBed"><![CDATA[21232]]></attribute>
    <attribute name="location"><![CDATA[LOCATION1]]></attribute>
    <attribute name="ward"><![CDATA[WARD592818]]></attribute>
    <attribute name="fastingFlag"><![CDATA[Y]]></attribute>
    <attribute name="specimenCT"><![CDATA[Lorem ipsum dolor sit amet consetetur]]></attribute>
    <attribute name="legalEntity"><![CDATA[MCJ]]></attribute>
    <attribute name="patientAddressLine1"><![CDATA[1000 Washington Dr]]></attribute>
    <attribute name="patientAddressLine2"><![CDATA[South Lanarkshire]]></attribute>
    <attribute name="city"><![CDATA[Frankfort]]></attribute>
    <attribute name="state"><![CDATA[KY]]></attribute>
    <attribute name="zipCode"><![CDATA[40601]]></attribute>
    <attribute name="medicalRecordsNumber"><![CDATA[u3tv4kF81Vy2z]]></attribute>
    <attribute name="chartId"><![CDATA[X]]></attribute>
    <attribute name="admissionDate"><![CDATA[20190823]]></attribute>
    <attribute name="DAARDAccnFlag"><![CDATA[N]]></attribute>
    <attribute name="enterpriseId"><![CDATA[PGGSZZLJ8SRAOGAXVVHP]]></attribute>
    <attribute name="healthId"><![CDATA[EA353EZST7ISUS18WY7G5XFZM6K0H]]></attribute>
    <attribute name="orderEntryMethod"><![CDATA[M]]></attribute>
    <attribute name="headerRecord"><![CDATA[1]]></attribute>
  </segment>
  .
  .
</segments>


OrderRecordSegment.xml

This file will contain three segments, each having the following data elements containing the user attributes, a loopCount equal to three, and a parentId given each set of order record referential integrity to a given patient record defined within PatientRecordSegment.xml.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[OBR]]></attribute>
    <attribute name="orderSequenceNumber"><![CDATA[1]]></attribute>
    <attribute name="requisitionNumber"><![CDATA[0049257]]></attribute>
    <attribute name="accessionNumber"><![CDATA[H5LLUH5LK]]></attribute>
    <attribute name="orderingMnemonic"><![CDATA[75000395]]></attribute>
    <attribute name="componentMnemonic"><![CDATA[WDMNFPU]]></attribute>
    <attribute name="reportTitle1"><![CDATA[IRON]]></attribute>
    <attribute name="reportTitle2"><![CDATA[ZHNFULXOVGHAGWPGJXOUSKAUB]]></attribute>
    <attribute name="profileUnitCode"><![CDATA[8992956968]]></attribute>
    <attribute name="componentUnitCode"><![CDATA[9203950074]]></attribute>
    <attribute name="billCode"><![CDATA[0000303]]></attribute>
    <attribute name="customPanel"><![CDATA[KERVFJ]]></attribute>
    <attribute name="NTCProfile"><![CDATA[FPTCIYTFWXSSTLG]]></attribute>
    <attribute name="NTCComponentCode"><![CDATA[WUmnqkcw4oqI7YH]]></attribute>
    <attribute name="customPanelScanId"><![CDATA[a8NW8]]></attribute>
    <attribute name="nonStdCompendiumId"><![CDATA[GkIBuh0A837DDLF8gqUS]]></attribute>
    <attribute name="compendiumEffectiveDate"><![CDATA[20201008]]></attribute>
    <attribute name="nonStdProfile"><![CDATA[ECPUMHUGBFPFYNB]]></attribute>
    <attribute name="nonStandardComponent"><![CDATA[WHUSEAJTAWVBAAT]]></attribute>
    <attribute name="nonStandardCustomPanel"><![CDATA[FXSKBDVUYSVSLCC]]></attribute>
    <attribute name="priority"><![CDATA[R]]></attribute>
    <attribute name="miniLongDateTime"><![CDATA[202101210340]]></attribute>
    <attribute name="collectionDateTime"><![CDATA[202209090340]]></attribute>
    <attribute name="collectionVolume"><![CDATA[baQ55AD]]></attribute>
    <attribute name="actionCode"><![CDATA[N]]></attribute>
    <attribute name="referringPhysicianName"><![CDATA[CQ2SGL|LINDNER,AARON L]]></attribute>
    <attribute name="siteCode"><![CDATA[QHO]]></attribute>
    <attribute name="siteName"><![CDATA[Baton Rouge]]></attribute>
    <attribute name="address"><![CDATA[1000 N Washington Dr]]></attribute>
    <attribute name="city"><![CDATA[Baton Rouge]]></attribute>
    <attribute name="state"><![CDATA[LA]]></attribute>
    <attribute name="zipCode"><![CDATA[708011203]]></attribute>
    <attribute name="reportDateTime"><![CDATA[202204150340]]></attribute>
    <attribute name="orderResults"><![CDATA[F]]></attribute>
    <attribute name="profileName"><![CDATA[TOMG60MoCItsf0p4smoeNlhf7QgnzZpihILouMtmoHRLMruqijvgOEL4BejZSl9GoD1ZuVnvOdd]]></attribute>
    <attribute name="informedConsentFlag"><![CDATA[N]]></attribute>
    <attribute name="orderCodeAlert"><![CDATA[bVp9ItHy7S]]></attribute>
    <attribute name="orderCodeType"><![CDATA[Vl5aMkK6Ug8kXsR6NETtvPozuboliV]]></attribute>
    <attribute name="deptIdNumber"><![CDATA[7vcVb8UcFyngVV82gzx1Aogc3]]></attribute>
    <attribute name="patientRecord"><![CDATA[1]]></attribute>
  </segment>
  .
  .
</segments>


ResultRecordSegment.xml

This file will contain seven segments, each having one data element containing result record attributes, a loopCount equal to 3, and a parentId given each order record referential integrity to a given order record defined within OrderRecordSegment.xml.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[OBX]]></attribute>
    <attribute name="resultSequenceNumber"><![CDATA[7]]></attribute>
    <attribute name="analyteNumber"><![CDATA[0zQMZW0h]]></attribute>
    <attribute name="reportName1"><![CDATA[Calcium]]></attribute>
    <attribute name="reportName2"><![CDATA[Sodium]]></attribute>
    <attribute name="LOINCCode"><![CDATA[sA2kjG6nv9O3]]></attribute>
    <attribute name="reportableFlag"><![CDATA[N]]></attribute>
    <attribute name="reportStatus"><![CDATA[Y]]></attribute>
    <attribute name="referralFlag"><![CDATA[7]]></attribute>
    <attribute name="nonStdCompendium"><![CDATA[MJMUDBIOHZVVFFPTUGEH]]></attribute>
    <attribute name="nonStdCompendiumEffectiveDate"><![CDATA[20200229]]></attribute>
    <attribute name="nonStdAnalyteCode"><![CDATA[SSJAE8YMJUS3RDIRJN21]]></attribute>
    <attribute name="numericResult"><![CDATA[uAelWV2qe775RY8z9ACl4PfVJ]]></attribute>
    <attribute name="alphaResult"><![CDATA[AQGSQNOZJPCTPVIMIUCZHAUCT]]></attribute>
    <attribute name="unitsOfMeasure"><![CDATA[mmol/L]]></attribute>
    <attribute name="reportNormals"><![CDATA[3.8-5.1]]></attribute>
    <attribute name="lowNormals"><![CDATA[3.8]]></attribute>
    <attribute name="highNormals"><![CDATA[5.1]]></attribute>
    <attribute name="alphaNormalFlag"><![CDATA[P]]></attribute>
    <attribute name="abnormalFlag"><![CDATA[BU]]></attribute>
    <attribute name="natureOfAbnormalCheck"><![CDATA[N]]></attribute>
    <attribute name="resultStatus"><![CDATA[F]]></attribute>
    <attribute name="workList"><![CDATA[TWAWNUHKC]]></attribute>
    <attribute name="department"><![CDATA[QHO]]></attribute>
    <attribute name="resultEnteredBy"><![CDATA[UE7DPJ]]></attribute>
    <attribute name="resultReleasedBy"><![CDATA[M1YOJ3]]></attribute>
    <attribute name="releasedDateOfResults"><![CDATA[202008180340]]></attribute>
    <attribute name="lastName"><![CDATA[SIMMS]]></attribute>
    <attribute name="firstName"><![CDATA[AARON]]></attribute>
    <attribute name="date"><![CDATA[202203280340]]></attribute>
    <attribute name="actionTaken"><![CDATA[ipsum Lorem sit dolor]]></attribute>
    <attribute name="TNPFlag"><![CDATA[T]]></attribute>
    <attribute name="priorityIndicator"><![CDATA[PRI708]]></attribute>
    <attribute name="grossSiteDisclosure"><![CDATA[GSDIS]]></attribute>
    <attribute name="readingOrProfessionalLocation"><![CDATA[RPLOC]]></attribute>
    <attribute name="technicalLocation"><![CDATA[TELOC]]></attribute>
    <attribute name="orderRecord"><![CDATA[1]]></attribute>
  </segment>
  <segment id="2" setId="1">
    <attribute name="id"><![CDATA[2]]></attribute>
    <attribute name="messageType"><![CDATA[OBX]]></attribute>
    <attribute name="resultSequenceNumber"><![CDATA[2]]></attribute>
    <attribute name="analyteNumber"><![CDATA[u1QVJr51O]]></attribute>
    <attribute name="reportName1"><![CDATA[Chlorine]]></attribute>
    <attribute name="reportName2"><![CDATA[Chlorine]]></attribute>
    <attribute name="LOINCCode"><![CDATA[NS07n3d384Xy]]></attribute>
    <attribute name="reportableFlag"><![CDATA[N]]></attribute>
    <attribute name="reportStatus"><![CDATA[Y]]></attribute>
    <attribute name="referralFlag"><![CDATA[1]]></attribute>
    <attribute name="nonStdCompendium"><![CDATA[CHRCTWGSGSWOWFJCUHNI]]></attribute>
    <attribute name="nonStdCompendiumEffectiveDate"><![CDATA[20210804]]></attribute>
    <attribute name="nonStdAnalyteCode"><![CDATA[PCHHKSP9PH3XRPHBJX8Y]]></attribute>
    <attribute name="numericResult"><![CDATA[KlYRfhMnMCai5yZD8Losx2zM8]]></attribute>
    <attribute name="alphaResult"><![CDATA[BRGQETYTYYPNYWMGBTGQESLSE]]></attribute>
    <attribute name="unitsOfMeasure"><![CDATA[mmol/L]]></attribute>
    <attribute name="reportNormals"><![CDATA[3.8-5.1]]></attribute>
    <attribute name="lowNormals"><![CDATA[3.8]]></attribute>
    <attribute name="highNormals"><![CDATA[5.1]]></attribute>
    <attribute name="alphaNormalFlag"><![CDATA[Y]]></attribute>
    <attribute name="abnormalFlag"><![CDATA[K2]]></attribute>
    <attribute name="natureOfAbnormalCheck"><![CDATA[N]]></attribute>
    <attribute name="resultStatus"><![CDATA[F]]></attribute>
    <attribute name="workList"><![CDATA[POWDLQAETH]]></attribute>
    <attribute name="department"><![CDATA[QHO]]></attribute>
    <attribute name="resultEnteredBy"><![CDATA[UNMEWG]]></attribute>
    <attribute name="resultReleasedBy"><![CDATA[RMBK0K]]></attribute>
    <attribute name="releasedDateOfResults"><![CDATA[202011260340]]></attribute>
    <attribute name="lastName"><![CDATA[MINES]]></attribute>
    <attribute name="firstName"><![CDATA[ABBEY]]></attribute>
    <attribute name="date"><![CDATA[202108140340]]></attribute>
    <attribute name="actionTaken"><![CDATA[Lorem sit ipsum dolor]]></attribute>
    <attribute name="TNPFlag"><![CDATA[P]]></attribute>
    <attribute name="priorityIndicator"><![CDATA[PRI545]]></attribute>
    <attribute name="grossSiteDisclosure"><![CDATA[GSDIS]]></attribute>
    <attribute name="readingOrProfessionalLocation"><![CDATA[RPLOC]]></attribute>
    <attribute name="technicalLocation"><![CDATA[TELOC]]></attribute>
    <attribute name="orderRecord"><![CDATA[1]]></attribute>
  </segment>
  .
  .
</segments>


CommentRecordSegment.xml

This file will contain twenty-seven segments, each having one data element containing comment record attributes, a loopCount equal to 3, and a parentId given each comment record referential integrity to a given result record defined within ResultRecordSegment.xml.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[C]]></attribute>
    <attribute name="commentSequence"><![CDATA[1]]></attribute>
    <attribute name="commentSource"><![CDATA[L]]></attribute>
    <attribute name="commentCode"><![CDATA[EBTCMZZE]]></attribute>
    <attribute name="commentText"><![CDATA[sed dolor sit Lorem consetetur amet elitr diam ipsum sadipscing]]></attribute>
    <attribute name="commentSourceApplication"><![CDATA[479868]]></attribute>
    <attribute name="resultRecord"><![CDATA[1]]></attribute>
  </segment>
  <segment id="2" setId="1">
    <attribute name="id"><![CDATA[2]]></attribute>
    <attribute name="messageType"><![CDATA[C]]></attribute>
    <attribute name="commentSequence"><![CDATA[2]]></attribute>
    <attribute name="commentSource"><![CDATA[L]]></attribute>
    <attribute name="commentCode"><![CDATA[OOAHJJJEZ]]></attribute>
    <attribute name="commentText"><![CDATA[amet dolor sit Lorem consetetur ipsum]]></attribute>
    <attribute name="commentSourceApplication"><![CDATA[385105]]></attribute>
    <attribute name="resultRecord"><![CDATA[1]]></attribute>
  </segment>
  <segment id="3" setId="1">
    <attribute name="id"><![CDATA[3]]></attribute>
    <attribute name="messageType"><![CDATA[C]]></attribute>
    <attribute name="commentSequence"><![CDATA[3]]></attribute>
    <attribute name="commentSource"><![CDATA[L]]></attribute>
    <attribute name="commentCode"><![CDATA[QKJQWGDINO]]></attribute>
    <attribute name="commentText"><![CDATA[ipsum Lorem dolor sadipscing amet elitr consetetur sit]]></attribute>
    <attribute name="commentSourceApplication"><![CDATA[933971]]></attribute>
    <attribute name="resultRecord"><![CDATA[1]]></attribute>
  </segment>
  .
  .
</segments>


AddendumRecordSegment.xml

This file will contain hundred and sixty-two segments, each having one data element containing addendum record attributes, a loopCount equal to 6, and a parentId given each addendum record referential integrity to a given comment record defined within CommentRecordSegment.xml.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[A]]></attribute>
    <attribute name="continuationOfPreviousRecord"><![CDATA[addendum1 20-1.50]]></attribute>
    <attribute name="commentRecord"><![CDATA[1]]></attribute>
  </segment>
  <segment id="2" setId="1">
    <attribute name="id"><![CDATA[2]]></attribute>
    <attribute name="messageType"><![CDATA[A]]></attribute>
    <attribute name="continuationOfPreviousRecord"><![CDATA[addendum2 25-4.55]]></attribute>
    <attribute name="commentRecord"><![CDATA[1]]></attribute>
  </segment>
  <segment id="3" setId="1">
    <attribute name="id"><![CDATA[3]]></attribute>
    <attribute name="messageType"><![CDATA[A]]></attribute>
    <attribute name="continuationOfPreviousRecord"><![CDATA[addendum3 30-2.60]]></attribute>
    <attribute name="commentRecord"><![CDATA[1]]></attribute>
  </segment>
  .
  .
</segments>


ReissuedReportRecordSegment.xml

This file will contain nine segments, each having one data element containing reissued record attributes, a loopCount equal to 1, and a parentId given each reissued record referential integrity to a given result record defined within ResultRecordSegment.xml.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[RRT]]></attribute>
    <attribute name="resultSequenceNumberFromOBX"><![CDATA[4]]></attribute>
    <attribute name="eventSequenceNumberwithinOBX"><![CDATA[1]]></attribute>
    <attribute name="eventAccessionStatus"><![CDATA[REL]]></attribute>
    <attribute name="eventWorklistStatus"><![CDATA[REL]]></attribute>
    <attribute name="eventBusinessStatus"><![CDATA[REL]]></attribute>
    <attribute name="eventInternalStatus"><![CDATA[REL]]></attribute>
    <attribute name="rootCause"><![CDATA[C]]></attribute>
    <attribute name="eventType"><![CDATA[M]]></attribute>
    <attribute name="eventResultReleaseDate"><![CDATA[202104120340]]></attribute>
    <attribute name="originalUserId"><![CDATA[AQLHKR]]></attribute>
    <attribute name="changedUserId"><![CDATA[FDMXOK]]></attribute>
    <attribute name="eventResultReportDate"><![CDATA[202206040340]]></attribute>
    <attribute name="resultRecord"><![CDATA[1]]></attribute>
  </segment>
  <segment id="2" setId="2">
    <attribute name="id"><![CDATA[2]]></attribute>
    <attribute name="messageType"><![CDATA[RRT]]></attribute>
    <attribute name="resultSequenceNumberFromOBX"><![CDATA[2]]></attribute>
    <attribute name="eventSequenceNumberwithinOBX"><![CDATA[2]]></attribute>
    <attribute name="eventAccessionStatus"><![CDATA[REL]]></attribute>
    <attribute name="eventWorklistStatus"><![CDATA[REL]]></attribute>
    <attribute name="eventBusinessStatus"><![CDATA[REL]]></attribute>
    <attribute name="eventInternalStatus"><![CDATA[REL]]></attribute>
    <attribute name="rootCause"><![CDATA[C]]></attribute>
    <attribute name="eventType"><![CDATA[M]]></attribute>
    <attribute name="eventResultReleaseDate"><![CDATA[202012050340]]></attribute>
    <attribute name="originalUserId"><![CDATA[QEBNKEX]]></attribute>
    <attribute name="changedUserId"><![CDATA[NIZKDAM]]></attribute>
    <attribute name="eventResultReportDate"><![CDATA[202008100340]]></attribute>
    <attribute name="resultRecord"><![CDATA[2]]></attribute>
  </segment>
  .
  .
</segments>


BatchTrailerRecordSegment.xml

This file will contain one segment having one data element containing batch trail record attributes, a loopCount equal to 1  and no parentId since the batch trail record is the trailer Domain and does not have a parent Domain.


<segments>
  <segment id="1" setId="1">
    <attribute name="id"><![CDATA[1]]></attribute>
    <attribute name="messageType"><![CDATA[L]]></attribute>
    <attribute name="trailerSequence"><![CDATA[1]]></attribute>
    <attribute name="patientCount"><![CDATA[3]]></attribute>
  </segment>
</segments>