eyetest-more.blade.php-- 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. <!--- eyetest-more --->
  2. <div class="modal fade" id="modal-eyetest-more" aria-hidden="true" data-backdrop="static" style="z-index: 1050; overflow: auto;">
  3. <div class="modal-dialog m-auto pt-4" style="min-width: 924px;">
  4. <div class="modal-content">
  5. <div class="modal-header bg-black">
  6. <h4 class="modal-title text-white" id="myModalLabel">상세처방</h4>
  7. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fas fa-times"></i></button>
  8. </div>
  9. <div class="modal-body p-2" style="background-color: #f5f5f5;">
  10. <div class="mb-1 text-right" style="margin-top: -5px;">
  11. <div class="btn-group" id="eyetest-more-btn-group">
  12. <button type="button" class="btn btn-sm btn-black eyetest-more-act save-button" data-value="save" {{ $formB['FormVars']['Hidden']['SaveButton'] }}>
  13. {{ $formB['FormVars']['Title']['SaveButton'] }}
  14. </button>
  15. @include('front.dabory.erp.partial.select-btn-options', [
  16. 'selectBtns' => [
  17. [ 'Value' => 'new', 'Caption' => '처방 초기화' ],
  18. [ 'Value' => 'print', 'Caption' => '양안시 처방인쇄' ],
  19. ],
  20. 'color' => 'btn-black',
  21. 'eventClassName' => 'eyetest-more-act',
  22. ])
  23. </div>
  24. </div>
  25. <div class="prescript_detail">
  26. <div class="card input_info mb-0">
  27. <div class="card_inner">
  28. {{-- <div class="row m-0 mb-2 mb-lg-4">--}}
  29. {{-- <button type="button" tabindex="-1" class="btn btn-sm btn-black col-2">--}}
  30. {{-- 처방 초기화--}}
  31. {{-- </button>--}}
  32. {{-- <h1 class="col-6 text-center mb-0">상세처방</h1>--}}
  33. {{-- <div class="col-4 p-0 d-flex">--}}
  34. {{-- <button type="button" tabindex="-1" class="btn btn-sm btn-black col-8 mr-1">--}}
  35. {{-- 양안시 처방인쇄--}}
  36. {{-- </button>--}}
  37. {{-- <button type="button" tabindex="-1" class="btn btn-sm btn-black col" data-dismiss="modal">--}}
  38. {{-- 닫기--}}
  39. {{-- </button>--}}
  40. {{-- </div>--}}
  41. {{-- </div>--}}
  42. <div class="row col-6 mb-1e">
  43. <div class="ml-n2 col-12">
  44. <div>방문이유&주요증상</div>
  45. <textarea id="symptoms-textarea" class="col" style="height: 50px;"></textarea>
  46. </div>
  47. </div>
  48. <fieldset class="scheduler-border">
  49. <legend class="scheduler-border mb-1">구안경도수</legend>
  50. @include('front.dabory.erp.induspex.optical-pos.eyetest-sale.partial.eye-lens-table', [
  51. 'eyeLens' => $formB['EyeTestVars']['Title']['EyeLens'],
  52. 'rightTitle' => 'OD',
  53. 'leftTitle' => 'OS',
  54. 'fixedTabindex' => 50,
  55. 'className' => 'old-eye-lens-table'
  56. ])
  57. </fieldset>
  58. <fieldset class="scheduler-border">
  59. <legend class="scheduler-border mb-1">완전교정도수</legend>
  60. @include('front.dabory.erp.induspex.optical-pos.eyetest-sale.partial.eye-lens-table', [
  61. 'eyeLens' => $formB['EyeTestVars']['Title']['EyeLens'],
  62. 'rightTitle' => 'OD',
  63. 'leftTitle' => 'OS',
  64. 'fixedTabindex' => 100,
  65. 'className' => 'cc-eye-lens-table'
  66. ])
  67. </fieldset>
  68. <fieldset class="scheduler-border">
  69. <legend class="scheduler-border mb-1">처방도수</legend>
  70. @include('front.dabory.erp.induspex.optical-pos.eyetest-sale.partial.eye-lens-table', [
  71. 'eyeLens' => $formB['EyeTestVars']['Title']['EyeLens'],
  72. 'rightTitle' => 'OD',
  73. 'leftTitle' => 'OS',
  74. 'fixedTabindex' => 150,
  75. 'className' => 'px-eye-lens-table'
  76. ])
  77. </fieldset>
  78. <div class="section sec1">
  79. <div class="row m-0 mt-1 r2">
  80. <fieldset class="scheduler-border">
  81. <legend class="scheduler-border mb-1 .col-2">주시안</legend>
  82. <div>
  83. <div>OD <input type="radio" value="0" name="fix_eye"></div>
  84. <div>OS <input type="radio" value="1" name="fix_eye"></div>
  85. </div>
  86. </fieldset>
  87. <fieldset class="scheduler-border">
  88. <legend class="scheduler-border mb-1 .col-2">입체시 검사</legend>
  89. <div>
  90. <div>정상 <input type="radio" value="0" name="stereosia"></div>
  91. <div>이상 <input type="radio" value="1" name="stereosia"></div>
  92. </div>
  93. </fieldset>
  94. <fieldset class="scheduler-border">
  95. <legend class="scheduler-border mb-1 .col-2">색각 검사</legend>
  96. <div>
  97. <div>정상 <input type="radio" value="0" name="color_vision"></div>
  98. <div>이상 <input type="radio" value="1" name="color_vision"></div>
  99. </div>
  100. </fieldset>
  101. <fieldset class="scheduler-border">
  102. <legend class="scheduler-border mb-1">임슬러 그리드 검사</legend>
  103. <div>
  104. <div>OD : <span>정상 <input type="radio" value="0" name="od_im_grid"></span> <span>이상 <input type="radio" value="1" name="od_im_grid"></span></div>
  105. <div>OS : <span>정상 <input type="radio" value="0" name="os_im_grid"></span> <span>이상 <input type="radio" value="1" name="os_im_grid"></span></div>
  106. </div>
  107. </fieldset>
  108. </div>
  109. </div>
  110. <div class="section sec2 screen">
  111. <h3>선별검사</h3>
  112. <div class="row m-0">
  113. <fieldset class="scheduler-border col-4 shielding">
  114. <legend class="scheduler-border mb-1">차폐검사</legend>
  115. <div>
  116. <div>원거리 : <input type="text" class="input_line" id="long-txt"></div>
  117. <div>근거리 : <input type="text" class="input_line" id="short-txt"></div>
  118. </div>
  119. </fieldset>
  120. <fieldset class="scheduler-border col-4 wfd four-dot">
  121. <legend class="scheduler-border mb-1">Worth Four-Dot (억제,복시)</legend>
  122. <div>
  123. <div>
  124. 원거리 :
  125. <span>정상 <input type="radio" name="long" value="0"></span>
  126. <span>억제 <input type="radio" name="long" value="1"> <input type="text" class="input_line" id="long-str-txt"></span>
  127. <span>복시 <input type="radio" name="long" value="2"></span>
  128. </div>
  129. <div>
  130. 근거리 :
  131. <span>정상 <input type="radio" name="short" value="0"></span>
  132. <span>억제 <input type="radio" name="short" value="1"> <input type="text" class="input_line" id="short-str-txt"></span>
  133. <span>복시 <input type="radio" name="short" value="2"></span>
  134. </div>
  135. </div>
  136. </fieldset>
  137. <fieldset class="scheduler-border col-4 eye-close converge">
  138. <legend class="scheduler-border mb-1">눈 모임 근점 검사 (폭주 근점)</legend>
  139. <div>
  140. <div>정상 <input type="radio" name="normal" value="0"></div>
  141. <div>이상 <input type="radio" name="normal" value="1">&nbsp;&nbsp;(약 <input type="text" class="input_line" id="str-txt"> cm)</div>
  142. </div>
  143. </fieldset>
  144. <fieldset class="scheduler-border col-2 near">
  145. <legend class="scheduler-border mb-1">조절 근점 검사</legend>
  146. <div class="justify-content-center">
  147. <div class="flex-1">OD : <input type="text" class="input_line" id="od-str-txt"> cm(100/cm = D)</div>
  148. <div class="flex-1">OS : <input type="text" class="input_line" id="os-str-txt"> cm(100/cm = D)</div>
  149. </div>
  150. </fieldset>
  151. <fieldset class="scheduler-border col-2 easy">
  152. <legend class="scheduler-border mb-1">조절 용이 검사</legend>
  153. <div>
  154. <div>OU : <input type="text" class="input_line" id="ou-str-txt"> cpm</div>
  155. <div>OD : <input type="text" class="input_line" id="od-str-txt"> cpm</div>
  156. <div>OS : <input type="text" class="input_line" id="os-str-txt"> cpm</div>
  157. </div>
  158. </fieldset>
  159. <fieldset class="scheduler-border col-1" id="chief-complaint">
  160. <legend class="scheduler-border mb-1">브로드 H 검사</legend>
  161. <div class="position-relative p-0" id="canvasDiv1" style="background: url('/images/pic.jpg') no-repeat; background-position: 50%;">
  162. <button type="button" tabindex="-1" class="px-0 border border-right-0 border-bottom-0 border-success bg-white position-absolute right-0 bottom-0"
  163. onclick="EyetestMore.clear_canvas()">
  164. <i class="fas fa-eraser px-1"></i>
  165. </button>
  166. </div>
  167. </fieldset>
  168. </div>
  169. </div>
  170. <div class="section sec3 bincular">
  171. <h3>양안시 검사</h3>
  172. <div class="row m-0">
  173. <fieldset class="scheduler-border col-2 add_line location">
  174. <legend class="scheduler-border mb-1">사위 검사</legend>
  175. <div class="flex-flow-column align-items-center justify-content-center">
  176. <div class="stit_c">[원거리]</div>
  177. <div>수평 <input type="text" class="input_line" id="long-hori-txt"> △ / 수직 : <input type="text" class="input_line" id="long-vert-txt"> △</div>
  178. </div>
  179. <div class="flex-flow-column align-items-center justify-content-center ">
  180. <div class="stit_c">[근거리]</div>
  181. <div>수평 <input type="text" class="input_line" id="short-hori-txt"> △ / 수직 : <input type="text" class="input_line" id="short-vert-txt"> △</div>
  182. </div>
  183. </fieldset>
  184. <fieldset class="scheduler-border col-2 add_line relative">
  185. <legend class="scheduler-border mb-1">상대 조절력</legend>
  186. <div class="flex-flow-column align-items-center justify-content-center">
  187. <div class="stit_c">[PRA - 양성]</div>
  188. <div><span class="in_txt"><input type="text" class="input_line" id="pra-txt"></span></div>
  189. </div>
  190. <div class="flex-flow-column align-items-center justify-content-center">
  191. <div class="stit_c">[NRA + 음성]</div>
  192. <div><span class="in_txt_plus in_txt"><input type="text" class="input_line" id="nra-txt"></span></div>
  193. </div>
  194. </fieldset>
  195. <fieldset class="scheduler-border col-2 justify-content-between">
  196. <legend class="scheduler-border mb-1">조절 래그</legend>
  197. <div>
  198. <div><input type="radio" name="lag" value="0">이상 (PL~(-) 방향) < <input type="radio" name="lag" value="1">정상 (+0.50~ +0.75) < <input type="radio" name="lag" value="2">이상 (+1.00~)</div>
  199. </div>
  200. </fieldset>
  201. <fieldset class="scheduler-border col-2 justify-content-center ac-a">
  202. <legend class="scheduler-border mb-1">AC/A 비</legend>
  203. <div>
  204. <div>
  205. <input type="text" class="input_line" id="ac-a-txt">
  206. <em class="txt_info">AC/A비=PD(cm)+(근거리<strong>*사위량</strong>-원거리<strong>*사위량</strong>)÷근거리 조절 자극량<br>
  207. <strong>*외사위(-)│내사위(+)</strong></em>
  208. </div>
  209. </div>
  210. </fieldset>
  211. <fieldset class="scheduler-border d-flex flex-wrap col-1 add_line_lb fusion">
  212. <legend class="scheduler-border mb-1">융합검사</legend>
  213. <div class="flex-column col-2 justify-content-center long-bo">
  214. <div class="stit_l">[원거리 수평융합 - BO(양성융합)]</div>
  215. <ul>
  216. <li>
  217. 흐린점 (<input type="text" class="input_line" id="clo-txt">△)
  218. </li>
  219. <li>
  220. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  221. </li>
  222. <li>
  223. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  224. </li>
  225. </ul>
  226. </div>
  227. <div class="flex-column col-2 justify-content-center long-bi">
  228. <div class="stit_l">[원거리 수평융합 - BI(음성융합)]</div>
  229. <ul>
  230. <li>
  231. 흐린점 (<input type="text" class="input_line" id="clo-txt">△)
  232. </li>
  233. <li>
  234. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  235. </li>
  236. <li>
  237. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  238. </li>
  239. </ul>
  240. </div>
  241. <div class="flex-column col-2 justify-content-center">
  242. <div class="stit_l">[원거리 수직융합 - OD]</div>
  243. <dl class="long-od-bd">
  244. <dt>BD -</dt>
  245. <dd>
  246. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  247. </dd>
  248. <dd>
  249. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  250. </dd>
  251. </dl>
  252. <dl class="long-od-bu">
  253. <dt>BU -</dt>
  254. <dd>
  255. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  256. </dd>
  257. <dd>
  258. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  259. </dd>
  260. </dl>
  261. </div>
  262. <div class="flex-column col-2 justify-content-center">
  263. <div class="stit_l">[원거리 수직융합 - OS]</div>
  264. <dl class="long-os-bd">
  265. <dt>BD -</dt>
  266. <dd>
  267. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  268. </dd>
  269. <dd>
  270. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  271. </dd>
  272. </dl>
  273. <dl class="long-os-bu">
  274. <dt> BU -</dt>
  275. <dd>
  276. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  277. </dd>
  278. <dd>
  279. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  280. </dd>
  281. </dl>
  282. </div>
  283. <div class="flex-column col-2 justify-content-center">
  284. <div class="stit_l">[근거리 수평융합 - BO (양성융합)]</div>
  285. <ul class="short-bo">
  286. <li>흐린점 (<input type="text" class="input_line" id="clo-txt">△)</li>
  287. <li>분리점 (<input type="text" class="input_line" id="dis-txt">△)</li>
  288. <li>회복점 (<input type="text" class="input_line" id="rec-txt">△) </li>
  289. </ul>
  290. </div>
  291. <div class="flex-column col-2 justify-content-center">
  292. <div class="stit_l">[근거리 수평융합 - BI (음성융합)]</div>
  293. <ul class="short-bi">
  294. <li>흐린점 (<input type="text" class="input_line" id="clo-txt">△)</li>
  295. <li>분리점 (<input type="text" class="input_line" id="dis-txt">△)</li>
  296. <li>회복점 (<input type="text" class="input_line" id="rec-txt">△) </li>
  297. </ul>
  298. </div>
  299. <div class="flex-column col-2 justify-content-center ">
  300. <div class="stit_l">[근거리 수직융합 - OD]</div>
  301. <dl class="short-od-bd">
  302. <dt>BD -</dt>
  303. <dd>
  304. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  305. </dd>
  306. <dd>
  307. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  308. </dd>
  309. </dl>
  310. <dl class="short-od-bu">
  311. <dt> BU -</dt>
  312. <dd>
  313. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  314. </dd>
  315. <dd>
  316. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  317. </dd>
  318. </dl>
  319. </div>
  320. <div class="flex-column col-2 justify-content-center">
  321. <div class="stit_l">[근거리 수직융합 - OS]</div>
  322. <dl class="short-os-bd">
  323. <dt>BD -</dt>
  324. <dd>
  325. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  326. </dd>
  327. <dd>
  328. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  329. </dd>
  330. </dl>
  331. <dl class="short-os-bu">
  332. <dt> BU -</dt>
  333. <dd>
  334. 분리점 (<input type="text" class="input_line" id="dis-txt">△)
  335. </dd>
  336. <dd>
  337. 회복점 (<input type="text" class="input_line" id="rec-txt">△)
  338. </dd>
  339. </dl>
  340. </div>
  341. </fieldset>
  342. </div>
  343. </div>
  344. <fieldset class="section border-bottom-0 sec4 pameter">
  345. <h3>개인파라미터</h3>
  346. <div class="row m-0 r1">
  347. <fieldset class="scheduler-border col-4 ml-0 oh">
  348. <legend class="scheduler-border mb-1">피팅 높이 (OH)</legend>
  349. <div>
  350. <div><span>R :</span><input type="text" class="input_line" id="r-txt"> mm</div>
  351. <div><span>L :</span><input type="text" class="input_line" id="l-txt"> mm</div>
  352. </div>
  353. </fieldset>
  354. <fieldset class="scheduler-border col-4 pd">
  355. <legend class="scheduler-border mb-1">단안 PD</legend>
  356. <div>
  357. <div><span>R :</span><input type="text" class="input_line" id="r-txt"> mm</div>
  358. <div><span>L :</span><input type="text" class="input_line" id="l-txt"> mm</div>
  359. </div>
  360. </fieldset>
  361. <fieldset class="scheduler-border col-4 distance">
  362. <legend class="scheduler-border mb-1">정점간 거리</legend>
  363. <div>
  364. <div><span>R :</span><input type="text" class="input_line" id="r-txt"> mm</div>
  365. <div><span>L :</span><input type="text" class="input_line" id="l-txt"> mm</div>
  366. </div>
  367. </fieldset>
  368. <fieldset class="scheduler-border col-4 inset">
  369. <legend class="scheduler-border mb-1">Inset (인셋)</legend>
  370. <div>
  371. <div><span>R :</span><input type="text" class="input_line" id="r-txt"> mm</div>
  372. <div>L : <input type="text" class="input_line" id="l-txt"> mm</div>
  373. </div>
  374. </fieldset>
  375. <fieldset class="scheduler-border col-5">
  376. <legend class="scheduler-border mb-1">안면각</legend>
  377. <div>
  378. <div class="d-flex align-items-start"><input type="text" class="input_line" id="face-txt"> º</div>
  379. </div>
  380. </fieldset>
  381. <fieldset class="scheduler-border col-5">
  382. <legend class="scheduler-border mb-1">경사각</legend>
  383. <div>
  384. <div class="d-flex align-items-start"><input type="text" class="input_line" id="tilt-txt"> º</div>
  385. </div>
  386. </fieldset>
  387. <fieldset class="scheduler-border col-5">
  388. <legend class="scheduler-border mb-1">누진대 길이</legend>
  389. <div>
  390. <div class="d-flex align-items-start"><input type="text" class="input_line" id="length-txt"> mm</div>
  391. </div>
  392. </fieldset>
  393. </div>
  394. </fieldset>
  395. </div>
  396. <!--// card_inner 끝 -->
  397. </div>
  398. <!--// card 끝 -->
  399. </div>
  400. <div class="mb-1 text-right mt-1">
  401. <div class="btn-group" id="eyetest-more-btn-group">
  402. <button type="button" class="btn btn-sm btn-black eyetest-more-act save-button" data-value="save" {{ $formB['FormVars']['Hidden']['SaveButton'] }}>
  403. {{ $formB['FormVars']['Title']['SaveButton'] }}
  404. </button>
  405. @include('front.dabory.erp.partial.select-btn-options', [
  406. 'selectBtns' => [
  407. [ 'Value' => 'new', 'Caption' => '처방 초기화' ],
  408. [ 'Value' => 'print', 'Caption' => '양안시 처방인쇄' ],
  409. ],
  410. 'color' => 'btn-black',
  411. 'eventClassName' => 'eyetest-more-act',
  412. ])
  413. </div>
  414. </div>
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. @once
  420. @push('js')
  421. <script src="/js/utils/canvas.js?{{date('YmdHis')}}"></script>
  422. <script>
  423. $(document).ready(async function() {
  424. $('.eyetest-more-act').on('click', function () {
  425. // console.log($(this).data('value'))
  426. switch( $(this).data('value') ) {
  427. case 'save': btn_act_save('#sorder-tab #frm'); break;
  428. case 'new': EyetestMore.btn_act_new(); break;
  429. }
  430. });
  431. $(document).on('change', '.px-eye-lens-table input, .px-eye-lens-table select', function (e) {
  432. const pre_class_name = '.' + $(e.target).attr('class').split(' ').join('.')
  433. const tr_class_name = '.' + $(e.target).closest('tr').attr('class')
  434. $('.eye-lens-table').find(`${tr_class_name} ${pre_class_name}`).val($(e.target).val())
  435. });
  436. });
  437. $(document).on('show.prescript-detail','#modal-eyetest-more', function () {
  438. // EyetestMore.canvas.clearCanvas()
  439. EyetestMore.resize_canvas()
  440. $('#modal-eyetest-more').modal('show')
  441. });
  442. (function( EyetestMore, $, undefined ) {
  443. EyetestMore.canvas = new Canvas('canvasDiv1', 'canvas');
  444. EyetestMore.btn_act_new = function () {
  445. input_box_reset_for('#modal-eyetest-more .prescript_detail')
  446. input_box_reset_for('#lens-frm .eye-lens-table')
  447. EyetestMore.clear_canvas()
  448. }
  449. EyetestMore.get_parameter = function () {
  450. const $eyetest_more = $('#modal-eyetest-more')
  451. return {
  452. ...EyetestMore.get_eye_lens_data(),
  453. Symptoms: $($eyetest_more).find('#symptoms-textarea').val(),
  454. FixEye: Number(get_radio_value_for($eyetest_more, 'fix_eye')),
  455. Stereosia: Number(get_radio_value_for($eyetest_more, 'stereosia')),
  456. ColorVision: Number(get_radio_value_for($eyetest_more, 'color_vision')),
  457. OdImGrid: Number(get_radio_value_for($eyetest_more, 'od_im_grid')),
  458. OsImGrid: Number(get_radio_value_for($eyetest_more, 'os_im_grid')),
  459. Screen: EyetestMore.get_screen_data($($eyetest_more).find('.screen')),
  460. Bincular: EyetestMore.get_bincular_data($($eyetest_more).find('.bincular')),
  461. Pameter: EyetestMore.get_pameter_data($($eyetest_more).find('.pameter')),
  462. BroadH: EyetestMore.get_broad_h_data()
  463. }
  464. }
  465. EyetestMore.get_pameter_data = function ($pameter) {
  466. return {
  467. Oh: {
  468. R: $($pameter).find('.oh #r-txt').val(),
  469. L: $($pameter).find('.oh #l-txt').val()
  470. },
  471. Pd: {
  472. R: $($pameter).find('.pd #r-txt').val(),
  473. L: $($pameter).find('.pd #l-txt').val()
  474. },
  475. Distance: {
  476. R: $($pameter).find('.distance #r-txt').val(),
  477. L: $($pameter).find('.distance #l-txt').val()
  478. },
  479. Inset: {
  480. R: $($pameter).find('.inset #r-txt').val(),
  481. L: $($pameter).find('.inset #l-txt').val()
  482. },
  483. Face: $($pameter).find('#face-txt').val(),
  484. Tilt: $($pameter).find('#tilt-txt').val(),
  485. Length: $($pameter).find('#length-txt').val(),
  486. }
  487. }
  488. EyetestMore.set_pameter_data = function ($pameter, data) {
  489. $($pameter).find('.oh #r-txt').val(data.Oh.R)
  490. $($pameter).find('.oh #l-txt').val(data.Oh.L)
  491. $($pameter).find('.pd #r-txt').val(data.Pd.R)
  492. $($pameter).find('.pd #l-txt').val(data.Pd.L)
  493. $($pameter).find('.distance #r-txt').val(data.Distance.R)
  494. $($pameter).find('.distance #l-txt').val(data.Distance.L)
  495. $($pameter).find('.inset #r-txt').val(data.Inset.R)
  496. $($pameter).find('.inset #l-txt').val(data.Inset.L)
  497. $($pameter).find('#face-txt').val(data.Face)
  498. $($pameter).find('#tilt-txt').val(data.Tilt)
  499. $($pameter).find('#length-txt').val(data.Length)
  500. }
  501. EyetestMore.get_bincular_data = function ($bincular) {
  502. return {
  503. Location: {
  504. LongHori: $($bincular).find('.location #long-hori-txt').val(),
  505. LongVert: $($bincular).find('.location #long-vert-txt').val(),
  506. ShortHori: $($bincular).find('.location #short-hori-txt').val(),
  507. ShortVert: $($bincular).find('.location #short-vert-txt').val()
  508. },
  509. Relative: {
  510. Pra: $($bincular).find('.relative #pra-txt').val(),
  511. Nra: $($bincular).find('.relative #nra-txt').val()
  512. },
  513. Lag: Number(get_radio_value_for($bincular, 'lag')),
  514. Aca: $($bincular).find('#ac-a-txt').val(),
  515. Fusion: {
  516. LongBo: {
  517. Clo: $($bincular).find('.fusion .long-bo #clo-txt').val(),
  518. Dis: $($bincular).find('.fusion .long-bo #dis-txt').val(),
  519. Rec: $($bincular).find('.fusion .long-bo #rec-txt').val()
  520. },
  521. LongBi: {
  522. Clo: $($bincular).find('.fusion .long-bi #clo-txt').val(),
  523. Dis: $($bincular).find('.fusion .long-bi #dis-txt').val(),
  524. Rec: $($bincular).find('.fusion .long-bi #rec-txt').val()
  525. },
  526. LongOdBd: {
  527. Dis: $($bincular).find('.fusion .long-od-bd #dis-txt').val(),
  528. Rec: $($bincular).find('.fusion .long-od-bd #rec-txt').val()
  529. },
  530. LongOdBu: {
  531. Dis: $($bincular).find('.fusion .long-od-bu #dis-txt').val(),
  532. Rec: $($bincular).find('.fusion .long-od-bu #rec-txt').val()
  533. },
  534. LongOsBd: {
  535. Dis: $($bincular).find('.fusion .long-os-bd #dis-txt').val(),
  536. Rec: $($bincular).find('.fusion .long-os-bd #rec-txt').val()
  537. },
  538. LongOsBu: {
  539. Dis: $($bincular).find('.fusion .long-os-bu #dis-txt').val(),
  540. Rec: $($bincular).find('.fusion .long-os-bu #rec-txt').val()
  541. },
  542. ShortBo: {
  543. Clo: $($bincular).find('.fusion .short-bo #clo-txt').val(),
  544. Dis: $($bincular).find('.fusion .short-bo #dis-txt').val(),
  545. Rec: $($bincular).find('.fusion .short-bo #rec-txt').val()
  546. },
  547. ShortBi: {
  548. Clo: $($bincular).find('.fusion .short-bi #clo-txt').val(),
  549. Dis: $($bincular).find('.fusion .short-bi #dis-txt').val(),
  550. Rec: $($bincular).find('.fusion .short-bi #rec-txt').val()
  551. },
  552. ShortOdBd: {
  553. Dis: $($bincular).find('.fusion .short-od-bd #dis-txt').val(),
  554. Rec: $($bincular).find('.fusion .short-od-bd #rec-txt').val()
  555. },
  556. ShortOdBu: {
  557. Dis: $($bincular).find('.fusion .short-od-bu #dis-txt').val(),
  558. Rec: $($bincular).find('.fusion .short-od-bu #rec-txt').val()
  559. },
  560. ShortOsBd: {
  561. Dis: $($bincular).find('.fusion .short-os-bd #dis-txt').val(),
  562. Rec: $($bincular).find('.fusion .short-os-bd #rec-txt').val()
  563. },
  564. ShortOsBu: {
  565. Dis: $($bincular).find('.fusion .short-os-bu #dis-txt').val(),
  566. Rec: $($bincular).find('.fusion .short-os-bu #rec-txt').val()
  567. }
  568. }
  569. }
  570. }
  571. EyetestMore.set_bincular_data = function ($bincular, data) {
  572. // Location
  573. $($bincular).find('.location #long-hori-txt').val(data.Location.LongHori)
  574. $($bincular).find('.location #long-vert-txt').val(data.Location.LongVert)
  575. $($bincular).find('.location #short-hori-txt').val(data.Location.ShortHori)
  576. $($bincular).find('.location #short-vert-txt').val(data.Location.ShortVert)
  577. // Relative
  578. $($bincular).find('.relative #pra-txt').val(data.Relative.Pra)
  579. $($bincular).find('.relative #nra-txt').val(data.Relative.Nra)
  580. set_radio_value_for($bincular, 'lag', data.Lag)
  581. $($bincular).find('#ac-a-txt').val(data.Aca)
  582. // Fusion
  583. // LongBo
  584. $($bincular).find('.fusion .long-bo #clo-txt').val(data.Fusion.LongBo.Clo)
  585. $($bincular).find('.fusion .long-bo #dis-txt').val(data.Fusion.LongBo.Dis)
  586. $($bincular).find('.fusion .long-bo #rec-txt').val(data.Fusion.LongBo.Rec)
  587. // LongBi
  588. $($bincular).find('.fusion .long-bi #clo-txt').val(data.Fusion.LongBi.Clo)
  589. $($bincular).find('.fusion .long-bi #dis-txt').val(data.Fusion.LongBi.Dis)
  590. $($bincular).find('.fusion .long-bi #rec-txt').val(data.Fusion.LongBi.Rec)
  591. // LongOdBd
  592. $($bincular).find('.fusion .long-od-bd #dis-txt').val(data.Fusion.LongOdBd.Dis)
  593. $($bincular).find('.fusion .long-od-bd #rec-txt').val(data.Fusion.LongOdBd.Rec)
  594. // LongOdBu
  595. $($bincular).find('.fusion .long-od-bu #dis-txt').val(data.Fusion.LongOdBu.Dis)
  596. $($bincular).find('.fusion .long-od-bu #rec-txt').val(data.Fusion.LongOdBu.Rec)
  597. // LongOsBd
  598. $($bincular).find('.fusion .long-os-bd #dis-txt').val(data.Fusion.LongOsBd.Dis)
  599. $($bincular).find('.fusion .long-os-bd #rec-txt').val(data.Fusion.LongOsBd.Rec)
  600. // LongOsBu
  601. $($bincular).find('.fusion .long-os-bu #dis-txt').val(data.Fusion.LongOsBu.Dis)
  602. $($bincular).find('.fusion .long-os-bu #rec-txt').val(data.Fusion.LongOsBu.Rec)
  603. // ShortBo
  604. $($bincular).find('.fusion .short-bo #clo-txt').val(data.Fusion.ShortBo.Clo)
  605. $($bincular).find('.fusion .short-bo #dis-txt').val(data.Fusion.ShortBo.Dis)
  606. $($bincular).find('.fusion .short-bo #rec-txt').val(data.Fusion.ShortBo.Rec)
  607. // ShortBi
  608. $($bincular).find('.fusion .short-bi #clo-txt').val(data.Fusion.ShortBi.Clo)
  609. $($bincular).find('.fusion .short-bi #dis-txt').val(data.Fusion.ShortBi.Dis)
  610. $($bincular).find('.fusion .short-bi #rec-txt').val(data.Fusion.ShortBi.Rec)
  611. // ShortOdBd
  612. $($bincular).find('.fusion .short-od-bd #dis-txt').val(data.Fusion.ShortOdBd.Dis)
  613. $($bincular).find('.fusion .short-od-bd #rec-txt').val(data.Fusion.ShortOdBd.Rec)
  614. // ShortOdBu
  615. $($bincular).find('.fusion .short-od-bu #dis-txt').val(data.Fusion.ShortOdBu.Dis)
  616. $($bincular).find('.fusion .short-od-bu #rec-txt').val(data.Fusion.ShortOdBu.Rec)
  617. // ShortOsBd
  618. $($bincular).find('.fusion .short-os-bd #dis-txt').val(data.Fusion.ShortOsBd.Dis)
  619. $($bincular).find('.fusion .short-os-bd #rec-txt').val(data.Fusion.ShortOsBd.Rec)
  620. // ShortOsBu
  621. $($bincular).find('.fusion .short-os-bu #dis-txt').val(data.Fusion.ShortOsBu.Dis)
  622. $($bincular).find('.fusion .short-os-bu #rec-txt').val(data.Fusion.ShortOsBu.Rec)
  623. }
  624. EyetestMore.get_screen_data = function ($screen) {
  625. return {
  626. Shielding: {
  627. Long: $($screen).find('.shielding #long-txt').val(),
  628. Short: $($screen).find('.shielding #short-txt').val()
  629. },
  630. FourDot: {
  631. Long: Number(get_radio_value_for($($screen).find('.four-dot'), 'long')),
  632. Short: Number(get_radio_value_for($($screen).find('.four-dot'), 'short')),
  633. LongStr: $($screen).find('.four-dot #long-str-txt').val(),
  634. ShortStr: $($screen).find('.four-dot #short-str-txt').val()
  635. },
  636. Converge: {
  637. Normal: Number(get_radio_value_for($($screen).find('.converge'), 'normal')),
  638. Str: $($screen).find('.converge #str-txt').val()
  639. },
  640. Near: {
  641. OdStr: $($screen).find('.near #od-str-txt').val(),
  642. OsStr: $($screen).find('.near #os-str-txt').val()
  643. },
  644. Easy: {
  645. OuStr: $($screen).find('.easy #ou-str-txt').val(),
  646. OdStr: $($screen).find('.easy #od-str-txt').val(),
  647. OsStr: $($screen).find('.easy #os-str-txt').val()
  648. }
  649. }
  650. }
  651. EyetestMore.set_screen_data = function ($screen, data) {
  652. $($screen).find('.shielding #long-txt').val(data.Shielding.Long)
  653. $($screen).find('.shielding #short-txt').val(data.Shielding.Short)
  654. set_radio_value_for($($screen).find('.four-dot'), 'long', data.FourDot.Long)
  655. set_radio_value_for($($screen).find('.four-dot'), 'short', data.FourDot.Short)
  656. $($screen).find('.four-dot #long-str-txt').val(data.FourDot.LongStr)
  657. $($screen).find('.four-dot #short-str-txt').val(data.FourDot.ShortStr)
  658. set_radio_value_for($($screen).find('.converge'), 'normal', data.Converge.Normal)
  659. $($screen).find('.converge #str-txt').val(data.Converge.Str)
  660. $($screen).find('.near #od-str-txt').val(data.Near.OdStr)
  661. $($screen).find('.near #os-str-txt').val(data.Near.OsStr)
  662. $($screen).find('.easy #ou-str-txt').val(data.Easy.OuStr)
  663. $($screen).find('.easy #od-str-txt').val(data.Easy.OdStr)
  664. $($screen).find('.easy #os-str-txt').val(data.Easy.OsStr)
  665. }
  666. EyetestMore.get_eye_lens_data = function () {
  667. return {
  668. OldREyeLens: {
  669. Sph: $('.old-eye-lens-table .r-eye-lens').find('.sph-txt').val(),
  670. Cyl: $('.old-eye-lens-table .r-eye-lens').find('.cyl-txt').val(),
  671. Axis: $('.old-eye-lens-table .r-eye-lens').find('.axis-txt').val(),
  672. LongPd: $('.old-eye-lens-table .r-eye-lens').find('.long-pd-txt').val(),
  673. Add: $('.old-eye-lens-table .r-eye-lens').find('.add-txt').val(),
  674. ShortPd: $('.old-eye-lens-table .r-eye-lens').find('.short-pd-txt').val(),
  675. BaseIo: $('.old-eye-lens-table .r-eye-lens').find('.base-i-txt').val() + '/' + $('.old-eye-lens-table .r-eye-lens').find('.base-o-txt').val(),
  676. BaseUd: $('.old-eye-lens-table .r-eye-lens').find('.base-u-txt').val() + '/' + $('.old-eye-lens-table .r-eye-lens').find('.base-d-txt').val(),
  677. BareEye: $('.old-eye-lens-table .r-eye-lens').find('.bare-eye-txt').val(),
  678. Adjust: $('.old-eye-lens-table .r-eye-lens').find('.adjust-txt').val(),
  679. },
  680. OldLEyeLens: {
  681. Sph: $('.old-eye-lens-table .l-eye-lens').find('.sph-txt').val(),
  682. Cyl: $('.old-eye-lens-table .l-eye-lens').find('.cyl-txt').val(),
  683. Axis: $('.old-eye-lens-table .l-eye-lens').find('.axis-txt').val(),
  684. LongPd: $('.old-eye-lens-table .l-eye-lens').find('.long-pd-txt').val(),
  685. Add: $('.old-eye-lens-table .l-eye-lens').find('.add-txt').val(),
  686. ShortPd: $('.old-eye-lens-table .l-eye-lens').find('.short-pd-txt').val(),
  687. BaseIo: $('.old-eye-lens-table .l-eye-lens').find('.base-i-txt').val() + '/' + $('.old-eye-lens-table .l-eye-lens').find('.base-o-txt').val(),
  688. BaseUd: $('.old-eye-lens-table .l-eye-lens').find('.base-u-txt').val() + '/' + $('.old-eye-lens-table .l-eye-lens').find('.base-d-txt').val(),
  689. BareEye: $('.old-eye-lens-table .l-eye-lens').find('.bare-eye-txt').val(),
  690. Adjust: $('.old-eye-lens-table .l-eye-lens').find('.adjust-txt').val(),
  691. },
  692. CcREyeLens: {
  693. Sph: $('.cc-eye-lens-table .r-eye-lens').find('.sph-txt').val(),
  694. Cyl: $('.cc-eye-lens-table .r-eye-lens').find('.cyl-txt').val(),
  695. Axis: $('.cc-eye-lens-table .r-eye-lens').find('.axis-txt').val(),
  696. LongPd: $('.cc-eye-lens-table .r-eye-lens').find('.long-pd-txt').val(),
  697. Add: $('.cc-eye-lens-table .r-eye-lens').find('.add-txt').val(),
  698. ShortPd: $('.cc-eye-lens-table .r-eye-lens').find('.short-pd-txt').val(),
  699. BaseIo: $('.cc-eye-lens-table .r-eye-lens').find('.base-i-txt').val() + '/' + $('.cc-eye-lens-table .r-eye-lens').find('.base-o-txt').val(),
  700. BaseUd: $('.cc-eye-lens-table .r-eye-lens').find('.base-u-txt').val() + '/' + $('.cc-eye-lens-table .r-eye-lens').find('.base-d-txt').val(),
  701. BareEye: $('.cc-eye-lens-table .r-eye-lens').find('.bare-eye-txt').val(),
  702. Adjust: $('.cc-eye-lens-table .r-eye-lens').find('.adjust-txt').val(),
  703. },
  704. CcLEyeLens: {
  705. Sph: $('.cc-eye-lens-table .l-eye-lens').find('.sph-txt').val(),
  706. Cyl: $('.cc-eye-lens-table .l-eye-lens').find('.cyl-txt').val(),
  707. Axis: $('.cc-eye-lens-table .l-eye-lens').find('.axis-txt').val(),
  708. LongPd: $('.cc-eye-lens-table .l-eye-lens').find('.long-pd-txt').val(),
  709. Add: $('.cc-eye-lens-table .l-eye-lens').find('.add-txt').val(),
  710. ShortPd: $('.cc-eye-lens-table .l-eye-lens').find('.short-pd-txt').val(),
  711. BaseIo: $('.cc-eye-lens-table .l-eye-lens').find('.base-i-txt').val() + '/' + $('.cc-eye-lens-table .l-eye-lens').find('.base-o-txt').val(),
  712. BaseUd: $('.cc-eye-lens-table .l-eye-lens').find('.base-u-txt').val() + '/' + $('.cc-eye-lens-table .l-eye-lens').find('.base-d-txt').val(),
  713. BareEye: $('.cc-eye-lens-table .l-eye-lens').find('.bare-eye-txt').val(),
  714. Adjust: $('.cc-eye-lens-table .l-eye-lens').find('.adjust-txt').val(),
  715. },
  716. // REyeLens: {
  717. // Sph: $('.px-eye-lens-table .r-eye-lens').find('.sph-txt').val(),
  718. // Cyl: $('.px-eye-lens-table .r-eye-lens').find('.cyl-txt').val(),
  719. // Axis: $('.px-eye-lens-table .r-eye-lens').find('.axis-txt').val(),
  720. // LongPd: $('.px-eye-lens-table .r-eye-lens').find('.long-pd-txt').val(),
  721. // Add: $('.px-eye-lens-table .r-eye-lens').find('.add-txt').val(),
  722. // ShortPd: $('.px-eye-lens-table .r-eye-lens').find('.short-pd-txt').val(),
  723. // BaseIo: $('.px-eye-lens-table .r-eye-lens').find('.base-i-txt').val() + '/' + $('.px-eye-lens-table .r-eye-lens').find('.base-o-txt').val(),
  724. // BaseUd: $('.px-eye-lens-table .r-eye-lens').find('.base-u-txt').val() + '/' + $('.px-eye-lens-table .r-eye-lens').find('.base-d-txt').val(),
  725. // BareEye: $('.px-eye-lens-table .r-eye-lens').find('.bare-eye-txt').val(),
  726. // Adjust: $('.px-eye-lens-table .r-eye-lens').find('.adjust-txt').val(),
  727. // },
  728. // LEyeLens: {
  729. // Sph: $('.px-eye-lens-table .l-eye-lens').find('.sph-txt').val(),
  730. // Cyl: $('.px-eye-lens-table .l-eye-lens').find('.cyl-txt').val(),
  731. // Axis: $('.px-eye-lens-table .l-eye-lens').find('.axis-txt').val(),
  732. // LongPd: $('.px-eye-lens-table .l-eye-lens').find('.long-pd-txt').val(),
  733. // Add: $('.px-eye-lens-table .l-eye-lens').find('.add-txt').val(),
  734. // ShortPd: $('.px-eye-lens-table .l-eye-lens').find('.short-pd-txt').val(),
  735. // BaseIo: $('.px-eye-lens-table .l-eye-lens').find('.base-i-txt').val() + '/' + $('.px-eye-lens-table .l-eye-lens').find('.base-o-txt').val(),
  736. // BaseUd: $('.px-eye-lens-table .l-eye-lens').find('.base-u-txt').val() + '/' + $('.px-eye-lens-table .l-eye-lens').find('.base-d-txt').val(),
  737. // BareEye: $('.px-eye-lens-table .l-eye-lens').find('.bare-eye-txt').val(),
  738. // Adjust: $('.px-eye-lens-table .l-eye-lens').find('.adjust-txt').val(),
  739. // },
  740. }
  741. }
  742. EyetestMore.set_eye_lens_data = function (json1) {
  743. update_eye_lens_input(json1['OldREyeLens'], '.old-eye-lens-table .r-eye-lens')
  744. update_eye_lens_input(json1['OldLEyeLens'], '.old-eye-lens-table .l-eye-lens')
  745. update_eye_lens_input(json1['CcREyeLens'], '.cc-eye-lens-table .r-eye-lens')
  746. update_eye_lens_input(json1['CcLEyeLens'], '.cc-eye-lens-table .l-eye-lens')
  747. update_eye_lens_input(json1['REyeLens'], '.px-eye-lens-table .r-eye-lens')
  748. update_eye_lens_input(json1['LEyeLens'], '.px-eye-lens-table .l-eye-lens')
  749. }
  750. EyetestMore.get_broad_h_data = function () {
  751. return {
  752. X: JSON.stringify(EyetestMore.canvas.getClickX()),
  753. Y: JSON.stringify(EyetestMore.canvas.getClickY()),
  754. Drage: JSON.stringify(EyetestMore.canvas.getClickDrag()),
  755. }
  756. }
  757. EyetestMore.set_broad_h_data = function (data) {
  758. if (isEmpty(data['X']) && isEmpty(data['Y']) && isEmpty(data['Drage'])) {
  759. EyetestMore.clear_canvas()
  760. return
  761. }
  762. EyetestMore.canvas.setClickX(JSON.parse(data['X']))
  763. EyetestMore.canvas.setClickY(JSON.parse(data['Y']))
  764. EyetestMore.canvas.setClickDrag(JSON.parse(data['Drage']))
  765. EyetestMore.canvas.redraw()
  766. }
  767. EyetestMore.update_json1_ui = async function (sorder_id, json1) {
  768. // console.log(json1)
  769. EyetestMore.set_eye_lens_data(json1)
  770. const $eyetest_more = $('#modal-eyetest-more')
  771. $($eyetest_more).find('#symptoms-textarea').val(json1.Symptoms)
  772. set_radio_value_for($eyetest_more, 'fix_eye', json1.FixEye)
  773. set_radio_value_for($eyetest_more, 'stereosia', json1.Stereosia)
  774. set_radio_value_for($eyetest_more, 'color_vision', json1.ColorVision)
  775. set_radio_value_for($eyetest_more, 'od_im_grid', json1.OdImGrid)
  776. set_radio_value_for($eyetest_more, 'os_im_grid', json1.OsImGrid)
  777. EyetestMore.set_broad_h_data(json1.BroadH)
  778. EyetestMore.set_screen_data($($eyetest_more).find('.screen'), json1.Screen)
  779. EyetestMore.set_bincular_data($($eyetest_more).find('.bincular'), json1.Bincular)
  780. EyetestMore.set_pameter_data($($eyetest_more).find('.pameter'), json1.Pameter)
  781. }
  782. EyetestMore.resize_canvas = function () {
  783. if (EyetestMore.canvas.getCanvasSize()) { return }
  784. setTimeout(()=>{
  785. const width = $('#canvasDiv1').width()
  786. const height = $('#chief-complaint').innerHeight()
  787. EyetestMore.canvas.setCanvasSize(width, height)
  788. EyetestMore.canvas.setCanvasWidth(width)
  789. EyetestMore.canvas.setCanvasHeight(height)
  790. EyetestMore.canvas.redraw()
  791. }, 601)
  792. }
  793. EyetestMore.clear_canvas = function () {
  794. EyetestMore.canvas.clearCanvas()
  795. }
  796. }( window.EyetestMore = window.EyetestMore || {}, jQuery ));
  797. </script>
  798. @endpush
  799. @endonce