Net_HL7
[ class tree: Net_HL7 ] [ index: Net_HL7 ] [ all elements ]

Class: Net_HL7_Messages_ACK

Source Location: /Net_HL7-0.1.1/Net/HL7/Messages/ACK.php

Class Overview

Net_HL7_Message
   |
   --Net_HL7_Messages_ACK

Class specifying the HL7 message, both request and response.


Author(s):

Version:

  • $Revision: 1.8 $

Methods


Inherited Variables

Inherited Methods

Class: Net_HL7_Message

Net_HL7_Message::Net_HL7_Message()
Constructor for Net_HL7_Message. Consider using the HL7 factory to obtain a message instead.
Net_HL7_Message::addSegment()
Add a segment.
Net_HL7_Message::getSegmentAsString()
Get the segment identified by index as string, using the messsages separators.
Net_HL7_Message::getSegmentByIndex()
Return the segment specified by $index.
Net_HL7_Message::getSegmentFieldAsString()
Get the field identified by $fldIndex from segment $segIndex.
Net_HL7_Message::getSegments()
Return an array containing all segments in the right order.
Net_HL7_Message::getSegmentsByName()
Return an array of all segments with the given name
Net_HL7_Message::insertSegment()
Insert a segment.
Net_HL7_Message::removeSegmentByIndex()
Remove the segment indexed by $index.
Net_HL7_Message::setSegment()
Set the segment on index.
Net_HL7_Message::toString()
Return a string representation of this message.

Class Details

[line 21]
Class specifying the HL7 message, both request and response.

In general one needn't create an instance of the Net_HL7_Message class directly, but use the Net_HL7 factory class to create one. When adding segments, note that the segment index starts at 0, so to get the first segment, do

.

The segment separator defaults to \015. To change this, set the global variable $_Net_HL7_SEGMENT_SEPARATOR.



[ Top ]


Method Detail

Net_HL7_Messages_ACK (Constructor)   [line 42]

Net_HL7_Messages_ACK Net_HL7_Messages_ACK( [ $req = ""])

Usage:

  1.  $ack = new Net_HL7_Messages_ACK($request);

Convenience module implementing an acknowledgement (ACK) message. This can be used in HL7 servers to create an acknowledgement for an incoming message.


Parameters:

   $req   — 

[ Top ]

setAckCode   [line 103]

boolean setAckCode( mixed $code, [mixed $msg = ""])

Set the acknowledgement code for the acknowledgement. Code should be

one of: A, E, R. Codes can be prepended with C or A, denoting enhanced or normal acknowledge mode. This denotes: accept, general error and reject respectively. The ACK module will determine the right answer mode (normal or enhanced) based upon the request, if not provided. The message provided in $msg will be set in MSA 3.

  • Access: public

Parameters:

mixed   $code   —  Code to use in acknowledgement
mixed   $msg   —  Acknowledgement message

[ Top ]

setErrorMessage   [line 134]

boolean setErrorMessage( mixed $msg)

Set the error message for the acknowledgement. This will also set the error code to either AE or CE, depending on the mode of the incoming message.
  • Access: public

Parameters:

mixed   $msg   —  Error message

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:32:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.