|
@@ -83,6 +83,7 @@ class NoteController extends Controller
|
|
$sectionTemplate = null;
|
|
$sectionTemplate = null;
|
|
|
|
|
|
if($section == null){
|
|
if($section == null){
|
|
|
|
+ // TODO require valid note_uid & section_template_uid
|
|
$note = Note::where('uid', $note_uid)->first();
|
|
$note = Note::where('uid', $note_uid)->first();
|
|
$sectionTemplate = SectionTemplate::where('uid', $section_template_uid)->first();
|
|
$sectionTemplate = SectionTemplate::where('uid', $section_template_uid)->first();
|
|
} else {
|
|
} else {
|
|
@@ -90,6 +91,8 @@ class NoteController extends Controller
|
|
$sectionTemplate = SectionTemplate::where('id', $section->section_template_id)->first();
|
|
$sectionTemplate = SectionTemplate::where('id', $section->section_template_id)->first();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // our intention is to now process a submit...
|
|
|
|
+ // ... the point of which is to have newContentData and newSummaryHtml
|
|
$newContentData = [];
|
|
$newContentData = [];
|
|
$newSummaryHtml = "";
|
|
$newSummaryHtml = "";
|
|
|
|
|
|
@@ -97,6 +100,7 @@ class NoteController extends Controller
|
|
// if CREATE, $note and $sectionTemplate, and $request
|
|
// if CREATE, $note and $sectionTemplate, and $request
|
|
// if UPDATE, $section, and $request
|
|
// if UPDATE, $section, and $request
|
|
|
|
|
|
|
|
+ // remember: the existence of form.php overrides section_template.is_canvas == TRUE
|
|
if(file_exists(storage_path('sections/' . $sectionTemplate->internal_name . '/form.blade.php'))) {
|
|
if(file_exists(storage_path('sections/' . $sectionTemplate->internal_name . '/form.blade.php'))) {
|
|
|
|
|
|
include(storage_path('sections/' . $sectionTemplate->internal_name . '/processor.php'));
|
|
include(storage_path('sections/' . $sectionTemplate->internal_name . '/processor.php'));
|
|
@@ -113,6 +117,7 @@ class NoteController extends Controller
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $response = null;
|
|
if($section){
|
|
if($section){
|
|
// call Java to update section
|
|
// call Java to update section
|
|
$data = [
|
|
$data = [
|
|
@@ -135,7 +140,10 @@ class NoteController extends Controller
|
|
//TODO: handle if response->success == false
|
|
//TODO: handle if response->success == false
|
|
}
|
|
}
|
|
//return redirect(route('patients.view.notes',$note->client->uid));
|
|
//return redirect(route('patients.view.notes',$note->client->uid));
|
|
- return $newSummaryHtml;
|
|
|
|
|
|
+ return [
|
|
|
|
+ 'success' => $response->success,
|
|
|
|
+ 'newSummaryHtml' => $newSummaryHtml
|
|
|
|
+ ];
|
|
}
|
|
}
|
|
|
|
|
|
private function callJava($request, $endPoint, $data){
|
|
private function callJava($request, $endPoint, $data){
|