O3-5682: Ship Visit Queue Number visit attribute type#113
O3-5682: Ship Visit Queue Number visit attribute type#113UjjawalPrabhat wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
@UjjawalPrabhat Kindly I want to believe with the current changes the screen remains blank because it expects a results array but the API returns a raw Map.
-
Don't we need to add a patientName field to the assignments model?
-
Kindly for safety use a ConcurrentHashMap for the in memory storage to prevent server crashes during simultaneous polling and updates.
Thanks.
|
I had some concerns before going on with this one:
Happy to defer if you feel strongly.
it wasn't present before and even if we need it, should it be included in this PR?
done. |
jwnasambu
left a comment
There was a problem hiding this comment.
@UjjawalPrabhat Kindly doesn't the PR title need to reference the ticket ID? https://openmrs.atlassian.net/wiki/spaces/docs/pages/25477199/Pull+Request+Tips
Isn't O3-5682 the ticketID? |
| </sqlCheck> | ||
| </preConditions> | ||
| <comment> | ||
| Insert the "Visit Queue Number" visit attribute type used by the queue screen to display ticket numbers. |
There was a problem hiding this comment.
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



Summary
Adds a Liquibase changeset that inserts the
visitQueueNumberVisitAttributeType (UUIDc0c579b0-8e59-401d-8a4a-976a0b183519) on module install/upgrade. Idempotent viasqlCheckprecondition.Why?
The queue screen (
/spa/home/service-queues/screen) is blank in default installs because the Call→serve flow depends on a "Visit Queue Number" visit attribute that nothing in the module ever creates. The frontend has long had avisitQueueNumberAttributeUuidconfig knob that was meant to be overridden by each distribution, but in practice the Reference Application and most installs ran on thenulldefault — sogenerateVisitQueueNumbersilently no-ops, visits never get a ticket number, and the assignticket POST silently 200s with nothing stored. Shipping the VAT in the module itself gives every install a working default; distributions that want their own UUID can still override via config.Related Issue
O3-5682