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.ParticipantObjectIdType;
23  
24  /**
25   * Audit Participant Object ID Type Code as specified in
26   * http://dicom.nema.org/medical/dicom/current/output/html/part16.html#sect_CID_404
27   * 1.2.840.10008.6.1.907
28   *
29   * @author Christian Ohr
30   * @since 3.5
31   */
32  public enum ParticipantObjectIdTypeCode implements ParticipantObjectIdType, EnumeratedCodedValue<ParticipantObjectIdType> {
33  
34      // RFC-3881
35      MedicalRecordNumber("1", "Medical Record Number", "RFC-3881"),
36      PatientNumber("2", "Patient Number", "RFC-3881"),
37      EncounterNumber("3", "Encounter Number", "RFC-3881"),
38      EnrolleeNumber("4", "Enrollee Number", "RFC-3881"),
39      SocialSecurityNumber("5", "Social Security Number", "RFC-3881"),
40      AccountNumber("6", "Account Number", "RFC-3881"),
41      GuarantorNumber("7", "Guarantor Number", "RFC-3881"),
42      ReportName("8", "Report Name", "RFC-3881"),
43      ReportNumber("9", "Report Number", "RFC-3881"),
44      SearchCriteria("10", "Search Criteria", "RFC-3881"),
45      UserIdentifier("11", "User Identifier", "RFC-3881"),
46      URI("12", "URI", "RFC-3881"),
47  
48      // DCM
49      StudyInstanceUID("110180", "Study Instance UID", "DCM"),
50      SOPClassUID("110181", "SOP Class UID", "DCM"),
51      NodeID("110182", "Node ID", "DCM"),
52  
53      // IHE
54      XdsMetadata("urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd", "submission set classificationNode", "IHE XDS Metadata");
55  
56      @Getter
57      private ParticipantObjectIdType value;
58  
59      ParticipantObjectIdTypeCode(String code, String displayName, String codeSystemName) {
60          this.value = ParticipantObjectIdType.of(code, codeSystemName, displayName);
61      }
62  
63      public static ParticipantObjectIdTypeCode enumForCode(String code) {
64          return EnumeratedValueSet.enumForCode(ParticipantObjectIdTypeCode.class, code);
65      }
66  }
67