followRecord.html 23 KB

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