Browse Source

Merge branch 'cleanup' of https://rav.triplestart.com/tigerphp/stagfe2 into optimization

Samson Mutunga 1 năm trước cách đây
mục cha
commit
ed0e84e2e5

+ 2 - 1
app/Http/Controllers/NoteController.php

@@ -26,8 +26,9 @@ use Illuminate\Support\Facades\DB;
 class NoteController extends Controller
 {
 
-    public function dashboard(Request $request, Client $patient, Note $note)
+    public function dashboard(Request $request, Client $patient,  Note $note)
     {
+
         $pros = $this->pros;
         $noteSections = $note->sections;
         $allSections = SectionTemplate::where('is_active', true)->get();

+ 1 - 1
resources/views/app/patient/canvas-sections/rx/form.blade.php

@@ -196,7 +196,7 @@ $formID = rand(0, 100000);
                 },
                 mounted: function() {
                     this.initRTE();
-                    this.initRxAutoSuggest();
+                    //this.initRxAutoSuggest();
                     $('#rxSection_{{$formID}} [moe][initialized]').removeAttr('initialized');
                     initMoes();
                 },

+ 5 - 3
resources/views/app/patient/partials/rm-reasons-display.blade.php

@@ -205,9 +205,11 @@ if($recordType === 'NOTE'){
 			init: function() {
 				var probs = this.problems;
 				for (var i = 0; i < probs.length; i++) {
-					var split = probs[i].split(' ('); // splitting description from ICD
-					var description = split[0];
-					var reason = split[1].split(')')[0]; // removing the closing parenthesis
+					var probNameArr = probs[i].split(' ');
+					var reason = probNameArr[probNameArr.length - 1].replace(/[()]/g, ''); //getting ICD Code
+					probNameArr.splice(probNameArr.length - 1, 1); //removing ICD Code from array
+
+					var description = probNameArr.join(' ');
 					var reasonExists = false;
 
 					for (var x = 1; x <= 4; x++) { // loop through all reasons initiated at the top