gov.lanl.IDViewer
Class HL72XML

java.lang.Object
  |
  +--gov.lanl.IDViewer.HL72XML
All Implemented Interfaces:
TraitToXML

public class HL72XML
extends java.lang.Object
implements TraitToXML

The class HL7ToXML takes a native HL7 string (PIDS) and converts it to a DOM tree.

Version:
$Id: HL72XML.java,v 1.3 2002/06/09 14:26:01 dwforslund Exp $
Author:
Torsten Staab

Constructor Summary
HL72XML(java.lang.String xmlTraitDef)
          Constructor declaration
 
Method Summary
 boolean addHL7Component(org.w3c.dom.Document theDoc, org.w3c.dom.Node theHL7RootNode, java.lang.String theComponentID, java.lang.String theComponentValue, java.lang.String theComponentType, int theComponentOrder)
          Adds an HL7 component to a specified HL7 tree node.
 org.w3c.dom.Node convertTraitToXML(org.w3c.dom.Document theDoc, java.lang.String traitOrigin, java.lang.String traitID, java.lang.String traitValue, boolean buildSummaryNode)
          Converts a native HL7 string (PIDS) to a DOM tree.
 org.w3c.dom.Node HL7Value(org.w3c.dom.Document theDoc, java.lang.String traitID, java.lang.String origin, java.lang.String hl7Str, boolean buildSummaryNode)
          Converts a native HL7 string to a DOM tree.
 boolean isTraitIDKnown(java.lang.String traitID)
          Checks whether a specific trait type is convertible by this class.
static void main(java.lang.String[] argv)
          Method declaration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HL72XML

public HL72XML(java.lang.String xmlTraitDef)
Constructor declaration

Parameters:
xmlTraitDef -
See Also:
Method Detail

addHL7Component

public boolean addHL7Component(org.w3c.dom.Document theDoc,
                               org.w3c.dom.Node theHL7RootNode,
                               java.lang.String theComponentID,
                               java.lang.String theComponentValue,
                               java.lang.String theComponentType,
                               int theComponentOrder)
Adds an HL7 component to a specified HL7 tree node.

Parameters:
theDoc -
theHL7RootNode -
theComponentID -
theComponentValue -
theComponentType -
theComponentOrder -
Returns:
true if the component was added successfully; false otherwise.

HL7Value

public org.w3c.dom.Node HL7Value(org.w3c.dom.Document theDoc,
                                 java.lang.String traitID,
                                 java.lang.String origin,
                                 java.lang.String hl7Str,
                                 boolean buildSummaryNode)
Converts a native HL7 string to a DOM tree.

Parameters:
theDoc - The HL7 Document used to create elements
origin - the HL7 data source
hl7Str - the native HL7 string
buildSummaryNode - true: the resulting DOM tree will contain a summary of the trait components (if any) at the root node level Example: "HL7/PatientName [Staab, Torsten, A]"
Returns:
the root node of the resulting DOM tree, or null if the parsing failed

isTraitIDKnown

public boolean isTraitIDKnown(java.lang.String traitID)
Checks whether a specific trait type is convertible by this class.

Specified by:
isTraitIDKnown in interface TraitToXML
Parameters:
traitID - the trait identifier (e.g., HL7/PatientName)
Returns:
true if the converter can convert the trait type; false otherwise

convertTraitToXML

public org.w3c.dom.Node convertTraitToXML(org.w3c.dom.Document theDoc,
                                          java.lang.String traitOrigin,
                                          java.lang.String traitID,
                                          java.lang.String traitValue,
                                          boolean buildSummaryNode)
Converts a native HL7 string (PIDS) to a DOM tree.

Specified by:
convertTraitToXML in interface TraitToXML
Parameters:
traitOrigin - the origin of the trait
traitID - the trait identifier (e.g., HL7/PatientName)
traitValue - the actual value of the trait
buildSummaryNode - true: the resulting DOM tree will contain a summary of the trait components (if any) at the root node level Example: "HL7/PatientName [Staab, Torsten, A]"
Returns:
the root node of the resulting DOM tree, or null if the parsing failed

main

public static void main(java.lang.String[] argv)
Method declaration

Parameters:
argv -
See Also:


Copyright © 2000 University of California. All Rights Reserved.