Skip to content

Commit

Permalink
OHRI-2317: Mother’s name to display on the “Child visits” table and I…
Browse files Browse the repository at this point in the history
…nfant banner (#1932)

* Exclude the patient from their own children list

* remove unnecessary comment
  • Loading branch information
lucyjemutai authored Oct 28, 2024
1 parent 527b2a9 commit 24410ed
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export const usePatientFamilyNames = (patientUuid: string) => {
}

const childRelationships = relationships
.filter((relationship) => relationship.relationshipType?.displayBIsToA === 'Child')
.filter(
(relationship) =>
relationship.relationshipType?.displayBIsToA === 'Child' && relationship.personB?.uuid !== patientUuid,
)
.map((relationship) => relationship.personB?.display);

setChildrenNames(childRelationships);
Expand Down

0 comments on commit 24410ed

Please sign in to comment.