Просмотр исходного кода

Support for %TOKEN% in shortcuts

Vijayakrishnan 4 лет назад
Родитель
Сommit
b9a3b613be
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      resources/views/app/patient/note/dashboard.blade.php

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

@@ -200,6 +200,12 @@
                         <?php
                         $shortCutsObject = [];
                         foreach ($pro->shortcuts as $shortcut) {
+
+                            // %replaceables%
+                            $shortcut->text = str_replace("%AGE%", $patient->age_in_years, $shortcut->text);
+                            $shortcut->text = str_replace("%GENDER%", $patient->sex, $shortcut->text);
+                            $shortcut->text = str_replace("%NAME%", $patient->displayName(), $shortcut->text);
+
                             $shortCutsObject[] = [
                                 "name" => $shortcut->shortcut,
                                 "value" => $shortcut->text