All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.projecthusky.common.enums.ConfidentialityCode Maven / Gradle / Ivy

/*
 * This code is made available under the terms of the Eclipse Public License v1.0 
 * in the github project https://github.com/project-husky/husky there you also 
 * find a list of the contributors and the license information.
 * 
 * This project has been developed further and modified by the joined working group Husky 
 * on the basis of the eHealth Connector opensource project from June 28, 2021, 
 * whereas medshare GmbH is the initial and main contributor/author of the eHealth Connector.
 *
 */
package org.projecthusky.common.enums;

import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;





/**
 * The Enum ConfidentialityCode contains the codes of the HL7 Vocabulary.
 */
public enum ConfidentialityCode implements ValueSetEnumInterface {
	
	

	/** 
Normal
. */ LOW("L", EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_OID, "low"), /**
Normal
. */ MODERATE("M", EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_OID, "moderate"), /**
Normal
. */ NORMAL("N", EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_OID, "normal"), /**
Vertraulich
. */ RESTRICTED("R", EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_OID, "restricted"), /**
Vertraulich
. */ UNRESTRICTED("U", EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_OID, "unestricted"), /**
Streng vertraulich
. */ VERY_RESTRICTED("V", EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_OID, "very restricted"); /** *
Gets the Enum with a given code
*
Liefert den Enum anhand eines gegebenen codes
. * * @param code *
*
code
* @return
the enum
*/ public static ConfidentialityCode getEnum(String code) { for (final ConfidentialityCode x : values()) { if (x.getCodeValue().equals(code)) { return x; } } return null; } /** *
Checks if a given enum is part of this value set.
*
Prüft, ob der gegebene enum Teil dieses Value Sets * ist.
* * @param enumName *
*
enumName
* @return true, if enum is in this value set */ public static boolean isEnumOfValueSet(String enumName) { if (enumName == null) { return false; } try { Enum.valueOf(ConfidentialityCode.class, enumName); return true; } catch (final IllegalArgumentException ex) { return false; } } /** *
Checks if a given code value is in this value set.
*
Prüft, ob der gegebene code in diesem Value Set vorhanden * ist.
* * @param codeValue *
code
* @return true, if one enum of this valueset contains the given code */ public static boolean isInValueSet(String codeValue) { for (ConfidentialityCode x : values()) { if (x.getCodeValue().equals(codeValue)) { return true; } } return false; } /** The code. */ private String code; /** The display name. */ private String displayName; /** The oid. */ private String oid; /** *
Instantiates this Enum Object with a given Code and * Display Name
Instantiiert dieses Enum Object * mittels eines Codes und einem Display Name
. * * @param code *
*
code
* @param oid * the oid * @param displayName *
*
display name
*/ private ConfidentialityCode(String code, String oid, String displayName) { this.code = code; this.displayName = displayName; this.oid = oid; } /** *
Gets the actual Code as string
*
Liefert den eigentlichen Code als String
. * * @return
the code
*/ public String getCodeValue() { return this.code; } /** *
Gets the display name.
Liefert * display name.
* * @return
the display name
*/ @Override public String getDisplayName() { return this.displayName; } /** *
Gets the code system id.
Liefert die * code system id.
* * @return
the code system id
*/ @Override public @NonNull String getCodeSystemId() { return this.oid; } @Override public @NonNull String getDisplayName(@Nullable LanguageCode languageCode) { return getDisplayName(); } @Override public @NonNull String getValueSetId() { return EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_OID; } @Override public @NonNull String getValueSetName() { return EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_NAME; } /** *
Gets the code system name.
Liefert code * system name.
* * @return
the code system name
*/ @Override public @NonNull String getCodeSystemName() { return EnumConstants.CONFIDENTIALITY_CODE_SYSTEM_NAME; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy