PatientForm.vue 77KB

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