Przeglądaj źródła

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

Josh 4 lat temu
rodzic
commit
cae4169897
26 zmienionych plików z 2035 dodań i 130 usunięć
  1. 30 2
      gem/forms/new-patient-intake/build/form.blade.php
  2. 16 0
      gem/forms/new-patient-intake/spec.json
  3. 8 2
      gem/templates/form.blade.php
  4. 10 0
      public/css/style.css
  5. 3 3
      public/js/yemi.js
  6. 4 0
      resources/views/app/new-patient.blade.php
  7. 88 15
      resources/views/app/patient/note/_create-bill.blade.php
  8. 42 23
      resources/views/app/patient/note/dashboard.blade.php
  9. 13 14
      resources/views/app/patient/partials/vitals.blade.php
  10. 103 45
      resources/views/app/patient/settings.blade.php
  11. 2 2
      resources/views/app/practice-management/bills.blade.php
  12. 3 3
      resources/views/app/practice-management/financial-transactions.blade.php
  13. 10 2
      resources/views/layouts/patient.blade.php
  14. 1 1
      resources/views/layouts/template.blade.php
  15. 4 0
      storage/sections/new-patient-intake/default.php
  16. 30 2
      storage/sections/new-patient-intake/form.blade.php
  17. 4 1
      storage/sections/new-patient-intake/summary.php
  18. 845 0
      storage/sections/physical-activity-assessment/form.blade.php
  19. 2 0
      storage/sections/physical-activity-assessment/processor.php
  20. 802 0
      storage/sections/physical-activity-assessment/summary.php
  21. 3 3
      storage/templates/kct-mdm/injectable-medications.json
  22. 4 4
      storage/templates/kct-mdm/respiratory-therapy.json
  23. 2 2
      storage/templates/kct-mp/fb-removal.json
  24. 3 3
      storage/templates/kct-mp/laceration-repair.json
  25. 1 1
      storage/templates/minor-procedures/fb-removal.json
  26. 2 2
      storage/templates/minor-procedures/laceration-repair.json

+ 30 - 2
gem/forms/new-patient-intake/build/form.blade.php

@@ -17,6 +17,28 @@ $formID = rand(0, 100000);
     <?php endif; ?>
 
     <div class="gem-nodes">
+    <div class="my-3 node node-level-0" data-key="how_are_you">
+        <label>How are you doing?</label>
+        <div class="subs pl-4">
+            <div class="my-3 node node-level-2" data-key="how_are_you__with_quarantine">
+                <label>How are you doing with quarantine?</label>
+                <div class="d-flex align-items-center">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_quarantine'] }}" name="how_are_you__with_quarantine" type="text" class="form-control form-control-sm mr-2" placeholder="Answer">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_quarantine_memo'] }}" name="how_are_you__with_quarantine_memo" type="text" class="form-control form-control-sm" placeholder="Memo">
+                </div>
+            </div>
+
+            <div class="my-3 node node-level-2" data-key="how_are_you__with_health_in_general">
+                <label>How are you doing with you health in general?</label>
+                <div class="d-flex align-items-center">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_health_in_general'] }}" name="how_are_you__with_health_in_general" type="text" class="form-control form-control-sm mr-2" placeholder="Answer">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_health_in_general_memo'] }}" name="how_are_you__with_health_in_general_memo" type="text" class="form-control form-control-sm" placeholder="Memo">
+                </div>
+            </div>
+
+        </div>
+    </div>
+
     <div class="my-3 node node-level-0" data-key="blood_ox">
         <label>Blood Oxygen</label>
         <div class="subs pl-4">
@@ -976,8 +998,8 @@ $formID = rand(0, 100000);
 
 
     <div class="form-group m-0 d-flex">
-        <button class="btn btn-sm btn-primary mr-2">Submit</button>
-        <button class="btn btn-sm btn-default border" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>
+        <button class="btn btn-sm btn-primary mr-2">Done</button>
+        {{--<button class="btn btn-sm btn-default border" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>--}}
     </div>
 </form>
 <script>
@@ -1008,5 +1030,11 @@ $formID = rand(0, 100000);
                 span.text(value.join(', '));
             }
         }
+
+        // submit here
+        let form = $(_field).closest('form');
+        $.post(form[0].action, form.serialize(), function(_data) {
+            console.log('Submitted!');
+        });
     }
 </script>

+ 16 - 0
gem/forms/new-patient-intake/spec.json

@@ -1,5 +1,21 @@
 
 [
+    {
+        "Q": "How are you doing?",
+        "K": "how_are_you",
+        "S": [
+            {
+                "Q": "How are you doing with quarantine?",
+                "T": "Text with Memo",
+                "K": "with_quarantine"
+            },
+            {
+                "Q": "How are you doing with you health in general?",
+                "T": "Text with Memo",
+                "K": "with_health_in_general"
+            }
+        ]
+    },
     {
         "Q": "Blood Oxygen",
         "K": "blood_ox",

+ 8 - 2
gem/templates/form.blade.php

@@ -19,8 +19,8 @@ $formID = rand(0, 100000);
 <!-- __GENERATED_MARKUP__ -->
 
     <div class="form-group m-0 d-flex">
-        <button class="btn btn-sm btn-primary mr-2">Submit</button>
-        <button class="btn btn-sm btn-default border" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>
+        <button class="btn btn-sm btn-primary mr-2">Done</button>
+        {{--<button class="btn btn-sm btn-default border" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>--}}
     </div>
 </form>
 <script>
@@ -51,5 +51,11 @@ $formID = rand(0, 100000);
                 span.text(value.join(', '));
             }
         }
+
+        // submit here
+        let form = $(_field).closest('form');
+        $.post(form[0].action, form.serialize(), function(_data) {
+            console.log('Submitted!');
+        });
     }
 </script>

+ 10 - 0
public/css/style.css

@@ -663,3 +663,13 @@ body .break-spaces {
 .gem-nodes .node span[field] {
     font-weight: bold;
 }
+body .node input[type="number"] {
+    max-width: 70px;
+    min-width: unset !important;
+}
+.section-edit-mask {
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+}

+ 3 - 3
public/js/yemi.js

@@ -309,10 +309,10 @@ var initMoes = function() {
                                 $('[moe]>form:not([show]):visible').hide();
                                 $(realForm).toggle(100);
                                 initPrimaryForm($(realForm));
-                               /* setTimeout(function() {
+                                setTimeout(function() {
                                     let submitButton = $(realForm).find('[submit]');
-                                    if(submitButton.length) submitButton[0].scrollIntoView({behavior : "smooth"});
-                                }, 150);*/
+                                    if(submitButton.length) submitButton[0].scrollIntoView({behavior : "smooth", block: "nearest"});
+                                }, 150);
                             }, 100);
                         }
                     }

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

@@ -19,6 +19,10 @@
                         @if (session('message'))
                             <div class="alert alert-danger">{{ session('message') }}</div>
                         @endif
+                        <div class='form-group mb-3'>
+                            <label class='control-label'>How is the quarantine treating you?</label>
+                            <textarea class='form-control' type='text' name='howIsQuarantine'></textarea>
+                        </div>
                         <div class='form-group mb-3'>
                             <label class='control-label'>First Name *</label>
                             <input class='form-control' type='text' name='nameFirst' required>

+ 88 - 15
resources/views/app/patient/note/_create-bill.blade.php

@@ -1,5 +1,6 @@
+<?php $noteRates = $pro->noteRates(); ?>
 <span class="mx-2 text-secondary">|</span>
-<span moe class="">
+<div moe wide class="">
     <a class="" href="" show start>Create Bill</a>
     <form url="/api/bill/createForNote">
         <input type="hidden" name="noteUid" value="{{$note->uid}}">
@@ -8,25 +9,97 @@
             <input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
         </div>
         <div class="mb-2">
-            <select autofocus class="form-control" name="code">
-                <option value="">-- Select Code --</option>
-                <?php $noteRates = $pro->noteRates(); ?>
-                @if($noteRates && count($noteRates))
-                    @foreach($noteRates as $noteRate)
-                        <option value="{{ $noteRate->code }}">{{ $noteRate->code }}</option>
-                    @endforeach
+            @if($noteRates && count($noteRates))
+                @if(count($noteRates) === 1)
+                    <input type="hidden" name="code" value="{{$noteRates[0]->code}}">
+                    <p class="mb-2">Service: <b>{{ $noteRates[0]->code }} (${{ $noteRates[0]->amount }}/hr)</b></p>
+                @else
+                    <select autofocus class="form-control" name="code" onchange="switchNumberOfUnitsByType(this)">
+                        <option value="">-- Select Code --</option>
+                        @foreach($noteRates as $noteRate)
+                            <option data-amount="{{ $noteRate->amount }}" value="{{ $noteRate->code }}">{{ $noteRate->code }} (${{ $noteRate->amount }}/hr)</option>
+                        @endforeach
+                    </select>
                 @endif
-            </select>
-        </div>
-        <div class="mb-2">
-            <input type="text" name="reason1" placeholder="Reason 1" class="form-control form-control-sm">
+            @endif
         </div>
-        <div class="mb-2">
-            <input type="text" name="reason2" placeholder="Reason 2" class="form-control form-control-sm">
+
+        @if($noteRates && count($noteRates) && count($noteRates) === 1)
+            @if(strpos(strtolower($noteRates[0]->code), "hourly") !== FALSE)
+                <div class="mb-2">
+                    <select name="numberOfUnits" class="form-control form-control-sm"
+                            onchange="calculateBillAmount(this)">
+                        <option value=""> -- select -- </option>
+                        <?php for ($i = 5; $i <= 120; $i+=5) { ?>
+                        <option value="{{ $i/60 }}">{{ $i }} minutes</option>
+                        <?php } ?>
+                    </select>
+                </div>
+                <div class="mb-2" calculated-amount></div>
+            @else
+                <input type="hidden" name="numberOfUnits" value="1">
+            @endif
+        @endif
+        <div class="bill-conditional">
+
         </div>
         <div class="">
             <button class="btn btn-primary btn-sm" submit>Submit</button>
             <button class="btn btn-default border btn-sm" cancel>Cancel</button>
         </div>
     </form>
