We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8147ee5 commit 31da87bCopy full SHA for 31da87b
src/components/patient-details/patientInfo.jsx
@@ -76,11 +76,11 @@ const PatientInfo = (props) => {
76
function getPhoneNumber(){
77
if(patient?.phoneNumber !== undefined)
78
return patient.phoneNumber;
79
- for (var identifier in patient.identifiers){
80
- if(identifier.type === "MOBILE")
81
- return identifier.value;
82
- }
83
- return '-';
+ const mobileIdentifier = patient.identifiers.find(identifier => {
+ return identifier.type === 'MOBILE';
+ });
+
+ return mobileIdentifier ? mobileIdentifier.value : '-';
84
}
85
86
const address = getCustomAddress(patient);
0 commit comments