|
@@ -142,11 +142,37 @@
|
|
|
<label for="" class="text-secondary text-sm mb-1">Effective Date *</label>
|
|
|
<input type="date" name="effectiveDate" class="form-control" value="{{get_current_date($pro->display_timezone)}}">
|
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
- <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
|
|
|
- <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
+
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
+ <div class="form-group mb-2 pt-2 d-flex">
|
|
|
+ <label class="my-0 mr-3 d-flex align-items-center">
|
|
|
+ <input type="radio" class="mr-1" name="noteType" value="regular" required>
|
|
|
+ Regular Note
|
|
|
+ </label>
|
|
|
+ <label class="my-0 mr-3 d-flex align-items-center">
|
|
|
+ <input type="radio" class="mr-1" name="noteType" value="admin" required>
|
|
|
+ Admin Note
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div if-admin-note class="d-none">
|
|
|
+ <input type="hidden" x-name="hcpProUid" value="{{config('app.adminNoteHcpProUid')}}">
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group d-none" if-regular-note>
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
|
|
|
+ <select x-name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ @else
|
|
|
+ <div class="form-group mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
|
|
|
+ <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+
|
|
|
+
|
|
|
<div class="form-group mb-2">
|
|
|
<label for="" class="text-secondary text-sm mb-1">Note Template *</label>
|
|
|
<select name="visitTemplateUid" class="form-control form-control-sm"
|
|
@@ -406,6 +432,28 @@
|
|
|
form.find('.if-in-clinic').hide();
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ $('[name="noteType"]').change(function() {
|
|
|
+ let form = $(this).closest('form');
|
|
|
+ form.find('[if-regular-note]').addClass('d-none');
|
|
|
+ form.find('[if-regular-note] [x-name]').removeAttr('name');
|
|
|
+ form.find('[if-admin-note]').addClass('d-none');
|
|
|
+ form.find('[if-admin-note] [x-name]').removeAttr('name');
|
|
|
+ if(form.find('[name="noteType"]:checked').attr('value') === 'regular') {
|
|
|
+ form.find('[if-regular-note]').removeClass('d-none');
|
|
|
+ form.find('[if-regular-note] [x-name]').each(function() {
|
|
|
+ $(this).attr('name', $(this).attr('x-name'));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else if(form.find('[name="noteType"]:checked').attr('value') === 'admin') {
|
|
|
+ form.find('[if-admin-note]').removeClass('d-none');
|
|
|
+ form.find('[if-admin-note] [x-name]').each(function() {
|
|
|
+ $(this).attr('name', $(this).attr('x-name'));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
addMCInitializer('notes-list', initNotesList, '#notes-list-{{$patient->id}}');
|
|
|
})();
|