template.blade.php 16 KB

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