class txHL7.receiver.AbstractHL7Receiver

Bases: txHL7.receiver.AbstractReceiver

Abstract base class implementation of txHL7.receiver.IHL7Receiver

Return type:txHL7.receiver.HL7MessageContainer

alias of HL7MessageContainer

class txHL7.receiver.AbstractReceiver

Bases: builtins.object

Abstract base class implementation of txHL7.receiver.IHL7Receiver


alias of MessageContainer

class txHL7.receiver.HL7MessageContainer(raw_message)

Bases: txHL7.receiver.MessageContainer

Message implementation that parses using python-hl7


Return HL7 ACK created from the source message.

Return type:unicode
interface txHL7.receiver.IHL7Receiver

Interface that must be implemented by MLLP protocol receiver instances


Clients should parse the message and return an instance of txHL7.receiver.MessageContainer or subclass.

Return type:txHL7.receiver.MessageContainer

Clients must implement handleMessage, which takes a message_container argument that is the txHL7.receiver.MessageContainer instance returned from txHL7.receiver.IHL7Receiver.parseMessage(). The implementation, if non-blocking, may directly return the ack/nack message or can return the ack/nack within a twisted.internet.defer.Deferred. If the implementation involves any blocking code, the implementation must return the result as twisted.internet.defer.Deferred (possibly by using twisted.internet.threads.deferToThread()), to prevent the event loop from being blocked.


Clients should return the codec name [1]_ and error handling scheme [2]_, used when decoding into unicode.

Return type:tuple(codec, errors)

Clients should return the idle timeout in seconds, or None for no timeout

Return type:int
class txHL7.receiver.LoggingReceiver

Bases: txHL7.receiver.AbstractHL7Receiver

Simple MLLP receiver implementation that logs and ACKs messages.

class txHL7.receiver.MessageContainer(raw_message)

Bases: builtins.object

Base class for messages returned from txHL7.receiver.IHL7Receiver.parseMessage() and passed to txHL7.receiver.IHL7Receiver.handleMessage()


Return unicode acknowledgement message, or None for no ACK.

ack_code options are one of AA (accept), AR (reject), AE (error)

Return type:unicode

Handle a twisted errback twisted.python.failure.Failure failure. Subclasses can override to log errors or handle them in a different way. Default implementation returns a rejection ACK.

Return type:unicode


class txHL7.mllp.MinimalLowerLayerProtocol

Bases: twisted.internet.protocol.Protocol, twisted.protocols.policies.TimeoutMixin

Minimal Lower-Layer Protocol (MLLP) takes the form:

<VT>[HL7 Message]<FS><CR>



MLLP Plugin

class twisted.plugins.mllp_plugin.MLLPServiceMaker

Bases: builtins.object

Service maker for the MLLP server.


Construct a server using MLLPFactory.

Return type:twisted.application.internet.StreamServerEndpointService

alias of Options

class twisted.plugins.mllp_plugin.Options

Bases: twisted.python.usage.Options

Define the options accepted by the twistd mllp plugin