|
@@ -258,47 +258,95 @@ $medications = $points;
|
|
|
<input type="hidden" data-name="routedDosageFormMedId">
|
|
|
<input type="hidden" data-name="gcnSeqno">
|
|
|
|
|
|
- <p class="mb-2"><b>Add Medication</b></p>
|
|
|
+ <input type="hidden" name="additionReasonCategory">
|
|
|
+ <input type="hidden" name="isRemoved">
|
|
|
+ <input type="hidden" name="removalReasonCategory">
|
|
|
+ <input type="hidden" name="isRemovedDueToEntryError">
|
|
|
|
|
|
- <div class="d-flex align-items-start">
|
|
|
+ <p class="mb-2"><b>Add Medication</b></p>
|
|
|
|
|
|
- <div class="mb-2 w-25">
|
|
|
- <label class="text-sm text-secondary mb-1">Name</label>
|
|
|
- <input type="text"
|
|
|
- data-name="name"
|
|
|
- class="form-control form-control-sm"
|
|
|
- stag-suggest
|
|
|
- stag-suggest-bottom-left
|
|
|
- stag-suggest-ep="/fdb-med-suggest-v2/json"
|
|
|
- required>
|
|
|
- </div>
|
|
|
- <div class="mb-2 ml-2">
|
|
|
- <label class="text-sm text-secondary mb-1">Frequency</label>
|
|
|
- <input type="text" class="form-control form-control-sm" data-name="frequency"
|
|
|
- data-option-list="frequency-options" autocomplete="off">
|
|
|
- <div id="frequency-options" class="data-option-list">
|
|
|
- <div>Once a day</div>
|
|
|
- <div>Twice a day</div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-7">
|
|
|
+ <div class="row mb-2">
|
|
|
+ <div class="col-8 pr-0">
|
|
|
+ <label class="text-sm text-secondary mb-0">Name</label>
|
|
|
+ <input type="text"
|
|
|
+ data-name="name"
|
|
|
+ class="form-control form-control-sm"
|
|
|
+ stag-suggest
|
|
|
+ stag-suggest-bottom-left
|
|
|
+ stag-suggest-ep="/fdb-med-suggest-v2/json"
|
|
|
+ required>
|
|
|
+ </div>
|
|
|
+ <div class="col-4">
|
|
|
+ <label class="text-sm text-secondary mb-0">Frequency</label>
|
|
|
+ <input type="text" class="form-control form-control-sm" data-name="frequency"
|
|
|
+ data-option-list="frequency-options" autocomplete="off">
|
|
|
+ <div id="frequency-options" class="data-option-list">
|
|
|
+ <div>Once a day</div>
|
|
|
+ <div>Twice a day</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--<div class="row mb-2">
|
|
|
+ <div class="col-12">
|
|
|
+ <label class="text-sm text-secondary mb-0">Description</label>
|
|
|
+ <textarea rows="1" data-name="description" class="form-control form-control-sm"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>-->
|
|
|
+ <div class="row mb-2">
|
|
|
+ <div class="col-12">
|
|
|
+ <label class="text-sm text-secondary mb-0">Historic / Preexisting / New</label>
|
|
|
+ <select class="form-control form-control-sm additionReasonCategory_ui" name="additionReasonCategory_ui" required>
|
|
|
+ <option value="">-- select --</option>
|
|
|
+ <option value="HISTORIC">Historic</option>
|
|
|
+ <option value="PRE_EXISTING">Preexisting</option>
|
|
|
+ <option value="NEW">New (Prescribed during this visit)</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-start mb-2">
|
|
|
+ <div class="w-25">
|
|
|
+ <div class="start_date_ui" style="display: none">
|
|
|
+ <label class="text-sm text-secondary mb-0">Start Date</label>
|
|
|
+ <input type="date"
|
|
|
+ data-name="start_date"
|
|
|
+ class="form-control form-control-sm min-width-unset">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="w-25 pl-2">
|
|
|
+ <div class="prescriber_ui" style="display: none">
|
|
|
+ <label class="text-sm text-secondary mb-0">Prescribed By</label>
|
|
|
+ <input type="text"
|
|
|
+ data-name="prescriber"
|
|
|
+ class="form-control form-control-sm min-width-unset">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="w-25 pl-2">
|
|
|
+ <div class="removalEffectiveDate_ui" style="display: none">
|
|
|
+ <label class="text-sm text-secondary mb-0">End Date</label>
|
|
|
+ <input type="date"
|
|
|
+ name="removalEffectiveDate"
|
|
|
+ class="form-control form-control-sm min-width-unset">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="w-25 pl-2">
|
|
|
+ <div class="removalReasonMemo_ui" style="display: none">
|
|
|
+ <label class="text-sm text-secondary mb-0">Removal By/Memo</label>
|
|
|
+ <input type="text"
|
|
|
+ name="removalReasonMemo"
|
|
|
+ class="form-control form-control-sm min-width-unset">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="mb-2 ml-2">
|
|
|
- <label class="text-sm text-secondary mb-1">Existing / New</label>
|
|
|
- <select class="form-control form-control-sm" name="additionReasonCategory" required>
|
|
|
- <option value="">-- select --</option>
|
|
|
- <option value="ON_INTAKE">Existing (Patient was already on this)</option>
|
|
|
- <option value="DURING_VISIT">New (Prescribed during this visit)</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="mb-2 ml-2 flex-grow-1">
|
|
|
- <label class="text-sm text-secondary mb-1">Description</label>
|
|
|
- <textarea rows="1" data-name="description" class="form-control form-control-sm"></textarea>
|
|
|
- </div>
|
|
|
+ <div class="col-5 border-left">
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
- <button type="submit" class="btn btn-sm btn-primary mr-2">Submit</button>
|
|
|
- <button type="button" class="btn btn-sm btn-default bg-white border mr-2" onclick="closeStagPopup()">Close</button>
|
|
|
+ <button type="submit" class="btn btn-sm btn-primary mr-2 my-1">Save Medication</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
@@ -320,6 +368,45 @@ $medications = $points;
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
+ parentSegment.find('.additionReasonCategory_ui')
|
|
|
+ .off('change')
|
|
|
+ .on('change', function() {
|
|
|
+
|
|
|
+ let form = $(this).closest('form');
|
|
|
+
|
|
|
+ // additionReasonCategory
|
|
|
+ // isRemoved
|
|
|
+ // removalReasonCategory
|
|
|
+ form.find('[name="isRemovedDueToEntryError"]').val('0');
|
|
|
+
|
|
|
+ form.find('.start_date_ui').hide();
|
|
|
+ form.find('.prescriber_ui').hide();
|
|
|
+ form.find('.removalEffectiveDate_ui').hide();
|
|
|
+ form.find('.removalReasonMemo_ui').hide();
|
|
|
+
|
|
|
+ if(this.value === 'HISTORIC') {
|
|
|
+ form.find('[name="additionReasonCategory"]').val('ON_INTAKE');
|
|
|
+ form.find('[name="isRemoved"]').val('1');
|
|
|
+ form.find('.start_date_ui').show().find('input').val('');
|
|
|
+ form.find('.prescriber_ui').show().find('input').val('');
|
|
|
+ form.find('.removalEffectiveDate_ui').show().find('input').val('');
|
|
|
+ form.find('.removalReasonMemo_ui').show().find('input').val('');
|
|
|
+ }
|
|
|
+ else if(this.value === 'PRE_EXISTING') {
|
|
|
+ form.find('[name="additionReasonCategory"]').val('ON_INTAKE');
|
|
|
+ form.find('[name="isRemoved"]').val('0');
|
|
|
+ form.find('.start_date_ui').show().find('input').val('');
|
|
|
+ form.find('.prescriber_ui').show().find('input').val('');
|
|
|
+ }
|
|
|
+ else if(this.value === 'NEW') {
|
|
|
+ form.find('[name="additionReasonCategory"]').val('DURING_VISIT');
|
|
|
+ form.find('[name="isRemoved"]').val('0');
|
|
|
+ form.find('.start_date_ui').show().find('input').val('{{date('Y-m-d')}}');
|
|
|
+ form.find('.prescriber_ui').show().find('input').val('{{$note->hcpPro->displayName()}}');
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
parentSegment.find('#frm-add-medication')
|
|
|
.off('submit')
|
|
|
.on('submit', function () {
|