PatientForm.vue 76KB

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