-</span>
+    <div class="d-none" hourly-template>
+        <div class="mb-2">
+            <select name="numberOfUnits" class="form-control form-control-sm"
+                    onchange="calculateBillAmount(this)">
+                <option value=""> -- select -- </option>
+                <?php for ($i = 5; $i <= 120; $i+=5) { ?>
+                    <option value="{{ $i/60 }}">{{ $i }} minutes</option>
+                <?php } ?>
+            </select>
+        </div>
+        <div class="mb-2" calculated-amount></div>
+    </div>
+    <div class="d-none" non-hourly-template>
+        <input type="hidden" name="numberOfUnits" value="1">
+    </div>
+</div>
+<script>
+    (function() {
+        let selectedCodeHourlyRate = 0;
+        @if($noteRates && count($noteRates) && count($noteRates) === 1)
+            selectedCodeHourlyRate = {{ $noteRates[0]->amount }};
+        @endif
+        window.switchNumberOfUnitsByType = function(_trigger) {
+            let container = $('.bill-conditional').empty();
+            let selected  = $(_trigger).find('option:selected');
+            if(!selected.length) return;
+            let clone = null;
+            selectedCodeHourlyRate = +selected.attr('data-amount');
+            $('[calculated-amount]').text('');
+            if(selected.text().toLowerCase().indexOf('hourly') !== -1) {
+                clone = $('[hourly-template]').clone()
+                    .removeAttr('hourly-template')
+                    .removeClass('d-none');
+            }
+            else {
+                clone = $('[non-hourly-template]').clone()
+                    .removeAttr('non-hourly-template')
+                    .removeClass('d-none');
+            }
+            clone.appendTo(container)
+            clone.focus();
+        }
+        window.calculateBillAmount = function(_trigger) {
+            let amountTarget = $('[calculated-amount]');
+            _trigger = $(_trigger);
+            if(!_trigger.find('option:selected').length) {
+                amountTarget.text('');
+                return;
+            }
+            let hours = +_trigger.find('option:selected').attr('value');
+            amountTarget.html('<b>Reimbursable Amount:</b> $' + (hours * selectedCodeHourlyRate).toFixed(2));
+        }
+    })();
+
+</script>

+ 42 - 23
resources/views/app/patient/note/dashboard.blade.php

@@ -148,13 +148,13 @@
                         @if($note->is_signed_by_hcp)
                             <span class="text-secondary">
                         <i class="fa fa-check"></i>
-                        HCP Signed
+                        Note Signed
                     </span>
                         @else
                             <div moe
                                  class="{{ $note->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
                                  title="{{ $note->hcp_pro_id !== $pro->id ? 'Only the note\'s HCP can sign' : '' }}">
-                                <a class="" href="" show start>Sign as HCP</a>
+                                <a class="" href="" show start>Sign Note</a>
                                 <form url="/api/note/signAsHcp">
                                     <input type="hidden" name="uid" value="{{$note->uid}}">
                                     <p>Sign this note as HCP?</p>
@@ -173,7 +173,7 @@
                         <div moe relatve
                              class="{{ $hasBills ? 'moe-disabled' : '' }}"
                              title="{{ $hasBills ? 'Cannot cancel note since it has un-cancelled bills in it' : '' }}">
-                            <a class="text-danger" href="" show start>Cancel Note</a>
+                            <a class="text-danger" href="" show start>Cancel</a>
                             <form url="/api/note/cancel" right>
                                 <input type="hidden" name="uid" value="{{$note->uid}}">
                                 <p class="small mb-2">Are you sure you want to cancel this note?</p>
@@ -255,9 +255,10 @@
                         <table class="table table-sm tabe-striped mb-3 border-left border-right border-bottom">
                             <thead class="bg-light">
                             <tr>
-                                <th class="border-bottom-0 w-25 pl-3">HCP</th>
-                                <th class="border-bottom-0 w-25 pl-3">Code</th>
-                                <th class="border-bottom-0 w-25 pl-2">Reason</th>
+                                <th class="border-bottom-0 pl-3">HCP</th>
+                                <th class="border-bottom-0 w-25 pl-3">Service</th>
+                                {{--<th class="border-bottom-0 w-25 pl-2">Reason</th>--}}
+                                <th class="border-bottom-0 pl-3">Billable</th>
                                 <th class="border-bottom-0 pl-2">Amount</th>
                                 <th class="border-bottom-0"></th>
                             </tr>
@@ -267,9 +268,20 @@
                                 <tr>
                                     <td class="pl-3">{{ $bill->hcp->displayName() }}</td>
                                     <td class="pl-3 {{ $bill->is_cancelled ? 'text-secondary' : '' }}">{{$bill->code}}</td>
-                                    <td class="pl-2">
+                                    {{--<td class="pl-2">
                                         {{ $bill->reason1 }}
                                         <div class="text-secondary small">{{ $bill->reason2 }}</div>
+                                    </td>--}}
+                                    <td class="pl-3">
+                                        @if(strpos(strtolower($bill->code), 'hourly') !== FALSE)
+                                            {{ time_in_hrminsec($bill->number_of_units * 3600) }}
+                                        @else
+                                            @if(!!$bill->number_of_units)
+                                                {{ $bill->number_of_units }} unit(s)
+                                            @else
+                                                -
+                                            @endif
+                                        @endif
                                     </td>
                                     <td class="pl-2">
                                         @if($bill->has_hcp_been_paid)
@@ -279,18 +291,18 @@
                                         @endif
                                     </td>
                                     <td>
-                                        <div class="">
+                                        <div class="d-flex align-items-center">
                                             @if(!$bill->is_cancelled)
                                                 @if($bill->is_signed_by_hcp)
-                                                    <div class="d-block text-secondary">
+                                                    <span class="d-block text-secondary">
                                                         <i class="fa fa-check"></i>
                                                         HCP Signed
-                                                    </div>
+                                                    </span>
                                                 @else
-                                                    <div moe
+                                                    <span moe
                                                          class="d-block {{ $bill->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
                                                          title="{{ $bill->hcp_pro_id !== $pro->id ? 'Only the bill\'s HCP can sign' : '' }}">
-                                                        <a class="" href="" show start>Sign as HCP</a>
+                                                        <a class="" href="" show start>Sign</a>
                                                         <form url="/api/bill/signAsHcp">
                                                             <input type="hidden" name="uid" value="{{$bill->uid}}">
                                                             <p>Sign this bill as HCP?</p>
@@ -299,15 +311,17 @@
                                                                 <button class="btn btn-default border btn-sm" cancel>Cancel</button>
                                                             </div>
                                                         </form>
-                                                    </div>
+                                                    </span>
                                                 @endif
                                             @endif
                                             @if($bill->is_cancelled)
-                                                <div class="d-block text-secondary">
+                                                <span class="mx-2 text-secondary">|</span>
+                                                <span class="d-block text-secondary">
                                                     Cancelled
-                                                </div>
+                                                </span>
                                             @else
-                                                <div class="d-block" moe>
+                                                <span class="mx-2 text-secondary">|</span>
+                                                <span class="d-block" moe>
                                                     <a class="text-danger" href="" show start>Cancel</a>
                                                     <form url="/api/bill/markCancelled">
                                                         <input type="hidden" name="uid" value="{{$bill->uid}}">
@@ -317,7 +331,7 @@
                                                             <button class="btn btn-default border btn-sm" cancel>No</button>
                                                         </div>
                                                     </form>
-                                                </div>
+                                                </span>
                                             @endif
                                         </div>
                                     </td>
