|
@@ -0,0 +1,147 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use App\Models\Client;
|
|
|
+use App\Models\Point;
|
|
|
+use App\Models\Note;
|
|
|
+use App\Models\Segment;
|
|
|
+/** @var Client $patient */
|
|
|
+/** @var Note $note */
|
|
|
+/** @var Segment $segment */
|
|
|
+
|
|
|
+?>
|
|
|
+
|
|
|
+@if($points && count($points))
|
|
|
+
|
|
|
+ <div class="d-flex border-bottom">
|
|
|
+ <a class="mr-2 min-width-110px "
|
|
|
+ open-in-stag-popup
|
|
|
+ href="/note-segment-view-by-name/{{$note->uid}}/past_medical_history/edit",
|
|
|
+ mc-initer="edit-univ_history_past_medical-container-{{$note->id}}"
|
|
|
+ title="Past Medical History"
|
|
|
+ popup-style="overflow-visible">
|
|
|
+ PMHx
|
|
|
+ </a>
|
|
|
+ <div class="flex-grow-1">
|
|
|
+
|
|
|
+<?php
|
|
|
+
|
|
|
+$point = $points[0];
|
|
|
+
|
|
|
+if(!@$note) {
|
|
|
+ $note = $patient->coreNote;
|
|
|
+}
|
|
|
+
|
|
|
+$fields = [
|
|
|
+ [
|
|
|
+ "Head" => ["Trauma"],
|
|
|
+ "Eyes" => ["Blindness", "Cataracts", "Glaucoma", "Wears glasses/contacts"],
|
|
|
+ "Ears" => ["Hearing aids"],
|
|
|
+ "Nose/Sinuses" => ["Allergic Rhinitis", "Sinus infections"],
|
|
|
+ "Mouth/Throat/Teeth" => ["Dentures"],
|
|
|
+ "Cardiovascular" => ["Aneurysm", "Angina", "DVT", "Dysrhythmia", "HTN", "Murmur", "Myocardial infarction", "Other heart disease"],
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Respiratory" => ["Asthma", "Bronchitis", "COPD - Bronchitis/Emphysema", "Pleuritis", "Pneumonia"],
|
|
|
+ "Gastrointestinal" => ["Cirrhosis", "GERD", "Gallbladder disease", "Heartburn", "Hemorrhoids", "Hepatitis", "Hiatal hernia", "Jaundice", "Ulcer"],
|
|
|
+ "Genitourinary" => ["Hernia", "Incontinence", "Nephrolithiasis", "Other kidney disease", "STDs", "UTI(s)"],
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Musculoskeletal" => ["Arthritis", "Gout", "M/S injury"],
|
|
|
+ "Skin" => ["Dermatitis", "Mole(s)", "Other skin condition(s)", "Psoriasis"],
|
|
|
+ "Neurological" => ["Epilepsy", "Seizures", "Severe headaches, migraines", "Stroke", "TIA"],
|
|
|
+ "Psychiatric" => ["Bipolar disorder", "Depression", "Hallucinations, delusions", "Suicidal ideation", "Suicide attempts"],
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Endocrine" => ["Goiter", "Hyperlipidemia", "Hypothyroidism", "Thyroid disease", "Thyroiditis", "Type I DM", "Type II DM"],
|
|
|
+ "Heme/Onc" => ["Anemia", "Cancer"],
|
|
|
+ "Infectious" => ["HIV", "STDs", "Tuberculosis (dz)", "Tuberculosis (exposure)"],
|
|
|
+ ]
|
|
|
+];
|
|
|
+
|
|
|
+$contentData = [
|
|
|
+ "bloodType" => "",
|
|
|
+ "bloodRH" => "",
|
|
|
+ "common" => [],
|
|
|
+ "customFields" => [],
|
|
|
+ "comments" => "",
|
|
|
+];
|
|
|
+$isempty = false;
|
|
|
+
|
|
|
+$contentData = $parsed = false;
|
|
|
+
|
|
|
+if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
|
+ $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
|
|
|
+ $contentData = $parsed = $point->lastChildReview->data;
|
|
|
+}
|
|
|
+
|
|
|
+if ($contentData) {
|
|
|
+
|
|
|
+ $blood = [];
|
|
|
+ if(isset($contentData['bloodType'])) {
|
|
|
+ $blood[] = $contentData['bloodType'];
|
|
|
+ }
|
|
|
+ if(isset($contentData['bloodRH'])) {
|
|
|
+ $blood[] = $contentData['bloodRH'];
|
|
|
+ }
|
|
|
+ $blood = implode(" ", $blood);
|
|
|
+ if(!empty(trim($blood))) { ?>
|
|
|
+ <div class="mb-2">
|
|
|
+ <div>Blood Type & RH: <b><?= $blood ?></b></div>
|
|
|
+ </div>
|
|
|
+ <?php }
|
|
|
+
|
|
|
+ for ($i = 0; $i < count($fields); $i++):
|
|
|
+ foreach($fields[$i] as $head => $values):
|
|
|
+ for($k = 0; $k < count($values); $k++):
|
|
|
+ $fName = $head . '_' . sanitize_field_name($values[$k]);
|
|
|
+ if(@$contentData['common'][$fName]): ?>
|
|
|
+ <div>
|
|
|
+ <?= ucwords($head) ?>
|
|
|
+ <i class="fa fa-arrow-right text-sm text-secondary"></i>
|
|
|
+ <span class="font-weight-bold"><?= $values[$k] ?></span>
|
|
|
+ <?php if(@$contentData['common'][$fName . '__comments']): ?>
|
|
|
+ <span class="text-sm ml-1 text-secondary">(<?= $contentData['common'][$fName . '__comments'] ?>)</span>
|
|
|
+ <?php endif; ?>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ endif;
|
|
|
+ endfor;
|
|
|
+ endforeach;
|
|
|
+ endfor;
|
|
|
+
|
|
|
+ // custom fields
|
|
|
+
|
|
|
+ if(isset($contentData['customFields']) && count($contentData['customFields'])):
|
|
|
+ ?> <div class=""> <?php
|
|
|
+ for ($i = 0; $i < count($contentData['customFields']); $i++):
|
|
|
+ $item = $contentData['customFields'][$i];
|
|
|
+ if($item['value']): ?>
|
|
|
+ <div>
|
|
|
+ Custom
|
|
|
+ <i class="fa fa-arrow-right text-sm text-secondary"></i>
|
|
|
+ <span class="font-weight-bold"><?= $item['label'] ?></span>
|
|
|
+ <?php if($item['comments']): ?>
|
|
|
+ <span class="text-sm ml-1 text-secondary">(<?= $item['comments'] ?>)</span>
|
|
|
+ <?php endif; ?>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ endif;
|
|
|
+ endfor;
|
|
|
+ ?> </div> <?php
|
|
|
+ endif;
|
|
|
+
|
|
|
+ if(isset($contentData['comments']) && !empty(trim($contentData['comments']))) { ?>
|
|
|
+ <div class="mt-2 mb-1">
|
|
|
+ <b>Comments: </b><?= $contentData['comments'] ?>
|
|
|
+ </div>
|
|
|
+ <?php }
|
|
|
+
|
|
|
+} else {
|
|
|
+ echo '<div class="text-secondary">-</div>';
|
|
|
+}
|
|
|
+?>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+@endif
|