|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Message
Represents a complete HL7 message including all structures, segments, and fields.
Method Summary | |
---|---|
java.lang.String |
encode()
Encodes this message using the parser returned by getParser() |
Message |
generateACK()
Generates and returns an ACK message which would be used to acknowledge this message successfully, with an MSA-1 code of "AA". |
Message |
generateACK(java.lang.String theAcknowldegementCode,
HL7Exception theException)
Generates and returns an ACK message which would be used to acknowledge this message successfully. |
java.lang.String |
getEncodingCharactersValue()
Convenience method which retrieves the encoding characters value from the second field of the first segment. |
java.lang.Character |
getFieldSeparatorValue()
Convenience method which retrieves the field separator value from the first field of the first segment. |
Parser |
getParser()
Returns the parser to be used when parse/encode methods are called on this Message, as well as its children. |
ValidationContext |
getValidationContext()
|
java.lang.String |
getVersion()
Returns the version number of the HL7 version in which this message structure is defined (e.g. |
void |
parse(java.lang.String string)
Parses the string into this message using the parser returned by getParser() |
void |
setParser(Parser parser)
Sets the parser to be used when parse/encode methods are called on this Message, as well as its children. |
void |
setValidationContext(ValidationContext theContext)
|
Methods inherited from interface ca.uhn.hl7v2.model.Group |
---|
addNonstandardSegment, addNonstandardSegment, get, get, getAll, getClass, getNames, isRepeating, isRequired |
Methods inherited from interface ca.uhn.hl7v2.model.Structure |
---|
getMessage, getName, getParent |
Method Detail |
---|
java.lang.String getVersion()
ValidationContext getValidationContext()
void setValidationContext(ValidationContext theContext)
theContext
- the set of validation rules that are to apply to this messagejava.lang.Character getFieldSeparatorValue() throws HL7Exception
HL7Exception
- If an error occursjava.lang.String getEncodingCharactersValue() throws HL7Exception
HL7Exception
- If an error occursvoid setParser(Parser parser)
PipeParser
supports this functionality
Parser getParser()
PipeParser
void parse(java.lang.String string) throws HL7Exception
getParser()
HL7Exception
java.lang.String encode() throws HL7Exception
getParser()
HL7Exception
Message generateACK() throws HL7Exception, java.io.IOException
Generates and returns an ACK message which would be used to acknowledge this message successfully, with an MSA-1 code of "AA". The ACK generated will be of the same version as the value of MSH-12 in this message (as opposed to the version of the message class instance, if they are different)
Note that this method will fail if it is not possible to generate an ACK for any reason, such as
HL7Exception
- If the message can not be constructed
java.io.IOException
- If a failure occurs in generating a control ID for the messageMessage generateACK(java.lang.String theAcknowldegementCode, HL7Exception theException) throws HL7Exception, java.io.IOException
Generates and returns an ACK message which would be used to acknowledge this message successfully. The ACK generated will be of the same version as the value of MSH-12 in this message (as opposed to the version of the message class instance, if they are different)
Note that this method will fail if it is not possible to generate an ACK for any reason, such as
theAcknowldegementCode
- The acknowledement code (MSA-1) to supply. If null, defaults to "AA". To generate a typical NAK, use "AE"theException
- The exceptions used to populate the ERR segment (if any)
HL7Exception
- If the message can not be constructed
java.io.IOException
- If a failure occurs in generating a control ID for the message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |