public class BHS extends Segment
The BHS segment defines the intent, source, destination, and some specifics of the syntax of a Batch.
Represents an HL7 BHS Batch header segment. This segment has the following fields:
BHS-1: Field Separator (ST)Required
BHS-2: Encoding Characters (ST)Required
BHS-3: Sending Application (HD)Optional
BHS-4: Sending Facility (HD)Optional
BHS-5: Receiving Application (HD)Optional
BHS-6: Receiving Facility (HD)Optional
BHS-7: Date/Time Of Batch (DTM)Optional
BHS-8: Batch Security (ST)Optional
BHS-9: Batch Type (ST)Optional
BHS-10: Batch Comment (ST)Optional
BHS-11: Batch Control ID (ST)Optional
BHS-12: Reference Batch Control ID (ST)Optional
BHS-13: Batch Sending Network Address (HD)Optional
BHS-14: Batch Receiving Network Address (HD)Optional
User can also create Segment through SegmentFactory
| Constructor and Description |
|---|
BHS()
Constructs the BHS segment.
|
| Modifier and Type | Method and Description |
|---|---|
ST |
getBatchComment()
Retrieves the Batch Comment.
|
ST |
getBatchControlID()
Retrieves the Batch Control ID.
|
DTM |
getBatchCreationDateTime()
Retrieves the Date Time Of Batch.
|
ST |
getBatchEncodingChar()
Retrieves the Encoding Char.
|
ST |
getBatchFieldSeparator()
Retrieves the Field Separator.
|
ST |
getBatchName_ID_Type()
Retrieves the Batch Type.
|
HD |
getBatchReceivingApplication()
Retrieves the Receiving Application.
|
HD |
getBatchReceivingFacility()
Retrieves the Receiving Facility.
|
HD |
getBatchReceivingNetworkAddressn()
Retrieves the Batch Receiving Network Address.
|
ST |
getBatchSecurity()
Retrieves the Security.
|
HD |
getBatchSendingApplication()
Retrieves the Sending Application.
|
HD |
getBatchSendingFacility()
Retrieves the Sending Facility.
|
HD |
getBatchSendingNetworkAddressn()
Retrieves the Batch Sending Network Address.
|
IDelimiter |
getDelimiter()
Retrieves the Delimiter.
|
ST |
getReferenceBatchControlID()
Retrieves the Reference Batch Control ID.
|
int |
parse(java.lang.String strSegmentStream,
IDelimiter objIDelimiter)
Parses HL7 Segment Strings from any Stream into HL7 Segment object.
|
int |
serialize(IHL7Stream objIHL7Stream,
IDelimiter objIDelimiter)
Serializes HL7 Message objects.
|
void |
setBatchComment(ST objBatchComment)
Set the Batch Comment.
|
void |
setBatchComment(java.lang.String strBatchComment)
Set the Batch Comment.
|
void |
setBatchControlID(ST objBatchControlID)
Set the Batch Control ID.
|
void |
setBatchControlID(java.lang.String strbatchControlID)
Set the Batch Control ID.
|
void |
setBatchCreationDateTime(DTM objDateTimeOfBatch)
Set the Date Time Of Batch.
|
void |
setBatchCreationDateTime(java.lang.String strTime)
Set the Date Time Of Batch.
|
void |
setBatchEncodingChars(char cComponentSeparator,
char cSubComponentSeparator,
char cRepetitionSeparator,
char cEscapeCharacter)
Set the Encoding Char.
|
void |
setBatchEncodingChars(ST objencodingChar)
Set the Encoding Char.
|
void |
setBatchFieldSeparator(char cfieldSeparator)
Set the Field Separator.
|
void |
setBatchFieldSeparator(ST objfieldSeparator)
Set the Field Separator.
|
void |
setBatchName_ID_Type(ST objBatchType)
Set the Batch Type.
|
void |
setBatchName_ID_Type(java.lang.String strBatchType)
Set the Batch Type.
|
void |
setBatchReceivingApplication(HD objReceivingApplication)
Set the Receiving Application.
|
void |
setBatchReceivingApplication(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Receiving Application.
|
void |
setBatchReceivingFacility(HD objReceivingFacility)
Set the Receiving Facility.
|
void |
setBatchReceivingFacility(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Receiving Facility.
|
void |
setBatchReceivingNetworkAddress(HD objBatchReceivingNetworkAddress)
Set the Batch Receiving Network Address.
|
void |
setBatchReceivingNetworkAddress(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Batch Receiving Network Address.
|
void |
setBatchSecurity(ST objSecurity)
Set the Security.
|
void |
setBatchSecurity(java.lang.String strSecurity)
Set the Security.
|
void |
setBatchSendingApplication(HD objSendingApplication)
Set the Sending Application.
|
void |
setBatchSendingApplication(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Sending Application.
|
void |
setBatchSendingFacility(HD objSendingFacility)
Set the Sending Facility.
|
void |
setBatchSendingFacility(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Sending Facility.
|
void |
setBatchSendingNetworkAddress(HD objBatchSendingNetworkAddress)
Set the Batch Sending Network Address.
|
void |
setBatchSendingNetworkAddress(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Batch Sending Network Address.
|
void |
setReferenceBatchControlID(ST objReferenceBatchControlID)
Set the Reference Batch Control ID.
|
void |
setReferenceBatchControlID(java.lang.String strReferenceBatchControlID)
Set the Reference Batch Control ID.
|
boolean |
validate()
Validates HL7 Message objects .
|
addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, removeDataElement, removeDataElement, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXMLpublic IDelimiter getDelimiter()
public DTM getBatchCreationDateTime()
public ST getBatchEncodingChar()
public ST getBatchFieldSeparator()
public ST getBatchControlID()
public ST getReferenceBatchControlID()
public HD getBatchReceivingApplication()
public HD getBatchReceivingFacility()
public ST getBatchSecurity()
public HD getBatchSendingApplication()
public HD getBatchSendingFacility()
public ST getBatchName_ID_Type()
public ST getBatchComment()
public HD getBatchSendingNetworkAddressn()
public HD getBatchReceivingNetworkAddressn()
public void setBatchFieldSeparator(char cfieldSeparator)
cfieldSeparator - Use as cfieldSeparator.public void setBatchFieldSeparator(ST objfieldSeparator)
objfieldSeparator - object of fieldSeparator.public void setBatchEncodingChars(char cComponentSeparator,
char cSubComponentSeparator,
char cRepetitionSeparator,
char cEscapeCharacter)
cComponentSeparator - Delimiter Use as ComponentSeparatorcSubComponentSeparator - Delimiter Use as SubComponentSeparatorcRepetitionSeparator - Delimiter Use as RepetitionSeparatorcEscapeCharacter - Delimiter Use as EscapeCharacterpublic void setBatchEncodingChars(ST objencodingChar)
objencodingChar - object of Encoding Char.public void setBatchCreationDateTime(java.lang.String strTime)
strTime - Specifies a point in time using a 24-hour clock notation.public void setBatchCreationDateTime(DTM objDateTimeOfBatch)
objDateTimeOfBatch - Object of Date Time Of Batch.public void setBatchControlID(java.lang.String strbatchControlID)
strbatchControlID - Specifies a number or other identifier that uniquely identifies the Batch.public void setBatchControlID(ST objBatchControlID)
objBatchControlID - Object of Batch Control ID.public void setReferenceBatchControlID(java.lang.String strReferenceBatchControlID)
strReferenceBatchControlID - Specifies a number or other identifier that uniquely identifies the Batch.public void setReferenceBatchControlID(ST objReferenceBatchControlID)
objReferenceBatchControlID - Object of Reference Batch Control ID.public void setBatchName_ID_Type(java.lang.String strBatchType)
strBatchType - Specifies the Batch type code.public void setBatchName_ID_Type(ST objBatchType)
objBatchType - Object of Batch Type.public void setBatchComment(java.lang.String strBatchComment)
strBatchComment - Specifies the Batch Comment.public void setBatchComment(ST objBatchComment)
objBatchComment - Object of Batch Comment.public void setBatchReceivingApplication(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
strNamespaceId - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]strUniversalId - Specifies a string formatted according to the scheme defined by the component, strUniversalIdType - Governs the interpretation of the strUniversalId.public void setBatchReceivingApplication(HD objReceivingApplication)
objReceivingApplication - Object of Receiving Application.public void setBatchReceivingFacility(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
strNamespaceId - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]strUniversalId - Specifies a string formatted according to the scheme defined by the component, strUniversalIdType - Governs the interpretation of the strUniversalId.public void setBatchReceivingFacility(HD objReceivingFacility)
objReceivingFacility - Object of Receiving Facility.public void setBatchSecurity(java.lang.String strSecurity)
strSecurity - Specifies a field ,that is used to implement security features.public void setBatchSecurity(ST objSecurity)
objSecurity - Object of Security.public void setBatchSendingApplication(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
strNamespaceId - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]strUniversalId - Specifies a string formatted according to the scheme defined by the component, strUniversalIdType - Governs the interpretation of the strUniversalId.public void setBatchSendingApplication(HD objSendingApplication)
objSendingApplication - object of Sending Applicationpublic void setBatchSendingFacility(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
strNamespaceId - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]strUniversalId - Specifies a string formatted according to the scheme defined by the component, strUniversalIdType - Governs the interpretation of the strUniversalId.public void setBatchSendingFacility(HD objSendingFacility)
objSendingFacility - object of Sending Facility.public void setBatchSendingNetworkAddress(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
strNamespaceId - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]strUniversalId - Specifies a string formatted according to the scheme defined by the component, strUniversalIdType - Governs the interpretation of the strUniversalId.public void setBatchSendingNetworkAddress(HD objBatchSendingNetworkAddress)
objBatchSendingNetworkAddress - object of Sending Applicationpublic void setBatchReceivingNetworkAddress(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
strNamespaceId - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]strUniversalId - Specifies a string formatted according to the scheme defined by the component, strUniversalIdType - Governs the interpretation of the strUniversalId.public void setBatchReceivingNetworkAddress(HD objBatchReceivingNetworkAddress)
objBatchReceivingNetworkAddress - object of Sending Applicationpublic boolean validate()
throws InvalidSegmentException
validate in interface ISegmentvalidate in class SegmentInvalidSegmentException - Thrown when Any of required filed is missing.public int serialize(IHL7Stream objIHL7Stream, IDelimiter objIDelimiter) throws SerializeException, java.io.IOException
serialize in interface ISegmentserialize in class SegmentobjIHL7Stream - Object of IHL7Stream.objIDelimiter - Object of class Delimiter.SerializeException - Thrown when serialization of Message fails.java.io.IOException - Signals that an I/O exception of some sort has occurred.public int parse(java.lang.String strSegmentStream,
IDelimiter objIDelimiter)
throws InvalidSegmentException,
java.io.IOException
parse in interface ISegmentparse in class SegmentstrSegmentStream - String of HL7Stream.objIDelimiter - Object of class Delimiter.InvalidSegmentException - Thrown when Field Validation Fails.java.io.IOException - Signals that an I/O exception of some sort has occurred.