new-patient.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. @extends ('layouts.template')
  2. @section('content')
  3. <?php
  4. $patients = [1,2,3,4];
  5. $medicaidStates = Config::get('constants.medicaid_states');
  6. ?>
  7. <div class="p-3 mcp-theme-1" id="newPatientContainer" v-cloak>
  8. <div class="col-12 col-lg-6 px-0">
  9. <div class="card d-block mb-3" moe="">
  10. <div class="card-header">
  11. <strong>
  12. <i class="fas fa-user-plus"></i>
  13. New Patient
  14. </strong>
  15. </div>
  16. <div class="card-body">
  17. <form show url="/api/client/create" class="px-2 pb-1 primary-form" redir="patients/view/[data]">
  18. @if (session('message'))
  19. <div class="alert alert-danger">{{ session('message') }}</div>
  20. @endif
  21. <div class="row">
  22. <div class="col-md-12 bg-light p-3 mb-2">
  23. <h5 class="m-0 font-weight-bold">Patient Name / Demographics:</h5>
  24. </div>
  25. <div class="form-group col-md-4">
  26. <label class="control-label">First Name <span class="text-danger">*</span> </label>
  27. <input type="text" required name="patientNameFirst" value="" class="form-control input-sm">
  28. </div>
  29. <div class="form-group col-md-4">
  30. <label class="control-label">Middle Name / MI</label>
  31. <input type="text" name="patientNameMiddle" value="" class="form-control input-sm">
  32. </div>
  33. <div class="form-group col-md-4">
  34. <label class="control-label">Last Name <span class="text-danger">*</span></label>
  35. <input type="text" required name="patientNameLast" value="" class="form-control input-sm">
  36. </div>
  37. <div class="form-group col-md-4">
  38. <label class="control-label">Prefix</label>
  39. <input type="text" name="patientNamePrefix" value="" class="form-control input-sm">
  40. </div>
  41. <div class="form-group col-md-4">
  42. <label class="control-label">Suffix</label>
  43. <input type="text" name="patientNameSuffix" value="" class="form-control input-sm">
  44. </div>
  45. <div class="form-group col-md-4">
  46. <label class="control-label">Sex</label>
  47. <select class="form-control input-sm" name="patientSex" select2>
  48. <option value="">--</option>
  49. <option value="M">Male</option>
  50. <option value="F">Female</option>
  51. <option value="UNKNOWN">Unknown</option>
  52. </select>
  53. </div>
  54. <div class="form-group col-md-6">
  55. <label class="control-label">Date of Birth <span class="text-danger">*</span></label>
  56. <input type="date" required name="patientDob" value="" class="form-control input-sm">
  57. </div>
  58. <div class="form-group col-md-6">
  59. <label class="control-label">Date Of Service</label>
  60. <input type="date" name="dateOfService" value="{{date('Y-m-d')}}" class="form-control input-sm">
  61. </div>
  62. </div>
  63. @if($pro->pro_type === 'ADMIN')
  64. <div class='form-group mb-3'>
  65. <label class='control-label'>HCP Pro</label>
  66. <select name="hcpProUid" class="form-control" provider-search provider-type="hcp">
  67. <option value="">--select--</option>
  68. </select>
  69. </div>
  70. <div class='form-group mb-3'>
  71. <label class='control-label'>Care Coordinator</label>
  72. <select name="assistantProUid" class="form-control" provider-search provider-type="default-na">
  73. <option value="">--select--</option>
  74. </select>
  75. </div>
  76. @elseif($pro->is_hcp === true)
  77. <div class='form-group mb-3'>
  78. <label class='control-label'>HCP Pro</label>
  79. <input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
  80. <input type="hidden" name="hcpProUid" value="{{$pro->uid}}">
  81. </div>
  82. @elseif($pro->isDefaultNA())
  83. <div class='form-group mb-3'>
  84. <label class='control-label'>HCP Pro</label>
  85. <?php $teams = $pro->teamsWhereAssistant; ?>
  86. <select name="hcpProUid" class="form-control">
  87. <option value="">--select--</option>
  88. @foreach($teams as $team)
  89. <option value="{{$team->mcp->uid}}">{{$team->mcp->displayName()}}</option>
  90. @endforeach
  91. </select>
  92. </div>
  93. <div class='form-group mb-3'>
  94. <label class='control-label'>Care Coordinator</label>
  95. <input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
  96. <input type="hidden" name="assistantProUid" value="{{$pro->uid}}">
  97. </div>
  98. @endif
  99. <div class='form-group mb-3'>
  100. <label class='control-label d-flex align-items-center'>
  101. <span>Home Phone Number</span>
  102. <a href="#"
  103. class="ml-2 px-1 on-hover-opaque hpn-to-cpn">
  104. <i class="fa fa-arrow-down"></i>
  105. </a>
  106. <a href="#"
  107. class="ml-2 px-1 on-hover-opaque swap-pns">
  108. <i class="fa fa-retweet"></i>
  109. </a>
  110. </label>
  111. <input class='form-control' stag-input-phone type='tel' name='homeNumber'>
  112. </div>
  113. <div class='form-group mb-3'>
  114. <label class='control-label d-flex align-items-center'>
  115. <span>Cell Phone Number</span>
  116. <a href="#"
  117. class="ml-2 px-1 on-hover-opaque cpn-to-hpn">
  118. <i class="fa fa-arrow-up"></i>
  119. </a>
  120. </label>
  121. <input class='form-control' stag-input-phone type='tel' name='cellNumber'>
  122. </div>
  123. <div class='form-group mb-3'>
  124. <label class='control-label'>Email Address </label>
  125. <input class='form-control' type='email' name='emailAddress'>
  126. </div>
  127. <hr class="m-neg-4">
  128. <div class="row">
  129. <div class="form-group col-md-12">
  130. <p class="mb-1 font-weight-bold">Type of insurance card:</p>
  131. <div class="form-check form-check-inline">
  132. <label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="MEDICARE">Medicare Part B (Primary)</label>
  133. </div>
  134. <div class="form-check form-check-inline">
  135. <label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="MEDICAID">Medicaid (Primary)</label>
  136. </div>
  137. <div class="form-check form-check-inline">
  138. <label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="COMMERCIAL">Commercial / Third Party (Primary)</label>
  139. </div>
  140. </div>
  141. </div>
  142. <div class="row" v-show="planType == 'COMMERCIAL'">
  143. <div class="form-group col-md-12">
  144. <label for="" class="control-label">Commercial Payer</label>
  145. <input name="commercialPayerUidSuggest" class="form-control input-sm" value="" stag-suggest stag-suggest-ep="/search-payer/json" />
  146. <input type="hidden" name="commercialPayerUid" />
  147. </div>
  148. <div class="form-group col-md-6">
  149. <label class="control-label">Patient Member Identifier</label>
  150. <input type="text" name="commercialMemberIdentifier" class="form-control input-sm">
  151. </div>
  152. <div class="form-group col-md-6">
  153. <label class="control-label">Patient Group Number</label>
  154. <input type="text" name="commercialGroupNumber" class="form-control input-sm">
  155. </div>
  156. </div>
  157. <div class="row">
  158. <div class="form-group col-md-12" v-if="planType == 'MEDICAID' || planType == 'COMMERCIAL'">
  159. <div class="form-check form-check-inline">
  160. <label class="form-check-label"><input class="form-check-input" type="checkbox" name="isPatientSubscriber" v-model="isPatientSubscriber">Is Patient The Subscriber?</label>
  161. </div>
  162. </div>
  163. </div>
  164. <div v-if="!isPatientSubscriber && (planType == 'MEDICAID' || planType == 'COMMERCIAL')" class="row">
  165. <div class="col-md-12 bg-light p-3 mb-2">
  166. <h5 class="m-0 font-weight-bold">Subscriber Details:</h5>
  167. </div>
  168. <div class="form-group col-md-4">
  169. <label class="control-label">Subscriber First Name</label>
  170. <input type="text" name="subscriberNameFirst" value="" class="form-control input-sm">
  171. </div>
  172. <div class="form-group col-md-4">
  173. <label class="control-label">Subscriber Middle Name / MI</label>
  174. <input type="text" name="subscriberNameMiddle" value="" class="form-control input-sm">
  175. </div>
  176. <div class="form-group col-md-4">
  177. <label class="control-label">Subscriber Last Name</label>
  178. <input type="text" name="subscriberNameLast" value="" class="form-control input-sm">
  179. </div>
  180. <div class="form-group col-md-4">
  181. <label class="control-label">Subscriber Suffix</label>
  182. <input type="text" name="subscriberNameSuffix" value="" class="form-control input-sm">
  183. </div>
  184. <div class="form-group col-md-4">
  185. <label class="control-label">Subscriber Sex</label>
  186. <select class="form-control input-sm" name="subscriberSex">
  187. <option value="">--</option>
  188. <option value="M">Male</option>
  189. <option value="F">Female</option>
  190. <option value="UNKNOWN">Unknown</option>
  191. </select>
  192. </div>
  193. <div class="form-group col-md-4">
  194. <label class="control-label">Subscriber Dob</label>
  195. <input type="date" name="subscriberDob" value="" class="form-control input-sm">
  196. </div>
  197. <div class="form-group col-md-12">
  198. <label class="control-label">What is the patient's relationship to the subscriber?</label>
  199. <select name="patientRelationshipToSubscriber" class="form-control input-sm">
  200. <option value="">--</option>
  201. <option value="SPOUSE">Spouse</option>
  202. <option value="CHILD">Child</option>
  203. <option value="EMPLOYEE">Employee</option>
  204. <option value="ORGAN_DONOR">Organ Donor</option>
  205. <option value="CADAVER_DONOR">Cadaver Donor</option>
  206. <option value="LIFE_PARTNER">Life Partner</option>
  207. <option value="OTHER_RELATIONSHIP">Other Relationship</option>
  208. <option value="UNKNOWN">Unknown</option>
  209. </select>
  210. </div>
  211. </div>
  212. <div class="mb-1" v-if="planType == 'COMMERCIAL'">
  213. <p>Does the patient also have either a Medicare or Medicaid #? (optional)</p>
  214. </div>
  215. <div class="row" v-if="planType == 'MEDICAID' || planType == 'COMMERCIAL'">
  216. <div class="col-md-12 bg-light p-3 mb-2">
  217. <h5 class="m-0 font-weight-bold">Medicaid Information:</h5>
  218. </div>
  219. <div class="form-group col-md-6">
  220. <label for="" class="control-label">Medicaid State</label>
  221. <input class="form-control input-sm" list="mcdPayer" name="mcdPayerName" id="mcdPayerName">
  222. <datalist id="mcdPayer">
  223. <option value="">--</option>
  224. <option>MEDICAID ALABAMA</option>
  225. <option>MEDICAID ALASKA</option>
  226. <option>MEDICAID ARIZONA</option>
  227. <option>MEDICAID ARKANSAS</option>
  228. <option>MEDICAID CALIFORNIA MEDI-CAL</option>
  229. <option>MEDICAID COLORADO</option>
  230. <option>MEDICAID CONNECTICUT</option>
  231. <option>MEDICAID DELAWARE</option>
  232. <option>MEDICAID DISTRICT OF COLUMBIA</option>
  233. <option>MEDICAID FLORIDA</option>
  234. <option>MEDICAID GEORGIA</option>
  235. <option>MEDICAID HAWAII</option>
  236. <option>MEDICAID IDAHO</option>
  237. <option>MEDICAID ILLINOIS</option>
  238. <option>MEDICAID INDIANA</option>
  239. <option>MEDICAID IOWA</option>
  240. <option>MEDICAID KANSAS</option>
  241. <option>MEDICAID KENTUCKY</option>
  242. <option>MEDICAID LOUISIANA</option>
  243. <option>MEDICAID MAINE</option>
  244. <option>MEDICAID MARYLAND</option>
  245. <option>MEDICAID MARYLAND DHMH</option>
  246. <option>MEDICAID MASSACHUSETTS</option>
  247. <option>MEDICAID MICHIGAN</option>
  248. <option>MEDICAID MINNESOTA</option>
  249. <option>MEDICAID MISSISSIPPI</option>
  250. <option>MEDICAID MISSISSIPPI</option>
  251. <option>MEDICAID MISSOURI</option>
  252. <option>MEDICAID MONTANA</option>
  253. <option>MEDICAID NEBRASKA</option>
  254. <option>MEDICAID NEVADA</option>
  255. <option>MEDICAID NEW HAMPSHIRE</option>
  256. <option>MEDICAID NEW JERSEY</option>
  257. <option>MEDICAID NEW MEXICO</option>
  258. <option>MEDICAID NEW YORK</option>
  259. <option>MEDICAID NEW YORK</option>
  260. <option>MEDICAID NORTH CAROLINA</option>
  261. <option>MEDICAID NORTH DAKOTA</option>
  262. <option>MEDICAID OHIO</option>
  263. <option>MEDICAID OKLAHOMA</option>
  264. <option>MEDICAID OREGON</option>
  265. <option>MEDICAID OREGON (DHS OMAP)</option>
  266. <option>MEDICAID PENNSYLVANIA</option>
  267. <option>MEDICAID RHODE ISLAND</option>
  268. <option>MEDICAID SOUTH CAROLINA</option>
  269. <option>MEDICAID SOUTH DAKOTA</option>
  270. <option>MEDICAID TENNESSEE</option>
  271. <option>MEDICAID TEXAS</option>
  272. <option>MEDICAID TEXAS AND TEXAS HEALTH STEPS</option>
  273. <option>MEDICAID UTAH</option>
  274. <option>MEDICAID VERMONT</option>
  275. <option>MEDICAID VIRGINIA</option>
  276. <option>MEDICAID WASHINGTON (PROVIDER ONE)</option>
  277. <option>MEDICAID WEST VIRGINIA</option>
  278. <option>MEDICAID WISCONSIN</option>
  279. <option>MEDICAID WYOMING</option>
  280. </datalist>
  281. </div>
  282. <div class="form-group col-md-6">
  283. <label class="control-label">Medicaid Number</label>
  284. <input type="text" name="mcdNumber" class="form-control input-sm">
  285. </div>
  286. </div>
  287. <div class="row" v-if="planType == 'MEDICARE' || planType == 'COMMERCIAL'">
  288. <div class="col-md-12 bg-light p-3 mb-2">
  289. <h5 class="m-0 font-weight-bold">Medicare Information:</h5>
  290. </div>
  291. <div class="form-group col-md-6">
  292. <label class="control-label">Medicare Number</label>
  293. <input type="text" name="mcrNumber" class="form-control input-sm">
  294. </div>
  295. </div>
  296. <hr class="m-neg-4">
  297. <div class='form-group mb-3'>
  298. <label class='control-label'>How did you hear about us?</label>
  299. <textarea class='form-control' type='text' required="" name='initiative'></textarea>
  300. </div>
  301. </form>
  302. </div>
  303. <div class="card-footer">
  304. <button class="btn btn-primary" submit>Create New Patient</button>
  305. </div>
  306. </div>
  307. </div>
  308. </div>
  309. <link href="/select2/select2.min.css" rel="stylesheet" />
  310. <script src="/select2/select2.min.js"></script>
  311. <script src="/inputmask-5.x/dist/inputmask.js"></script>
  312. <script>
  313. (function() {
  314. function init() {
  315. let im = new Inputmask("(999) 999-9999").mask('[stag-input-phone]');
  316. $(document)
  317. .off('click.hpn-to-cpn', '.hpn-to-cpn')
  318. .on('click.hpn-to-cpn', '.hpn-to-cpn', function() {
  319. $('[name="cellNumber"]').val($('[name="homeNumber"]').val());
  320. $('[name="homeNumber"]').val('');
  321. return false;
  322. });
  323. $(document)
  324. .off('click.cpn-to-hpn', '.cpn-to-hpn')
  325. .on('click.cpn-to-hpn', '.cpn-to-hpn', function() {
  326. $('[name="homeNumber"]').val($('[name="cellNumber"]').val());
  327. $('[name="cellNumber"]').val('');
  328. return false;
  329. });
  330. $(document)
  331. .off('click.swap-pns', '.swap-pns')
  332. .on('click.swap-pns', '.swap-pns', function() {
  333. let hpn = $('[name="homeNumber"]').val();
  334. $('[name="homeNumber"]').val($('[name="cellNumber"]').val());
  335. $('[name="cellNumber"]').val(hpn);
  336. return false;
  337. });
  338. $(document)
  339. .off('change.insurance', '.insurance')
  340. .on('change.insurance', '.insurance', function() {
  341. $('[data-insurance]').addClass('d-none');
  342. $('[data-insurance="' + $(this).val() + '"]').removeClass('d-none');
  343. $(this).closest('form').attr('url', '/api/client/' + ($(this).val() === 'medicare' ? 'create' : 'createNonMcn'))
  344. $(this).closest('[moe]').removeAttr('initialized');
  345. initMoes();
  346. return false;
  347. });
  348. $('.select2').select2({
  349. width: '100%'
  350. });
  351. }
  352. addMCInitializer('new-patient', init, '#newPatientContainer');
  353. }).call(window);
  354. var newPatientContainer = new Vue({
  355. el: '#newPatientContainer',
  356. data: {
  357. planType: 'MEDICARE',
  358. isPatientSubscriber: true
  359. },
  360. methods: {
  361. onCommercialPayerChange: function() {
  362. var input = $('input[name=commercialPayerUidSuggest]');
  363. var hiddenInput = $('input[name=commercialPayerUid]');
  364. input
  365. .off('stag-suggest-selected')
  366. .on('stag-suggest-selected', (e, input, _data) => {
  367. hiddenInput.val(_data.uid);
  368. });
  369. },
  370. init: function() {
  371. this.onCommercialPayerChange();
  372. }
  373. },
  374. mounted: function() {
  375. this.init();
  376. }
  377. });
  378. </script>
  379. @endsection