template.blade.php 18 KB

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