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  
17  package org.openehealth.ipf.commons.audit.model;
18  
19  import lombok.Getter;
20  import lombok.Setter;
21  
22  import java.io.Serializable;
23  import java.util.ArrayList;
24  import java.util.List;
25  
26  /**
27   * @author Christian Ohr
28   * @since 3.5
29   */
30  public class DicomObjectDescriptionType implements Serializable, Validateable {
31  
32      /**
33       * A single value of True or False indicating whether or not the data was encrypted.
34       */
35      @Getter @Setter
36      private Boolean encrypted;
37  
38      /**
39       * A single value of True or False indicating whether or not all patient identifying information was removed from the data
40       */
41      @Getter @Setter
42      private Boolean anonymized;
43  
44  
45      /**
46       * MPPS Instance UID(s) associated with this participant object.
47       */
48      private List<String> mpps;
49  
50      /**
51       * Accession Number(s) associated with this participant object.
52       */
53      private List<String> accession;
54  
55      /**
56       * <p>The UIDs of SOP classes referred to in this participant object.</p>
57       * <p>Required if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") and any of the optional fields
58       * (AccessionNumber, ContainsMPPS, NumberOfInstances, ContainsSOPInstances,Encrypted,Anonymized) are present in this
59       * Participant Object. May be present if ParticipantObjectIDTypeCode is (110180, DCM, "Study Instance UID") even
60       * though none of the optional fields are present.</p>
61       */
62      private List<SOPClass> sopClasses;
63  
64      /**
65       * Study Instance UIDs
66       */
67      private List<String> studyIDs;
68  
69      public List<String> getMPPS() {
70          if (mpps == null) {
71              mpps = new ArrayList<>();
72          }
73          return this.mpps;
74      }
75  
76      public List<String> getAccession() {
77          if (accession == null) {
78              accession = new ArrayList<>();
79          }
80          return this.accession;
81      }
82  
83      public List<String> getStudyIDs() {
84          if (studyIDs == null) {
85              studyIDs = new ArrayList<>();
86          }
87          return this.studyIDs;
88      }
89  
90      public List<SOPClass> getSOPClasses() {
91          if (sopClasses == null) {
92              sopClasses = new ArrayList<>();
93          }
94          return this.sopClasses;
95      }
96  
97      @Override
98      public void validate() {
99  
100     }
101 
102     public static class SOPClass {
103 
104         /**
105          * The number of SOP Instances referred to by this participant object.
106          */
107         @Getter
108         private final int numberOfInstances;
109 
110         @Getter @Setter
111         private String uid;
112 
113         /**
114          * SOP Instance UID value(s). Including the list of SOP Instances can create a fairly large audit message.
115          * Under most circumstances, the list of SOP Instance UIDs is not needed for audit purposes.
116          */
117         private List<String> instanceUids;
118 
119         public SOPClass(int numberOfInstances) {
120             this.numberOfInstances = numberOfInstances;
121         }
122 
123         public List<String> getInstanceUids() {
124             if (instanceUids == null) {
125                 instanceUids = new ArrayList<>();
126             }
127             return this.instanceUids;
128         }
129     }
130 
131 
132 }