Skip to content

HTML-886 add attribute to specify sorting of options for appointmentS…#339

Closed
chibongho wants to merge 1 commit into
masterfrom
HTML-886
Closed

HTML-886 add attribute to specify sorting of options for appointmentS…#339
chibongho wants to merge 1 commit into
masterfrom
HTML-886

Conversation

@chibongho

@chibongho chibongho commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

…erviceObs tag

This PR adds an optional sortBy attribute to the <apointmentServiceObs> tag. When specified with the value specialitiesOrderThenServiceName, it sorts the appointment service options first by the order of the specialities in the specialities attribute, then by service name. This allows us to make the "Other" service option appear at the end of the dropdown list.

See: PIH/openmrs-config-pihsl#324 for usage

@cioan cioan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

private static final String ATTRIBUTE_SPECIALITIES = "specialities";
private static final String ATTRIBUTE_SORT_BY = "sortBy";

private static final String ATTRIBUTE_SORT_BY_SPECIALITIES_ORDER_THEN_SERVICE_NAME = "specialitiesOrderThenServiceName";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in love with this attribute name. Can we change this so that sortBy can take a comma-delimited list of options, so the default would be "sortBy=serviceName", but in our forms it would be "sortBy=specialty,serviceName"?

@chibongho chibongho closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants