The $$HL7SECTION$$ Tag

<< Click to Display Table of Contents >>

Navigation:  Designing Templates > Template HTML > HL7 Tag Shorthand >

The $$HL7SECTION$$ Tag

The $$HL7SECTION$$----$$ENDSECTION$$ Tag

 

The $$HL7SECTION$$ tags are used to handle repeating segments in an HL7 Message like Insurance (IN1,IN2,IN3 Segments) or Lab Orders and Results (ORC,OBR,OBX Segments).

 

Syntax:

$$HL7SECTION segment="IN1" childsegments="IN2,IN3"$$
   ...html code (will be REMOVED if there is no IN1 segment)...
   ...html code (will be REMOVED if there is no IN1 segment)...
   ...html code (will be REMOVED if there is no IN1 segment)...
   ...html code (will be REMOVED if there is no IN1 segment)...
$$ENDSECTION$$

Attributes:

segment - Required. Must be the 3 character name of the HL7 Segment which the HL7SECTION is for (Like OBX, IN1, etc). Only 1 segment name may be used.

 

childsegments - Optional. Should indicate any immediate child segments of the parent entered in the segment separated by a comma.

 

When you place a $$HL7SECTION$$ tag in your HTML source it will only be included in your final document if the HL7 message contains at least one segment which matches the value in the segment attribute. If the HL7 message does NOT contain that segment then ALL HTML code from the $$HL7SECTION$$ to the $$ENDSECTION$$ is REMOVED and will not be visible.

 

EXAMPLE HL7 MESSAGE

 

MSH|^~\&|SOMEAPP|SOMEAPP|YOURAPP|YOURAPP|20150429154904+0000^S||ORU^R01|15368|T|...{Truncated}

EVN|A08|20150429154904+0000^S||00102|....{Truncated}

PID|1|1524321408|1524321408|234166342|Eriksson^Elizabeth^M||19760824|F|...{Truncated}

PV1|1|P|^^^00002|R||00019|06543^HOOPER^DENNIS^L|....{Truncated}

DG1|1|I9||NODX||W|||||||||01|06543^HOOPER^DENNIS^L|....{Truncated}

GT1|1|3322261701|Harris^Dominic^M||...{Truncated}

IN1|1|0000008|0000114|UNITED HEALTH|....{Truncated}

IN2||234166342|0009999^UNKNOWN||I|....{Truncated}

IN1|2|32411|0000114|LIBERTY MUTUAL|....{Truncated}

IN2||386997754|0009999^UNKNOWN||I|....{Truncated}

OBR|1|40157|6441089|DATA1T|||20150429154904|...{Truncated}

OBX|1|ED|Xray Scan|1|Chest XRay (Front)^JPG^^Base64^/9j/4AAQSkZJRgA...{Truncated}

OBX|2|ED|Xray Scan|2|Chest XRay (Side)^JPG^^Base64^/9j/4AAQSkZJRgA...{Truncated}

OBR|2|40158|6441096|DATA2T|||20150429154904|...{Truncated}

OBX|1|ED|Xray Scan|1|Spinal XRay (Front)^JPG^^Base64^/9j/4AAQSkZJRgA...{Truncated}

OBX|2|ED|Xray Scan|2|Spinal XRay (Side)^JPG^^Base64^/9j/4AAQSkZJRgA...{Truncated}

 

In all scenarios below we'll be using the example HL7 message above as the source.

 

Click to OpenScenario #1 Basic Usage (Click to Open)

 

Click to OpenScenario #2. Using the childsegments attribute properly (Click to Open)

 

Click to OpenNesting ##HL7SECTION## Tags (Click to Open)

 

 

 

 

 

 

 

 

 

See Also: Handling Embedded Binary Data