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


Java Coding.setSystem方法代码示例

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


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

示例1: mapCodeToCodeableConcept

import org.hl7.fhir.dstu3.model.Coding; //导入方法依赖的package包/类
/**
 * Helper function to convert a Code into a CodeableConcept. Takes an optional system, which
 * replaces the Code.system in the resulting CodeableConcept if not null.
 * 
 * @param from
 *          The Code to create a CodeableConcept from.
 * @param system
 *          The system identifier, such as a URI. Optional; may be null.
 * @return The converted CodeableConcept
 */
private static CodeableConcept mapCodeToCodeableConcept(Code from, String system) {
  CodeableConcept to = new CodeableConcept();

  if (from.display != null) {
    to.setText(from.display);
  }

  Coding coding = new Coding();
  coding.setCode(from.code);
  coding.setDisplay(from.display);
  if (system == null) {
    coding.setSystem(from.system);
  } else {
    coding.setSystem(system);
  }

  to.addCoding(coding);

  return to;
}
 
开发者ID:synthetichealth,项目名称:synthea_java,代码行数:31,代码来源:FhirStu3.java

示例2: makeCodingFromCV

import org.hl7.fhir.dstu3.model.Coding; //导入方法依赖的package包/类
public Coding makeCodingFromCV(Element cd) throws Exception {
if (cd == null || Utilities.noString(cd.getAttribute("code")))
	return null;
 Coding c = new Coding();
 c.setCode(cd.getAttribute("code"));
 c.setDisplay(cd.getAttribute("displayName"));
 String r = cd.getAttribute("codeSystem");
 String uri = getUriForOID(r);
 if (uri != null)
 	c.setSystem(uri);
 else if (isGuid(r)) 
	c.setSystem("urn:uuid:"+r);
else if (UriForOid(r) != null)
	c.setSystem(UriForOid(r));
else 
	c.setSystem("urn:oid:"+r);
 return c;
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:19,代码来源:Convert.java


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