use of com.b2international.snowowl.core.domain.ValueSetMember in project snow-owl by b2ihealthcare.
the class SnomedValueSetMemberSearchRequestEvaluator method toMember.
private ValueSetMember toMember(SnomedReferenceSetMember member, ResourceURI codeSystemURI) {
final String term;
final String iconId = member.getReferencedComponent().getIconId();
String terminologyComponentId = member.getReferencedComponent().getComponentType();
switch(terminologyComponentId) {
case SnomedConcept.TYPE:
SnomedConcept concept = (SnomedConcept) member.getReferencedComponent();
term = concept.getFsn().getTerm();
break;
case SnomedDescription.TYPE:
SnomedDescription description = (SnomedDescription) member.getReferencedComponent();
term = description.getTerm();
break;
default:
term = member.getReferencedComponentId();
}
return new ValueSetMember(ComponentURI.of(codeSystemURI, terminologyComponentId, member.getReferencedComponentId()), term, iconId);
}
Aggregations