Skip to content

Commit

Permalink
Explicitly deselect patients other than the one selected in UI (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellrgn authored Jan 30, 2025
1 parent 4bb7147 commit 2768a67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/utils/IPSResourceCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 2768a67

Please sign in to comment.