1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.hl7v3;
17
18 import lombok.AllArgsConstructor;
19 import lombok.Getter;
20 import org.openehealth.ipf.commons.ihe.core.IntegrationProfile;
21 import org.openehealth.ipf.commons.ihe.core.InteractionId;
22 import org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3ValidationProfile.Row;
23 import org.openehealth.ipf.commons.ihe.hl7v3.iti55.Iti55AuditStrategy;
24 import org.openehealth.ipf.commons.ihe.hl7v3.iti55.Iti55PortType;
25 import org.openehealth.ipf.commons.ihe.hl7v3.iti55.asyncresponse.Iti55AsyncResponsePortType;
26 import org.openehealth.ipf.commons.ihe.hl7v3.iti55.asyncresponse.Iti55DeferredResponsePortType;
27 import org.openehealth.ipf.commons.ihe.hl7v3.iti56.Iti56AuditStrategy;
28 import org.openehealth.ipf.commons.ihe.hl7v3.iti56.Iti56PortType;
29 import org.openehealth.ipf.commons.ihe.hl7v3.iti56.asyncresponse.Iti56AsyncResponsePortType;
30
31 import javax.xml.namespace.QName;
32 import java.util.Arrays;
33 import java.util.List;
34
35 import static org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3ValidationProfile.DEFAULT_XSD;
36 import static org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3ValidationProfile.GAZELLE_PIXPDQV3_SCHEMATRON;
37
38
39
40
41
42 public class XCPD implements IntegrationProfile {
43
44 @AllArgsConstructor
45 public enum Interactions implements Hl7v3InteractionId<Hl7v3WsTransactionConfiguration> {
46 ITI_55 (ITI_55_WS_CONFIG),
47 ITI_55_ASYNC_RESPONSE (ITI_55_ASYNC_RESPONSE_WS_CONFIG),
48 ITI_55_DEFERRED_RESPONSE(ITI_55_DEFERRED_RESPONSE_WS_CONFIG),
49 ITI_56 (ITI56_WS_CONFIG),
50 ITI_56_ASYNC_RESPONSE (ITI_56_ASYNC_RESPONSE_WS_CONFIG);
51
52 @Getter private Hl7v3WsTransactionConfiguration wsTransactionConfiguration;
53
54 }
55
56 @Override
57 public List<InteractionId> getInteractionIds() {
58 return Arrays.asList(Interactions.values());
59 }
60
61 private static final Hl7v3ValidationProfile ITI_55_REQUEST_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
62 new Row("PRPA_IN201305UV02", DEFAULT_XSD, "/schematron/iti55/PRPA_IN201305UV02.sch.xml")
63 );
64
65 private static final Hl7v3ValidationProfile ITI_56_REQUEST_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
66 new Row("PatientLocationQueryRequest", "/schema/IHE/XCPD_PLQ.xsd", null)
67 );
68
69 private static final Hl7v3ValidationProfile ITI_55_RESPONSE_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
70 new Row("PRPA_IN201306UV02", DEFAULT_XSD, "/schematron/iti55/PRPA_IN201306UV02.sch.xml"),
71 new Row("MCCI_IN000002UV01", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON)
72 );
73
74 private static final Hl7v3ValidationProfile ITI_56_RESPONSE_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
75 new Row("PatientLocationQueryResponse", "/schema/IHE/XCPD_PLQ.xsd", null)
76 );
77
78 private final static String NS_URI = "urn:ihe:iti:xcpd:2009";
79 private final static Hl7v3WsTransactionConfiguration ITI_55_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
80 "xcpd-iti55",
81 "Cross Gateway Patient Discovery",
82 true,
83 new Iti55AuditStrategy(false),
84 new Iti55AuditStrategy(true),
85 new QName(NS_URI, "RespondingGateway_Service", "xcpd"),
86 Iti55PortType.class,
87 new QName(NS_URI, "RespondingGateway_Binding_Soap12", "xcpd"),
88 false,
89 "wsdl/iti55/iti55-raw.wsdl",
90 "PRPA_IN201306UV02",
91 "PRPA_TE201306UV02",
92 false,
93 true,
94 ITI_55_REQUEST_VALIDATION_PROFILE,
95 ITI_55_RESPONSE_VALIDATION_PROFILE);
96
97 private final static Hl7v3WsTransactionConfiguration ITI_55_ASYNC_RESPONSE_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
98 "xcpd-iti55-async-response",
99 "Cross Gateway Patient Discovery",
100 true,
101 null,
102 new Iti55AuditStrategy(false),
103 new QName(NS_URI, "InitiatingGateway_Service", "xcpd"),
104 Iti55AsyncResponsePortType.class,
105 new QName(NS_URI, "InitiatingGateway_Binding", "xcpd"),
106 false,
107 "wsdl/iti55/iti55-asyncresponse-raw.wsdl",
108 null,
109 null,
110 false,
111 false,
112 ITI_55_REQUEST_VALIDATION_PROFILE,
113 ITI_55_RESPONSE_VALIDATION_PROFILE);
114
115 private final static Hl7v3WsTransactionConfiguration ITI_55_DEFERRED_RESPONSE_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
116 "xcpd-iti55-deferred-response",
117 "Cross Gateway Patient Discovery",
118 true,
119 null,
120 new Iti55AuditStrategy(false),
121 new QName(NS_URI, "InitiatingGateway_Service", "xcpd"),
122 Iti55DeferredResponsePortType.class,
123 new QName(NS_URI, "InitiatingGatewayDeferredResponse_Binding", "xcpd"),
124 false,
125 "wsdl/iti55/iti55-deferred-response-raw.wsdl",
126 null,
127 null,
128 false,
129 false,
130 ITI_55_REQUEST_VALIDATION_PROFILE,
131 ITI_55_RESPONSE_VALIDATION_PROFILE);
132
133 private final static Hl7v3WsTransactionConfiguration ITI56_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
134 "xcpd-iti56",
135 "Cross Gateway Patient Location Query",
136 true,
137 new Iti56AuditStrategy(false),
138 new Iti56AuditStrategy(true),
139 new QName(NS_URI, "RespondingGateway_Service", "xcpd"),
140 Iti56PortType.class,
141 new QName(NS_URI, "RespondingGateway_Binding_Soap12", "xcpd"),
142 false,
143 "wsdl/iti56/iti56-raw.wsdl",
144 null,
145 null,
146 true,
147 true,
148 ITI_56_REQUEST_VALIDATION_PROFILE,
149 ITI_56_RESPONSE_VALIDATION_PROFILE);
150
151 private final static Hl7v3WsTransactionConfiguration ITI_56_ASYNC_RESPONSE_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
152 "xcpd-iti56-async-response",
153 "Cross Gateway Patient Location Query",
154 true,
155 null,
156 new Iti56AuditStrategy(false),
157 new QName(NS_URI, "InitiatingGateway_Service", "xcpd"),
158 Iti56AsyncResponsePortType.class,
159 new QName(NS_URI, "InitiatingGateway_Binding", "xcpd"),
160 false,
161 "wsdl/iti56/iti56-asyncresponse-raw.wsdl",
162 null,
163 null,
164 false,
165 false,
166 ITI_56_REQUEST_VALIDATION_PROFILE,
167 ITI_56_RESPONSE_VALIDATION_PROFILE);
168
169 }