template.blade.php 16 KB

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