|
@@ -124,92 +124,158 @@
|
|
|
</div>
|
|
|
@endif
|
|
|
<span class="mx-2 text-secondary">|</span>
|
|
|
- <div moe>
|
|
|
- <a start show class="py-0 mb-3 text-info font-weight-bold">Add Visit</a>
|
|
|
- <form url="/api/visit/create"
|
|
|
- redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
|
|
|
- class="mcp-theme-1">
|
|
|
- <?php $proVisitTemplates = $pro->visitTemplates(); ?>
|
|
|
- <input type="hidden" name="clientUid" value="{{$patient->uid}}">
|
|
|
- @if($pro->isDefaultNA())
|
|
|
- <input type="hidden" name="naProUid" value="{{$pro->uid}}">
|
|
|
- @endif
|
|
|
+ <div moe id="new-appt-moe">
|
|
|
+ <a start show class="py-0 mb-3 text-info font-weight-bold"></a>
|
|
|
+ <form url="/api/appointment/create" redir="/patients/view/{{$patient->uid}}/notes?apptUid=[data]">
|
|
|
+ <p class="mb-2 font-weight-bold">Create Appointment</p>
|
|
|
+ <input type="hidden" name="clientUid" value="{{$patient->uid}}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Pro</label>
|
|
|
+ <select name="proUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}"></select>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Date</label>
|
|
|
+ <input type="date" name="date" required class="form-control form-control-sm" value="{{date('Y-m-d')}}">
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Start Time</label>
|
|
|
+ <input type="time" name="startTime" required class="form-control form-control-sm">
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">End Time</label>
|
|
|
+ <input type="time" name="endTime" required class="form-control form-control-sm">
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Timezone</label>
|
|
|
+ <select name="timeZone" class="form-control">
|
|
|
+ <option value="EASTERN" selected>Eastern</option>
|
|
|
+ <option value="CENTRAL">Central</option>
|
|
|
+ <option value="MOUNTAIN">Mountain</option>
|
|
|
+ <option value="PACIFIC">Pacific</option>
|
|
|
+ <option value="ALASKA">Alaska</option>
|
|
|
+ <option value="HAWAII">Hawaii</option>
|
|
|
+ <option value="PUERTO_RICO">Puerto Rico</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Title</label>
|
|
|
+ <input type="text" name="title" required class="form-control form-control-sm" value="Visit - {{date('Y-m-d')}}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center justify-content-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Submit</button>
|
|
|
+ <button class="btn btn-sm btn-default border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div moe id="new-visit-moe">
|
|
|
+ <a start show class="py-0 mb-3 text-info font-weight-bold">Add Visit</a>
|
|
|
+ <form url="/api/visit/create"
|
|
|
+ redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
|
|
|
+ class="mcp-theme-1">
|
|
|
+ <p class="mb-2 font-weight-bold">Create Visit</p>
|
|
|
|
|
|
- <input type="hidden" class="form-control form-control-sm" placeholder="title"
|
|
|
- name="title" id="note-create-title" value="{{count($proVisitTemplates) === 1 ? $proVisitTemplates->first()->title : 'Note'}}">
|
|
|
+ @if($patient->rmCompany && !$patient->rmCompany->is_external_care_allowed)
|
|
|
+ <div class="alert alert-warning m-0 border-warning text-nowrap">External care is not allowed on patients<br> of
|
|
|
+ {{$patient->rmCompany->name}}.</div>
|
|
|
+ @else
|
|
|
|
|
|
- <div class="form-group mb-2">
|
|
|
- <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>
|
|
|
+ <?php $proVisitTemplates = $pro->visitTemplates(); ?>
|
|
|
+ <input type="hidden" name="clientUid" value="{{$patient->uid}}">
|
|
|
+ @if($pro->isDefaultNA())
|
|
|
+ <input type="hidden" name="naProUid" value="{{$pro->uid}}">
|
|
|
+ @endif
|
|
|
+
|
|
|
+ <input type="hidden" class="form-control form-control-sm" placeholder="title"
|
|
|
+ name="title" id="note-create-title" value="{{count($proVisitTemplates) === 1 ? $proVisitTemplates->first()->title : 'Note'}}">
|
|
|
|
|
|
- @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="isNonMedical" value="0" required {{$pro->is_hcp ? 'checked' : ''}}>
|
|
|
- <span class="text-nowrap">Regular Note</span>
|
|
|
- </label>
|
|
|
- <label class="my-0 mr-3 d-flex align-items-center">
|
|
|
- <input type="radio" class="mr-1" name="isNonMedical" value="1" required {{$pro->is_hcp ? '' : 'checked'}}>
|
|
|
- <span class="text-nowrap">Admin Note</span>
|
|
|
- </label>
|
|
|
+ <div class="form-group mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">For Appointment *</label>
|
|
|
+ <select name="forAppointmentUid" class="form-control" onchange="if(this.value === 'create') {$('#new-appt-moe>a').first().click(); return false;}" required>
|
|
|
+ <option value="" selected>-- select --</option>
|
|
|
+ <option value="create">Create New</option>
|
|
|
+ @foreach($patient->upcomingAppointments as $appt)
|
|
|
+ @if($appt->raw_date === date('Y-m-d'))
|
|
|
+ <option value="{{$appt->uid}}">{{$appt->raw_date}} - {{$appt->pro->displayName()}}</option>
|
|
|
+ @endif
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- @endif
|
|
|
|
|
|
- <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 <?= $pro->pro_type !== 'ADMIN' ? 'provider-type="hcp"':'' ?> data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
+ <div class="form-group mb-2">
|
|
|
+ <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 mb-2">
|
|
|
- <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
|
|
|
- <select name="visitTemplateUid" class="form-control form-control-sm"
|
|
|
- onchange="$('#note-create-title').val($(this).find('option:selected').text())"
|
|
|
- required>
|
|
|
- <option value=""> --select--</option>
|
|
|
- @foreach($proVisitTemplates as $visitTemplate)
|
|
|
- <option value="{{$visitTemplate->uid}}" {{count($proVisitTemplates) === 1 ? 'selected' : ''}}>{{$visitTemplate->title}}</option>
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label for="" class="text-secondary text-sm mb-1">New/Follow-up</label>
|
|
|
- <div class="d-flex align-items-baseline py-1">
|
|
|
- <label class="mr-3 my-0 d-inline-flex align-items-center c-pointer">
|
|
|
- <input type="radio" name="newOrFuOrNa" value="NEW" required>
|
|
|
- <span class="ml-1 text-dark">New</span>
|
|
|
- </label>
|
|
|
- <label class="my-0 d-inline-flex align-items-center c-pointer">
|
|
|
- <input type="radio" name="newOrFuOrNa" value="FU" required>
|
|
|
- <span class="ml-1 text-dark">Follow-Up</span>
|
|
|
- </label>
|
|
|
+ @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="isNonMedical" value="0" required {{$pro->is_hcp ? 'checked' : ''}}>
|
|
|
+ <span class="text-nowrap">Regular Note</span>
|
|
|
+ </label>
|
|
|
+ <label class="my-0 mr-3 d-flex align-items-center">
|
|
|
+ <input type="radio" class="mr-1" name="isNonMedical" value="1" required {{$pro->is_hcp ? '' : 'checked'}}>
|
|
|
+ <span class="text-nowrap">Admin Note</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ <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 <?= $pro->pro_type !== 'ADMIN' ? 'provider-type="hcp"':'' ?> data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label for="" class="text-secondary text-sm mb-1">Method *</label>
|
|
|
- <select name="noteContactMethod" class="form-control form-control-sm note-method-select" required>
|
|
|
- <option value="">-- select --</option>
|
|
|
- <option value="AUDIO">Audio</option>
|
|
|
- <option value="VIDEO">Video</option>
|
|
|
- <option value="IN_CLINIC">In-Clinic</option>
|
|
|
- <option value="HOUSE_CALL">House Call</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="form-group if-in-clinic">
|
|
|
- <label for="" class="text-secondary text-sm mb-1">Location</label>
|
|
|
- <select name="hcpCompanyLocationUid" class="form-control">
|
|
|
- <option value=""></option>
|
|
|
- @foreach($pro->companyLocations() as $location)
|
|
|
- <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
|
|
|
- @endforeach
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="form-group m-0">
|
|
|
- <button submit class="btn btn-primary btn-sm">submit</button>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <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"
|
|
|
+ onchange="$('#note-create-title').val($(this).find('option:selected').text())"
|
|
|
+ required>
|
|
|
+ <option value=""> --select--</option>
|
|
|
+ @foreach($proVisitTemplates as $visitTemplate)
|
|
|
+ <option value="{{$visitTemplate->uid}}" {{count($proVisitTemplates) === 1 ? 'selected' : ''}}>{{$visitTemplate->title}}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">New/Follow-up</label>
|
|
|
+ <div class="d-flex align-items-baseline py-1">
|
|
|
+ <label class="mr-3 my-0 d-inline-flex align-items-center c-pointer">
|
|
|
+ <input type="radio" name="newOrFuOrNa" value="NEW" required>
|
|
|
+ <span class="ml-1 text-dark">New</span>
|
|
|
+ </label>
|
|
|
+ <label class="my-0 d-inline-flex align-items-center c-pointer">
|
|
|
+ <input type="radio" name="newOrFuOrNa" value="FU" required>
|
|
|
+ <span class="ml-1 text-dark">Follow-Up</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Method *</label>
|
|
|
+ <select name="noteContactMethod" class="form-control form-control-sm note-method-select" required>
|
|
|
+ <option value="">-- select --</option>
|
|
|
+ <option value="AUDIO">Audio</option>
|
|
|
+ <option value="VIDEO">Video</option>
|
|
|
+ <option value="IN_CLINIC">In-Clinic</option>
|
|
|
+ <option value="HOUSE_CALL">House Call</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="form-group if-in-clinic">
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Location</label>
|
|
|
+ <select name="hcpCompanyLocationUid" class="form-control">
|
|
|
+ <option value=""></option>
|
|
|
+ @foreach($pro->companyLocations() as $location)
|
|
|
+ <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="form-group m-0">
|
|
|
+ <button submit class="btn btn-primary btn-sm">submit</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ @endif
|
|
|
+
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
@else
|
|
|
<span class="ml-3 text-danger">
|
|
|
<i class="fa fa-exclamation-triangle"></i>
|
|
@@ -435,6 +501,12 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ @if(request('apptUid'))
|
|
|
+ let nvMoe = $('#new-visit-moe');
|
|
|
+ nvMoe.find('[name="forAppointmentUid"]').val('{{request('apptUid')}}');
|
|
|
+ nvMoe.find('>a').first().click();
|
|
|
+ @endif
|
|
|
+
|
|
|
}
|
|
|
addMCInitializer('notes-list', initNotesList, '#notes-list-{{$patient->id}}');
|
|
|
})();
|