From 3d305f953cacd4fef27299beb906f8468293e381 Mon Sep 17 00:00:00 2001 From: Daniel Lorigan Date: Thu, 30 Jan 2025 13:52:12 -0800 Subject: [PATCH] Explicitly deselect patients other than the one selected in UI --- src/lib/utils/IPSResourceCollection.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/utils/IPSResourceCollection.ts b/src/lib/utils/IPSResourceCollection.ts index fdf7723..fa5b912 100644 --- a/src/lib/utils/IPSResourceCollection.ts +++ b/src/lib/utils/IPSResourceCollection.ts @@ -235,6 +235,12 @@ export class IPSResourceCollection { if (!("Patient" in get(this.resourcesByType))) { throw Error('No patients exist'); } + this.resourcesByType.update((curr) => { + Object.entries(curr["Patient"]).forEach(([id, rh]) => { + rh.include = (id == p); + }); + return curr; + }) this.selectedPatient.set(p); this._updatePatientRefs(); }