|
@@ -209,7 +209,7 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{{-- rx --}}
|
|
{{-- rx --}}
|
|
- <div class="mt-2 pb-1">
|
|
|
|
|
|
+ <div class="mt-2 pb-1" rx-section>
|
|
<div class="d-flex align-items-center mb-2 py-2 border-top border-bottom">
|
|
<div class="d-flex align-items-center mb-2 py-2 border-top border-bottom">
|
|
<h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
|
|
<h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
|
|
<span class="mx-2 text-secondary">|</span>
|
|
<span class="mx-2 text-secondary">|</span>
|
|
@@ -218,7 +218,12 @@
|
|
<form url="/api/clientInfoLine/create">
|
|
<form url="/api/clientInfoLine/create">
|
|
<input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
<input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
<input type="hidden" name="category" value="rx">
|
|
<input type="hidden" name="category" value="rx">
|
|
- <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Medication"></div>
|
|
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Medication">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="strength" value="" placeholder="Strength/Form">
|
|
|
|
+ </div>
|
|
<div class="d-flex align-items-center">
|
|
<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-primary mr-2" submit>Save</button>
|
|
<button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
<button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
@@ -287,13 +292,23 @@
|
|
name="contentText"
|
|
name="contentText"
|
|
placeholder="Medication"
|
|
placeholder="Medication"
|
|
value="{{$line->contentText}}"></div>
|
|
value="{{$line->contentText}}"></div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="strength"
|
|
|
|
+ value="{{getVal($line->contentDetail, "strength") }}" placeholder="Strength/Form">
|
|
|
|
+ </div>
|
|
<div class="d-flex align-items-center">
|
|
<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>
|
|
|
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" type="button" cancel>Cancel</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
- <span class="font-weight-bold">{{$line->contentText}}</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <span class="font-weight-bold">{{$line->contentText}}</span>
|
|
|
|
+ @if(!empty(getVal($line->contentDetail, "strength")))
|
|
|
|
+ <span class="text-secondary">/</span>
|
|
|
|
+ <span>{{getVal($line->contentDetail, "strength") }}</span>
|
|
|
|
+ @endif
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
@@ -535,10 +550,14 @@
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<span class="font-weight-bold">{{$line->contentText}}</span>
|
|
<span class="font-weight-bold">{{$line->contentText}}</span>
|
|
|
|
+ @if(!empty(getVal($line->contentDetail, "Chronic or Acute")))
|
|
<span class="text-secondary mx-1">/</span>
|
|
<span class="text-secondary mx-1">/</span>
|
|
<span class="text-secondary">{{ getVal($line->contentDetail, "Chronic or Acute") }}</span>
|
|
<span class="text-secondary">{{ getVal($line->contentDetail, "Chronic or Acute") }}</span>
|
|
|
|
+ @endif
|
|
|
|
+ @if(!empty(getVal($line->contentDetail, "ICD")))
|
|
<span class="text-secondary mx-1">/</span>
|
|
<span class="text-secondary mx-1">/</span>
|
|
<span class="text-secondary">ICD: {{ getVal($line->contentDetail, "ICD") ? getVal($line->contentDetail, "ICD") : '-' }}</span>
|
|
<span class="text-secondary">ICD: {{ getVal($line->contentDetail, "ICD") ? getVal($line->contentDetail, "ICD") : '-' }}</span>
|
|
|
|
+ @endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
@@ -1277,6 +1296,23 @@
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ $('[rx-section] input[type="text"][name="contentText"]').each(function() {
|
|
|
|
+ var elem = this, dynID = 'rx-' + Math.ceil(Math.random() * 1000000);
|
|
|
|
+ $(elem).attr('id', dynID);
|
|
|
|
+ var strengthElem = $(elem).closest('form').find('[name="strength"]')[0],
|
|
|
|
+ dynStrengthsID = 'rx-' + Math.ceil(Math.random() * 1000000) + '-strengths';
|
|
|
|
+ $(strengthElem).attr('id', dynStrengthsID);
|
|
|
|
+ new window.Def.Autocompleter.Prefetch(dynStrengthsID, []);
|
|
|
|
+ new window.Def.Autocompleter.Search(dynID,
|
|
|
|
+ 'https://clinicaltables.nlm.nih.gov/api/rxterms/v3/search?ef=STRENGTHS_AND_FORMS');
|
|
|
|
+ window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
|
|
|
|
+ var autocomp = elem.autocomp;
|
|
|
|
+ var strengths =
|
|
|
|
+ autocomp.getSelectedItemData()[0].data['STRENGTHS_AND_FORMS'];
|
|
|
|
+ if (strengths)
|
|
|
|
+ strengthElem.autocomp.setListAndField(strengths, '');
|
|
|
|
+ });
|
|
|
|
+ });
|
|
}
|
|
}
|
|
addMCInitializer('patient-single', init);
|
|
addMCInitializer('patient-single', init);
|
|
})();
|
|
})();
|