|
@ -13,13 +13,13 @@
|
|
|
<body class="m0">
|
|
|
<div id="app" class="p15 c-333" v-cloak>
|
|
|
<div class="ui-row flex">
|
|
|
<div class="ui-row-item flex">
|
|
|
<div class="ui-row-item flex mr50">
|
|
|
<label class="c-999 w-80">专科团队:</label>
|
|
|
<select v-model="curTeamId" class="form-control w-180 h30">
|
|
|
<option :value="o.id" v-for="(o, i) in teamList">{{o.name}}</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="ui-row-item flex ml50">
|
|
|
<div class="ui-row-item flex">
|
|
|
<label class="c-999 w-80">患者身份证:</label>
|
|
|
<div>
|
|
|
<input type="text" v-model="searchKey" placeholder="请输入患者身份证查询" class="form-control w-220 h30">
|
|
@ -78,7 +78,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="c-t-center mt50">
|
|
|
<button type="button" class="btn btn-12B7F5 btn-size-m" @click="saveBtn">保存</button>
|
|
|
<button type="button" class="btn btn-12B7F5 btn-size-m" @click="judgePatientInSpecia">保存</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else class="c-t-center mt50"><img src="../images/wushuju_img.png" alt=""> <p class="c-999 mt10">{{emptyText}}</p></div>
|
|
@ -150,9 +150,11 @@
|
|
|
},
|
|
|
watch: {
|
|
|
curTeamId: function(){
|
|
|
this.patientInfo = undefined
|
|
|
this.getSpecialistPatientLabel(this.curTeamId)
|
|
|
this.curTeamInfo = this.teamListObj[this.curTeamId]
|
|
|
if(vm.patientInfo){
|
|
|
vm.findPatientSignSpecialistInfo()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@ -208,6 +210,8 @@
|
|
|
if(res.data.length>0){
|
|
|
vm.patientInfo = res.data[0]
|
|
|
vm.getPatientLabelInfo()
|
|
|
// 获取签约专科信息
|
|
|
vm.findPatientSignSpecialistInfo()
|
|
|
} else {
|
|
|
vm.patientInfo = undefined
|
|
|
vm.emptyText = '患者暂未家签,请先提醒患者完成家庭医生签约'
|
|
@ -306,37 +310,75 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//居民未与扫描的二维码团队对应
|
|
|
createPatientInSpeciaRelation:function(data){
|
|
|
//判断居民是否签约专科医生
|
|
|
findPatientSignSpecialistInfo: function() {
|
|
|
var vm = this,
|
|
|
params = {
|
|
|
patient: data.patient_code,
|
|
|
doctor: docInfo.code,
|
|
|
patientName: data.patient_name,
|
|
|
doctorName: docInfo.name,
|
|
|
teamCode:data.teamCode
|
|
|
patient: vm.patientInfo.patient,
|
|
|
doctor: docInfo.code
|
|
|
}
|
|
|
rehaAPI.createPatientInSpeciaRelation(params).then(function(res){
|
|
|
if(res.data&&res.data.status == 200) {
|
|
|
|
|
|
recoverApi.findPatientSignSpecialistInfo(params).then(function(res){
|
|
|
if(res.status == 200) {
|
|
|
if(res.data.teamCode){
|
|
|
if(res.data.teamCode==vm.curTeamInfo.id){ //签约团队与二维码团队一致
|
|
|
vm.is_sign_specialist = true
|
|
|
}else{
|
|
|
vm.is_sign_specialist = false
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
showErrorMessage(res.msg);
|
|
|
showErrorMessage(res.msg)
|
|
|
}
|
|
|
})
|
|
|
|
|
|
},
|
|
|
saveBtn: function(){
|
|
|
//居民未与扫描的二维码团队对应
|
|
|
createPatientInSpeciaRelation:function(data){
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
var vm = this,
|
|
|
params = {
|
|
|
patient: data.patient_code,
|
|
|
doctor: docInfo.code,
|
|
|
patientName: data.patient_name,
|
|
|
doctorName: docInfo.name,
|
|
|
teamCode:data.teamCode
|
|
|
}
|
|
|
rehaAPI.createPatientInSpeciaRelation({jsonData:JSON.stringify(params)}).then(function(res){
|
|
|
// if(res.data&&res.data.status == 200) {
|
|
|
// resolve(res)
|
|
|
// } else {
|
|
|
// showErrorMessage(res.msg);
|
|
|
// reject(res)
|
|
|
// }
|
|
|
resolve(res)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
judgePatientInSpecia: function(){
|
|
|
var vm = this
|
|
|
var vm = this, num1 = 0, num2 = 0,
|
|
|
health = {}, disease = [], custom = []
|
|
|
if(!vm.patientInfo){return false}
|
|
|
if(!is_sign_specialist){
|
|
|
vm.createPatientInSpeciaRelation({
|
|
|
patient_code: vm.patientInfo.patient,
|
|
|
patient_name: vm.patientInfo.patientName,
|
|
|
teamCode: vm.curTeamInfo.id
|
|
|
if(!vm.is_sign_specialist){
|
|
|
var text = "请问您是否确认为"+vm.patientInfo.patientName+"患者进行康复下转?"
|
|
|
var current=layer.confirm(text, {
|
|
|
btn: ['确定', '取消'],
|
|
|
title: "提示"
|
|
|
}, function (index) {
|
|
|
vm.createPatientInSpeciaRelation({
|
|
|
patient_code: vm.patientInfo.patient,
|
|
|
patient_name: vm.patientInfo.patientName,
|
|
|
teamCode: vm.curTeamInfo.id
|
|
|
}).then(function(res){
|
|
|
setTimeout(function(){
|
|
|
vm.saveBtn()
|
|
|
}, 500)
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
vm.saveBtn()
|
|
|
}
|
|
|
},
|
|
|
saveBtn: function(){
|
|
|
var vm = this, num1 = 0, num2 = 0,
|
|
|
health = {}, disease = [], custom = []
|
|
|
if(!vm.curHealthStatu){
|
|
|
showWarningMessage('请选择健康情况!')
|
|
|
return false
|
|
@ -389,7 +431,8 @@
|
|
|
var params = {
|
|
|
patient: vm.patientInfo.patient, // "915cdef5-5b1d-11e6-8344-fa163e8aee56"
|
|
|
patientName: vm.patientInfo.patientName,
|
|
|
json: JSON.stringify(data)
|
|
|
json: JSON.stringify(data),
|
|
|
teamCode: vm.curTeamInfo.id
|
|
|
}
|
|
|
var loading = top.layer.load(0, {shade: false}); //0代表加载的风格,支持0-2
|
|
|
rehaAPI.updatePatientLabelInfo(params).then(function(res){
|