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

org.projecthusky.common.enums.ObservationInterpretation 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 java.util.EnumMap;
import java.util.Map;

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

/**
 * 
The Enum containing the supported ObservationInterpretation * codes.
Codesystem: HL7 ObservationInterpretation (OID: * 2.16.840.1.113883.5.83).
Domaine de valeurs pour « Code * d’interprétation »
*/ public enum ObservationInterpretation implements ValueSetEnumInterface { //@formatter:off /** *
Abnormal
*
Anormal
*
Anormalement
*
Anormalmente
* */ ABNORMAL("A", "Abnormal", "Anormal", "Anormalement", "Anormalmente"), /** *
Abnormal alert
*
Anormal alarmierend
*
Alerte anormale
*
Allarme anomalo
* */ ABNORMAL_ALERT("AA", "Abnormal alert", "Anormal alarmierend", "Alerte anormale", "Avviso anomalo"), /** *
High
*
Hoch
*
Haut
*
Alto
* */ HIGH("H", "High", "Hoch", "Haut", "Alto"), /** *
High alert
*
Hoch alarmierend
*
Alerte haut
*
Allarme alto
* */ HIGH_ALERT("HH", "High alert", "Hoch alarmierend", "Alerte haut", "Allarme alto"), /** *
Low
*
Tief
*
Bas
*
Basso
* */ LOW("L", "Low", "Tief", "Bas", "Basso"), /** *
Low alert
*
Tief alarmierend
*
Alerte bas
*
Allarme basso
* */ LOW_ALERT("LL", "Low alert", "Tief alarmierend", "Alerte bas", "Allarme basso"), /** *
Normal
*
Normal
*
Normal
*
Normale
* */ NORMAL("N", EnumConstants.NORMAL, EnumConstants.NORMAL, EnumConstants.NORMAL, "Normale"), /** *
Positive
*
Positiv
*
Positif
*
Positivo
* */ POS("POS", "Positive", "Positiv", "Positif", "Positivo"), /** *
Negative
*
Negativ
*
Négatif
*
Negativo
* */ NEG("NEG", "Negative", "Negativ", "Négatif", "Negativo"), /** *
Susceptible
*
Sensibel
*
Sensible
*
Sensitivo
* */ SUSCEPTIBLE("S", "Susceptible", "Sensibel", "Sensible", "Sensitivo"), /** *
Susceptible-dose dependent
*
Sensibel (dosierungsabhängig)
*
Sensible (en fonction du dosage)
*
Sensitivo (dose-dipendente)
* */ SUSCEPTIBLE_DOSE_DEPENDENT("SDD", "Susceptible-dose dependent", "Sensibel", "Sensibel (dosierungsabhängig)", "Sensitivo (dose-dipendente)"), /** *
Resistant
*
Resistent
*
Résistant
*
Resistente
* */ RESISTANT("R", "Resistant", "Resistent", "Résistant", "Resistente"), /** *
Intermediate
*
Intermediär
*
Intermédiaire
*
Intermedio
* */ INTERMEDIATE("I", "Intermediate", "Intermediär", "Intermédiaire", "Intermedio"); //@formatter:on /** *
Name of the Code System
Name des * Codes Systems
*/ public static final String CODE_SYSTEM_NAME = "HL7ObservationInterpretation"; /** *
Identifier of the Code System
*
Identifikator für das Code System
*/ public static final String CODE_SYSTEM_OID = "2.16.840.1.113883.5.83"; /** *
Gets the Enum with a given code
*
Liefert den Enum anhand eines gegebenen codes
* * @param code *
*
code
* @return
the enum
*/ public static ObservationInterpretation getEnum(String code) { for (final ObservationInterpretation 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(ObservationInterpretation.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 is in value set */ public static boolean isInValueSet(String codeValue) { for (final ObservationInterpretation x : values()) { if (x.getCodeValue().equals(codeValue)) { return true; } } return false; } /** The display names per language */ private Map displayNames; /** *
Machine interpretable and (inside this class) unique * code
Maschinen interpretierbarer und (innerhalb * dieser Klasse) eindeutiger Code
*/ private String code; /** *
Instantiates this Enum Object with a given Code and * Display Name
Instantsiert dieses Enum Object * mittels eines Codes und einem Display Name
. * * @param code *
*
code
* @param displayNameEn * the display name de * @param displayNameDe * the display name de * @param displayNameFr * the display name fr * @param displayNameIt * the display name it */ private ObservationInterpretation(String code, String displayNameEn, String displayNameDe, String displayNameFr, String displayNameIt) { this.code = code; displayNames = new EnumMap<>(LanguageCode.class); displayNames.put(LanguageCode.ENGLISH, displayNameEn); displayNames.put(LanguageCode.GERMAN, displayNameDe); displayNames.put(LanguageCode.FRENCH, displayNameFr); displayNames.put(LanguageCode.ITALIAN, displayNameIt); } /** *
Gets the code system name.
Liefert * code system name.
* * @return
the code system name
*/ @Override public String getCodeSystemName() { return CODE_SYSTEM_NAME; } /** *
Gets the code system id.
Liefert * die code system id.
* * @return
the code system id
*/ @Override public @NonNull String getCodeSystemId() { return CODE_SYSTEM_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 getDisplayName(LanguageCode.ENGLISH); } /** *
Gets the display name defined by the language param. If * language is unknow, german name is returned
Liefert * display name gemäss Parameter, falls die Sprache unbekannt ist, wird * standartmässig deutsch geliefert.
* * @param languageCode * the language code to get the display name for * @return returns the display name in the desired language. if language not * found, display name in german will returned */ @Override public @NonNull String getDisplayName(@Nullable LanguageCode languageCode) { String displayNameL = null; if (languageCode != null && displayNames.get(languageCode) != null) { displayNameL = displayNames.get(languageCode); } else { displayNameL = displayNames.get(LanguageCode.GERMAN); } return displayNameL; } @Override public @NonNull String getValueSetId() { return CODE_SYSTEM_OID; } @Override public @NonNull String getValueSetName() { return CODE_SYSTEM_NAME; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy