PatientDetail.vue 81KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329
  1. <template>
  2. <div class="app-container">
  3. <el-dialog
  4. title="查看传染病检查结果"
  5. :visible.sync="dialogFormVisible"
  6. width="1000px"
  7. id="user-inspection-form"
  8. >
  9. <el-form :model="form" ref="form" label-position="top">
  10. <el-row>
  11. <el-col :span="1">&nbsp;</el-col>
  12. <template v-for="(item, index) in form.formItem">
  13. <el-col :span="7" >
  14. <el-form-item
  15. :label="item.item_name"
  16. v-if="item.range_type == 1"
  17. :key="item.item_id"
  18. :prop="'formItem.' + index + '.value'"
  19. >
  20. <el-input
  21. placeholder="请填入"
  22. v-model="item.value"
  23. style="width: 95%"
  24. type="number"
  25. disabled
  26. >
  27. <template slot="append">{{ item.unit }}</template>
  28. </el-input>
  29. </el-form-item>
  30. <el-form-item
  31. :label="item.item_name"
  32. v-else
  33. :key="item.item_id"
  34. :prop="'formItem.' + index + '.value'"
  35. >
  36. <!-- :key="item.item_id" -->
  37. <el-select
  38. v-model="item.value"
  39. placeholder="请选择"
  40. style="width: 95%"
  41. disabled
  42. >
  43. <el-option
  44. v-for="(optionItem, oidex) in item.select_options"
  45. :key="oidex"
  46. :label="optionItem"
  47. :value="optionItem"
  48. >
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="1" :key="'form-col' + index">&nbsp;</el-col>
  54. </template>
  55. </el-row>
  56. </el-form>
  57. <div slot="footer" class="dialog-footer">
  58. <el-button @click="dialogFormVisible = false">关闭</el-button>
  59. </div>
  60. </el-dialog>
  61. <el-form
  62. ref="form"
  63. :rules="rules"
  64. :model="form"
  65. label-width="134px"
  66. class="clearfix"
  67. id="patient-info"
  68. >
  69. <div style="float: right; z-index: 8; position: absolute; right: 16px">
  70. <el-button
  71. size="small"
  72. type="primary"
  73. @click="printCard()"
  74. style="margin: 0 6px 6px 0; z-index: 1"
  75. >打印签到卡</el-button
  76. >
  77. <el-button
  78. size="small"
  79. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  80. type="primary"
  81. @click="$router.push('/patients/patient/' + patientID + '/edit')"
  82. style="margin: 0 0 6px 0; z-index: 1"
  83. >修改</el-button
  84. >
  85. <el-button
  86. size="small"
  87. type="primary"
  88. @click="printThisInfo()"
  89. style="margin: 0 6px 6px 0; z-index: 1"
  90. >打印</el-button
  91. >
  92. </div>
  93. <div class="dataTitle">一般资料</div>
  94. <el-row>
  95. <el-col :span="20">
  96. <el-row :gutter="10">
  97. <el-col :span="8">
  98. <el-form-item label="姓名 : " class="is-required" prop="name">
  99. <el-input v-model="form.name" disabled></el-input>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="8" style="height: 59px">
  103. <el-form-item label="性别 : " class="is-required" prop="gender">
  104. <el-radio-group v-model="form.gender">
  105. <el-radio
  106. v-for="item in sexOptions"
  107. :key="item.value"
  108. :label="item.value"
  109. :value="item.value"
  110. disabled
  111. >{{ item.label }}</el-radio
  112. >
  113. </el-radio-group>
  114. </el-form-item>
  115. </el-col>
  116. <el-col :span="8">
  117. <el-form-item
  118. label="身份证号 : "
  119. class="is-required"
  120. prop="idCardNo"
  121. >
  122. <el-input v-model="form.idCardNo" disabled></el-input>
  123. </el-form-item>
  124. </el-col>
  125. <el-col :span="8" style="height: 59px">
  126. <el-form-item label="年龄 : " class="is-required" prop="age">
  127. <el-input v-model="form.age" disabled></el-input>
  128. </el-form-item>
  129. </el-col>
  130. <el-col :span="8">
  131. <el-form-item label="透析号 : " class="is-required">
  132. <el-input
  133. disabled
  134. v-model="form.dialysisNo"
  135. placeholder="填写或自动生成"
  136. style="width: 110px; float: left; margin-right: 1%"
  137. ></el-input>
  138. <el-button disabled type="primary">自动生成</el-button>
  139. </el-form-item>
  140. </el-col>
  141. <el-col :span="8">
  142. <el-form-item
  143. label="出生日期 : "
  144. class="is-required"
  145. prop="birth"
  146. >
  147. <el-date-picker
  148. v-model="form.birth"
  149. type="date"
  150. disabled
  151. placeholder="选择日期"
  152. :suffix-icon="'el-icon-menu'"
  153. format="yyyy-MM-dd"
  154. value-format="yyyy-MM-dd"
  155. ></el-date-picker>
  156. </el-form-item>
  157. </el-col>
  158. <el-col :span="8" v-if="org_id!=0 && org_id!=10138 && org_id!=10278">
  159. <el-form-item
  160. label="首次肾脏治疗时间 : "
  161. label-width="150px"
  162. class="is-required"
  163. prop="birth"
  164. >
  165. <el-date-picker
  166. v-model="form.firstDialysisDate"
  167. type="date"
  168. disabled
  169. placeholder="选择日期"
  170. :suffix-icon="'el-icon-menu'"
  171. format="yyyy-MM-dd"
  172. value-format="yyyy-MM-dd"
  173. ></el-date-picker>
  174. </el-form-item>
  175. </el-col>
  176. <el-col :span="6" :style="isEdit ? 'width:380px' : ''" v-if="org_id==0||org_id == 10138 || org_id == 10278">
  177. <el-form-item
  178. label="首次进入本院时间:"
  179. prop="firstDialysisDate"
  180. label-width="150px"
  181. >
  182. <el-date-picker
  183. v-model="form.firstDialysisDate"
  184. type="date"
  185. format="yyyy-MM-dd"
  186. value-format="yyyy-MM-dd"
  187. ></el-date-picker>
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="8">
  191. <el-form-item label="本人电话: " class="is-required" prop="phone">
  192. <el-input
  193. v-model="form.phone"
  194. maxlength="20"
  195. disabled
  196. ></el-input>
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="8">
  200. <el-form-item label="家属姓名: ">
  201. <el-input
  202. v-model="form.contact_name"
  203. maxlength="20"
  204. disabled
  205. ></el-input>
  206. </el-form-item>
  207. </el-col>
  208. <el-col :span="8">
  209. <el-form-item label="家属电话: " prop="homeTelephone">
  210. <el-input
  211. v-model="form.homeTelephone"
  212. maxlength="20"
  213. disabled
  214. ></el-input>
  215. </el-form-item>
  216. </el-col>
  217. <el-col :span="6">
  218. <el-form-item
  219. label="本院首次透析 : "
  220. prop="is_hospital_first_dialysis"
  221. >
  222. <el-radio-group v-model="form.is_hospital_first_dialysis">
  223. <el-radio
  224. v-for="item in isHospitalFirstDialysisOptions"
  225. :key="item.value"
  226. :label="item.value"
  227. :value="item.value"
  228. disabled
  229. >{{ item.label }}</el-radio
  230. >
  231. </el-radio-group>
  232. </el-form-item>
  233. </el-col>
  234. <el-col :span="6">
  235. <el-form-item
  236. label="系统前透析次数 : "
  237. prop="first_dialysis_hospital"
  238. >
  239. <el-input v-model="form.user_sys_before_count" disabled></el-input>
  240. </el-form-item>
  241. </el-col>
  242. <el-col :span="6">
  243. <el-form-item label="首次诊治日期 : ">
  244. <el-date-picker
  245. v-model="form.first_treatment_date"
  246. type="date"
  247. disabled
  248. format="yyyy-MM-dd"
  249. value-format="yyyy-MM-dd"
  250. ></el-date-picker>
  251. </el-form-item>
  252. </el-col>
  253. <el-col :span="6">
  254. <el-form-item label="上家透析医院 : " prop="first_dialysis_hospital">
  255. <el-input
  256. v-model="form.first_dialysis_hospital"
  257. disabled
  258. ></el-input>
  259. </el-form-item>
  260. </el-col>
  261. <el-col :span="24">
  262. <el-form-item label="透析之前情况 : " prop="predialysis_condition">
  263. <el-checkbox-group v-model="form.predialysis_condition">
  264. <el-checkbox
  265. v-for="item in predialysisConditionOptions"
  266. :label="item.label"
  267. :key="item.value"
  268. :value="item.label"
  269. disabled
  270. >{{ item.label }}</el-checkbox
  271. >
  272. </el-checkbox-group>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="24">
  276. <el-form-item label="病历号 : " prop="record_number">
  277. <el-input
  278. style="width: 200px;"
  279. v-model="form.record_number"
  280. disabled
  281. ></el-input>
  282. </el-form-item>
  283. </el-col>
  284. <el-col :span="6">
  285. <el-form-item
  286. label="本院前透析频率 : "
  287. prop="pre_hospital_dialysis_frequency"
  288. >
  289. <el-input
  290. v-model="form.pre_hospital_dialysis_frequency"
  291. disabled
  292. ></el-input>
  293. </el-form-item>
  294. </el-col>
  295. <el-col :span="6">
  296. <el-form-item
  297. label="本院前透析次数 : "
  298. prop="pre_hospital_dialysis_times"
  299. >
  300. <el-input
  301. v-model="form.pre_hospital_dialysis_times"
  302. disabled
  303. ></el-input>
  304. </el-form-item>
  305. </el-col>
  306. <el-col :span="6">
  307. <el-form-item
  308. label="本院首次透析 : "
  309. prop="hospital_first_dialysis_date"
  310. >
  311. <el-date-picker
  312. v-model="form.hospital_first_dialysis_date"
  313. type="date"
  314. format="yyyy-MM-dd"
  315. value-format="yyyy-MM-dd"
  316. disabled
  317. ></el-date-picker>
  318. </el-form-item>
  319. </el-col>
  320. <el-col :span="8" style="height: 59px">
  321. <el-form-item
  322. label="患者来源 : "
  323. class="is-required"
  324. prop="source"
  325. >
  326. <el-radio-group v-model="form.source">
  327. <el-radio
  328. v-for="item in sourceOptions"
  329. :key="item.value"
  330. :label="item.value"
  331. :value="item.value"
  332. disabled
  333. >{{ item.label }}</el-radio
  334. >
  335. </el-radio-group>
  336. </el-form-item>
  337. </el-col>
  338. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  339. <el-form-item
  340. label="患者去向 : "
  341. >
  342. <el-radio-group v-model="form.patient_source">
  343. <el-radio
  344. disabled
  345. v-for="item in patientSourceList"
  346. :key="item.value"
  347. :label="item.value"
  348. :value="item.value"
  349. >{{ item.label }}</el-radio
  350. >
  351. </el-radio-group>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  355. <el-form-item
  356. label="患者去向时间 : "
  357. >
  358. <el-date-picker
  359. size="small"
  360. disabled
  361. v-model="form.patient_start_time"
  362. prefix-icon="el-icon-date"
  363. :editable="false"
  364. style="width: 150px;"
  365. type="date"
  366. placeholder="选择日期时间"
  367. align="right"
  368. format="yyyy-MM-dd"
  369. value-format="yyyy-MM-dd"
  370. @change="startTimeChange"
  371. ></el-date-picker>
  372. </el-form-item>
  373. </el-col>
  374. <el-col :span="8" style="margin-bottom: 20px;">
  375. <el-form-item
  376. label="备注 : "
  377. prop="sch_remark">
  378. <el-input
  379. disabled
  380. type="textarea"
  381. :rows="3"
  382. v-model="form.sch_remark"
  383. resize="none"
  384. placeholder
  385. ></el-input>
  386. </el-form-item>
  387. </el-col>
  388. <el-col :span="8" style="height: 59px">
  389. <el-form-item
  390. label="治疗状态(转归) : "
  391. class="is-required"
  392. prop="lapseto"
  393. >
  394. <el-radio-group v-model="form.lapseto">
  395. <el-radio
  396. v-for="item in lapsetoOptions"
  397. :key="item.value"
  398. :label="item.value"
  399. :value="item.value"
  400. disabled
  401. >{{ item.label }}</el-radio
  402. >
  403. </el-radio-group>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="24">
  407. <el-form-item label="传染病 : " required prop="is_infectious">
  408. <el-radio-group v-model="form.is_infectious" disabled>
  409. <el-radio :label="1">阴性</el-radio>
  410. <el-radio :label="2">阳性</el-radio>
  411. </el-radio-group>
  412. <el-checkbox-group
  413. v-model="form.contagions"
  414. v-if="form.is_infectious == '2'"
  415. disabled
  416. >
  417. <el-checkbox
  418. v-for="item in contagionList"
  419. v-if="item.type == 2"
  420. :label="item.id"
  421. :key="item.id"
  422. name="contagions"
  423. :value="item.id"
  424. >{{ item.name }}
  425. </el-checkbox>
  426. </el-checkbox-group>
  427. </el-form-item>
  428. <el-form-item label="疑难内瘘:">
  429. <el-radio-group v-model="form.troble_shoot" disabled>
  430. <el-radio :label="1">是</el-radio>
  431. <el-radio :label="2">否</el-radio>m
  432. </el-radio-group>
  433. </el-form-item>
  434. <el-form-item label="人员编码: ">
  435. <el-input v-model="form.zb_patient_id"></el-input>
  436. </el-form-item>
  437. </el-col>
  438. <!--<el-col :span="16" >-->
  439. <!--<el-form-item label="检查结果日期 : " >-->
  440. <!--<el-date-picker v-model="form.record_date" type="date" placeholder="选择日期" :suffix-icon="'el-icon-menu'"-->
  441. <!--format="yyyy-MM-dd"-->
  442. <!--style="width: 200px;"-->
  443. <!--value-format="yyyy-MM-dd"></el-date-picker>-->
  444. <!--&lt;!&ndash;<el-button type="primary" @click="recordCheck()">录入检验检查</el-button>&ndash;&gt;-->
  445. <!--</el-form-item>-->
  446. <!--</el-col>-->
  447. <el-col :span="16">
  448. <el-form-item label="检查结果日期 : ">
  449. <!--<el-date-picker v-model="form.record_date" type="date" placeholder="选择日期" :suffix-icon="'el-icon-menu'"-->
  450. <!--format="yyyy-MM-dd"-->
  451. <!--style="width: 200px;"-->
  452. <!--disabled-->
  453. <!--value-format="yyyy-MM-dd" v-if="isEdit"></el-date-picker>-->
  454. <el-date-picker
  455. v-model="form.record_date"
  456. type="date"
  457. placeholder="选择日期"
  458. :suffix-icon="'el-icon-menu'"
  459. format="yyyy-MM-dd"
  460. disabled
  461. style="width: 200px"
  462. value-format="yyyy-MM-dd"
  463. ></el-date-picker>
  464. <el-button type="primary" @click="showInspectDialog()"
  465. >查看检验检查</el-button
  466. >
  467. </el-form-item>
  468. </el-col>
  469. <el-col :span="24">
  470. <el-form-item label="传染病周期提醒: ">
  471. <el-radio-group
  472. v-model="form.remind_cycle"
  473. @change="changeCycle()"
  474. disabled
  475. >
  476. <el-radio :label="1">一月一次</el-radio>
  477. <el-radio :label="2">两月一次</el-radio>
  478. <el-radio :label="3">三月一次</el-radio>
  479. <el-radio :label="4">半年一次</el-radio>
  480. <el-radio :label="5">一年一次</el-radio>
  481. </el-radio-group>
  482. </el-form-item>
  483. </el-col>
  484. <el-col :span="24">
  485. <el-form-item label="诊断 : " prop="diagnose">
  486. <!-- <textarea v-model="form.diagnose" class="textarea" disabled></textarea> -->
  487. <el-input
  488. type="textarea"
  489. :rows="3"
  490. v-model="form.diagnose"
  491. resize="none"
  492. placeholder=""
  493. readonly
  494. ></el-input>
  495. </el-form-item>
  496. </el-col>
  497. <el-col :span="24">
  498. <el-form-item label="诊疗计划 : " prop="diagnose">
  499. <el-input
  500. type="textarea"
  501. :rows="3"
  502. v-model="form.treatment_plan"
  503. resize="none"
  504. placeholder
  505. readonly
  506. ></el-input>
  507. </el-form-item>
  508. </el-col>
  509. <el-col :span="8">
  510. <el-form-item label="民族 : " prop="nation">
  511. <el-input
  512. v-model="form.nation"
  513. maxlength="30"
  514. disabled
  515. ></el-input>
  516. </el-form-item>
  517. </el-col>
  518. <el-col :span="8">
  519. <el-form-item label="籍贯 : " prop="native_place">
  520. <el-input
  521. v-model="form.native_place"
  522. maxlength="30"
  523. disabled
  524. ></el-input>
  525. </el-form-item>
  526. </el-col>
  527. <el-col :span="8">
  528. <el-form-item label="家庭住址 : " prop="homeAddress">
  529. <el-input v-model="form.homeAddress" disabled></el-input>
  530. </el-form-item>
  531. </el-col>
  532. <div v-show="!generic_info_fold">
  533. <el-col :span="8">
  534. <el-form-item label="别名 : " prop="alias">
  535. <el-input v-model="form.alias" disabled></el-input>
  536. </el-form-item>
  537. </el-col>
  538. <el-col :span="8">
  539. <el-form-item label="身高(cm) : " prop="height">
  540. <el-input
  541. maxlength="5"
  542. v-model="form.height"
  543. disabled
  544. ></el-input>
  545. </el-form-item>
  546. </el-col>
  547. <el-col :span="8">
  548. <el-form-item label="婚姻状况 : " prop="maritalStatus">
  549. <el-select
  550. v-model="form.maritalStatus"
  551. placeholder="请选择婚姻状况"
  552. disabled
  553. >
  554. <el-option
  555. v-for="item in maritalOptions"
  556. :key="item.id"
  557. :label="item.name"
  558. :value="item.id"
  559. />
  560. </el-select>
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="8">
  564. <el-form-item label="子女情况(个) : " prop="children">
  565. <el-input
  566. maxlength="5"
  567. v-model="form.children"
  568. disabled
  569. ></el-input>
  570. </el-form-item>
  571. <!-- <el-form-item label=" " style="float:left;" label-width="30px" >
  572. </el-form-item> -->
  573. </el-col>
  574. <el-col :span="8">
  575. <el-form-item label="住院(门诊)号 : " prop="admissionNumber">
  576. <el-input v-model="form.admissionNumber" disabled></el-input>
  577. </el-form-item>
  578. </el-col>
  579. <el-col :span="8">
  580. <el-form-item label="医保类型 : " prop="reimbursementWayID">
  581. <el-select v-model="form.reimbursementWayID" disabled>
  582. <el-option
  583. v-for="item in wayOptions"
  584. :key="item.id"
  585. :label="item.name"
  586. :value="item.id"
  587. />
  588. </el-select>
  589. </el-form-item>
  590. </el-col>
  591. <el-col :span="8">
  592. <el-form-item label="医保号 : " prop="healthCareNo">
  593. <el-input v-model="form.healthCareNo" disabled></el-input>
  594. </el-form-item>
  595. </el-col>
  596. <el-col :span="8">
  597. <el-form-item label="教育程度 : " prop="educationOptions">
  598. <el-select v-model="form.education" disabled>
  599. <el-option
  600. v-for="item in educationOptions"
  601. :key="item.id"
  602. :label="item.name"
  603. :value="item.id"
  604. />
  605. </el-select>
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="8">
  609. <el-form-item label="固定电话 : ">
  610. <el-input
  611. v-model="form.tell_phone"
  612. maxlength="20"
  613. disabled
  614. ></el-input>
  615. </el-form-item>
  616. </el-col>
  617. <el-col :span="8">
  618. <el-form-item label="费别 : ">
  619. <el-select v-model="form.expense_kind" disabled>
  620. <el-option
  621. v-for="item in expenseOptions"
  622. :key="item.id"
  623. :label="item.name"
  624. :value="item.id"
  625. />
  626. </el-select>
  627. </el-form-item>
  628. </el-col>
  629. <el-col :span="8">
  630. <el-form-item label="透析龄(月): ">
  631. <el-input v-model="form.dialysis_age" disabled></el-input>
  632. </el-form-item>
  633. </el-col>
  634. <el-col :span="8">
  635. <el-form-item label="亲友电话: " prop="relative_phone">
  636. <el-input
  637. v-model="form.relative_phone"
  638. maxlength="20"
  639. disabled
  640. ></el-input>
  641. </el-form-item>
  642. </el-col>
  643. <el-col :span="8">
  644. <el-form-item label="亲友关系: " prop="relative_relations">
  645. <el-input
  646. v-model="form.relative_relations"
  647. maxlength="20"
  648. disabled
  649. ></el-input>
  650. </el-form-item>
  651. </el-col>
  652. <el-col :span="8">
  653. <el-form-item label="职业 : " prop="profession">
  654. <el-select v-model="form.profession" disabled>
  655. <el-option
  656. v-for="item in professionOptions"
  657. :key="item.id"
  658. :label="item.name"
  659. :value="item.id"
  660. />
  661. </el-select>
  662. </el-form-item>
  663. </el-col>
  664. <el-col :span="8">
  665. <el-form-item label="工作单位 : " prop="work">
  666. <el-input v-model="form.work" disabled></el-input>
  667. </el-form-item>
  668. </el-col>
  669. <el-col :span="8">
  670. <el-form-item label="单位地址 : " prop="unit_address">
  671. <el-input v-model="form.unit_address" disabled></el-input>
  672. </el-form-item>
  673. </el-col>
  674. </div>
  675. <el-col :span="8">
  676. <el-form-item>
  677. <el-button
  678. type="text"
  679. @click="generic_info_fold = !generic_info_fold"
  680. >{{ generic_info_fold ? "更多资料" : "收起"
  681. }}<i class="el-icon--right" :class="generic_fold_icon"></i
  682. ></el-button>
  683. </el-form-item>
  684. </el-col>
  685. </el-row>
  686. </el-col>
  687. <el-col :span="4" align="center">
  688. <img
  689. width="146px"
  690. height="146px"
  691. v-if="form.avatar"
  692. :src="form.avatar"
  693. class="avatar"
  694. />
  695. <el-form-item prop="avatar">
  696. <el-input
  697. v-model="form.avatar"
  698. type="hidden"
  699. placeholder=""
  700. ></el-input>
  701. </el-form-item>
  702. </el-col>
  703. </el-row>
  704. <div class="dataTitle">治疗信息</div>
  705. <div style="display: flex">
  706. <div style="flex: 1 1 9%;">
  707. <el-row :gutter="24">
  708. <el-col :span="24">
  709. <el-form-item label="主诉 : " prop="patient_complains">
  710. <el-input
  711. type="textarea"
  712. :rows="3"
  713. v-model="form.patient_complains"
  714. resize="none"
  715. placeholder=""
  716. readonly
  717. ></el-input>
  718. </el-form-item>
  719. </el-col>
  720. </el-row>
  721. <el-row :gutter="24">
  722. <el-col :span="24">
  723. <el-form-item label="既往史 : " prop="past_history">
  724. <el-input
  725. type="textarea"
  726. :rows="3"
  727. v-model="form.past_history"
  728. resize="none"
  729. placeholder=""
  730. readonly
  731. ></el-input>
  732. </el-form-item>
  733. </el-col>
  734. </el-row>
  735. <el-row :gutter="24">
  736. <el-col :span="24">
  737. <el-form-item label="体格检查">
  738. <el-input
  739. v-model="form.temperature"
  740. style="width: 200px"
  741. disabled
  742. >
  743. <template slot="prepend">体温:</template>
  744. <template slot="append">℃</template>
  745. </el-input>
  746. <el-input v-model="form.pulse" style="width: 220px" disabled>
  747. <template slot="prepend">脉搏: </template>
  748. <template slot="append">次/分</template>
  749. </el-input>
  750. <el-input
  751. v-model="form.respiratory"
  752. style="width: 220px"
  753. disabled
  754. >
  755. <template slot="prepend">呼吸: </template>
  756. <template slot="append">次/分</template>
  757. </el-input>
  758. </el-form-item>
  759. </el-col>
  760. </el-row>
  761. <el-row :gutter="24">
  762. <el-col>
  763. <el-form-item>
  764. <el-input v-model="form.sbp" style="width: 240px" disabled>
  765. <template slot="prepend">收缩压:</template>
  766. <template slot="append">mmHg</template>
  767. </el-input>
  768. <el-input v-model="form.dbp" style="width: 240px" disabled>
  769. <template slot="prepend">舒张压:</template>
  770. <template slot="append">mmHg</template>
  771. </el-input>
  772. </el-form-item>
  773. </el-col>
  774. </el-row>
  775. </div>
  776. <div style="flex: 1;" class="now_his">
  777. <el-row :gutter="24" style="height:100%;">
  778. <el-col :span="24" style="height:100%;">
  779. <el-form-item label="现病史 : " prop="present_history" style="height:100%;">
  780. <el-input
  781. style="height:100%;"
  782. type="textarea"
  783. :rows="3"
  784. v-model="form.present_history"
  785. resize="none"
  786. placeholder=""
  787. readonly
  788. ></el-input>
  789. </el-form-item>
  790. </el-col>
  791. </el-row>
  792. </div>
  793. </div>
  794. <el-row :gutter="24">
  795. <el-col :span="24">
  796. <el-form-item label="" prop="remark">
  797. <!-- <textarea v-model="form.remark" class="textarea" disabled></textarea> -->
  798. <el-input
  799. type="textarea"
  800. :rows="3"
  801. v-model="form.remark"
  802. resize="none"
  803. placeholder=""
  804. readonly
  805. ></el-input>
  806. </el-form-item>
  807. </el-col>
  808. <el-col :span="8">
  809. <el-form-item label="" prop="sch_remark">
  810. <!-- <textarea v-model="form.remark" class="textarea" disabled></textarea> -->
  811. <el-input
  812. type="textarea"
  813. :rows="3"
  814. v-model="form.sch_remark"
  815. resize="none"
  816. placeholder=""
  817. readonly
  818. ></el-input>
  819. </el-form-item>
  820. </el-col>
  821. <!-- <el-col :span="24">
  822. <el-form-item label="慢性病 : " prop="diseases">
  823. <el-checkbox-group v-model="form.diseases">
  824. <el-checkbox
  825. v-for="item in checkDisease"
  826. :label="item.id"
  827. :key="item.id"
  828. :value="item.id"
  829. disabled
  830. >{{ item.name }}</el-checkbox
  831. >
  832. </el-checkbox-group>
  833. </el-form-item>
  834. </el-col> -->
  835. </el-row>
  836. <!-- <el-col :span="24">
  837. <el-form-item>
  838. <el-button type="text" @click="treat_info_fold = !treat_info_fold"
  839. >{{ treat_info_fold ? "更多治疗信息" : "收起"
  840. }}<i class="el-icon--right" :class="treat_fold_icon"></i
  841. ></el-button>
  842. </el-form-item>
  843. </el-col> -->
  844. <el-col :span="24">
  845. <el-form-item label="登记人员 : ">
  846. <span>{{ form.registrars }} </span>
  847. </el-form-item>
  848. </el-col>
  849. <el-col :span="6">
  850. <el-form-item label="医生 : ">
  851. <el-select v-model="form.doctor" disabled>
  852. <el-option
  853. v-for="item in adminUserOptions"
  854. :key="item.id"
  855. :label="item.name"
  856. :value="item.id"
  857. />
  858. </el-select>
  859. </el-form-item>
  860. </el-col>
  861. </el-form>
  862. <!-- 打印预览 -->
  863. <div style="display: none">
  864. <div id="print-info-box">
  865. <div class="print_main_content" >
  866. <div class="order_title">{{ orgname }} 血液透析门诊病历</div>
  867. <div >
  868. <table >
  869. <!-- 用 thead 规定好宽度 -->
  870. <!-- <thead>
  871. <tr v-show="false">
  872. <td width="7%"></td>
  873. <td width="10%"></td>
  874. <td width="5%"></td>
  875. <td width="10%"></td>
  876. <td width="5%"></td>
  877. <td width="10%"></td>
  878. <td width="5%"></td>
  879. <td width="30%"></td>
  880. </tr>
  881. </thead> -->
  882. <tbody>
  883. <tr>
  884. <!-- -->
  885. <td style="width:8%;padding: 3px 0px;font-size: 17px;font-weight: 500;">
  886. 姓名
  887. <!-- <div class="td_proj_title">姓名</div> -->
  888. </td>
  889. <td style="padding: 3px 0px;font-size: 17px;">
  890. {{ patientPrint.name }}
  891. <!-- <div class="td_proj_content">{{ patientPrint.name }}</div> -->
  892. </td>
  893. <td style="padding: 3px 0px;font-size: 17px;">
  894. 性别
  895. <!-- <div class="td_proj_title">性别</div> -->
  896. </td>
  897. <td style="padding: 3px 0px;font-size: 17px;">
  898. {{ patientPrint.gender }}
  899. <!-- <div class="td_proj_content">{{ patientPrint.gender }}</div> -->
  900. </td>
  901. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  902. 年龄
  903. <!-- <div class="td_proj_title">年龄</div> -->
  904. </td>
  905. <td style="padding: 3px 0px;font-size: 17px;">
  906. {{ patientPrint.age }}岁
  907. <!-- <div class="td_proj_content">{{ patientPrint.age }}岁</div> -->
  908. </td>
  909. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  910. 籍贯
  911. <!-- <div class="td_proj_title">籍贯</div> -->
  912. </td>
  913. <td style="padding: 3px 0px;font-size: 17px;">
  914. {{ patientPrint.native_place }}
  915. <!-- <div class="td_proj_content td_align_left">
  916. {{ patientPrint.native_place }}
  917. </div> -->
  918. </td>
  919. </tr>
  920. <tr>
  921. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  922. 职业
  923. <!-- <div class="td_proj_title">职业</div> -->
  924. </td>
  925. <td style="padding: 3px 0px;font-size: 17px;">
  926. {{ patientPrint.profession }}
  927. <!-- <div class="td_proj_content">
  928. {{ patientPrint.profession }}
  929. </div> -->
  930. </td>
  931. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  932. 婚姻
  933. <!-- <div class="td_proj_title">婚姻</div> -->
  934. </td>
  935. <td style="padding: 3px 0px;font-size: 17px;">
  936. {{ patientPrint.marital_status }}
  937. <!-- <div class="td_proj_content">
  938. {{ patientPrint.marital_status }}
  939. </div> -->
  940. </td>
  941. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  942. 透析号
  943. <!-- <div class="td_proj_title">透析号</div> -->
  944. </td>
  945. <td style="padding: 3px 0px;font-size: 17px;">
  946. {{ patientPrint.dialysis_no }}
  947. <!-- <div class="td_proj_content">
  948. {{ patientPrint.dialysis_no }}
  949. </div> -->
  950. </td>
  951. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  952. 身份证号
  953. <!-- <div class="td_proj_title">身份证号</div> -->
  954. </td>
  955. <td style="padding: 3px 0px;font-size: 17px;">
  956. {{ patientPrint.id_card_no }}
  957. <!-- <div class="td_proj_content td_align_left">
  958. {{ patientPrint.id_card_no }}
  959. </div> -->
  960. </td>
  961. </tr>
  962. <tr>
  963. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  964. 民族
  965. <!-- <div class="td_proj_title">民族</div> valign="top" -->
  966. </td>
  967. <td style="padding: 3px 0px;font-size: 17px;">
  968. {{ patientPrint.nation }}
  969. <!-- <div class="td_proj_content">{{ patientPrint.nation }}</div> -->
  970. </td>
  971. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  972. 电话
  973. <!-- <div class="td_proj_title">电话</div> -->
  974. </td>
  975. <td colspan="3" style="padding: 3px 0px;font-size: 17px;">
  976. {{ patientPrint.phone }}
  977. <!-- <div class="td_proj_content td_align_left">
  978. {{ patientPrint.phone }}
  979. </div> -->
  980. </td>
  981. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">
  982. 家属电话
  983. <!-- <div class="td_proj_title">家属电话</div> -->
  984. </td>
  985. <td style="padding: 3px 0px;font-size: 17px;">
  986. {{ patientPrint.home_telephone }}
  987. <!-- <div class="td_proj_content td_align_left">
  988. {{ patientPrint.home_telephone }}
  989. </div> -->
  990. </td>
  991. </tr>
  992. <tr>
  993. <td style="padding: 3px 0px;font-size: 17px;font-weight: 500;">地址</td>
  994. <td colspan="7" style="text-align: left; padding:0px 5px;font-size: 17px;">
  995. <!-- class="td_proj_content td_align_left" -->
  996. <!-- <div > -->
  997. {{ patientPrint.home_address }}
  998. <!-- </div> -->
  999. </td>
  1000. </tr>
  1001. <tr>
  1002. <td style="padding: 3px 0px;font-size: 17px; font-weight: 500;">
  1003. 主诉
  1004. <!-- <div class="td_proj_title">主诉</div> -->
  1005. </td>
  1006. <!-- class="td_proj_content td_align_left" -->
  1007. <td colspan="7" style="text-align: left; padding:0px 5px ;font-size: 17px;">
  1008. {{ patientPrint.patient_complains }}
  1009. <!-- <div style="padding: 0px 0px;"
  1010. v-html="patientPrint.patient_complains"
  1011. ></div> -->
  1012. </td>
  1013. </tr>
  1014. <tr >
  1015. <td>
  1016. <div class="td_proj_title">现<br />病<br />史</div>
  1017. </td>
  1018. <td colspan="7">
  1019. <!-- <div class="td_proj_content td_align_left">{{patientPrint.present_history}}</div> -->
  1020. <div
  1021. class="td_proj_content td_align_left"
  1022. v-html="patientPrint.present_history"
  1023. ></div>
  1024. </td>
  1025. </tr>
  1026. <tr>
  1027. <td>
  1028. <div class="td_proj_title">既<br />往<br />史</div>
  1029. </td>
  1030. <td colspan="7">
  1031. <div class="td_proj_content td_align_left">
  1032. {{ patientPrint.past_history }}
  1033. </div>
  1034. <!-- v-html="patientPrint.past_history" -->
  1035. </td>
  1036. </tr>
  1037. <tr>
  1038. <td>
  1039. <div class="td_proj_title" v-if="org_id !=10278 && org_id!=10138 && org_id!=0">传<br />染<br />病</div>
  1040. <div class="td_proj_title" v-if="org_id==10138 || org_id == 10278 || org_id == 0">过<br />敏<br />史</div>
  1041. </td>
  1042. <td colspan="7">
  1043. <div class="td_proj_content td_align_left">
  1044. {{ patientPrint.contagions }}
  1045. </div>
  1046. </td>
  1047. </tr>
  1048. <tr>
  1049. <td colspan="8"><div class="td_proj_title">体格检查</div></td>
  1050. </tr>
  1051. <tr>
  1052. <td colspan="8">
  1053. <div class="td_proj_title">
  1054. T
  1055. {{
  1056. patientPrint.temperature
  1057. }}℃&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; P
  1058. {{
  1059. patientPrint.pulse
  1060. }}次/分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R
  1061. {{
  1062. patientPrint.respiratory
  1063. }}次/分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BP
  1064. {{ patientPrint.sbp }}/{{ patientPrint.dbp }} mmHg
  1065. </div>
  1066. </td>
  1067. </tr>
  1068. <tr>
  1069. <td colspan="8">
  1070. <div
  1071. class="td_proj_content td_align_left"
  1072. v-html="patientPrint.remark"
  1073. ></div>
  1074. </td>
  1075. </tr>
  1076. <tr>
  1077. <td>
  1078. <div class="td_proj_title">诊<br />断</div>
  1079. </td>
  1080. <td colspan="7">
  1081. <div
  1082. class="td_proj_content td_align_left"
  1083. v-html="patientPrint.diagnose"
  1084. ></div>
  1085. </td>
  1086. </tr>
  1087. <tr>
  1088. <td>
  1089. <div class="td_proj_title">诊<br />疗<br />计<br />划</div>
  1090. </td>
  1091. <td colspan="7">
  1092. <div
  1093. class="td_proj_content td_align_left"
  1094. v-html="patientPrint.treatment_plan"
  1095. ></div>
  1096. </td>
  1097. </tr>
  1098. </tbody>
  1099. </table>
  1100. <div class="print_footnote_panel">
  1101. <div class="proj">
  1102. <span class="proj_title">日期:</span>
  1103. <!-- {{ getTime(patientPrint.created_time) }} -->
  1104. <span v-if="org_id == 3907 || org_id == 9671|| org_id == 9675 || org_id == 10394">{{
  1105. getTime(patientPrint.created_time)
  1106. }}</span>
  1107. <span v-else>{{ printDate }}</span>
  1108. </div>
  1109. <div class="proj">
  1110. <span class="proj_title">医生签名:
  1111. <span v-if="patientPrint!=undefined&&getDcotorName(patientPrint.doctor) == ''">{{getDcotorNameOne(patientPrint.doctor)}}</span>
  1112. <span v-else>
  1113. <img style="height:30px;margin-top:20px" :src="getDcotorName(patientPrint.doctor)" alt="" srcset="">
  1114. </span>
  1115. </span>
  1116. </div>
  1117. </div>
  1118. </div>
  1119. </div>
  1120. </div>
  1121. </div>
  1122. <div hidden="hidden">
  1123. <div id="print-card-info">
  1124. <div
  1125. class="order_title"
  1126. align="center"
  1127. style="margin-bottom: 20px; font-size: 35px"
  1128. v-if="org_id != 10223"
  1129. >
  1130. 签到卡
  1131. </div>
  1132. <div
  1133. class="order_title"
  1134. align="center"
  1135. style="margin-bottom: 20px; font-size: 25px"
  1136. v-if="org_id == 10223"
  1137. >
  1138. 三优血液透析中心
  1139. </div>
  1140. <div align="center" style="margin-bottom: 4px; font-size: 25px">
  1141. 姓名:<span>&nbsp;&nbsp;{{ patientPrint.name }}</span
  1142. ><br />
  1143. </div>
  1144. <div align="center" style="margin-bottom: 20px; font-size: 25px">
  1145. 透析号:<span>&nbsp;&nbsp;{{ patientPrint.dialysis_no }}</span>
  1146. </div>
  1147. <div>
  1148. <div id="qrcode" align="center"></div>
  1149. </div>
  1150. </div>
  1151. </div>
  1152. </div>
  1153. </template>
  1154. <script>
  1155. import { getDataConfig } from "@/utils/data";
  1156. import { getToken } from "@/api/qiniu";
  1157. // import print from "print-js";
  1158. import {
  1159. getFileExtension,
  1160. isCardNo,
  1161. jsGetAge,
  1162. isPositiveInteger,
  1163. dialysisAge,
  1164. uParseTime,
  1165. } from "@/utils/tools";
  1166. import {
  1167. generateDialysisNo,
  1168. createPatient,
  1169. editPatient,
  1170. fetchPatient,
  1171. } from "@/api/patient";
  1172. import { fetchAllDoctorAndNurse, fetchAllAdminUsers } from "@/api/doctor";
  1173. import { getZones } from "@/api/device/device";
  1174. import print from "print-js";
  1175. import QRCode from "qrcodejs2";
  1176. import { Base64 } from "js-base64";
  1177. import { parse } from "path";
  1178. const defaultForm = {
  1179. avatar: "",
  1180. patientType: "",
  1181. dialysisNo: "",
  1182. admissionNumber: "",
  1183. source: "",
  1184. lapseto: "",
  1185. partition: "",
  1186. bed: "",
  1187. name: "",
  1188. gender: "",
  1189. nation: "",
  1190. native_place: "",
  1191. maritalStatus: "",
  1192. idCardNo: "",
  1193. birth: "",
  1194. age: "",
  1195. reimbursementWayID: "",
  1196. healthCareNo: "",
  1197. healthCareDueDate: "",
  1198. height: "",
  1199. blood: "",
  1200. rh: "",
  1201. healthCareDueAlertDate: "",
  1202. education: "",
  1203. profession: "",
  1204. phone: "",
  1205. homeTelephone: "",
  1206. homeAddress: "",
  1207. work: "",
  1208. receivingDate: "",
  1209. firstDialysisDate: "",
  1210. dialysisAge: "",
  1211. induction: "",
  1212. initial: "",
  1213. dialysisTotal: "",
  1214. contagions: [],
  1215. doctor: "",
  1216. nurse: "",
  1217. assessment: "",
  1218. diseases: [],
  1219. diagnose: "",
  1220. registrars: "",
  1221. patient_complains: "",
  1222. present_history: "",
  1223. past_history: "",
  1224. temperature: "",
  1225. pulse: "",
  1226. respiratory: "",
  1227. sbp: "",
  1228. dbp: "",
  1229. record_date: "",
  1230. response_result: "",
  1231. is_infectious: "",
  1232. formItem: [],
  1233. tell_phone: "",
  1234. first_treatment_date: "",
  1235. dialysis_age: "",
  1236. expense_kind: "",
  1237. contact_name: "",
  1238. sch_remark: "",
  1239. org_id: 0,
  1240. troble_shoot: "",
  1241. zb_patient_id: "",
  1242. treatment_plan: "",
  1243. doctor:"",
  1244. record_number:"",
  1245. patient_source:"",
  1246. patient_start_time:"",
  1247. };
  1248. export default {
  1249. name: "patientDetail",
  1250. components: {},
  1251. data() {
  1252. return {
  1253. expenseOptions: [
  1254. { id: 1, name: "基本医保" },
  1255. { id: 2, name: "新农合" },
  1256. { id: 3, name: "自费医疗" },
  1257. { id: 4, name: "公费医疗" },
  1258. { id: 5, name: "商业保险" },
  1259. { id: 6, name: "军队医疗" },
  1260. { id: 7, name: "其他" },
  1261. ],
  1262. patientSourceList:[
  1263. {value:1,label:"门诊"},
  1264. {value:2,label:"住院"},
  1265. {value:3,label:"请假"},
  1266. {value:4,label:"备注"}
  1267. ],
  1268. generic_info_fold: true,
  1269. treat_info_fold: true,
  1270. dialogFormVisible: false,
  1271. orgname: "",
  1272. adminusername: "",
  1273. form: Object.assign({}, defaultForm),
  1274. formSubmit: true,
  1275. submitMethod: "",
  1276. uploadData: { token: "", key: "" },
  1277. dialogImageUrl: "",
  1278. qiniuDomain: "https://images.shengws.com/",
  1279. dialogVisible: false,
  1280. typeOptions: null,
  1281. styleOptions: null,
  1282. sourceOptions: [
  1283. { value: 1, label: "门诊" },
  1284. { value: 2, label: "住院" },
  1285. ],
  1286. lapsetoOptions: [
  1287. { value: 1, label: "留治" },
  1288. { value: 2, label: "转出" },
  1289. ],
  1290. partitionOptions: [],
  1291. sexOptions: [
  1292. { value: 1, label: "男" },
  1293. { value: 2, label: "女" },
  1294. ],
  1295. isHospitalFirstDialysisOptions: [
  1296. { value: 1, label: "是" },
  1297. { value: 2, label: "否" },
  1298. ],
  1299. predialysisConditionOptions: [
  1300. { value: 1, label: "腹膜透析" },
  1301. { value: 2, label: "肾移植" },
  1302. ],
  1303. maritalOptions: null,
  1304. wayOptions: null,
  1305. educationOptions: null,
  1306. professionOptions: null,
  1307. inductionOptions: null,
  1308. doctorOptions: null,
  1309. nurseOptions: null,
  1310. adminUserOptions: [],
  1311. infections: [],
  1312. rhOptions: null,
  1313. checkDisease: null,
  1314. contagionList: null,
  1315. loading: null,
  1316. patientID: 0,
  1317. patientPrint: {},
  1318. print_time: "",
  1319. printDate: "",
  1320. rules: {
  1321. contagions: [{ type: "array", required: false, trigger: "change" }],
  1322. avatar: [{ required: true, message: "请上传头像", trigger: "blur" }],
  1323. patientType: [
  1324. { required: true, message: "请选择患者类型", trigger: "blur" },
  1325. ],
  1326. dialysisNo: [
  1327. { required: true, message: "请填写透析号", trigger: "blur" },
  1328. ],
  1329. admissionNumber: [
  1330. { required: true, message: "请填写住院(门诊)号", trigger: "blur" },
  1331. ],
  1332. source: [
  1333. { required: true, message: "请选择患者来源", trigger: "blur" },
  1334. ],
  1335. lapseto: [
  1336. { required: true, message: "请选择治疗状态", trigger: "blur" },
  1337. ],
  1338. name: [{ required: true, message: "请填写姓名", trigger: "blur" }],
  1339. gender: [{ required: true, message: "请选择性别", trigger: "blur" }],
  1340. idCardNo: [
  1341. { required: true, message: "请填写身份证号", trigger: "blur" },
  1342. ],
  1343. birth: [{ required: true, message: "请填写生日", trigger: "blur" }],
  1344. },
  1345. shootList: [
  1346. { id: 1, name: "是" },
  1347. { id: 2, name: "否" },
  1348. ],
  1349. operators:[],
  1350. };
  1351. },
  1352. computed: {
  1353. generic_fold_icon: function () {
  1354. return this.generic_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up";
  1355. },
  1356. treat_fold_icon: function () {
  1357. return this.treat_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up";
  1358. },
  1359. },
  1360. created() {
  1361. this.org_id = this.$store.getters.xt_user.org.id;
  1362. this.form.doctor = this.$store.getters.xt_user.user.id
  1363. console.log("owowow",this.$store.getters.xt_user.user.id)
  1364. this.styleOptions = this.$store.getters.patient_types;
  1365. // this.partitionOptions = this.$store.getters.partitions;
  1366. this.maritalOptions = getDataConfig("patient", "marital_options");
  1367. this.wayOptions = getDataConfig("patient", "reimbursement_ways");
  1368. this.typeOptions = this.$store.getters.blood_types;
  1369. this.rhOptions = this.$store.getters.rh;
  1370. this.educationOptions = getDataConfig("patient", "education_types");
  1371. this.professionOptions = getDataConfig("patient", "profession_options");
  1372. this.inductionOptions = this.$store.getters.induction_options;
  1373. this.contagionList = this.$store.getters.contagions;
  1374. this.checkDisease = this.$store.getters.disease;
  1375. var xtuser = this.$store.getters.xt_user;
  1376. this.orgname = xtuser.org.org_name;
  1377. this.adminusername = xtuser.user.user_name;
  1378. this.fetchAllAdminUsers();
  1379. const id = this.$route.params && this.$route.params.id;
  1380. this.patientID = parseInt(id);
  1381. if (isNaN(this.patientID) || this.patientID <= 0) {
  1382. console.log("patient detail not had id");
  1383. this.$notify.error({
  1384. title: "错误",
  1385. message: "无效的id",
  1386. });
  1387. this.$router.push("/patients/patients");
  1388. }
  1389. this.fetchPatient(id);
  1390. this.getZones();
  1391. var ptime = Math.round(new Date().getTime() / 1000);
  1392. // this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}');
  1393. var data = new Date();
  1394. var month =
  1395. data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
  1396. var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
  1397. this.printDate = data.getFullYear() + "-" + month + "-" + date;
  1398. },
  1399. methods: {
  1400. getTime(val) {
  1401. return uParseTime(val, "{y}年{m}月{d}日");
  1402. },
  1403. printThisInfo() {
  1404. var ptime = Math.round(new Date().getTime() / 1000);
  1405. this.print_time = uParseTime(ptime, "{y}年{m}月{d}日");
  1406. const style =
  1407. "@page {margin-top:10px;}@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .print_main_content .order_title { text-align: center; font-size: 23px; line-height: 50px; font-weight: 500; } .print_main_content table { width: 100%; border-collapse: collapse; padding: 2px; } .print_main_content table tbody tr{page-break-inside:avoid;} .print_main_content table tbody tr td { border: 1px solid; text-align: center; padding: 10px 8px; } .td_proj_title { font-size: 18px; line-height: 25px; font-weight: 500; } .td_proj_content { font-size: 18px; line-height: 25px; } .td_align_left { text-align: left; } .print_footnote_panel { font-size: 17px; line-height: 40px; } .print_footnote_panel .proj { display: inline-block; width: 49%; } .print_footnote_panel .proj .proj_title { font-weight: 500;} }";
  1408. setTimeout(() => {
  1409. printJS({
  1410. printable: "print-info-box",
  1411. type: "html",
  1412. style: style,
  1413. scanStyles: false,
  1414. });
  1415. }, 1);
  1416. },
  1417. getZones() {
  1418. getZones().then((response) => {
  1419. if (response.data.state === 1) {
  1420. this.partitionOptions = response.data.data.zones;
  1421. }
  1422. });
  1423. },
  1424. fetchPatient(id) {
  1425. fetchPatient(id)
  1426. .then((response) => {
  1427. console.log(response.data.data);
  1428. if (response.data.state === 1) {
  1429. this.$emit("tran-patient-info", response.data.data.patient);
  1430. var patietInfo = response.data.data.patient;
  1431. console.log("触发了吗无222222", patietInfo);
  1432. this.form.avatar = patietInfo.avatar;
  1433. this.form.name = patietInfo.name;
  1434. this.form.alias = patietInfo.alias;
  1435. this.form.lapseto = patietInfo.lapseto;
  1436. this.form.idCardNo = patietInfo.id_card_no;
  1437. this.form.dialysisNo = patietInfo.dialysis_no;
  1438. this.form.gender = patietInfo.gender;
  1439. this.form.is_infectious = patietInfo.is_infectious;
  1440. this.form.troble_shoot = patietInfo.troble_shoot;
  1441. this.form.zb_patient_id = patietInfo.zb_patient_id;
  1442. // this.form.record_date = patietInfo.is_infectious
  1443. this.form.response_result = patietInfo.response_result;
  1444. this.form.remind_cycle = patietInfo.remind_cycle;
  1445. this.form.treatment_plan = patietInfo.treatment_plan;
  1446. this.form.doctor = patietInfo.doctor
  1447. if(this.form.doctor == 0){
  1448. this.form.doctor = ""
  1449. }
  1450. // if (patietInfo.is_infectious == 1) {
  1451. // this.form.remind_cycle = 0;
  1452. // }
  1453. // console.log("222222", this.form.remind_cycle);
  1454. this.form.user_sys_before_count = patietInfo.user_sys_before_count;
  1455. this.infections = response.data.data.infections;
  1456. this.form.formItem = this.infections;
  1457. if (this.infections != null) {
  1458. if (this.infections.length > 0) {
  1459. this.form.record_date = uParseTime(
  1460. this.infections[0].inspect_date,
  1461. "{y}-{m}-{d}"
  1462. );
  1463. const select_options = ["阴性", "阳性", "弱阳性"];
  1464. for (let i = 0; i < this.infections.length; i++) {
  1465. this.infections[i]["select_options"] = select_options;
  1466. this.infections[i]["value"] =
  1467. this.infections[i].inspect_value;
  1468. }
  1469. }
  1470. }
  1471. if (patietInfo.gender === 1 || patietInfo.gender === 2) {
  1472. this.form.gender = patietInfo.gender;
  1473. }
  1474. this.form.nation = patietInfo.nation;
  1475. this.form.native_place = patietInfo.native_place;
  1476. this.form.birth = uParseTime(patietInfo.birthday, "{y}-{m}-{d}");
  1477. this.form.firstDialysisDate = uParseTime(
  1478. patietInfo.first_dialysis_date,
  1479. "{y}-{m}-{d}"
  1480. );
  1481. this.form.height = patietInfo.height + "";
  1482. // this.form.age = jsGetAge(this.form.birth, "-");
  1483. if (patietInfo.marital_status > 0) {
  1484. this.form.maritalStatus = patietInfo.marital_status;
  1485. }
  1486. this.form.children = patietInfo.children;
  1487. this.form.admissionNumber = patietInfo.admission_number;
  1488. if (patietInfo.reimbursement_way_id > 0) {
  1489. this.form.reimbursementWayID = patietInfo.reimbursement_way_id;
  1490. }
  1491. this.form.healthCareNo = patietInfo.health_care_no;
  1492. this.form.phone = patietInfo.phone;
  1493. this.form.homeTelephone = patietInfo.home_telephone;
  1494. this.form.relative_phone = patietInfo.relative_phone;
  1495. this.form.relative_relations = patietInfo.relative_relations;
  1496. this.form.homeAddress = patietInfo.home_address;
  1497. this.form.work = patietInfo.work_unit;
  1498. this.form.unit_address = patietInfo.unit_address;
  1499. if (patietInfo.age == 0) {
  1500. this.form.age = jsGetAge(this.form.birth, "-");
  1501. } else {
  1502. this.form.age = patietInfo.age;
  1503. }
  1504. if (patietInfo.profession > 0) {
  1505. this.form.profession = patietInfo.profession;
  1506. }
  1507. if (patietInfo.education_level > 0) {
  1508. this.form.education = patietInfo.education_level;
  1509. }
  1510. if (patietInfo.source === 1 || patietInfo.source === 2) {
  1511. this.form.source = patietInfo.source;
  1512. }
  1513. if (patietInfo.lapseto === 1 || patietInfo.lapseto === 2) {
  1514. this.form.lapseto = patietInfo.lapseto;
  1515. }
  1516. if (
  1517. patietInfo.is_hospital_first_dialysis === 1 ||
  1518. patietInfo.is_hospital_first_dialysis === 2
  1519. ) {
  1520. this.form.is_hospital_first_dialysis =
  1521. patietInfo.is_hospital_first_dialysis;
  1522. }
  1523. if (patietInfo.first_dialysis_date !== 0) {
  1524. this.form.firstDialysisDate = uParseTime(
  1525. patietInfo.first_dialysis_date,
  1526. "{y}-{m}-{d}"
  1527. );
  1528. }
  1529. this.form.first_dialysis_hospital =
  1530. patietInfo.first_dialysis_hospital;
  1531. if (patietInfo.predialysis_condition.length > 0) {
  1532. this.form.predialysis_condition =
  1533. patietInfo.predialysis_condition.split(",");
  1534. }
  1535. this.form.pre_hospital_dialysis_frequency =
  1536. patietInfo.pre_hospital_dialysis_frequency;
  1537. this.form.pre_hospital_dialysis_times =
  1538. patietInfo.pre_hospital_dialysis_times;
  1539. if (patietInfo.hospital_first_dialysis_date !== 0) {
  1540. this.form.hospital_first_dialysis_date = uParseTime(
  1541. patietInfo.hospital_first_dialysis_date,
  1542. "{y}-{m}-{d}"
  1543. );
  1544. }
  1545. this.form.contagions = response.data.data.contagions;
  1546. this.form.diseases = response.data.data.diseases;
  1547. this.form.remark = patietInfo.remark;
  1548. this.form.sch_remark = patietInfo.sch_remark;
  1549. this.form.diagnose = patietInfo.diagnose;
  1550. this.form.patient_complains = patietInfo.patient_complains;
  1551. this.form.present_history = patietInfo.present_history;
  1552. this.form.past_history = patietInfo.past_history;
  1553. this.form.temperature = patietInfo.temperature;
  1554. this.form.pulse = patietInfo.pulse;
  1555. this.form.respiratory = patietInfo.respiratory;
  1556. this.form.sbp = patietInfo.sbp;
  1557. this.form.dbp = patietInfo.dbp;
  1558. this.form.contact_name = patietInfo.contact_name;
  1559. this.form.tell_phone = patietInfo.tell_phone;
  1560. this.form.dialysis_age = patietInfo.dialysis_age;
  1561. this.form.record_number = patietInfo.record_number
  1562. if (patietInfo.expense_kind == 0) {
  1563. this.form.expense_kind = "";
  1564. } else {
  1565. this.form.expense_kind = patietInfo.expense_kind;
  1566. }
  1567. this.form.first_treatment_date = uParseTime(
  1568. patietInfo.first_treatment_date,
  1569. "{y}-{m}-{d}"
  1570. );
  1571. this.form.patient_source = patietInfo.patient_source
  1572. if (patietInfo.patient_start_time != 0) {
  1573. this.form.patient_start_time = uParseTime(
  1574. patietInfo.patient_start_time,
  1575. "{y}-{m}-{d}"
  1576. );
  1577. }
  1578. // this.form.initial = patietInfo.initial_dialysis + "";
  1579. // this.form.dialysisTotal = patietInfo.total_dialysis + "";
  1580. // this.form.assessment = patietInfo.evaluate;
  1581. // if (patietInfo.patient_type > 0) {
  1582. // this.form.patientType = patietInfo.patient_type;
  1583. // }
  1584. // if (patietInfo.partition_id > 0) {
  1585. // this.form.partition = patietInfo.partition_id;
  1586. // }
  1587. // if (patietInfo.bed_id > 0) {
  1588. // this.form.bed = patietInfo.bed_id;
  1589. // }
  1590. // this.form.healthCareDueDate = uParseTime(
  1591. // patietInfo.health_care_due_date,
  1592. // "{y}-{m}-{d}"
  1593. // );
  1594. // if (patietInfo.blood_type > 0) {
  1595. // this.form.blood = patietInfo.blood_type;
  1596. // }
  1597. // if (patietInfo.rh > 0) {
  1598. // this.form.rh = patietInfo.rh;
  1599. // }
  1600. // this.form.healthCareDueAlertDate = uParseTime(
  1601. // patietInfo.health_care_due_alert_date,
  1602. // "{y}-{m}-{d}"
  1603. // );
  1604. // this.form.receivingDate = uParseTime(
  1605. // patietInfo.receiving_date,
  1606. // "{y}-{m}-{d}"
  1607. // );
  1608. // this.form.dialysisAge = dialysisAge(
  1609. // this.form.firstDialysisDate,
  1610. // "-"
  1611. // );
  1612. // if (patietInfo.induction_period > 0) {
  1613. // this.form.induction = patietInfo.induction_period;
  1614. // }
  1615. // if (patietInfo.attending_doctor_id > 0) {
  1616. // this.form.doctor = patietInfo.attending_doctor_id;
  1617. // }
  1618. // if (patietInfo.head_nurse_id > 0) {
  1619. // this.form.nurse = patietInfo.head_nurse_id;
  1620. // }
  1621. // if (patietInfo.registrars_id > 0) {
  1622. // this.form.registrars = patietInfo.registrars_id;
  1623. // }
  1624. var contagionsArr = response.data.data.contagions;
  1625. var diseasesArr = response.data.data.diseases;
  1626. // console.log('123456',response.data.data);
  1627. this.patientPrint = patietInfo;
  1628. var sourceLen = this.sourceOptions.length;
  1629. for (let index = 0; index < sourceLen; index++) {
  1630. if (this.sourceOptions[index].value === patietInfo.source) {
  1631. this.patientPrint.source = this.sourceOptions[index].label;
  1632. break;
  1633. }
  1634. }
  1635. var styleLen = this.styleOptions.length;
  1636. for (let index = 0; index < styleLen; index++) {
  1637. if (this.styleOptions[index].id === patietInfo.patient_type) {
  1638. this.patientPrint.patient_type = this.styleOptions[index].name;
  1639. break;
  1640. }
  1641. }
  1642. var partitionLen = this.partitionOptions.length;
  1643. for (let index = 0; index < partitionLen; index++) {
  1644. if (this.partitionOptions[index].id === patietInfo.partition_id) {
  1645. this.patientPrint.partition_id =
  1646. this.partitionOptions[index].name;
  1647. break;
  1648. }
  1649. }
  1650. this.patientPrint.bed_id =
  1651. patietInfo.bed_id > 0 ? patietInfo.bed_id : "";
  1652. if (patietInfo.gender === 1) {
  1653. this.patientPrint.gender = "男";
  1654. } else if (patietInfo.gender === 2) {
  1655. this.patientPrint.gender = "女";
  1656. } else {
  1657. this.patientPrint.gender = "";
  1658. }
  1659. var maritalLen = this.maritalOptions.length;
  1660. console.log(maritalLen);
  1661. for (let index = 0; index < maritalLen; index++) {
  1662. if (
  1663. this.maritalOptions[index].id ==
  1664. response.data.data.patient.marital_status
  1665. ) {
  1666. this.patientPrint.marital_status =
  1667. this.maritalOptions[index].name;
  1668. }
  1669. }
  1670. this.patientPrint.birthday = uParseTime(
  1671. patietInfo.birthday,
  1672. "{y}-{m}-{d}"
  1673. );
  1674. this.patientPrint.age = jsGetAge(this.patientPrint.birthday, "-");
  1675. this.patientPrint.patient_complains =
  1676. patietInfo.patient_complains.replace(/\n/g, "<br/>");
  1677. // console.log('qwerewqrt',patietInfo.present_history);
  1678. this.patientPrint.present_history =
  1679. patietInfo.present_history.replace(/\n/g, "<br/>");
  1680. console.log('qwerewqrt',patietInfo.past_history);
  1681. this.patientPrint.past_history = patietInfo.past_history.replace(
  1682. /\n/g,
  1683. "<br/>"
  1684. );
  1685. this.patientPrint.remark = patietInfo.remark.replace(
  1686. /\n/g,
  1687. "<br/>"
  1688. );
  1689. this.patientPrint.sch_remark = patietInfo.sch_remark.replace(
  1690. /\n/g,
  1691. "<br/>"
  1692. );
  1693. this.patientPrint.diagnose = patietInfo.diagnose.replace(
  1694. /\n/g,
  1695. "<br/>"
  1696. );
  1697. if (typeof patietInfo.temperature === "number") {
  1698. this.patientPrint.temperature = patietInfo.temperature.toFixed(1);
  1699. }
  1700. if (patietInfo.reimbursement_way_id > 0) {
  1701. var wayLen = this.wayOptions.length;
  1702. for (let index = 0; index < wayLen; index++) {
  1703. if (
  1704. this.wayOptions[index].id === patietInfo.reimbursement_way_id
  1705. ) {
  1706. this.patientPrint.reimbursement_way_id =
  1707. this.wayOptions[index].name;
  1708. break;
  1709. }
  1710. }
  1711. } else {
  1712. this.patientPrint.reimbursement_way_id = "";
  1713. }
  1714. if (patietInfo.health_care_due_date !== 0) {
  1715. this.patientPrint.health_care_due_date = uParseTime(
  1716. patietInfo.health_care_due_date,
  1717. "{y}-{m}-{d}"
  1718. );
  1719. } else {
  1720. this.patientPrint.health_care_due_date = "";
  1721. }
  1722. if (patietInfo.blood_type > 0) {
  1723. var typeLen = this.typeOptions.length;
  1724. for (let index = 0; index < typeLen; index++) {
  1725. if (this.typeOptions[index].id === patietInfo.blood_type) {
  1726. this.patientPrint.blood_type = this.typeOptions[index].name;
  1727. break;
  1728. }
  1729. }
  1730. } else {
  1731. this.patientPrint.blood_type = "";
  1732. }
  1733. if (patietInfo.rh > 0) {
  1734. var rhLen = this.rhOptions.length;
  1735. for (let index = 0; index < rhLen; index++) {
  1736. if (this.rhOptions[index].id === patietInfo.rh) {
  1737. this.patientPrint.rh = this.rhOptions[index].name;
  1738. break;
  1739. }
  1740. }
  1741. } else {
  1742. this.patientPrint.rh = "";
  1743. }
  1744. if (patietInfo.health_care_due_alert_date !== 0) {
  1745. this.patientPrint.health_care_due_alert_date = uParseTime(
  1746. patietInfo.health_care_due_alert_date,
  1747. "{y}-{m}-{d}"
  1748. );
  1749. } else {
  1750. this.patientPrint.health_care_due_alert_date = "";
  1751. }
  1752. if (patietInfo.education_level > 0) {
  1753. var eLen = this.educationOptions.length;
  1754. for (let index = 0; index < eLen; index++) {
  1755. if (
  1756. this.educationOptions[index].id === patietInfo.education_level
  1757. ) {
  1758. this.patientPrint.education_level =
  1759. this.educationOptions[index].name;
  1760. break;
  1761. }
  1762. }
  1763. } else {
  1764. this.patientPrint.education_level = "";
  1765. }
  1766. if (patietInfo.profession > 0) {
  1767. var eLen = this.professionOptions.length;
  1768. for (let index = 0; index < eLen; index++) {
  1769. if (
  1770. this.professionOptions[index].id === patietInfo.profession
  1771. ) {
  1772. this.patientPrint.profession =
  1773. this.professionOptions[index].name;
  1774. break;
  1775. }
  1776. }
  1777. } else {
  1778. this.patientPrint.profession = "";
  1779. }
  1780. if (patietInfo.receiving_date !== 0) {
  1781. this.patientPrint.receiving_date = uParseTime(
  1782. patietInfo.receiving_date,
  1783. "{y}-{m}-{d}"
  1784. );
  1785. } else {
  1786. this.patientPrint.receiving_date = "";
  1787. }
  1788. if (patietInfo.first_dialysis_date !== 0) {
  1789. this.patientPrint.first_dialysis_date = uParseTime(
  1790. patietInfo.first_dialysis_date,
  1791. "{y}-{m}-{d}"
  1792. );
  1793. this.patientPrint.dialysis_age = dialysisAge(
  1794. this.patientPrint.first_dialysis_date
  1795. );
  1796. } else {
  1797. this.patientPrint.first_dialysis_date = "";
  1798. this.patientPrint.dialysis_age = "";
  1799. }
  1800. if (patietInfo.induction_period > 0) {
  1801. var eLen = this.inductionOptions.length;
  1802. for (let index = 0; index < eLen; index++) {
  1803. if (
  1804. this.inductionOptions[index].id ===
  1805. patietInfo.induction_period
  1806. ) {
  1807. this.patientPrint.induction_period =
  1808. this.inductionOptions[index].name;
  1809. break;
  1810. }
  1811. }
  1812. } else {
  1813. this.patientPrint.induction_period = "";
  1814. }
  1815. if (patietInfo.attending_doctor_id > 0) {
  1816. var eLen = this.adminUserOptions.length;
  1817. for (let index = 0; index < eLen; index++) {
  1818. if (
  1819. this.adminUserOptions[index].id ===
  1820. patietInfo.attending_doctor_id
  1821. ) {
  1822. this.patientPrint.attending_doctor_id =
  1823. this.adminUserOptions[index].name;
  1824. break;
  1825. }
  1826. }
  1827. } else {
  1828. this.patientPrint.attending_doctor_id = "";
  1829. }
  1830. if (patietInfo.head_nurse_id > 0) {
  1831. var eLen = this.adminUserOptions.length;
  1832. for (let index = 0; index < eLen; index++) {
  1833. if (
  1834. this.adminUserOptions[index].id === patietInfo.head_nurse_id
  1835. ) {
  1836. this.patientPrint.head_nurse_id =
  1837. this.adminUserOptions[index].name;
  1838. break;
  1839. }
  1840. }
  1841. } else {
  1842. this.patientPrint.head_nurse_id = "";
  1843. }
  1844. if (contagionsArr.length > 0) {
  1845. var contagionsIdArr = {};
  1846. var alen = contagionsArr.length;
  1847. for (let index = 0; index < alen; index++) {
  1848. contagionsIdArr[contagionsArr[index]] = 1;
  1849. }
  1850. var printContagions = [];
  1851. var clen = this.contagionList.length;
  1852. for (let index = 0; index < clen; index++) {
  1853. if (this.contagionList[index].id in contagionsIdArr) {
  1854. printContagions.push(this.contagionList[index].name);
  1855. }
  1856. }
  1857. this.patientPrint.contagions = printContagions.join("、");
  1858. } else {
  1859. this.patientPrint.contagions = "阴性";
  1860. }
  1861. if (diseasesArr.length > 0) {
  1862. var diseasesIdArr = {};
  1863. var alen = diseasesArr.length;
  1864. for (let index = 0; index < alen; index++) {
  1865. diseasesIdArr[diseasesArr[index]] = 1;
  1866. }
  1867. var printDisease = [];
  1868. var clen = this.checkDisease.length;
  1869. for (let index = 0; index < clen; index++) {
  1870. if (this.checkDisease[index].id in diseasesIdArr) {
  1871. printDisease.push(this.checkDisease[index].name);
  1872. }
  1873. }
  1874. this.patientPrint.diseases = printDisease.join("、");
  1875. } else {
  1876. this.patientPrint.diseases = "";
  1877. }
  1878. if (patietInfo.registrars_id > 0) {
  1879. var eLen = this.adminUserOptions.length;
  1880. for (let index = 0; index < eLen; index++) {
  1881. if (
  1882. this.adminUserOptions[index].id === patietInfo.registrars_id
  1883. ) {
  1884. this.patientPrint.registrars =
  1885. this.adminUserOptions[index].name;
  1886. this.form.registrars = this.adminUserOptions[index].name;
  1887. break;
  1888. }
  1889. }
  1890. } else {
  1891. this.patientPrint.registrars = "";
  1892. }
  1893. if (patietInfo.hospital_first_dialysis_date !== 0) {
  1894. this.patientPrint.hospital_first_dialysis_date = uParseTime(
  1895. patietInfo.hospital_first_dialysis_date,
  1896. "{y}-{m}-{d}"
  1897. );
  1898. } else {
  1899. this.patientPrint.hospital_first_dialysis_date = "";
  1900. }
  1901. this.checkIdCardNo();
  1902. } else {
  1903. console.log("patient get err state");
  1904. this.$notify.error({
  1905. title: "错误",
  1906. message: "网络异常",
  1907. });
  1908. this.$router.push("/patients/patients");
  1909. }
  1910. // this.postForm = response.data
  1911. // // Just for test
  1912. // this.postForm.title += ` Article Id:${this.postForm.id}`
  1913. // this.postForm.content_short += ` Article Id:${this.postForm.id}`
  1914. })
  1915. .catch((err) => {
  1916. console.log("patient get err", err);
  1917. this.$notify.error({
  1918. title: "错误",
  1919. message: "网络异常",
  1920. });
  1921. this.$router.push("/patients/patients");
  1922. });
  1923. },
  1924. fetchAllDoctorAndNurse() {
  1925. fetchAllDoctorAndNurse().then((response) => {
  1926. if (response.data.state === 1) {
  1927. this.doctorOptions = response.data.data.doctors;
  1928. this.nurseOptions = response.data.data.nursers;
  1929. }
  1930. });
  1931. },
  1932. fetchAllAdminUsers() {
  1933. fetchAllAdminUsers().then((response) => {
  1934. if (response.data.state === 1) {
  1935. this.adminUserOptions = response.data.data.users;
  1936. this.operators = response.data.data.operators
  1937. console.log("医生签名",this.operators)
  1938. }
  1939. });
  1940. },
  1941. getDcotorName(admin_user_id){
  1942. var url = ""
  1943. if(this.operators!=null && this.operators.length > 0){
  1944. for(let i=0;i<this.operators.length;i++){
  1945. if(admin_user_id == this.operators[i].admin_user_id){
  1946. url = this.operators[i].url
  1947. }
  1948. }
  1949. }
  1950. return url
  1951. },
  1952. getDcotorNameOne(admin_user_id){
  1953. var name = ""
  1954. for(let i=0;i<this.adminUserOptions.length;i++){
  1955. if(admin_user_id == this.adminUserOptions[i].id){
  1956. name = this.adminUserOptions[i].name
  1957. }
  1958. }
  1959. return name
  1960. },
  1961. printCard() {
  1962. var ptime = Math.round(new Date().getTime() / 1000);
  1963. this.print_time = uParseTime(ptime, "{y}年{m}月{d}日");
  1964. const style =
  1965. "@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .print_main_content .order_title { text-align: center; font-size: 23px; line-height: 50px; font-weight: 500; } .print_main_content table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } .print_main_content table tbody tr td { border: 1px solid; text-align: center; padding: 10px 8px; } .td_proj_title { font-size: 18px; line-height: 25px; font-weight: 500; } .td_proj_content { font-size: 18px; line-height: 25px; } .td_align_left { text-align: left; } .print_footnote_panel { font-size: 17px; line-height: 40px; } .print_footnote_panel .proj { display: inline-block; width: 49%; } .print_footnote_panel .proj .proj_title { font-weight: 500;} }";
  1966. setTimeout(() => {
  1967. printJS({
  1968. printable: "print-card-info",
  1969. type: "html",
  1970. style: style,
  1971. scanStyles: false,
  1972. });
  1973. }, 1);
  1974. var patientID = this.patientPrint.id;
  1975. var name = this.patientPrint.name;
  1976. var gender = this.patientPrint.gender;
  1977. if (gender === 1) {
  1978. gender = "男";
  1979. }
  1980. if (gender === 2) {
  1981. gender = "女";
  1982. }
  1983. var idCardNo = this.patientPrint.id_card_no;
  1984. var dialysisNo = this.patientPrint.dialysis_no;
  1985. var phone = this.patientPrint.phone;
  1986. var healthCareNo = this.patientPrint.health_care_no;
  1987. // Base64加密
  1988. var epatientID = this.Base64.encode(patientID);
  1989. var ename = this.Base64.encode(name);
  1990. var egender = this.Base64.encode(gender);
  1991. var eidCardNo = this.Base64.encode(idCardNo);
  1992. var edialysisNo = this.Base64.encode(dialysisNo);
  1993. var ephone = this.Base64.encode(phone);
  1994. var eheathCareNo = this.Base64.encode(healthCareNo);
  1995. console.log(
  1996. "id号:" + epatientID,
  1997. "姓名:" + ename,
  1998. "性别:" + egender,
  1999. "身份证:" + eidCardNo,
  2000. "透析号:" + edialysisNo,
  2001. "电话:" + ephone,
  2002. "社保号:" + eheathCareNo
  2003. );
  2004. // var params =new Object();
  2005. // params.id = this.patientPrint.id
  2006. // params.name = this.patientPrint.name;
  2007. // this.$options.methods.qrcode(epatientID, ename, egender, eidCardNo, edialysisNo, ephone, eheathCareNo)// 调用生成二维码的方法
  2008. this.$options.methods.qrcode(
  2009. patientID,
  2010. name,
  2011. gender,
  2012. idCardNo,
  2013. dialysisNo,
  2014. phone,
  2015. healthCareNo
  2016. );
  2017. // this.$options.methods.qrcode(params)
  2018. },
  2019. showInspectDialog() {
  2020. this.dialogFormVisible = true;
  2021. },
  2022. qrcode(patientID, name, gender, idCardNo, dialysisNo, phone, healthCareNo) {
  2023. document.getElementById("qrcode").innerHTML = "";
  2024. new QRCode("qrcode", {
  2025. width: 200,
  2026. height: 200,
  2027. text:
  2028. "user_id:" +
  2029. patientID +
  2030. "," +
  2031. "name:" +
  2032. name +
  2033. "," +
  2034. "dialysis_no:" +
  2035. dialysisNo +
  2036. "," +
  2037. "gender:" +
  2038. gender +
  2039. "," +
  2040. "idcard_no:" +
  2041. idCardNo +
  2042. "," +
  2043. "phone:" +
  2044. phone +
  2045. "," +
  2046. "healthcare_no:" +
  2047. healthCareNo,
  2048. });
  2049. },
  2050. checkIdCardNo() {
  2051. if(this.$store.getters.xt_user.org_id != 10278 && this.$store.getters.xt_user.org_id != 10138) {
  2052. if (!isCardNo(this.form.idCardNo)) {
  2053. this.$message.error("身份证号码信息有误!");
  2054. this.form.birth = "";
  2055. return false;
  2056. }
  2057. }
  2058. var thisLen = this.form.idCardNo.length;
  2059. var birth = "";
  2060. if (thisLen == 15) {
  2061. birth = "19" + this.form.idCardNo.substr(6, 6);
  2062. } else {
  2063. birth = this.form.idCardNo.substr(6, 8);
  2064. }
  2065. this.form.birth =
  2066. birth.substr(0, 4) +
  2067. "-" +
  2068. birth.substr(4, 2) +
  2069. "-" +
  2070. birth.substr(6, 2);
  2071. this.form.age = jsGetAge(this.form.birth, "-");
  2072. },
  2073. // qrcode(params){
  2074. // new QRCode('qrcode',{
  2075. // width:200,
  2076. // height:200,
  2077. // text:params,
  2078. // })
  2079. // }
  2080. },
  2081. };
  2082. </script>
  2083. <style rel="stylesheet/scss" lang="scss" scoped>
  2084. .uploadHead {
  2085. margin-top: 25%;
  2086. }
  2087. .uploadHeadBtn {
  2088. width: 148px;
  2089. margin-top: 10px;
  2090. }
  2091. .el-form {
  2092. .el-col-6,
  2093. .el-col-8 {
  2094. width: 360px;
  2095. height: 59px !important;
  2096. }
  2097. .el-form-item {
  2098. // margin-bottom: 17px !important;
  2099. .el-select {
  2100. width: 100%;
  2101. }
  2102. .el-date-editor.el-input {
  2103. width: 100%;
  2104. }
  2105. .textarea {
  2106. width: 100%;
  2107. height: 70px;
  2108. border-color: #dcdfe6;
  2109. padding: 5px;
  2110. }
  2111. }
  2112. }
  2113. /deep/ .now_his{
  2114. .el-row{
  2115. .el-col-24{
  2116. .el-form-item{
  2117. .el-form-item__content{
  2118. height: 100%;
  2119. .el-textarea{
  2120. .el-textarea__inner{
  2121. height: 93%;
  2122. }
  2123. }
  2124. }
  2125. }
  2126. }
  2127. }
  2128. }
  2129. // #print-info-box .info_print {
  2130. // width: 920px;
  2131. // margin: 0 auto !important;
  2132. // position: relative;
  2133. // top: 0;
  2134. // left: 0;
  2135. // padding: 20px 30px;
  2136. // }
  2137. // #print-info-box .box-title {
  2138. // text-align: center;
  2139. // font-weight: 600;
  2140. // font-size: 30px;
  2141. // line-height: 80px;
  2142. // margin-bottom: 20px;
  2143. // }
  2144. // #print-info-box .unit-title {
  2145. // text-align: center;
  2146. // line-height: 40px;
  2147. // font-size: 20px;
  2148. // font-weight: 400;
  2149. // padding-top: 10px;
  2150. // /* border: 1px solid #333; */
  2151. // }
  2152. // #print-info-box .unit-box {
  2153. // padding: 15px;
  2154. // }
  2155. // #print-info-box .unit-box-item {
  2156. // display: flex;
  2157. // align-items: center;
  2158. // justify-content: space-between;
  2159. // padding: 4px 1em;
  2160. // }
  2161. // #print-info-box .unit-box-item-col3 {
  2162. // width: 30%;
  2163. // display: flex;
  2164. // padding: 4px 0;
  2165. // }
  2166. // #print-info-box .unit-box-item-col4 {
  2167. // width: 23%;
  2168. // display: flex;
  2169. // padding: 4px 0;
  2170. // }
  2171. // #print-info-box .item-value {
  2172. // flex: 1;
  2173. // border-bottom: 1px solid #333;
  2174. // }
  2175. </style>
  2176. <style scoped>
  2177. /* 打印表格的样式 */
  2178. .print_main_content {
  2179. background-color: white;
  2180. width: 960px;
  2181. margin: 0 auto;
  2182. padding: 0 0 0 0;
  2183. page-break-after: always;
  2184. }
  2185. .print_main_content .order_title {
  2186. text-align: center;
  2187. font-size: 23px;
  2188. line-height: 50px;
  2189. font-weight: 500;
  2190. }
  2191. .print_main_content table {
  2192. width: 100%;
  2193. border: 1px solid;
  2194. border-collapse: collapse;
  2195. padding: 2px;
  2196. }
  2197. .print_main_content table tbody tr td {
  2198. border: 1px solid;
  2199. text-align: center;
  2200. /* font-size: 17px; */
  2201. /* padding: 10px 8px; */
  2202. }
  2203. .td_proj_title {
  2204. font-size: 17px;
  2205. /* line-height: 20px; */
  2206. font-weight: 500;
  2207. }
  2208. .td_proj_content {
  2209. font-size: 17px;
  2210. /* line-height: 20px; */
  2211. }
  2212. .td_align_left {
  2213. text-align: left;
  2214. }
  2215. .print_footnote_panel {
  2216. font-size: 17px;
  2217. line-height: 40px;
  2218. }
  2219. .print_footnote_panel .proj {
  2220. display: inline-block;
  2221. width: 49%;
  2222. }
  2223. .print_footnote_panel .proj .proj_title {
  2224. font-weight: 500;
  2225. }
  2226. .el-select-dropdown {
  2227. z-index: 998 !important;
  2228. }
  2229. </style>