View Javadoc
1   /*
2    * Copyright 2018 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.audit;
17  
18  import lombok.Getter;
19  import lombok.Setter;
20  import org.openehealth.ipf.commons.ihe.ws.cxf.audit.WsAuditDataset;
21  
22  
23  /**
24   * Generic audit dataset for IHE PIX/PDQ v3 transactions.
25   *
26   * @author Dmytro Rud
27   */
28  public class Hl7v3AuditDataset extends WsAuditDataset {
29  
30      private static final long serialVersionUID = -7303748425104562452L;
31  
32      /** HL7v3 message ID. */
33      @Getter @Setter private String messageId;
34  
35      /** HL7v3 query ID. */
36      @Getter @Setter private String queryId;
37  
38      /** Home ID of the target community. */
39      @Getter @Setter private String homeCommunityId;
40  
41      /** Request message type (name of the root element). */
42      @Getter @Setter private String requestType;
43  
44      /** Patient ID list. */
45      @Getter @Setter private String[] patientIds;
46  
47      /** Old patient ID. */
48      @Getter @Setter private String oldPatientId;
49  
50      public Hl7v3AuditDataset(boolean serverSide) {
51          super(serverSide);
52      }
53  
54      public String getPatientId() {
55          return ((patientIds != null) && (patientIds.length > 0)) ? patientIds[0] : null;
56      }
57  
58  }