Skip to content

O3-5503: Fix duplicate patient property and missing visit property in QueueEntrySubResource RefRepresentation#103

Open
sanks011 wants to merge 1 commit intoopenmrs:mainfrom
sanks011:O3-5503-queue-entry-sub-resource-ref-representation-has-duplicate-patient-property-and-missing-visit-property
Open

O3-5503: Fix duplicate patient property and missing visit property in QueueEntrySubResource RefRepresentation#103
sanks011 wants to merge 1 commit intoopenmrs:mainfrom
sanks011:O3-5503-queue-entry-sub-resource-ref-representation-has-duplicate-patient-property-and-missing-visit-property

Conversation

@sanks011
Copy link

@sanks011 sanks011 commented Mar 16, 2026

Description

QueueEntrySubResource#getRepresentationDescription() has a copy-paste error in the RefRepresentation block: the patient property is added twice, while the visit property is missing entirely.

This means REST API responses from /ws/rest/v1/queue/{uuid}/entry with v=ref representation include redundant patient data and omit visit data.

Changes

One-line fix: replaced the duplicate patient property declaration with visit on line 157.

- resourceDescription.addProperty("patient", Representation.REF);
+ resourceDescription.addProperty("visit", Representation.REF);

Evidence

The DefaultRepresentation and FullRepresentation in the same file both correctly include visit. The parent resource (QueueEntryResource.java) also correctly includes both patient and visit in its RefRepresentation.

Issue

O3-5503

Copilot AI review requested due to automatic review settings March 16, 2026 18:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a copy-paste bug in QueueEntrySubResource where the patient property was added twice in the RefRepresentation block instead of adding patient and visit.

Changes:

  • Replaced duplicate patient property with visit in the RefRepresentation description

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RoshanMadival08
Copy link

Clean and straightforward fix. The evidence provided clearly confirms this is a copy-paste error — DefaultRepresentation and FullRepresentation both correctly include visit, so this one-line fix is consistent with the rest of the file. Good catch

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