@@ -587,7 +601,7 @@
 
                 $('.note-section.pending-initialization').each(function() {
                     let sName = $(this).attr('data-section-template-name');
-                    if(['vitals', 'allergies', 'medication', 'care-team', 'assessment'].indexOf(sName) === -1) {
+                    if(['vitals', 'allergies', 'medication', 'care-team', 'assessment', 'new-patient-intake'].indexOf(sName) === -1) {
                         $(this).removeClass('pending-initialization');
                     }
                 });
@@ -608,17 +622,22 @@
 
             function initializeSection(_sectionUid, _sectionTemplateName) {
                 $.get('/get-default-section-data/' + _sectionTemplateName + '/{{$patient->uid}}' , function(_data) {
-                    if(!_data.value || _data.value === '') {
+                    if(!_data) {
                         numSectionsPendingInitialization--;
                         if(numSectionsPendingInitialization <= 0) {
                             fastReload();
                         }
                         return;
                     }
-                    $.post('/process_form_submit', {
-                        section_uid: _sectionUid,
-                        value: _data.value
-                    }, function(_data) {
+                    let payload = {
+                        section_uid: _sectionUid
+                    };
+                    for(let x in _data) {
+                        if(_data.hasOwnProperty(x)) {
+                            payload[x] = _data[x];
+                        }
+                    }
+                    $.post('/process_form_submit', payload, function(_data) {
                         console.log('done: ', _sectionTemplateName);
                         numSectionsPendingInitialization--;
                         if(numSectionsPendingInitialization <= 0) {

+ 13 - 14
resources/views/app/patient/partials/vitals.blade.php

@@ -49,47 +49,46 @@ foreach($patient->measurements as $measurement) {
             <a start show class="py-0 font-weight-normal">Update</a>
             <form url="/api/measurement/updateVitals">
                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                <label class="text-secondary text-sm mb-1">Ht. (in.)</label>
                 <div class="mb-2">
-                    Ht. (in.)<br>
                     <input type="text" class="form-control form-control-sm" name="heightInches" value="{{$vitalValues['Ht. (in.)']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">Wt. (lbs.)</label>
                 <div class="mb-2">
-                    Wt. (lbs.)<br>
                     <input type="text" class="form-control form-control-sm" name="weightPounds" value="{{$vitalValues['Wt. (lbs.)']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">Temp. (F)</label>
                 <div class="mb-2">
-                    Temp. (F)<br/>
                     <input type="text" class="form-control form-control-sm" name="temperatureF" value="{{$vitalValues['Temp. (F)']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">Pulse</label>
                 <div class="mb-2">
-                    Pulse<br/>
                     <input type="text" class="form-control form-control-sm" name="pulseRatePerMinute" value="{{$vitalValues['Pulse']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">Resp.</label>
                 <div class="mb-2">
-                    Resp.<br/>
                     <input type="text" class="form-control form-control-sm" name="respirationRatePerMinute" value="{{$vitalValues['Resp.']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">Pulse Ox.</label>
                 <div class="mb-2">
-                    Pulse Ox.<br/>
                     <input type="text" class="form-control form-control-sm" name="pulseOx" value="{{$vitalValues['Pulse Ox.']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">SBP</label>
                 <div class="mb-2">
-                    SBP<br/>
                     <input type="text" class="form-control form-control-sm" name="systolicBP" value="{{$vitalValues['SBP']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">DBP</label>
                 <div class="mb-2">
-                    DBP<br/>
                     <input type="text" class="form-control form-control-sm" name="diastolicBP" value="{{$vitalValues['DBP']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">Smoking Status</label>
                 <div class="mb-2">
-                    Smoking Status<br/>
                     <input type="text" class="form-control form-control-sm" name="smokingStatus" value="{{$vitalValues['Smoking Status']['value']}}" placeholder="">
                 </div>
+                <label class="text-secondary text-sm mb-1">BMI</label>
                 <div class="mb-2">
-                    BMI<br/>
                     <input type="text" class="form-control form-control-sm" name="bmi" value="{{$vitalValues['BMI']['value']}}" placeholder="">
                 </div>
-
                 <div class="d-flex align-items-center">
                     <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
                     <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
@@ -123,12 +122,12 @@ foreach($patient->measurements as $measurement) {
                             </a>
                             <form url="/api/measurement/create">
                                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
-                                <div class="mb-2">
-                                    <input required type="text" class="form-control form-control-sm" name="label" value="{{ $label }}" placeholder="Type">
-                                </div>
+                                <input type="hidden" name="label" value="{{ $label }}">
+                                <label class="text-secondary text-sm mb-1">{{ $label }}</label>
                                 <div class="mb-2">
                                     <input required autofocus type="text" class="form-control form-control-sm" name="value" value="{{ $vitalValues[$label]['value'] }}" placeholder="Value">
                                 </div>
+                                <label class="text-secondary text-sm mb-1">Effective Date</label>
                                 <div class="mb-2">
                                     <input required type="date" class="form-control form-control-sm" name="effectiveDate" max="{{ date('Y-m-d') }}" value="{{ date('Y-m-d') }}">
                                 </div>

+ 103 - 45
resources/views/app/patient/settings.blade.php

@@ -1,61 +1,119 @@
 @extends ('layouts.patient')
 
 @section('inner-content')
-    <div class="font-weight-bold mb-2">Contact Info</div>
-    <div class="mb-2">
+    <div class="font-weight-bold mb-2">Home Address</div>
+    <div class="pl-3">
         <div class="mb-1">
-            Phone: <b>{{ $patient->cell_number }}</b>
+            Address Line 1: <b>{{ $patient->home_address_line1 }}</b>
         </div>
         <div class="mb-1">
-            Email: <b>{{ $patient->email_address }}</b>
+            Address Line 2: <b>{{ $patient->home_address_line2 }}</b>
         </div>
         <div class="mb-1">
-            Home City: <b>{{ $patient->home_address_city }}</b>
+            City: <b>{{ $patient->home_address_city }}</b>
         </div>
         <div class="mb-1">
-            Home State: <b>{{ $patient->home_address_state }}</b>
+            State: <b>{{ $patient->home_address_state }}</b>
         </div>
-        <div class="mt-3">
-            <div moe>
-                <a start show><i class="fa fa-edit"></i> Edit Info</a>
-                <form url="/api/client/putContactInfo" class="mcp-theme-1">
-                    <input type="hidden" name="uid" value="{{$patient->uid}}">
-                    <div class="mb-2">
-                        <input type="tel"
-                               class="form-control form-control-sm"
-                               name="cellNumber"
-                               placeholder="Phone Number"
-                               value="{{ $patient->cell_number }}">
-                    </div>
-                    <div class="mb-2">
-                        <input type="text"
-                               class="form-control form-control-sm"
-                               name="email"
-                               placeholder="Email"
-                               value="{{ $patient->email_address }}">
-                    </div>
-                    <div class="mb-2">
-                        <input type="text"
-                               class="form-control form-control-sm"
-                               name="city"
-                               placeholder="City"
-                               value="{{ $patient->home_address_city }}">
-                    </div>
-                    <div class="mb-2">
-                        <input type="text"
-                               class="form-control form-control-sm"
-                               name="state"
-                               placeholder="State"
-                               value="{{ $patient->home_address_state }}">
-                    </div>
-                    <div>
-                        <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                        <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                    </div>
-                </form>
-            </div>
+        <div class="mb-1">
+            ZIP: <b>{{ $patient->home_address_zip }}</b>
+        </div>
+    </div>
+
+    <div class="font-weight-bold mb-2 mt-3">Mailing Address</div>
+    <div class="pl-3">
+        <div class="mb-1">
+            Address Line 1: <b>{{ $patient->mailing_address_line1 }}</b>
+        </div>
+        <div class="mb-1">
+            Address Line 2: <b>{{ $patient->mailing_address_line2 }}</b>
+        </div>
+        <div class="mb-1">
+            City: <b>{{ $patient->mailing_address_city }}</b>
+        </div>
+        <div class="mb-1">
+            State: <b>{{ $patient->mailing_address_state }}</b>
+        </div>
+        <div class="mb-1">
+            ZIP: <b>{{ $patient->mailing_address_zip }}</b>
         </div>
     </div>
+
+    <div class="font-weight-bold mb-2 mt-3">Contact Info</div>
+    <div class="pl-3">
+        <div class="mb-1">
+            Phone: <b>{{ $patient->cell_number }}</b>
+        </div>
+        <div class="mb-1">
+            Email: <b>{{ $patient->email_address }}</b>
+        </div>
+    </div>
+
+    <div class="mt-3 d-flex align-items-center">
+        <div moe wide>
+            <a start show><i class="fa fa-edit"></i> Edit Contact Info</a>
+            <form url="/api/client/putContactInfo" class="mcp-theme-1">
+                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                <div class="mb-2">
+                    <input type="tel" class="form-control form-control-sm" name="cellNumber" placeholder="Phone Number" value="{{ $patient->cell_number }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="email" placeholder="Email" value="{{ $patient->email_address }}">
+                </div>
+                <div>
+                    <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                </div>
+            </form>
+        </div>
+        <span class="mx-2 text-secondary">|</span>
+        <div moe wide>
+            <a start show><i class="fa fa-edit"></i> Edit Address</a>
+            <form url="/api/client/editAddress" class="mcp-theme-1">
+                <input type="hidden" name="uid" value="{{$patient->uid}}">
+
+                <p class="mb-2 font-weight-bold">Home Address</p>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="homeAddressLine1" placeholder="Address Line 1" value="{{ $patient->home_address_line1 }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="homeAddressLine2" placeholder="Address Line 2" value="{{ $patient->home_address_line2 }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="homeAddressCity" placeholder="City" value="{{ $patient->home_address_city }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="homeAddressState" placeholder="State" value="{{ $patient->home_address_state }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="homeAddressZip" placeholder="ZIP" value="{{ $patient->home_address_zip }}">
+                </div>
+
+                <p class="mb-2 mt-3 font-weight-bold">Mailing Address</p>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="mailingAddressLine1" placeholder="Address Line 1" value="{{ $patient->mailing_address_line1 }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="mailingAddressLine2" placeholder="Address Line 2" value="{{ $patient->mailing_address_line2 }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="mailingAddressCity" placeholder="City" value="{{ $patient->mailing_address_city }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="mailingAddressState" placeholder="State" value="{{ $patient->mailing_address_state }}">
+                </div>
+                <div class="mb-2">
+                    <input type="text" class="form-control form-control-sm" name="mailingAddressZip" placeholder="ZIP" value="{{ $patient->mailing_address_zip }}">
+                </div>
+
+                <div>
+                    <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                </div>
+            </form>
+        </div>
+    </div>
+
     <hr class="m-negator my-3">
     <span>MCP Onboarding Visit: <b>{{ $patient->has_mcp_done_onboarding_visit }}</b></span>
     <span moe class="ml-2">

+ 2 - 2
resources/views/app/practice-management/bills.blade.php

@@ -23,9 +23,9 @@
                 <tr>
                     <th class="px-3 border-0">Created</th>
                     <th class="border-0">Patient</th>
-                    <th class="border-0">Reason</th>
+                    <th class="border-0 w-50">Context</th>
                     <th class="border-0">Role</th>
-                    <th class="border-0 w-50">Amount</th>
+                    <th class="border-0">Amount</th>
                 </tr>
                 </thead>
                 <tbody>

+ 3 - 3
resources/views/app/practice-management/financial-transactions.blade.php

@@ -26,7 +26,7 @@
                             <th class="px-3 border-0">Date</th>
                             <th class="border-0">Type</th>
                             <th class="border-0">Client</th>
-                            <th class="border-0">Reason</th>
+                            {{--<th class="border-0">Reason</th>--}}
                             <th class="border-0">Memo</th>
                             <th class="border-0">Amount</th>
                             <th class="border-0">Balance</th>
@@ -59,7 +59,7 @@
                                     <b>{{ $transaction->bill->code }}</b>
                                     <div class="text-secondary text-sm">Created: {{ friendly_date_time($transaction->bill->created_at, true) }}</div>
                                 </td>--}}
-                                <td class="stag-no-wrap-td">
+                                {{--<td class="stag-no-wrap-td">
                                     @if($transaction->bill)
                                         @if($transaction->bill->careMonth)
                                             <b>{{ $transaction->bill->code }}</b>
@@ -80,7 +80,7 @@
                                     @else
                                         -
                                     @endif
-                                </td>
+                                </td>--}}
                                 <td>{{ $transaction->custom_memo ? $transaction->custom_memo : '-' }}</td>
                                 <td>${{ $transaction->amount }}</td>
                                 <td>${{ $transaction->resulting_balance }}</td>

+ 10 - 2
resources/views/layouts/patient.blade.php

@@ -423,10 +423,18 @@
                                         </span>
                                     </div>
                                 </section>
-                                <ul class="vbox ml-auto align-self-start">
+                                <ul class="vbox ml-auto mt-2 align-self-start">
                                     <li>
                                         <span class="aligned-icon"><i class="fa fa-map-marker-alt" aria-hidden="true"></i></span>
-                                        {{$location}}
+                                        <?php
+                                        $addressParts = [];
+                                        if(!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
+                                        if(!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
+                                        if(!!$patient->mailing_address_city) $addressParts[] = $patient->mailing_address_city;
+                                        if(!!$patient->mailing_address_state) $addressParts[] = $patient->mailing_address_state;
+                                        echo implode(", ", $addressParts);
+                                        ?>
+                                        {{ $patient->mailing_address_zip ? $patient->mailing_address_zip : '' }}
                                     </li>
                                     <li>
                                         <span class="aligned-icon"><i class="fa fa-phone-alt" aria-hidden="true"></i></span>

+ 1 - 1
resources/views/layouts/template.blade.php

@@ -67,7 +67,7 @@
                     <div class="dropdown-menu" aria-labelledby="practice-management">
                         {{--<a class="dropdown-item" href="{{ route('practice-management.dashboard') }}">Dashboard</a>--}}
                         <a class="dropdown-item" href="{{ route('practice-management.rates') }}">Payment Rates</a>
-                        <a class="dropdown-item" href="{{ route('practice-management.previousBills') }}">Previous Bills</a>
+                        {{--<a class="dropdown-item" href="{{ route('practice-management.previousBills') }}">Previous Bills</a>--}}
                         <a class="dropdown-item" href="{{ route('practice-management.financialTransactions') }}">Financial Transactions</a>
                         <a class="dropdown-item" href="/practice-management/bills/not-yet-signed">Pending Bills to Sign</a>
                         <a class="dropdown-item" href="/practice-management/notes/not-yet-signed">Pending Notes to Sign</a>

+ 4 - 0
storage/sections/new-patient-intake/default.php

@@ -0,0 +1,4 @@
+<?php
+$defaultData = [
+    "how_are_you__with_quarantine" => $patient->how_is_quarantine
+];

+ 30 - 2
storage/sections/new-patient-intake/form.blade.php

@@ -17,6 +17,28 @@ $formID = rand(0, 100000);
     <?php endif; ?>
 
     <div class="gem-nodes">
+    <div class="my-3 node node-level-0" data-key="how_are_you">
+        <label>How are you doing?</label>
+        <div class="subs pl-4">
+            <div class="my-3 node node-level-2" data-key="how_are_you__with_quarantine">
+                <label>How are you doing with quarantine?</label>
+                <div class="d-flex align-items-center">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_quarantine'] }}" name="how_are_you__with_quarantine" type="text" class="form-control form-control-sm mr-2" placeholder="Answer">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_quarantine_memo'] }}" name="how_are_you__with_quarantine_memo" type="text" class="form-control form-control-sm" placeholder="Memo">
+                </div>
+            </div>
+
+            <div class="my-3 node node-level-2" data-key="how_are_you__with_health_in_general">
+                <label>How are you doing with you health in general?</label>
+                <div class="d-flex align-items-center">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_health_in_general'] }}" name="how_are_you__with_health_in_general" type="text" class="form-control form-control-sm mr-2" placeholder="Answer">
+                    <input onchange="onGemVChange_{{ $formID }}(this)" value="{{ @$contentData['how_are_you__with_health_in_general_memo'] }}" name="how_are_you__with_health_in_general_memo" type="text" class="form-control form-control-sm" placeholder="Memo">
+                </div>
+            </div>
+
+        </div>
+    </div>
+
     <div class="my-3 node node-level-0" data-key="blood_ox">
         <label>Blood Oxygen</label>
         <div class="subs pl-4">
@@ -976,8 +998,8 @@ $formID = rand(0, 100000);
 
 
     <div class="form-group m-0 d-flex">
-        <button class="btn btn-sm btn-primary mr-2">Submit</button>
-        <button class="btn btn-sm btn-default border" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>
+        <button class="btn btn-sm btn-primary mr-2">Done</button>
+        {{--<button class="btn btn-sm btn-default border" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>--}}
     </div>
 </form>
 <script>
@@ -1008,5 +1030,11 @@ $formID = rand(0, 100000);
                 span.text(value.join(', '));
             }
         }
+
+        // submit here
+        let form = $(_field).closest('form');
+        $.post(form[0].action, form.serialize(), function(_data) {
+            console.log('Submitted!');
+        });
     }
 </script>

+ 4 - 1
storage/sections/new-patient-intake/summary.php

@@ -1 +1,4 @@
-<div><?php dump($newContentData) ?></div>
+<?php foreach($newContentData as $k => $v) { ?>
+    <div><?= $k ?>: <b><?= $v ?></b></div>
+<?php } ?>
+

+ 845 - 0
storage/sections/physical-activity-assessment/form.blade.php

@@ -0,0 +1,845 @@
+<?php
+$contentData = false;
+if ($section) {
+    $contentData = json_decode($section->content_data, true);
+}
+if (!$contentData) {
+    $contentData = [];
+}
+$formID = rand(0, 100000);
+?>
+<form method="POST" action="/process_form_submit" onsubmit="return submitForm_NoteSection_{{ $formID }}(this);">
+    <?php if($section): ?>
+    <input type="hidden" name="section_uid" value="<?= $section->uid?>">
+    <?php else: ?>
+    <input type="hidden" name="note_uid" value="<?= $note->uid?>">
+    <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
+    <?php endif; ?>
+
+    <div class="my-3 node node-level-0">
+        <p class="text-secondary">Moderate physical activity is any activity that is <u><i>somewhat hard</i></u>
+            and makes you feel like you do when you walk <i><u>fast</u></i> (3– 4 mph).</p>
+        <label class="mb-3">Select the activities you did during the last 7 days at a MODERATE LEVEL <u>nonstop for at
+                least 10
+                minutes</u>:</label>
+        <div class="row">
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__walking_fast_with_a_purpose'] ? 'checked' : '' }}
+                           name="last_7_days__walking_fast_with_a_purpose" onchange="onGemVChange_{{ $formID }}(this)">
+                    Walking fast, with a purpose
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__aerobics_low_impact'] ? 'checked' : '' }}
+                           name="last_7_days__aerobics_low_impact" onchange="onGemVChange_{{ $formID }}(this)">
+                    Aerobics, low impact
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__baseball_softball'] ? 'checked' : '' }}
+                           name="last_7_days__baseball_softball" onchange="onGemVChange_{{ $formID }}(this)">
+                    Baseball, softball
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__bicycling_less_than_12_mph_'] ? 'checked' : '' }}
+                           name="last_7_days__bicycling_less_than_12_mph_" onchange="onGemVChange_{{ $formID }}(this)">
+                    Bicycling (less than 12 mph)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__bowling'] ? 'checked' : '' }}
+                           name="last_7_days__bowling" onchange="onGemVChange_{{ $formID }}(this)">
+                    Bowling
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__calisthenics_light'] ? 'checked' : '' }}
+                           name="last_7_days__calisthenics_light" onchange="onGemVChange_{{ $formID }}(this)">
+                    Calisthenics, light
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__carpentry'] ? 'checked' : '' }}
+                           name="last_7_days__carpentry" onchange="onGemVChange_{{ $formID }}(this)">
+                    Carpentry
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__dancing'] ? 'checked' : '' }}
+                           name="last_7_days__dancing" onchange="onGemVChange_{{ $formID }}(this)">
+                    Dancing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__fishing_standing'] ? 'checked' : '' }}
+                           name="last_7_days__fishing_standing" onchange="onGemVChange_{{ $formID }}(this)">
+                    Fishing, standing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__frisbee'] ? 'checked' : '' }}
+                           name="last_7_days__frisbee" onchange="onGemVChange_{{ $formID }}(this)">
+                    Frisbee
+                </label>
+            </div>
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__walking_downstairs'] ? 'checked' : '' }}
+                           name="last_7_days__walking_downstairs" onchange="onGemVChange_{{ $formID }}(this)">
+                    Walking downstairs
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__gardening_planting_raking_weeding'] ? 'checked' : '' }}
+                           name="last_7_days__gardening_planting_raking_weeding"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    Gardening: planting, raking, weeding
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__golf'] ? 'checked' : '' }}
+                           name="last_7_days__golf" onchange="onGemVChange_{{ $formID }}(this)">
+                    Golf
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__gymnastics'] ? 'checked' : '' }}
+                           name="last_7_days__gymnastics" onchange="onGemVChange_{{ $formID }}(this)">
+                    Gymnastics
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__horseback_riding'] ? 'checked' : '' }}
+                           name="last_7_days__horseback_riding" onchange="onGemVChange_{{ $formID }}(this)">
+                    Horseback riding
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__housework_mopping_sweeping_vacuuming'] ? 'checked' : '' }}
+                           name="last_7_days__housework_mopping_sweeping_vacuuming"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    Housework: mopping, sweeping, vacuuming
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__lifting_or_carrying_moderate_loads_5_to_15_lb_'] ? 'checked' : '' }}
+                           name="last_7_days__lifting_or_carrying_moderate_loads_5_to_15_lb_"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    Lifting or carrying moderate loads (5 to 15 lb)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__mowing_lawn_power_mower'] ? 'checked' : '' }}
+                           name="last_7_days__mowing_lawn_power_mower" onchange="onGemVChange_{{ $formID }}(this)">
+                    Mowing lawn, power mower
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__ping_pong'] ? 'checked' : '' }}
+                           name="last_7_days__ping_pong" onchange="onGemVChange_{{ $formID }}(this)">
+                    Ping-pong
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__playing_with_children_kneeling_lifting'] ? 'checked' : '' }}
+                           name="last_7_days__playing_with_children_kneeling_lifting"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    Playing with children: kneeling, lifting
+                </label>
+            </div>
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__rowing_sailing'] ? 'checked' : '' }}
+                           name="last_7_days__rowing_sailing" onchange="onGemVChange_{{ $formID }}(this)">
+                    Rowing, sailing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__skateboarding'] ? 'checked' : '' }}
+                           name="last_7_days__skateboarding" onchange="onGemVChange_{{ $formID }}(this)">
+                    Skateboarding
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__tai_chi_qigong'] ? 'checked' : '' }}
+                           name="last_7_days__tai_chi_qigong" onchange="onGemVChange_{{ $formID }}(this)">
+                    Tai chi, qigong
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__vigorous_stretching'] ? 'checked' : '' }}
+                           name="last_7_days__vigorous_stretching" onchange="onGemVChange_{{ $formID }}(this)">
+                    Vigorous stretching
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__volleyball'] ? 'checked' : '' }}
+                           name="last_7_days__volleyball" onchange="onGemVChange_{{ $formID }}(this)">
+                    Volleyball
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__yoga'] ? 'checked' : '' }}
+                           name="last_7_days__yoga" onchange="onGemVChange_{{ $formID }}(this)">
+                    Yoga
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__washing_car'] ? 'checked' : '' }}
+                           name="last_7_days__washing_car" onchange="onGemVChange_{{ $formID }}(this)">
+                    Washing car
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__water_aerobics'] ? 'checked' : '' }}
+                           name="last_7_days__water_aerobics" onchange="onGemVChange_{{ $formID }}(this)">
+                    Water aerobics
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__ping_weight_lifting'] ? 'checked' : '' }}
+                           name="last_7_days__ping_weight_lifting" onchange="onGemVChange_{{ $formID }}(this)">
+                    Weight lifting
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__working_on_car'] ? 'checked' : '' }}
+                           name="last_7_days__working_on_car" onchange="onGemVChange_{{ $formID }}(this)">
+                    Working on car
+                </label>
+            </div>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>During the last 7 days, on how many days did you do a Moderate physical activity Days <u>nonstop for at
+                least 10 minutes at a time</u>?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input onchange="onGemVChange_{{ $formID }}(this)"
+                   value="{{ @$contentData['last_7_days__moderate_days'] }}"
+                   name="last_7_days__moderate_days" type="number" class="form-control form-control-sm" placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Days</span>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>On those days, how much time did you spend <u>on average</u> doing Moderate physical
+            activities?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input onchange="onGemVChange_{{ $formID }}(this)"
+                   value="{{ @$contentData['last_7_days__moderate_mins_per_day'] }}"
+                   name="last_7_days__moderate_mins_per_day" type="number" class="form-control form-control-sm"
+                   placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Minutes/Day</span>
+        </div>
+    </div>
+
+    <hr>
+
+    <div class="my-3 node node-level-0">
+        <p class="text-secondary">Vigorous physical activity is any activity that is <i>hard</i>
+            and makes you feel like you do when you run or jog.</p>
+        <label class="mb-3">Select the activities you did during the last 7 days at a VIGOROUS LEVEL <u>at least 10
+                minutes at a time
+                without stopping</u>:</label>
+        <div class="row">
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__jogging_running'] ? 'checked' : '' }}
+                           name="last_7_days__jogging_running" onchange="onGemVChange_{{ $formID }}(this)">
+                    Jogging, running
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__aerobics_high_impact_jazzercise'] ? 'checked' : '' }}
+                           name="last_7_days__aerobics_high_impact_jazzercise"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    Aerobics, high impact (Jazzercise)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__basketball'] ? 'checked' : '' }}
+                           name="last_7_days__basketball" onchange="onGemVChange_{{ $formID }}(this)">
+                    Basketball
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__bicycling_fast_more_than_12_mph'] ? 'checked' : '' }}
+                           name="last_7_days__bicycling_fast_more_than_12_mph"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    Bicycling, fast (more than 12 mph)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__calisthenics_vigorous'] ? 'checked' : '' }}
+                           name="last_7_days__calisthenics_vigorous" onchange="onGemVChange_{{ $formID }}(this)">
+                    Calisthenics, vigorous
+                </label>
+            </div>
+
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__walking_upstairs'] ? 'checked' : '' }}
+                           name="last_7_days__walking_upstairs" onchange="onGemVChange_{{ $formID }}(this)">
+                    Walking upstairs
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__carrying_heavy_loads'] ? 'checked' : '' }}
+                           name="last_7_days__carrying_heavy_loads" onchange="onGemVChange_{{ $formID }}(this)">
+                    Carrying heavy loads
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__jumping_rope'] ? 'checked' : '' }}
+                           name="last_7_days__jumping_rope" onchange="onGemVChange_{{ $formID }}(this)">
+                    Jumping rope
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__judo_karate_kickboxing'] ? 'checked' : '' }}
+                           name="last_7_days__judo_karate_kickboxing" onchange="onGemVChange_{{ $formID }}(this)">
+                    Judo, karate, kickboxing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__roller_skating_rollerblading'] ? 'checked' : '' }}
+                           name="last_7_days__roller_skating_rollerblading" onchange="onGemVChange_{{ $formID }}(this)">
+                    Roller skating, rollerblading
+                </label>
+            </div>
+
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__soccer'] ? 'checked' : '' }}
+                           name="last_7_days__soccer" onchange="onGemVChange_{{ $formID }}(this)">
+                    Soccer
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__ski_machine_nordic_track'] ? 'checked' : '' }}
+                           name="last_7_days__ski_machine_nordic_track" onchange="onGemVChange_{{ $formID }}(this)">
+                    Ski machine (Nordic Track)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__stair_climbing_stairmaster'] ? 'checked' : '' }}
+                           name="last_7_days__stair_climbing_stairmaster" onchange="onGemVChange_{{ $formID }}(this)">
+                    Stair climbing (StairMaster)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__swimming_laps'] ? 'checked' : '' }}
+                           name="last_7_days__swimming_laps" onchange="onGemVChange_{{ $formID }}(this)">
+                    Swimming laps
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['last_7_days__tennis_racquetball'] ? 'checked' : '' }}
+                           name="last_7_days__tennis_racquetball" onchange="onGemVChange_{{ $formID }}(this)">
+                    Tennis, racquetball
+                </label>
+            </div>
+
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>During the last 7 days, on how many days did you do a Vigorous physical activity Days<u>nonstop for at
+                least 10 minutes at a time</u>?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input onchange="onGemVChange_{{ $formID }}(this)"
+                   value="{{ @$contentData['last_7_days__vigorous_days'] }}"
+                   name="last_7_days__vigorous_days" type="number" class="form-control form-control-sm" placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Days</span>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>On those days, how much time did you spend <u>on average</u> doing Vigorous physical activities?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input onchange="onGemVChange_{{ $formID }}(this)"
+                   value="{{ @$contentData['last_7_days__vigorous_mins_per_day'] }}"
+                   name="last_7_days__vigorous_mins_per_day" type="number" class="form-control form-control-sm"
+                   placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Minutes/Day</span>
+        </div>
+    </div>
+
+    <hr>
+
+    <div class="my-3 node node-level-0">
+        <label>Compared with your Usual Physical Activity over the last 3 months, was the last seven days’
+            activity:</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['last_7_days__activity_comparison'] === 'More' ? 'checked' : '' }} name="last_7_days__activity_comparison"
+                       type="radio" value="More" class="mr-1">
+                <span>More</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['last_7_days__activity_comparison'] === 'Less' ? 'checked' : '' }} name="last_7_days__activity_comparison"
+                       type="radio" value="Less" class="mr-1">
+                <span>Less</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['last_7_days__activity_comparison'] === 'About the same' ? 'checked' : '' }} name="last_7_days__activity_comparison"
+                       type="radio" value="About the same" class="mr-1">
+                <span>About the same</span>
+            </label>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Medical Problems</p>
+
+    <div class="my-3 node node-level-0">
+        <label>1. Has your doctor ever said that you have a heart condition and that you should only do physical
+            activity recommended by a doctor?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_heart_condition'] === 'Yes' ? 'checked' : '' }} name="mp_heart_condition"
+                       type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_heart_condition'] === 'No' ? 'checked' : '' }} name="mp_heart_condition"
+                       type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>2. Do you feel pain in your chest when you do physical activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_chest_pain_with_physical_activity'] === 'Yes' ? 'checked' : '' }} name="mp_chest_pain_with_physical_activity"
+                       type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_chest_pain_with_physical_activity'] === 'No' ? 'checked' : '' }} name="mp_chest_pain_with_physical_activity"
+                       type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>3. In the past month, have you had chest pain when you were not doing physical activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_chest_pain_without_physical_activity'] === 'Yes' ? 'checked' : '' }} name="mp_chest_pain_without_physical_activity"
+                       type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_chest_pain_without_physical_activity'] === 'No' ? 'checked' : '' }} name="mp_chest_pain_without_physical_activity"
+                       type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>4. Do you lose your balance because of dizziness, or do you ever lose consciousness?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_dizziness'] === 'Yes' ? 'checked' : '' }} name="mp_dizziness" type="radio"
+                       value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_dizziness'] === 'No' ? 'checked' : '' }} name="mp_dizziness" type="radio"
+                       value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>5. Do you have a bone or joint problem that could be made worse by a change in your physical
+            activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_bone_joint_problem'] === 'Yes' ? 'checked' : '' }} name="mp_bone_joint_problem"
+                       type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_bone_joint_problem'] === 'No' ? 'checked' : '' }} name="mp_bone_joint_problem"
+                       type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>6. Is your doctor currently prescribing drugs (for example, water pills) for your blood pressure or heart
+            condition?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_bp_heart_drugs'] === 'Yes' ? 'checked' : '' }} name="mp_bp_heart_drugs"
+                       type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_bp_heart_drugs'] === 'No' ? 'checked' : '' }} name="mp_bp_heart_drugs"
+                       type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>7. Do you know of any other reason why you should not do physical activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_other'] === 'Yes' ? 'checked' : '' }} name="mp_other" type="radio"
+                       value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['mp_other'] === 'No' ? 'checked' : '' }} name="mp_other" type="radio" value="No"
+                       class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Physical Activity Plans</p>
+
+    <div class="my-3 node node-level-0">
+        <label>Please check the ONE answer that best describes your physical activity plans for the next 6
+            months:</label>
+        <div class="">
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['pa_plans_next_6_months'] === 'I do not plan to become physically active in the next 6 months' ? 'checked' : '' }}
+                       name="pa_plans_next_6_months"
+                       type="radio"
+                       value="I do not plan to become physically active in the next 6 months" class="mr-1">
+                <span>A. I do not plan to become physically active in the next 6 months.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['pa_plans_next_6_months'] === 'I am thinking about becoming more physically active' ? 'checked' : '' }}
+                       name="pa_plans_next_6_months"
+                       type="radio"
+                       value="I am thinking about becoming more physically active" class="mr-1">
+                <span>B. I am thinking about becoming more physically active.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['pa_plans_next_6_months'] === 'I intend to become more physically active in the next 6 months' ? 'checked' : '' }}
+                       name="pa_plans_next_6_months"
+                       type="radio"
+                       value="I intend to become more physically active in the next 6 months" class="mr-1">
+                <span>C. I intend to become more physically active in the next 6 months.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['pa_plans_next_6_months'] === 'I have been regularly physically active for the last 1–5 months' ? 'checked' : '' }}
+                       name="pa_plans_next_6_months"
+                       type="radio"
+                       value="I have been regularly physically active for the last 1–5 months" class="mr-1">
+                <span>D. I have been regularly physically active for the last 1–5 months.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['pa_plans_next_6_months'] === 'I have been regularly physically active for the past 6 months or more' ? 'checked' : '' }}
+                       name="pa_plans_next_6_months"
+                       type="radio"
+                       value="I have been regularly physically active for the past 6 months or more" class="mr-1">
+                <span>E. I have been regularly physically active for the past 6 months or more.</span>
+            </label>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Benefits of Physical Activity Important to You</p>
+
+    <div class="my-3 node node-level-0">
+        <label>the 3 <i>benefits</i> of physical activity that are <i>Most Important</i> to You:</label>
+        <div class="row">
+            <div class="col-6">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_for_my_health'] ? 'checked' : '' }}
+                           name="pa_important_for_my_health" onchange="onGemVChange_{{ $formID }}(this)">
+                    1. For my health
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_control_my_weight'] ? 'checked' : '' }}
+                           name="pa_important_control_my_weight" onchange="onGemVChange_{{ $formID }}(this)">
+                    2. Control my weight
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_look_better'] ? 'checked' : '' }}
+                           name="pa_important_look_better" onchange="onGemVChange_{{ $formID }}(this)">
+                    3. Look better
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_feel_better'] ? 'checked' : '' }}
+                           name="pa_important_feel_better" onchange="onGemVChange_{{ $formID }}(this)">
+                    4. Feel better
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_feel_good_about_taking_care_of_myself'] ? 'checked' : '' }}
+                           name="pa_important_feel_good_about_taking_care_of_myself"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    5. Feel good about taking care of myself
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_set_a_good_example_for_my_family_or_friends'] ? 'checked' : '' }}
+                           name="pa_important_set_a_good_example_for_my_family_or_friends"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    6. Set a good example for my family or friends
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_get_my_partner_child_friend_to_be_more_active_with_me'] ? 'checked' : '' }}
+                           name="pa_important_get_my_partner_child_friend_to_be_more_active_with_me"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    7. Get my partner, child, friend to be more active with me
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_teach_my_family_friends_the_importance_of_physical_activity'] ? 'checked' : '' }}
+                           name="pa_important_teach_my_family_friends_the_importance_of_physical_activity"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    8. Teach my family, friends the importance of physical activity
+                </label>
+            </div>
+            <div class="col-6">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_have_time_for_me'] ? 'checked' : '' }}
+                           name="pa_important_have_time_for_me" onchange="onGemVChange_{{ $formID }}(this)">
+                    9. Have time for me
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_lower_my_stress'] ? 'checked' : '' }}
+                           name="pa_important_lower_my_stress" onchange="onGemVChange_{{ $formID }}(this)">
+                    10. Lower my stress
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_improve_my_fitness'] ? 'checked' : '' }}
+                           name="pa_important_improve_my_fitness" onchange="onGemVChange_{{ $formID }}(this)">
+                    11. Improve my fitness
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_lower_my_risk_of_heart_disease'] ? 'checked' : '' }}
+                           name="pa_important_lower_my_risk_of_heart_disease"
+                           onchange="onGemVChange_{{ $formID }}(this)">
+                    12. Lower my risk of heart disease
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_lower_my_blood_pressure'] ? 'checked' : '' }}
+                           name="pa_important_lower_my_blood_pressure" onchange="onGemVChange_{{ $formID }}(this)">
+                    13. Lower my blood pressure
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_lower_my_cholesterol'] ? 'checked' : '' }}
+                           name="pa_important_lower_my_cholesterol" onchange="onGemVChange_{{ $formID }}(this)">
+                    14. Lower my cholesterol
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_control_my_diabetes'] ? 'checked' : '' }}
+                           name="pa_important_control_my_diabetes" onchange="onGemVChange_{{ $formID }}(this)">
+                    15. Control my diabetes
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           {{ @$contentData['pa_important_other'] ? 'checked' : '' }}
+                           name="pa_important_other" onchange="onGemVChange_{{ $formID }}(this)">
+                    <span class="text-nowrap mr-2">16. Other:</span>
+                    <input type="text" class="form-control form-control-sm"
+                           name="pa_important_other_details"
+                           value="{{ @$contentData['pa_important_other_details'] }}">
+                </label>
+            </div>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Getting Help from Others</p>
+
+    <div class="my-3 node node-level-0">
+        <label>Is there someone who would encourage you or help you with some of your responsibilities so you could get
+            regular
+            physical activity?</label>
+        <div class="d-flex align-items-center mb-3">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['getting_help_from_others'] === 'Yes' ? 'checked' : '' }} name="getting_help_from_others"
+                       type="radio"
+                       value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['getting_help_from_others'] === 'No' ? 'checked' : '' }} name="getting_help_from_others"
+                       type="radio" value="No"
+                       class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+        <div class="d-flex align-items-center mb-3">
+            <input type="text" class="form-control form-control-sm mr-2" placeholder="Who is that?"
+                   name="getting_help_from_others_who" value="{{ @$contentData['getting_help_from_others_who'] }}">
+            <input type="text" class="form-control form-control-sm" placeholder="How could they help?"
+                   name="getting_help_from_others_how" value="{{ @$contentData['getting_help_from_others_how'] }}">
+        </div>
+    </div>
+
+    <p class="font-weight-bold">Helping Others</p>
+
+    <div class="my-3 node node-level-0">
+        <label>Is there a friend or family member you think should get more physical activity?</label>
+        <div class="d-flex align-items-center mb-3">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['helping_others'] === 'Yes' ? 'checked' : '' }} name="helping_others"
+                       type="radio"
+                       value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['helping_others'] === 'No' ? 'checked' : '' }} name="helping_others"
+                       type="radio" value="No"
+                       class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+        <div class="d-flex align-items-center mb-3">
+            <input type="text" class="form-control form-control-sm mr-2" placeholder="Who is that?"
+                   name="helping_others_who" value="{{ @$contentData['helping_others_who'] }}">
+            <input type="text" class="form-control form-control-sm" placeholder="How could you help them?"
+                   name="helping_others_how" value="{{ @$contentData['helping_others_how'] }}">
+        </div>
+    </div>
+
+    <p class="font-weight-bold">Confidence</p>
+
+    <div class="my-3 node node-level-0">
+        <label>How confident are you that you could increase your physical activity if you decided to do so?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['confidence'] === 'Very Confident' ? 'checked' : '' }} name="confidence"
+                       type="radio"
+                       value="Very Confident" class="mr-1">
+                <span>Very Confident</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['confidence'] === 'Fairly Confident' ? 'checked' : '' }} name="confidence"
+                       type="radio"
+                       value="Fairly Confident"
+                       class="mr-1">
+                <span>Fairly Confident</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['confidence'] === 'A Little Confident' ? 'checked' : '' }} name="confidence"
+                       type="radio"
+                       value="A Little Confident" class="mr-1">
+                <span>A Little Confident</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input onchange="onGemVChange_{{ $formID }}(this)"
+                       {{ @$contentData['confidence'] === 'Not at all Confident' ? 'checked' : '' }} name="confidence"
+                       type="radio"
+                       value="Not at all Confident"
+                       class="mr-1">
+                <span>Not at all Confident</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="form-group m-0 d-flex">
+        <button class="btn btn-sm btn-primary mr-2">Done</button>
+        {{--<button class="btn btn-sm btn-default border" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>--}}
+    </div>
+</form>
+<script>
+    function submitForm_NoteSection_{{ $formID }}(_form) {
+        showMask();
+        $.post(_form.action, $(_form).serialize(), function (_data) {
+            fastReload();
+        });
+        return false;
+    }
+
+    function cancelForm_NoteSection_{{ $formID }}(_trigger) {
+        $(_trigger).closest('.note-section').toggleClass('edit');
+        return false;
+    }
+
+    function onGemVChange_{{ $formID }}(_field) {
+        let name = _field.name, span = $('span[field="' + _field.name + '"]');
+        if (span.length) {
+            span.text(_field.value);
+        } else {
+            name = _field.name.replace('[]', '');
+            span = $('span[field="' + name + '"]');
+            if (span.length) {
+                let value = [];
+                $('[name="' + _field.name + '"]').each(function () {
+                    if (this.checked) value.push(this.value);
+                });
+                span.text(value.join(', '));
+            }
+        }
+
+        // submit here
+        let form = $(_field).closest('form');
+        $.post(form[0].action, form.serialize(), function (_data) {
+            console.log('Submitted!');
+        });
+    }
+</script>

