Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoodrich committed Jul 19, 2019
2 parents 640a770 + aabc019 commit f2d2f63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -152,9 +152,10 @@ public String generateHtml(FormEntryContext context) {
}
Iterator<ErrorWidget> errorWidgetIterator = providerErrorWidgets.iterator();
int providerWidgetNum = 0;
String separator = (tag.getProviderWidgetSeparator() == null ? ", " : tag.getProviderWidgetSeparator());
for (Widget providerWidget : providerWidgets) {
if (providerWidgetNum++ > 0) {
ret.append(", ");
ret.append(separator);
}
ret.append(providerWidget.generateHtml(context));
if (context.getMode() != Mode.VIEW) {
Expand Down
Expand Up @@ -32,6 +32,7 @@ public class EncounterProviderAndRoleTag {

private boolean required; // Whether or not this is required or not
private int count; // The number of provider widgets to render
private String providerWidgetSeparator; // If count > 1, the html that should separate the widgets
private EncounterRole encounterRole; // Whether this should be used specifically to set a specific Encounter Role
private boolean autocompleteProvider; // Whether autocomplete or dropdown (default is dropdown)
private List<String> providerRoles; // Comma-separated list of roles to limit providers to
Expand All @@ -45,6 +46,7 @@ public class EncounterProviderAndRoleTag {
public EncounterProviderAndRoleTag(Map<String, String> parameters) {
required = TagUtil.parseParameter(parameters, "required", Boolean.class, false);
count = TagUtil.parseParameter(parameters, "count", Integer.class, 1);
providerWidgetSeparator = TagUtil.parseParameter(parameters, "providerWidgetSeparator", String.class, ", ");
encounterRole = TagUtil.parseParameter(parameters, "encounterRole", EncounterRole.class);
autocompleteProvider = TagUtil.parseParameter(parameters, "autocompleteProvider", Boolean.class, false);
providerMatchMode = TagUtil.parseParameter(parameters, "providerMatchMode", MatchMode.class, MatchMode.ANYWHERE);
Expand Down Expand Up @@ -72,6 +74,10 @@ public int getCount() {
return count;
}

public String getProviderWidgetSeparator() {
return providerWidgetSeparator;
}

public EncounterRole getEncounterRole() {
return encounterRole;
}
Expand Down

0 comments on commit f2d2f63

Please sign in to comment.