Просмотр исходного кода

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2

= 3 лет назад
Родитель
Сommit
7bbfb1ef71

+ 61 - 0
public/css/style.css

@@ -321,6 +321,9 @@ body>nav.navbar {
 .mcp-theme-1 .min-width-unset>.form-control.form-control-sm {
     min-width: unset !important;
 }
+.mcp-theme-1 .width-auto {
+  width: auto !important;
+}
 .mcp-theme-1 [large] .form-control.form-control-sm {
     min-width: unset;
 }
@@ -3212,3 +3215,61 @@ body.forced-masking #mask {
 .note-signed-by-hcp .show-if-note-signed {
     display: block !important;
 }
+.customized-form {
+    width: 100%;
+    padding: 15px 0;
+    font-size: 0.9rem;
+}
+
+.customized-form .container {}
+
+.customized-form .form-control {
+    border: none;
+    border-bottom: 1px solid #333;
+    border-radius: 0;
+    height: 25px;
+    padding: 0;
+    background-color: transparent;
+}
+
+.customized-form .form-control:focus {
+    outline: none;
+    box-shadow: none;
+}
+
+.customized-form .form-control.inline {
+    width: auto;
+    padding: 0 10px;
+}
+.customized-form textarea.form-control {
+    width: 100% !important;    
+}
+
+.customized-form form .row .section.bg-light {
+    padding-top: 1rem;
+    margin-bottom: 1rem;
+}
+
+.customized-form .unified-checks {
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.customized-form .unified-checks.flex-basis-20 > div {
+    flex-basis: 20%;
+}
+.customized-form .unified-checks.flex-basis-23>div.form-check {
+    flex-basis: 23%;
+}
+.customized-form .unified-checks.flex-basis-25>div.form-check {
+    flex-basis: 25%;
+}
+.customized-form .unified-checks.flex-basis-31>div.form-check {
+    flex-basis: 31%;
+}
+.customized-form .unified-checks.flex-basis-30 > div {
+    flex-basis: 30%;
+}
+.customized-form .form-check-inline .form-check-input[type="radio"] {
+    margin-top: -3px;
+}

+ 27 - 0
resources/views/app/patient/module-specific-summary-renderers/weight_loss_intake/subjective.blade.php

@@ -0,0 +1,27 @@
+@if($points && count($points))
+    <div class="d-flex border-bottom">
+        <a class="mr-2 min-width-110px hide-if-note-signed"
+            open-in-stag-popup
+           href="/module-view/{{$note->uid}}/weight_loss_intake/edit"
+           mc-initer="edit-weight_loss_intake-container-{{$note->id}}"
+           title="Weight Loss Intake"
+           popup-style="stag-popup-md overflow-visible">
+            Weight Loss
+        </a>
+        <span class="mr-2 min-width-110px font-weight-bold show-if-note-signed">
+            Weight Loss
+        </span>
+
+        <div class="flex-grow-1">
+            <table class="table table-bordered table-xs table-cage mb-0">
+                <?php $j = 0; foreach ($points as $point): $j++; ?>
+                    <tr>
+                        <td>
+                            @include('app.patient.module-specific-summary-renderers.data-dump', compact('point'))
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </table>
+        </div>
+    </div>
+@endif

+ 875 - 0
resources/views/app/patient/modules/weight_loss_intake/edit.blade.php

@@ -0,0 +1,875 @@
+<?php
+use App\Models\Client;
+use App\Models\Note;
+use App\Models\Point;
+/** @var Client $patient */
+/** @var Note $note */
+/** @var Point $point */
+
+if(!@$sessionKey) {
+    $sessionKey = request()->cookie('sessionKey');
+}
+
+$point = Point::getOrCreateOnlyTopLevelPointOfCategory($note, 'WEIGHT_LOSS_INTAKE', $sessionKey);
+
+// replace content data
+$contentData = [
+    "how_weight_affects_your_life" => "",
+    "first_notice_on_weight_gain" => "",
+    "first_notice_on_weight_gain" => "",
+    "first_notice_on_weight_gain" => "",
+    "first_notice_on_weight_gain" => "",
+    "first_notice_on_weight_gain" => "",
+    "gained_more_than_20_pounds" => "",
+    "gained_more_than_20_pounds" => "",
+    "gained_more_than_20_pounds_when" => "",
+    "weight_1_year_ago" => "",
+    "weight_5_years_ago" => "",
+    "weight_10_years_ago" => "",
+    "weight_gain_life_events" => [],
+    "weight_gain_life_events_medication_list" => "",
+    "previous_weight_loss_programs" => [],
+    "previous_weight_loss_programs_others_list" => "",
+    "max_weight_loss" => "",
+    "greatest_challenge" => "",
+    "weight_loss_medication" => [],
+    "weight_loss_medication_other" => "",
+    "wlm_what_worked" => "",
+    "wlm_what_didnt_work" => "",
+    "wlm_why_or_why_not" => "",
+    "breakfast_days_per_week" => "",
+    "breakfast_hour" => "",
+    "breakfast_min" => "",
+    "no_of_times_you_eat_per_day" => "",
+    "beverages_you_drink" => "",
+    "eats_at_night" => "",
+    "eats_at_night_when" => "",
+    "food_intolerances_list" => "",
+    "food_triggers" => [],
+    "food_triggers_other" => "",
+    "food_cravings" => [],
+    "food_cravings_favourites" => "",
+    "medical_history_exercise_type" => "",
+    "medical_history_hours" => "",
+    "medical_history_mins" => "",
+    "medical_history_no_of_times_per_week" => "",
+    "sleeping_hours_per_night" => "",
+    "feels_rested_in_morning" => "",
+    "past_medical_history" => [],
+    "past_medical_history_other" => "",
+    "eating_disorder" => "",
+    "eating_disorder_text" => "",
+    "past_surgical_history" => [],
+    "past_surgical_history_other" => "",
+    "medication_list" => "",
+    "alergies_medications" => "",
+    "alergies_food" => "",
+    "social_history_smoking" => [],
+    "current_smoker_packs_per_day" => "",
+    "past_smoker_quit_years_ago" => "",
+    "social_history_alcohol" => [],
+    "regular_drinks_per_day" => "",
+    "prior_alcoholism_treatment" => "",
+    "social_history_drugs" => [],
+    "social_history_drugs_text" => "",
+    "social_history_marijuana" => [],
+    "current_user_drinks_per_day" => "",
+    "family_history_obesity" => [],
+    "family_history_diabetes" => [],
+    "family_history_other" => [],
+    "family_history_other_text" => "",
+    "family_history_alcoholism" => "",
+    "fhdos" => "",    
+    "age_periods_started" => "",
+    "age_periods_ended" => "",
+    "periods_frequency" => "",
+    "periods_intensity" => "",
+    "no_of_pregnancies" => "",
+    "no_of_children" => "",
+    "age_of_first_pregnancy" => "",
+    "age_of_last_pregnancy" => "",
+    "system_review" => [],
+    "women_only" => [],
+    "comments" => "",
+];
+
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $point->lastChildReview->data;
+}
+?>
+<div class="p-3 mcp-theme-1">
+
+    <div visit-moe close-on-save close-on-cancel class="d-block">
+        <form 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="<?= $note->coreSegment->uid ?>">
+            <input type="hidden" name="data" value="{{json_encode($contentData)}}">
+
+            <div id="edit-weight_loss_intake-container" class="customized-form">
+
+                @include('app.patient.modules._undo_changes', compact('point'))
+
+                <div class="row mb-1">
+					<div class="col-md-12 section">
+						<div class="form-group">
+                        <label>How does your weight affect your life and health?</label>
+						<textarea class="form-control inline flex-grow-1" v-model="data.how_weight_affects_your_life_1"></textarea>
+						</div>
+					</div>
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>Weight History</u></b></h6>
+					</div>
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<label>When did you first notice that you were gaining weight? </label>
+							<div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.first_notice_on_weight_gain"
+										id="wg-childhood" value="childhood">
+									<label class="form-check-label" for="wg-childhood">Childhood</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.first_notice_on_weight_gain"
+										id="wg-teens" value="teens">
+									<label class="form-check-label" for="wg-teens">Teens</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.first_notice_on_weight_gain"
+										id="wg-adulthood" value="adulthood">
+									<label class="form-check-label" for="wg-adulthood">Adulthood</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.first_notice_on_weight_gain"
+										id="wg-pregnancy" value="pregnancy">
+									<label class="form-check-label" for="wg-pregnancy">Pregnancy</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.first_notice_on_weight_gain"
+										id="wg-menopause" value="menopause">
+									<label class="form-check-label" for="wg-menopause">Menopause</label>
+								</div>
+							</div>
+						</div>
+					</div>
+					<div class="col-md-12 section">
+						<div class="form-group">
+							<label>Did you ever gain more than 20 pounds in less than 3 months?</label>
+							<div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.gained_more_than_20_pounds"
+										id="gm-yes" value="yes">
+									<label class="form-check-label" for="gm-yes">Yes</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.gained_more_than_20_pounds"
+										id="gm-no" value="no">
+									<label class="form-check-label" for="gm-no">No</label>
+								</div>
+							</div>
+							<div class="d-flex mt-3">
+								<label>If so, when?</label>
+								<input type="text" class="form-control inline flex-grow-1"
+									v-model="data.gained_more_than_20_pounds_when" />
+							</div>
+						</div>
+					</div>
+					<div class="col-md-12 section">
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">How much did you weigh:</label>
+								<div class="d-flex mr-3">
+									<label>one year ago?</label>
+									<input type="text" class="form-control inline width-50px" v-model="data.weight_1_year_ago">
+								</div>
+								<div class="d-flex mr-3">
+									<label>Five years ago?</label>
+									<input type="text" class="form-control inline width-50px" v-model="data.weight_5_years_ago">
+								</div>
+								<div class="d-flex">
+									<label>10 years ago?</label>
+									<input type="text" class="form-control inline width-50px" v-model="data.weight_10_years_ago">
+								</div>
+							</div>
+						</div>
+					</div>
+
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<label>Life events associated with weight gain (check all that apply):</label>
+							<div class="unified-checks flex-basis-20">
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-marriage" value="marriage">
+									<label class="form-check-label" for="le-marriage">Marriage</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-divorce" value="divorce">
+									<label class="form-check-label" for="le-divorce">Divorce</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-pregnancy" value="pregnancy">
+									<label class="form-check-label" for="le-pregnancy">Pregnancy</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-abuse" value="abuse">
+									<label class="form-check-label" for="le-abuse">Abuse</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-illness" value="illness">
+									<label class="form-check-label" for="le-illness">Illness</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-travel" value="travel">
+									<label class="form-check-label" for="le-travel">Travel</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-injury" value="injury">
+									<label class="form-check-label" for="le-injury">Injury</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-nightshift_work"
+										value="nightshift_work">
+									<label class="form-check-label" for="le-nightshift_work">Nightshift Work</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-job_change"
+										value="job_change">
+									<label class="form-check-label" for="le-job_change">Job Change</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-quitting_smoking"
+										value="quitting_smoking">
+									<label class="form-check-label" for="le-quitting_smoking">Quitting Smoking</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-alcohol" value="alcohol">
+									<label class="form-check-label" for="le-alcohol">Alcohol</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-drugs" value="drugs">
+									<label class="form-check-label" for="le-drugs">Drugs</label>
+								</div>
+								<div class="d-flex flex-grow-1 align-items-end">
+									<div class="form-check form-check-inline mr-3">
+										<input class="form-check-input" type="checkbox" v-model="data.weight_gain_life_events" id="le-medication"
+											value="medication">
+										<label class="form-check-label" for="le-medication">Medication</label>
+									</div>
+									<div class="d-flex flex-grow-1 align-items-end">
+										<label class="text-nowrap mb-0 mr-3">please list:</label>
+										<input type="text" class="form-control d-inline flex-grow-1" v-model="data.weight_gain_life_events_medication_list" />
+									</div>
+								</div>
+
+							</div>
+						</div>
+					</div>
+
+					<div class="col-md-12 section">
+						<div class="form-group">
+							<label>Previous weight-loss programs (check all that apply):</label>
+							<div class="unified-checks flex-basis-20">
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-weight_watchers" value="weight_watchers">
+									<label class="form-check-label" for="pwl-weight_watchers">Weight Watchers</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-nutrisystem" value="nutrisystem">
+									<label class="form-check-label" for="pwl-nutrisystem">Nutrisystem</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-jenny_craig" value="jenny_craig">
+									<label class="form-check-label" for="pwl-jenny_craig">Jenny Craig</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-la_weight_loss" value="la_weight_loss">
+									<label class="form-check-label" for="pwl-la_weight_loss">LA Weight Loss</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-atkins" value="atkins">
+									<label class="form-check-label" for="pwl-atkins">Atkins</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-south_beach" value="south_beach">
+									<label class="form-check-label" for="pwl-south_beach">South Beach</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-zone_diet" value="zone_diet">
+									<label class="form-check-label" for="pwl-zone_diet">Zone diet</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-medifast" value="medifast">
+									<label class="form-check-label" for="pwl-medifast">Medifast</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-dash_diet" value="dash_diet">
+									<label class="form-check-label" for="pwl-dash_diet">Dash Diet</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-paleo_diet" value="paleo_diet">
+									<label class="form-check-label" for="pwl-paleo_diet">Paleo Diet</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-hcg_diet" value="hcg_diet">
+									<label class="form-check-label" for="pwl-hcg_diet">HCG diet</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-mediterranean_diet" value="mediterranean_diet">
+									<label class="form-check-label" for="pwl-mediterranean_diet">Mediterranean diet</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-ornish_diet" value="ornish_diet">
+									<label class="form-check-label" for="pwl-ornish_diet">Ornish diet</label>
+								</div>							
+								
+								<div class="d-flex flex-grow-1 align-items-end">
+									<div class="form-check form-check-inline mr-3">
+										<input class="form-check-input" type="checkbox" v-model="data.previous_weight_loss_programs" id="pwl-other"
+											value="other">
+										<label class="form-check-label" for="pwl-other">Other</label>
+									</div>
+									<div class="d-flex flex-grow-1 align-items-end">
+										<label class="text-nowrap mb-0 mr-3">please list:</label>
+										<input type="text" class="form-control d-inline flex-grow-1" v-model="data.previous_weight_loss_programs_others_list" />
+									</div>
+								</div>
+
+							</div>
+						</div>
+					</div>
+
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<div class="d-flex">
+								<label>What was your maximum weight loss?</label>
+								<input type="text" class="form-control inline flex-grow-1" v-model="data.max_weight_loss">
+							</div>
+							<div class="mt-3">
+								<div class="d-flex flex-column">
+									<label>What are your greatest challenges with dieting?</label>
+									<textarea class="form-control inline" v-model="data.greatest_challenge"></textarea>
+								</div>
+							</div>
+						</div>
+					</div>
+
+					<div class="col-md-12 section">
+						<div class="form-group">
+							<label>Have you ever taken medication to lose weight? (check all that apply):</label>
+							<div class="unified-checks flex-basis-23">
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-phentermine" value="phentermine">
+									<label class="form-check-label" for="wlm-phentermine">Phentermine (Adipex)</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-meridia" value="meridia">
+									<label class="form-check-label" for="wlm-meridia">Meridia</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-xenecal" value="xenecal">
+									<label class="form-check-label" for="wlm-xenecal">Xenecal/Alli</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-phen" value="phen">
+									<label class="form-check-label" for="wlm-phen">Phen/Fen</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-phendimetrazine" value="phendimetrazine">
+									<label class="form-check-label" for="wlm-phendimetrazine">Phendimetrazine(Bontril)</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-topamax" value="topamax">
+									<label class="form-check-label" for="wlm-topamax">Topamax</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-saxenda" value="saxenda">
+									<label class="form-check-label" for="wlm-saxenda">Saxenda</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-diethylpropion" value="diethylpropion">
+									<label class="form-check-label" for="wlm-diethylpropion">Diethylpropion</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-bupropion" value="bupropion">
+									<label class="form-check-label" for="wlm-bupropion">Bupropion (Wellbutrin)</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-belviq" value="belviq">
+									<label class="form-check-label" for="wlm-belviq">Belviq</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-qsymia" value="qsymia">
+									<label class="form-check-label" for="wlm-qsymia">Qsymia</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-contrave" value="contrave">
+									<label class="form-check-label" for="wlm-contrave">Contrave</label>
+								</div>				
+								
+								<div class="d-flex flex-grow-1 align-items-end">
+									<div class="form-check form-check-inline mr-3">
+										<input class="form-check-input" type="checkbox" v-model="data.weight_loss_medication" id="wlm-other"
+											value="other">
+										<label class="form-check-label" for="wlm-other">Other</label>
+									</div>
+									<div class="d-flex flex-grow-1 align-items-end">
+										<label class="text-nowrap mb-0 mr-3">(including supplements):</label>
+										<input type="text" class="form-control d-inline flex-grow-1" v-model="data.weight_loss_medication_other" />
+									</div>
+								</div>
+							</div>
+							<div class="form-group mt-3">
+								<div class="d-flex">
+									<label>What worked?</label>
+									<input type="text" class="form-control inline flex-grow-1" v-model="data.wlm_what_worked" />
+								</div>
+							</div>
+							<div class="form-group">
+								<div class="d-flex">
+									<label>What didn't work?</label>
+									<input type="text" class="form-control inline flex-grow-1" v-model="data.wlm_what_didnt_work" />
+								</div>
+							</div>
+							<div class="form-group">
+								<div class="d-flex">
+									<label>Why or why not?</label>
+									<input type="text" class="form-control inline flex-grow-1" v-model="data.wlm_why_or_why_not" />
+								</div>
+							</div>
+						</div>
+					</div>
+
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>Nutritional History</u></b></h6>
+					</div>
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">How often do you eat breakfast?</label>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" v-model="data.breakfast_days_per_week">
+									<label>days per week at</label>
+								</div>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" style="width:50px" v-model="data.breakfast_hour">
+									<label>:</label>
+								</div>
+								<div class="d-flex mr-3">									
+									<input type="text" class="form-control inline" style="width:50px" v-model="data.breakfast_min">
+									<label>a.m</label>
+								</div>
+							</div>
+						</div>
+
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">Number of times you eat per day:</label>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" v-model="data.no_of_times_you_eat_per_day">
+								</div>
+								<div class="d-flex mr-3 flex-grow-1">
+									<label> What beverages do you drink?</label>
+									<input type="text" class="form-control inline flex-grow-1" v-model="data.beverages_you_drink">
+								</div>
+							</div>
+						</div>
+
+						<div class="form-group">
+							<label>Do you get up at night to eat?</label>
+							<div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.eats_at_night" id="eats-at-night-yes" value="yes">
+									<label class="form-check-label" for="eats-at-night-yes">Yes</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="radio" v-model="data.eats_at_night" id="eats-at-night-no" value="no">
+									<label class="form-check-label" for="eats-at-night-no">No</label>
+								</div>
+							</div>
+							<div class="d-flex mt-3">
+								<label>If so, how often?</label>
+								<input type="text" class="form-control inline" v-model="data.eats_at_night_when">
+								<label>times</label>
+							</div>
+						</div>
+
+						<div class="form-group">
+							<div class="d-flex">
+								<label>List any food intolerances/restrictions:</label>
+								<input type="text" class="form-control inline flex-grow-1" v-model="data.food_intolerances_list">
+							</div>
+						</div>
+						<div class="form-group">
+							<label>Food triggers (check all that apply):</label>
+							<div class="unified-checks flex-basis-20">
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-stress" value="stress">
+									<label class="form-check-label" for="ft-stress">Stress</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-boredom" value="boredom">
+									<label class="form-check-label" for="ft-boredom">Boredom</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-anger" value="anger">
+									<label class="form-check-label" for="ft-anger">Anger</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-insomnia" value="insomnia">
+									<label class="form-check-label" for="ft-insomnia">Insomnia</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-seeking_reward" value="seeking_reward">
+									<label class="form-check-label" for="ft-seeking_reward">Seeking reward</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-parties" value="parties">
+									<label class="form-check-label" for="ft-parties">Parties</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-eating_out" value="eating_out">
+									<label class="form-check-label" for="ft-eating_out">Eating out</label>
+								</div>								
+								<div class="d-flex flex-grow-1 align-items-end">
+									<div class="form-check form-check-inline mr-3">
+										<input class="form-check-input" type="checkbox" v-model="data.food_triggers" id="ft-other"
+											value="other">
+										<label class="form-check-label" for="ft-other">Other</label>
+									</div>
+									<div class="d-flex flex-grow-1 align-items-end">
+										<input type="text" class="form-control d-inline flex-grow-1" v-model="data.food_triggers_other" />
+									</div>
+								</div>
+							</div>
+						</div>
+						<div class="form-group">
+							<label>Food cravings:</label>
+							<div class="unified-checks flex-basis-20">
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-sugar" value="sugar">
+									<label class="form-check-label" for="fc-sugar">Sugar</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-chocolate" value="chocolate">
+									<label class="form-check-label" for="fc-chocolate">Chocolate</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-starches" value="starches">
+									<label class="form-check-label" for="fc-starches">Starches</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-salty" value="salty">
+									<label class="form-check-label" for="fc-salty">Salty</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-fast_food" value="fast_food">
+									<label class="form-check-label" for="fc-fast_food">Fast food</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-high_fat" value="high_fat">
+									<label class="form-check-label" for="fc-high_fat">High fat</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-largr_portions" value="largr_portions">
+									<label class="form-check-label" for="fc-largr_portions">Large portions</label>
+								</div>								
+								<div class="d-flex flex-grow-1 align-items-end">
+									<div class="form-check form-check-inline mr-3">
+										<input class="form-check-input" type="checkbox" v-model="data.food_cravings" id="fc-other"
+											value="other">
+										<label class="form-check-label" for="fc-other">Favorite foods</label>
+									</div>
+									<div class="d-flex flex-grow-1 align-items-end">
+										<input type="text" class="form-control d-inline flex-grow-1" v-model="data.food_cravings_favourites" />
+									</div>
+								</div>
+							</div>
+						</div>
+
+
+					</div>
+
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>Exercise & Sleep</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<div class="d-flex">
+								<label>Exercise type:</label>
+								<input type="text" class="form-control inline flex-grow-1" v-model="data.medical_history_exercise_type">
+							</div>
+						</div>
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">Duration:</label>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" v-model="data.medical_history_hours">
+									<label>hours</label>
+								</div>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" style="width:50px" v-model="data.medical_history_mins">
+									<label>minutes</label>
+								</div>
+								<div class="d-flex mr-3 flex-grow-1">	
+									<label>Number of times per week:</label>								
+									<input type="text" class="form-control inline flex-grow-1" v-model="data.medical_history_no_of_times_per_week">
+									
+								</div>
+							</div>
+						</div>
+					</div>
+
+					<div class="col-md-12">
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">How many hours do you sleep per night?</label>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" v-model="data.sleeping_hours_per_night">
+								</div>
+								<div class="d-flex mr-3 flex-grow-1">	
+									<label>Do you feel rested in the morning?</label>								
+									<input type="text" class="form-control inline flex-grow-1" v-model="data.feels_rested_in_morning">
+								</div>
+							</div>
+						</div>
+					</div>
+
+                    <div class="col-md-12">
+						<h6 class="my-3"><b><u>Past medical history (check all that apply)</u></b></h6>
+					</div>
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<div class="unified-checks flex-basis-20">
+								<!-- Medical history fields -->
+							</div>
+						</div>
+					</div>
+
+                    <div class="col-md-12">
+						<h6 class="my-3"><b><u>Medications</u></b></h6>
+					</div>
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<label>(list all current medications, including over-the-counter medications, supplements, and herbs):</label>
+							<textarea class="form-control"v-model="data.medication_list"></textarea>
+						</div>
+					</div>
+
+                    <div class="col-md-12">
+						<h6 class="my-3"><b><u>Alergies</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section">
+						<!-- Alergies fields -->
+					</div>
+
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>Social History</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<!-- Social history fields -->
+					</div>
+
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>Family History</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section">
+						<!-- Family history fields -->
+
+					</div>
+
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>Gynecologic History</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">Age periods started?</label>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" v-model="data.age_periods_started" style="width:50px">
+								</div>
+								<div class="d-flex mr-3">
+									<label>Age periods ended</label>
+									<input type="text" class="form-control inline" style="width:50px" v-model="data.age_periods_ended">
+								</div>
+							</div>
+						</div>
+						<div class="form-group">
+							<label>Periods are:</label>
+							<div class="d-flex">
+								<div class="mr-5">
+									<div class="form-check form-check-inline">
+										<input class="form-check-input" type="radio" v-model="data.periods_frequency" id="periods-frequency-regular" value="regular">
+										<label class="form-check-label" for="periods-frequency-regular">Regular</label>
+									</div>
+									<div class="form-check form-check-inline">
+										<input class="form-check-input" type="radio" v-model="data.periods_frequency" id="periods-frequency-irregular" value="irregular">
+										<label class="form-check-label" for="periods-frequency-irregular">Irregular</label>
+									</div>
+								</div>
+								<div>
+									<div class="form-check form-check-inline">
+										<input class="form-check-input" type="radio" v-model="data.periods_intensity" id="periods-intensity-heavy" value="heavy">
+										<label class="form-check-label" for="periods-intensity-heavy">Heavy</label>
+									</div>
+									<div class="form-check form-check-inline">
+										<input class="form-check-input" type="radio" v-model="data.periods_intensity" id="periods-intensity-normal" value="normal">
+										<label class="form-check-label" for="periods-intensity-normal">Normal</label>
+									</div>
+									<div class="form-check form-check-inline">
+										<input class="form-check-input" type="radio" v-model="data.periods_intensity" id="periods-intensity-light" value="light">
+										<label class="form-check-label" for="periods-intensity-light">Light</label>
+									</div>
+								</div>
+							</div>
+						</div>
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">Number of pregnancies:</label>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" v-model="data.no_of_pregnancies" style="width:50px">
+								</div>
+								<div class="d-flex mr-3">
+									<label>Number of children:</label>
+									<input type="text" class="form-control inline" style="width:50px" v-model="data.no_of_children">
+								</div>
+							</div>
+						</div>
+						<div class="form-group">
+							<div class="d-flex flex-wrap">
+								<label class="mr-3">Age of first pregnancy:</label>
+								<div class="d-flex mr-3">
+									<input type="text" class="form-control inline" v-model="data.age_of_first_pregnancy" style="width:50px">
+								</div>
+								<div class="d-flex mr-3">
+									<label>Age of last pregnancy:</label>
+									<input type="text" class="form-control inline" style="width:50px" v-model="data.age_of_last_pregnancy">
+								</div>
+							</div>
+						</div>
+
+
+
+					</div>
+
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>System Review</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section">
+						<!-- checkboxes for system review here -->
+					</div>
+
+					<div class="col-md-12">
+						<h6 class="my-3"><b><u>(Women only)</u></b></h6>
+					</div>
+
+					<div class="col-md-12 section bg-light pt-2 mb-3">
+						<div class="form-group">
+							<div class="unified-checks flex-basis-31">
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.women_only" id="wo-periods_absence" value="periods_absence">
+									<label class="form-check-label" for="wo-periods_absence">Absence of periods	</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.women_only" id="wo-hot_flashes" value="hot_flashes">
+									<label class="form-check-label" for="wo-hot_flashes">Hot flashes</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.women_only" id="wo-bladder_habits_change" value="bladder_habits_change">
+									<label class="form-check-label" for="wo-bladder_habits_change">Change in bladder habits</label>
+								</div>
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.women_only" id="wo-abnormal_menstruation" value="abnormal_menstruation">
+									<label class="form-check-label" for="wo-abnormal_menstruation">Abnormal/excessive menstruation</label>
+								</div>					
+								<div class="form-check form-check-inline">
+									<input class="form-check-input" type="checkbox" v-model="data.women_only" id="wo-facial_hair" value="facial_hair">
+									<label class="form-check-label" for="wo-facial_hair"> Facial hair</label>
+								</div>	
+								
+							</div>
+						</div>
+					</div>
+
+					<div class="col-md-12 section mt-2">
+						<div class="form-group">
+                            <label>Comments:</label>
+                            <textarea type="text" class="form-control inline flex-grow-1" v-model="data.comments"></textarea>
+						</div>
+					</div>
+
+
+				</div>
+
+                <div class="mt-3 pt-3 border-top text-center">
+                    <button type="button" v-on:click.prevent="saveForm()" class="btn btn-sm btn-primary mr-2">Submit</button>
+                    <button type="button" onclick="closeStagPopup()" class="btn btn-sm btn-default border">Cancel</button>
+                </div>
+
+            </div>
+
+            <div class="d-none">
+                <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
+                <button cancel class="btn btn-sm btn-default border">Cancel</button>
+            </div>
+        </form>
+    </div>
+</div>
+<script>
+    (function() {
+        function init() {
+
+            runMCInitializer('hide-moes');
+            // any JS can come here
+            // will be run on page-load as well as whenever this segment is refreshed
+            new Vue({
+                el: '#edit-weight_loss_intake-container',
+                delimiters: ["@{{","}}"],
+                data: {
+                    data: <?= json_encode($contentData) ?>
+                },
+                watch: {
+                    $data: {
+                        handler: function(val, oldVal) {
+                            let parent = $('#edit-weight_loss_intake-container').closest('form');
+                            parent.find('[name="data"]').val(JSON.stringify(this.data));
+
+                            // autosave on change
+                            autoSaveSegment(parent.find('[submit]').first());
+                        },
+                        deep: true
+                    }
+                },
+                methods: {
+                    saveForm: function() {
+                        let parent = $('#edit-weight_loss_intake-container').closest('form');
+                        parent.find('[name="data"]').val(JSON.stringify(this.data));
+                        autoSaveSegmentAndClose(parent.find('[submit]').first());
+                    },
+                    undoChanges: function() {
+                        $.post('/api/visitPoint/destroyCurrentChildReview', {
+                            uid: '{{$point->uid}}'
+                        }, _data => {
+                            if(!hasResponseError(_data)) {
+                                closeStagPopup();
+                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                            }
+                        });
+                        return false;
+                    }
+                }
+            });
+        }
+
+        window.segmentInitializers.lifestyle_social = init;
+
+        addMCInitializer('edit-weight_loss_intake-container-{{$note->id}}', init, '#edit-weight_loss_intake-container');
+
+    })();
+</script>

+ 11 - 0
resources/views/app/patient/note/dashboard.blade.php

@@ -510,6 +510,13 @@ use App\Models\Handout;
                     "href" => "/module-view/{$note->uid}/lifestyle_substances/edit",
                     "initer" => "edit-univ_sub_substance_use_assessment-container-{$note->id}"
                 ],
