分包医生
This commit is contained in:
@@ -0,0 +1,568 @@
|
||||
import Toast from '@vant/weapp/toast/toast';
|
||||
import { API } from '../../../../utils/network/api'
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '在线开方', //导航栏 中间的标题
|
||||
},
|
||||
autoHeight:{ minHeight: 100},
|
||||
add_disease_desc:'',//医生填写的病情主诉
|
||||
height: app.globalData.height,
|
||||
zhenduan_popshow: false,
|
||||
drugs_popshow: false,
|
||||
note_popshow: false,
|
||||
disease_class_name: "",
|
||||
zhenduan_search_list: [],
|
||||
zhenduan_list: [],
|
||||
note_columns: ['杭州', '宁波', '温州', '嘉兴', '湖州'],
|
||||
drugs_box_item_list:[],
|
||||
drug_content_show: false,
|
||||
search_drug_list_empty: true,
|
||||
search_drug_list: [],
|
||||
product_name: "",
|
||||
select_drug_id: "",
|
||||
save_durg_product_id: "",
|
||||
save_durg_prescription_product_num: "",
|
||||
save_durg_single_unit: "",
|
||||
save_durg_single_use: "",
|
||||
save_durg_packaging_unit: "",
|
||||
save_durg_frequency_use: "",
|
||||
save_durg_available_days: "",
|
||||
order_inquiry_id: "",
|
||||
order_prescription_id: "",
|
||||
doctor_advice: "",
|
||||
prescription_num:0,
|
||||
doctors_advice_focus: false,
|
||||
case_detail: {},
|
||||
sub_disabled: false,
|
||||
from: "",
|
||||
now_filed_focus: 'save_durg_prescription_product_num',
|
||||
page_meta_show: true,
|
||||
static_host: api.getStaticHost()
|
||||
},
|
||||
changeFocus(e){
|
||||
let next_filed_focus = e.currentTarget.dataset.next_filed_focus;
|
||||
this.setData({
|
||||
now_filed_focus: next_filed_focus
|
||||
})
|
||||
},
|
||||
onDoctorsAdviceFocus(){
|
||||
this.setData({
|
||||
doctors_advice_focus: true
|
||||
})
|
||||
},
|
||||
onLoad(options){
|
||||
let from = options.from;
|
||||
let order_inquiry_id = options.order_inquiry_id;
|
||||
let order_prescription_id = options.order_prescription_id ;
|
||||
//获取患者问诊病例
|
||||
api.getInquiryDetail({order_inquiry_id: order_inquiry_id}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
case_detail: response.data
|
||||
})
|
||||
}).then(res => {
|
||||
//有处方id,才去请求详情
|
||||
if(order_prescription_id){
|
||||
this.getDoctorPrescriptionInfo(order_inquiry_id, order_prescription_id);
|
||||
}
|
||||
}).catch(errors => {console.error(errors);})
|
||||
this.setData({
|
||||
order_inquiry_id: order_inquiry_id,
|
||||
order_prescription_id: order_prescription_id,
|
||||
from: from
|
||||
})
|
||||
if(from == 'chat'){
|
||||
this.setData({
|
||||
"navbarData.title": '处方详情'
|
||||
})
|
||||
}
|
||||
},
|
||||
select_drug(e){
|
||||
this.setData({
|
||||
drug_content_show: true,
|
||||
prescription_num:e.currentTarget.dataset.prescription_num,
|
||||
product_name: e.currentTarget.dataset.product_name,
|
||||
select_drug_id: e.currentTarget.dataset.product_id,
|
||||
save_durg_product_id: e.currentTarget.dataset.product_id,
|
||||
save_durg_single_use: e.currentTarget.dataset.single_use,
|
||||
save_durg_frequency_use: e.currentTarget.dataset.frequency_use,
|
||||
save_durg_single_unit: e.currentTarget.dataset.single_unit,
|
||||
save_durg_available_days: e.currentTarget.dataset.available_days,
|
||||
save_durg_packaging_unit: e.currentTarget.dataset.packaging_unit,
|
||||
});
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ drugs_popshow: true });
|
||||
},
|
||||
|
||||
onClose() {
|
||||
var _this = this;
|
||||
this.setData({
|
||||
drugs_popshow: false,
|
||||
});
|
||||
|
||||
setTimeout(function(){
|
||||
_this.setData({
|
||||
drug_content_show: false,
|
||||
search_value: ""
|
||||
});
|
||||
},1000)
|
||||
},
|
||||
|
||||
showNotePopup() {
|
||||
this.setData({ note_popshow: true });
|
||||
},
|
||||
|
||||
onCloseNote() {
|
||||
this.setData({ note_popshow: false });
|
||||
},
|
||||
|
||||
onConfirmNote(event) {
|
||||
const { picker, value, index } = event.detail;
|
||||
Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
this.setData({ note_popshow: false });
|
||||
},
|
||||
|
||||
onCancelNote(event) {
|
||||
const { picker, value, index } = event.detail;
|
||||
Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
this.setData({ note_popshow: false });
|
||||
},
|
||||
|
||||
onChangeNote(event) {
|
||||
const { picker, value, index } = event.detail;
|
||||
Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
},
|
||||
|
||||
saveDrugs(){
|
||||
console.log("saveDrugs");
|
||||
|
||||
let product_id = this.data.save_durg_product_id;
|
||||
this.delDrugBox(product_id);
|
||||
let save_durg_prescription_product_num = this.data.save_durg_prescription_product_num;
|
||||
|
||||
if(!save_durg_prescription_product_num || save_durg_prescription_product_num <0){
|
||||
Dialog.alert({
|
||||
message: '请输入药品数量',
|
||||
}).then(() => {
|
||||
this.setData({
|
||||
save_durg_prescription_product_num: ""
|
||||
})
|
||||
});
|
||||
return
|
||||
};
|
||||
let prescription_num=this.data.prescription_num?this.data.prescription_num:5
|
||||
if(save_durg_prescription_product_num>prescription_num){
|
||||
Dialog.alert({
|
||||
message: '药品数量不能超过'+this.data.prescription_num+"个",
|
||||
}).then(() => {
|
||||
this.setData({
|
||||
save_durg_prescription_product_num:''
|
||||
})
|
||||
});
|
||||
return
|
||||
};
|
||||
let save_durg = {};
|
||||
save_durg.product_name = this.data.product_name;
|
||||
save_durg.product_id = this.data.save_durg_product_id;
|
||||
save_durg.prescription_product_num = this.data.save_durg_prescription_product_num;
|
||||
|
||||
save_durg.single_unit = this.data.save_durg_single_unit;
|
||||
save_durg.single_use = this.data.save_durg_single_use;
|
||||
save_durg.packaging_unit = this.data.save_durg_packaging_unit;
|
||||
save_durg.frequency_use = this.data.save_durg_frequency_use;
|
||||
save_durg.available_days = this.data.save_durg_available_days;
|
||||
let list = this.data.drugs_box_item_list;
|
||||
list.push(save_durg);
|
||||
this.setData({
|
||||
drugs_box_item_list: list,
|
||||
drugs_popshow: false,
|
||||
product_name: "",
|
||||
drug_content_show: false,
|
||||
search_drug_list: [],
|
||||
save_durg_product_id: "",
|
||||
save_durg_prescription_product_num: "",
|
||||
save_durg_single_unit: "",
|
||||
save_durg_single_use: "",
|
||||
save_durg_packaging_unit: "",
|
||||
save_durg_frequency_use: "",
|
||||
save_durg_available_days: ""
|
||||
})
|
||||
|
||||
},
|
||||
showZhenDuan(){
|
||||
this.setData({
|
||||
zhenduan_popshow: true
|
||||
})
|
||||
},
|
||||
onZhenDuanChange(e){
|
||||
console.log(e)
|
||||
let name = e.detail;
|
||||
this.setData({
|
||||
zhenduan_search_list: []
|
||||
})
|
||||
if(name){
|
||||
this.search();
|
||||
}
|
||||
},
|
||||
search(){
|
||||
//搜索诊断
|
||||
let params = {};
|
||||
params.icd_keyword = this.data.disease_class_name;
|
||||
api.getBasicIcdSearch(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
zhenduan_search_list: response.data
|
||||
})
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
searchDrug(){
|
||||
//搜索药品
|
||||
let params = {};
|
||||
params.product_keyword = this.data.product_name;
|
||||
api.getBasicProductSearch(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
drug_content_show: false
|
||||
})
|
||||
if(response.data.length > 0){
|
||||
this.setData({
|
||||
search_drug_list_empty: false,
|
||||
search_drug_list: response.data,
|
||||
})
|
||||
}
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
onDrugChange(e){
|
||||
console.log(e.detail);
|
||||
let name = e.detail;
|
||||
this.setData({
|
||||
search_drug_list_empty: true,
|
||||
search_drug_list: []
|
||||
})
|
||||
if(name){
|
||||
this.searchDrug();
|
||||
}
|
||||
},
|
||||
onZhenduanClose(){
|
||||
this.setData({
|
||||
zhenduan_popshow: false
|
||||
})
|
||||
},
|
||||
addZhenDuan(e){
|
||||
let icd_name = e.currentTarget.dataset.icd_name;
|
||||
let icd_id = e.currentTarget.dataset.icd_id;
|
||||
console.log("icd_name: ", icd_name);
|
||||
console.log("icd_id: ", icd_id);
|
||||
|
||||
let disease_obj = {};
|
||||
disease_obj.icd_name = icd_name;
|
||||
disease_obj.icd_id = icd_id;
|
||||
let list = this.data.zhenduan_list;
|
||||
let find_index = list.findIndex(item => {
|
||||
return item.icd_id == icd_id
|
||||
});
|
||||
if(find_index == -1){
|
||||
list.push(disease_obj);
|
||||
}
|
||||
this.setData({
|
||||
zhenduan_list: list,
|
||||
zhenduan_popshow: false
|
||||
})
|
||||
},
|
||||
delZhenDuan(e){
|
||||
let disease_class_id = e.currentTarget.dataset.disease_class_id;
|
||||
console.log("disease_class_id: ", disease_class_id);
|
||||
let list = this.data.zhenduan_list;
|
||||
let find_index = list.findIndex(item => {
|
||||
return item.icd_id == disease_class_id
|
||||
});
|
||||
console.log("find_idex: ", find_index)
|
||||
list.splice(find_index, 1);
|
||||
this.setData({
|
||||
zhenduan_list: list
|
||||
})
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
console.log(url);
|
||||
app.go(url);
|
||||
},
|
||||
editDrug(e){
|
||||
let product_id = e.currentTarget.dataset.product_id;
|
||||
console.log(product_id);
|
||||
let list = this.data.drugs_box_item_list;
|
||||
let drug = list.find(item => {
|
||||
return item.product_id == product_id;
|
||||
})
|
||||
console.log(drug);
|
||||
this.setData({
|
||||
drugs_popshow: true,
|
||||
product_name: drug.product_name,
|
||||
drug_content_show: true,
|
||||
save_durg_product_id: drug.product_id,
|
||||
save_durg_prescription_product_num: drug.prescription_product_num,
|
||||
save_durg_single_unit: drug.single_unit,
|
||||
save_durg_single_use: drug.single_use,
|
||||
save_durg_packaging_unit: drug.packaging_unit,
|
||||
save_durg_frequency_use: drug.frequency_use,
|
||||
save_durg_available_days: drug.available_days
|
||||
})
|
||||
},
|
||||
delDrug(e){
|
||||
let product_id = e.currentTarget.dataset.product_id;
|
||||
console.log(product_id);
|
||||
this.delDrugBox(product_id);
|
||||
},
|
||||
delDrugBox(product_id){
|
||||
let list = this.data.drugs_box_item_list;
|
||||
let drug_index = list.findIndex(item => {
|
||||
return item.product_id == product_id;
|
||||
})
|
||||
console.log(drug_index);
|
||||
if(drug_index > -1){
|
||||
list.splice(drug_index, 1);
|
||||
this.setData({
|
||||
drugs_box_item_list: list
|
||||
})
|
||||
}
|
||||
},
|
||||
onChangeTextAraa(event){
|
||||
this.setData({
|
||||
add_disease_desc:event.detail
|
||||
})
|
||||
},
|
||||
getAdvice(e){
|
||||
console.log(e.detail.value)
|
||||
this.setData({
|
||||
doctor_advice: e.detail.value
|
||||
})
|
||||
},
|
||||
postDoctorPrescription(e){//新增处方
|
||||
|
||||
let sub_disabled = this.data.sub_disabled;
|
||||
if(sub_disabled) return
|
||||
|
||||
console.log("postDoctorPrescription postDoctorPrescription");
|
||||
//先置灰,避免重复提交
|
||||
this.setData({
|
||||
sub_disabled: true
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params.order_inquiry_id = this.data.order_inquiry_id;
|
||||
params.doctor_advice = this.data.doctor_advice;
|
||||
let prescription_icd = [];
|
||||
this.data.zhenduan_list.forEach(item => {
|
||||
prescription_icd.push(item.icd_id);
|
||||
})
|
||||
params.prescription_icd = prescription_icd;
|
||||
params.prescription_product = this.data.drugs_box_item_list;
|
||||
|
||||
console.log(params);
|
||||
//糖组检测需要填病情主诉;
|
||||
let disease_desc=this.data.case_detail.disease_desc;
|
||||
params.disease_desc=disease_desc?disease_desc:this.data.add_disease_desc;
|
||||
if(!params.disease_desc){
|
||||
wx.showToast({
|
||||
title: '请填写病情主诉',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(prescription_icd.length == 0){
|
||||
wx.showToast({
|
||||
title: '请选择诊断',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(params.prescription_product.length == 0){
|
||||
wx.showToast({
|
||||
title: '请选择药品',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.doctor_advice == ""){
|
||||
wx.showToast({
|
||||
title: '请填写医嘱',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.doctor_advice.length < 5 || this.data.doctor_advice.length > 200){
|
||||
wx.showToast({
|
||||
title: '医嘱字数5-20',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
api.postDoctorPrescription(params).then(response => {
|
||||
console.log(response);
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: "success"
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.navigateBack();
|
||||
}, 1000);
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
})
|
||||
},
|
||||
get_save_durg_prescription_product_num(e){
|
||||
console.log("get_save_durg_prescription_product_num")
|
||||
let save_durg_prescription_product_num = e.detail
|
||||
console.log(typeof save_durg_prescription_product_num)
|
||||
save_durg_prescription_product_num = Number.parseInt(save_durg_prescription_product_num)
|
||||
console.log(save_durg_prescription_product_num)
|
||||
if(isNaN(save_durg_prescription_product_num)){
|
||||
Dialog.alert({
|
||||
message: '请输入正确数字',
|
||||
}).then(() => {
|
||||
this.setData({
|
||||
save_durg_prescription_product_num: ""
|
||||
})
|
||||
});
|
||||
return
|
||||
}
|
||||
let prescription_num=this.data.prescription_num?this.data.prescription_num:5
|
||||
if(save_durg_prescription_product_num > prescription_num){
|
||||
Dialog.alert({
|
||||
message: '药品数量不允许添加超过'+prescription_num+'个',
|
||||
}).then(() => {
|
||||
this.setData({
|
||||
save_durg_prescription_product_num:''
|
||||
})
|
||||
});
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
save_durg_prescription_product_num: save_durg_prescription_product_num
|
||||
})
|
||||
},
|
||||
putDoctorPrescription(){//修改处方
|
||||
let sub_disabled = this.data.sub_disabled;
|
||||
if(sub_disabled) return
|
||||
|
||||
console.log("putDoctorPrescription putDoctorPrescription");
|
||||
//先置灰,避免重复提交
|
||||
this.setData({
|
||||
sub_disabled: true
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params.order_prescription_id = this.data.order_prescription_id;
|
||||
params.doctor_advice = this.data.doctor_advice;
|
||||
let prescription_icd = [];
|
||||
this.data.zhenduan_list.forEach(item => {
|
||||
prescription_icd.push(item.icd_id);
|
||||
})
|
||||
params.prescription_icd = prescription_icd;
|
||||
params.prescription_product = this.data.drugs_box_item_list;
|
||||
|
||||
console.log(params);
|
||||
|
||||
if(prescription_icd.length == 0){
|
||||
wx.showToast({
|
||||
title: '请选择诊断',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(params.prescription_product.length == 0){
|
||||
wx.showToast({
|
||||
title: '请选择药品',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.doctor_advice == ""){
|
||||
wx.showToast({
|
||||
title: '请填写医嘱',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.doctor_advice.length < 5 || this.data.doctor_advice.length > 200){
|
||||
wx.showToast({
|
||||
title: '医嘱字数5-20',
|
||||
icon: "error"
|
||||
})
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
api.putDoctorPrescription(params).then(response => {
|
||||
console.log(response);
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: "success"
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.navigateBack();
|
||||
}, 1000);
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
this.setData({
|
||||
sub_disabled: false
|
||||
})
|
||||
})
|
||||
},
|
||||
getDoctorPrescriptionInfo(order_inquiry_id, order_prescription_id){//获取处方详情
|
||||
let params = {};
|
||||
params.order_inquiry_id = order_inquiry_id;
|
||||
params.order_prescription_id = order_prescription_id;
|
||||
api.getDoctorPrescriptionInfo(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
doctor_advice: response.data.prescription.doctor_advice,
|
||||
pharmacist_audit_status: response.data.prescription.pharmacist_audit_status,
|
||||
zhenduan_list: response.data.prescription_icd,
|
||||
drugs_box_item_list: response.data.prescription_product
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-picker": "@vant/weapp/picker/index",
|
||||
"van-search": "@vant/weapp/search/index",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-toast": "@vant/weapp/toast/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<!-- <page-meta page-style="{{ page_meta_show ? 'overflow: hidden;' : '' }}" /> -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="item">
|
||||
<!-- 头部 -->
|
||||
<view class="item_top">
|
||||
<view class="item_top_name">{{case_detail.name}}</view>
|
||||
<view class="item_top_sex">{{case_detail.sex==1?'男':case_detail.sex==2?'女':'未知'}}|{{case_detail.age}}岁 </view>
|
||||
<view class="check" bindtap="go" data-url="/user/pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}">查看病历</view>
|
||||
</view>
|
||||
<!-- 中间内容部分 -->
|
||||
<view class="item_content">
|
||||
<view class="item_content_li {{!case_detail.disease_desc?'active':''}}">
|
||||
<view class="item_content_li_title">病情主诉:</view>
|
||||
<van-field wx:if="{{!case_detail.disease_desc}}" value="{{add_disease_desc}}" class="item_content_li_txt" label="" custom-style="border:1px solid #dfdfdf;border-radius:8rpx;margin-top:20rpx" type="textarea" maxlength="500" placeholder="请填写患者病情" show-word-limit="{{true}}" autosize="{{autoHeight}}" bind:change="onChangeTextAraa"/>
|
||||
<view class="item_content_li_txt" wx:else>{{case_detail.disease_desc}}</view>
|
||||
</view>
|
||||
<view class="item_content_li" wx:if="{{case_detail.product.length > 0}}">
|
||||
<view class="item_content_li_title">用药意向:</view>
|
||||
<view class="item_content_li_txt"><text wx:for="{{case_detail.product}}">{{item}};</text></view>
|
||||
</view>
|
||||
<!-- <view class="item_content_li">
|
||||
<view class="item_content_li_title">处方时间:</view>
|
||||
<view class="item_content_li_txt">2022年12月23日 12:45</view>
|
||||
</view>
|
||||
<view class="item_content_li">
|
||||
<view class="item_content_li_title">驳回原因:</view>
|
||||
<view class="item_content_li_txt">图片不清晰</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-cell-group inset>
|
||||
<van-cell use-label-slot bind:click="showZhenDuan" custom-style="font-size:30rpx;color: #333;" title="诊断">
|
||||
<view class="addzhenduan" wx:if="{{from != 'chat'}}">+添加诊断</view>
|
||||
<view slot="label" style="width: 180%;">
|
||||
<view style="margin-top: 20rpx;" class="label_item" wx:for="{{zhenduan_list}}">
|
||||
<van-icon name="delete" catchtap="delZhenDuan" color="red" data-disease_class_id="{{item.icd_id}}" wx:if="{{from != 'chat'}}" />
|
||||
<text style="margin-left: 10rpx;">{{item.icd_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<view class="txt_title">开方药品</view>
|
||||
|
||||
<view class="drugs_box">
|
||||
|
||||
<view class="drugs_box_item" wx:for="{{ drugs_box_item_list }}" wx:for-item="drugs">
|
||||
<view class="drugs_name">{{ drugs.product_name }}(数量{{ drugs.prescription_product_num}})</view>
|
||||
<view class="drugs_guige">用法用量:{{ drugs.single_use }};{{ drugs.frequency_use }};{{ drugs.single_unit }}</view>
|
||||
<!-- <view class="drugs_dosage">备注:{{ drugs.drugs_dosage }}</view> -->
|
||||
<view class="btn" wx:if="{{from != 'chat'}}">
|
||||
<van-button bind:click="editDrug" size="small" custom-style="font-size:28rpx;" data-product_id="{{drugs.product_id}}" color="#666" plain round type="info">编辑</van-button>
|
||||
<van-button bind:click="delDrug" custom-style="margin-left: 20rpx;font-size:28rpx;" data-product_id="{{drugs.product_id}}" size="small" color="#666" plain round type="info">删除</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="adddrugs_btn" wx:if="{{from != 'chat'}}">
|
||||
<van-button bind:click="showPopup" color="rgba(44,241,248,0.28);" custom-style="color:#3CC7C0; font-size:30rpx; border-radius: 10rpx;" type="primary" block>+添加药品</van-button>
|
||||
</view>
|
||||
<form bindsubmit="{{ order_prescription_id == ''?'postDoctorPrescription':'putDoctorPrescription' }}">
|
||||
<view class="txt_title">医嘱</view>
|
||||
<view class="doctors_advice" bindtap="onDoctorsAdviceFocus">
|
||||
<textarea disabled="{{from == 'chat'}}" auto-height focus="{{doctors_advice_focus}}" maxlength="1000" bindblur="getAdvice" style="width: 100%;" placeholder-style="font-size:15px; color:#999" placeholder="请输入医嘱(5-200字)" name="doctors_advice" value="{{doctor_advice}}"></textarea>
|
||||
</view>
|
||||
<!-- 从聊天页面过来的不显示按钮 -->
|
||||
<view class="sub_btn" wx:if="{{from != 'chat'}}">
|
||||
<van-button disabled="{{sub_disabled}}" form-type="submit" color="#3CC7C0; font-size:30rpx; border-radius: 10rpx;" type="primary" block>{{ order_prescription_id == ''?'提交审核':'重开处方' }}</van-button>
|
||||
</view>
|
||||
<!-- 0:审核中 1:审核成功 2:审核驳回 -->
|
||||
<view class="sub_btn" wx:if="{{from == 'chat'}}">
|
||||
<van-button disabled color="#3CC7C0; font-size:30rpx; border-radius: 10rpx;" type="primary" block>{{ pharmacist_audit_status == 0?'审核中':pharmacist_audit_status==1?'审核成功':pharmacist_audit_status==2?'审核驳回':'审核中' }}</van-button>
|
||||
</view>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<van-popup show="{{ drugs_popshow }}" closeable round position="bottom" custom-style="" bind:close="onClose">
|
||||
<view class="pop_title">添加药品</view>
|
||||
|
||||
<view class="search_drug">
|
||||
<view class="search_drug_btn">
|
||||
<text class="search_drug_btn_title">药品名称</text>
|
||||
<van-search model:value="{{ product_name }}" class="search_drug_btn_input" clearable shape="round" placeholder="请输入药品名称或拼音码搜索" bind:change="onDrugChange" />
|
||||
</view>
|
||||
|
||||
<view class="search_drug_list" wx:if="{{ !drug_content_show }}">
|
||||
<view class="search_drug_list_empty" wx:if="{{ search_drug_list_empty }}">
|
||||
<van-image width="300rpx" height="300rpx" fit="contain" src="{{static_host}}/applet/doctor/static/images/yishi/search_drugs.png" />
|
||||
</view>
|
||||
<view class="search_drug_list_noempty" wx:if="{{ !search_drug_list_empty }}">
|
||||
<view class="search_drug_list_item" data-product_name="{{item.product_name}}" data-product_id="{{item.product_id}}" data-single_use="{{item.single_use}}" data-frequency_use="{{item.frequency_use}}" data-single_unit="{{item.single_unit}}" data-available_days="{{item.available_days}}" data-packaging_unit="{{item.packaging_unit}}" data-prescription_num="{{item.prescription_num}}" bindtap="select_drug" wx:for="{{search_drug_list}}">
|
||||
<view>{{item.product_name}}</view>
|
||||
<view style="font-size: 26rpx;color: #3CC7C0;">{{item.manufacturer}}</view>
|
||||
</view>
|
||||
<!-- <view class="search_drug_list_item" data-search_value="恩替卡韦分散片" bindtap="select_drug">恩替卡韦分散片 0.5mg*7粒*3版</view>
|
||||
<view class="search_drug_list_item" data-search_value="恩替卡韦片" bindtap="select_drug">恩替卡韦片 0.5mg*7粒*3版</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-cell-group wx:if="{{ drug_content_show }}">
|
||||
<van-field label="用法" type="text" model:value="{{save_durg_single_use}}" input-align="left" placeholder="请输入用法(口服)" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_frequency_use" focus="{{now_filed_focus == 'save_durg_single_use'}}" border="{{ true }}" />
|
||||
<van-field label="用次" type="text" model:value="{{save_durg_frequency_use}}" input-align="left" placeholder="请输入服用次(一日1次)" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_single_unit" focus="{{now_filed_focus == 'save_durg_frequency_use'}}" border="{{ true }}" />
|
||||
<van-field label="用量" type="text" model:value="{{save_durg_single_unit}}" input-align="left" placeholder="请输入用量(一次3粒)" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_available_days" focus="{{now_filed_focus == 'save_durg_single_unit'}}" border="{{ true }}" />
|
||||
<van-field label="用药天数" type="text" model:value="{{save_durg_available_days}}" input-align="left" placeholder="请输入时长" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_prescription_product_num" focus="{{now_filed_focus == 'save_durg_available_days'}}" border="{{ true }}" />
|
||||
<van-field label="药品数量" type="number" bind:input="get_save_durg_prescription_product_num" value="{{save_durg_prescription_product_num}}" input-align="left" placeholder="请输入数量" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_packaging_unit" focus="{{now_filed_focus == 'save_durg_prescription_product_num'}}" border="{{ true }}" />
|
||||
<van-field label="单位" type="text" model:value="{{save_durg_packaging_unit}}" input-align="left" placeholder="盒/袋" custom-style="font-size: 30rpx;" clearable confirm-type="done" border="{{ true }}" />
|
||||
|
||||
<!-- <van-cell title="备注" bind:click="showNotePopup" is-link value="请选择" /> -->
|
||||
|
||||
<van-button bind:click="saveDrugs" custom-style="width: 90%;border-radius: 10rpx; margin: 20rpx auto;" type="primary" color="#3CC7C0" block>保存</van-button>
|
||||
|
||||
</van-cell-group>
|
||||
</van-popup>
|
||||
|
||||
<van-popup show="{{ note_popshow }}" round position="bottom" custom-style="" bind:close="onCloseNote">
|
||||
<van-picker show-toolbar columns="{{ note_columns }}" title="选择备注" bind:cancel="onCancelNote" bind:confirm="onConfirmNote" bind:change="onChangeNote" />
|
||||
</van-popup>
|
||||
|
||||
<van-popup show="{{ zhenduan_popshow }}" closeable position="bottom" custom-style="height: calc(100vh - {{height*2 + 20}}px);" bind:close="onZhenduanClose">
|
||||
<view style="padding-left: 20rpx;font-size: 30rpx;color: #000;margin: 20rpx 0;">诊断</view>
|
||||
<van-field model:value="{{ disease_class_name }}" placeholder="请输入疾病名称" bind:change="onZhenDuanChange" />
|
||||
<view class="zhenduan_data_list">
|
||||
<view bindtap="addZhenDuan" class="zhenduan_item" data-icd_name="{{item.icd_name}}" data-icd_id="{{item.icd_id}}" wx:for="{{zhenduan_search_list}}">
|
||||
{{item.icd_name}}
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
<van-toast id="van-toast" />
|
||||
</view>
|
||||
<view style="height: 50rpx;">
|
||||
|
||||
</view>
|
||||
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />
|
||||
@@ -0,0 +1,212 @@
|
||||
page{
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
.container{
|
||||
letter-spacing: 3rpx;
|
||||
}
|
||||
.item{
|
||||
width: 92vw;
|
||||
border-radius: 20rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
.item_top{
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 32rpx;
|
||||
}
|
||||
.item_top::after {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 32rpx;
|
||||
left: 32rpx;
|
||||
bottom: 0;
|
||||
border-bottom: 1px dashed var(--td-cell-border-color, var(--td-gray-color-3, #999));
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
.item_top_name{
|
||||
color: #3CC7C0;
|
||||
font-size: 34rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.item_top_sex{
|
||||
flex: 1;
|
||||
font-size: 34rpx;
|
||||
color: #666;
|
||||
}
|
||||
.check{
|
||||
border-radius: 10rpx;
|
||||
border: 1rpx solid #3CC7C0;
|
||||
font-size: 26rpx;
|
||||
color: #3CC7C0;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.item_content{
|
||||
padding: 20rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
.item_content_li{
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.item_content_li.active{
|
||||
flex-direction: column;
|
||||
}
|
||||
.item_content_li_title{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.item_content_li_txt{
|
||||
margin-left: 10rpx;
|
||||
flex: 1;
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
word-wrap:break-word;
|
||||
word-break:break-all;
|
||||
}
|
||||
|
||||
.txt_title{
|
||||
font-size: 16px;
|
||||
margin: 20rpx 0;
|
||||
position: relative;
|
||||
left: 4vw;
|
||||
width: 50vw;
|
||||
}
|
||||
.drugs_box{
|
||||
width: 92vw;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.drugs_box_item{
|
||||
padding: 20rpx 20rpx 20rpx 20rpx;
|
||||
}
|
||||
.drugs_box_item:not(:first-child){
|
||||
border-top: 1px solid #E7E7E7;
|
||||
}
|
||||
.drugs_name{
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.drugs_guige, .drugs_dosage{
|
||||
color: #666;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 32rpx;
|
||||
|
||||
}
|
||||
.btn{
|
||||
text-align: right;
|
||||
}
|
||||
.adddrugs_btn{
|
||||
width: 92vw;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
.doctors_advice{
|
||||
position: relative;
|
||||
width: calc(92vw - 40rpx);
|
||||
min-height: 100rpx;
|
||||
margin: 20rpx auto;
|
||||
background-color: rgb(255, 255, 255);
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.doctors_advice::after{
|
||||
border-radius: 5rpx;
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
border-width: 16rpx;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent #ffffff transparent;
|
||||
content: ' ';
|
||||
left: 40rpx;
|
||||
top: -30rpx;
|
||||
}
|
||||
.sub_btn{
|
||||
width: 92vw;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
.pop_title{
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.search_drug_btn{
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 32rpx;
|
||||
}
|
||||
.search_drug_btn::after{
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 32rpx;
|
||||
left: 32rpx;
|
||||
bottom: 0;
|
||||
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #E7E7E7));
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
.search_drug_btn_input{
|
||||
flex: 1;
|
||||
}
|
||||
.search_drug_list{
|
||||
height: 50vh;
|
||||
}
|
||||
.search_drug_list_empty{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.search_drug_list_item{
|
||||
padding-left: 32rpx;
|
||||
position: relative;
|
||||
height: 150rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.search_drug_list_item::after{
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 32rpx;
|
||||
left: 32rpx;
|
||||
bottom: 0;
|
||||
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #E7E7E7));
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
.addzhenduan{
|
||||
font-size: 30rpx !important;
|
||||
color: #3CC7C0 !important;
|
||||
}
|
||||
.zhenduan_data_list{
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
margin: 0 20rpx;
|
||||
padding: 0 20rpx;
|
||||
|
||||
}
|
||||
.zhenduan_item{
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-bottom: 1px solid #E7E7E7;
|
||||
width: 90%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.label_item{
|
||||
display: flex;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
Reference in New Issue
Block a user