+ 2 - 0
storage/sections/physical-activity-assessment/processor.php

@@ -0,0 +1,2 @@
+<?php
+$newContentData = $request->all();

+ 802 - 0
storage/sections/physical-activity-assessment/summary.php

@@ -0,0 +1,802 @@
+<?php
+$contentData = $newContentData;
+$formID = rand(0, 100000);
+?>
+<div class="position-relative">
+    <?php if($section): ?>
+        <input type="hidden" name="section_uid" value="<?= $section->uid?>">
+    <?php else: ?>
+        <input type="hidden" name="note_uid" value="<?= $note->uid?>">
+        <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
+    <?php endif; ?>
+
+    <div class="my-3 node node-level-0">
+        <p class="text-secondary">Moderate physical activity is any activity that is <u><i>somewhat hard</i></u>
+            and makes you feel like you do when you walk <i><u>fast</u></i> (3– 4 mph).</p>
+        <label class="mb-3">Select the activities you did during the last 7 days at a MODERATE LEVEL <u>nonstop for at
+                least 10
+                minutes</u>:</label>
+        <div class="row">
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__walking_fast_with_a_purpose'] ? 'checked' : '' ?>
+                    name="last_7_days__walking_fast_with_a_purpose" >
+                    Walking fast, with a purpose
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__aerobics_low_impact'] ? 'checked' : '' ?>
+                    name="last_7_days__aerobics_low_impact" >
+                    Aerobics, low impact
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__baseball_softball'] ? 'checked' : '' ?>
+                    name="last_7_days__baseball_softball" >
+                    Baseball, softball
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__bicycling_less_than_12_mph_'] ? 'checked' : '' ?>
+                    name="last_7_days__bicycling_less_than_12_mph_" >
+                    Bicycling (less than 12 mph)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__bowling'] ? 'checked' : '' ?>
+                    name="last_7_days__bowling" >
+                    Bowling
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__calisthenics_light'] ? 'checked' : '' ?>
+                    name="last_7_days__calisthenics_light" >
+                    Calisthenics, light
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__carpentry'] ? 'checked' : '' ?>
+                    name="last_7_days__carpentry" >
+                    Carpentry
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__dancing'] ? 'checked' : '' ?>
+                    name="last_7_days__dancing" >
+                    Dancing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__fishing_standing'] ? 'checked' : '' ?>
+                    name="last_7_days__fishing_standing" >
+                    Fishing, standing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__frisbee'] ? 'checked' : '' ?>
+                    name="last_7_days__frisbee" >
+                    Frisbee
+                </label>
+            </div>
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__walking_downstairs'] ? 'checked' : '' ?>
+                    name="last_7_days__walking_downstairs" >
+                    Walking downstairs
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__gardening_planting_raking_weeding'] ? 'checked' : '' ?>
+                    name="last_7_days__gardening_planting_raking_weeding"
+                    >
+                    Gardening: planting, raking, weeding
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__golf'] ? 'checked' : '' ?>
+                    name="last_7_days__golf" >
+                    Golf
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__gymnastics'] ? 'checked' : '' ?>
+                    name="last_7_days__gymnastics" >
+                    Gymnastics
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__horseback_riding'] ? 'checked' : '' ?>
+                    name="last_7_days__horseback_riding" >
+                    Horseback riding
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__housework_mopping_sweeping_vacuuming'] ? 'checked' : '' ?>
+                    name="last_7_days__housework_mopping_sweeping_vacuuming"
+                    >
+                    Housework: mopping, sweeping, vacuuming
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__lifting_or_carrying_moderate_loads_5_to_15_lb_'] ? 'checked' : '' ?>
+                    name="last_7_days__lifting_or_carrying_moderate_loads_5_to_15_lb_"
+                    >
+                    Lifting or carrying moderate loads (5 to 15 lb)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__mowing_lawn_power_mower'] ? 'checked' : '' ?>
+                    name="last_7_days__mowing_lawn_power_mower" >
+                    Mowing lawn, power mower
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__ping_pong'] ? 'checked' : '' ?>
+                    name="last_7_days__ping_pong" >
+                    Ping-pong
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__playing_with_children_kneeling_lifting'] ? 'checked' : '' ?>
+                    name="last_7_days__playing_with_children_kneeling_lifting"
+                    >
+                    Playing with children: kneeling, lifting
+                </label>
+            </div>
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__rowing_sailing'] ? 'checked' : '' ?>
+                    name="last_7_days__rowing_sailing" >
+                    Rowing, sailing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__skateboarding'] ? 'checked' : '' ?>
+                    name="last_7_days__skateboarding" >
+                    Skateboarding
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__tai_chi_qigong'] ? 'checked' : '' ?>
+                    name="last_7_days__tai_chi_qigong" >
+                    Tai chi, qigong
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__vigorous_stretching'] ? 'checked' : '' ?>
+                    name="last_7_days__vigorous_stretching" >
+                    Vigorous stretching
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__volleyball'] ? 'checked' : '' ?>
+                    name="last_7_days__volleyball" >
+                    Volleyball
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__yoga'] ? 'checked' : '' ?>
+                    name="last_7_days__yoga" >
+                    Yoga
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__washing_car'] ? 'checked' : '' ?>
+                    name="last_7_days__washing_car" >
+                    Washing car
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__water_aerobics'] ? 'checked' : '' ?>
+                    name="last_7_days__water_aerobics" >
+                    Water aerobics
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__ping_weight_lifting'] ? 'checked' : '' ?>
+                    name="last_7_days__ping_weight_lifting" >
+                    Weight lifting
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__working_on_car'] ? 'checked' : '' ?>
+                    name="last_7_days__working_on_car" >
+                    Working on car
+                </label>
+            </div>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>During the last 7 days, on how many days did you do a Moderate physical activity Days <u>nonstop for at
+                least 10 minutes at a time</u>?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input
+                   value="<?= @$contentData['last_7_days__moderate_days'] ?>"
+                   name="last_7_days__moderate_days" type="number" class="form-control form-control-sm" placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Days</span>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>On those days, how much time did you spend <u>on average</u> doing Moderate physical
+            activities?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input
+                   value="<?= @$contentData['last_7_days__moderate_mins_per_day'] ?>"
+                   name="last_7_days__moderate_mins_per_day" type="number" class="form-control form-control-sm"
+                   placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Minutes/Day</span>
+        </div>
+    </div>
+
+    <hr>
+
+    <div class="my-3 node node-level-0">
+        <p class="text-secondary">Vigorous physical activity is any activity that is <i>hard</i>
+            and makes you feel like you do when you run or jog.</p>
+        <label class="mb-3">Select the activities you did during the last 7 days at a VIGOROUS LEVEL <u>at least 10
+                minutes at a time
+                without stopping</u>:</label>
+        <div class="row">
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__jogging_running'] ? 'checked' : '' ?>
+                    name="last_7_days__jogging_running" >
+                    Jogging, running
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__aerobics_high_impact_jazzercise'] ? 'checked' : '' ?>
+                    name="last_7_days__aerobics_high_impact_jazzercise"
+                    >
+                    Aerobics, high impact (Jazzercise)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__basketball'] ? 'checked' : '' ?>
+                    name="last_7_days__basketball" >
+                    Basketball
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__bicycling_fast_more_than_12_mph'] ? 'checked' : '' ?>
+                    name="last_7_days__bicycling_fast_more_than_12_mph"
+                    >
+                    Bicycling, fast (more than 12 mph)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__calisthenics_vigorous'] ? 'checked' : '' ?>
+                    name="last_7_days__calisthenics_vigorous" >
+                    Calisthenics, vigorous
+                </label>
+            </div>
+
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__walking_upstairs'] ? 'checked' : '' ?>
+                    name="last_7_days__walking_upstairs" >
+                    Walking upstairs
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__carrying_heavy_loads'] ? 'checked' : '' ?>
+                    name="last_7_days__carrying_heavy_loads" >
+                    Carrying heavy loads
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__jumping_rope'] ? 'checked' : '' ?>
+                    name="last_7_days__jumping_rope" >
+                    Jumping rope
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__judo_karate_kickboxing'] ? 'checked' : '' ?>
+                    name="last_7_days__judo_karate_kickboxing" >
+                    Judo, karate, kickboxing
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__roller_skating_rollerblading'] ? 'checked' : '' ?>
+                    name="last_7_days__roller_skating_rollerblading" >
+                    Roller skating, rollerblading
+                </label>
+            </div>
+
+            <div class="col-4">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__soccer'] ? 'checked' : '' ?>
+                    name="last_7_days__soccer" >
+                    Soccer
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__ski_machine_nordic_track'] ? 'checked' : '' ?>
+                    name="last_7_days__ski_machine_nordic_track" >
+                    Ski machine (Nordic Track)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__stair_climbing_stairmaster'] ? 'checked' : '' ?>
+                    name="last_7_days__stair_climbing_stairmaster" >
+                    Stair climbing (StairMaster)
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__swimming_laps'] ? 'checked' : '' ?>
+                    name="last_7_days__swimming_laps" >
+                    Swimming laps
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['last_7_days__tennis_racquetball'] ? 'checked' : '' ?>
+                    name="last_7_days__tennis_racquetball" >
+                    Tennis, racquetball
+                </label>
+            </div>
+
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>During the last 7 days, on how many days did you do a Vigorous physical activity Days<u>nonstop for at
+                least 10 minutes at a time</u>?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input
+                   value="<?= @$contentData['last_7_days__vigorous_days'] ?>"
+                   name="last_7_days__vigorous_days" type="number" class="form-control form-control-sm" placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Days</span>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0 d-flex align-items-center">
+        <label>On those days, how much time did you spend <u>on average</u> doing Vigorous physical activities?</label>
+        <div class="ml-3 d-inline-flex align-items-center">
+            <input
+                   value="<?= @$contentData['last_7_days__vigorous_mins_per_day'] ?>"
+                   name="last_7_days__vigorous_mins_per_day" type="number" class="form-control form-control-sm"
+                   placeholder="">
+            <span class="ml-2 text-secondary flex-grow-1">Minutes/Day</span>
+        </div>
+    </div>
+
+    <hr>
+
+    <div class="my-3 node node-level-0">
+        <label>Compared with your Usual Physical Activity over the last 3 months, was the last seven days’
+            activity:</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['last_7_days__activity_comparison'] === 'More' ? 'checked' : '' ?> name="last_7_days__activity_comparison"
+                type="radio" value="More" class="mr-1">
+                <span>More</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['last_7_days__activity_comparison'] === 'Less' ? 'checked' : '' ?> name="last_7_days__activity_comparison"
+                type="radio" value="Less" class="mr-1">
+                <span>Less</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['last_7_days__activity_comparison'] === 'About the same' ? 'checked' : '' ?> name="last_7_days__activity_comparison"
+                type="radio" value="About the same" class="mr-1">
+                <span>About the same</span>
+            </label>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Medical Problems</p>
+
+    <div class="my-3 node node-level-0">
+        <label>1. Has your doctor ever said that you have a heart condition and that you should only do physical
+            activity recommended by a doctor?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_heart_condition'] === 'Yes' ? 'checked' : '' ?> name="mp_heart_condition"
+                type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_heart_condition'] === 'No' ? 'checked' : '' ?> name="mp_heart_condition"
+                type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>2. Do you feel pain in your chest when you do physical activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_chest_pain_with_physical_activity'] === 'Yes' ? 'checked' : '' ?> name="mp_chest_pain_with_physical_activity"
+                type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_chest_pain_with_physical_activity'] === 'No' ? 'checked' : '' ?> name="mp_chest_pain_with_physical_activity"
+                type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>3. In the past month, have you had chest pain when you were not doing physical activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_chest_pain_without_physical_activity'] === 'Yes' ? 'checked' : '' ?> name="mp_chest_pain_without_physical_activity"
+                type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_chest_pain_without_physical_activity'] === 'No' ? 'checked' : '' ?> name="mp_chest_pain_without_physical_activity"
+                type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>4. Do you lose your balance because of dizziness, or do you ever lose consciousness?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_dizziness'] === 'Yes' ? 'checked' : '' ?> name="mp_dizziness" type="radio"
+                value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_dizziness'] === 'No' ? 'checked' : '' ?> name="mp_dizziness" type="radio"
+                value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>5. Do you have a bone or joint problem that could be made worse by a change in your physical
+            activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_bone_joint_problem'] === 'Yes' ? 'checked' : '' ?> name="mp_bone_joint_problem"
+                type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_bone_joint_problem'] === 'No' ? 'checked' : '' ?> name="mp_bone_joint_problem"
+                type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>6. Is your doctor currently prescribing drugs (for example, water pills) for your blood pressure or heart
+            condition?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_bp_heart_drugs'] === 'Yes' ? 'checked' : '' ?> name="mp_bp_heart_drugs"
+                type="radio" value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_bp_heart_drugs'] === 'No' ? 'checked' : '' ?> name="mp_bp_heart_drugs"
+                type="radio" value="No" class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="my-3 node node-level-0">
+        <label>7. Do you know of any other reason why you should not do physical activity?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_other'] === 'Yes' ? 'checked' : '' ?> name="mp_other" type="radio"
+                value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['mp_other'] === 'No' ? 'checked' : '' ?> name="mp_other" type="radio" value="No"
+                class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Physical Activity Plans</p>
+
+    <div class="my-3 node node-level-0">
+        <label>Please check the ONE answer that best describes your physical activity plans for the next 6
+            months:</label>
+        <div class="">
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input
+                       <?= @$contentData['pa_plans_next_6_months'] === 'I do not plan to become physically active in the next 6 months' ? 'checked' : '' ?>
+                name="pa_plans_next_6_months"
+                type="radio"
+                value="I do not plan to become physically active in the next 6 months" class="mr-1">
+                <span>A. I do not plan to become physically active in the next 6 months.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input
+                       <?= @$contentData['pa_plans_next_6_months'] === 'I am thinking about becoming more physically active' ? 'checked' : '' ?>
+                name="pa_plans_next_6_months"
+                type="radio"
+                value="I am thinking about becoming more physically active" class="mr-1">
+                <span>B. I am thinking about becoming more physically active.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input
+                       <?= @$contentData['pa_plans_next_6_months'] === 'I intend to become more physically active in the next 6 months' ? 'checked' : '' ?>
+                name="pa_plans_next_6_months"
+                type="radio"
+                value="I intend to become more physically active in the next 6 months" class="mr-1">
+                <span>C. I intend to become more physically active in the next 6 months.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input
+                       <?= @$contentData['pa_plans_next_6_months'] === 'I have been regularly physically active for the last 1–5 months' ? 'checked' : '' ?>
+                name="pa_plans_next_6_months"
+                type="radio"
+                value="I have been regularly physically active for the last 1–5 months" class="mr-1">
+                <span>D. I have been regularly physically active for the last 1–5 months.</span>
+            </label>
+            <label class="d-flex align-items-center mt-0 mb-1 mr-3">
+                <input
+                       <?= @$contentData['pa_plans_next_6_months'] === 'I have been regularly physically active for the past 6 months or more' ? 'checked' : '' ?>
+                name="pa_plans_next_6_months"
+                type="radio"
+                value="I have been regularly physically active for the past 6 months or more" class="mr-1">
+                <span>E. I have been regularly physically active for the past 6 months or more.</span>
+            </label>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Benefits of Physical Activity Important to You</p>
+
+    <div class="my-3 node node-level-0">
+        <label>the 3 <i>benefits</i> of physical activity that are <i>Most Important</i> to You:</label>
+        <div class="row">
+            <div class="col-6">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_for_my_health'] ? 'checked' : '' ?>
+                    name="pa_important_for_my_health" >
+                    1. For my health
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_control_my_weight'] ? 'checked' : '' ?>
+                    name="pa_important_control_my_weight" >
+                    2. Control my weight
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_look_better'] ? 'checked' : '' ?>
+                    name="pa_important_look_better" >
+                    3. Look better
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_feel_better'] ? 'checked' : '' ?>
+                    name="pa_important_feel_better" >
+                    4. Feel better
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_feel_good_about_taking_care_of_myself'] ? 'checked' : '' ?>
+                    name="pa_important_feel_good_about_taking_care_of_myself"
+                    >
+                    5. Feel good about taking care of myself
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_set_a_good_example_for_my_family_or_friends'] ? 'checked' : '' ?>
+                    name="pa_important_set_a_good_example_for_my_family_or_friends"
+                    >
+                    6. Set a good example for my family or friends
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_get_my_partner_child_friend_to_be_more_active_with_me'] ? 'checked' : '' ?>
+                    name="pa_important_get_my_partner_child_friend_to_be_more_active_with_me"
+                    >
+                    7. Get my partner, child, friend to be more active with me
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_teach_my_family_friends_the_importance_of_physical_activity'] ? 'checked' : '' ?>
+                    name="pa_important_teach_my_family_friends_the_importance_of_physical_activity"
+                    >
+                    8. Teach my family, friends the importance of physical activity
+                </label>
+            </div>
+            <div class="col-6">
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_have_time_for_me'] ? 'checked' : '' ?>
+                    name="pa_important_have_time_for_me" >
+                    9. Have time for me
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_lower_my_stress'] ? 'checked' : '' ?>
+                    name="pa_important_lower_my_stress" >
+                    10. Lower my stress
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_improve_my_fitness'] ? 'checked' : '' ?>
+                    name="pa_important_improve_my_fitness" >
+                    11. Improve my fitness
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_lower_my_risk_of_heart_disease'] ? 'checked' : '' ?>
+                    name="pa_important_lower_my_risk_of_heart_disease"
+                    >
+                    12. Lower my risk of heart disease
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_lower_my_blood_pressure'] ? 'checked' : '' ?>
+                    name="pa_important_lower_my_blood_pressure" >
+                    13. Lower my blood pressure
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_lower_my_cholesterol'] ? 'checked' : '' ?>
+                    name="pa_important_lower_my_cholesterol" >
+                    14. Lower my cholesterol
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_control_my_diabetes'] ? 'checked' : '' ?>
+                    name="pa_important_control_my_diabetes" >
+                    15. Control my diabetes
+                </label>
+                <label class="mb-1 d-flex align-items-center">
+                    <input type="checkbox" class="mr-2"
+                           <?= @$contentData['pa_important_other'] ? 'checked' : '' ?>
+                    name="pa_important_other" >
+                    <span class="text-nowrap mr-2">16. Other:</span>
+                    <input type="text" class="form-control form-control-sm"
+                           name="pa_important_other_details"
+                           value="<?= @$contentData['pa_important_other_details'] ?>">
+                </label>
+            </div>
+        </div>
+    </div>
+
+    <hr>
+
+    <p class="font-weight-bold">Getting Help from Others</p>
+
+    <div class="my-3 node node-level-0">
+        <label>Is there someone who would encourage you or help you with some of your responsibilities so you could get
+            regular
+            physical activity?</label>
+        <div class="d-flex align-items-center mb-3">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['getting_help_from_others'] === 'Yes' ? 'checked' : '' ?> name="getting_help_from_others"
+                type="radio"
+                value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['getting_help_from_others'] === 'No' ? 'checked' : '' ?> name="getting_help_from_others"
+                type="radio" value="No"
+                class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+        <div class="d-flex align-items-center mb-3">
+            <input type="text" class="form-control form-control-sm mr-2" placeholder="Who is that?"
+                   name="getting_help_from_others_who" value="<?= @$contentData['getting_help_from_others_who'] ?>">
+            <input type="text" class="form-control form-control-sm" placeholder="How could they help?"
+                   name="getting_help_from_others_how" value="<?= @$contentData['getting_help_from_others_how'] ?>">
+        </div>
+    </div>
+
+    <p class="font-weight-bold">Helping Others</p>
+
+    <div class="my-3 node node-level-0">
+        <label>Is there a friend or family member you think should get more physical activity?</label>
+        <div class="d-flex align-items-center mb-3">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['helping_others'] === 'Yes' ? 'checked' : '' ?> name="helping_others"
+                type="radio"
+                value="Yes" class="mr-1">
+                <span>Yes</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['helping_others'] === 'No' ? 'checked' : '' ?> name="helping_others"
+                type="radio" value="No"
+                class="mr-1">
+                <span>No</span>
+            </label>
+        </div>
+        <div class="d-flex align-items-center mb-3">
+            <input type="text" class="form-control form-control-sm mr-2" placeholder="Who is that?"
+                   name="helping_others_who" value="<?= @$contentData['helping_others_who'] ?>">
+            <input type="text" class="form-control form-control-sm" placeholder="How could you help them?"
+                   name="helping_others_how" value="<?= @$contentData['helping_others_how'] ?>">
+        </div>
+    </div>
+
+    <p class="font-weight-bold">Confidence</p>
+
+    <div class="my-3 node node-level-0">
+        <label>How confident are you that you could increase your physical activity if you decided to do so?</label>
+        <div class="d-flex align-items-center">
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['confidence'] === 'Very Confident' ? 'checked' : '' ?> name="confidence"
+                type="radio"
+                value="Very Confident" class="mr-1">
+                <span>Very Confident</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['confidence'] === 'Fairly Confident' ? 'checked' : '' ?> name="confidence"
+                type="radio"
+                value="Fairly Confident"
+                class="mr-1">
+                <span>Fairly Confident</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['confidence'] === 'A Little Confident' ? 'checked' : '' ?> name="confidence"
+                type="radio"
+                value="A Little Confident" class="mr-1">
+                <span>A Little Confident</span>
+            </label>
+            <label class="d-inline-flex align-items-center my-0 mr-3">
+                <input
+                       <?= @$contentData['confidence'] === 'Not at all Confident' ? 'checked' : '' ?> name="confidence"
+                type="radio"
+                value="Not at all Confident"
+                class="mr-1">
+                <span>Not at all Confident</span>
+            </label>
+        </div>
+    </div>
+
+    <div class="section-edit-mask position-absolute"></div>
+
+</div>
+
+

