|
@@ -4,7 +4,7 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
|
|
$latestSectionTS = $sectionTS;
|
|
$latestSectionTS = $sectionTS;
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
-<div data-ts="{{$sectionTS}}" class="p-3 border-bottom note-section "
|
|
|
|
|
|
+<div data-ts="{{$sectionTS}}" class="p-3 border-bottom note-section {{ $section->sectionTemplate->is_page_driven ? 'page-driven' : '' }}"
|
|
data-section-uid="{{ $section->uid }}"
|
|
data-section-uid="{{ $section->uid }}"
|
|
data-section-template-uid="{{ $section->sectionTemplate->uid }}"
|
|
data-section-template-uid="{{ $section->sectionTemplate->uid }}"
|
|
data-section-template-name="{{ $section->sectionTemplate->internal_name }}">
|
|
data-section-template-name="{{ $section->sectionTemplate->internal_name }}">
|
|
@@ -12,7 +12,7 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
|
|
@if(!isset($note) || (isset($note) && !$note->is_signed_by_hcp))
|
|
@if(!isset($note) || (isset($note) && !$note->is_signed_by_hcp))
|
|
<a class="font-weight-bold mb-2 d-flex align-items-center c-pointer">
|
|
<a class="font-weight-bold mb-2 d-flex align-items-center c-pointer">
|
|
{{$section->sectionTemplate->title}}
|
|
{{$section->sectionTemplate->title}}
|
|
- @if(!isset($guestAccessCode))
|
|
|
|
|
|
+ @if(!isset($guestAccessCode) && !$section->sectionTemplate->is_page_driven)
|
|
<span class="d-none if-not-edit"><i class="fa fa-edit ml-2"></i></span>
|
|
<span class="d-none if-not-edit"><i class="fa fa-edit ml-2"></i></span>
|
|
<span class="d-none if-edit edit-trigger font-weight-normal ml-2">Collapse</span>
|
|
<span class="d-none if-edit edit-trigger font-weight-normal ml-2">Collapse</span>
|
|
<span class="edit-trigger"></span>
|
|
<span class="edit-trigger"></span>
|
|
@@ -31,14 +31,17 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
|
|
@include('app/patient/note/_templates-index')
|
|
@include('app/patient/note/_templates-index')
|
|
@endif
|
|
@endif
|
|
|
|
|
|
- <?php
|
|
|
|
- if (file_exists(storage_path('sections/' . $sectionInternalName . '/actions.php'))) {
|
|
|
|
- include(storage_path('sections/' . $sectionInternalName . '/actions.php'));
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- <?php if (file_exists(storage_path('sections/' . $sectionInternalName . '/actions.blade.php'))): ?>
|
|
|
|
- @include('sections/' . $sectionInternalName . '/actions')
|
|
|
|
- <?php endif; ?>
|
|
|
|
|
|
+ @if (!$section->sectionTemplate->is_page_driven)
|
|
|
|
+ @if (file_exists(storage_path('sections/' . $sectionInternalName . '/actions.php'))) {
|
|
|
|
+ <?php include(storage_path('sections/' . $sectionInternalName . '/actions.php')); ?>
|
|
|
|
+ @elseif (file_exists(storage_path('sections/' . $sectionInternalName . '/actions.blade.php')))
|
|
|
|
+ @include('sections/' . $sectionInternalName . '/actions')
|
|
|
|
+ @endif
|
|
|
|
+ @else
|
|
|
|
+ @if (file_exists(resource_path('views/app/patient/page-sections/' . $sectionInternalName . '/actions.blade.php')))
|
|
|
|
+ @include("app.patient.page-sections.{$sectionInternalName}.actions")
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
|
|
{{-- refresh from client data --}}
|
|
{{-- refresh from client data --}}
|
|
<?php if ($section->sectionTemplate->is_canvas): ?>
|
|
<?php if ($section->sectionTemplate->is_canvas): ?>
|
|
@@ -80,16 +83,27 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
|
|
</div>
|
|
</div>
|
|
@if(!isset($guestAccessCode) || $section->guest_access_level == 'READ')
|
|
@if(!isset($guestAccessCode) || $section->guest_access_level == 'READ')
|
|
<div class="{{isset($guestAccessCode)?'':'d-none'}} if-not-edit inset-comment summary-container">
|
|
<div class="{{isset($guestAccessCode)?'':'d-none'}} if-not-edit inset-comment summary-container">
|
|
- {!! !empty($section->summary_html) ? $section->summary_html : '-' !!}
|
|
|
|
|
|
+ <?php if ($section->sectionTemplate->is_page_driven): ?>
|
|
|
|
+ @include("app.patient.page-sections.{$sectionInternalName}.summary")
|
|
|
|
+ <?php else: ?>
|
|
|
|
+ {!! !empty($section->summary_html) ? $section->summary_html : '-' !!}
|
|
|
|
+ <?php endif; ?>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
|
|
|
|
- @if(!isset($guestAccessCode) || $section->guest_access_level == 'WRITE')
|
|
|
|
|
|
+ @if(!$section->sectionTemplate->is_page_driven && (!isset($guestAccessCode) || $section->guest_access_level == 'WRITE'))
|
|
<div class="{{isset($guestAccessCode)?'':'d-none'}} if-edit">
|
|
<div class="{{isset($guestAccessCode)?'':'d-none'}} if-edit">
|
|
|
|
|
|
<?php
|
|
<?php
|
|
|
|
+ // if page
|
|
|
|
+ if ($section->sectionTemplate->is_page_driven) {
|
|
|
|
+ $contentData = false;
|
|
|
|
+ ?>
|
|
|
|
+ @include("app.patient.page-sections.{$sectionInternalName}.form")
|
|
|
|
+ <?php
|
|
|
|
+ }
|
|
// if canvas
|
|
// if canvas
|
|
- if ($section->sectionTemplate->is_canvas) {
|
|
|
|
|
|
+ else if ($section->sectionTemplate->is_canvas) {
|
|
$contentData = false;
|
|
$contentData = false;
|
|
if ($canvasData) {
|
|
if ($canvasData) {
|
|
$contentData = json_decode($section->content_data, true);
|
|
$contentData = json_decode($section->content_data, true);
|