浏览代码

Merge branch 'dev' into dev-vj

Vijayakrishnan Krishnan 4 年之前
父节点
当前提交
b8e8ba0954
共有 1 个文件被更改,包括 1 次插入17 次删除
  1. 1 17
      resources/views/app/patient/partials/vitals.blade.php

+ 1 - 17
resources/views/app/patient/partials/vitals.blade.php

@@ -15,23 +15,7 @@ $vitalMap = [
 
 $vitalLabels = ['Ht. (in.)','Wt. (lbs.)','Temp. (F)','Pulse','Resp.','Pulse Ox.','SBP','DBP','Smoking Status', 'BMI'];
 
-$vitalValues = [];
-
-foreach($vitalLabels as $l){
-    $vitalValues[$l] = [
-        'value' => null,
-        'effectiveDate' => null
-    ];
-}
-
-foreach($patient->measurements as $measurement) {
-    if(!empty($measurement->label) && in_array($measurement->label, $vitalLabels)){
-        $vitalValues[$measurement->label] = [
-            'value'=>$measurement->value,
-            'effectiveDate' => $measurement->effective_date
-        ];
-    }
-}
+$vitalValues = json_decode($patient->latest_measurements, true);
 
 ?>