public class Hl7v2TransactionConfiguration<T extends MllpAuditDataset> extends TransactionConfiguration<T>
Constructor and Description |
---|
Hl7v2TransactionConfiguration(String name,
String description,
boolean isQuery,
AuditStrategy<T> clientAuditStrategy,
AuditStrategy<T> serverAuditStrategy,
ca.uhn.hl7v2.Version[] hl7Versions,
String sendingApplication,
String sendingFacility,
ca.uhn.hl7v2.ErrorCode requestErrorDefaultErrorCode,
ca.uhn.hl7v2.ErrorCode responseErrorDefaultErrorCode,
String[] allowedRequestMessageTypes,
String[] allowedRequestTriggerEvents,
String[] allowedResponseMessageTypes,
String[] allowedResponseTriggerEvents,
boolean[] auditabilityFlags,
boolean[] responseContinuabilityFlags,
ca.uhn.hl7v2.HapiContext hapiContext)
Constructor.
|
Hl7v2TransactionConfiguration(String name,
String description,
boolean isQuery,
AuditStrategy<T> clientAuditStrategy,
AuditStrategy<T> serverAuditStrategy,
ca.uhn.hl7v2.Version hl7Version,
String sendingApplication,
String sendingFacility,
ca.uhn.hl7v2.ErrorCode requestErrorDefaultErrorCode,
ca.uhn.hl7v2.ErrorCode responseErrorDefaultErrorCode,
String allowedRequestMessageType,
String allowedRequestTriggerEvent,
String allowedResponseMessageType,
String allowedResponseTriggerEvent,
boolean auditabilityFlag,
boolean responseContinuabilityFlag,
ca.uhn.hl7v2.HapiContext hapiContext) |
Modifier and Type | Method and Description |
---|---|
void |
checkMessageAcceptance(ca.uhn.hl7v2.model.Message message,
boolean isRequest)
Performs acceptance test of the given message.
|
void |
checkMessageAcceptance(String messageType,
String triggerEvent,
String messageStructure,
String version,
boolean isRequest)
Performs acceptance test of the message with the given attributes.
|
void |
checkRequestAcceptance(ca.uhn.hl7v2.model.Message message)
Performs transaction-specific acceptance test of the given request message.
|
void |
checkResponseAcceptance(ca.uhn.hl7v2.model.Message message)
Performs transaction-specific acceptance test of the given response message.
|
String[] |
getAllowedRequestMessageTypes() |
String[] |
getAllowedRequestTriggerEvents() |
String[] |
getAllowedResponseMessageTypes() |
String[] |
getAllowedResponseTriggerEvents() |
ca.uhn.hl7v2.HapiContext |
getHapiContext() |
ca.uhn.hl7v2.Version[] |
getHl7Versions() |
ca.uhn.hl7v2.parser.Parser |
getParser() |
ca.uhn.hl7v2.ErrorCode |
getRequestErrorDefaultErrorCode() |
ca.uhn.hl7v2.ErrorCode |
getResponseErrorDefaultErrorCode() |
String |
getSendingApplication() |
String |
getSendingFacility() |
boolean |
isAuditable(String messageType)
Returns
true when request messages of the given type are auditable. |
boolean |
isContinuable(String messageType)
Returns
true when request messages of the given type
can be split by means of interactive continuation. |
boolean |
isDataStartSegment(List<String> segments,
int index)
Returns
true if the given element of the given list
contains a start segment of a data record. |
boolean |
isFooterStartSegment(List<String> segments,
int index)
Returns
true if the given element of the given list
contains a segment which belongs to segments following the data
records ("footer"). |
<M extends ca.uhn.hl7v2.model.Message> |
request()
Like
request(String, String) , but uses the first configured request message type
and the first configured trigger event as defaults. |
<M extends ca.uhn.hl7v2.model.Message> |
request(String trigger)
Like
request(String, String) , but uses the first configured request message type as default. |
<M extends ca.uhn.hl7v2.model.Message> |
request(String messageType,
String trigger)
Makes a valid request for this transaction.
|
getClientAuditStrategy, getDescription, getName, getServerAuditStrategy, isQuery
public Hl7v2TransactionConfiguration(String name, String description, boolean isQuery, AuditStrategy<T> clientAuditStrategy, AuditStrategy<T> serverAuditStrategy, ca.uhn.hl7v2.Version[] hl7Versions, String sendingApplication, String sendingFacility, ca.uhn.hl7v2.ErrorCode requestErrorDefaultErrorCode, ca.uhn.hl7v2.ErrorCode responseErrorDefaultErrorCode, String[] allowedRequestMessageTypes, String[] allowedRequestTriggerEvents, String[] allowedResponseMessageTypes, String[] allowedResponseTriggerEvents, boolean[] auditabilityFlags, boolean[] responseContinuabilityFlags, ca.uhn.hl7v2.HapiContext hapiContext)
hl7Versions
- HL7 versions for acceptance checks (MSH-12). The first version of this array is used for default NAKs.sendingApplication
- sending application for default NAKs (MSH-3).sendingFacility
- sending application for default NAKs (MSH-4).requestErrorDefaultErrorCode
- default error code for request-related NAKs.responseErrorDefaultErrorCode
- default error code for response-related NAKs.allowedRequestMessageTypes
- array of allowed request message types,
e.g. {"ADT", "MDM"}
.allowedRequestTriggerEvents
- array of allowed request trigger events
for each request message type,
e.g. {"A01 A02 A03", "T06 T07 T08"}
.allowedResponseMessageTypes
- array of allowed response message types, e.g. {"ACK", "RSP"}
.allowedResponseTriggerEvents
- array of allowed response trigger events for each message type,
ignored for messages of type "ACK".auditabilityFlags
- flags of whether the messages of corresponding
message type should be audited.
If null
, the transaction will not perform any auditing.responseContinuabilityFlags
- flags of whether the messages of corresponding
message type should support HL7 response continuations.
If null
, no continuations will be supported.hapiContext
- transaction-specific HAPI Contextpublic Hl7v2TransactionConfiguration(String name, String description, boolean isQuery, AuditStrategy<T> clientAuditStrategy, AuditStrategy<T> serverAuditStrategy, ca.uhn.hl7v2.Version hl7Version, String sendingApplication, String sendingFacility, ca.uhn.hl7v2.ErrorCode requestErrorDefaultErrorCode, ca.uhn.hl7v2.ErrorCode responseErrorDefaultErrorCode, String allowedRequestMessageType, String allowedRequestTriggerEvent, String allowedResponseMessageType, String allowedResponseTriggerEvent, boolean auditabilityFlag, boolean responseContinuabilityFlag, ca.uhn.hl7v2.HapiContext hapiContext)
public boolean isAuditable(String messageType)
true
when request messages of the given type are auditable.public boolean isContinuable(String messageType)
true
when request messages of the given type
can be split by means of interactive continuation.
When this method returns true, the request message structure must
be able to contain segments RCP, QPD, DSC; and the response message
structure -- segments DSC, QAK.public boolean isDataStartSegment(List<String> segments, int index)
true
if the given element of the given list
contains a start segment of a data record.public boolean isFooterStartSegment(List<String> segments, int index)
true
if the given element of the given list
contains a segment which belongs to segments following the data
records ("footer").public void checkRequestAcceptance(ca.uhn.hl7v2.model.Message message) throws Hl7v2AcceptanceException
message
- Message
object.Hl7v2AcceptanceException
public void checkResponseAcceptance(ca.uhn.hl7v2.model.Message message) throws Hl7v2AcceptanceException
message
- Message
object.Hl7v2AcceptanceException
public void checkMessageAcceptance(ca.uhn.hl7v2.model.Message message, boolean isRequest) throws Hl7v2AcceptanceException
message
- HAPI Message
object.isRequest
- true
iff the message is a request.Hl7v2AcceptanceException
- when the message is not acceptable.public void checkMessageAcceptance(String messageType, String triggerEvent, String messageStructure, String version, boolean isRequest) throws Hl7v2AcceptanceException
messageType
- value from MSH-9-1, can be empty or null
.triggerEvent
- value from MSH-9-2, can be empty or null
.messageStructure
- value from MSH-9-3, can be empty or null
.version
- value from MSH-12, can be empty or null
.isRequest
- true
iff the message under consideration is a request.Hl7v2AcceptanceException
- when the message is not acceptable.public ca.uhn.hl7v2.parser.Parser getParser()
public <M extends ca.uhn.hl7v2.model.Message> M request(String messageType, String trigger)
messageType
- message type, e.g. ADTtrigger
- trigger event, e.g. A01HL7v2Exception
- if the message type or trigger event is not valid for this transactionpublic <M extends ca.uhn.hl7v2.model.Message> M request(String trigger)
request(String, String)
, but uses the first configured request message type as default.public <M extends ca.uhn.hl7v2.model.Message> M request()
request(String, String)
, but uses the first configured request message type
and the first configured trigger event as defaults.@Generated(value="lombok") public String getSendingApplication()
@Generated(value="lombok") public String getSendingFacility()
@Generated(value="lombok") public ca.uhn.hl7v2.ErrorCode getRequestErrorDefaultErrorCode()
@Generated(value="lombok") public ca.uhn.hl7v2.ErrorCode getResponseErrorDefaultErrorCode()
@Generated(value="lombok") public ca.uhn.hl7v2.HapiContext getHapiContext()
@Generated(value="lombok") public String[] getAllowedRequestMessageTypes()
@Generated(value="lombok") public String[] getAllowedRequestTriggerEvents()
@Generated(value="lombok") public String[] getAllowedResponseMessageTypes()
@Generated(value="lombok") public String[] getAllowedResponseTriggerEvents()
@Generated(value="lombok") public ca.uhn.hl7v2.Version[] getHl7Versions()
Copyright © 2018 Open eHealth Foundation. All rights reserved.