Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.vmdb.hl7
Class OBXSegment  view OBXSegment download OBXSegment.java

java.lang.Object
  extended byorg.vmdb.hl7.HL7Object
      extended byorg.vmdb.hl7.HL7Segment
          extended byorg.vmdb.hl7.OBXSegment

public class OBXSegment
extends HL7Segment

Observation/Result (OBX) Segment.

Description: HL7 Network Connectivity For VMDB.

Copyright: Copyright (c) 2002-2003.

Company: M&M Informatics.

The OBX segment is used to transmit a single observation or observation fragment. It represents the smallest indivisible unit of a visit summary report. The OBX segment identifies the specific type of observation result being reported (OBX-3) and the specific value of the observation (OBX-5).

Reporting to the VMDB focuses on OBX-3 and OBX-5 as the most informative elements of the message and thus, full effort should be made to make OBX-3 and OBX-5 as valid and unambiguous as possible. Because of its flexible nature, observations of nearly all types can be transmitted through a series of OBX segments. Because each segment identifies a separate unique value for an observation type-observation value pair, there is no limit to the number of observations that may be transmitted in a single ORU message. For VMDB reporting a minimum of one diagnosis OBX segment is required.

See HL7 Standard Chapter 7 for details.

Version:
1.0

Field Summary
private  java.lang.String sNm
           
private  java.lang.String sRl
           
 
Fields inherited from class org.vmdb.hl7.HL7Segment
iMaxFields, msgParent, slFields, sNextField, vFields
 
Fields inherited from class org.vmdb.hl7.HL7Object
COMP_SEP, ESC_SEP, FIELD_SEP, REP_SEP, sName, sRule, sSeparators, SUB_SEP
 
Constructor Summary
OBXSegment()
          Construct an empty observation result segment.
OBXSegment(HL7SegmentContainer msgParent)
          Construct an empty observation result segment, setting its containing message object.
 
Method Summary
 CEElement getObservationIdentifier()
          Get the observation identifier as a CEElement.
 HL7Element getObservationValue()
          Get the observation value as base class HL7Element
 java.lang.String getObservationValueType()
          Get the HL7 data type of OBX.5.
 java.lang.String getSetId()
          Get the observation set id
 java.lang.String getSubId()
          Get the observation sub id.
 CEElement getUnits()
          Get the units as a CEElement
(package private)  void initialize()
           
(package private)  boolean processField(java.lang.String sField, java.lang.String sType, boolean bRepeatable)
          Override HL7Segment processField to deal with the exceptional case of OBX 6 Which has type conditional on the value of OBX 2 Let the super class do the heavy lifting by calling it first
 void setObservationIdentifier(CEElement ceObsId)
          Set the type of observation as a LOINC coded CE element.
 void setObservationValue(HL7Element eNewValue)
          Set the observation value.

Since OBX.5 is polymorphic, we use the base class HL7Element as the input.
 void setObservationValue(java.lang.String sNewValue)
          Set the observation value.

This version takes a string representing any of the simple HL7 types.
 void setObservationValueType(java.lang.String sType)
          Set the type of OBX.5 as one of the HL7 data types.
 void setResultStatus(java.lang.String sCode)
          Set the result status.

This will almost always retain the default of "F" for final results.
 void setSetId(java.lang.String sSetId)
          Set the observation set id used to distinguish individual OBX's.
 void setSubId(java.lang.String sSubId)
          Set the observation sub id used to relate two or more OBX's as part of the same observation such as a modifier added to a term.

Normally, it is best to leave this to the logic coded into the modifyObservation 55 method of the ORU message class.
 void setUnits(CEElement eUnits)
          Set the Units as preformed CEElement.

Normally will use a precoded ISO or ANSI coded units.
 void setUnits(java.lang.String sUnits)
          Set the Units as String.

Should normally will use a precoded ISO or ANSI coded units but this method allows use of arbitrary strings for units.
 
Methods inherited from class org.vmdb.hl7.HL7Segment
addEmptyFields, addField, addField, clearField, fromString, getField, getFieldValue, iterator, listFields, readString, segmentComplete, setField, setField, setField, setField, setField, setField, setField, setParent, toString, toXML
 
Methods inherited from class org.vmdb.hl7.HL7Object
getName, getRule, getSeparator, getSeparators, setName, setRule, setSeparators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sNm

private java.lang.String sNm

sRl

private java.lang.String sRl
Constructor Detail

OBXSegment

public OBXSegment()
Construct an empty observation result segment.


OBXSegment

public OBXSegment(HL7SegmentContainer msgParent)
Construct an empty observation result segment, setting its containing message object.

Method Detail

initialize

void initialize()
Overrides:
initialize in class HL7Segment

processField

boolean processField(java.lang.String sField,
                     java.lang.String sType,
                     boolean bRepeatable)
               throws MalformedFieldException,
                      MalformedSegmentException
Override HL7Segment processField to deal with the exceptional case of OBX 6 Which has type conditional on the value of OBX 2 Let the super class do the heavy lifting by calling it first

Overrides:
processField in class HL7Segment

setSetId

public void setSetId(java.lang.String sSetId)
Set the observation set id used to distinguish individual OBX's.


getSetId

public java.lang.String getSetId()
Get the observation set id


setObservationValueType

public void setObservationValueType(java.lang.String sType)
                             throws MalformedFieldException
Set the type of OBX.5 as one of the HL7 data types. For now, we only allow those types that we have implemented.


getObservationValueType

public java.lang.String getObservationValueType()
Get the HL7 data type of OBX.5.


setObservationIdentifier

public void setObservationIdentifier(CEElement ceObsId)
Set the type of observation as a LOINC coded CE element.


getObservationIdentifier

public CEElement getObservationIdentifier()
Get the observation identifier as a CEElement.


setSubId

public void setSubId(java.lang.String sSubId)
Set the observation sub id used to relate two or more OBX's as part of the same observation such as a modifier added to a term.

Normally, it is best to leave this to the logic coded into the modifyObservation 55 method of the ORU message class.


getSubId

public java.lang.String getSubId()
Get the observation sub id.


setObservationValue

public void setObservationValue(HL7Element eNewValue)
Set the observation value.

Since OBX.5 is polymorphic, we use the base class HL7Element as the input. The actual value supplied should be the appropriate subtype as specified in setValueType above.


setObservationValue

public void setObservationValue(java.lang.String sNewValue)
Set the observation value.

This version takes a string representing any of the simple HL7 types.


getObservationValue

public HL7Element getObservationValue()
Get the observation value as base class HL7Element


setUnits

public void setUnits(CEElement eUnits)
Set the Units as preformed CEElement.

Normally will use a precoded ISO or ANSI coded units.


setUnits

public void setUnits(java.lang.String sUnits)
Set the Units as String.

Should normally will use a precoded ISO or ANSI coded units but this method allows use of arbitrary strings for units.


getUnits

public CEElement getUnits()
Get the units as a CEElement


setResultStatus

public void setResultStatus(java.lang.String sCode)
Set the result status.

This will almost always retain the default of "F" for final results. See HL7 2.4 chapter 7 for usage of other codes.