|
@@ -3,9 +3,9 @@
|
|
use App\Models\Point;
|
|
use App\Models\Point;
|
|
|
|
|
|
$category = 'COVID_FOLLOW-UP';
|
|
$category = 'COVID_FOLLOW-UP';
|
|
-$endPoint = 'upsertNoteSingleton';
|
|
|
|
|
|
|
|
-$point = Point::getGlobalSingletonOfCategory($patient, $category, true);
|
|
|
|
|
|
+$point = Point::getOrCreateOnlyTopLevelPointOfCategory($note, $category, $sessionKey, true);
|
|
|
|
+
|
|
$contentData = [
|
|
$contentData = [
|
|
"ans_has_received_printed_cdc_covid_matrials" => null, // yes/no
|
|
"ans_has_received_printed_cdc_covid_matrials" => null, // yes/no
|
|
"ans_has_signed_up_for_gvt_covid_kit" => null, // yes/no/not_sure
|
|
"ans_has_signed_up_for_gvt_covid_kit" => null, // yes/no/not_sure
|
|
@@ -42,13 +42,16 @@ $contentData = [
|
|
"follow_up_for" => null
|
|
"follow_up_for" => null
|
|
];
|
|
];
|
|
|
|
|
|
-if (!!@$point->data) {
|
|
|
|
- $contentData = $point->data;
|
|
|
|
|
|
+if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
|
|
+ $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
|
|
|
|
+ $contentData = $point->lastChildReview->data;
|
|
}
|
|
}
|
|
|
|
|
|
?>
|
|
?>
|
|
-<div visit-moe close-on-save close-on-cancel class="d-block p-3">
|
|
|
|
- <form id="visitNoteForm" show url="/api/visitPoint/<?= $endPoint ?>" class="mcp-theme-1">
|
|
|
|
|
|
+<div visit-moe close-on-save close-on-cancel class="d-block p-3">
|
|
|
|
+ <form id="visitNoteForm" show url="/api/visitPoint/upsertChildReview" class="mcp-theme-1">
|
|
|
|
+ <input type="hidden" name="uid" value="<?= $point->uid ?>">
|
|
|
|
+ <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
|
|
<input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
|
|
<input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
|
|
<input type="hidden" name="category" value="<?= $category ?>">
|
|
<input type="hidden" name="category" value="<?= $category ?>">
|
|
<input id="mainData" type="hidden" name="data" value="{{json_encode($contentData)}}">
|
|
<input id="mainData" type="hidden" name="data" value="{{json_encode($contentData)}}">
|