Parcourir la source

Visit UI - common custom item fix

Vijayakrishnan il y a 3 ans
Parent
commit
ceb42b965d

+ 10 - 0
resources/views/app/patient/segment-templates/history_social/edit.blade.php

@@ -44,6 +44,15 @@ if(!$contentData) {
     ];
 }
 
+for ($i = 0; $i < count($fields); $i++) {
+    foreach($fields[$i] as $head => $values) {
+        for($k = 0; $k < count($values); $k++) {
+            $fName = $head . '_' . sanitize_field_name($values[$k]);
+            if(!isset($contentData["common"][$fName])) $contentData["common"][$fName] = null;
+        }
+    }
+}
+
 ?>
 
 <div class="p-3 border-top mt-3 mcp-theme-1">
@@ -193,6 +202,7 @@ if(!$contentData) {
 
             new Vue({
                 el: '#edit-univ_history_social-container',
+                delimiters: ["@{{","}}"],
                 data: model,
                 mounted: function() {
                     $('#edit-univ_history_social-container [moe][initialized]').removeAttr('initialized');

+ 9 - 0
resources/views/app/patient/segment-templates/history_surgical/edit.blade.php

@@ -41,6 +41,15 @@ if(!$contentData) {
     ];
 }
 
+for ($i = 0; $i < count($fields); $i++) {
+    foreach($fields[$i] as $head => $values) {
+        for($k = 0; $k < count($values); $k++) {
+            $fName = $head . '_' . sanitize_field_name($values[$k]);
+            if(!isset($contentData["common"][$fName])) $contentData["common"][$fName] = null;
+        }
+    }
+}
+
 ?>
 
 <div class="p-3 border-top mt-3 mcp-theme-1">

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

@@ -40,7 +40,7 @@ if ($point && @$point->data) {
                 $fName = $head . '_' . sanitize_field_name($values[$k]);
                 if(@$contentData['common'][$fName]): ?>
                     <div>
-                        <?= ucwords($head) ?>
+                        Common
                         <i class="fa fa-arrow-right text-sm text-secondary"></i>
                         <span class="font-weight-bold"><?= $values[$k] ?></span>
                         <?php if(@$contentData['common'][$fName . '__comments']): ?>

+ 8 - 0
resources/views/app/patient/segment-templates/past_medical_history/edit.blade.php

@@ -55,6 +55,14 @@ if(!$contentData) {
     ];
 }
 
+for ($i = 0; $i < count($fields); $i++) {
+    foreach($fields[$i] as $head => $values) {
+        for($k = 0; $k < count($values); $k++) {
+            $fName = $head . '_' . sanitize_field_name($values[$k]);
+            if(!isset($contentData["common"][$fName])) $contentData["common"][$fName] = null;
+        }
+    }
+}
 ?>
 
 <div class="p-3 border-top mt-3 mcp-theme-1">