From 1066faa691d228128bcec837c1d82172b3186741 Mon Sep 17 00:00:00 2001 From: atercode Date: Fri, 26 Apr 2019 10:58:07 +0300 Subject: [PATCH] Added key exists --- src/EMR.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EMR.php b/src/EMR.php index 6fde74b..fd60c84 100644 --- a/src/EMR.php +++ b/src/EMR.php @@ -315,7 +315,7 @@ public function receiveTestRequest(Request $request) $encounter->patient_id = $patient->id; $encounter->location_id = $request->input('location_id'); $encounter->practitioner_name = $contained[1]['name'][0]['given'][0]." ".$contained[1]['name'][0]['family']; - if($contained[1]['telecom'][0]['value']){ + if(array_key_exists("value",$contained[1]['telecom'][0])){ $encounter->practitioner_contact = $contained[1]['telecom'][0]['value']; } $encounter->save();