HL7 Segment Manager
HL7SegmentManager allows you to treat raw hl7 formatted messages much like XML by using XPath expressions. The Primary Difference is the hiearchy of the hl7 message segments is determined by the XPath expression. This allows more freedom with manipulating hl7 segments.
Move <xpath_source> <xpath_dest>
Move All Segments matching XPath_Source to AFTER the location(s)
specified in XPath_Dest
Show <xpath> <options>
Show all Segments matching the XPath Expression, Great for Debugging and
testing various options.
Delete <xpath> <options>
Renum <xpath>
Renumber Repeating Segments
Rename <xpath> <new segmentid>
Insert <xpath> <newsegment> ex insert "/orc" "NTE|0|O|This is a note"
Logtrace on/off
Enables/Disables Log Tracing
BasePath <xpath>
Sets a Global default Root for all commands until BasePath is set again
This insures that changes are only made to Segments matching BasePath
Examples using BasePath
Logtrace on;BasePath /orc;Show obr
Logtrace on;BasePath /orc;Show obr;BasePath /orc/obr;Show obx
Logtrace on;BasePath /orc/;Show /orc
SetNumber <n>
Sets a Global default Set Number for all commands until SetNumber is issued
again. A valid BasePath is a prerequisite for SetNumber.
If BasePath is set, forces actions on only set <n>,
XPath Expressions:
Matches Segments very similar to how XPath works with XML
from xsl/xpath where the xpath will match on all,
Sample XPath's
/ORC Locates All ORC Segments
/ORC/OBR Locates All OBR Segments
/ORC[2]/OBR[1]/[NTE[2] Locate this specific Note Segment.
/ORC/OBR/NTE[2] Locates this NTE Segment on all ORC/OBR Segment matches
Notes:
1. HL7SegmentManager user the State Route Properties defined by HL7_SEGMENT_MANAGER<n>
Where n is any number between 1 and 40 inclusive. Commands and Arguments can be
Seperated by Semicolons, placed into sepearate HL7_SEGMENT_MANAGER<n> proprty values
or a combination.
2. Use logtrace on for a detailed trace of events.
3. To Turn off BasePath Processing, Simply issue BasePath with nothing after it:
logtrace on;BasePath /orc;show /orc/obr;BasePath;show ]orc
4. When logtrace is on, the the BasePath Map is shown when BasePath is Set.
5. XPath Expressions are built by appending the XPath Expression to the BasePath.
Once a BasePath is set, you can still access the BasePath Expression directly by
specifying the full path qualifying expression. As long as the XPath Expression
matches the BasePath Expression or is a child element of the BasePath Expression.
Correct: BasePath /orc;Show /orc;Show/orc/obr;Show obx;/Show /orc/obx/nte
InCorrect: BasePath /orc;Show msh;show pid;show orc;
6. Move will create a temporary BasePath from the common XPath_Source and XPath_Dest
expressions. If a BasePath is already supplied, BasePath will be used.
Undocumented Options for testing methods only. Use HL7FORMAT.
-------------------------------------------------------------
Get <xpath-fieldid>
Retrieve a single value. The combination of BasePath, SetCount and
the XPath Expression must be VERY specific otherwise an Error Message.
is triggered. Get is Mainly used for debugging.
Examples using Geth
Get MSH-10 Retrieve Messsage Controlid
Get PID-3 Retrieve value of PID-3
Get /ORC/OBR-2 Retreive the Placer Order Number
Set <path-fieldid> <value>
Will Set all values matching XPath, BasePath(if set) and SetNumber(if set)
Examples using Set:
Set MSH-10 1234567 - Sets ControlId to 1234567
Set PID-3 55555^TST - Sets PID 3 to 55555TST
Set /ORC/OBR[1]-2 2000 - Sets the OBR[1] Order Number to 2000
/font>
Move
this is the move section
test
test

Recent Comments