|
@@ -0,0 +1,294 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
+
|
|
|
+ <title>{{ config('app.name') }}</title>
|
|
|
+
|
|
|
+ <!-- Fonts -->
|
|
|
+ <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
|
|
|
+
|
|
|
+ {{-- mc initializers --}}
|
|
|
+ <script src="/js/mc-init.js"></script>
|
|
|
+
|
|
|
+ {{-- vue --}}
|
|
|
+ <script src="/js/vue.js"></script>
|
|
|
+
|
|
|
+ {{-- Quill RTE --}}
|
|
|
+ <link href="/quill/quill.snow.css" rel="stylesheet">
|
|
|
+ <script src="/quill/quill.js"></script>
|
|
|
+
|
|
|
+ <!-- <link href="{{ asset('bootstrap-4.5.0/css/bootstrap.css') }}" rel="stylesheet"> -->
|
|
|
+ <link rel="stylesheet" href="/fontawesome-free-5.13.1-web/css/all.min.css">
|
|
|
+ <link href="{{ asset('/css/app.css') }}" rel="stylesheet">
|
|
|
+ <link href="{{ asset('/css/style.css') }}" rel="stylesheet">
|
|
|
+ <link href="{{ asset('/css/yemi.css') }}" rel="stylesheet">
|
|
|
+ <link rel="stylesheet" href="{{ asset('/css/toastr.min.css') }}">
|
|
|
+ <link href="{{asset('/css/z.css')}}" rel=stylesheet>
|
|
|
+ <!-- Styles -->
|
|
|
+
|
|
|
+ <script src="{{ asset('js/app.js') }}" type="application/javascript"></script>
|
|
|
+ <script src="/js/jquery-3.5.1.min.js"></script>
|
|
|
+ <script src="/js/jquery.form.min.js"></script>
|
|
|
+ <script src="{{ asset('js/toastr.min.js') }}" type="application/javascript"></script>
|
|
|
+ <script src="/js/yemi.js?_=7" type="application/javascript"></script>
|
|
|
+
|
|
|
+ {{-- med ac --}}
|
|
|
+ <link href='/css/autocomplete-lhc.min.css' rel="stylesheet">
|
|
|
+ <script src='/js/autocomplete-lhc.js'></script>
|
|
|
+
|
|
|
+ {{-- inline bootstrap datepicker --}}
|
|
|
+ <link href='/bootstrap-datepicker/css/bootstrap-datepicker.min.css' rel="stylesheet">
|
|
|
+ <script src='/bootstrap-datepicker/js/bootstrap-datepicker.min.js'></script>
|
|
|
+
|
|
|
+ @yield('head')
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <div id="mask" style="background: rgba(0, 0, 0, 0) url("/vanillaspin.gif") no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 9999; width: 100%; height: 100%; display: none;">
|
|
|
+ </div>
|
|
|
+ <div id="moe-form-mask" style="background: rgba(0, 0, 0, .1) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 99; width: 100%; height: 100%; display: none;">
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <nav class="navbar navbar-expand-md navbar-dark stag-primary-bg py-1">
|
|
|
+ <a class="navbar-brand" href="">Scholar</a>
|
|
|
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navBar" aria-controls="navBar" aria-expanded="false" aria-label="Toggle navigation">
|
|
|
+ <span class="navbar-toggler-icon"></span>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <div class="collapse navbar-collapse" id="navBar">
|
|
|
+ <ul class="navbar-nav mr-auto">
|
|
|
+
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a href="#" class="stag_rhs_toggle d-none d-md-block" title="Toggle Video Pane">
|
|
|
+ <i class="fa fa-arrow-right"></i>
|
|
|
+ </a>
|
|
|
+ </nav>
|
|
|
+
|
|
|
+ <main role="main" class="stag-content px-0">
|
|
|
+
|
|
|
+ @yield('content')
|
|
|
+
|
|
|
+ </main><!-- /.container -->
|
|
|
+
|
|
|
+ <!-- shortcut/suggest component -->
|
|
|
+ <link href="/css/shortcut.css" rel=stylesheet>
|
|
|
+ <script src="/js/shortcut.js" type="application/javascript"></script>
|
|
|
+
|
|
|
+ <!-- script to handle history/back/forward for mc/xxx pages
|
|
|
+ + all other JS initialization needed in fastLoaded pages -->
|
|
|
+ <script src="/js/find-event-handlers.js" type="application/javascript"></script>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ window.noMc = true;
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <script src="/js/mc.js?_=4" type="application/javascript"></script>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ $(document).ready(function() {
|
|
|
+ const debounce = (func, wait) => {
|
|
|
+ let timeout;
|
|
|
+ return function executedFunction(...args) {
|
|
|
+ const later = () => {
|
|
|
+ clearTimeout(timeout);
|
|
|
+ func(...args);
|
|
|
+ };
|
|
|
+ clearTimeout(timeout);
|
|
|
+ timeout = setTimeout(later, wait);
|
|
|
+ };
|
|
|
+ };
|
|
|
+ var lastTerm = '';
|
|
|
+ var returnedFunction = debounce(function() {
|
|
|
+ var term = $.trim($('#patient-search').val());
|
|
|
+ if (!!term && lastTerm !== term) {
|
|
|
+ $.get('/patients-suggest?term=' + term, function(_data) {
|
|
|
+ $('.suggestions-outer').html(_data).removeClass('d-none');
|
|
|
+ });
|
|
|
+ lastTerm = term;
|
|
|
+ } else {
|
|
|
+ $('.suggestions-outer').addClass('d-none');
|
|
|
+ }
|
|
|
+ }, 250);
|
|
|
+ $('#patient-search')
|
|
|
+ .on('keydown', function(e) {
|
|
|
+ var term = $.trim($('#patient-search').val());
|
|
|
+ var activeItem = $('.suggestions-outer .suggest-item.active');
|
|
|
+ switch (e.which) {
|
|
|
+ case 27:
|
|
|
+ $('.suggestions-outer').addClass('d-none');
|
|
|
+ return false;
|
|
|
+ case 38:
|
|
|
+ if (activeItem.prev().length) {
|
|
|
+ activeItem.prev()
|
|
|
+ .addClass('active')
|
|
|
+ .siblings().removeClass('active');
|
|
|
+ activeItem = $('.suggestions-outer .suggest-item.active');
|
|
|
+ if (activeItem.length) {
|
|
|
+ activeItem[0].scrollIntoView();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ case 40:
|
|
|
+ if (activeItem.next().length) {
|
|
|
+ activeItem.next()
|
|
|
+ .addClass('active')
|
|
|
+ .siblings().removeClass('active');
|
|
|
+ activeItem = $('.suggestions-outer .suggest-item.active');
|
|
|
+ if (activeItem.length) {
|
|
|
+ activeItem[0].scrollIntoView();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ case 13:
|
|
|
+ if (activeItem.length) {
|
|
|
+ activeItem.first().click();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ default:
|
|
|
+ if (!!term) {
|
|
|
+ $('.suggestions-outer')
|
|
|
+ .html('<span class="d-block no-suggest-items">Searching...</span>')
|
|
|
+ .removeClass('d-none');
|
|
|
+ returnedFunction();
|
|
|
+ } else {
|
|
|
+ $('.suggestions-outer').addClass('d-none');
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .on('keypress', function(e) {
|
|
|
+ var term = $.trim($('#patient-search').val());
|
|
|
+ if (!!term) {
|
|
|
+ $('.suggestions-outer')
|
|
|
+ .html('<span class="d-block no-suggest-items">Searching...</span>')
|
|
|
+ .removeClass('d-none');
|
|
|
+ returnedFunction();
|
|
|
+ } else {
|
|
|
+ $('.suggestions-outer').addClass('d-none');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $(document).on('click', '.suggest-item[data-target-uid]', function() {
|
|
|
+ $('#patient-search').val('');
|
|
|
+ $('.suggestions-outer').addClass('d-none');
|
|
|
+ fastLoad('/patients/view/' + $(this).attr('data-target-uid'), true, false, false);
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ window.setInterval(function() {
|
|
|
+ $.get('/current-work', function(_data) {
|
|
|
+ $('.current-work').html(_data);
|
|
|
+ initFastLoad($('.current-work'));
|
|
|
+ });
|
|
|
+ }, 15000); // once in 15 seconds
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+ <script>
|
|
|
+ function showStagPopup(_key) {
|
|
|
+ $('html, body').addClass('no-scroll');
|
|
|
+ let stagPopup = $('[stag-popup-key="' + _key + '"]');
|
|
|
+ stagPopup.addClass('show');
|
|
|
+ stagPopup.find('[moe][initialized]').removeAttr('initialized');
|
|
|
+ initMoes();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function submitStagPopup(_form) {
|
|
|
+ if(!_form[0].checkValidity()) {
|
|
|
+ _form[0].reportValidity();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ showMask();
|
|
|
+ $.post(_form.attr('action'), _form.serialize(), function(_data) {
|
|
|
+ fastReload();
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function closeStagPopup() {
|
|
|
+ $('.stag-popup').removeClass('show');
|
|
|
+ $('html, body').removeClass('no-scroll');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ (function() {
|
|
|
+ window.initStagPopupEvents = function () {
|
|
|
+ $(document).on('click', '.stag-popup', function(_e) {
|
|
|
+ if($(_e.target).is('.stag-popup')) {
|
|
|
+ closeStagPopup();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ addMCInitializer('stag-popups', window.initStagPopupEvents);
|
|
|
+ })();
|
|
|
+ </script>
|
|
|
+ <script>
|
|
|
+ (function() {
|
|
|
+ window.initAutoRxAndICDComplete = function () {
|
|
|
+ $('input[type="text"][name="ICD"]:not([ac-initialized])').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;
|
|
|
+ });
|
|
|
+ $(elem).attr('ac-initialized', 1);
|
|
|
+ });
|
|
|
+ $('[rx-section] input[type="text"][name="contentText"]:not([ac-initialized])').each(function() {
|
|
|
+ let elem = this,
|
|
|
+ randPart = Math.ceil(Math.random() * 1000000),
|
|
|
+ dynID = 'rx-' + randPart;
|
|
|
+ $(elem).attr('id', dynID);
|
|
|
+ var strengthElem = $(elem).closest('form').find('[name="strength"]')[0],
|
|
|
+ dynStrengthsID = 'rx-' + randPart + '-strengths';
|
|
|
+ $(strengthElem).attr('id', dynStrengthsID);
|
|
|
+ $(strengthElem).attr('rx-id', dynID);
|
|
|
+ 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, '');
|
|
|
+ });
|
|
|
+ $(elem).attr('ac-initialized', 1);
|
|
|
+ });
|
|
|
+ window.rxEditMoeOpened = function() { // note "this" is the "form"
|
|
|
+ let form = $(this),
|
|
|
+ rxElem = form.find('input[type="text"][name="contentText"]').first(),
|
|
|
+ strengthElem = form.find('input[type="text"][name="strength"]').first(),
|
|
|
+ q = $.trim(rxElem.val());
|
|
|
+ if(q !== '') {
|
|
|
+ $.get('https://clinicaltables.nlm.nih.gov/api/rxterms/v3/search?' +
|
|
|
+ 'authenticity_token=' + (window._token || '') + '&' +
|
|
|
+ 'maxList=100&' +
|
|
|
+ 'terms=' + encodeURIComponent(q) + '&' +
|
|
|
+ 'ef=STRENGTHS_AND_FORMS', function(_data) {
|
|
|
+ if(Array.isArray(_data) && _data.length >= 3 && Array.isArray(_data[2]['STRENGTHS_AND_FORMS']) && Array.isArray(_data[2]['STRENGTHS_AND_FORMS'][0])) {
|
|
|
+ strengthElem[0].autocomp.setListAndField(_data[2]['STRENGTHS_AND_FORMS'][0], '', true);
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ addMCInitializer('patient-single', window.initAutoRxAndICDComplete);
|
|
|
+ })();
|
|
|
+ </script>
|
|
|
+
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|