+ 3 - 3
storage/templates/kct-mdm/injectable-medications.json

@@ -1453,7 +1453,7 @@
         },
         {
             "text": "Reassessment Vitals",
-            "template": "{tb}Vitals: {children}",
+            "template": "Vitals: {children}",
             "children": [
                 {
                     "text": "BP (specify)",
@@ -1494,7 +1494,7 @@
         },
         {
             "text": "Physician Assessment, Response",
-            "template": "{tb}Response: {children}",
+            "template": "Response: {children}",
             "children": [
                 {
                     "text": "no adverse reaction",
@@ -1516,4 +1516,4 @@
             ]
         }
     ]
-}
+}

+ 4 - 4
storage/templates/kct-mdm/respiratory-therapy.json

@@ -9,7 +9,7 @@
         },
         {
             "text": "Findings Prior to Tx",
-            "template": "{tb}Findings: {children}",
+            "template": "Findings: {children}",
             "children": [
                 {
                     "text": "BP (specify)",
@@ -261,7 +261,7 @@
         },
         {
             "text": "Discharge Vitals",
-            "template": "{tb}Vitals: {children}",
+            "template": "Vitals: {children}",
             "children": [
                 {
                     "text": "BP (specify)",
@@ -297,7 +297,7 @@
         },
         {
             "text": "Physician Assessment, Response",
-            "template": "{tb}Response: {children}",
+            "template": "Response: {children}",
             "children": [
                 {
                     "text": "no adverse reaction",
@@ -319,4 +319,4 @@
             ]
         }
     ]
-}
+}

+ 2 - 2
storage/templates/kct-mp/fb-removal.json

@@ -102,7 +102,7 @@
         },
         {
             "text": "Sutures Used (#)",
-            "template": "{tb}{tb}number of sutures used: {text}",
+            "template": "Number of sutures used: {text}",
             "type": "number"
         },
         {
@@ -246,4 +246,4 @@
             ]
         }
     ]
