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.iti47.Iti47AuditStrategy;
24  import org.openehealth.ipf.commons.ihe.hl7v3.iti47.Iti47PortType;
25  
26  import javax.xml.namespace.QName;
27  import java.util.Arrays;
28  import java.util.List;
29  
30  import static org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3ValidationProfile.DEFAULT_XSD;
31  import static org.openehealth.ipf.commons.ihe.hl7v3.Hl7v3ValidationProfile.GAZELLE_PIXPDQV3_SCHEMATRON;
32  
33  /**
34   * @author Christian Ohr
35   * @since 3.2
36   */
37  public class PDQV3 implements IntegrationProfile {
38  
39      @AllArgsConstructor
40      public enum Interactions implements Hl7v3InteractionId<Hl7v3ContinuationAwareWsTransactionConfiguration> {
41          ITI_47(ITI_47_WS_CONFIG);
42  
43          @Getter private Hl7v3ContinuationAwareWsTransactionConfiguration wsTransactionConfiguration;
44      }
45  
46      @Override
47      public List<InteractionId> getInteractionIds() {
48          return Arrays.asList(Interactions.values());
49      }
50  
51      private static final Hl7v3ValidationProfile ITI_47_REQUEST_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
52              new Row("PRPA_IN201305UV02", DEFAULT_XSD, "/schematron/iti47/PRPA_IN201305UV02.sch.xml"),
53              new Row("QUQI_IN000003UV01", DEFAULT_XSD, null),
54              new Row("QUQI_IN000003UV01_Cancel", DEFAULT_XSD, null)
55      );
56  
57      private static final Hl7v3ValidationProfile ITI_47_RESPONSE_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
58              new Row("PRPA_IN201306UV02", DEFAULT_XSD, "/schematron/iti47/PRPA_IN201306UV02.sch.xml"),
59              new Row("MCCI_IN000002UV01", DEFAULT_XSD, GAZELLE_PIXPDQV3_SCHEMATRON)
60      );
61  
62      private final static String NS_URI = "urn:ihe:iti:pdqv3:2007";
63      private final static Hl7v3ContinuationAwareWsTransactionConfiguration ITI_47_WS_CONFIG = new Hl7v3ContinuationAwareWsTransactionConfiguration(
64              "pdqv3-iti47",
65              "Patient Demographics Query HL7 V3",
66              true,
67              new Iti47AuditStrategy(false),
68              new Iti47AuditStrategy(true),
69              new QName(NS_URI, "PDSupplier_Service", "ihe"),
70              Iti47PortType.class,
71              new QName(NS_URI, "PDSupplier_Binding_Soap12", "ihe"),
72              false,
73              "wsdl/iti47/iti47-raw.wsdl",
74              "PRPA_IN201306UV02",
75              "PRPA_TE201306UV02",
76              false,
77              false,
78              ITI_47_REQUEST_VALIDATION_PROFILE,
79              ITI_47_RESPONSE_VALIDATION_PROFILE,
80              "PRPA_IN201305UV02",
81              "PRPA_IN201306UV02");
82  
83  }