Skip to content

Commit e0cbd37

Browse files
Mounika-2311claude
andcommitted
fix: filter DocumentReference by status=current in patient chart
Prevents pending patient uploads from appearing before staff acceptance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5918be6 commit e0cbd37

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/org/ciyex/ehr/fhir/GenericFhirResourceService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@ public Map<String, Object> list(String tabKey, Long patientId, int page, int siz
330330
.where(new ReferenceClientParam(meta.patientSearchParam)
331331
.hasId(String.valueOf(patientId)));
332332

333+
// DocumentReference: only show "current" status (hides pending patient uploads)
334+
if ("DocumentReference".equals(meta.type)) {
335+
search = search.and(new ca.uhn.fhir.rest.gclient.TokenClientParam("status")
336+
.exactly().code("current"));
337+
}
338+
333339
// If encounterRef provided, also filter by encounter reference
334340
if (encounterRef != null && !encounterRef.isBlank()) {
335341
search = search.and(new ReferenceClientParam("encounter")

0 commit comments

Comments
 (0)