new-patient.blade.php 15 KB

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