private String getReactions(List<AllergyIntoleranceReactionComponent> reactions) { StringBuilder sb = new StringBuilder(); for (AllergyIntoleranceReactionComponent reaction : reactions) { String severity = reaction.hasSeverity() ? " (" + reaction.getSeverity().getDisplay() + ")" : ""; String manifestation = reaction.hasManifestation() ? FhirUtil.getDisplayValue(reaction.getManifestation().get(0)) : ""; sb.append(sb.length() == 0 ? "" : ", "); sb.append(manifestation).append(severity); } return sb.toString(); }
@Override protected void render(FamilyMemberHistory relation, List<Object> columns) { columns.add(relation.getRelationship()); for (int i = 0; i < 3; i++) { Vlayout cmp = new Vlayout(); columns.add(cmp); for (FamilyMemberHistoryConditionComponent condition : relation.getCondition()) { String value = null; switch (i) { case 0: value = FhirUtil.getDisplayValue(condition.getCode()); break; case 1: value = FhirUtil.getDisplayValue(condition.getOutcome()); break; case 2: value = FhirUtil.getDisplayValueForTypes(condition.getNote(), "\n\n"); break; } cmp.appendChild(new Label(value)); } } }
private String getReactions(List<AllergyIntoleranceReactionComponent> reactions) { StringBuilder sb = new StringBuilder(); for (AllergyIntoleranceReactionComponent reaction : reactions) { String severity = reaction.hasSeverity() ? " (" + reaction.getSeverity().getDisplay() + ")" : ""; String manifestation = reaction.hasManifestation() ? FhirUtil.getDisplayValue(reaction.getManifestation().get(0)) : ""; sb.append(sb.length() == 0 ? "" : ", "); sb.append(manifestation).append(severity); } return sb.toString(); }