PatientForm.vue 84KB

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