Skip to content

Commit

Permalink
fix: added maiden name in patient sidebar - Ref gestion-de-projet#2535
Browse files Browse the repository at this point in the history
  • Loading branch information
ManelleG authored and Mehdi-BOUYAHIA committed Mar 25, 2024
1 parent 0927b77 commit f731051
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/DataTable/ListPatient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,18 @@ const ListPatientLine: React.FC<{
const { search } = location

const firstName = deidentified ? 'Prénom' : patient.name?.[0].given?.[0] ?? ''
const lastName = deidentified ? 'Nom' : patient.name?.map((e) => e.family).join(' ') ?? ''
const lastName = deidentified
? 'Nom'
: patient.name
?.map((e) => {
if (e.use === 'official') {
return e.family ?? 'Non renseigné'
}
if (e.use === 'maiden') {
return `(${patient.gender === 'female' ? 'née' : 'né'} : ${e.family})` ?? 'Non renseigné'
}
})
.join(' ') ?? ''
const age = getAge(patient)
const ipp = deidentified
? `IPP chiffré: ${patient.id}`
Expand Down

0 comments on commit f731051

Please sign in to comment.