-}
+}

+ 3 - 3
storage/templates/kct-mp/laceration-repair.json

@@ -334,7 +334,7 @@
         },
         {
             "text": "Sutures Used (#)",
-            "template": "{tb}{tb}number of sutures used: {text}",
+            "template": "Number of sutures used: {text}",
             "type": "number"
         },
         {
@@ -360,7 +360,7 @@
         },
         {
             "text": "Sutures Used (#)",
-            "template": "{tb}{tb}number of sutures used: {text}",
+            "template": "Number of sutures used: {text}",
             "type": "number"
         },
         {
@@ -383,4 +383,4 @@
             ]
         }
     ]
-}
+}

+ 1 - 1
storage/templates/minor-procedures/fb-removal.json

@@ -102,7 +102,7 @@
         },
         {
             "text": "Sutures Used (#)",
-            "template": "{tb}{tb}number of sutures used: {text}",
+            "template": "Number of sutures used: {text}",
             "type": "number"
         },
         {

+ 2 - 2
storage/templates/minor-procedures/laceration-repair.json

@@ -334,7 +334,7 @@
         },
         {
             "text": "Sutures Used (#)",
-            "template": "{tb}{tb}number of sutures used: {text}",
+            "template": "Number of sutures used: {text}",
             "type": "number"
         },
         {
@@ -360,7 +360,7 @@
         },
         {
             "text": "Sutures Used (#)",
-            "template": "{tb}{tb}number of sutures used: {text}",
+            "template": "Number of sutures used: {text}",
             "type": "number"
         },
         {