|
@ -879,7 +879,9 @@
|
|
|
followupId: Request['id'],
|
|
|
finishedBtn:true, //是否已经完成随访
|
|
|
sfStatus:'', //当前的随访状态
|
|
|
showFinish:true, //是否显示完成随访按钮
|
|
|
showFinish:true, //是否显示完成随访按钮,
|
|
|
followupClass:'',
|
|
|
patientCode:'',
|
|
|
parient: {
|
|
|
"version": Request['version']||'1',
|
|
|
"followup_id": Request['id']||'1', //随访id
|
|
@ -894,7 +896,7 @@
|
|
|
{
|
|
|
"create_user": '',
|
|
|
"create_user_name": '',
|
|
|
"followup_date": new Date().format("yyyy-MM-dd"),//随访日期,
|
|
|
"followup_date": '',
|
|
|
"way": '',//随访方式:1-门诊,2-家庭 3-电话 //整数
|
|
|
"treate_month": '',//治疗月序
|
|
|
"superviser": {
|
|
@ -1111,7 +1113,6 @@
|
|
|
var docInfo = JSON.parse(window.localStorage.getItem("docInfo"));
|
|
|
console.log(docInfo.code)
|
|
|
console.log(docInfo.name)
|
|
|
//获取随访详情
|
|
|
this.getData()
|
|
|
},
|
|
|
computed:{
|
|
@ -1131,41 +1132,73 @@
|
|
|
var vm = this
|
|
|
// var vmP = this.postpartumVisitDetails Request['id']||'1'
|
|
|
fangshiAPI.getPhthisis({ followupId: Request['id']||'1' }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm.getStatus() //获取随访状态
|
|
|
if(res.status==200 && !res.data[0]){
|
|
|
vm.getStatus(true)
|
|
|
}
|
|
|
if (res.status == 200 && res.data[0]) {
|
|
|
console.log("获取肺结核信息")
|
|
|
console.log(res)
|
|
|
vm.parient = res.data[0]
|
|
|
//转换用药数据
|
|
|
vm.yongyao1 = vm.parient.data[0].drug_use.dosage_form?vm.parient.data[0].drug_use.dosage_form.split(','):[]
|
|
|
vm.yongyao2 = vm.parient.data[1].drug_use.dosage_form?vm.parient.data[1].drug_use.dosage_form.split(','):[]
|
|
|
vm.yongyao3 = vm.parient.data[2].drug_use.dosage_form?vm.parient.data[2].drug_use.dosage_form.split(','):[]
|
|
|
vm.yongyao4 = vm.parient.data[3].drug_use.dosage_form?vm.parient.data[3].drug_use.dosage_form.split(','):[]
|
|
|
//转换体征信息
|
|
|
vm.tizheng = vm.parient.data[0].symptom?vm.parient.data[0].symptom.split(','):[]
|
|
|
|
|
|
console.log(vm.parient)
|
|
|
for(var i=0;i<4;i++){
|
|
|
vm.parient.data[i].superviser.superviser_type = vm.parient.data[i].superviser.superviser_type.toString()
|
|
|
vm.parient.data[i].way = vm.parient.data[i].way?vm.parient.data[i].way.toString():vm.parient.data[i].way
|
|
|
vm.parient.data[i].drug_use.method = vm.parient.data[i].drug_use?vm.parient.data[i].drug_use.method.toString():vm.parient.data[i].drug_use
|
|
|
vm.parient.data[i].drug_bad_reaction = vm.parient.data[i].drug_bad_reaction?vm.parient.data[i].drug_bad_reaction.toString():vm.parient.data[i].drug_bad_reaction
|
|
|
vm.parient.data[i].complication = vm.parient.data[i].complication?vm.parient.data[i].complication.toString():vm.parient.data[i].complication
|
|
|
vm.parient.stop_treate.reason = vm.parient.stop_treate.reason?vm.parient.stop_treate.reason.toString():vm.parient.stop_treate.reason
|
|
|
vm.$forceUpdate()
|
|
|
}
|
|
|
console.log("!!!!!!")
|
|
|
console.log(vm.parient)
|
|
|
vm.dealData()
|
|
|
// vm.parient.data = vm.parient.data.map(function(ele){
|
|
|
// var item = ele
|
|
|
// item.superviser.superviser_type = superviser.superviser_type.toString()
|
|
|
// console.log(item.superviser.superviser_type)
|
|
|
// return item
|
|
|
// })
|
|
|
vm.getStatus(false)
|
|
|
} else {
|
|
|
top.toastr.info(res.msg);
|
|
|
// top.toastr.info(res.msg);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
dealData: function () {
|
|
|
//转换用药数据
|
|
|
var vm=this
|
|
|
vm.yongyao1 = vm.parient.data[0].drug_use.dosage_form ? vm.parient.data[0].drug_use.dosage_form.split(',') : []
|
|
|
vm.yongyao2 = vm.parient.data[1].drug_use.dosage_form ? vm.parient.data[1].drug_use.dosage_form.split(',') : []
|
|
|
vm.yongyao3 = vm.parient.data[2].drug_use.dosage_form ? vm.parient.data[2].drug_use.dosage_form.split(',') : []
|
|
|
vm.yongyao4 = vm.parient.data[3].drug_use.dosage_form ? vm.parient.data[3].drug_use.dosage_form.split(',') : []
|
|
|
//转换体征信息
|
|
|
vm.tizheng = vm.parient.data[0].symptom ? vm.parient.data[0].symptom.split(',') : []
|
|
|
console.log(vm.parient)
|
|
|
for (var i = 0; i < 4; i++) {
|
|
|
vm.parient.data[i].superviser.superviser_type = vm.parient.data[i].superviser.superviser_type.toString()
|
|
|
vm.parient.data[i].way = vm.parient.data[i].way ? vm.parient.data[i].way.toString() : vm.parient.data[i].way
|
|
|
vm.parient.data[i].drug_use.method = vm.parient.data[i].drug_use ? vm.parient.data[i].drug_use.method.toString() : vm.parient.data[i].drug_use
|
|
|
vm.parient.data[i].drug_bad_reaction = vm.parient.data[i].drug_bad_reaction ? vm.parient.data[i].drug_bad_reaction.toString() : vm.parient.data[i].drug_bad_reaction
|
|
|
vm.parient.data[i].complication = vm.parient.data[i].complication ? vm.parient.data[i].complication.toString() : vm.parient.data[i].complication
|
|
|
vm.parient.stop_treate.reason = vm.parient.stop_treate.reason ? vm.parient.stop_treate.reason.toString() : vm.parient.stop_treate.reason
|
|
|
vm.$forceUpdate()
|
|
|
}
|
|
|
console.log("!!!!!!")
|
|
|
console.log(vm.parient)
|
|
|
|
|
|
},
|
|
|
getLastData: function (obj) {
|
|
|
var vm = this
|
|
|
fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass, patientCode: vm.patientCode }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
// 默认信息
|
|
|
vm.parient.patient.name = obj.name
|
|
|
vm.parient.management.signature_doctor_name = obj.doctorName
|
|
|
for (var i = 0; i < 4; i++) {
|
|
|
vm.parient.data[i].followup_doctor_name = obj.doctorName
|
|
|
}
|
|
|
// 居民存在上次历史记录,则代入默认信息
|
|
|
if (res.data.detail[0]) {
|
|
|
vm.parient = res.data.detail[0]
|
|
|
vm.dealData()
|
|
|
}
|
|
|
//默认日期(不被历史记录覆盖)
|
|
|
for (var i=0; i<4 ;i++){
|
|
|
vm.parient.data[i].followup_date=new Date().format("yyyy-MM-dd")
|
|
|
}
|
|
|
for (var i=0; i<4 ;i++){
|
|
|
vm.parient.data[0].next_followup_date=""
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@ -1174,7 +1207,8 @@
|
|
|
var vm = this
|
|
|
fangshiAPI.updateFollowStatus({ followupId: this.followupId,isFlag:1 }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm.getStatus()
|
|
|
vm.finishedStatus=true
|
|
|
vm.setEditBtn()
|
|
|
top.toastr.info("完成随访成功")
|
|
|
} else {
|
|
|
top.toastr.error(res.msg);
|
|
@ -1207,6 +1241,7 @@
|
|
|
// top.toastr.info("请输入编号")
|
|
|
// return false
|
|
|
// }
|
|
|
vm.parient.followup_id=Request['id']
|
|
|
fangshiAPI.savePhthisis({ jsonData: JSON.stringify(vm.parient) }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm.finishedStatus ? '' : vm.finish()
|
|
@ -1240,19 +1275,21 @@
|
|
|
this.isEditBtn || !this.finishedStatus?this.editData():''//保存数据
|
|
|
},
|
|
|
//获取当前随访状态信息 Request['id']||'1'
|
|
|
getStatus:function(){
|
|
|
getStatus:function(getLast){
|
|
|
var vm = this
|
|
|
fangshiAPI.getFollowupInfo({ followupId: Request['id']||'1'}).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
|
|
|
if(!vm.finishedStatus){
|
|
|
vm.parient.patient.name=res.data.patient.name
|
|
|
for(var i=0;i<4;i++){
|
|
|
vm.parient.data[i].followup_doctor_name=res.data.doctorName
|
|
|
}
|
|
|
vm.parient.management.signature_doctor_name=res.data.doctorName
|
|
|
vm.patientCode = res.data.patientCode
|
|
|
vm.followupClass = res.data.followupClass
|
|
|
var obj = {}
|
|
|
obj.name = res.data.patient.name
|
|
|
obj.doctorName = res.data.doctorName
|
|
|
// finishedStatus:true 随访完成,false 随访未完成
|
|
|
if(getLast){
|
|
|
vm.getLastData(obj)
|
|
|
}
|
|
|
vm.setEditBtn()
|
|
|
vm.setEditBtn()
|
|
|
} else {
|
|
|
top.toastr.error(res.msg);
|
|
|
}
|