+                [
+                    "name" => 'Weight Loss Intake',
+                    "title" => 'Weight Loss Intake',
+                    "style" => 'stag-popup-md',
+                    "href" => "/module-view/{$note->uid}/weight_loss_intake/edit",
+                    "initer" => "edit-weight_loss_intake-container-{$note->id}"
+                ],
             ];
             ?>
             <div moe relative class="px-2 border-left screen-only">
@@ -1016,6 +1023,10 @@ use App\Models\Handout;
                                     if (bmi >= 30) {
                                         bmiCategory = '(Obese)';
                                     }
+                                    bmiCategoryElem.show();
+                                    if (bmiCategory == '') {
+                                      bmiCategoryElem.hide();
+                                    }
                                     bmiCategoryElem.val(bmiCategory);
                                 } catch (e) {
                                     return false;

+ 1 - 0
resources/views/app/patient/segment-templates/omega_subjective_system/summary.blade.php

@@ -134,6 +134,7 @@ $topLevelPointToRendererMap = [
     'LIFESTYLE_SOCIAL_RELATIONSHIPS' => 'lifestyle_social_relationships',
     'LIFESTYLE_STRESS' => 'lifestyle_stress',
     'LIFESTYLE_SUBSTANCE_USE' => 'lifestyle_substance_use',
+    'WEIGHT_LOSS_INTAKE' => 'weight_loss_intake',
 ];
 
 $pointMap = [];

+ 4 - 0
resources/views/app/patient/vitals-settings.blade.php

@@ -72,6 +72,10 @@
                     if (bmi >= 30) {
                         bmiCategory = '(Obese)';
                     }
+                    bmiCategoryElem.show();
+                    if (bmiCategory == '') {
+                      bmiCategoryElem.hide();
+                    }
                     bmiCategoryElem.val(bmiCategory);
                 } catch (e) {
                     return false;

+ 9 - 9
resources/views/app/patient/vitals-settings/bmi-management-form.blade.php

@@ -5,7 +5,7 @@
         <p class="text-secondary font-weight-bold font-size-14">BMI/Weight Management</p>
 
         <div class="mb-3 d-flex align-items-center">
-            <span class="text-secondary min-width-140px">Current Height:</span>
+            <span class="text-secondary mr-2">Current Height:</span>
             <div class="width-50px mr-1">
                 <input type="text" name="current_height_FT" class="form-control form-control-sm min-width-unset rounded-0"
                        heightFeetInput
@@ -36,16 +36,16 @@
               <tr>
                 <td>Usual</td>
                 <td>
-                  <div class="width-100px"><?= vsElement('usual_weight_in_pounds_min', 'number', 'usualWeightInPoundsMin', $patient) ?></div>
+                  <div class="width-70px"><?= vsElement('usual_weight_in_pounds_min', 'number', 'usualWeightInPoundsMin', $patient) ?></div>
                 </td>
                 <td>
                   <div class="d-flex align-items-center">
-                    <div class="width-100px"><?= vsRoElement('usual_bmi_min', 'number', 'usualBmiMin', $patient) ?></div>
+                    <div class="width-70px"><?= vsRoElement('usual_bmi_min', 'number', 'usualBmiMin', $patient) ?></div>
                     <span class="text-secondary">
                       <input type="text" readonly=""
-                      class="form-control form-control-sm min-width-unset rounded-0 border-0 bg-transparent"
+                      class="border-0 bg-transparent width-90px ml-2"
                       name="usualBmiMinCategory"
-                      value="{{$patient->usual_bmi_min_category ?: ''}}">
+                      value="{{$patient->usual_bmi_min_category ?? ''}}">
                     </span>
                   </div>
                 </td>
@@ -53,16 +53,16 @@
               <tr>
                 <td>Target</td>
                 <td>
-                  <div class="width-100px"><?= vsElement('ideal_weight_in_pounds', 'number', 'idealWeightInPounds', $patient) ?></div>
+                  <div class="width-70px"><?= vsElement('ideal_weight_in_pounds', 'number', 'idealWeightInPounds', $patient) ?></div>
                 </td>
                 <td>
                   <div class="d-flex align-items-center">
-                  <div class="width-100px"><?= vsRoElement('ideal_bmi', 'number', 'idealBmi', $patient) ?></div>
+                  <div class="width-70px"><?= vsRoElement('ideal_bmi', 'number', 'idealBmi', $patient) ?></div>
                   <span class="text-secondary">
                       <input type="text" readonly=""
-                             class="form-control form-control-sm min-width-unset rounded-0 border-0 bg-transparent"
+                             class="border-0 bg-transparent width-90px ml-2"
                              name="idealBmiCategory"
-                             value="{{$patient->ideal_bmi_category ?: ''}}">
+                             value="{{$patient->ideal_bmi_category ?? ''}}">
                   </span>
                 </div>
                 </td>

+ 14 - 10
resources/views/app/patient/vitals-settings/bmi-management-summary.blade.php

@@ -3,7 +3,7 @@
       <fieldset disabled>
         <input type="hidden" name="uid" value="{{$patient->uid}}">
         <div class="mb-3 d-flex align-items-center">
-            <span class="text-secondary min-width-140px">Current Height:</span>
+            <span class="text-secondary mr-2">Current Height:</span>
             <div class="width-50px mr-1">
                 <input type="text" name="current_height_FT" class="form-control form-control-sm min-width-unset rounded-0"
                        heightFeetInput
@@ -34,16 +34,18 @@
               <tr>
                 <td>Usual</td>
                 <td>
-                  <div class="width-100px"><?= vsElement('usual_weight_in_pounds_min', 'number', 'usualWeightInPoundsMin', $patient) ?></div>
+                  <div class="width-70px"><?= vsElement('usual_weight_in_pounds_min', 'number', 'usualWeightInPoundsMin', $patient) ?></div>
                 </td>
                 <td>
                   <div class="d-flex align-items-center">
-                    <div class="width-100px"><?= vsRoElement('usual_bmi_min', 'number', 'usualBmiMin', $patient) ?></div>
+                    <div class="width-70px"><?= vsRoElement('usual_bmi_min', 'number', 'usualBmiMin', $patient) ?></div>
                     <span class="text-secondary">
-                      <input type="text" readonly=""
-                      class="form-control form-control-sm min-width-unset rounded-0 border-0 bg-transparent"
-                      name="usualBmiMinCategory"
-                      value="{{$patient->usual_bmi_min_category ?: ''}}">
+                      @if($patient->usual_bmi_min_category)
+                        <input type="text" readonly=""
+                        class="border-0 bg-transparent width-90px ml-1"
+                        name="usualBmiMinCategory"
+                        value="{{$patient->usual_bmi_min_category ?? ''}}">
+                      @endif
                     </span>
                   </div>
                 </td>
@@ -51,16 +53,18 @@
               <tr>
                 <td>Target</td>
                 <td>
-                  <div class="width-100px"><?= vsElement('ideal_weight_in_pounds', 'number', 'idealWeightInPounds', $patient) ?></div>
+                  <div class="width-70px"><?= vsElement('ideal_weight_in_pounds', 'number', 'idealWeightInPounds', $patient) ?></div>
                 </td>
                 <td>
                   <div class="d-flex align-items-center">
-                  <div class="width-100px"><?= vsRoElement('ideal_bmi', 'number', 'idealBmi', $patient) ?></div>
+                  <div class="width-70px"><?= vsRoElement('ideal_bmi', 'number', 'idealBmi', $patient) ?></div>
                   <span class="text-secondary">
+                    @if($patient->ideal_bmi_category)
                       <input type="text" readonly=""
-                             class="form-control form-control-sm min-width-unset rounded-0 border-0 bg-transparent"
+                             class="border-0 bg-transparent width-90px ml-1"
                              name="idealBmiCategory"
                              value="{{$patient->ideal_bmi_category ?: ''}}">
+                    @endif
                   </span>
                 </div>
                 </td>