template.blade.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <!DOCTYPE html>
  2. <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>{{ config('app.name') }}</title>
  7. <!-- Fonts -->
  8. <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
  9. {{-- mc initializers --}}
  10. <script src="/js/mc-init.js"></script>
  11. {{-- vue --}}
  12. <script src="/js/vue.js"></script>
  13. {{-- Quill RTE --}}
  14. <script>
  15. let stagQuillConfig = {
  16. toolbar: ['bold', 'italic', 'underline', { 'list': 'ordered'}, { 'list': 'bullet' }],
  17. keyboard: {
  18. bindings: {
  19. handleEnter: {
  20. key: 13,
  21. handler: function() {
  22. if(!$('.stag-shortcuts:visible').length) return true;
  23. }
  24. }
  25. }
  26. }
  27. };
  28. </script>
  29. <link href="/quill/quill.snow.css" rel="stylesheet">
  30. <script src="/quill/quill.js"></script>
  31. <!-- <link href="{{ asset('bootstrap-4.5.0/css/bootstrap.css') }}" rel="stylesheet"> -->
  32. <link rel="stylesheet" href="/fontawesome-free-5.13.1-web/css/all.min.css">
  33. <link href="{{ asset('/css/app.css') }}" rel="stylesheet">
  34. <link href="{{ asset('/css/style.css') }}" rel="stylesheet">
  35. <link href="{{ asset('/css/yemi.css') }}" rel="stylesheet">
  36. <link rel="stylesheet" href="{{ asset('/css/toastr.min.css') }}">
  37. <link href="{{asset('/css/z.css')}}" rel=stylesheet>
  38. <!-- Styles -->
  39. <script src="{{ asset('js/app.js') }}" type="application/javascript"></script>
  40. <script src="/js/jquery-3.5.1.min.js"></script>
  41. <script src="/js/jquery.form.min.js"></script>
  42. <script src="{{ asset('js/toastr.min.js') }}" type="application/javascript"></script>
  43. <script src="/js/yemi.js?_=7" type="application/javascript"></script>
  44. {{-- med ac --}}
  45. <link href='/css/autocomplete-lhc.min.css' rel="stylesheet">
  46. <script src='/js/autocomplete-lhc.js'></script>
  47. {{-- inline bootstrap datepicker --}}
  48. <link href='/bootstrap-datepicker/css/bootstrap-datepicker.min.css' rel="stylesheet">
  49. <script src='/bootstrap-datepicker/js/bootstrap-datepicker.min.js'></script>
  50. {{-- pdfjs --}}
  51. <script src="https://mozilla.github.io/pdf.js/build/pdf.js"></script>
  52. @yield('head')
  53. </head>
  54. <body>
  55. <div id="mask" style="background: rgba(0, 0, 0, 0) url(&quot;/vanillaspin.gif&quot;) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 9999; width: 100%; height: 100%; display: none;">
  56. </div>
  57. <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: 97; width: 100%; height: 100%; display: none;">
  58. </div>
  59. <nav class="navbar navbar-expand-md navbar-dark stag-primary-bg py-1">
  60. <a class="navbar-brand" href="{{ route('dashboard') }}">Scholar</a>
  61. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navBar" aria-controls="navBar" aria-expanded="false" aria-label="Toggle navigation">
  62. <span class="navbar-toggler-icon"></span>
  63. </button>
  64. <div class="collapse navbar-collapse" id="navBar">
  65. <ul class="navbar-nav mr-auto">
  66. <li class="nav-item"><a class="nav-link" href="{{ route('dashboard') }}"><i class="mr-1 fas fa-tachometer-alt"></i> Dashboard</a> </li>
  67. <li class="nav-item"><a class="nav-link" href="{{ route('patients') }}"><i class="mr-1 fas fa-user-injured"></i> Patients</a> </li>
  68. @if($pro && $pro->pro_type == 'ADMIN')
  69. <li class="nav-item"><a class="nav-link" href="{{ route('new-patient') }}"><i class="mr-1 fas fa-user-plus"></i> New Patient</a> </li>
  70. @endif
  71. <li class="nav-item dropdown">
  72. <a class="nav-link dropdown-toggle" href="#" id="practice-management" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="mr-1 fas fa-tasks"></i> Practice</a>
  73. <div class="dropdown-menu" aria-labelledby="practice-management">
  74. {{--<a class="dropdown-item" href="{{ route('practice-management.dashboard') }}">Dashboard</a>--}}
  75. @if($pro && $pro->pro_type == 'ADMIN')
  76. <a class="dropdown-item" href="/practice-management/rates/all">Payment Rates</a>
  77. @endif
  78. {{--<a class="dropdown-item" href="{{ route('practice-management.previousBills') }}">Previous Bills</a>--}}
  79. <a class="dropdown-item" href="{{ route('practice-management.financialTransactions') }}">Financial Transactions</a>
  80. <a class="dropdown-item" href="/practice-management/bills/not-yet-signed">Pending Bills to Sign</a>
  81. <a class="dropdown-item" href="/practice-management/notes/not-yet-signed">Pending Notes to Sign</a>
  82. <a class="dropdown-item" href="{{ route('unmapped-sms') }}">Unmapped SMS</a>
  83. {{--<a class="dropdown-item" href="/practice-management/hr">HR</a>--}}
  84. <a class="dropdown-item" href="{{ route('practice-management.myTextShortcuts') }}">My Text Shortcuts</a>
  85. <a class="dropdown-item" href="{{ route('practice-management.proAvailability') }}">Pro Availability</a>
  86. <a class="dropdown-item" href="{{ route('practice-management.proCalendar') }}">Pro Calendar</a>
  87. </div>
  88. </li>
  89. </ul>
  90. {{-- if pro is working on a client and is not in tht client --}}
  91. <div class="current-work mr-2">
  92. @include('app/current-work')
  93. </div>
  94. <a href="#" class="mr-2 text-white small" onclick="fastReload()"><i class="fa fa-sync"></i></a>
  95. <div class="d-inline-flex pr-2 mcp-theme-1 position-relative">
  96. <input id="patient-search" type="search" class="form-control form-control-sm outline-0" autocomplete="off" placeholder="Search Patients">
  97. <div class="suggestions-outer position-absolute d-none">
  98. </div>
  99. </div>
  100. <div class="d-flex align-items-center">
  101. <p class="text-white my-0 small">Hi, <b title="Cell# {{$pro->cell_number}}">{{ $pro->name_first }}!</b></p>
  102. <a native target="_top" href="{{route('logout')}}" class="small text-white ml-2">
  103. <i class="fas fa-sign-out-alt"></i>
  104. Log Out
  105. </a>
  106. </div>
  107. @if($pro->pro_type == 'ADMIN')
  108. <div class="ml-1 d-inline-block text-secondary">|</div>
  109. <div class="d-flex align-items-center">
  110. <a href="{{route('log-in-as')}}" native target="_top" class="small text-white ml-1">Log In As</a>
  111. </div>
  112. @endif
  113. @if($performer->logged_in_as_pro_from_admin_pro_app_session_id)
  114. <div class="ml-1 d-inline-block text-secondary">|</div>
  115. <form action="{{route('back-to-admin-pro')}}" method="post" target="_top">
  116. @csrf
  117. <button class="small text-white ml-1">
  118. <span class="small"></span>Admin
  119. </button>
  120. </form>
  121. @endif
  122. @if($pro->pro_type == 'ADMIN')
  123. <div class="ml-1 d-inline-block text-secondary">|</div>
  124. <a native target="_top" class="small text-white ml-1" href="{{config('stag.adminPortalUrl')}}/pro_log_in_with_session_key/{{$performer->session_key}}" title="">
  125. Admin
  126. </a>
  127. @endif
  128. </div>
  129. <a href="#" class="stag_rhs_toggle d-none d-md-block" title="Toggle Video Pane">
  130. <i class="fa fa-arrow-right"></i>
  131. </a>
  132. </nav>
  133. <main role="main" class="stag-content px-0">
  134. @yield('content')
  135. </main><!-- /.container -->
  136. <!-- shortcut/suggest component -->
  137. <link href="/css/shortcut.css" rel=stylesheet>
  138. <script src="/js/shortcut.js" type="application/javascript"></script>
  139. <!-- script to handle history/back/forward for mc/xxx pages
  140. + all other JS initialization needed in fastLoaded pages -->
  141. <script src="/js/find-event-handlers.js" type="application/javascript"></script>
  142. <script src="/js/mc.js?_=4" type="application/javascript"></script>
  143. <form url="/api/proTextShortcut/create" id="create-shortcut-form" class="mcp-theme-1">
  144. <input type="hidden" name="proUid" value="{{ $pro->uid }}">
  145. <div class="mb-2">
  146. <input type="text" class="form-control form-control-sm" name="shortcut" value="" placeholder="Shortcut Name" required>
  147. </div>
  148. <div class="mb-2">
  149. <textarea name="text" class="form-control form-control-sm" rows="3" id="selected-sc-text" placeholder="Content" required></textarea>
  150. </div>
  151. <div class="mb-0">
  152. <button class="btn btn-primary btn-sm" type="submit">Save</button>
  153. <button class="btn btn-default border btn-sm ml-1" type="reset">Cancel</button>
  154. </div>
  155. </form>
  156. <script>
  157. $(document).ready(function() {
  158. const debounce = (func, wait) => {
  159. let timeout;
  160. return function executedFunction(...args) {
  161. const later = () => {
  162. clearTimeout(timeout);
  163. func(...args);
  164. };
  165. clearTimeout(timeout);
  166. timeout = setTimeout(later, wait);
  167. };
  168. };
  169. var lastTerm = '';
  170. var returnedFunction = debounce(function() {
  171. var term = $.trim($('#patient-search').val());
  172. if (!!term && lastTerm !== term) {
  173. $.get('/patients-suggest?term=' + term, function(_data) {
  174. $('.suggestions-outer').html(_data).removeClass('d-none');
  175. });
  176. lastTerm = term;
  177. } else {
  178. $('.suggestions-outer').addClass('d-none');
  179. }
  180. }, 250);
  181. $('#patient-search')
  182. .on('keydown', function(e) {
  183. var activeItem = $('.suggestions-outer .suggest-item.active');
  184. switch (e.which) {
  185. case 27:
  186. $('.suggestions-outer').addClass('d-none');
  187. return false;
  188. case 38:
  189. if (activeItem.prev().length) {
  190. activeItem.prev()
  191. .addClass('active')
  192. .siblings().removeClass('active');
  193. activeItem = $('.suggestions-outer .suggest-item.active');
  194. if (activeItem.length) {
  195. activeItem[0].scrollIntoView();
  196. }
  197. }
  198. return false;
  199. case 40:
  200. if (activeItem.next().length) {
  201. activeItem.next()
  202. .addClass('active')
  203. .siblings().removeClass('active');
  204. activeItem = $('.suggestions-outer .suggest-item.active');
  205. if (activeItem.length) {
  206. activeItem[0].scrollIntoView();
  207. }
  208. }
  209. return false;
  210. case 13:
  211. if (activeItem.length) {
  212. activeItem.first().click();
  213. }
  214. return false;
  215. default:
  216. window.setTimeout(onQueryChange, 50);
  217. break;
  218. }
  219. })
  220. .on('keypress paste', function(e) {
  221. window.setTimeout(onQueryChange, 50);
  222. });
  223. function onQueryChange() {
  224. var term = $.trim($('#patient-search').val());
  225. if (!!term) {
  226. $('.suggestions-outer')
  227. .html('<span class="d-block no-suggest-items">Searching...</span>')
  228. .removeClass('d-none');
  229. returnedFunction();
  230. } else {
  231. $('.suggestions-outer').addClass('d-none');
  232. }
  233. }
  234. $(document).on('click', '.suggest-item[data-target-uid]', function() {
  235. $('#patient-search').val('');
  236. $('.suggestions-outer').addClass('d-none');
  237. fastLoad('/patients/view/' + $(this).attr('data-target-uid'), true, false, false);
  238. return false;
  239. });
  240. window.setInterval(function() {
  241. $.get('/current-work', function(_data) {
  242. $('.current-work').html(_data);
  243. initFastLoad($('.current-work'));
  244. });
  245. }, 15000); // once in 15 seconds
  246. });
  247. </script>
  248. <script>
  249. function showStagPopup(_key) {
  250. $('html, body').addClass('no-scroll');
  251. let stagPopup = $('[stag-popup-key="' + _key + '"]');
  252. stagPopup.addClass('show');
  253. stagPopup.find('[moe][initialized]').removeAttr('initialized');
  254. initMoes();
  255. window.setTimeout(function() {
  256. stagPopup.find('input[type="text"]:not([readonly]):visible,select:visible').first().focus();
  257. }, 150);
  258. return false;
  259. }
  260. function submitStagPopup(_form) {
  261. if(!_form[0].checkValidity()) {
  262. _form[0].reportValidity();
  263. return false;
  264. }
  265. showMask();
  266. $.post(_form.attr('action'), _form.serialize(), function(_data) {
  267. fastReload();
  268. });
  269. return false;
  270. }
  271. function closeStagPopup() {
  272. $('.stag-popup').removeClass('show');
  273. $('html, body').removeClass('no-scroll');
  274. return false;
  275. }
  276. (function() {
  277. window.initStagPopupEvents = function () {
  278. $(document).on('click', '.stag-popup', function(_e) {
  279. if($(_e.target).is('.stag-popup')) {
  280. closeStagPopup();
  281. }
  282. });
  283. // catch ESC and discard any visible popups
  284. $(document)
  285. .off('keydown.stag-popup-escape')
  286. .on('keydown.stag-popup-escape', function (e) {
  287. if(e.which === 27) {
  288. let visiblePopups = $('.stag-popup.show');
  289. if (visiblePopups.length) {
  290. closeStagPopup();
  291. return false;
  292. }
  293. }
  294. });
  295. }
  296. addMCInitializer('stag-popups', window.initStagPopupEvents);
  297. })();
  298. </script>
  299. <script>
  300. (function() {
  301. window.initAutoRxAndICDComplete = function () {
  302. $('input[type="text"][name="ICD"]:not([ac-initialized])').each(function() {
  303. var elem = this,
  304. dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
  305. $(elem).attr('id', dynID);
  306. new window.Def.Autocompleter.Search(dynID,
  307. 'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&ef=name', {
  308. tableFormat: true,
  309. valueCols: [0],
  310. colHeaders: ['Code', 'Name'],
  311. }
  312. );
  313. window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
  314. var autocomp = elem.autocomp;
  315. var name = autocomp.getSelectedItemData()[0].data['name'];
  316. $(elem).closest('form').find('[name="contentText"]').val(name);
  317. return false;
  318. });
  319. $(elem).attr('ac-initialized', 1);
  320. });
  321. $('[rx-section] input[type="text"][name="contentText"]:not([ac-initialized])').each(function() {
  322. let elem = this,
  323. randPart = Math.ceil(Math.random() * 1000000),
  324. dynID = 'rx-' + randPart;
  325. $(elem).attr('id', dynID);
  326. var strengthElem = $(elem).closest('form').find('[name="strength"]')[0],
  327. dynStrengthsID = 'rx-' + randPart + '-strengths';
  328. $(strengthElem).attr('id', dynStrengthsID);
  329. $(strengthElem).attr('rx-id', dynID);
  330. new window.Def.Autocompleter.Prefetch(dynStrengthsID, []);
  331. new window.Def.Autocompleter.Search(dynID,
  332. 'https://clinicaltables.nlm.nih.gov/api/rxterms/v3/search?ef=STRENGTHS_AND_FORMS');
  333. window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
  334. var autocomp = elem.autocomp;
  335. var strengths =
  336. autocomp.getSelectedItemData()[0].data['STRENGTHS_AND_FORMS'];
  337. if (strengths)
  338. strengthElem.autocomp.setListAndField(strengths, '');
  339. });
  340. $(elem).attr('ac-initialized', 1);
  341. });
  342. window.rxEditMoeOpened = function() { // note "this" is the "form"
  343. let form = $(this),
  344. rxElem = form.find('input[type="text"][name="contentText"]').first(),
  345. strengthElem = form.find('input[type="text"][name="strength"]').first(),
  346. q = $.trim(rxElem.val());
  347. if(q !== '') {
  348. $.get('https://clinicaltables.nlm.nih.gov/api/rxterms/v3/search?' +
  349. 'authenticity_token=' + (window._token || '') + '&' +
  350. 'maxList=100&' +
  351. 'terms=' + encodeURIComponent(q) + '&' +
  352. 'ef=STRENGTHS_AND_FORMS', function(_data) {
  353. if(Array.isArray(_data) && _data.length >= 3 && Array.isArray(_data[2]['STRENGTHS_AND_FORMS']) && Array.isArray(_data[2]['STRENGTHS_AND_FORMS'][0])) {
  354. strengthElem[0].autocomp.setListAndField(_data[2]['STRENGTHS_AND_FORMS'][0], '', true);
  355. }
  356. }, 'json');
  357. }
  358. }
  359. }
  360. addMCInitializer('patient-single', window.initAutoRxAndICDComplete);
  361. })();
  362. </script>
  363. @include('app/pdf/viewer')
  364. </body>
  365. </html>