public class FHS extends Segment
The FHS segment defines the intent, source, destination, and some specifics of the syntax of a File.
Represents an HL7 FHS File header segment. This segment has the following fields:
FHS-1: Field Separator (ST)Required
FHS-2: Encoding Characters (ST)Required
FHS-3: Sending Application (HD)Optional
FHS-4: Sending Facility (HD)Optional
FHS-5: Receiving Application (HD)Optional
FHS-6: Receiving Facility (HD)Optional
FHS-7: Date/Time Of File (DTM)Optional
FHS-8: File Security (ST)Optional
FHS-9: File Type (ST)Optional
FHS-10: File Comment (ST)Optional
FHS-11: File Control ID (ST)Optional
FHS-12: Reference File Control ID (ST)Optional
FHS-13: File Sending Network Address (HD)Optional
FHS-14: File Receiving Network Address (HD)Optional
User can also create Segment through SegmentFactory
| Constructor and Description |
|---|
FHS()
Constructs the FHS segment.
|
| Modifier and Type | Method and Description |
|---|---|
DTM |
getDateTimeOfFile()
Retrieves the Date Time Of File.
|
IDelimiter |
getDelimiter()
Retrieves the Delimiter.
|
ST |
getEncodingChar()
Retrieves the Encoding Char.
|
ST |
getFieldSeparator()
Retrieves the Field Separator.
|
ST |
getFileControlID()
Retrieves the File Control ID.
|
ST |
getFileHeaderComment()
Retrieves the File Comment.
|
ST |
getFileName()
Retrieves the File Type.
|
HD |
getFileReceivingNetworkAddress()
Retrieves the File Receiving Network Address.
|
HD |
getFileSendingNetworkAddress()
Retrieves the File Sending Network Address.
|
HD |
getReceivingApplication()
Retrieves the Receiving Application.
|
HD |
getReceivingFacility()
Retrieves the Receiving Facility.
|
ST |
getReferenceFileControlID()
Retrieves the Reference File Control ID.
|
ST |
getSecurity()
Retrieves the Security.
|
HD |
getSendingApplication()
Retrieves the Sending Application.
|
HD |
getSendingFacility()
Retrieves the Sending Facility.
|
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 |
setdateTimeOfFile(DTM objdateTimeOfFile)
Sets the Date Time Of File.
|
void |
setdateTimeOfFile(java.lang.String strTime)
Set the Date Time Of File.
|
void |
setEncodingChars(char cComponentSeparator,
char cSubComponentSeparator,
char cRepetitionSeparator,
char cEscapeCharacter)
Set the Encoding Char.
|
void |
setEncodingChars(ST objencodingChar)
Set the Encoding Char.
|
void |
setFieldSeparator(char cfieldSeparator)
Set the Field Separator.
|
void |
setFieldSeparator(ST objfieldSeparator)
Set the Field Separator.
|
void |
setFileControlID(ST objfileControlID)
Set the File Control ID.
|
void |
setFileControlID(java.lang.String strFileControlID)
Set the File Control ID.
|
void |
setFileHeaderComment(ST objfileHeaderComment)
Set the file Comment.
|
void |
setFileHeaderComment(java.lang.String strfileComment)
Set the file Comment.
|
void |
setFileName(ST objfileName)
Set the File Type.
|
void |
setFileName(java.lang.String strFileName)
Set the File Type.
|
void |
setFileReceivingNetworkAddress(HD objReceivingApplication)
Set the File Receiving Network Address.
|
void |
setFileReceivingNetworkAddress(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the File Receiving Network Address.
|
void |
setFileSendingNetworkAddress(HD objReceivingApplication)
Set the File Sending Network Address.
|
void |
setFileSendingNetworkAddress(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the File Sending Network Address.
|
void |
setReceivingApplication(HD objreceivingApplication)
Set the Receiving Application.
|
void |
setReceivingApplication(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Receiving Application.
|
void |
setReceivingFacility(HD objreceivingFacility)
Set the Receiving Facility.
|
void |
setReceivingFacility(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Receiving Facility.
|
void |
setReferenceFileControlID(ST objreferenceFileControlID)
Set the Reference File Control ID.
|
void |
setReferenceFileControlID(java.lang.String strreferenceFileControlID)
Set the Reference File Control ID.
|
void |
setSecurity(ST objsecurity)
Set the Security.
|
void |
setSecurity(java.lang.String strSecurity)
Set the Security.
|
void |
setSendingApplication(HD objsendingApplication)
Set the Sending Application.
|
void |
setSendingApplication(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Sending Application.
|
void |
setSendingFacility(HD objsendingFacility)
Set the Sending Facility.
|
void |
setSendingFacility(java.lang.String strNamespaceId,
java.lang.String strUniversalId,
java.lang.String strUniversalIdType)
Set the Sending Facility.
|
boolean |
validate()
Validates HL7 Message objects .
|
addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, removeDataElement, removeDataElement, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXMLpublic IDelimiter getDelimiter()
public DTM getDateTimeOfFile()
public ST getEncodingChar()
public ST getFieldSeparator()
public ST getFileControlID()
public HD getReceivingApplication()
public HD getReceivingFacility()
public ST getSecurity()
public HD getSendingApplication()
public HD getSendingFacility()
public ST getFileName()
public void setFieldSeparator(char cfieldSeparator)
cfieldSeparator - Use as cfieldSeparator.public void setFieldSeparator(ST objfieldSeparator)
objfieldSeparator - object of Field Separator.public void setEncodingChars(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 setEncodingChars(ST objencodingChar)
objencodingChar - object of Encoding Char.public void setdateTimeOfFile(java.lang.String strTime)
strTime - Specifies a point in time using a 24-hour clock notation.public void setdateTimeOfFile(DTM objdateTimeOfFile)
objdateTimeOfFile - object of Date Time Of File.public void setFileControlID(java.lang.String strFileControlID)
strFileControlID - Specifies a number or other identifier that uniquely identifies the File.public void setFileControlID(ST objfileControlID)
objfileControlID - object of File Control ID.public void setFileName(java.lang.String strFileName)
strFileName - Specifies the File type code.public void setFileName(ST objfileName)
objfileName - object of File Name.public void setReceivingApplication(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 setReceivingApplication(HD objreceivingApplication)
objreceivingApplication - object of Receiving Application.public void setReceivingFacility(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 setReceivingFacility(HD objreceivingFacility)
objreceivingFacility - object of Receiving Facility.public void setSecurity(java.lang.String strSecurity)
strSecurity - Specifies a field ,that is used to implement security features.public void setSecurity(ST objsecurity)
objsecurity - object of Security.public void setSendingApplication(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 setSendingApplication(HD objsendingApplication)
objsendingApplication - object of Sending Application.public void setSendingFacility(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 setSendingFacility(HD objsendingFacility)
objsendingFacility - object of Sending Facility.public void setFileHeaderComment(java.lang.String strfileComment)
strfileComment - Specifies the file Comment.public void setFileHeaderComment(ST objfileHeaderComment)
objfileHeaderComment - object of File header Comment.public ST getFileHeaderComment()
public void setReferenceFileControlID(java.lang.String strreferenceFileControlID)
strreferenceFileControlID - Specifies a number or other identifier that uniquely identifies the File.public void setReferenceFileControlID(ST objreferenceFileControlID)
objreferenceFileControlID - object of Reference File Control ID.public ST getReferenceFileControlID()
public HD getFileSendingNetworkAddress()
public void setFileSendingNetworkAddress(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 setFileSendingNetworkAddress(HD objReceivingApplication)
objReceivingApplication - Object of Receiving Application.public HD getFileReceivingNetworkAddress()
public void setFileReceivingNetworkAddress(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 setFileReceivingNetworkAddress(HD objReceivingApplication)
objReceivingApplication - Object of Receiving Application.public 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.