followRecord.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>随访记录</title>
  7. <link rel="shortcut icon" href="../../favicon.ico" />
  8. <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
  9. <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
  10. <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
  11. <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css" />
  12. <link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
  13. <link rel="stylesheet" href="../css/common.css" />
  14. </head>
  15. <style>
  16. #app {
  17. /* display: flex; */
  18. }
  19. .left {
  20. border-right: 1px solid rgba(0, 0, 0, 0.1);
  21. height: 100%;
  22. }
  23. .left .question-box {
  24. border-radius: 6px;
  25. border: 1px solid rgba(0, 0, 0, 0.1);
  26. margin: 20px 20px 0;
  27. padding: 10px 20px 50px 20px;
  28. box-sizing: border-box;
  29. }
  30. .title {
  31. font-weight: bold;
  32. font-size: 18px;
  33. line-height: 24px;
  34. }
  35. .left .form-item {
  36. padding: 6px 0 8px;
  37. border-top: 1px solid rgba(0, 0, 0, 0.1);
  38. font-size: 14px;
  39. }
  40. .el-checkbox + .el-checkbox {
  41. margin-left: 0;
  42. }
  43. .el-checkbox {
  44. margin-right: 0;
  45. }
  46. </style>
  47. <body>
  48. <div id="app" v-cloak>
  49. <div class="left" :style="flag=='2'?'pointer-events: none;':''">
  50. <div class="question-box">
  51. <el-form label-position="left" label-width="120px">
  52. <el-form-item label="姓名" required>
  53. <el-input v-model="form.patientName" placeholder="请输入姓名" :readonly="true"></el-input>
  54. </el-form-item>
  55. <el-form-item label="随访日期" required>
  56. <el-date-picker v-model="form.followupDate" type="datetime" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" placeholder="请选择随访日期"></el-date-picker>
  57. </el-form-item>
  58. <el-form-item label="随访医生" required>
  59. <el-input v-model="form.doctorName" placeholder="请输入随访医生" :readonly="true"></el-input>
  60. </el-form-item>
  61. <el-form-item label="血压" required>
  62. <el-row :gutter="10" style="display: flex">
  63. <el-col :span="8">
  64. <el-input v-model="form.bloodPressure" placeholder="" :readonly="!editable"></el-input>
  65. </el-col>
  66. <el-col :span="2">/</el-col>
  67. <el-col :span="8">
  68. <el-input v-model="form.bloodPressureDown" placeholder="" :readonly="!editable"></el-input>
  69. </el-col>
  70. <el-col :span="6">mmHg</el-col>
  71. </el-row>
  72. </el-form-item>
  73. <el-form-item label="心率" required>
  74. <el-input v-model="form.heartRate" placeholder="请输入心率" :readonly="!editable">
  75. <template slot="append">次/分钟</template>
  76. </el-input>
  77. </el-form-item>
  78. <el-form-item label="LDL-C" required>
  79. <el-input v-model="form.ldlc" placeholder="请输入LDL-C" :readonly="!editable">
  80. <template slot="append">mmol/L</template>
  81. </el-input>
  82. </el-form-item>
  83. <el-form-item label="糖化血红蛋白" required>
  84. <el-input v-model="form.thxhdb" placeholder="请输入糖化血红蛋白" :readonly="!editable">
  85. <template slot="append">%</template>
  86. </el-input>
  87. </el-form-item>
  88. <el-form-item label="吸烟情况" required>
  89. <el-radio-group v-model="form.smoking" :disabled="!editable">
  90. <el-radio label="1">已戒烟或从未吸烟</el-radio>
  91. <el-radio label="5">仍吸烟</el-radio>
  92. </el-radio-group>
  93. </el-form-item>
  94. <el-form-item label="饮酒情况" required>
  95. <el-radio-group v-model="form.drinking" :disabled="!editable">
  96. <el-radio label="1">戒酒或不饮酒</el-radio>
  97. <el-radio label="4">仍饮酒</el-radio>
  98. </el-radio-group>
  99. </el-form-item>
  100. <el-form-item label="目前服用药物" required>
  101. <el-checkbox-group v-model="takingListChecked" :disabled="!editable">
  102. <el-checkbox v-for="(item,index) in takingList" :key="item.code" :label="index">{{ item.value }}</el-checkbox>
  103. </el-checkbox-group>
  104. </el-form-item>
  105. <el-form-item label="不良事件种类">
  106. <el-checkbox-group v-model="adverseEventArr" :disabled="!editable">
  107. <el-checkbox v-for="(item,index) in badEventList1" :key="item.key" :label="index">{{ item.name }}</el-checkbox>
  108. </el-checkbox-group>
  109. </el-form-item>
  110. <el-form-item label="其他事件">
  111. <el-input type="textarea" v-model="form.otherEvents" placeholder="请输入其他事件情况" :rows="3" :maxlength="200" show-word-limit :readonly="!editable"></el-input>
  112. </el-form-item>
  113. <el-form-item label="是否转诊上级医院" required label-width="150px">
  114. <el-radio-group v-model="form.isMoveSuperiorHospital" :disabled="!editable">
  115. <el-radio label="1">是</el-radio>
  116. <el-radio label="2">否</el-radio>
  117. </el-radio-group>
  118. </el-form-item>
  119. <el-form-item label="随访医院" required>
  120. <el-input v-model="form.followHospital" placeholder="请输入随访医院" :readonly="true"></el-input>
  121. </el-form-item>
  122. </el-form>
  123. </div>
  124. <div
  125. v-if="flag=='1'"
  126. class="btns"
  127. style="
  128. position: fixed;
  129. left: 0;
  130. bottom: 0;
  131. border: 1px solid #e5e5e5;
  132. background-color: #fff;
  133. z-index: 99;
  134. width: 100%;
  135. height: 60px;
  136. padding: 0 50px;
  137. display: flex;
  138. align-items: center;
  139. justify-content: space-between;
  140. ">
  141. <div style="height: 40px; width: 150px; background-color: #fff; color: red; line-height: 40px; text-align: center; border: 1px solid red" @click="close">退出</div>
  142. <div style="height: 40px; width: 150px; background-color: #17b3ec; line-height: 40px; text-align: center; color: #fff" @click="onSave">提交</div>
  143. </div>
  144. </div>
  145. <!-- <div class="right">
  146. <div class="base-info">
  147. <div class="title mb8">基本信息</div>
  148. <div class="info-item">
  149. <div class="info-label">随访表单:</div>
  150. <div class="info-value">冠心病日常随访</div>
  151. </div>
  152. <div class="info-item">
  153. <div class="info-label">对象:</div>
  154. <div class="info-value">黄小蕾</div>
  155. </div>
  156. <div class="info-item">
  157. <div class="info-label">随访医生:</div>
  158. <div class="info-value">黄琴</div>
  159. </div>
  160. </div>
  161. <div class="complete-rate">
  162. <div class="title mb8">完成情况</div>
  163. <div class="progress">
  164. <el-progress type="circle" :stroke-width="12" :percentage="percentage" ></el-progress>
  165. </div>
  166. </div>
  167. <div class="btn-box">
  168. <el-button type="primary" style="width: 100%;">提交</el-button>
  169. </div>
  170. </div> -->
  171. </div>
  172. <script type="text/javascript" src="../../../js/vue.js"></script>
  173. <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
  174. <script type="text/javascript" src="../../../js/es6-promise.js" charset="utf-8"></script>
  175. <script type="text/javascript" src="../../../plugins/toastr/toastr.min.js"></script>
  176. <script type="text/javascript" src="../../../plugins/element-ui/element-ui.js"></script>
  177. <script type="text/javascript" src="../../../api/http-request.js"></script>
  178. <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
  179. <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
  180. <script type="text/javascript" src="../../../api/recover_api.js"></script>
  181. <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
  182. <script type="text/javascript" src="../../../component/rehabilitation/server-items-detail.js"></script>
  183. <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
  184. <script type="text/javascript" src="../js/vaile.js" charset="utf-8"></script>
  185. <script>
  186. var httpData = GetRequest()
  187. new Vue({
  188. el: '#app',
  189. data() {
  190. var vm = this
  191. return {
  192. takingListChecked: [],
  193. adverseEventArr: [],
  194. docInfo: JSON.parse(localStorage.docInfo),
  195. badEventListChecked: [],
  196. editable: true,
  197. isLoaded: false,
  198. followup: '',
  199. followTypes: [
  200. { code: '2', text: '家庭' },
  201. { code: '3', text: '电话' }
  202. ],
  203. PositiveList: [
  204. { name: '无阳性体征', checkBox: false, key: 'PositiveNo' },
  205. { name: '颈静脉怒张', checkBox: false, key: 'PositiveJugular' },
  206. { name: '肺部啰音', checkBox: false, key: 'PositiveLungs' },
  207. { name: '心脏杂音', checkBox: false, key: 'PositiveHeart' },
  208. { name: '双下肢水肿', checkBox: false, key: 'PositiveLower' }
  209. ],
  210. badEventList1: [
  211. { name: '无不良事件', checkBox: false, key: 'badEventNo' },
  212. { name: '心源性原因再次入院', checkBox: false, key: 'badEventCardiac' },
  213. { name: '再发心梗', checkBox: false, key: 'badEventMyocardial' },
  214. { name: '脑卒中', checkBox: false, key: 'badEventStroke' },
  215. { name: '严重出血', checkBox: false, key: 'badEventBleeding' },
  216. { name: '外周血管栓塞', checkBox: false, key: 'badEventVascular' },
  217. { name: '恶性心律失常(室速/室颤)', checkBox: false, key: 'badEventMalignant' },
  218. { name: '左室附壁血栓', checkBox: false, key: 'badEventBlood' },
  219. { name: '死亡', checkBox: false, key: 'badEventBusy' },
  220. { name: '其他', checkBox: false, key: 'badEventOther' }
  221. ],
  222. drugEffectsList: [
  223. { name: '无', checkBox: false, key: 'drugEffectsNo' },
  224. { name: '出血', checkBox: false, key: 'drugEffectsBleeding' },
  225. { name: '心率低于55次/分', checkBox: false, key: 'drugEffectsHeartLow' },
  226. { name: '收缩压低于100mmHg', checkBox: false, key: 'drugEffectspressureLow' },
  227. { name: '转氨酶升高', checkBox: false, key: 'drugEffectsTransaminase' },
  228. { name: '肌酶升高', checkBox: false, key: 'drugEffectsEnzymes' },
  229. { name: '其他', checkBox: false, key: 'drugEffectsOther' }
  230. ],
  231. bleedingList: [
  232. { name: '皮肤粘膜', checkBox: false, key: 'bleedingSkin' },
  233. { name: '消化道', checkBox: false, key: 'bleedingDigestive' },
  234. { name: '泌尿道', checkBox: false, key: 'bleedingUrinary' },
  235. { name: '呼吸道', checkBox: false, key: 'bleedingRespiratory' },
  236. { name: '脑出血', checkBox: false, key: 'bleedingCerebral' },
  237. { name: '其他', checkBox: false, key: 'bleedingOther' }
  238. ],
  239. followData: '',
  240. form: {
  241. type: '2', //版本 目前第二版
  242. followId: '',
  243. patientCode: '',
  244. doctorCode: '',
  245. patientName: '', // 姓名
  246. sex: '', // 性别
  247. followupDate: '', // 随访日期
  248. doctorName: '', //随访医生
  249. bloodPressure: '', // 血压1
  250. bloodPressureDown: '', // 血压2
  251. heartRate: '', // 心率
  252. ldlc: '', //LDL-C
  253. thxhdb: '', //糖化血红蛋白
  254. positiveSigns: '', // 阳性体征
  255. smoking: '', // 吸烟情况
  256. drinking: '', // 饮酒情况
  257. randomBloodSugar: '', // 血糖
  258. ccsLevel: '', // 心绞痛
  259. nyhaLevel: '', // 心功能
  260. takeMedicine: '', // 目前服用药物
  261. drugSideEffects: '', // 药物副作用
  262. otherDrugSideEffects: '', // 其他副作用情况
  263. bleedingSite: '', // 出血部位
  264. bleedingDegree: '', // 出血程度
  265. mace: '', // 不良心血管病事件(MACE)
  266. adverseEvent: '', // 不良事件种类 心源性原因再次入院
  267. otherEvents: '', // 其他事件
  268. isMoveSuperiorHospital: '', // 是否转诊上级医院
  269. followHospital: '' // 随访医院
  270. },
  271. serviceInfo: {},
  272. takingList: [],
  273. flag: '1',
  274. rules: {
  275. form: {
  276. patientName: [{ required: true, message: '请输入姓名' }],
  277. followupDate: [{ required: true, message: '请选择随访日期' }],
  278. doctorName: [{ required: true, message: '请输入随访医生' }],
  279. bloodPressure: [{ required: true, message: '请输入完整血压' }],
  280. bloodPressureDown: [{ required: true, message: '请输入完整血压' }],
  281. heartRate: [{ required: true, message: '请输入心率' }],
  282. positiveSigns: {
  283. value: function () {
  284. return _.some(vm.PositiveList, function (v) {
  285. return v.checkBox === true
  286. })
  287. }
  288. },
  289. smoking: [{ required: true, message: '请选择吸烟情况' }],
  290. drinking: [{ required: true, message: '请选择饮酒情况' }],
  291. // taking: {
  292. // value: function () {
  293. // return _.some(vm.takingList, function (v) {
  294. // return v.checkBox === true
  295. // })
  296. // },
  297. // rule: [{ required: true, message: '请选择目前服用药物' }]
  298. // },
  299. // drugEffects: {
  300. // value: function () {
  301. // return _.some(vm.drugEffectsList, function (v) {
  302. // return v.checkBox === true
  303. // })
  304. // },
  305. // rule: [{ required: true, message: '请选择药物副作用情况' }]
  306. // },
  307. // mace: [{ required: true, message: '请选择是否有不良心血管病事件' }],
  308. isMoveSuperiorHospital: [{ required: true, message: '请选择是否转诊上级医院' }],
  309. followHospital: [{ required: true, message: '请输入随访医院' }]
  310. }
  311. }
  312. }
  313. },
  314. watch: {
  315. 'form.takeMedicine': {
  316. handler: function (value) {
  317. console.log(value, 'sssssssssssssss')
  318. }
  319. }
  320. },
  321. mounted: function () {
  322. var vm = this
  323. this.getDictByDictName()
  324. if (httpData.serviceInfo) {
  325. vm.serviceInfo = JSON.parse(decodeURIComponent(httpData.serviceInfo))
  326. console.log(vm.serviceInfo, 'dsaaaaaaaaaaaaaa222')
  327. }
  328. this.form.patientName = vm.serviceInfo.patientName
  329. this.form.followId = vm.serviceInfo.relationCode
  330. this.form.followHospital = this.docInfo.hospitalName
  331. this.form.doctorName = this.docInfo.name
  332. this.form.doctorCode = this.docInfo.code
  333. this.getFollowup(vm.serviceInfo.relationCode)
  334. this.load()
  335. console.log('docInfo', this.docInfo)
  336. },
  337. methods: {
  338. load: function () {
  339. var vm = this
  340. httpRequest.get('doctor/visitDetail/selectFollowupDiseaseById', { data: { type: 'XiaXinCoronaryHear', followupId: vm.serviceInfo.relationCode } }).then(function (res) {
  341. console.log(res, '000000000')
  342. if (res.status == '200') {
  343. vm.followup = _.assign(vm.followup, res.data.followup)
  344. if (res.data.content) {
  345. vm.form = _.assign(vm.form, res.data.content)
  346. vm.$set(vm, 'takingListChecked', res.data.content && res.data.content.takeMedicine.split(','))
  347. vm.$set(vm, 'adverseEventArr', res.data.content && res.data.content.adverseEvent.split(','))
  348. vm.flag = '2'
  349. }
  350. console.log(vm.form, '122222222222', vm.takingListChecked, vm.adverseEventArr, vm.takingList)
  351. }
  352. })
  353. },
  354. getFollowup: function (code) {
  355. var vm = this
  356. httpRequest.get('doctor/followup/getFollowup', { data: { id: code } }).then(function (res) {
  357. if (res.status == 200) {
  358. var data = res.data
  359. vm.followData = res.data
  360. vm.form.sex = data.sex
  361. vm.form.followupDate = data.followupDate
  362. vm.followup = {
  363. followup_id: code,
  364. // status: data.status,
  365. // patientName: vm.serviceInfo.patientName,
  366. followupNextDate: data.followupNextDate,
  367. followupType: data.followupType,
  368. followupClass: data.followupClass,
  369. jwDoctorWorkType: data.jwDoctorWorkType,
  370. followupDate: data.followupDate,
  371. doctorName: data.doctorName,
  372. orgName: data.orgName
  373. // type: vm.serviceInfo.type
  374. }
  375. console.log(vm.followup, '我是vm.followup')
  376. }
  377. })
  378. },
  379. getDictByDictName: function () {
  380. var vm = this
  381. httpRequest.get('/common/getDictByDictName', { data: { name: 'CurrentlyTakingMedication' } }).then(function (res) {
  382. if (res.status == 200) {
  383. var data = res.list
  384. data.forEach(function (v) {
  385. v.checkBox = false
  386. })
  387. vm.takingList = data
  388. }
  389. })
  390. },
  391. close: function () {
  392. var index = parent.layer.getFrameIndex(window.name) //先得到当前iframe层的索引
  393. parent.layer.close(index) //再执行关闭
  394. },
  395. onSave: function () {
  396. var vm = this
  397. var errors = suifangValidate.call(this)
  398. console.log(errors)
  399. if (errors.length) {
  400. layer.msg(errors[0].message)
  401. return Promise.reject()
  402. }
  403. if (vm.takingListChecked.length == 0) {
  404. layer.msg('请选择目前服用药物')
  405. return Promise.reject()
  406. }
  407. if (vm.adverseEventArr.length == 0) {
  408. layer.msg('请选择药物副作用情况')
  409. return Promise.reject()
  410. }
  411. var loadding = top.layer.load(0, { shade: false }) //0代表加载的风格,支持0-2
  412. var positiveSignsarr = []
  413. var takeMedicinearr = []
  414. var drugSideEffectsarr = []
  415. var bleedingSitearr = []
  416. for (var i = 0; i < vm.PositiveList.length; i++) {
  417. if (vm.PositiveList[i].checkBox == true) {
  418. positiveSignsarr.push(i)
  419. }
  420. }
  421. vm.form.positiveSigns = positiveSignsarr.join()
  422. // for (var i = 0; i < vm.takingList.length; i++) {
  423. // if (vm.takingList[i].checkBox == true) {
  424. // takeMedicinearr.push(i)
  425. // }
  426. // }
  427. vm.form.takeMedicine = vm.takingListChecked.join()
  428. for (var i = 0; i < vm.drugEffectsList.length; i++) {
  429. if (vm.drugEffectsList[i].checkBox == true) {
  430. drugSideEffectsarr.push(i)
  431. }
  432. }
  433. vm.form.drugSideEffects = drugSideEffectsarr.join()
  434. for (var i = 0; i < vm.bleedingList.length; i++) {
  435. if (vm.bleedingList[i].checkBox == true) {
  436. bleedingSitearr.push(i)
  437. }
  438. }
  439. vm.form.bleedingSite = bleedingSitearr.join()
  440. var badEventList = vm.form.type == 2 ? vm.badEventList1 : vm.badEventList
  441. // for (var i = 0; i < badEventList.length; i++) {
  442. // if (badEventList[i].checkBox == true) {
  443. // adverseEventarr.push(i)
  444. // }
  445. // }
  446. vm.form.adverseEvent = vm.adverseEventArr.join()
  447. var content = vm.form
  448. content = _.mapObject(content, function (v) {
  449. if (v === false) {
  450. return ''
  451. } else if (v === true) {
  452. return 1
  453. }
  454. return v
  455. })
  456. return httpRequest
  457. .post('doctor/visitDetail/saveFollowupDiseaseArchives', {
  458. data: {
  459. type: 'XiaXinCoronaryHear',
  460. followupId: vm.serviceInfo.relationCode,
  461. jsonData: JSON.stringify({
  462. followup: vm.followup,
  463. content: content
  464. })
  465. }
  466. })
  467. .then(function (res) {
  468. if (res.status == '200') {
  469. httpRequest
  470. .post('doctor/followup/finishFollowup', {
  471. data: {
  472. id: vm.followData.id
  473. }
  474. })
  475. .then(function () {
  476. httpRequest
  477. .post('doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate', {
  478. data: {
  479. planDetailId: httpData.planDetailId,
  480. node: '完成',
  481. image: '',
  482. relationCode: vm.serviceInfo.relationCode
  483. }
  484. })
  485. .then(function (res) {
  486. console.log(res, '我是完成随访')
  487. })
  488. top.layer.close(loadding)
  489. })
  490. }
  491. return res
  492. })
  493. }
  494. }
  495. })
  496. </script>
  497. </body>
  498. </html>