PatientForm.vue 76KB

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