1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.hl7v2;
17
18 import ca.uhn.hl7v2.ErrorCode;
19 import ca.uhn.hl7v2.HapiContext;
20 import ca.uhn.hl7v2.Version;
21 import org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy;
22 import org.openehealth.ipf.commons.ihe.hl7v2.audit.QueryAuditDataset;
23
24 import java.util.List;
25
26
27
28
29
30
31 public class PdqTransactionConfiguration extends Hl7v2TransactionConfiguration<QueryAuditDataset> {
32
33 public PdqTransactionConfiguration(
34 String name,
35 String description,
36 boolean isQuery,
37 AuditStrategy<QueryAuditDataset> clientAuditStrategy,
38 AuditStrategy<QueryAuditDataset> serverAuditStrategy,
39 Version[] hl7Version,
40 String sendingApplication,
41 String sendingFacility,
42 ErrorCode requestErrorDefaultErrorCode,
43 ErrorCode responseErrorDefaultErrorCode,
44 String[] allowedRequestMessageTypes,
45 String[] allowedRequestTriggerEvents,
46 String[] allowedResponseMessageTypes,
47 String[] allowedResponseTriggerEvents,
48 boolean[] auditabilityFlags,
49 boolean[] responseContinuabilityFlags,
50 HapiContext hapiContext)
51 {
52 super(name, description, isQuery, clientAuditStrategy, serverAuditStrategy,
53 hl7Version, sendingApplication, sendingFacility,
54 requestErrorDefaultErrorCode,
55 responseErrorDefaultErrorCode, allowedRequestMessageTypes,
56 allowedRequestTriggerEvents, allowedResponseMessageTypes,
57 allowedResponseTriggerEvents, auditabilityFlags,
58 responseContinuabilityFlags, hapiContext);
59 }
60
61 @Override
62 public boolean isDataStartSegment(List<String> segments, int index) {
63 return segments.get(index).startsWith("PID");
64 }
65
66 @Override
67 public boolean isFooterStartSegment(List<String> segments, int index) {
68 return segments.get(index).startsWith("DSC");
69 }
70 }