ca.uhn.hl7v2.model.v24.segment
Class MSH

java.lang.Object
  extended by ca.uhn.hl7v2.model.AbstractSegment
      extended by ca.uhn.hl7v2.model.v24.segment.MSH
All Implemented Interfaces:
Segment, Structure, Serializable

public class MSH
extends AbstractSegment

Represents an HL7 MSH message segment (Message Header). This segment has the following fields:

See Also:
Serialized Form

Constructor Summary
MSH(Group parent, ModelClassFactory factory)
          Creates a new MSH segment
 
Method Summary
protected  Type createNewTypeWithoutReflection(int field)
          
 ID getAcceptAcknowledgmentType()
          Returns MSH-15: "Accept Acknowledgment Type" - creates it if necessary
 ID getAlternateCharacterSetHandlingScheme()
          Returns MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary
 ID getApplicationAcknowledgmentType()
          Returns MSH-16: "Application Acknowledgment Type" - creates it if necessary
 ID[] getCharacterSet()
          Returns all repetitions of Character Set (MSH-18).
 ID getCharacterSet(int rep)
          Returns a specific repetition of MSH-18: "Character Set" - creates it if necessary
 int getCharacterSetReps()
          Returns a count of the current number of repetitions of Character Set (MSH-18).
 ID[] getConformanceStatementID()
          Returns all repetitions of Conformance Statement ID (MSH-21).
 ID getConformanceStatementID(int rep)
          Returns a specific repetition of MSH-21: "Conformance Statement ID" - creates it if necessary
 int getConformanceStatementIDReps()
          Returns a count of the current number of repetitions of Conformance Statement ID (MSH-21).
 ST getContinuationPointer()
          Returns MSH-14: "Continuation Pointer" - creates it if necessary
 ID getCountryCode()
          Returns MSH-17: "Country Code" - creates it if necessary
 TS getDateTimeOfMessage()
          Returns MSH-7: "Date/Time Of Message" - creates it if necessary
 ST getEncodingCharacters()
          Returns MSH-2: "Encoding Characters" - creates it if necessary
 ST getFieldSeparator()
          Returns MSH-1: "Field Separator" - creates it if necessary
 ST getMessageControlID()
          Returns MSH-10: "Message Control ID" - creates it if necessary
 MSG getMessageType()
          Returns MSH-9: "Message Type" - creates it if necessary
 ST getMsh1_FieldSeparator()
          Returns MSH-1: "Field Separator" - creates it if necessary
 ST getMsh10_MessageControlID()
          Returns MSH-10: "Message Control ID" - creates it if necessary
 PT getMsh11_ProcessingID()
          Returns MSH-11: "Processing ID" - creates it if necessary
 VID getMsh12_VersionID()
          Returns MSH-12: "Version ID" - creates it if necessary
 NM getMsh13_SequenceNumber()
          Returns MSH-13: "Sequence Number" - creates it if necessary
 ST getMsh14_ContinuationPointer()
          Returns MSH-14: "Continuation Pointer" - creates it if necessary
 ID getMsh15_AcceptAcknowledgmentType()
          Returns MSH-15: "Accept Acknowledgment Type" - creates it if necessary
 ID getMsh16_ApplicationAcknowledgmentType()
          Returns MSH-16: "Application Acknowledgment Type" - creates it if necessary
 ID getMsh17_CountryCode()
          Returns MSH-17: "Country Code" - creates it if necessary
 ID getMsh18_CharacterSet(int rep)
          Returns a specific repetition of MSH-18: "Character Set" - creates it if necessary
 int getMsh18_CharacterSetReps()
          Returns a count of the current number of repetitions of Character Set (MSH-18).
 CE getMsh19_PrincipalLanguageOfMessage()
          Returns MSH-19: "Principal Language Of Message" - creates it if necessary
 ST getMsh2_EncodingCharacters()
          Returns MSH-2: "Encoding Characters" - creates it if necessary
 ID getMsh20_AlternateCharacterSetHandlingScheme()
          Returns MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary
 ID getMsh21_ConformanceStatementID(int rep)
          Returns a specific repetition of MSH-21: "Conformance Statement ID" - creates it if necessary
 int getMsh21_ConformanceStatementIDReps()
          Returns a count of the current number of repetitions of Conformance Statement ID (MSH-21).
 HD getMsh3_SendingApplication()
          Returns MSH-3: "Sending Application" - creates it if necessary
 HD getMsh4_SendingFacility()
          Returns MSH-4: "Sending Facility" - creates it if necessary
 HD getMsh5_ReceivingApplication()
          Returns MSH-5: "Receiving Application" - creates it if necessary
 HD getMsh6_ReceivingFacility()
          Returns MSH-6: "Receiving Facility" - creates it if necessary
 TS getMsh7_DateTimeOfMessage()
          Returns MSH-7: "Date/Time Of Message" - creates it if necessary
 ST getMsh8_Security()
          Returns MSH-8: "Security" - creates it if necessary
 MSG getMsh9_MessageType()
          Returns MSH-9: "Message Type" - creates it if necessary
 CE getPrincipalLanguageOfMessage()
          Returns MSH-19: "Principal Language Of Message" - creates it if necessary
 PT getProcessingID()
          Returns MSH-11: "Processing ID" - creates it if necessary
 HD getReceivingApplication()
          Returns MSH-5: "Receiving Application" - creates it if necessary
 HD getReceivingFacility()
          Returns MSH-6: "Receiving Facility" - creates it if necessary
 ST getSecurity()
          Returns MSH-8: "Security" - creates it if necessary
 HD getSendingApplication()
          Returns MSH-3: "Sending Application" - creates it if necessary
 HD getSendingFacility()
          Returns MSH-4: "Sending Facility" - creates it if necessary
 NM getSequenceNumber()
          Returns MSH-13: "Sequence Number" - creates it if necessary
 VID getVersionID()
          Returns MSH-12: "Version ID" - creates it if necessary
 ID insertCharacterSet(int rep)
          Inserts a repetition of MSH-18: "Character Set" at a specific index
 ID insertConformanceStatementID(int rep)
          Inserts a repetition of MSH-21: "Conformance Statement ID" at a specific index
 ID insertMsh18_CharacterSet(int rep)
          Inserts a repetition of MSH-18: "Character Set" at a specific index
 ID insertMsh21_ConformanceStatementID(int rep)
          Inserts a repetition of MSH-21: "Conformance Statement ID" at a specific index
 ID removeCharacterSet(int rep)
          Removes a repetition of MSH-18: "Character Set" at a specific index
 ID removeConformanceStatementID(int rep)
          Removes a repetition of MSH-21: "Conformance Statement ID" at a specific index
 ID removeMsh18_CharacterSet(int rep)
          Removes a repetition of MSH-18: "Character Set" at a specific index
 ID removeMsh21_ConformanceStatementID(int rep)
          Removes a repetition of MSH-21: "Conformance Statement ID" at a specific index
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractSegment
add, add, clear, encode, getField, getField, getLength, getMaxCardinality, getMessage, getName, getNames, getParent, insertRepetition, isRequired, main, numFields, parse, removeRepetition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSH

