Ver Fonte

Default value for "CC"

Vijayakrishnan há 4 anos atrás
pai
commit
4fae54d390

+ 1 - 1
resources/views/app/patient/note/dashboard.blade.php

@@ -618,7 +618,7 @@
 
                 $('.note-section.pending-initialization').each(function() {
                     let sName = $(this).attr('data-section-template-name');
-                    if(['vitals', 'allergies', 'medication', 'care-team', 'assessment', 'new-patient-intake'].indexOf(sName) === -1) {
+                    if(['vitals', 'allergies', 'medication', 'care-team', 'assessment', 'new-patient-intake', 'cc'].indexOf(sName) === -1) {
                         $(this).removeClass('pending-initialization');
                     }
                 });

+ 20 - 0
storage/sections/cc/default.php

@@ -0,0 +1,20 @@
+<?php
+$value = [];
+$infoLines = json_decode($patient->info_lines);
+$infoLines = !$infoLines ? [] : $infoLines;
+global $defaultData;
+foreach($infoLines as $category => $lines):
+    if($category === "dx"):
+        foreach ($lines as $line):
+            $value[] = $line->contentText;
+        endforeach;
+    endif;
+endforeach;
+$result = $patient->displayName() . ", {$patient->age_in_years} years old {$patient->sex} ";
+if(count($value)) {
+    $result .= "presenting with " . implode(", ", $value);
+}
+$defaultData = [
+    "summary" => $result,
+    "value" => $result,
+];