瀏覽代碼

Segment: informed_consent

Vijayakrishnan 3 年之前
父節點
當前提交
bac2eceb6b

+ 40 - 0
resources/views/app/patient/segment-templates/informed_consent/edit.blade.php

@@ -0,0 +1,40 @@
+<?php
+
+use App\Models\Point;
+
+$category = 'INFORMED_CONSENT';
+$endPoint = 'upsertNoteSingleton';
+
+$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$contentData = [
+    "informed_consent" => false
+];
+if (!!@$point->data) {
+    $contentData = json_decode($point->data, true);
+}
+?>
+<div visit-moe close-on-save close-on-cancel class="d-block px-3 py-2">
+    <form show url="/api/visitPoint/<?= $endPoint ?>" class="mcp-theme-1 mt-2">
+        <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
+        <input type="hidden" name="category" value="<?= $category ?>">
+        <input type="hidden" name="data" value="{{json_encode($contentData)}}">
+
+        <label class="d-flex align-items-baseline mb-2">
+            <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
+                <input type="checkbox" data-name="informed_consent" {{@($contentData["informed_consent"] ? 'checked' : '')}}>
+            </div>
+            <span>Informed consent for treatment obtained and patient questions answered.</span>
+        </label>
+
+        <div class="pt-2">
+            <button submit class="btn btn-sm btn-primary mr-2"><i class="fa fa-save"></i></button>
+            <div class="d-inline-flex align-self-stretch align-items-center">
+                <span class="autosave-indicator saving text-sm text-secondary">Saving changes &hellip;</span>
+                <span class="autosave-indicator saved text-sm text-secondary">
+                    <i class="fa fa-check"></i>
+                    Saved
+                </span>
+            </div>
+        </div>
+    </form>
+</div>

+ 26 - 0
resources/views/app/patient/segment-templates/informed_consent/summary.blade.php

@@ -0,0 +1,26 @@
+<?php
+
+use App\Models\Point;
+
+$category = 'INFORMED_CONSENT';
+$endPoint = 'upsertNoteSingleton';
+
+$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$contentData = [
+    "informed_consent" => false
+];
+if (!!@$point->data) {
+    $contentData = json_decode($point->data, true);
+}
+?>
+
+<div class="d-flex align-items-baseline mb-2">
+    <div class="mr-2 align-self-stretch min-width-30px text-center">
+        @if(@($contentData["informed_consent"]))
+            <i class="fa fa-check"></i>
+        @else
+            -
+        @endif
+    </div>
+    <span class="flex-grow-1">Informed consent for treatment obtained and patient questions answered.</span>
+</div>