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


Java ConceptReferenceComponent类代码示例

本文整理汇总了Java中org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent的典型用法代码示例。如果您正苦于以下问题:Java ConceptReferenceComponent类的具体用法?Java ConceptReferenceComponent怎么用?Java ConceptReferenceComponent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: excludeCodes

import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent; //导入依赖的package包/类
private void excludeCodes(ConceptSetComponent exc, List<ValueSetExpansionParameterComponent> params) throws TerminologyServiceException {
  if (exc.hasSystem() && exc.getConcept().size() == 0 && exc.getFilter().size() == 0) {
    excludeSystems.add(exc.getSystem());
  }

  if (exc.hasValueSet())
    throw new Error("Processing Value set references in exclude is not yet done");
  // importValueSet(imp.getValue(), params, profile);

  CodeSystem cs = context.fetchCodeSystem(exc.getSystem());
  if ((cs == null || cs.getContent() != CodeSystemContentMode.COMPLETE) && context.supportsSystem(exc.getSystem())) {
    excludeCodes(context.expandVS(exc, false), params);
    return;
  }

  for (ConceptReferenceComponent c : exc.getConcept()) {
    excludeCode(exc.getSystem(), c.getCode());
  }

  if (exc.getFilter().size() > 0)
    throw new NotImplementedException("not done yet");
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:23,代码来源:ValueSetExpanderSimple.java

示例2: expandValuesIterator

import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent; //导入依赖的package包/类
private static Iterator<Value> expandValuesIterator(ValueSet valueSet) {

    List<Value> values = new ArrayList<>();

    ValueSetComposeComponent compose = valueSet.getCompose();

    for (ConceptSetComponent inclusion: compose.getInclude()) {

      for (ConceptReferenceComponent concept: inclusion.getConcept()) {

        Value value = new Value();

        value.setValueSetUri(valueSet.getUrl());
        value.setValueSetVersion(valueSet.getVersion());

        value.setSystem(inclusion.getSystem());
        value.setVersion(inclusion.getVersion());

        value.setValue(concept.getCode());

        values.add(value);
      }
    }

    return values.iterator();
  }
 
开发者ID:cerner,项目名称:bunsen,代码行数:27,代码来源:ValueSets.java

示例3: addToValueSet

import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent; //导入依赖的package包/类
/**
 * Adds the given values to the given value set instance.
 */
private void addToValueSet(ValueSet valueSet, Dataset<Value> values) {

  ValueSetComposeComponent composeComponent = valueSet.getCompose();
  ConceptSetComponent currentInclusion = null;
  ConceptReferenceComponent concept = null;

  List<Value> sortedValues = values.sort("system", "version", "value").collectAsList();

  // Workaround for the decoder producing an immutable array by replacing it with a mutable one
  composeComponent.setInclude(new ArrayList<>(composeComponent.getInclude()));
  for (Value value: sortedValues) {

    if (currentInclusion == null
        || !value.getSystem().equals(currentInclusion.getSystem())
        || !value.getVersion().equals(currentInclusion.getVersion())) {

      // Find a matching inclusion
      for (ConceptSetComponent candidate: composeComponent.getInclude()) {

        if (value.getSystem().equals(candidate.getSystem())
            && value.getVersion().equals(candidate.getVersion())) {

          currentInclusion = candidate;

          // Workaround for the decoder producing an immutable array by replacing it with a
          // mutable one
          currentInclusion.setConcept(new ArrayList<>(currentInclusion.getConcept()));
        }
      }

      // No matching inclusion found, so add one
      if (currentInclusion == null) {

        currentInclusion = composeComponent.addInclude();

        currentInclusion.setSystem(value.getSystem());
        currentInclusion.setVersion(value.getVersion());

        concept = null;
      }
    }

    // Create concept if not exists
    if (concept == null || !value.getValue().equals(concept.getCode())) {

      concept = currentInclusion.addConcept();
      concept.setCode(value.getValue());
    }
  }
}
 
开发者ID:cerner,项目名称:bunsen,代码行数:54,代码来源:ValueSets.java


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