Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
Expand All @@ -25,7 +26,7 @@ public class QueueTicketAssignments {
* The object has: service point/room name as key for ease of search and update and object with
* status and ticket number
*/
private static final Map<String, TicketAssignment> ACTIVE_QUEUE_TICKETS = new HashMap<>();
private static final Map<String, TicketAssignment> ACTIVE_QUEUE_TICKETS = new ConcurrentHashMap<>();

/**
* We want to control access to the ACTIVE_QUEUE_TICKETS so that requests are queued
Expand Down
23 changes: 23 additions & 0 deletions api/src/main/resources/liquibase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -749,4 +749,27 @@
</sql>
</changeSet>

<changeSet id="add_visit_queue_number_attribute_type_20260521" author="ujjawalprabhat">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="0">
SELECT COUNT(*) FROM visit_attribute_type WHERE uuid = 'c0c579b0-8e59-401d-8a4a-976a0b183519';
</sqlCheck>
</preConditions>
<comment>
Insert the "Visit Queue Number" visit attribute type used by the queue screen to display ticket numbers.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah, we don’t usually insert things like this into the database because these are things that the implementers need to configure. Instead, we use content packages. If this is a visit attribute type, then it should go into a configuration file like this one - https://github.com/openmrs/openmrs-content-referenceapplication-demo/blob/main/configuration/backend_configuration/attributetypes/attribute_types-core_demo.csv. These get processed by the initializer and saved to the database

UUID matches the default value of `visitQueueNumberAttributeUuid` in @openmrs/esm-service-queues-app.
</comment>
<insert tableName="visit_attribute_type">
<column name="name" value="Visit Queue Number"/>
<column name="description" value="The visit queue number used to identify patients on the queue screen"/>
<column name="datatype" value="org.openmrs.customdatatype.datatype.FreeTextDatatype"/>
<column name="min_occurs" valueNumeric="0"/>
<column name="max_occurs" valueNumeric="1"/>
<column name="creator" valueNumeric="1"/>
<column name="date_created" valueComputed="NOW()"/>
<column name="retired" valueBoolean="false"/>
<column name="uuid" value="c0c579b0-8e59-401d-8a4a-976a0b183519"/>
</insert>
</changeSet>

</databaseChangeLog>