use of org.hl7.v3.RCMRMT030101UK04Annotation in project nia-patient-switching-standard-adaptor by NHSDigital.
the class ConditionMapper method buildNotes.
private List<Annotation> buildNotes(Optional<RCMRMT030101UK04ObservationStatement> observationStatement, RCMRMT030101UK04LinkSet linkSet) {
List<Annotation> annotationList = new ArrayList<>();
observationStatement.ifPresent(observationStatement1 -> observationStatement1.getPertinentInformation().stream().map(RCMRMT030101UK04PertinentInformation02::getPertinentAnnotation).filter(Objects::nonNull).map(RCMRMT030101UK04Annotation::getText).filter(StringUtils::isNotBlank).map(StringType::new).map(Annotation::new).forEach(annotationList::add));
if (linkSet.hasCode() && linkSet.getCode().getOriginalText() != null) {
StringType text = new StringType(linkSet.getCode().getOriginalText());
annotationList.add(new Annotation(text));
}
return annotationList;
}
Aggregations