Merge pull request #1652 from hapifhir/FixObligationActorRendering

Fixed issue with actor title not rendering
This commit is contained in:
Grahame Grieve 2024-06-25 23:15:15 +10:00 committed by GitHub
commit 36de9ff5fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 9 deletions

View File

@ -369,19 +369,19 @@ public class ObligationsRenderer extends Renderer {
children.add(tr);
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.GENERAL_OBLIG));
if (actor) {
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.OBLIG_ACT));
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.OBLIG_ACT));
}
if (elementId) {
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.OBLIG_ELE));
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.OBLIG_ELE));
}
if (usage) {
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.GENERAL_USAGE));
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.GENERAL_USAGE));
}
if (doco) {
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.GENERAL_DOCUMENTATION));
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.GENERAL_DOCUMENTATION));
}
if (filter) {
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.GENERAL_FILTER));
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.GENERAL_FILTER));
}
for (ObligationDetail ob : obligations) {
tr = new XhtmlNode(NodeType.Element, "tr");
@ -404,19 +404,19 @@ public class ObligationsRenderer extends Renderer {
XhtmlNode actorId = tr.td().style("font-size: 11px");
if (!ob.actors.isEmpty() || ob.compare.actors.isEmpty()) {
boolean firstActor = false;
boolean firstActor = true;
for (CanonicalType anActor : ob.actors) {
ActorDefinition ad = context.getContext().fetchResource(ActorDefinition.class, anActor.toString());
ActorDefinition ad = context.getContext().fetchResource(ActorDefinition.class, anActor.getValue());
boolean existingActor = ob.compare != null && ob.compare.actors.contains(anActor);
if (!firstActor) {
actorId.br();
firstActor = true;
firstActor = false;
}
if (!existingActor)
actorId.style(STYLE_UNCHANGED);
actorId.addText(ad.getTitle());
}
if (ob.compare != null) {