View Javadoc
1   /*
2    * Copyright 2017 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.codes;
18  
19  import lombok.Getter;
20  import org.openehealth.ipf.commons.audit.types.EnumeratedCodedValue;
21  import org.openehealth.ipf.commons.audit.types.EnumeratedValueSet;
22  import org.openehealth.ipf.commons.audit.types.EventId;
23  
24  /**
25   * Audit Event ID Code as specified in
26   * http://dicom.nema.org/medical/dicom/current/output/html/part16.html#sect_CID_400
27   * 1.2.840.10008.6.1.903
28   *
29   * @author Christian Ohr
30   * @since 3.5
31   */
32  public enum EventIdCode implements EventId, EnumeratedCodedValue<EventId> {
33  
34      ApplicationActivity("110100", "Application Activity"),
35      AuditLogUsed("110101", "Audit Log Used"),
36      BeginTransferringDICOMInstances("110102", "Begin Transferring DICOM Instances"),
37      DICOMInstancesAccessed("110103", "DICOM Instances Accessed"),
38      DICOMInstancesTransferred("110104", "DICOM Instances Transferred"),
39      DICOMStudyDeleted("110105", "DICOM Study Deleted"),
40      Export("110106", "Export"),
41      Import("110107", "Import"),
42      NetworkEntry("110108", "Network Entry"),
43      OrderRecord("110109", "Order Record"),
44      PatientRecord("110110", "Patient Record"),
45      ProcedureRecord("110111", "Procedure Record"),
46      Query("110112", "Query"),
47      SecurityAlert("110113", "Security Alert"),
48      UserAuthentication("110114", "User Authentication");
49  
50      @Getter
51      private EventId value;
52  
53      EventIdCode(String code, String displayName) {
54          this.value = EventId.of(code, "DCM", displayName);
55      }
56  
57      public static EventIdCode enumForCode(String code) {
58          return EnumeratedValueSet.enumForCode(EventIdCode.class, code);
59      }
60  }
61  
62