public MSH(Group parent,
           ModelClassFactory factory)
Creates a new MSH segment

Method Detail

getFieldSeparator

public ST getFieldSeparator()
Returns MSH-1: "Field Separator" - creates it if necessary


getMsh1_FieldSeparator

public ST getMsh1_FieldSeparator()
Returns MSH-1: "Field Separator" - creates it if necessary


getEncodingCharacters

public ST getEncodingCharacters()
Returns MSH-2: "Encoding Characters" - creates it if necessary


getMsh2_EncodingCharacters

public ST getMsh2_EncodingCharacters()
Returns MSH-2: "Encoding Characters" - creates it if necessary


getSendingApplication

public HD getSendingApplication()
Returns MSH-3: "Sending Application" - creates it if necessary


getMsh3_SendingApplication

public HD getMsh3_SendingApplication()
Returns MSH-3: "Sending Application" - creates it if necessary


getSendingFacility

public HD getSendingFacility()
Returns MSH-4: "Sending Facility" - creates it if necessary


getMsh4_SendingFacility

public HD getMsh4_SendingFacility()
Returns MSH-4: "Sending Facility" - creates it if necessary


getReceivingApplication

public HD getReceivingApplication()
Returns MSH-5: "Receiving Application" - creates it if necessary


getMsh5_ReceivingApplication

