public class UB2 extends Segment
The UB2 segment contains data necessary to complete UniformBilling bills specific to the United States; other realms may choose to implement using regional code sets.
Represents an HL7 UB2 message segment. This segment has the following fields:
UB2-1: Set ID - UB2 (SI)Optional
UB2-2: Co-Insurance Days (9) (ST)Optional
UB2-3: Condition Code (24-30) (CWE)Optional
UB2-4: Covered Days (7) (ST)Optional
UB2-5: Non-Covered Days (8) (ST)Optional
UB2-6: Value Amount & Code (UVC)Optional
UB2-7: Occurrence Code & Date (32-35) (OCD)Optional
UB2-8: Occurrence Span Code/Dates (36) (OSP)Optional
UB2-9: Uniform Billing Locator 2 (State) (ST)Optional
UB2-10: Uniform Billing Locator 11 (State) (ST)Optional
UB2-11: Uniform Billing Locator 31 (National) (ST)Optional
UB2-12: Document Control Number (ST)Optional
UB2-13: Uniform Billing Locator 49 (National) (ST)Optional
UB2-14: Uniform Billing Locator 56 (State) (ST)Optional
UB2-15: Uniform Billing Locator 57 (National) (ST)Optional
UB2-16: Uniform Billing Locator 78 (State) (ST)Optional
UB2-17: Special Visit Count (NM)Optional
User can also create Segment through SegmentFactory
| Constructor and Description |
|---|
UB2()
Constucts the UB2 segment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConditionCode(CWE objtempConditionCode)
Set the Condition Code.
|
void |
addConditionCode(java.lang.String strIdentifier,
java.lang.String strText,
java.lang.String strNameOfCodingSystem,
java.lang.String strAlternateIdentifier,
java.lang.String strAlternateText,
java.lang.String strNameOfAlternateCodingSystem,
java.lang.String strCodingSystemVersionID,
java.lang.String strAlternateCodingSystemVersionId,
java.lang.String strOriginalText,
java.lang.String strSecondAlternateIdentifier,
java.lang.String strSecondAlternateText,
java.lang.String strNameofSecondAlternateCodingSystem,
java.lang.String strSecondAlternateCodingSystemVersionID,
java.lang.String strCodingSystemOID,
java.lang.String strValueSetOID,
java.lang.String strValueSetVersionID,
java.lang.String strAlternateCodingSystemOID,
java.lang.String strAlternateValueSetOID,
java.lang.String strAlternateValueSetVersionID,
java.lang.String strSecondAlternateCodingSystemOID,
java.lang.String strSecondAlternateValueSetOID,
java.lang.String strSecondAlternateValueSetVersionID)
Set the Condition Code.
|
void |
addDocumentControlNumber(ST objtempDocumentControlNumber)
Set the Document Control Number.
|
void |
addDocumentControlNumber(java.lang.String strDocumentControlNumber)
Set the Document Control Number.
|
void |
addOccuranceCodeAndDate(CNE objOccuranceCode,
java.lang.String strOccuranceDate)
Set the Occurrence Code And Date.
|
void |
addOccuranceCodeAndDate(OCD tempOccuranceCodeAndDate)
Set the Occurrence Code And Date.
|
void |
addOccuranceSpanCodeOrDates(CNE objOccurrenceSpanCode,
java.lang.String strOccuranceSpanStartDate,
java.lang.String strOccuranceSpanStopDate)
Set the Occurance Span Code Or Dates.
|
void |
addOccuranceSpanCodeOrDates(OSP tempOccuranceSpanCodeOrDates)
Set the Occurance Span Code Or Dates.
|
void |
addUniformBillingLocator11State(ST objtempUniformBillingLocator11State)
Set the UniformBilling Locator 11 State.
|
void |
addUniformBillingLocator11State(java.lang.String strUniformBillingLocator11State)
Set the UniformBilling Locator 11 State.
|
void |
addUniformBillingLocator2State(ST objtempUniformBillingLocator2State)
Set the UniformBilling Locator 2 State.
|
void |
addUniformBillingLocator2State(java.lang.String strUniformBillingLocator2State)
Set the UniformBilling Locator 2 State.
|
void |
addUniformBillingLocator49National(ST objtempUniformBillingLocator49National)
Set the UniformBilling Locator 49 National.
|
void |
addUniformBillingLocator49National(java.lang.String strUniformBillingLocator49National)
Set the UniformBilling Locator 49 National.
|
void |
addUniformBillingLocator56State(ST objtempUniformBillingLocator56State)
Set the UniformBilling Locator 56 State.
|
void |
addUniformBillingLocator56State(java.lang.String strUniformBillingLocator56State)
Set the UniformBilling Locator 56 State.
|
void |
addUniformBillingLocator78State(ST objtempUniformBillingLocator78State)
Set the UniformBilling Locator 78 State.
|
void |
addUniformBillingLocator78State(java.lang.String strUniformBillingLocator78State)
Set the UniformBilling Locator 78 State.
|
void |
addValueAmountAndCode(CWE objValueCode,
MO objValueAmount,
NM objNonMonetaryValueAmountQuantity,
CWE objNonMonetaryValueAmountUnits)
Set the Value Amount And Code.
|
void |
addValueAmountAndCode(UVC tempValueAmountAndCode)
Set the Value Amount And Code.
|
ST |
getCoInsuranceDays()
Retrieves the CoInsuranceDays.
|
ISingleCollection<CWE> |
getConditionCode()
Retrieves the Condition Code.
|
ST |
getCoveredDays()
Retrieves the Covered Days.
|
ISingleCollection<ST> |
getDocumentControlNumber()
Retrieves the Document Control Number.
|
ST |
getNonCoveredDays()
Retrieves the Non Covered Days.
|
ISingleCollection<OCD> |
getOccuranceCodeAndDate()
Retrieves the Occurance Code And Date.
|
ISingleCollection<OSP> |
getOccuranceSpanCodeOrDates()
Retrieves the Occurance Span Code Or Dates.
|
SI |
getSetID()
Retrieves the Set ID.
|
NM |
getSpecialVisitCount()
Retrieves the Special Visit Count.
|
ISingleCollection<ST> |
getUniformBillingLocator11State()
Retrieves the Uniform Billing Locator 11 State.
|
ISingleCollection<ST> |
getUniformBillingLocator2State()
Retrieves the Uniform Billing Locator 2 State.
|
ST |
getUniformBillingLocator31National()
Retrieves the Uniform Billing Locator 31 National.
|
ISingleCollection<ST> |
getUniformBillingLocator49National()
Retrieves the Uniform Billing Locator 49 National.
|
ISingleCollection<ST> |
getUniformBillingLocator56State()
Retrieves the Uniform Billing Locator 56 State.
|
ST |
getUniformBillingLocator57National()
Retrieves the Uniform Billing Locator 57 National.
|
ISingleCollection<ST> |
getUniformBillingLocator78State()
Retrieves the Uniform Billing Locator 78 State.
|
ISingleCollection<UVC> |
getValueAmountAndCode()
Retrieves the Value Amount And Code.
|
void |
setCoInsuranceDays(ST objcoInsuranceDays)
Set the CoInsuranceDays.
|
void |
setCoInsuranceDays(java.lang.String strCoInsuranceDays)
Set the CoInsuranceDays.
|
void |
setConditionCode(ISingleCollection<CWE> objConditionCodeList)
Set the ConditionCode list.
|
void |
setCoveredDays(ST objcoveredDays)
Set the Covered Days.
|
void |
setCoveredDays(java.lang.String strCoveredDays)
Set the Covered Days.
|
void |
setDocumentControlNumber(ISingleCollection<ST> objDocumentControlNumberList)
Set the DocumentControlNumber list.
|
void |
setNonCoveredDays(ST objnonCoveredDays)
Set the Non Covered Days.
|
void |
setNonCoveredDays(java.lang.String strNonCoveredDays)
Set the Non Covered Days.
|
void |
setOccuranceCodeAndDate(ISingleCollection<OCD> objOccuranceCodeAndDateList)
Set the OccuranceCodeAndDate list.
|
void |
setOccuranceSpanCodeOrDates(ISingleCollection<OSP> objOccuranceSpanCodeOrDatesList)
Set the OccuranceSpanCodeOrDates list.
|
void |
setSetID(SI objsetID)
Set the Set ID.
|
void |
setSetID(java.lang.String strSquenceID)
Set the Set ID.
|
void |
setSpecialVisitCount(NM objspecialVisitCount)
Set the Special Visit Count.
|
void |
setSpecialVisitCount(java.lang.String strSpecialVisitCount)
Set the Special Visit Count.
|
void |
setUniformBillingLocator11State(ISingleCollection<ST> objUniformBillingLocator11StateList)
Set the UniformBillingLocator11State list.
|
void |
setUniformBillingLocator2State(ISingleCollection<ST> objUniformBillingLocator2StateList)
Set the UniformBillingLocator2State list.
|
void |
setUniformBillingLocator31National(ST objUniformBillingLocator31National)
Set the UniformBilling Locator 31 National.
|
void |
setUniformBillingLocator31National(java.lang.String strUniformBillingLocator31National)
Set the UniformBilling Locator 31 National.
|
void |
setUniformBillingLocator49National(ISingleCollection<ST> objUniformBillingLocator49NationalList)
Set the UniformBillingLocator49National list.
|
void |
setUniformBillingLocator56State(ISingleCollection<ST> objUniformBillingLocator56StateList)
Set the UniformBillingLocator56State list.
|
void |
setUniformBillingLocator57National(ST objUniformBillingLocator57National)
Set the UniformBilling Locator 57 National.
|
void |
setUniformBillingLocator57National(java.lang.String strUniformBillingLocator57National)
Set the UniformBilling Locator 57 National.
|
void |
setUniformBillingLocator78State(ISingleCollection<ST> objUniformBillingLocator78StateList)
Set the UniformBillingLocator78State list.
|
void |
setValueAmountAndCode(ISingleCollection<UVC> objValueAmountAndCodeList)
Set the ValueAmountAndCode list.
|
boolean |
validate()
Validates HL7 Message objects .
|
addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, parse, removeDataElement, removeDataElement, serialize, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXMLpublic SI getSetID()
public ST getCoInsuranceDays()
public ISingleCollection<CWE> getConditionCode()
public ST getCoveredDays()
public ST getNonCoveredDays()
public ISingleCollection<UVC> getValueAmountAndCode()
public ISingleCollection<OCD> getOccuranceCodeAndDate()
public ISingleCollection<OSP> getOccuranceSpanCodeOrDates()
public ISingleCollection<ST> getUniformBillingLocator2State()
public ISingleCollection<ST> getUniformBillingLocator11State()
public ST getUniformBillingLocator31National()
public ISingleCollection<ST> getDocumentControlNumber()
public ISingleCollection<ST> getUniformBillingLocator49National()
public ISingleCollection<ST> getUniformBillingLocator56State()
public ST getUniformBillingLocator57National()
public ISingleCollection<ST> getUniformBillingLocator78State()
public NM getSpecialVisitCount()
public void setCoInsuranceDays(java.lang.String strCoInsuranceDays)
strCoInsuranceDays - Use as CoInsuranceDays.public void setCoInsuranceDays(ST objcoInsuranceDays)
objcoInsuranceDays - Use as CoInsuranceDays.public void addConditionCode(java.lang.String strIdentifier,
java.lang.String strText,
java.lang.String strNameOfCodingSystem,
java.lang.String strAlternateIdentifier,
java.lang.String strAlternateText,
java.lang.String strNameOfAlternateCodingSystem,
java.lang.String strCodingSystemVersionID,
java.lang.String strAlternateCodingSystemVersionId,
java.lang.String strOriginalText,
java.lang.String strSecondAlternateIdentifier,
java.lang.String strSecondAlternateText,
java.lang.String strNameofSecondAlternateCodingSystem,
java.lang.String strSecondAlternateCodingSystemVersionID,
java.lang.String strCodingSystemOID,
java.lang.String strValueSetOID,
java.lang.String strValueSetVersionID,
java.lang.String strAlternateCodingSystemOID,
java.lang.String strAlternateValueSetOID,
java.lang.String strAlternateValueSetVersionID,
java.lang.String strSecondAlternateCodingSystemOID,
java.lang.String strSecondAlternateValueSetOID,
java.lang.String strSecondAlternateValueSetVersionID)
strIdentifier - Specifies of characters (the code) that uniquely identifies the item being referenced.strText - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.strNameOfCodingSystem - Identifies the coding scheme being used in the identifier component.strAlternateIdentifier - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.strAlternateText - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.strNameOfAlternateCodingSystem - Identifies the coding scheme being used in the alternate identifier component.strCodingSystemVersionID - A sequence of characters that uniquely identifies a second alternate code.strAlternateCodingSystemVersionId - This component carries the version for the coding system identified by components 4-6.strOriginalText - The text as seen and/or selected by the user who entered the data.strSecondAlternateIdentifier - A sequence of characters that uniquely identifies a second alternate code.strSecondAlternateText - The descriptive or textual name of the alternate identifier.strNameofSecondAlternateCodingSystem - Identifies the coding scheme being used in the alternate identifier component.strSecondAlternateCodingSystemVersionID - This component carries the version for the coding system identified by components 10-12.strCodingSystemOID - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.strValueSetOID - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.strValueSetVersionID - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.strAlternateCodingSystemOID - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.strAlternateValueSetOID - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.strAlternateValueSetVersionID - This component carries the version for the value set identified by CWE.18. The version is a date.strSecondAlternateCodingSystemOID - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.strSecondAlternateValueSetOID - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.strSecondAlternateValueSetVersionID - This component carries the version for the value set identified by CWE.21. The version is a date.public void addConditionCode(CWE objtempConditionCode)
objtempConditionCode - Use as ConditionCode.public void setConditionCode(ISingleCollection<CWE> objConditionCodeList)
objConditionCodeList - List of ConditionCodepublic void setCoveredDays(java.lang.String strCoveredDays)
strCoveredDays - Use as CoveredDays.public void setCoveredDays(ST objcoveredDays)
objcoveredDays - Use as CoveredDays.public void addDocumentControlNumber(java.lang.String strDocumentControlNumber)
strDocumentControlNumber - Use as DocumentControlNumber.public void addDocumentControlNumber(ST objtempDocumentControlNumber)
objtempDocumentControlNumber - Use as DocumentControlNumber.public void setDocumentControlNumber(ISingleCollection<ST> objDocumentControlNumberList)
objDocumentControlNumberList - List of DocumentControlNumberpublic void setNonCoveredDays(java.lang.String strNonCoveredDays)
strNonCoveredDays - Use as NonCoveredDays.public void setNonCoveredDays(ST objnonCoveredDays)
objnonCoveredDays - Use as NonCoveredDays.public void addOccuranceCodeAndDate(CNE objOccuranceCode, java.lang.String strOccuranceDate)
objOccuranceCode - Use as OccuranceCode.strOccuranceDate - Use as OccuranceDate.public void addOccuranceCodeAndDate(OCD tempOccuranceCodeAndDate)
tempOccuranceCodeAndDate - Occurrence Code And Datepublic void setOccuranceCodeAndDate(ISingleCollection<OCD> objOccuranceCodeAndDateList)
objOccuranceCodeAndDateList - List of OccuranceCodeAndDatepublic void addOccuranceSpanCodeOrDates(CNE objOccurrenceSpanCode, java.lang.String strOccuranceSpanStartDate, java.lang.String strOccuranceSpanStopDate)
objOccuranceSpanDate - Use as OccuranceSpanDatestrOccuranceSpanStartDate - Use as OccuranceSpanStartDatestrOccuranceSpanStopDate - Use as OccuranceSpanStopDatepublic void addOccuranceSpanCodeOrDates(OSP tempOccuranceSpanCodeOrDates)
tempOccuranceSpanCodeOrDates - Occurance Span Code Or Dates.strOccuranceSpanStopDate - Use as OccuranceSpanStopDatepublic void setOccuranceSpanCodeOrDates(ISingleCollection<OSP> objOccuranceSpanCodeOrDatesList)
objOccuranceSpanCodeOrDatesList - List of OccuranceSpanCodeOrDatespublic void setSetID(java.lang.String strSquenceID)
strSquenceID - Use as SquenceID.public void setSetID(SI objsetID)
objsetID - Use as SquenceID.public void setSpecialVisitCount(java.lang.String strSpecialVisitCount)
strSpecialVisitCount - Use as SpecialVisitCount.public void setSpecialVisitCount(NM objspecialVisitCount)
objspecialVisitCount - Use as SpecialVisitCount.public void addUniformBillingLocator11State(java.lang.String strUniformBillingLocator11State)
strUniformBillingLocator11State - Use as UniformBillingLocator11Statepublic void addUniformBillingLocator11State(ST objtempUniformBillingLocator11State)
objtempUniformBillingLocator11State - Use as UniformBillingLocator11Statepublic void setUniformBillingLocator11State(ISingleCollection<ST> objUniformBillingLocator11StateList)
objOccuranceCodeAndDateList - List of UniformBillingLocator11Statepublic void addUniformBillingLocator2State(java.lang.String strUniformBillingLocator2State)
strUniformBillingLocator2State - Use as UniformBillingLocator2Statepublic void addUniformBillingLocator2State(ST objtempUniformBillingLocator2State)
objtempUniformBillingLocator2State - Use as UniformBillingLocator2Statepublic void setUniformBillingLocator2State(ISingleCollection<ST> objUniformBillingLocator2StateList)
objOccuranceCodeAndDateList - List of UniformBillingLocator2Statepublic void setUniformBillingLocator31National(java.lang.String strUniformBillingLocator31National)
strUniformBillingLocator31National - Use as UniformBillingLocator31Nationalpublic void setUniformBillingLocator31National(ST objUniformBillingLocator31National)
objUniformBillingLocator31National - Use as UniformBillingLocator31Nationalpublic void addUniformBillingLocator49National(java.lang.String strUniformBillingLocator49National)
strUniformBillingLocator49National - Use as UniformBillingLocator49National.public void addUniformBillingLocator49National(ST objtempUniformBillingLocator49National)
objtempUniformBillingLocator49National - Use as UniformBillingLocator49National.public void setUniformBillingLocator49National(ISingleCollection<ST> objUniformBillingLocator49NationalList)
objUniformBillingLocator49NationalList - List of UniformBillingLocator49Nationalpublic void addUniformBillingLocator56State(java.lang.String strUniformBillingLocator56State)
strUniformBillingLocator56State - Use as UniformBillingLocator56State.public void addUniformBillingLocator56State(ST objtempUniformBillingLocator56State)
objtempUniformBillingLocator56State - Use as UniformBillingLocator56State.public void setUniformBillingLocator56State(ISingleCollection<ST> objUniformBillingLocator56StateList)
objUniformBillingLocator56StateList - List of UniformBillingLocator56Statepublic void setUniformBillingLocator57National(java.lang.String strUniformBillingLocator57National)
strUniformBillingLocator57National - Use as UniformBillingLocator57National.public void setUniformBillingLocator57National(ST objUniformBillingLocator57National)
objUniformBillingLocator57National - Use as UniformBillingLocator57National.public void addUniformBillingLocator78State(java.lang.String strUniformBillingLocator78State)
strUniformBillingLocator78State - Use as UniformBillingLocator78State.public void addUniformBillingLocator78State(ST objtempUniformBillingLocator78State)
objtempUniformBillingLocator78State - Use as UniformBillingLocator78State.public void setUniformBillingLocator78State(ISingleCollection<ST> objUniformBillingLocator78StateList)
objUniformBillingLocator78StateList - List of UniformBillingLocator78Statepublic void addValueAmountAndCode(CWE objValueCode, MO objValueAmount, NM objNonMonetaryValueAmountQuantity, CWE objNonMonetaryValueAmountUnits)
objValueCode - Contains Value CodeobjValueAmount - Contains Value AmountobjNonMonetaryValueAmountQuantity - Specifies the numeric amount when needed to pair with the value when it is non-monetary.objNonMonetaryValueAmountUnits - This component species the units in which the non-monetary quantity is expressed. Refer to the Unified Code for Units of Measure (UCUM) for valid valuespublic void addValueAmountAndCode(UVC tempValueAmountAndCode)
tempValueAmountAndCode - Value Amount And Codepublic void setValueAmountAndCode(ISingleCollection<UVC> objValueAmountAndCodeList)
objValueAmountAndCodeList - List of ValueAmountAndCodepublic boolean validate()
throws InvalidSegmentException
validate in interface ISegmentvalidate in class SegmentInvalidSegmentException - Throws when Segment Validation fails.