View Javadoc
1   /*
2    * Copyright 2016 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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.iti44.Iti44AuditStrategy;
24  import org.openehealth.ipf.commons.ihe.hl7v3.iti44.Iti44PixPortType;
25  import org.openehealth.ipf.commons.ihe.hl7v3.iti44.Iti44XdsPortType;
26  import org.openehealth.ipf.commons.ihe.hl7v3.iti45.Iti45AuditStrategy;
27  import org.openehealth.ipf.commons.ihe.hl7v3.iti45.Iti45PortType;
28  import org.openehealth.ipf.commons.ihe.hl7v3.iti46.Iti46AuditStrategy;
29  import org.openehealth.ipf.commons.ihe.hl7v3.iti46.Iti46PortType;
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   * @author Christian Ohr
40   * @since 3.2
41   */
42  public class PIXV3 implements IntegrationProfile {
43  
44      @AllArgsConstructor
45      public enum Interactions implements Hl7v3InteractionId<Hl7v3WsTransactionConfiguration> {
46          ITI_44_PIX(ITI_44_PIX_WS_CONFIG),
47          ITI_44_XDS(ITI_44_XDS_WS_CONFIG),
48          ITI_45(ITI_45_WS_CONFIG),
49          ITI_46(ITI_46_WS_CONFIG);
50  
51          @Getter private Hl7v3WsTransactionConfiguration wsTransactionConfiguration;
52      }
53  
54      @Override
55      public List<InteractionId> getInteractionIds() {
56          return Arrays.asList(Interactions.values());
57      }
58  
59      private static final String NS_URI_PIX = "urn:ihe:iti:pixv3:2007";
60      private static final String NS_URI_XDS = "urn:ihe:iti:xds-b:2007";
61  
62      private static final Hl7v3ValidationProfile ITI_44_REQUEST_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
63              new Row("PRPA_IN201301UV02", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON),
64              new Row("PRPA_IN201302UV02", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON),
65              new Row("PRPA_IN201304UV02", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON)
66      );
67  
68      private static final Hl7v3ValidationProfile ITI_44_RESPONSE_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
69              new Row("MCCI_IN000002UV01", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON)
70      );
71  
72      private static final Hl7v3ValidationProfile ITI_45_REQUEST_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
73              new Row("PRPA_IN201309UV02", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON)
74      );
75  
76      private static final Hl7v3ValidationProfile ITI_45_RESPONSE_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
77              new Row("PRPA_IN201310UV02", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON)
78      );
79  
80      private static final Hl7v3ValidationProfile ITI_46_REQUEST_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
81              new Row("PRPA_IN201302UV02", DEFAULT_XSD, null)
82      );
83  
84      private static final Hl7v3ValidationProfile ITI_46_RESPONSE_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
85              new Row("MCCI_IN000002UV01", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON)
86      );
87  
88      private static final Hl7v3WsTransactionConfiguration ITI_44_PIX_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
89              "pixv3-iti44",
90              "Patient Identity Feed HL7 V3",
91              false,
92              new Iti44AuditStrategy(false),
93              new Iti44AuditStrategy(true),
94              new QName(NS_URI_PIX, "PIXManager_Service", "ihe"),
95              Iti44PixPortType.class,
96              new QName(NS_URI_PIX, "PIXManager_Binding_Soap12", "ihe"),
97              false,
98              "wsdl/iti44/iti44-pix-raw.wsdl",
99              "MCCI_IN000002UV01",
100             null,
101             false,
102             false,
103             ITI_44_REQUEST_VALIDATION_PROFILE,
104             ITI_44_RESPONSE_VALIDATION_PROFILE);
105 
106     private final static Hl7v3WsTransactionConfiguration ITI_44_XDS_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
107             "xds-iti44",
108             ITI_44_PIX_WS_CONFIG.getDescription(),
109             ITI_44_PIX_WS_CONFIG.isQuery(),
110             ITI_44_PIX_WS_CONFIG.getClientAuditStrategy(),
111             ITI_44_PIX_WS_CONFIG.getServerAuditStrategy(),
112             new QName(NS_URI_XDS, "DocumentRegistry_Service", "ihe"),
113             Iti44XdsPortType.class,
114             new QName(NS_URI_XDS, "DocumentRegistry_Binding_Soap12", "ihe"),
115             false,
116             "wsdl/iti44/iti44-xds-raw.wsdl",
117             "MCCI_IN000002UV01",
118             null,
119             false,
120             false,
121             ITI_44_REQUEST_VALIDATION_PROFILE,
122             ITI_44_RESPONSE_VALIDATION_PROFILE);
123 
124     private static final Hl7v3WsTransactionConfiguration ITI_45_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
125             "pixv3-iti45",
126             "PIXV3 Query",
127             true,
128             new Iti45AuditStrategy(false),
129             new Iti45AuditStrategy(true),
130             new QName(NS_URI_PIX, "PIXManager_Service", "ihe"),
131             Iti45PortType.class,
132             new QName(NS_URI_PIX, "PIXManager_Binding_Soap12", "ihe"),
133             false,
134             "wsdl/iti45/iti45-raw.wsdl",
135             "PRPA_IN201310UV02",
136             "PRPA_TE201310UV02",
137             false,
138             false,
139             ITI_45_REQUEST_VALIDATION_PROFILE,
140             ITI_45_RESPONSE_VALIDATION_PROFILE);
141 
142     private final static Hl7v3WsTransactionConfiguration ITI_46_WS_CONFIG = new Hl7v3WsTransactionConfiguration(
143             "pixv3-iti46",
144             "PIXV3 Update Notification",
145             false,
146             new Iti46AuditStrategy(false),
147             new Iti46AuditStrategy(true),
148             new QName(NS_URI_PIX, "PIXConsumer_Service", "ihe"),
149             Iti46PortType.class,
150             new QName(NS_URI_PIX, "PIXConsumer_Binding_Soap12", "ihe"),
151             false,
152             "wsdl/iti46/iti46-raw.wsdl",
153             "MCCI_IN000002UV01",
154             null,
155             false,
156             false,
157             ITI_46_REQUEST_VALIDATION_PROFILE,
158             ITI_46_RESPONSE_VALIDATION_PROFILE);
159 
160 }