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(); }