public HD getMsh5_ReceivingApplication()
Returns MSH-5: "Receiving Application" - creates it if necessary


getReceivingFacility

public HD getReceivingFacility()
Returns MSH-6: "Receiving Facility" - creates it if necessary


getMsh6_ReceivingFacility

public HD getMsh6_ReceivingFacility()
Returns MSH-6: "Receiving Facility" - creates it if necessary


getDateTimeOfMessage

public TS getDateTimeOfMessage()
Returns MSH-7: "Date/Time Of Message" - creates it if necessary


getMsh7_DateTimeOfMessage

public TS getMsh7_DateTimeOfMessage()
Returns MSH-7: "Date/Time Of Message" - creates it if necessary


getSecurity

public ST getSecurity()
Returns MSH-8: "Security" - creates it if necessary


getMsh8_Security

public ST getMsh8_Security()
Returns MSH-8: "Security" - creates it if necessary


getMessageType

public MSG getMessageType()
Returns MSH-9: "Message Type" - creates it if necessary


getMsh9_MessageType

public MSG getMsh9_MessageType()
Returns MSH-9: "Message Type" - creates it if necessary


getMessageControlID

public ST getMessageControlID()
Returns MSH-10: "Message Control ID" - creates it if necessary


getMsh10_MessageControlID

public ST getMsh10_MessageControlID()
Returns MSH-10: "Message Control ID" - creates it if necessary


getProcessingID

public PT getProcessingID()
Returns MSH-11: "Processing ID" - creates it if necessary


getMsh11_ProcessingID

public PT getMsh11_ProcessingID()
Returns MSH-11: "Processing ID" - creates it if necessary


getVersionID

public VID getVersionID()
Returns MSH-12: "Version ID" - creates it if necessary


getMsh12_VersionID

public VID getMsh12_VersionID()
Returns MSH-12: "Version ID" - creates it if necessary


getSequenceNumber

public NM getSequenceNumber()
Returns MSH-13: "Sequence Number" - creates it if necessary


getMsh13_SequenceNumber

public NM getMsh13_SequenceNumber()
Returns MSH-13: "Sequence Number" - creates it if necessary


getContinuationPointer

public ST getContinuationPointer()
Returns MSH-14: "Continuation Pointer" - creates it if necessary


getMsh14_ContinuationPointer

public ST getMsh14_ContinuationPointer()
Returns MSH-14: "Continuation Pointer" - creates it if necessary


getAcceptAcknowledgmentType

public ID getAcceptAcknowledgmentType()
Returns MSH-15: "Accept Acknowledgment Type" - creates it if necessary


getMsh15_AcceptAcknowledgmentType

public ID getMsh15_AcceptAcknowledgmentType()
Returns MSH-15: "Accept Acknowledgment Type" - creates it if necessary


getApplicationAcknowledgmentType

public ID getApplicationAcknowledgmentType()
Returns MSH-16: "Application Acknowledgment Type" - creates it if necessary


getMsh16_ApplicationAcknowledgmentType

public ID getMsh16_ApplicationAcknowledgmentType()
Returns MSH-16: "Application Acknowledgment Type" - creates it if necessary


getCountryCode

public ID getCountryCode()
Returns MSH-17: "Country Code" - creates it if necessary


getMsh17_CountryCode

public ID getMsh17_CountryCode()
Returns MSH-17: "Country Code" - creates it if necessary


getCharacterSet

public ID[] getCharacterSet()
Returns all repetitions of Character Set (MSH-18).


