PatientForm.vue 76KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215
  1. <template>
  2. <!-- 电子病历/新增患者 -->
  3. <div class="main-contain">
  4. <!-- 传染病(已隐藏) -->
  5. <el-dialog
  6. title="新增传染病检查"
  7. :visible.sync="dialogFormVisible"
  8. width="1000px"
  9. id="user-inspection-form"
  10. v-loading="formLoading"
  11. >
  12. <el-form :model="form" ref="form" label-position="top">
  13. <el-row>
  14. <el-col :span="1">&nbsp;</el-col>
  15. <template v-for="(item, index) in form.formItem">
  16. <el-col :span="7" ><!--:key="index"-->
  17. <el-form-item
  18. :label="item.item_name"
  19. v-if="item.range_type == 1"
  20. :key="item.item_id"
  21. :prop="'formItem.' + index + '.value'"
  22. >
  23. <el-input
  24. placeholder="请填入"
  25. v-model="item.value"
  26. style="width:95%"
  27. type="number"
  28. >
  29. <template slot="append">{{ item.unit }}</template>
  30. </el-input>
  31. </el-form-item><!--:key="item.item_id"-->
  32. <el-form-item
  33. :label="item.item_name"
  34. v-else
  35. :prop="'formItem.' + index + '.value'"
  36. >
  37. <el-select
  38. v-model="item.value"
  39. placeholder="请选择"
  40. style="width:95%"
  41. >
  42. <el-option
  43. v-for="(optionItem, oidex) in item.select_options"
  44. :key="oidex"
  45. :label="optionItem"
  46. :value="optionItem"
  47. ></el-option>
  48. </el-select>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="1" >&nbsp;</el-col><!--:key="'form-col' + index"-->
  52. </template>
  53. </el-row>
  54. </el-form>
  55. <div slot="footer" class="dialog-footer">
  56. <el-button @click="dialogFormVisible = false">取 消</el-button>
  57. <el-button type="primary" @click="submitNew('form')">保 存</el-button>
  58. </div>
  59. </el-dialog>
  60. <div v-if="!isEdit" class="position">
  61. <bread-crumb :crumbs="crumbs"></bread-crumb>
  62. <div class style="float:right;color: white">
  63. <el-button
  64. :disabled="
  65. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  66. ? true
  67. : false
  68. "
  69. type="primary"
  70. v-if="this.isEdit == false"
  71. @click="resetForm('form')"
  72. icon="el-icon-circle-plus-outline"
  73. size="small"
  74. >新增</el-button
  75. >
  76. </div>
  77. </div>
  78. <div
  79. v-if="isEdit"
  80. class
  81. style="float:right;margin-right: 35px;margin-top: 10px"
  82. >
  83. <!-- <el-button @click="$router.back(-1)" icon="el-icon-refresh" size="small">取消</el-button>
  84. <el-button :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" type="primary" v-if="this.isEdit==false" @click="resetForm('form')" icon="el-icon-circle-plus-outline" size="small">新增</el-button>
  85. <el-button :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" @click="onSubmit('form')" size="small" type="success" icon="el-icon-setting" >保存</el-button>
  86. <el-button v-if="isEdit==false" @click="onReSubmit('form')" :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" icon="el-icon-document-add" size="small" type="warning" >保存并继续新增</el-button>-->
  87. </div>
  88. <div class="app-container" v-loading="pageLoad">
  89. <el-form
  90. ref="form"
  91. :rules="rules"
  92. :model="form"
  93. label-width="124px"
  94. class="clearfix"
  95. popper-append-to-body="false"
  96. >
  97. <div class="dataTitle">一般资料</div>
  98. <el-row>
  99. <el-col :span="20" class="form-table">
  100. <el-row :span="20">
  101. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  102. <el-form-item label="姓名 : " class="is-required" prop="name">
  103. <el-input v-model="form.name"></el-input>
  104. </el-form-item>
  105. </el-col>
  106. <el-col
  107. :span="8"
  108. :style="isEdit ? 'width:360px' : ''"
  109. style="height:59px;"
  110. >
  111. <el-form-item label="性别 : " class="is-required" prop="gender">
  112. <el-radio-group v-model="form.gender" @change="changeGender">
  113. <el-radio
  114. v-for="item in sexOptions"
  115. :key="item.value"
  116. :label="item.value"
  117. :value="item.value"
  118. >{{ item.label }}</el-radio
  119. >
  120. </el-radio-group>
  121. </el-form-item>
  122. </el-col>
  123. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  124. <el-form-item
  125. label="身份证号 : "
  126. class="is-required"
  127. prop="idCardNo"
  128. >
  129. <el-input
  130. v-model="form.idCardNo"
  131. @blur="checkIdCardNo"
  132. ></el-input><!---->
  133. </el-form-item>
  134. </el-col>
  135. <el-col
  136. :span="8"
  137. :style="isEdit ? 'width:360px' : ''"
  138. style="height:59px;"
  139. >
  140. <el-form-item label="年龄 : " class="is-required" prop="age">
  141. <el-input
  142. v-model="form.age"
  143. placeholder="请填写年龄"
  144. ></el-input>
  145. </el-form-item>
  146. </el-col>
  147. <template v-if="isEdit">
  148. <!-- <el-col :span="8" :style="isEdit?'width:360px':''">
  149. <el-form-item label="患者类型 : " class="is-required" >
  150. <el-select v-model="form.patientType" placeholder="请选择患者类型" disabled >
  151. <el-option v-for="item in styleOptions" :key="item.id" :label="item.name" :value="item.id"/>
  152. </el-select>
  153. </el-form-item>
  154. </el-col>-->
  155. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  156. <el-form-item label="透析号 : " class="is-required">
  157. <el-input
  158. v-model="form.dialysisNo"
  159. placeholder="填写或自动生成"
  160. style="width:62%;float:left;margin-right: 2%;"
  161. ></el-input>
  162. <!-- <el-button style="width:36%;padding:10px 0;" disabled type="primary">自动生成</el-button> -->
  163. </el-form-item>
  164. </el-col>
  165. </template>
  166. <template v-else>
  167. <el-col :span="8">
  168. <el-form-item
  169. label="透析号 : "
  170. class="is-required"
  171. prop="dialysisNo"
  172. >
  173. <el-input
  174. v-model="form.dialysisNo"
  175. placeholder="填写或自动生成"
  176. style="width:62%;float:left;margin-right: 2%;"
  177. ></el-input>
  178. <el-button
  179. style="width:35%;padding:10px 0;"
  180. :disabled="
  181. $store.getters.xt_user.subscibe.state == 3 ||
  182. !subscibeFlag
  183. ? true
  184. : false
  185. "
  186. type="primary"
  187. @click="generatedialysisno"
  188. >自动生成</el-button
  189. >
  190. </el-form-item>
  191. </el-col>
  192. </template>
  193. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  194. <el-form-item
  195. label="出生日期 : "
  196. class="is-required"
  197. prop="birth"
  198. >
  199. <el-date-picker
  200. v-model="form.birth"
  201. type="date"
  202. placeholder="选择日期"
  203. :suffix-icon="'el-icon-menu'"
  204. @change="hadSelectBirth"
  205. format="yyyy-MM-dd"
  206. value-format="yyyy-MM-dd"
  207. ></el-date-picker>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="6" :style="isEdit ? 'width:380px' : ''" v-if="org_id!=0 && org_id!=10138 && org_id!=10278">
  211. <el-form-item
  212. label="首次肾脏治疗时间:"
  213. prop="firstDialysisDate"
  214. label-width="150px"
  215. >
  216. <el-date-picker
  217. v-model="form.firstDialysisDate"
  218. type="date"
  219. format="yyyy-MM-dd"
  220. value-format="yyyy-MM-dd"
  221. ></el-date-picker>
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="6" :style="isEdit ? 'width:380px' : ''" v-if="org_id==0||org_id == 10138 || org_id == 10278">
  225. <el-form-item
  226. label="首次进入本院时间:"
  227. prop="firstDialysisDate"
  228. label-width="150px"
  229. >
  230. <el-date-picker
  231. v-model="form.firstDialysisDate"
  232. type="date"
  233. format="yyyy-MM-dd"
  234. value-format="yyyy-MM-dd"
  235. ></el-date-picker>
  236. </el-form-item>
  237. </el-col>
  238. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  239. <el-form-item
  240. label="本人电话 : "
  241. class="is-required"
  242. prop="phone"
  243. >
  244. <el-input v-model="form.phone" maxlength="20"></el-input>
  245. </el-form-item>
  246. </el-col>
  247. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  248. <el-form-item label="家属姓名 : ">
  249. <el-input
  250. v-model="form.contact_name"
  251. maxlength="20"
  252. ></el-input>
  253. </el-form-item>
  254. </el-col>
  255. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  256. <el-form-item label="家属电话 : " prop="homeTelephone" class="is-required">
  257. <el-input
  258. v-model="form.homeTelephone"
  259. maxlength="20"
  260. ></el-input>
  261. </el-form-item>
  262. </el-col>
  263. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  264. <el-form-item
  265. label="本院首次透析 : "
  266. prop="is_hospital_first_dialysis"
  267. >
  268. <el-radio-group v-model="form.is_hospital_first_dialysis">
  269. <el-radio
  270. v-for="item in isHospitalFirstDialysisOptions"
  271. :key="item.value"
  272. :label="item.value"
  273. :value="item.value"
  274. >{{ item.label }}</el-radio
  275. >
  276. </el-radio-group>
  277. </el-form-item>
  278. </el-col>
  279. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  280. <el-form-item
  281. label="系统前透析次数 : "
  282. prop="user_sys_before_count"
  283. >
  284. <el-input v-model="form.user_sys_before_count"></el-input>
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  288. <el-form-item label="首次透析时间 : ">
  289. <el-date-picker
  290. v-model="form.first_treatment_date"
  291. type="date"
  292. format="yyyy-MM-dd"
  293. value-format="yyyy-MM-dd"
  294. ></el-date-picker>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  298. <el-form-item
  299. label="上家透析医院 : "
  300. prop="first_dialysis_hospital"
  301. >
  302. <el-input v-model="form.first_dialysis_hospital"></el-input>
  303. </el-form-item>
  304. </el-col>
  305. <el-col :span="24">
  306. <el-form-item
  307. label="透析之前情况 : "
  308. prop="predialysis_condition"
  309. >
  310. <el-checkbox-group v-model="form.predialysis_condition">
  311. <el-checkbox
  312. v-for="item in predialysisConditionOptions"
  313. :label="item.label"
  314. :key="item.value"
  315. :value="item.label"
  316. >{{ item.label }}</el-checkbox
  317. >
  318. </el-checkbox-group>
  319. </el-form-item>
  320. </el-col>
  321. <el-col :span="24">
  322. <el-form-item label="病历号 : " prop="record_number">
  323. <el-input
  324. style="width: 200px;"
  325. v-model="form.record_number"
  326. ></el-input>
  327. </el-form-item>
  328. </el-col>
  329. <el-col :span="24">
  330. <el-form-item label="主管护士 : " prop="record_number">
  331. <el-select v-model="form.nurse" style="width:200px">
  332. <el-option
  333. v-for="(item,index) in adminUserOptions"
  334. :key="index"
  335. :label="item.name"
  336. :value="item.id"
  337. />
  338. </el-select>
  339. </el-form-item>
  340. </el-col>
  341. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  342. <el-form-item
  343. label="本院前透析频率 : "
  344. prop="pre_hospital_dialysis_frequency"
  345. >
  346. <el-input
  347. v-model="form.pre_hospital_dialysis_frequency"
  348. ></el-input>
  349. </el-form-item>
  350. </el-col>
  351. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  352. <el-form-item
  353. label="本院前透析次数 : "
  354. prop="pre_hospital_dialysis_times"
  355. >
  356. <el-input v-model="form.pre_hospital_dialysis_times"></el-input>
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  360. <el-form-item
  361. label="本院首次透析 : "
  362. prop="hospital_first_dialysis_date"
  363. >
  364. <el-date-picker
  365. v-model="form.hospital_first_dialysis_date"
  366. type="date"
  367. format="yyyy-MM-dd"
  368. value-format="yyyy-MM-dd"
  369. ></el-date-picker>
  370. </el-form-item>
  371. </el-col>
  372. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  373. <el-form-item
  374. label="患者来源 : "
  375. class="is-required"
  376. prop="source"
  377. >
  378. <el-radio-group v-model="form.source">
  379. <el-radio
  380. v-for="item in sourceOptions"
  381. :key="item.value"
  382. :label="item.value"
  383. :value="item.value"
  384. >{{ item.label }}</el-radio
  385. >
  386. </el-radio-group>
  387. </el-form-item>
  388. </el-col>
  389. <!-- <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  390. <el-form-item
  391. label="患者去向 : "
  392. >
  393. <el-radio-group v-model="form.patient_source">
  394. <el-radio
  395. v-for="item in patientSourceList"
  396. :key="item.value"
  397. :label="item.value"
  398. :value="item.value"
  399. >{{ item.label }}</el-radio
  400. >
  401. </el-radio-group>
  402. </el-form-item>
  403. </el-col> -->
  404. <!-- <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  405. <el-form-item
  406. label="流转地: "
  407. >
  408. <el-select v-model="form.patient_address" placeholder="请选择">
  409. <el-option
  410. v-for="item in liuAddresslist"
  411. :key="item.id"
  412. :label="item.name"
  413. :value="item.name">
  414. </el-option>
  415. </el-select>
  416. </el-form-item>
  417. </el-col> -->
  418. <!-- <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  419. <el-form-item
  420. label="流转开始时间 : "
  421. >
  422. <el-date-picker
  423. size="small"
  424. v-model="form.patient_start_time"
  425. prefix-icon="el-icon-date"
  426. :editable="false"
  427. style="width: 150px;"
  428. type="date"
  429. placeholder="选择日期时间"
  430. align="right"
  431. format="yyyy-MM-dd"
  432. value-format="yyyy-MM-dd"
  433. @change="startTimeChange"
  434. ></el-date-picker>
  435. </el-form-item>
  436. </el-col> -->
  437. <!-- <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  438. <el-form-item
  439. label="流转结束时间 : "
  440. >
  441. <el-date-picker
  442. size="small"
  443. v-model="form.patient_end_time"
  444. prefix-icon="el-icon-date"
  445. :editable="false"
  446. style="width: 150px;"
  447. type="date"
  448. placeholder="选择日期时间"
  449. align="right"
  450. format="yyyy-MM-dd"
  451. value-format="yyyy-MM-dd"
  452. @change="startTimeChange"
  453. ></el-date-picker>
  454. </el-form-item>
  455. </el-col> -->
  456. <!-- <el-col :span="8" style="margin-bottom: 20px;" :style="isEdit ? 'width:360px' : ''">
  457. <el-form-item
  458. label="备注 : "
  459. prop="sch_remark">
  460. <el-input
  461. type="textarea"
  462. :rows="3"
  463. v-model="form.sch_remark"
  464. resize="none"
  465. placeholder
  466. ></el-input>
  467. </el-form-item>
  468. </el-col> -->
  469. <el-col :span="24" :style="isEdit ? 'width:360px' : ''" v-show="showLapseto">
  470. <el-form-item
  471. label="治疗状态(转归) : "
  472. class="is-required"
  473. prop="lapseto"
  474. >
  475. <el-radio-group v-model="form.lapseto">
  476. <el-radio
  477. v-for="item in lapsetoOptions"
  478. :key="item.value"
  479. :label="item.value"
  480. :value="item.value"
  481. >{{ item.label }}</el-radio
  482. >
  483. </el-radio-group>
  484. </el-form-item>
  485. </el-col>
  486. <el-col :span="24">
  487. <el-form-item label="传染病 : " prop="contagions">
  488. <el-radio-group v-model="form.is_infectious" @change="changeInfectious">
  489. <el-radio :label="1">阴性</el-radio>
  490. <el-radio :label="2">阳性</el-radio>
  491. </el-radio-group>
  492. <el-checkbox-group
  493. v-model="form.contagions"
  494. v-if="form.is_infectious == '2'"
  495. >
  496. <el-checkbox
  497. v-for="item in contagionList"
  498. v-if="item.type == 2"
  499. :label="item.id"
  500. :key="item.id"
  501. name="contagions"
  502. :value="item.id"
  503. >{{ item.name }}</el-checkbox
  504. >
  505. </el-checkbox-group>
  506. </el-form-item>
  507. </el-col>
  508. <el-col :span="24">
  509. <el-form-item label="传染病细分:" v-if="form.is_infectious == '2'">
  510. <el-input v-model="form.infectious_remark"></el-input>
  511. </el-form-item>
  512. </el-col>
  513. <el-col :span="8">
  514. <el-form-item label="疑难内瘘 : " prop="contagions">
  515. <el-radio-group v-model="form.troble_shoot">
  516. <el-radio :label="1">是</el-radio>
  517. <el-radio :label="2">否</el-radio>
  518. </el-radio-group>
  519. </el-form-item>
  520. </el-col>
  521. <el-col :span="8">
  522. <el-form-item label="人员编码: ">
  523. <el-input
  524. v-model="form.zb_patient_id"
  525. ></el-input>
  526. </el-form-item>
  527. </el-col>
  528. <el-col :span="16" v-if="!isEdit">
  529. <el-form-item label="检查结果日期 : ">
  530. <!--<el-date-picker v-model="form.record_date" type="date" placeholder="选择日期" :suffix-icon="'el-icon-menu'"-->
  531. <!--format="yyyy-MM-dd"-->
  532. <!--style="width: 200px;"-->
  533. <!--disabled-->
  534. <!--value-format="yyyy-MM-dd" v-if="isEdit"></el-date-picker>-->
  535. <el-date-picker
  536. v-model="form.record_date"
  537. type="date"
  538. placeholder="选择日期"
  539. :suffix-icon="'el-icon-menu'"
  540. format="yyyy-MM-dd"
  541. style="width: 200px;"
  542. value-format="yyyy-MM-dd"
  543. v-if="!isEdit"
  544. ></el-date-picker>
  545. <el-button
  546. type="primary"
  547. @click="recordCheck()"
  548. v-if="!isEdit"
  549. >录入检验检查</el-button
  550. >
  551. <!--<el-button type="primary" v-if="isEdit">查看检验检查</el-button>-->
  552. </el-form-item>
  553. </el-col>
  554. <el-col :span="24">
  555. <el-form-item label="传染病周期提醒:">
  556. <el-radio-group
  557. v-model="form.remind_cycle"
  558. @change="changeCycle()"
  559. >
  560. <el-radio :label="1">一月一次</el-radio>
  561. <el-radio :label="2">两月一次</el-radio>
  562. <el-radio :label="3">三月一次</el-radio>
  563. <el-radio :label="4">半年一次</el-radio>
  564. <el-radio :label="5">一年一次</el-radio>
  565. </el-radio-group>
  566. </el-form-item>
  567. </el-col>
  568. <el-col :span="24">
  569. <el-form-item label="诊断 : " prop="diagnose">
  570. <el-input
  571. type="textarea"
  572. :rows="3"
  573. v-model="form.diagnose"
  574. resize="none"
  575. placeholder
  576. ></el-input>
  577. </el-form-item>
  578. </el-col>
  579. <el-col :span="24">
  580. <el-form-item label="诊疗计划 : " prop="diagnose">
  581. <el-input
  582. type="textarea"
  583. :rows="3"
  584. v-model="form.treatment_plan"
  585. resize="none"
  586. placeholder
  587. ></el-input>
  588. </el-form-item>
  589. </el-col>
  590. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  591. <el-form-item label="民族 : " prop="nation">
  592. <el-input v-model="form.nation" maxlength="30"></el-input>
  593. </el-form-item>
  594. </el-col>
  595. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  596. <el-form-item label="籍贯 : " prop="native_place">
  597. <el-input
  598. v-model="form.native_place"
  599. maxlength="30"
  600. ></el-input>
  601. </el-form-item>
  602. </el-col>
  603. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  604. <el-form-item label="家庭住址 : " prop="homeAddress" class="is-required">
  605. <el-input v-model="form.homeAddress" style="width: 350px;"></el-input>
  606. </el-form-item>
  607. </el-col>
  608. <div v-show="!generic_info_fold">
  609. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  610. <el-form-item label="别名 : " prop="alias">
  611. <el-input v-model="form.alias"></el-input>
  612. </el-form-item>
  613. </el-col>
  614. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  615. <el-form-item label="身高(cm) : " prop="height">
  616. <el-input
  617. maxlength="5"
  618. v-model="form.height"
  619. @change="checkHeight"
  620. ></el-input>
  621. </el-form-item>
  622. </el-col>
  623. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  624. <el-form-item label="婚姻状况 : " prop="maritalStatus">
  625. <el-select
  626. v-model="form.maritalStatus"
  627. placeholder="请选择婚姻状况"
  628. >
  629. <el-option
  630. v-for="item in maritalOptions"
  631. :key="item.id"
  632. :label="item.name"
  633. :value="item.id"
  634. />
  635. </el-select>
  636. </el-form-item>
  637. </el-col>
  638. <el-col
  639. :span="8"
  640. style="clearfix"
  641. :style="isEdit ? 'width:360px' : ''"
  642. >
  643. <el-form-item label="子女情况(个) : " prop="children">
  644. <el-input maxlength="5" v-model="form.children"></el-input>
  645. </el-form-item>
  646. <!-- <el-form-item label=" " style="float:left;" label-width="30px">
  647. </el-form-item>-->
  648. </el-col>
  649. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  650. <el-form-item label="住院(门诊)号 : ">
  651. <el-input v-model="form.admissionNumber"></el-input>
  652. </el-form-item>
  653. </el-col>
  654. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  655. <el-form-item label="医保类型 : " prop="reimbursementWayID">
  656. <el-select v-model="form.reimbursementWayID">
  657. <el-option
  658. v-for="item in wayOptions"
  659. :key="item.id"
  660. :label="item.name"
  661. :value="item.id"
  662. />
  663. </el-select>
  664. </el-form-item>
  665. </el-col>
  666. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  667. <el-form-item label="医保号 : " prop="healthCareNo">
  668. <el-input v-model="form.healthCareNo"></el-input>
  669. </el-form-item>
  670. </el-col>
  671. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  672. <el-form-item label="教育程度 : " prop="educationOptions">
  673. <el-select v-model="form.education">
  674. <el-option
  675. v-for="item in educationOptions"
  676. :key="item.id"
  677. :label="item.name"
  678. :value="item.id"
  679. />
  680. </el-select>
  681. </el-form-item>
  682. </el-col>
  683. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  684. <el-form-item label="固定电话 : ">
  685. <el-input
  686. v-model="form.tell_phone"
  687. maxlength="20"
  688. ></el-input>
  689. </el-form-item>
  690. </el-col>
  691. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  692. <el-form-item label="费别 : ">
  693. <el-select v-model="form.expense_kind">
  694. <el-option
  695. v-for="item in expenseOptions"
  696. :key="item.id"
  697. :label="item.name"
  698. :value="item.id"
  699. />
  700. </el-select>
  701. </el-form-item>
  702. </el-col>
  703. <el-col
  704. :span="8"
  705. :style="isEdit ? 'width:360px' : ''"
  706. style="height:59px;"
  707. >
  708. <el-form-item label="透析龄(月): ">
  709. <el-input v-model="form.dialysis_age"></el-input>
  710. </el-form-item>
  711. </el-col>
  712. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  713. <el-form-item label="亲友电话 : " prop="relative_phone">
  714. <el-input
  715. v-model="form.relative_phone"
  716. maxlength="20"
  717. ></el-input>
  718. </el-form-item>
  719. </el-col>
  720. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  721. <el-form-item label="亲友关系 : " prop="relative_relations">
  722. <el-input
  723. v-model="form.relative_relations"
  724. maxlength="20"
  725. ></el-input>
  726. </el-form-item>
  727. </el-col>
  728. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  729. <el-form-item label="职业 : " prop="profession">
  730. <el-select v-model="form.profession">
  731. <el-option
  732. v-for="item in professionOptions"
  733. :key="item.id"
  734. :label="item.name"
  735. :value="item.id"
  736. />
  737. </el-select>
  738. </el-form-item>
  739. </el-col>
  740. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  741. <el-form-item label="工作单位 : " prop="work">
  742. <el-input v-model="form.work"></el-input>
  743. </el-form-item>
  744. </el-col>
  745. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  746. <el-form-item label="单位地址 : " prop="unit_address">
  747. <el-input v-model="form.unit_address"></el-input>
  748. </el-form-item>
  749. </el-col>
  750. </div>
  751. <el-col :span="24">
  752. <el-form-item>
  753. <el-button
  754. type="text"
  755. @click="generic_info_fold = !generic_info_fold"
  756. >
  757. {{ generic_info_fold ? "更多资料" : "收起" }}
  758. <i class="el-icon--right" :class="generic_fold_icon"></i>
  759. </el-button>
  760. </el-form-item>
  761. </el-col>
  762. </el-row>
  763. </el-col>
  764. <el-col :span="4" align="center">
  765. <el-upload
  766. style="width:100%;"
  767. :disabled="
  768. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  769. ? true
  770. : false
  771. "
  772. :data="uploadData"
  773. class="uploadHead"
  774. :multiple="false"
  775. action="https://upload.qiniup.com"
  776. :show-file-list="false"
  777. :on-error="handleAvatarError"
  778. :on-success="handleAvatarSuccess"
  779. list-type="picture-card"
  780. :before-upload="beforeAvatarUpload"
  781. >
  782. <img
  783. width="100%"
  784. height="100%"
  785. v-if="form.avatar"
  786. :src="form.avatar"
  787. class="avatar"
  788. />
  789. <i class="el-icon-plus" v-else></i>
  790. </el-upload>
  791. <el-dialog :visible.sync="dialogVisible">
  792. <img width="100%" :src="dialogImageUrl" alt />
  793. </el-dialog>
  794. <el-upload
  795. :disabled="
  796. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  797. ? true
  798. : false
  799. "
  800. :data="uploadData"
  801. :multiple="false"
  802. action="https://upload.qiniup.com"
  803. :show-file-list="false"
  804. :on-error="handleAvatarError"
  805. :on-success="handleAvatarSuccess"
  806. :before-upload="beforeAvatarUpload"
  807. >
  808. <el-button
  809. :disabled="
  810. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  811. ? true
  812. : false
  813. "
  814. class="uploadHeadBtn"
  815. type="primary"
  816. >上传头像</el-button
  817. >
  818. </el-upload>
  819. <el-form-item>
  820. <el-input
  821. v-model="form.avatar"
  822. type="hidden"
  823. placeholder
  824. ></el-input>
  825. </el-form-item>
  826. </el-col>
  827. </el-row>
  828. <div class="dataTitle">治疗信息</div>
  829. <div style="display: flex">
  830. <div style="flex: 1 1 9%;">
  831. <el-row :gutter="24">
  832. <el-col :span="24">
  833. <el-form-item label="主诉 : " prop="patient_complains">
  834. <el-input
  835. type="textarea"
  836. :rows="3"
  837. v-model="form.patient_complains"
  838. resize="none"
  839. placeholder=""
  840. ></el-input>
  841. </el-form-item>
  842. </el-col>
  843. </el-row>
  844. <el-row :gutter="24">
  845. <el-col :span="24">
  846. <el-form-item label="既往史 : " prop="past_history">
  847. <el-input
  848. type="textarea"
  849. :rows="3"
  850. v-model="form.past_history"
  851. resize="none"
  852. placeholder=""
  853. ></el-input>
  854. </el-form-item>
  855. </el-col>
  856. </el-row>
  857. <el-row :gutter="24">
  858. <el-col :span="24">
  859. <el-form-item label="过敏史 : " prop="past_history">
  860. <el-input
  861. type="textarea"
  862. :rows="3"
  863. v-model="form.allergic_history"
  864. resize="none"
  865. placeholder=""
  866. ></el-input>
  867. </el-form-item>
  868. </el-col>
  869. </el-row>
  870. <el-row :gutter="24">
  871. <el-col :span="24">
  872. <el-form-item label="体格检查">
  873. <el-input
  874. v-model="form.temperature"
  875. style="width: 200px"
  876. >
  877. <template slot="prepend">体温:</template>
  878. <template slot="append">℃</template>
  879. </el-input>
  880. <el-input v-model="form.pulse" style="width: 220px" >
  881. <template slot="prepend">脉搏: </template>
  882. <template slot="append">次/分</template>
  883. </el-input>
  884. <el-input
  885. v-model="form.respiratory"
  886. style="width: 220px"
  887. >
  888. <template slot="prepend">呼吸: </template>
  889. <template slot="append">次/分</template>
  890. </el-input>
  891. </el-form-item>
  892. </el-col>
  893. </el-row>
  894. <el-row :gutter="24">
  895. <el-col>
  896. <el-form-item>
  897. <el-input v-model="form.sbp" style="width: 240px" >
  898. <template slot="prepend">收缩压:</template>
  899. <template slot="append">mmHg</template>
  900. </el-input>
  901. <el-input v-model="form.dbp" style="width: 240px" >
  902. <template slot="prepend">舒张压:</template>
  903. <template slot="append">mmHg</template>
  904. </el-input>
  905. </el-form-item>
  906. </el-col>
  907. </el-row>
  908. </div>
  909. <div style="flex: 1;" class="now_his">
  910. <el-row :gutter="24" style="height:100%;">
  911. <el-col :span="24" style="height:100%;">
  912. <el-form-item label="现病史 : " prop="present_history" style="height:100%;">
  913. <el-input
  914. style="height:100%;"
  915. type="textarea"
  916. :rows="3"
  917. v-model="form.present_history"
  918. resize="none"
  919. placeholder=""
  920. ></el-input>
  921. </el-form-item>
  922. </el-col>
  923. </el-row>
  924. </div>
  925. </div>
  926. <el-row :span="24">
  927. <el-col>
  928. </el-col>
  929. <el-col></el-col>
  930. <el-col :span="24">
  931. <el-form-item label prop="remark">
  932. <el-input
  933. type="textarea"
  934. :rows="3"
  935. v-model="form.remark"
  936. resize="none"
  937. placeholder
  938. ></el-input>
  939. </el-form-item>
  940. </el-col>
  941. <!--<el-col :span="24">-->
  942. <!--<el-form-item label="传染病 : " prop="checkContagions">-->
  943. <!--<el-checkbox-group v-model="form.contagions">-->
  944. <!--<el-checkbox v-for="item in contagionList" v-if="item.type==2" :label="item.id" :key="item.id"-->
  945. <!--:value="item.id">{{item.name}}-->
  946. <!--</el-checkbox>-->
  947. <!--</el-checkbox-group>-->
  948. <!--</el-form-item>-->
  949. <!--</el-col>-->
  950. <!-- <el-col :span="24">
  951. <el-form-item label="慢性病 : " prop="diseases">
  952. <el-checkbox-group v-model="form.diseases">
  953. <el-checkbox
  954. v-for="item in checkDisease"
  955. :label="item.id"
  956. :key="item.id"
  957. :value="item.id"
  958. >{{ item.name }}</el-checkbox
  959. >
  960. </el-checkbox-group>
  961. </el-form-item>
  962. </el-col> -->
  963. <!-- <el-col :span="24">
  964. <el-form-item>
  965. <el-button
  966. type="text"
  967. @click="treat_info_fold = !treat_info_fold"
  968. >
  969. {{ treat_info_fold ? "更多治疗信息" : "收起" }}
  970. <i class="el-icon--right" :class="treat_fold_icon"></i>
  971. </el-button>
  972. </el-form-item>
  973. </el-col> -->
  974. <el-col :span="24">
  975. <el-form-item label="登记人员 : ">
  976. <span>{{ adminusername }}</span>
  977. </el-form-item>
  978. </el-col>
  979. <el-col :span="6">
  980. <el-form-item label="主治医生 : ">
  981. <el-select v-model="form.doctor">
  982. <el-option
  983. v-for="(item,index) in adminUserOptions"
  984. :key="index"
  985. :label="item.name"
  986. :value="item.id"
  987. />
  988. </el-select>
  989. </el-form-item>
  990. </el-col>
  991. <el-col :span="24" align="right" class="newCol">
  992. <el-form-item>
  993. <el-button
  994. @click="$router.back(-1)"
  995. icon="el-icon-refresh"
  996. size="small"
  997. >取消</el-button
  998. >
  999. <el-button
  1000. :disabled="
  1001. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  1002. ? true
  1003. : false
  1004. "
  1005. @click="onSubmit('form')"
  1006. size="small"
  1007. type="primary"
  1008. icon="el-icon-setting"
  1009. >保存</el-button
  1010. >
  1011. <el-button
  1012. v-if="isEdit == false"
  1013. @click="onReSubmit('form')"
  1014. :disabled="
  1015. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  1016. ? true
  1017. : false
  1018. "
  1019. icon="el-icon-document-add"
  1020. size="small"
  1021. type="success"
  1022. >保存并继续新增</el-button
  1023. >
  1024. </el-form-item>
  1025. </el-col>
  1026. </el-row>
  1027. </el-form>
  1028. </div>
  1029. </div>
  1030. </template>
  1031. <script>
  1032. import { getToken } from "@/api/qiniu";
  1033. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  1034. import {
  1035. dialysisAge,
  1036. getFileExtension,
  1037. isCardNo,
  1038. isPositiveInteger,
  1039. jsGetAge,
  1040. uParseTime
  1041. } from "@/utils/tools";
  1042. import {
  1043. createPatient,
  1044. editPatient,
  1045. fetchPatient,
  1046. generateDialysisNo,
  1047. GetPatientTotal
  1048. } from "@/api/patient";
  1049. import { fetchAllAdminUsers } from "@/api/doctor";
  1050. // import { fetchAllDoctorAndNurse } from "@/api/doctor";
  1051. import { getDataConfig } from "@/utils/data";
  1052. const defaultForm = {
  1053. avatar: "https://images.shengws.com/201809182128111.png",
  1054. name: "",
  1055. alias: "",
  1056. idCardNo: "",
  1057. dialysisNo: "",
  1058. gender: "",
  1059. birth: "",
  1060. nation: "",
  1061. native_place: "",
  1062. height: "",
  1063. maritalStatus: "",
  1064. children: "",
  1065. admissionNumber: "",
  1066. reimbursementWayID: "",
  1067. healthCareNo: "",
  1068. phone: "",
  1069. homeTelephone: "",
  1070. relative_phone: "",
  1071. relative_relations: "",
  1072. lapseto: "",
  1073. homeAddress: "",
  1074. work: "",
  1075. unit_address: "",
  1076. profession: "",
  1077. education: "",
  1078. source: "",
  1079. is_hospital_first_dialysis: "",
  1080. firstDialysisDate: "",
  1081. first_dialysis_hospital: "",
  1082. predialysis_condition: [],
  1083. pre_hospital_dialysis_frequency: "",
  1084. pre_hospital_dialysis_times: "",
  1085. hospital_first_dialysis_date: "",
  1086. contagions: [],
  1087. diseases: [],
  1088. remark: "",
  1089. sch_remark:"",
  1090. diagnose: "",
  1091. is_infectious: 1,
  1092. age: "",
  1093. record_number:"",
  1094. response_result: "",
  1095. remind_cycle: 0,
  1096. record_date: "",
  1097. tell_phone: "",
  1098. first_treatment_date: "",
  1099. dialysis_age: "",
  1100. expense_kind: "",
  1101. contact_name: "",
  1102. user_sys_before_count: "",
  1103. troble_shoot:2,
  1104. zb_patient_id:"",
  1105. doctor:"",
  1106. nurse:"",
  1107. patient_source:0,
  1108. patient_start_time:"",
  1109. patient_end_time:"",
  1110. patient_address:"",
  1111. infectious_remark:"",
  1112. allergic_history:"",
  1113. formItem: [
  1114. {
  1115. id: 0,
  1116. item: "",
  1117. item_id: 60,
  1118. item_name: "丙型肝炎病毒核心抗体(AntiHCV)",
  1119. project_id: 14,
  1120. project_name: "传染病检查",
  1121. range_type: 2,
  1122. select_options: ["阴性", "阳性", "弱阳性"],
  1123. unit: "",
  1124. value: ""
  1125. },
  1126. {
  1127. id: 0,
  1128. item: "",
  1129. item_id: 62,
  1130. item_name: "乙型肝炎病毒表面抗原(HBsAg)",
  1131. project_id: 14,
  1132. project_name: "传染病检查",
  1133. range_type: 2,
  1134. select_options: ["阴性", "阳性", "弱阳性"],
  1135. unit: "",
  1136. value: ""
  1137. },
  1138. {
  1139. id: 0,
  1140. item: "",
  1141. item_id: 63,
  1142. item_name: "乙型肝炎病毒表面抗体(AntiHBs)",
  1143. project_id: 14,
  1144. project_name: "传染病检查",
  1145. range_type: 2,
  1146. select_options: ["阴性", "阳性", "弱阳性"],
  1147. unit: "",
  1148. value: ""
  1149. },
  1150. {
  1151. id: 0,
  1152. item: "",
  1153. item_id: 64,
  1154. item_name: "乙型肝炎病毒E抗原(HBeAg)",
  1155. project_id: 14,
  1156. project_name: "传染病检查",
  1157. range_type: 2,
  1158. select_options: ["阴性", "阳性", "弱阳性"],
  1159. unit: "",
  1160. value: ""
  1161. },
  1162. {
  1163. id: 0,
  1164. item: "",
  1165. item_id: 65,
  1166. item_name: "乙型肝炎病毒E抗体(AntiHBe)",
  1167. project_id: 14,
  1168. project_name: "传染病检查",
  1169. range_type: 2,
  1170. select_options: ["阴性", "阳性", "弱阳性"],
  1171. unit: "",
  1172. value: ""
  1173. },
  1174. {
  1175. id: 0,
  1176. item: "",
  1177. item_id: 66,
  1178. item_name: "乙型肝炎病毒核心抗体(AntiHBc)",
  1179. project_id: 14,
  1180. project_name: "传染病检查",
  1181. range_type: 2,
  1182. select_options: ["阴性", "阳性", "弱阳性"],
  1183. unit: "",
  1184. value: ""
  1185. },
  1186. {
  1187. id: 0,
  1188. item: "",
  1189. item_id: 111,
  1190. item_name: "HIV抗体",
  1191. project_id: 14,
  1192. project_name: "传染病检查",
  1193. range_type: 2,
  1194. select_options: ["阴性", "阳性", "弱阳性"],
  1195. unit: "",
  1196. value: ""
  1197. },
  1198. {
  1199. id: 0,
  1200. item: "",
  1201. item_id: 112,
  1202. item_name: "梅毒",
  1203. project_id: 14,
  1204. project_name: "传染病检查",
  1205. range_type: 2,
  1206. select_options: ["阴性", "阳性", "弱阳性"],
  1207. unit: "",
  1208. value: ""
  1209. },
  1210. {
  1211. id: 0,
  1212. item: "",
  1213. item_id: 178,
  1214. item_name: "乙型病毒DNA测定(HBVDNH)",
  1215. project_id: 14,
  1216. project_name: "传染病检查",
  1217. range_type: 1,
  1218. select_options: 0,
  1219. unit: "",
  1220. value: ""
  1221. },
  1222. {
  1223. id: 0,
  1224. item: "",
  1225. item_id: 179,
  1226. item_name: "丙型病毒DNA测定(HCVDNH",
  1227. project_id: 14,
  1228. project_name: "传染病检查",
  1229. range_type: 1,
  1230. select_options: 0,
  1231. unit: "",
  1232. value: ""
  1233. }
  1234. ],
  1235. // patientType: "",
  1236. // partition: "",
  1237. // bed: "",
  1238. // age: "",
  1239. // healthCareDueDate: "",
  1240. // blood: "",
  1241. // rh: "",
  1242. // healthCareDueAlertDate: "",
  1243. // receivingDate: "",
  1244. // dialysisAge: "",
  1245. // induction: "",
  1246. // initial: "",
  1247. // dialysisTotal: "",
  1248. // doctor: "",
  1249. // nurse: "",
  1250. // assessment: "",
  1251. patient_complains: "",
  1252. present_history: "",
  1253. past_history: "",
  1254. temperature: "",
  1255. pulse: "",
  1256. respiratory: "",
  1257. sbp: "",
  1258. dbp: "",
  1259. showOne:true,
  1260. treatment_plan:"",
  1261. };
  1262. export default {
  1263. name: "patientForm",
  1264. props: {
  1265. isEdit: {
  1266. type: Boolean,
  1267. default: false
  1268. }
  1269. },
  1270. data() {
  1271. // var checkName = (rule, value, callback) => {
  1272. // const regName=/^([\u4E00-\u9FA5]{1,20}|[a-zA-Z\.\s])$/;
  1273. // if (regName.test(value)){
  1274. // return callback();
  1275. // }
  1276. // callback(new Error("请输入正确的名字"));
  1277. // };
  1278. var checkage = (rule, value, callback) =>{
  1279. const regage=/^(?:[1-9][0-9]?|1[01][0-9]|120)$/
  1280. if(regage.test(value)){
  1281. callback()
  1282. }else{
  1283. callback(new Error('年龄输入不合法'))
  1284. }
  1285. }
  1286. var checkidCard = (rule, value, callback) =>{
  1287. const regid=/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[0-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}([0-9Xx])$/
  1288. if(regid.test(value)){
  1289. callback()
  1290. }else{
  1291. callback(new Error('身份证输入有误'))
  1292. }
  1293. }
  1294. var checkContagions = (rule, value, callback) => {
  1295. if (this.form.is_infectious == '1') {
  1296. return callback();
  1297. }
  1298. if (this.form.is_infectious == "2" && value.length == 0) {
  1299. return callback(new Error("至少选择一项传染病"));
  1300. }
  1301. callback();
  1302. };
  1303. var checkPhone = (rule, value, callback) => {
  1304. if (value.length == 0) {
  1305. return callback(new Error("本人电话不能为空"));
  1306. }
  1307. if (
  1308. !value.match(
  1309. /^1\d{10}$/
  1310. )
  1311. ) {
  1312. return callback(new Error("请填写正确的电话(手机号码)"));
  1313. }
  1314. callback();
  1315. };
  1316. var checkFamilyPhone = (rule, value, callback) => {
  1317. if (value.length == 0) {
  1318. return callback(new Error("家属电话不能为空"));
  1319. }
  1320. if (
  1321. !value.match(
  1322. /^1\d{10}$/
  1323. )
  1324. ) {
  1325. return callback(new Error("请填写正确的电话(手机号码)"));
  1326. }
  1327. callback();
  1328. };
  1329. return {
  1330. crumbs: [
  1331. { path: false, name: "病人管理" },
  1332. { path: false, name: "新增病人" }
  1333. ],
  1334. generic_info_fold: true,
  1335. treat_info_fold: true,
  1336. patientTotal: 0,
  1337. pageLoad: true,
  1338. avatarFlag: false,
  1339. subscibeFlag: false,
  1340. orgname: "",
  1341. adminusername: "",
  1342. form: Object.assign({}, defaultForm),
  1343. formSubmit: true,
  1344. submitMethod: "",
  1345. uploadData: { token: "", key: "" },
  1346. dialogImageUrl: "",
  1347. qiniuDomain: "https://images.shengws.com/",
  1348. dialogVisible: false,
  1349. // typeOptions: null,
  1350. // styleOptions: null,
  1351. sourceOptions: [{ value: 1, label: "门诊" }, { value: 2, label: "住院" }, { value: 3, label: "门特" }],
  1352. patientSourceList:[
  1353. {value:1,label:"门诊"},
  1354. {value:2,label:"住院"},
  1355. ],
  1356. lapsetoOptions: [
  1357. { value: 1, label: "留治" },
  1358. { value: 2, label: "转出" }
  1359. ],
  1360. // partitionOptions: null,
  1361. sexOptions: [{ value: 1, label: "男" }, { value: 2, label: "女" }],
  1362. isHospitalFirstDialysisOptions: [
  1363. { value: 1, label: "是" },
  1364. { value: 2, label: "否" }
  1365. ],
  1366. predialysisConditionOptions: [
  1367. { value: 1, label: "腹膜透析" },
  1368. { value: 2, label: "肾移植" }
  1369. ],
  1370. maritalOptions: null,
  1371. wayOptions: null,
  1372. educationOptions: null,
  1373. professionOptions: null,
  1374. // inductionOptions: null,
  1375. // doctorOptions: null,
  1376. // nurseOptions: null,
  1377. // rhOptions: null,
  1378. checkDisease: null,
  1379. contagionList: null,
  1380. dialogFormVisible: false,
  1381. loading: null,
  1382. submitMsg: "",
  1383. patientID: 0,
  1384. formLoading: false,
  1385. expenseOptions: [
  1386. { id: 1, name: "基本医保" },
  1387. { id: 2, name: "新农合" },
  1388. { id: 3, name: "自费医疗" },
  1389. { id: 4, name: "公费医疗" },
  1390. { id: 5, name: "商业保险" },
  1391. { id: 6, name: "军队医疗" },
  1392. { id: 7, name: "其他" }
  1393. ],
  1394. subscibe: {},
  1395. showLapseto:true,
  1396. rules: {
  1397. contagions: [
  1398. {
  1399. type: "array",
  1400. required: true,
  1401. trigger: "change",
  1402. validator: checkContagions
  1403. }
  1404. ],
  1405. patientType: [
  1406. { required: true, message: "请选择患者类型", trigger: "blur" }
  1407. ],
  1408. dialysisNo: [
  1409. { required: true, message: "请填写透析号", trigger: "blur" }
  1410. // {type:'number', message:"透析号填写有误", trigger: 'blur'}
  1411. ],
  1412. phone: [{ validator: checkPhone, trigger: "blur" }],
  1413. source: [
  1414. { required: true, message: "请选择患者来源", trigger: "blur" }
  1415. ],
  1416. lapseto: [
  1417. { required: true, message: "请选择治疗状态", trigger: "blur" }
  1418. ],
  1419. name: [{ required: true, message: "请填写姓名", trigger: "blur" },
  1420. // { validator: checkName,min:2,max:5, message: '请输入正确的名字', trigger: 'blur'}
  1421. ],
  1422. gender: [{ required: true, message: "请选择性别", trigger: "blur" }],
  1423. idCardNo: [
  1424. { required: true, message: "请填写身份证号", trigger: "blur" },
  1425. {validator:checkidCard,trigger:'blur'}
  1426. ],
  1427. birth: [{ required: true, message: "请填写生日", trigger: "blur" }],
  1428. age: [{ required: true, message: "年龄不能为空", trigger: "blur" },
  1429. {validator: checkage,trigger:'blur'}],
  1430. firstDialysisDate: [
  1431. { required: true, message: "请选择日期", trigger: "blur" }
  1432. ],
  1433. homeTelephone: [{ validator: checkFamilyPhone, trigger: "blur" }],
  1434. homeAddress: [{ required: true, message: "请填写住址", trigger: "blur" }],
  1435. },
  1436. adminUserOptions:[],
  1437. org_id:0,
  1438. liuAddresslist:[]
  1439. };
  1440. },
  1441. components: {
  1442. BreadCrumb
  1443. },
  1444. computed: {
  1445. generic_fold_icon: function() {
  1446. return this.generic_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up";
  1447. },
  1448. treat_fold_icon: function() {
  1449. return this.treat_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up";
  1450. }
  1451. },
  1452. created() {
  1453. this.liuAddresslist = getDataConfig('hemodialysis', 'liu_address')
  1454. console.log("liuAddresslist",this.liuAddresslist)
  1455. this.fetchAllAdminUsers();
  1456. if(this.isEdit == true){
  1457. this.showLapseto = false
  1458. }
  1459. // this.styleOptions = this.$store.getters.patient_types;
  1460. // this.partitionOptions = this.$store.getters.partitions;
  1461. this.maritalOptions = getDataConfig("patient", "marital_options");
  1462. this.wayOptions = getDataConfig("patient", "reimbursement_ways");
  1463. // this.typeOptions = this.$store.getters.blood_types;
  1464. // this.rhOptions = this.$store.getters.rh;
  1465. this.educationOptions = getDataConfig("patient", "education_types");
  1466. this.professionOptions = getDataConfig("patient", "profession_options");
  1467. // this.inductionOptions = this.$store.getters.induction_options;
  1468. this.contagionList = this.$store.getters.contagions;
  1469. this.checkDisease = this.$store.getters.disease;
  1470. this.subscibe = this.$store.getters.xt_user.subscibe;
  1471. this.GetPatientTotal();
  1472. // this.fetchAllDoctorAndNurse();
  1473. this.pageLoad = false;
  1474. var xtuser = this.$store.getters.xt_user;
  1475. this.orgname = xtuser.org.org_name;
  1476. this.adminusername = xtuser.user.user_name;
  1477. this.org_id =this.$store.getters.xt_user.org.id
  1478. if (this.isEdit) {
  1479. this.submitMsg = "修改患者信息成功";
  1480. const id = this.$route.params && this.$route.params.id;
  1481. this.patientID = parseInt(id);
  1482. if (isNaN(this.patientID) || this.patientID <= 0) {
  1483. this.$notify.error({
  1484. title: "错误",
  1485. message: "无效的id"
  1486. });
  1487. this.$router.back(-1);
  1488. }
  1489. this.fetchPatient(id);
  1490. this.avatarFlag = true;
  1491. } else {
  1492. this.submitMsg = "新增患者成功";
  1493. this.form = Object.assign({}, defaultForm);
  1494. this.form.lapseto = 1
  1495. if(this.org_id == 0 || this.org_id ==9919){
  1496. this.form.diagnose = "1.慢性肾脏病5期 IgA肾病 维持性血液透析 肾性贫血 肾性高血压 继发性甲状旁腺功能亢进症 2.右前臂自体动静脉内瘘成形术后"
  1497. this.form.treatment_plan ="完善相关检查,规律血液透析,每周2次,每次5小时。纠正贫血, 达泊丁 (自备) 120ug 皮下注射 每4周1次;控制血压:非洛地平缓释片 5mg 口服 1次/日,酒石酸美托洛尔片 50mg/次 口服 每日1次;阿托伐他汀钙片 40mg/次 口服 每日1次。"
  1498. this.form.patient_complains = "维持性血液透析1年余"
  1499. this.form.past_history = "既往否认冠心病、糖尿病等慢性疾病;否认肝炎、结核、艾滋、梅毒等传染病史;否认药物、食物过敏史;无重大手术、外伤史。"
  1500. this.form.present_history = "患者于30年前体检查尿蛋白+,行肾穿刺活检,病理结果示:IgA肾病,此后于香港当地医院规范治疗,定时复查,至2021年12月复查发现血肌酐渐升高,300+umol/L,血压高于正常,开始为肾透析行右前臂自体动静脉内瘘成形术,1年前导入透析治疗,每周2次,每次5小时,规律维持至今。平素无胸闷、心慌,无咳嗽、咳痰,无恶心、呕吐,饮食、睡眠可,尿量约1000ml/日。本次检查感染四项阴性,血红蛋白103g/L,PTH 28.2pmol/L, Ca 2.17mmol/L ,P 1.57mmol/L。"
  1501. this.form.remark = "神志清,精神可,体型肥胖,面色黝黑,颜面、眼睑无浮肿,皮肤未见出血点、瘀斑;胸廓对称,心前区无隆起,心界向左扩大,心音有力,节律规整,未闻及明显杂音,双肺呼吸音粗;腹部呈脂肪堆积,腹软,无包块、无皮疹、无静脉曲张、无压痛;脊柱、四肢未见畸形,关节活动正常,肌力正常;双下肢无明显水肿;右前臂自体动静脉内瘘能触及震颤、闻及连续杂音。"
  1502. this.form.temperature = 36.5
  1503. this.form.pulse=75
  1504. this.form.respiratory = 20
  1505. this.form.sbp=150
  1506. this.form.dbp = 80
  1507. }
  1508. }
  1509. },
  1510. watch: {
  1511. // "form.record_date": function(val) {
  1512. // console.log(val);
  1513. // if (val == null || val == "") {
  1514. // console.log("111111");
  1515. // this.form.remind_cycle = "";
  1516. // }
  1517. // }
  1518. },
  1519. methods: {
  1520. fetchAllAdminUsers() {
  1521. fetchAllAdminUsers().then((response) => {
  1522. if (response.data.state === 1) {
  1523. this.form.doctor = this.$store.getters.xt_user.user.id
  1524. this.adminUserOptions = response.data.data.users;
  1525. }
  1526. });
  1527. },
  1528. recordCheck() {
  1529. if (this.form.record_date == "") {
  1530. this.$message.error("请先选择检验检查日期");
  1531. return;
  1532. } else {
  1533. this.dialogFormVisible = true;
  1534. }
  1535. },
  1536. GetPatientTotal() {
  1537. GetPatientTotal()
  1538. .then(response => {
  1539. if (response.data.state == 1) {
  1540. this.patientTotal = response.data.data.total;
  1541. this.subscibeFlag = true;
  1542. // if ((this.subscibe.state == 2 && this.patientTotal >= 100) || (this.subscibe.state == 1 && this.patientTotal >= 200)) {
  1543. // this.$alert('患者数已达到当前服务版本病人数,需要升级到更高的版本', '提示', {
  1544. // confirmButtonText: '确定',
  1545. // showClose: false,
  1546. // callback: action => {
  1547. // this.$router.push('/service/buy')
  1548. // }
  1549. // })
  1550. // } else {
  1551. // this.subscibeFlag = true
  1552. // }
  1553. } else {
  1554. this.$message.error(response.data.msg);
  1555. }
  1556. })
  1557. .catch(e => {});
  1558. },
  1559. changeGender(value) {
  1560. if (this.avatarFlag) {
  1561. return false;
  1562. }
  1563. if (value == 1) {
  1564. this.form.avatar = "https://images.shengws.com/201809182128111.png";
  1565. } else if (value == 2) {
  1566. this.form.avatar = "https://images.shengws.com/201809182128222.png";
  1567. } else {
  1568. }
  1569. },
  1570. resetForm(formName) {
  1571. this.$refs[formName].resetFields();
  1572. },
  1573. onReSubmit(formName) {
  1574. this.submitForm(formName, "renew");
  1575. },
  1576. onSubmit(formName) {
  1577. console.log("2222",this.form)
  1578. this.submitForm(formName, "redict");
  1579. },
  1580. submitForm(formName, action) {
  1581. if (!this.formSubmit) {
  1582. return false;
  1583. }
  1584. this.form.user_sys_before_count = this.form.user_sys_before_count.toString()
  1585. this.$refs[formName].validate(valid => {
  1586. if (valid) {
  1587. this.formSubmit = false;
  1588. if (this.isEdit) {
  1589. this.form.age = parseInt(this.form.age);
  1590. this.form.user_sys_before_count = this.form.user_sys_before_count.toString();
  1591. this.form.troble_shoot = parseInt(this.form.troble_shoot)
  1592. this.form.doctor = parseInt(this.form.doctor)
  1593. this.form.nurse = parseInt(this.form.nurse)
  1594. if(this.form.patient_source >0){
  1595. this.form.patient_source = parseInt(this.form.patient_source)
  1596. }else{
  1597. this.form.patient_source = 1
  1598. }
  1599. if(this.form.patient_source == "NaN"){
  1600. this.form.patient_source = 1
  1601. }
  1602. if(this.form.avatar.indexOf('?imageView2/2/w/500/h/500/q/90')!=-1){
  1603. this.form.avatar = this.form.avatar
  1604. }else{
  1605. this.form.avatar = this.form.avatar + "?imageView2/2/w/500/h/500/q/90"
  1606. }
  1607. console.log("form---",this.form)
  1608. editPatient(this.patientID, this.form)
  1609. .then(response => {
  1610. if (response.data.state == 0) {
  1611. this.$message.error(response.data.msg);
  1612. this.formSubmit = true;
  1613. return false;
  1614. } else {
  1615. this.formSubmit = false;
  1616. this.$notify({
  1617. title: "成功",
  1618. message: this.submitMsg,
  1619. type: "success",
  1620. duration: 2000
  1621. });
  1622. this.$refs[formName].resetFields();
  1623. if (action !== "renew") {
  1624. this.$router.back(-1);
  1625. }
  1626. this.formSubmit = true;
  1627. return false;
  1628. }
  1629. })
  1630. .catch(err => {
  1631. this.$message.error("网络异常");
  1632. this.formSubmit = true;
  1633. return false;
  1634. });
  1635. } else {
  1636. this.form.age = parseInt(this.form.age);
  1637. this.form.troble_shoot = parseInt(this.form.troble_shoot)
  1638. this.form.doctor = parseInt(this.form.doctor)
  1639. this.form.nurse = parseInt(this.form.nurse)
  1640. if(this.form.patient_source >0){
  1641. this.form.patient_source = parseInt(this.form.patient_source)
  1642. }else{
  1643. this.form.patient_source = 1
  1644. }
  1645. if(this.form.patient_source == "NaN"){
  1646. this.form.patient_source = 1
  1647. }
  1648. console.log("form233322332w",this.form)
  1649. createPatient(this.form)
  1650. .then(response => {
  1651. if (response.data.state == 0) {
  1652. this.$message.error(response.data.msg);
  1653. this.formSubmit = true;
  1654. return false;
  1655. } else {
  1656. this.formSubmit = true;
  1657. this.$notify({
  1658. title: "成功",
  1659. message: this.submitMsg,
  1660. type: "success",
  1661. duration: 2000
  1662. });
  1663. this.$refs[formName].resetFields();
  1664. this.$store.dispatch("SetSubscibePatients");
  1665. var sub = this.$store.getters.xt_user.subscibe;
  1666. if (action !== "renew") {
  1667. this.$router.back(-1);
  1668. }
  1669. return false;
  1670. }
  1671. })
  1672. .catch(err => {
  1673. this.$message.error("网络异常");
  1674. this.formSubmit = true;
  1675. return false;
  1676. });
  1677. }
  1678. } else {
  1679. this.formSubmit = true;
  1680. return false;
  1681. }
  1682. });
  1683. },
  1684. handlePictureCardPreview(file) {
  1685. this.dialogImageUrl = file.url;
  1686. this.dialogVisible = true;
  1687. },
  1688. handleAvatarError(err, file, fileList) {
  1689. this.$message.error(err);
  1690. this.loading.close();
  1691. return false;
  1692. },
  1693. handleAvatarSuccess(res, file) {
  1694. // this.imageUrl = URL.createObjectURL(file.raw);
  1695. this.form.avatar = this.qiniuDomain + res.url +"?imageView2/2/w/500/h/500/q/90";
  1696. console.log("上传成功地址",this.form.avatar)
  1697. this.avatarFlag = true;
  1698. this.loading.close();
  1699. },
  1700. beforeAvatarUpload(file) {
  1701. // const isJPG = file.type === "image/jpeg";
  1702. var fileType = file.type;
  1703. const isJPG = fileType.indexOf("image") > -1;
  1704. const isLt2M = file.size / 1024 / 1024 < 6;
  1705. if (!isJPG) {
  1706. this.$message.error("只能上传图片");
  1707. return false;
  1708. }
  1709. if (!isLt2M) {
  1710. this.$message.error("上传头像图片大小不能超过 6MB!");
  1711. return false;
  1712. }
  1713. var date = new Date();
  1714. var ext = getFileExtension(file.name);
  1715. var key =
  1716. date.getFullYear() +
  1717. "/" +
  1718. (date.getMonth() + 1) +
  1719. "/" +
  1720. date.getDate() +
  1721. "/" +
  1722. date.getHours() +
  1723. "/" +
  1724. date.getMinutes() +
  1725. "/" +
  1726. date.getSeconds() +
  1727. "/" +
  1728. "_s_" +
  1729. file.uid +
  1730. "." +
  1731. ext;
  1732. this.loading = this.$loading({
  1733. lock: true,
  1734. text: "上传中...",
  1735. spinner: "el-icon-loading",
  1736. background: "rgba(0, 0, 0, 0.7)"
  1737. });
  1738. const _self = this;
  1739. return new Promise((resolve, reject) => {
  1740. getToken()
  1741. .then(response => {
  1742. const token = response.data.data.uptoken;
  1743. _self._data.uploadData.token = token;
  1744. _self._data.uploadData.key = key;
  1745. resolve(true);
  1746. })
  1747. .catch(err => {
  1748. console.log(err);
  1749. reject(false);
  1750. this.loading.close();
  1751. });
  1752. });
  1753. },
  1754. generatedialysisno() {
  1755. generateDialysisNo().then(response => {
  1756. this.form.dialysisNo = response.data.data.no + "";
  1757. });
  1758. },
  1759. checkIdCardNo() {
  1760. // console.log(this.form.idCardNo);
  1761. if (!isCardNo(this.form.idCardNo)) {
  1762. // this.$message.error("身份证号码信息有误!");
  1763. this.form.birth = "";
  1764. return false;
  1765. }
  1766. var thisLen = this.form.idCardNo.length;
  1767. var birth = "";
  1768. if (thisLen == 15) {
  1769. birth = "19" + this.form.idCardNo.substr(6, 6);
  1770. } else {
  1771. birth = this.form.idCardNo.substr(6, 8);
  1772. }
  1773. this.form.birth =
  1774. birth.substr(0, 4) +
  1775. "-" +
  1776. birth.substr(4, 2) +
  1777. "-" +
  1778. birth.substr(6, 2);
  1779. this.form.age = jsGetAge(this.form.birth, "-");
  1780. },
  1781. hadSelectBirth() {
  1782. this.form.age = jsGetAge(this.form.birth, "-");
  1783. },
  1784. checkHeight() {
  1785. if (!isPositiveInteger(this.form.height)) {
  1786. this.$message.error("身高请填写正整数!");
  1787. return false;
  1788. }
  1789. },
  1790. selectFirstDialysisDate() {
  1791. this.form.dialysisAge = dialysisAge(this.form.firstDialysisDate);
  1792. },
  1793. fetchPatient(id) {
  1794. fetchPatient(id)
  1795. .then(response => {
  1796. if (response.data.state == 1) {
  1797. this.$emit("tran-patient-info", response.data.data.patient);
  1798. var patietInfo = response.data.data.patient;
  1799. console.log("9999999",response.data.data.patient)
  1800. this.form.avatar = patietInfo.avatar;
  1801. this.form.name = patietInfo.name;
  1802. this.form.alias = patietInfo.alias;
  1803. this.form.idCardNo = patietInfo.id_card_no;
  1804. this.form.dialysisNo = patietInfo.dialysis_no;
  1805. this.form.gender = patietInfo.gender;
  1806. if (patietInfo.gender == 1 || patietInfo.gender == 2) {
  1807. this.form.gender = patietInfo.gender;
  1808. }
  1809. this.form.birth = uParseTime(patietInfo.birthday, "{y}-{m}-{d}");
  1810. this.form.nation = patietInfo.nation;
  1811. this.form.native_place = patietInfo.native_place;
  1812. this.form.height = patietInfo.height + "";
  1813. console.log(this.form.birth);
  1814. if (patietInfo.marital_status > 0) {
  1815. this.form.maritalStatus = patietInfo.marital_status;
  1816. }
  1817. this.form.children = patietInfo.children;
  1818. this.form.admissionNumber = patietInfo.admission_number;
  1819. if (patietInfo.reimbursement_way_id > 0) {
  1820. this.form.reimbursementWayID = patietInfo.reimbursement_way_id;
  1821. }
  1822. this.form.healthCareNo = patietInfo.health_care_no;
  1823. this.form.phone = patietInfo.phone;
  1824. this.form.homeTelephone = patietInfo.home_telephone;
  1825. this.form.relative_phone = patietInfo.relative_phone;
  1826. this.form.relative_relations = patietInfo.relative_relations;
  1827. this.form.remind_cycle = patietInfo.remind_cycle;
  1828. this.form.homeAddress = patietInfo.home_address;
  1829. this.form.work = patietInfo.work_unit;
  1830. this.form.unit_address = patietInfo.unit_address;
  1831. this.form.user_sys_before_count = patietInfo.user_sys_before_count;
  1832. this.form.treatment_plan = patietInfo.treatment_plan
  1833. if (patietInfo.profession > 0) {
  1834. this.form.profession = patietInfo.profession;
  1835. }
  1836. if (patietInfo.education_level > 0) {
  1837. this.form.education = patietInfo.education_level;
  1838. }
  1839. if (patietInfo.source == 1 || patietInfo.source == 2) {
  1840. this.form.source = patietInfo.source;
  1841. }
  1842. if (patietInfo.lapseto == 1 || patietInfo.lapseto == 2 || patietInfo.lapseto == 3) {
  1843. this.form.lapseto = patietInfo.lapseto;
  1844. }
  1845. if (
  1846. patietInfo.is_hospital_first_dialysis == 1 ||
  1847. patietInfo.is_hospital_first_dialysis == 2
  1848. ) {
  1849. this.form.is_hospital_first_dialysis =
  1850. patietInfo.is_hospital_first_dialysis;
  1851. }
  1852. if (patietInfo.first_dialysis_date != 0) {
  1853. this.form.firstDialysisDate = uParseTime(
  1854. patietInfo.first_dialysis_date,
  1855. "{y}-{m}-{d}"
  1856. );
  1857. }
  1858. this.form.first_dialysis_hospital =
  1859. patietInfo.first_dialysis_hospital;
  1860. if (patietInfo.predialysis_condition.length > 0) {
  1861. this.form.predialysis_condition = patietInfo.predialysis_condition.split(
  1862. ","
  1863. );
  1864. }
  1865. this.form.pre_hospital_dialysis_frequency =
  1866. patietInfo.pre_hospital_dialysis_frequency;
  1867. this.form.pre_hospital_dialysis_times =
  1868. patietInfo.pre_hospital_dialysis_times;
  1869. if (patietInfo.hospital_first_dialysis_date != 0) {
  1870. this.form.hospital_first_dialysis_date = uParseTime(
  1871. patietInfo.hospital_first_dialysis_date,
  1872. "{y}-{m}-{d}"
  1873. );
  1874. }
  1875. this.form.contagions = response.data.data.contagions;
  1876. this.form.diseases = response.data.data.diseases;
  1877. this.form.remark = patietInfo.remark;
  1878. this.form.sch_remark = patietInfo.sch_remark;
  1879. this.form.diagnose = patietInfo.diagnose;
  1880. this.form.patient_complains = patietInfo.patient_complains;
  1881. this.form.present_history = patietInfo.present_history;
  1882. this.form.past_history = patietInfo.past_history;
  1883. this.form.temperature = patietInfo.temperature;
  1884. this.form.pulse = patietInfo.pulse;
  1885. this.form.respiratory = patietInfo.respiratory;
  1886. this.form.sbp = patietInfo.sbp;
  1887. this.form.dbp = patietInfo.dbp;
  1888. this.form.response_result = patietInfo.response_result;
  1889. this.form.is_infectious = patietInfo.is_infectious;
  1890. console.log("哈哈哈哈",patietInfo.is_infectious)
  1891. // if(this.form.is_infectious == 1){
  1892. // this.form.remind_cycle = 0
  1893. // }
  1894. this.form.tell_phone = patietInfo.tell_phone;
  1895. this.form.dialysis_age = patietInfo.dialysis_age;
  1896. this.form.contact_name = patietInfo.contact_name;
  1897. if (patietInfo.expense_kind == 0) {
  1898. this.form.expense_kind = "";
  1899. } else {
  1900. this.form.expense_kind = patietInfo.expense_kind;
  1901. }
  1902. this.form.troble_shoot = patietInfo.troble_shoot
  1903. this.form.zb_patient_id = patietInfo.zb_patient_id
  1904. this.form.first_treatment_date = uParseTime(
  1905. patietInfo.first_treatment_date,
  1906. "{y}-{m}-{d}"
  1907. );
  1908. if (patietInfo.age == 0) {
  1909. this.form.age = jsGetAge(this.form.birth, "-");
  1910. } else {
  1911. this.form.age = patietInfo.age;
  1912. }
  1913. // this.form.initial = patietInfo.initial_dialysis + "";
  1914. // this.form.dialysisTotal = patietInfo.total_dialysis + "";
  1915. // this.form.assessment = patietInfo.evaluate;
  1916. // if (patietInfo.patient_type > 0) {
  1917. // this.form.patientType = patietInfo.patient_type;
  1918. // }
  1919. // if (patietInfo.partition_id > 0) {
  1920. // this.form.partition = patietInfo.partition_id;
  1921. // }
  1922. // if (patietInfo.bed_id > 0) {
  1923. // this.form.bed = patietInfo.bed_id;
  1924. // }
  1925. // this.form.healthCareDueDate = uParseTime(
  1926. // patietInfo.health_care_due_date,
  1927. // "{y}-{m}-{d}"
  1928. // );
  1929. // if (patietInfo.blood_type > 0) {
  1930. // this.form.blood = patietInfo.blood_type;
  1931. // }
  1932. // if (patietInfo.rh > 0) {
  1933. // this.form.rh = patietInfo.rh;
  1934. // }
  1935. // this.form.healthCareDueAlertDate = uParseTime(
  1936. // patietInfo.health_care_due_alert_date,
  1937. // "{y}-{m}-{d}"
  1938. // );
  1939. // this.form.receivingDate = uParseTime(
  1940. // patietInfo.receiving_date,
  1941. // "{y}-{m}-{d}"
  1942. // );
  1943. // this.form.dialysisAge = dialysisAge(
  1944. // this.form.firstDialysisDate,
  1945. // "-"
  1946. // );
  1947. // if (patietInfo.induction_period > 0) {
  1948. // this.form.induction = patietInfo.induction_period;
  1949. // }
  1950. // if (patietInfo.attending_doctor_id > 0) {
  1951. // this.form.doctor = patietInfo.attending_doctor_id;
  1952. // }
  1953. if (patietInfo.head_nurse_id > 0) {
  1954. this.form.nurse = patietInfo.head_nurse_id;
  1955. }
  1956. // if (patietInfo.registrars_id > 0) {
  1957. // this.form.registrars = patietInfo.registrars_id;
  1958. // }
  1959. this.form.record_number = patietInfo.record_number
  1960. this.form.doctor = patietInfo.doctor
  1961. if(this.form.doctor == 0){
  1962. this.form.doctor = ""
  1963. }
  1964. this.form.patient_source = patietInfo.patient_source
  1965. if (patietInfo.patient_start_time != 0) {
  1966. this.form.patient_start_time = uParseTime(
  1967. patietInfo.patient_start_time,
  1968. "{y}-{m}-{d}"
  1969. );
  1970. }
  1971. if (patietInfo.patient_end_time != 0) {
  1972. this.form.patient_end_time = uParseTime(
  1973. patietInfo.patient_end_time,
  1974. "{y}-{m}-{d}"
  1975. );
  1976. }
  1977. this.form.patient_address = patietInfo.patient_address
  1978. this.form.allergic_history = patietInfo.allergic_history
  1979. this.form.infectious_remark = patietInfo.infectious_remark
  1980. this.checkIdCardNo();
  1981. } else {
  1982. this.$notify.error({
  1983. title: "错误",
  1984. message: "网络异常"
  1985. });
  1986. this.$router.back(-1);
  1987. }
  1988. // this.postForm = response.data
  1989. // // Just for test
  1990. // this.postForm.title += ` Article Id:${this.postForm.id}`
  1991. // this.postForm.content_short += ` Article Id:${this.postForm.id}`
  1992. })
  1993. .catch(err => {
  1994. this.$notify.error({
  1995. title: "错误",
  1996. message: "网络异常"
  1997. });
  1998. this.$router.back(-1);
  1999. });
  2000. },
  2001. submitNew(formName) {
  2002. this.dialogFormVisible = false;
  2003. },
  2004. changeCycle(val) {
  2005. if (!this.isEdit) {
  2006. if (this.form.record_date == "" || this.form.record_date == null) {
  2007. this.$message.error("请先选择检查结果日期");
  2008. this.form.remind_cycle = "";
  2009. return;
  2010. }
  2011. }
  2012. },
  2013. changeInfectious(val){
  2014. if(val == 1){
  2015. this.showOne = false
  2016. }
  2017. if(val == 2){
  2018. this.showOne = true
  2019. }
  2020. },
  2021. getTime(value, temp) {
  2022. if (value != undefined) {
  2023. return uParseTime(value, temp);
  2024. }
  2025. return "";
  2026. },
  2027. // fetchAllDoctorAndNurse() {
  2028. // fetchAllDoctorAndNurse().then(response => {
  2029. // if (response.data.state == 1) {
  2030. // this.doctorOptions = response.data.data.doctors;
  2031. // this.nurseOptions = response.data.data.nursers;
  2032. // }
  2033. // });
  2034. // }
  2035. }
  2036. };
  2037. </script>
  2038. <style rel="stylesheet/scss" lang="scss" scoped>
  2039. .uploadHeadBtn {
  2040. width: 148px;
  2041. margin-top: 10px;
  2042. }
  2043. .el-form {
  2044. .el-col-6,
  2045. .el-col-8 {
  2046. width: 430px;
  2047. height: 59px !important;
  2048. }
  2049. .el-form-item {
  2050. .el-select {
  2051. width: 100%;
  2052. }
  2053. .el-date-editor.el-input {
  2054. width: 100%;
  2055. }
  2056. .textarea {
  2057. width: 100%;
  2058. height: 70px;
  2059. border-color: #dcdfe6;
  2060. padding: 5px;
  2061. }
  2062. }
  2063. }
  2064. .el-select-dropdown {
  2065. z-index: 998 !important;
  2066. }
  2067. .newCol {
  2068. position: fixed;
  2069. bottom: 0;
  2070. right: 50px;
  2071. }
  2072. /deep/ .now_his{
  2073. .el-row{
  2074. .el-col-24{
  2075. .el-form-item{
  2076. .el-form-item__content{
  2077. height: 100%;
  2078. .el-textarea{
  2079. .el-textarea__inner{
  2080. height: 93%;
  2081. }
  2082. }
  2083. }
  2084. }
  2085. }
  2086. }
  2087. }
  2088. </style>