PatientDetail.vue 84KB

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