org.somda.sdc.biceps.model.participant.Sex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biceps-model Show documentation
Show all versions of biceps-model Show documentation
SDCri is a set of Java libraries that implements a network communication framework conforming
with the IEEE 11073 SDC specifications. This project implements the model for
IEEE 11073-10207.
The newest version!
package org.somda.sdc.biceps.model.participant;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlEnumValue;
import jakarta.xml.bind.annotation.XmlType;
/**
* Sex of a human.
*
* "Sex" refers to the biological and physiological characteristics that define men and women, while "Gender" refers to the socially constructed roles, behaviors, activities, and attributes that a given society considers appropriate for men and women. See http://www.who.int/gender/whatisgender/en/index.html.
*
* NOTE—ISO/IEC 5218:2004 defines four CODEs that represent human sexes.
*
* Java class for Sex
.
*
* The following schema fragment specifies the expected content contained within this class.
* {@code
*
*
*
*
*
*
*
*
* }
*
*/
@XmlType(name = "Sex", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
@XmlEnum
public enum Sex {
/**
* Unspec = Unspecified. Sex is not designated.
*
*/
@XmlEnumValue("Unspec")
UNSPEC("Unspec"),
/**
* M = Male. Indicates a male patient.
*
*/
M("M"),
/**
* F = Female. Indicates a female patient.
*
*/
F("F"),
/**
* Unkn = Unknown. Indicates that the sex is unknown for different reasons.
*
*/
@XmlEnumValue("Unkn")
UNKN("Unkn");
private final String value;
Sex(String v) {
value = v;
}
/**
* Gets the value associated to the enum constant.
*
* @return
* The value linked to the enum.
*/
public String value() {
return value;
}
/**
* Gets the enum associated to the value passed as parameter.
*
* @param v
* The value to get the enum from.
* @return
* The enum which corresponds to the value, if it exists.
* @throws IllegalArgumentException
* If no value matches in the enum declaration.
*/
public static Sex fromValue(String v) {
for (Sex c: Sex.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}