|
@@ -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)}}">
|
|
@@ -271,14 +274,14 @@ if (!!@$point->data) {
|
|
<tbody>
|
|
<tbody>
|
|
<tr>
|
|
<tr>
|
|
<td>1. Little interest or pleasure in doing things</td>
|
|
<td>1. Little interest or pleasure in doing things</td>
|
|
- <td class="text-center"><button type="button" class="btn btn-blank">0</button></td>
|
|
|
|
|
|
+ <td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select zero_phq2 {{ @$contentData['no_interest_phq2'] === 0 ? 'active':'' }}" data-id="0">0</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select one_phq2 {{ @$contentData['no_interest_phq2'] == 1 ? 'active':'' }}" data-id="1">1</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select one_phq2 {{ @$contentData['no_interest_phq2'] == 1 ? 'active':'' }}" data-id="1">1</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select two_phq2 {{ @$contentData['no_interest_phq2'] == 2 ? 'active':'' }}" data-id="2">2</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select two_phq2 {{ @$contentData['no_interest_phq2'] == 2 ? 'active':'' }}" data-id="2">2</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select three_phq2 {{ @$contentData['no_interest_phq2'] == 3 ? 'active':'' }}" data-id="3">3</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select three_phq2 {{ @$contentData['no_interest_phq2'] == 3 ? 'active':'' }}" data-id="3">3</button></td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td>2. Feeling down, depressed, or hopeless</td>
|
|
<td>2. Feeling down, depressed, or hopeless</td>
|
|
- <td class="text-center"><button type="button" class="btn btn-blank">0</button></td>
|
|
|
|
|
|
+ <td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select zero_phq2 {{ @$contentData['depressed_phq2'] === 0 ? 'active':'' }}" data-id="0">0</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select one_phq2 {{ @$contentData['depressed_phq2'] == 1 ? 'active':'' }}" data-id="1">1</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select one_phq2 {{ @$contentData['depressed_phq2'] == 1 ? 'active':'' }}" data-id="1">1</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select two_phq2 {{ @$contentData['depressed_phq2'] == 2 ? 'active':'' }}" data-id="2">2</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select two_phq2 {{ @$contentData['depressed_phq2'] == 2 ? 'active':'' }}" data-id="2">2</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select three_phq2 {{ @$contentData['depressed_phq2'] == 3 ? 'active':'' }}" data-id="3">3</button></td>
|
|
<td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select three_phq2 {{ @$contentData['depressed_phq2'] == 3 ? 'active':'' }}" data-id="3">3</button></td>
|