当前位置: 首页>>代码示例>>Java>>正文


Java AdministrativeGender.MALE属性代码示例

本文整理汇总了Java中org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.MALE属性的典型用法代码示例。如果您正苦于以下问题:Java AdministrativeGender.MALE属性的具体用法?Java AdministrativeGender.MALE怎么用?Java AdministrativeGender.MALE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender的用法示例。


在下文中一共展示了AdministrativeGender.MALE属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: apply

@Override
public AdministrativeGender apply(String codeString) {
    if (codeString != null && !"".equals(codeString) || codeString != null && !"".equals(codeString)) {
        if ("male".equalsIgnoreCase(codeString) || "M".equalsIgnoreCase(codeString)) {
            return AdministrativeGender.MALE;
        } else if ("female".equalsIgnoreCase(codeString) || "F".equalsIgnoreCase(codeString)) {
            return AdministrativeGender.FEMALE;
        } else if ("other".equalsIgnoreCase(codeString) || "O".equalsIgnoreCase(codeString)) {
            return AdministrativeGender.OTHER;
        } else if ("unknown".equalsIgnoreCase(codeString) || "UN".equalsIgnoreCase(codeString)) {
            return AdministrativeGender.UNKNOWN;
        } else {
            throw new IllegalArgumentException("Unknown AdministrativeGender code \'" + codeString + "\'");
        }
    } else {
        return null;
    }
}
 
开发者ID:bhits,项目名称:registration-api,代码行数:18,代码来源:FhirResourceConverter.java

示例2: apply

@Override
public AdministrativeGender apply(String codeString) {
    if (codeString != null && !"".equals(codeString) || codeString != null && !"".equals(codeString)) {
        if ("male".equalsIgnoreCase(codeString) || "M".equalsIgnoreCase(codeString)) {
            return AdministrativeGender.MALE;
        } else if ("female".equalsIgnoreCase(codeString) || "F".equalsIgnoreCase(codeString)) {
            return Enumerations.AdministrativeGender.FEMALE;
        } else if ("other".equalsIgnoreCase(codeString) || "O".equalsIgnoreCase(codeString)) {
            return AdministrativeGender.OTHER;
        } else if ("unknown".equalsIgnoreCase(codeString) || "UN".equalsIgnoreCase(codeString)) {
            return AdministrativeGender.UNKNOWN;
        } else {
            throw new IllegalArgumentException("Unknown AdministrativeGender code \'" + codeString + "\'");
        }
    } else {
        return null;
    }
}
 
开发者ID:bhits,项目名称:pcm-api,代码行数:18,代码来源:FhirPatientServiceImpl.java

示例3: testBoundCodeableConceptSerialization

/**
 * Verify that MaritalStatusCodeEnum (and, by extension, BoundCodeableConcepts in general) are serializable. Author: Nick Peterson ([email protected])
 */
@Test
public void testBoundCodeableConceptSerialization() {
	AdministrativeGender maritalStatus = AdministrativeGender.MALE;
	byte[] bytes = SerializationUtils.serialize(maritalStatus);
	assertTrue(bytes.length > 0);

	AdministrativeGender deserialized = SerializationUtils.deserialize(bytes);
	assertEquals(AdministrativeGender.MALE, deserialized);
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:12,代码来源:ModelSerializationDstu3Test.java

示例4: makeGenderFromCD

public AdministrativeGender makeGenderFromCD(Element cd) throws Exception {
 String code = cd.getAttribute("code");
 String system = cd.getAttribute("codeSystem");
 if ("2.16.840.1.113883.5.1".equals(system)) {
 	if ("F".equals(code))
 		return AdministrativeGender.FEMALE;
 	if ("M".equals(code))
 		return AdministrativeGender.MALE;
 }
 throw new Exception("Unable to read Gender "+system+"::"+code);
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:11,代码来源:Convert.java


注:本文中的org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender.MALE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。