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.pcc1.Pcc1AuditStrategy;
24  import org.openehealth.ipf.commons.ihe.hl7v3.pcc1.Pcc1PortType;
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  
32  /**
33   * @author Christian Ohr
34   * @since 3.2
35   */
36  public class QED implements IntegrationProfile {
37  
38      @AllArgsConstructor
39      public enum Interactions implements Hl7v3InteractionId<Hl7v3ContinuationAwareWsTransactionConfiguration> {
40          PCC_1(PCC1_WS_CONFIG);
41  
42          @Getter private Hl7v3ContinuationAwareWsTransactionConfiguration wsTransactionConfiguration;
43      }
44  
45      @Override
46      public List<InteractionId> getInteractionIds() {
47          return Arrays.asList(Interactions.values());
48      }
49  
50  
51      private static final Hl7v3ValidationProfile PCC_1_REQUEST_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
52              new Row("QUPC_IN043100UV01",        DEFAULT_XSD, null),
53              new Row("QUQI_IN000003UV01",        DEFAULT_XSD, null),
54              new Row("QUQI_IN000003UV01_Cancel", DEFAULT_XSD, null)
55      );
56      private static final Hl7v3ValidationProfile PCC_1_RESPONSE_VALIDATION_PROFILE = new Hl7v3ValidationProfile(
57              new Row("QUPC_IN043200UV01", DEFAULT_XSD, null),
58              new Row("MCCI_IN000002UV01", DEFAULT_XSD, null)
59      );
60  
61      private final static String NS_URI = "urn:ihe:pcc:qed:2007";
62      private final static Hl7v3ContinuationAwareWsTransactionConfiguration PCC1_WS_CONFIG = new Hl7v3ContinuationAwareWsTransactionConfiguration(
63              "qed-pcc1",
64              "Query For Existing Data",
65              true,
66              new Pcc1AuditStrategy(false),
67              new Pcc1AuditStrategy(true),
68              new QName(NS_URI, "ClinicalDataSource_Service", "qed"),
69              Pcc1PortType.class,
70              new QName(NS_URI, "ClinicalDataSource_Binding_Soap12", "qed"),
71              false,
72              "wsdl/pcc1/pcc1-raw.wsdl",
73              "QUPC_IN043200UV01",
74              "QUPC_IN043200UV01",
75              false,
76              false,
77              PCC_1_REQUEST_VALIDATION_PROFILE,
78              PCC_1_RESPONSE_VALIDATION_PROFILE,
79              "QUPC_IN043100UV01",
80              "QUPC_IN043200UV01");
81  }