getCharacterSetReps

public int getCharacterSetReps()
Returns a count of the current number of repetitions of Character Set (MSH-18). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.


getCharacterSet

public ID getCharacterSet(int rep)
Returns a specific repetition of MSH-18: "Character Set" - creates it if necessary

Parameters:
rep - The repetition index (0-indexed)

getMsh18_CharacterSet

public ID getMsh18_CharacterSet(int rep)
Returns a specific repetition of MSH-18: "Character Set" - creates it if necessary

Parameters:
rep - The repetition index (0-indexed)

getMsh18_CharacterSetReps

public int getMsh18_CharacterSetReps()
Returns a count of the current number of repetitions of Character Set (MSH-18). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.


insertCharacterSet

public ID insertCharacterSet(int rep)
                      throws HL7Exception
Inserts a repetition of MSH-18: "Character Set" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

insertMsh18_CharacterSet

public ID insertMsh18_CharacterSet(int rep)
                            throws HL7Exception
Inserts a repetition of MSH-18: "Character Set" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

removeCharacterSet

public ID removeCharacterSet(int rep)
                      throws HL7Exception
Removes a repetition of MSH-18: "Character Set" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

removeMsh18_CharacterSet

public ID removeMsh18_CharacterSet(int rep)
                            throws HL7Exception
Removes a repetition of MSH-18: "Character Set" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

getPrincipalLanguageOfMessage

public CE getPrincipalLanguageOfMessage()
Returns MSH-19: "Principal Language Of Message" - creates it if necessary


getMsh19_PrincipalLanguageOfMessage

public CE getMsh19_PrincipalLanguageOfMessage()
Returns MSH-19: "Principal Language Of Message" - creates it if necessary


getAlternateCharacterSetHandlingScheme

public ID getAlternateCharacterSetHandlingScheme()
Returns MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary


getMsh20_AlternateCharacterSetHandlingScheme

public ID getMsh20_AlternateCharacterSetHandlingScheme()
Returns MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary


getConformanceStatementID

public ID[] getConformanceStatementID()
Returns all repetitions of Conformance Statement ID (MSH-21).


getConformanceStatementIDReps

public int getConformanceStatementIDReps()
Returns a count of the current number of repetitions of Conformance Statement ID (MSH-21). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.


getConformanceStatementID

public ID getConformanceStatementID(int rep)
Returns a specific repetition of MSH-21: "Conformance Statement ID" - creates it if necessary

Parameters:
rep - The repetition index (0-indexed)

getMsh21_ConformanceStatementID

public ID getMsh21_ConformanceStatementID(int rep)
Returns a specific repetition of MSH-21: "Conformance Statement ID" - creates it if necessary

Parameters:
rep - The repetition index (0-indexed)

getMsh21_ConformanceStatementIDReps

public int getMsh21_ConformanceStatementIDReps()
Returns a count of the current number of repetitions of Conformance Statement ID (MSH-21). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.


insertConformanceStatementID

public ID insertConformanceStatementID(int rep)
                                throws HL7Exception
Inserts a repetition of MSH-21: "Conformance Statement ID" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

insertMsh21_ConformanceStatementID

public ID insertMsh21_ConformanceStatementID(int rep)
                                      throws HL7Exception
Inserts a repetition of MSH-21: "Conformance Statement ID" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

removeConformanceStatementID

public ID removeConformanceStatementID(int rep)
                                throws HL7Exception
Removes a repetition of MSH-21: "Conformance Statement ID" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

removeMsh21_ConformanceStatementID

public ID removeMsh21_ConformanceStatementID(int rep)
                                      throws HL7Exception
Removes a repetition of MSH-21: "Conformance Statement ID" at a specific index

Parameters:
rep - The repetition index (0-indexed)
Throws:
HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)

createNewTypeWithoutReflection

protected Type createNewTypeWithoutReflection(int field)

Overrides:
createNewTypeWithoutReflection in class AbstractSegment


Copyright © 2001-2011 University Health Network. All Rights Reserved.