new-patient.blade.php 15 KB

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