PatientForm.vue 76KB

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