|
@@ -443,122 +443,7 @@
|
|
|
</div>
|
|
|
|
|
|
{{-- rx --}}
|
|
|
- <div class="mt-2 pb-1" rx-section>
|
|
|
- <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>
|
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
- <div moe>
|
|
|
- <a start show class="py-0 font-weight-normal">Add</a>
|
|
|
- <form url="/api/clientInfoLine/create">
|
|
|
- <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
- <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="strength" value="" placeholder="Strength/Form">
|
|
|
- </div>
|
|
|
- <div class="d-flex align-items-center">
|
|
|
- <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>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
-
|
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
-
|
|
|
- <div moe>
|
|
|
- <a start show class="">Multi</a>
|
|
|
- <form url="/api/clientInfoLine/createMultiple">
|
|
|
- <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
- <input type="hidden" name="category" value="rx">
|
|
|
- <div class="mb-2">
|
|
|
- <textarea class="form-control form-control-sm" rows="8"
|
|
|
- name="contentTexts" value=""
|
|
|
- placeholder="Medications"></textarea>
|
|
|
- </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>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
-
|
|
|
- <span class="mx-2 text-secondary">|</span>
|
|
|
- <a start show class="py-0 font-weight-normal"
|
|
|
- href="/patients/view/{{ $patient->uid }}/medications">
|
|
|
- View All
|
|
|
- </a>
|
|
|
- </div>
|
|
|
- <table class="table table-sm border-0 m-0">
|
|
|
- <tbody>
|
|
|
- <?php $itemCount = 0; ?>
|
|
|
- @foreach($infoLines as $category => $lines)
|
|
|
- @if($category === "rx")
|
|
|
- @foreach ($lines as $line)
|
|
|
- <?php $itemCount++; ?>
|
|
|
- <tr>
|
|
|
- <td class="text-black p-0 border-0">
|
|
|
- <div class="d-flex">
|
|
|
- <span moe relative class="mr-2">
|
|
|
- <a class="on-hover-opaque" start show title="Delete">
|
|
|
- <i class="font-size-11 fa fa-trash-alt text-danger"></i>
|
|
|
- </a>
|
|
|
- <form url="/api/clientInfoLine/remove">
|
|
|
- <input type="hidden" name="uid" value="{{ $line->uid }}">
|
|
|
- <p class="small">Are you sure you want to delete this entry?</p>
|
|
|
- <div class="d-flex align-items-center">
|
|
|
- <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
|
|
|
- <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </span>
|
|
|
- <div moe relative class="mr-2">
|
|
|
- <a class="on-hover-opaque" start show title="Edit">
|
|
|
- <i class="font-size-11 fa fa-edit"></i>
|
|
|
- </a>
|
|
|
- <form url="/api/clientInfoLine/updateContent">
|
|
|
- <input type="hidden" name="uid" value="{{ $line->uid }}">
|
|
|
- <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
- <input type="hidden" name="category" value="rx">
|
|
|
- <div class="mb-2">
|
|
|
- <input type="text" class="form-control form-control-sm"
|
|
|
- name="contentText"
|
|
|
- placeholder="Medication"
|
|
|
- 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">
|
|
|
- <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>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <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>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endforeach
|
|
|
- @endif
|
|
|
- @endforeach
|
|
|
- @if($itemCount === 0)
|
|
|
- <tr>
|
|
|
- <td class="text-secondary p-0 border-0">
|
|
|
- No items to show
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
+ @include('app/patient/partials/rx')
|
|
|
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -1679,46 +1564,4 @@
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
- <script>
|
|
|
- (function() {
|
|
|
- function init() {
|
|
|
- $('input[type="text"][name="ICD"]').each(function() {
|
|
|
- var elem = this, dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
|
|
|
- $(elem).attr('id', dynID);
|
|
|
- new window.Def.Autocompleter.Search(dynID,
|
|
|
- 'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name',
|
|
|
- {
|
|
|
- tableFormat: true,
|
|
|
- valueCols: [0],
|
|
|
- colHeaders: ['Code', 'Name'],
|
|
|
- }
|
|
|
- );
|
|
|
- window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
|
|
|
- var autocomp = elem.autocomp;
|
|
|
- var name = autocomp.getSelectedItemData()[0].data['name'];
|
|
|
- $(elem).closest('form').find('[name="contentText"]').val(name);
|
|
|
- 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);
|
|
|
- })();
|
|
|
- </script>
|
|
|
@endsection
|