瀏覽代碼

Fix mrv CI section

Vijayakrishnan 3 年之前
父節點
當前提交
b010d8c74f
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      resources/views/app/patient/segment-templates/medrisk_vigilence/summary.blade.php

+ 9 - 1
resources/views/app/patient/segment-templates/medrisk_vigilence/summary.blade.php

@@ -3,6 +3,7 @@
 // info from patient chart
 $drugs = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
 $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
+$problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
 
 // filter out drugs without fdb info on them
 $drugs = $drugs->filter(function($_drug) {
@@ -22,11 +23,18 @@ $allergies = $allergies->filter(function($_allergy) {
         $_allergy->data->damConceptIdType;
 });
 
+// filter out problems without fdb info on them
+$problems = $problems->filter(function($_allergy) {
+    return @$_allergy->data &&
+        $_allergy->data->name &&
+        $_allergy->data->dxid;
+});
+
 // side effects
 $sideeffects = side_effects_info($drugs);
 
 // contraindications
-$contraindications = contraindications_info($drugs);
+$contraindications = contraindications_info($drugs, $problems);
 
 // dpt
 $dptInfo = duplicate_therapy_info($drugs);