diff --git a/api/api.js b/api/api.js
index d164d35..2303ef0 100644
--- a/api/api.js
+++ b/api/api.js
@@ -5,12 +5,13 @@ function addCase(data){ //添加病例
function caseDetail(id){ //病例详情
return request('/medicalRecord/getDetail/'+id,'GET',{},true)
};
+function editCase(data){ //修改病例
+ return request('/medicalRecord/update','POST',data,true)
+ };
function caseList(data){ //病例列表
return request('/medicalRecord/getList','POST',data,true)
};
-function editCase(data){ //修改病例
- return request('/medicalRecord/update','POST',data,true)
-};
+
function getCaptcha(){ //获取图片验证码
return request('/user/getCaptcha','GET')
};
diff --git a/case/pages/createCase/createCase.js b/case/pages/createCase/createCase.js
index 211a2d4..4802bb4 100644
--- a/case/pages/createCase/createCase.js
+++ b/case/pages/createCase/createCase.js
@@ -18,6 +18,10 @@ Page({
ganwaiOption:ganwaiOption,
moshiOption:moshiOption,
hospitalOption:hospitalOption,
+ editorHeight:'calc(100vh - 600rpx)',
+ paintFrom:'basic',
+ paintSrc:'',
+ showPaint:false,
active:0,
wordLength:0,
showSaveBtn:true,
@@ -35,7 +39,6 @@ Page({
showDel:false,
showAttention:false,
fileList_basic:[],
- fileList_abstract:[],
fileList_check:[],
dpmas_list:[{fileList:[],treatTime:''}],
disable_ziliao:false,
@@ -73,36 +76,52 @@ Page({
otherValue:''
},
},
- disease_desc:'',
- disease_history:'',
- past_history:'',//临床资料结束
+ abstract_str:'',//临床资料结束
dpmas:[{
'dpmasImg':'',
'treatTime':''
}],
headTime:'',
afterTime:'',
+ lastTime:'',
headTb:'',
afterTb:'',
- headAlt:'',
- afterAlt:'',
- headAlb:'',
- afterAlb:'',
- headAst:'',
- afterAst:'',
- headInr:'',
- afterInr:'',
+ lastTb:'',
headDb:'',
afterDb:'',
+ lastDb:'',
headIb:'',
afterIb:'',
+ lastIb:'',
+ headAlt:'',
+ afterAlt:'',
+ lastALt:'',
+ headAst:'',
+ afterAst:'',
+ lastAst:'',
+ headAlb:'',
+ afterAlb:'',
+ lastAlb:'',
headPta:'',
afterPta:'',
+ lastPta:'',
+ headInr:'',
+ afterInr:'',
+ lastInr:'',
+ headCrp:'',
+ afterCrp:'',
+ lastCrp:'',
headIl6:'',
afterIl6:'',
+ lastIl6:'',
headTnf:'',
afterTnf:'',
- checkImg:''
+ lastTnf:'',
+ checkImg:'',
+ discharge_time:'',
+ day:'',
+ discharge_situation:'',
+ discharge_status:''
},
time_type:'date',
time_str:"hospitalTime",
@@ -131,6 +150,17 @@ Page({
},
},
+ onEditorReady() {
+ const that = this
+ wx.createSelectorQuery().select('#editor').context(function (res) {
+ that.editorCtx = res.context;
+ let html =
+ "
【主诉】:
【现病史】:
【既往史】:
";
+ that.editorCtx.setContents({
+ html:html
+ })
+ }).exec()
+ },
onChangeCheck(event){
console.log(event);
let arr=event.detail;
@@ -161,9 +191,6 @@ Page({
toggleCheck(event){
console.log(event);
},
- dealImg(e){
- console.log(e);
- },
save:throttle(function(){
this.data.medicalRecordId?this.handleEditCase():this.handleAddCase();
}),
@@ -205,20 +232,20 @@ Page({
}),
isHasValue(){
- let {name,uid,sex,age,admissionTime,caseType,main_diagnose,disease_cause,trigger,disease_desc,disease_history,past_history,headTime,afterTime,headTb,afterTb,headAlt,afterAlt,headAlb,afterAlb,headAst,afterAst,headInr,afterInr,headDb,afterDb,headIb,afterIb,headPta,afterPta,headIl6,afterIl6,headTnf,afterTnf}=this.data.case;
- let {fileList_basic,fileList_abstract,fileList_check,dpmas_list}=this.data;
+ let {name,uid,sex,age,admissionTime,caseType,main_diagnose,disease_cause,trigger,abstract_str,headTime,afterTime,headTb,afterTb,headAlt,afterAlt,headAlb,afterAlb,headAst,afterAst,headInr,afterInr,headDb,afterDb,headIb,afterIb,headPta,afterPta,headIl6,afterIl6,headTnf,afterTnf}=this.data.case;
+ let {fileList_basic,fileList_check,dpmas_list,discharge_time,day,discharge_status,discharge_situation}=this.data;
let hasTime=dpmas_list.some(item=>{ return item.fileList.length>0});
let hasImg=dpmas_list.some(item=>{ return item.treatTime!=''});
- if(name || uid || sex || age || admissionTime || caseType.length>0 || main_diagnose.select.length>0 || main_diagnose.otherValue || disease_cause.select.length>0 || disease_cause.otherValue || trigger.inside.select.length>0 || trigger.inside.otherValue || trigger.outside.select.length>0 || trigger.outside.otherValue || disease_desc || disease_history ||past_history || headTime || afterTime || headTb || afterTb || headAlt || afterAlt || headAlb || afterAlb || headAst || afterAst || headInr || afterInr || headDb || afterDb || headIb || afterIb || headPta || afterPta || headIl6 || afterIl6 || headTnf || afterTnf || fileList_basic.length>0 || fileList_abstract.length>0 || fileList_check.length>0 || hasTime || hasImg){
+ if(name || uid || sex || age || admissionTime || caseType.length>0 || main_diagnose.select.length>0 || main_diagnose.otherValue || disease_cause.select.length>0 || disease_cause.otherValue || trigger.inside.select.length>0 || trigger.inside.otherValue || trigger.outside.select.length>0 || trigger.outside.otherValue || abstract_str || headTime || afterTime || headTb || afterTb || headAlt || afterAlt || headAlb || afterAlb || headAst || afterAst || headInr || afterInr || headDb || afterDb || headIb || afterIb || headPta || afterPta || headIl6 || afterIl6 || headTnf || afterTnf || fileList_basic.length>0 || fileList_check.length>0 || hasTime || hasImg || discharge_time || day|| discharge_status ||discharge_situation){
return true
}else{
return false
}
},
handleAddCase(){
- let {fileList_basic,fileList_abstract,fileList_check,dpmas_list}=this.data;
+ let {fileList_basic,fileList_check,dpmas_list}=this.data;
let baseImg='';
let abstractImg='';
let checkImg='';
@@ -230,13 +257,7 @@ Page({
baseImg+=item.url;
}
})
- fileList_abstract.forEach(item=>{
- if(abstractImg){
- abstractImg+="," +item.url
- }else{
- abstractImg+=item.url;
- }
- })
+
fileList_check.forEach(item=>{
if(checkImg){
checkImg+="," +item.url
@@ -366,16 +387,6 @@ Page({
})
}
- }else if(key=='abstractImg'){
- if(res[key]){
- let imgList=res[key].split(',');
- this.setData({
- ['case.'+key]:res[key],
- fileList_abstract:imgList.map(item=>{
- return {url:item}
- })
- })
- }
}else if(key=='checkImg'){
if(res[key]){
let imgList=res[key].split(',');
@@ -572,7 +583,20 @@ Page({
})
return false
}
-
+ if(main_diagnose.select.length==0){
+ flag && wx.showToast({
+ title: '请选择主要诊断类型',
+ icon:"none"
+ })
+ return false
+ }
+ if(main_diagnose.select.length==0 && !main_diagnose.otherValue){
+ flag && wx.showToast({
+ title: '主要诊断其他不能为空',
+ icon:"none"
+ })
+ return false
+ }
if(fileList_basic.length==0){
flag && wx.showToast({
title: '请上传出院诊断照片',
@@ -625,28 +649,15 @@ Page({
return true
},
validateZiliao(flag){
- let {disease_desc,disease_history,past_history}=this.data.case;
- if( !disease_desc){
+ let {abstract_str}=this.data.case;
+ if( !abstract_str){
flag && wx.showToast({
- title: '病历摘要主诉不能为空',
+ title: '病历摘要不能为空',
icon:"none"
})
- return false
- }
- if( !disease_history){
- flag && wx.showToast({
- title: '病历摘要现病史不能为空',
- icon:"none"
- })
- return false
- }
- if( !past_history){
- flag && wx.showToast({
- title: '病历摘要现病史不能为空',
- icon:"none"
- })
- return false
+ return false
}
+
return true
},
validateRecord(flag){
@@ -710,131 +721,178 @@ Page({
return true
},
validateCheck(flag){
- let {headTime,afterTime,headTb,afterTb,headAlt,afterAlt,headInr,afterInr,headDb,afterDb,headIb,afterIb,headPta,afterPta,headIl6,afterIl6,headTnf,afterTnf,caseType,admissionTime,dpmas }=this.data.case;
+ let {headTime,afterTime,lastTime,headTb,afterTb,lastTb,headAlt,afterAlt,lastAlt,headAst,afterAst,lastAst,headInr,afterInr,lastInr,headAlb,afterAlb,lastAlb,caseType,admissionTime,dpmas}=this.data.case;
let {fileList_check}=this.data;
- if(!headTime){
+ if(!headTime){
flag && wx.showToast({
- title: '治疗前检测时间不能为空',
+ title: '首次治疗前检测时间不能为空',
icon:"none"
})
return false
};
if(!afterTime){
flag && wx.showToast({
- title: '治疗后检测时间不能为空',
+ title: '首次治疗后检测时间不能为空',
+ icon:"none"
+ })
+ return false
+ };
+ if(!lastTime){
+ flag && wx.showToast({
+ title: '最后一次治疗后检测时间不能为空',
icon:"none"
})
return false
};
let headTime_new=dayjs(headTime).format('YYYY-MM-DD');
let afterTime_new=dayjs(afterTime).format('YYYY-MM-DD');
- let firstTime=dayjs(dpmas[0].treatTime).format('YYYY-MM-DD');
+ let lastTime_new=dayjs(lastTime).format('YYYY-MM-DD');
+ let firstTime=dayjs(dpmas[0].treatTime).format('YYYY-MM-DD');//第一次治疗时间
- let lastTime=dayjs(dpmas[dpmas.length-1].treatTime).format('YYYY-MM-DD')
- let admissionTime_new=dayjs(admissionTime).format('YYYY-MM-DD');
-
- if(caseType==2){
- if(!(dayjs(headTime_new).diff(dayjs(admissionTime_new))>=0 && dayjs(headTime_new).diff(dayjs(firstTime))<=0)){
- flag && wx.showToast({
- title: '治疗前检测时间应该在入院时间与第一次治疗时间之间',
- icon:"none"
- })
- return false
- }
- if(dpmas.length<2){
- if(!(dayjs(afterTime_new).diff(dayjs(firstTime))>=0)){
- flag && wx.showToast({
- title: '治疗后检测时间应该在第一次之后',
- icon:"none"
- })
- return false
- }
-
- }else{
- let secondTime=dayjs(dpmas[1].treatTime).format('YYYY-MM-DD')
- if(!(dayjs(afterTime_new).diff(dayjs(firstTime))>=0 && dayjs(afterTime_new).diff(dayjs(secondTime))<=0)){
- flag && wx.showToast({
- title: '治疗后检测时间应该在第一次与第二次治疗时间之间',
- icon:"none"
- })
- return false
- };
- }
-
-
- };
- if(caseType==1){
- if(!(dayjs(headTime_new).diff(dayjs(admissionTime_new))>=0 && dayjs(headTime_new).diff(dayjs(firstTime))<=0)){
- flag && wx.showToast({
- title: '治疗前检测时间应该在入院时间与第一次治疗时间之间',
- icon:"none"
- })
- return false
- }
- if(!(dayjs(afterTime_new).diff(dayjs(lastTime)>=0))){
- flag && wx.showToast({
- title: '治疗后检测时间应该最后一次治疗时间之后',
- icon:"none"
- })
- return false
- }
- }
- if(!headTb || !afterTb){
+ let lastTreatTime=dayjs(dpmas[dpmas.length-1].treatTime).format('YYYY-MM-DD')//最后一次治疗时间
+ let admissionTime_new=dayjs(admissionTime).format('YYYY-MM-DD'); //住院时间
+ //新加判断
+ if(dayjs(headTime_new).diff(dayjs(afterTime_new))>=0){
flag && wx.showToast({
- title: '总胆红素未填写完整',
- icon:"none"
- })
- return false
- };
- if(!headAlt || !afterAlt){
+ title: '首次治疗时间前检测时间应该早于首次治疗后检测时间',
+ icon:'none'
+ })
+ return false;
+ }
+ if(dayjs(afterTime_new).diff(dayjs(lastTime_new))>0){
flag && wx.showToast({
- title: '谷丙转氨酶未填写完整',
- icon:"none"
- })
- return false
- };
- if(!headInr || !afterInr){
- flag && wx.showToast({
- title: '国际标准化比值未填写完整',
- icon:"none"
- })
- return false
- }
- // if(!headDb || !afterDb){
- // flag && wx.showToast({
- // title: '直接胆红素未填写完整',
- // icon:"none"
- // })
- // return false
- // }
- // if(!headIb || !afterIb){
- // flag && wx.showToast({
- // title: '间接胆红素未填写完整',
- // icon:"none"
- // })
- // return false
- // }
- // if(!headPta || !afterPta){
- // flag && wx.showToast({
- // title: '凝血酶原活动度未填写完整',
- // icon:"none"
- // })
- // return false
- // }
- // if(!headIl6 || !afterIl6){
- // flag && wx.showToast({
- // title: '白介素6未填写完整',
+ title: '最后一次治疗后检测时间应该早于或者等于首次次治疗后检测时间',
+ icon:'none'
+ })
+ return false;
+ }
+
+ // if(caseType==2){
+ // if(!(dayjs(headTime_new).diff(dayjs(admissionTime_new))>=0 && dayjs(headTime_new).diff(dayjs(firstTime))<=0)){
+ // flag && wx.showToast({
+ // title: '治疗前检测时间应该在入院时间与第一次治疗时间之间',
// icon:"none"
// })
// return false
+ // }
+ // if(dpmas.length<2){
+ // if(!(dayjs(afterTime_new).diff(dayjs(firstTime))>=0)){
+ // flag && wx.showToast({
+ // title: '治疗后检测时间应该在第一次之后',
+ // icon:"none"
+ // })
+ // return false
+ // }
+
+ // }else{
+ // let secondTime=dayjs(dpmas[1].treatTime).format('YYYY-MM-DD')
+ // if(!(dayjs(afterTime_new).diff(dayjs(firstTime))>=0 && dayjs(afterTime_new).diff(dayjs(secondTime))<=0)){
+ // flag && wx.showToast({
+ // title: '治疗后检测时间应该在第一次与第二次治疗时间之间',
+ // icon:"none"
+ // })
+ // return false
+ // };
// }
- // if(!headTnf || !afterTnf){
- // wx.showToast({
- // title: '肿瘤坏死因子',
- // icon:"none"
- // })
- // return false
- // }
+
+
+ // };
+ // if(caseType==1){
+ // if(!(dayjs(headTime_new).diff(dayjs(admissionTime_new))>=0 && dayjs(headTime_new).diff(dayjs(firstTime))<=0)){
+ // flag && wx.showToast({
+ // title: '治疗前检测时间应该在入院时间与第一次治疗时间之间',
+ // icon:"none"
+ // })
+ // return false
+ // }
+ // if(!(dayjs(afterTime_new).diff(dayjs(lastTime)>=0))){
+ // flag && wx.showToast({
+ // title: '治疗后检测时间应该最后一次治疗时间之后',
+ // icon:"none"
+ // })
+ // return false
+ // }
+ // }
+ if(!headTb || !afterTb){
+ flag && wx.showToast({
+ title: '总胆红素首次治疗前后未填写完整',
+ icon:"none"
+ })
+ return false
+ };
+ if(dpmas.length>1){
+ if(!lastTb){
+ flag && wx.showToast({
+ title: '总胆红素最后一次治疗后不能为空',
+ icon:"none"
+ })
+ return false
+ }
+ }
+ if(!headAlt || !afterAlt){
+ flag && wx.showToast({
+ title: '丙氨酸氨基转移酶首次治疗前后未填写完整',
+ icon:"none"
+ })
+ return false
+ };
+ if(dpmas.length>1){
+ if(!lastAlt){
+ flag && wx.showToast({
+ title: '丙氨酸氨基转移酶最后一次治疗后不能为空',
+ icon:"none"
+ })
+ return false
+ }
+ }
+ if(!headAst || !afterAst){
+ flag && wx.showToast({
+ title: '天门冬氨酸氨基转移酶首次治疗前后未填写完整',
+ icon:"none"
+ })
+ return false
+ };
+ if(dpmas.length>1){
+ if(!lastAst){
+ flag && wx.showToast({
+ title: '天门冬氨酸氨基转移酶最后一次治疗后不能为空',
+ icon:"none"
+ })
+ return false
+ }
+ }
+ if(!headAlb || !afterAlb){
+ flag && wx.showToast({
+ title: '白蛋白首次治疗前后未填写完整',
+ icon:"none"
+ })
+ return false
+ };
+ if(dpmas.length>1){
+ if(!lastAlb){
+ flag && wx.showToast({
+ title: '白蛋白最后一次治疗后不能为空',
+ icon:"none"
+ })
+ return false
+ }
+ }
+ if(!headInr || !afterInr){
+ flag && wx.showToast({
+ title: '国际标准化比值首次治疗前后未填写完整',
+ icon:"none"
+ })
+ return false
+ }
+ if(dpmas.length>1){
+ if(!lastInr){
+ flag && wx.showToast({
+ title: '国际标准化比值最后一次治疗后不能为空',
+ icon:"none"
+ })
+ return false
+ }
+ }
if(fileList_check.length==0){
flag && wx.showToast({
title: '请上传报告单',
@@ -844,6 +902,38 @@ Page({
}
return true;
},
+ validateBack(flag){
+ let {discharge_time,day,discharge_status,discharge_situation}=this.data.case;
+ if(!discharge_time){
+ flag && wx.showToast({
+ title: '请选择出院时间',
+ icon:"none"
+ })
+ return false
+ }
+ if(!day){
+ flag && wx.showToast({
+ title: '请输入住院天数',
+ icon:"none"
+ })
+ return false
+ }
+ if(!discharge_situation){
+ flag && wx.showToast({
+ title: '请输入出院情况',
+ icon:"none"
+ })
+ return false
+ }
+ if(!discharge_status){
+ flag && wx.showToast({
+ title: '请输入出院状态',
+ icon:"none"
+ })
+ return false
+ }
+ return true
+ },
onChangeAbstract(event){
let {value}=event.detail
this.setData({
@@ -871,7 +961,7 @@ Page({
})
},
saveDraft(){
- let {fileList_basic,fileList_abstract,fileList_check,dpmas_list}=this.data;
+ let {fileList_basic,fileList_check,dpmas_list}=this.data;
let baseImg='';
let abstractImg='';
let checkImg='';
@@ -882,13 +972,6 @@ Page({
baseImg+=item.url;
}
})
- fileList_abstract.forEach(item=>{
- if(abstractImg){
- abstractImg+="," +item.url
- }else{
- abstractImg+=item.url;
- }
- })
fileList_check.forEach(item=>{
if(checkImg){
checkImg+="," +item.url
@@ -999,13 +1082,13 @@ Page({
}else if(time_str=="dealTime"){
key="dealTime"
let year=dayjs(event.detail).format('YYYY')
- if(year!=2024){
- this.setData({
- showTip:true,
- showTime:false
- })
- return false
- }
+ // if(year!=2024){
+ // this.setData({
+ // showTip:true,
+ // showTime:false
+ // })
+ // return false
+ // }
time=dayjs(event.detail).format('YYYY-MM-DD HH:mm');
}else if(time_str=="headTime"){
@@ -1092,6 +1175,7 @@ Page({
time_type:'datetime',
time_str:"dealTime",
time_title:'选择治疗时间',
+ maxDate:new Date(dayjs().add(10,'year').toString()).getTime()
})
},
openHeadTime(){
@@ -1123,7 +1207,7 @@ Page({
},
deleteImg(event){
- const { fileList_basic,fileList_abstract,fileList_check,dpmas_list} = this.data;
+ const { fileList_basic,fileList_check,dpmas_list} = this.data;
const {name,index} = event.detail;
if(name=='basic'){
@@ -1131,11 +1215,6 @@ Page({
this.setData({
fileList_basic:fileList_basic
})
- }else if(name=="abstract"){
- fileList_abstract.splice(index,1);
- this.setData({
- fileList_abstract:fileList_abstract
- })
}else if(name=="check"){
fileList_check.splice(index,1);
this.setData({
@@ -1157,7 +1236,7 @@ Page({
let { accessid, dir,policy,signature,host} = resdata;
let imgUrl = file;
//let index = imgUrl.lastIndexOf("/");
- let filename = FileUtil.UUID()+'.'+imgUrl.match(/\.(\w+)$/)[1];
+ let filename = FileUtil.UUID()+'.'+THIS.getImageFormat(imgUrl);
//imgUrl.substring(index + 1, imgUrl.length);
@@ -1174,6 +1253,10 @@ Page({
success(res) {
if (res.statusCode === 204) {
+ wx.showToast({
+ title: '图片上传成功',
+ icon: "none"
+ })
resolve(true)
let url = host + '/' + dir + filename;
// 上传完成需要更新 fileList
@@ -1183,10 +1266,6 @@ Page({
const { fileList_basic} = THIS.data;
fileList_basic.push({ url: url });
THIS.setData({ fileList_basic });
- }else if(name=='abstract'){
- const { fileList_abstract} = THIS.data;
- fileList_abstract.push({ url: url });
- THIS.setData({ fileList_abstract });
}else if(name=='check'){
const { fileList_check} = THIS.data;
fileList_check.push({ url: url });
@@ -1213,51 +1292,58 @@ Page({
})
},
- afterRead(event) {
-
- console.log( event.detail)
- const { file,name} = event.detail;
- console.log(file)
- wx.showLoading({
+ getImageFormat(imageUrl){
+ console.log(imageUrl)
+ var parts = imageUrl.split('.');
+ return parts[parts.length - 1];
+ },
+ afterhandlePaint(e){
+ wx.showLoading({
title: '图片上传中',
mask: true
})
- var promiseFun = [];
- for (let i = 0; i < file.length; i++) {
- var cur_file = file[i].url;
- promiseFun.push(
- this.uploadImg(cur_file,name)
- )
- };
- Promise.all(promiseFun).then((res) => {
- wx.showToast({
- title: '图片上传成功',
- icon: "none"
- })
- console.log(res.length+"张上传成功");
- wx.hideLoading();
+ this.setData({
+ showPaint:false
+ })
+ const {imgSrc,name}=e.detail
+ console.log(e);
+ this.uploadImg(imgSrc,name)
+ },
+ afterRead(event) {
+ console.log( event.detail)
+ const { file,name} = event.detail;
+ this.setData({
+ paintSrc:file.url,
+ paintFrom:name,
+ showPaint:true
+ })
+ console.log(file)
+ // wx.showLoading({
+ // title: '图片上传中',
+ // mask: true
+ // })
+ // var promiseFun = [];
+ // for (let i = 0; i < file.length; i++) {
+ // var cur_file = file[i].url;
+ // promiseFun.push(
+ // this.uploadImg(cur_file,name)
+ // )
+ // };
+ // Promise.all(promiseFun).then((res) => {
+ // wx.showToast({
+ // title: '图片上传成功',
+ // icon: "none"
+ // })
+ // console.log(res.length+"张上传成功");
+ // wx.hideLoading();
- }).catch(error=>{
- wx.showToast({
- title: '图片上传失败',
- icon: "none"
- })
- console.log(error)
- wx.hideLoading();
- });
-
- // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
- // wx.uploadFile({
- // url: 'https://example.weixin.qq.com/upload', // 仅为示例,非真实的接口地址
- // filePath: file.url,
- // name: 'file',
- // formData: { user: 'test' },
- // success(res) {
- // // 上传完成需要更新 fileList
- // const { fileList = [] } = this.data;
- // fileList.push({ ...file, url: res.data });
- // this.setData({ fileList });
- // },
+ // }).catch(error=>{
+ // wx.showToast({
+ // title: '图片上传失败',
+ // icon: "none"
+ // })
+ // console.log(error)
+ // wx.hideLoading();
// });
},
/**
diff --git a/case/pages/createCase/createCase.wxml b/case/pages/createCase/createCase.wxml
index 73c850f..4f82585 100644
--- a/case/pages/createCase/createCase.wxml
+++ b/case/pages/createCase/createCase.wxml
@@ -72,40 +72,35 @@
主要诊断(多选)*
-
- {{item.name}}
+
+ {{item.name}}
-
+
患者出院诊断照片(可上传1-6张)
-
+
-
-
-
-
- 患者病因(多选)*
-
-
-
- {{item.name}}
-
-
-
-
-
-
+
+
+
+
+ 患者病因(多选)*
+
+
+
+ {{item.name}}
+
+
+
+
+
+
诱因(多选)*
@@ -113,23 +108,19 @@
肝内:
- {{item.name}}
-
+ {{item.name}}
+
-
+
肝外:
- {{item.name}}
+ {{item.name}}
-
+
@@ -157,7 +148,20 @@
病历摘要*
-
+
+
+
+
+
+
+
+ 上传图片识别内容
+
+
+
+
+
+
+
-
-
-
+ {{wordLength}}/500
+
+ -->
+
-
-
-
+ {{wordLength}}/500
+
+ -->
+
-
-
-
- 下一步
-
- 注意:病历摘要,文字填写或者上传图片,二选一
-
-
-
-
-
-
-
-
-
- 第{{index+1}}次治疗
-
-
-
-
-
- 治疗时间*
-
-
-
- h
-
-
-
-
-
- 模式(单选)*
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
- 血浆吸附处理量(ml)*
-
-
-
- ml
-
-
-
-
-
- 血浆置换量(ml)*
-
-
-
- ml
-
-
-
-
-
- 抗凝剂量(多选)
-
-
-
- {{item.name}}
-
-
-
-
-
- 肝素:
-
- 首剂
-
-
- ml
-
-
-
- 追加
-
-
- ml
-
-
-
-
- 低分子肝素:
-
- 低分子肝素(IU)
-
-
- ml
-
-
-
-
- 枸橼酸:
-
- 血液流速(ml/min)
-
-
- ml
-
-
-
- 枸橼酸钠流速(ml/h)
-
-
- ml
-
-
-
- 钙剂(ml/h)
-
-
- ml/h
-
- 10%葡萄糖酸钙
- 5%氯化钙
-
-
-
-
-
-
- 甲磺酸萘莫司他:
-
- 甲磺酸萘莫司他(mg/h)
-
-
- mg/h
-
-
-
-
- 其他:
-
- 名称
-
-
-
-
-
-
- 剂量
-
-
-
-
-
-
-
-
-
- 附人工肝治疗记录相关照片(可上传1-3张)*
-
-
-
-
-
-
-
-
- 增加记录
+
+
+ 下一步
+
+注意:病历摘要,文字填写或者上传图片,二选一
+
+
+
+
+
+
+
+
+
+ 第{{index+1}}次治疗
+
-
-
- 注意:“DPMAS治疗凭证”照片需包含患者住院号或姓名
- 1.4次及以上疗程化病例,每次治疗对应一张凭证照片;
- 2.早前期(INR≤1.5)的病例,上传第一次DPMAS治疗前最新的“INR检验报告单”
- 3.早前期(INR≤1.5)的病例,DPMAS治疗时间不能晚于INR出报告时间24小时。
-
-
-
- 下一步
-
-
-
-
-
-
- (早前期为首次治疗前后、4次及以上为疗程化治疗前后)
- 首次治疗前检测时间*
+ 治疗时间*
-
-
- h
+
+
+ h
-
-
- 首次治疗后检测时间*
-
-
-
- h
-
-
-
-
-
- 最后一次治疗后检测时间*
-
-
-
- h
-
-
-
-
-
- 总胆红素(TB-umol/L)*
-
-
- 首次治疗前
-
-
-
-
-
- 首次治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 直接胆红素(DB-umol/L)
-
-
- 首次治疗前
-
-
-
-
-
- 首次治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 间接胆红素(IB-umol/L)
-
-
- 首次治疗前
-
-
-
-
-
- 首次治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 丙氨酸氨基转移酶(ALT-U/L)*
-
-
- 首次治疗前
-
-
-
-
-
- 首次治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 天门冬氨酸氨基转移酶(AST-U/L)*
-
-
- 治疗前
-
-
-
-
-
- 治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 白蛋白(ALB-g/L)*
-
-
- 治疗前
-
-
-
-
-
- 治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 凝血酶原活动度(PTA-%)
-
-
- 治疗前
-
-
-
-
-
- 治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 国际标准化比值(INR)*
-
-
- 治疗前
-
-
-
-
-
- 治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- C反应蛋白(CRP-mg/L)
-
-
- 治疗前
-
-
-
-
-
- 治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
-
- 白介素6(IL-6-ng/L)
-
-
- 治疗前
-
-
-
-
-
- 治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 肿瘤坏死因子α(TNF-α-μg/L)
-
-
- 治疗前
-
-
-
-
-
- 治疗后
-
-
-
-
-
- 最后一次治疗后
-
-
-
-
-
-
-
- 检查报告单(可上传1-6张)*
-
- 包含肝功能或生化检测(必须有、审查)、凝血功能、炎症因子化验单,至少包含首次治疗前后化验单拍照,需进行隐私信息脱敏(姓名、电话、身份证)
-
-
-
-
-
- 提交
-
-
-
-
-
-
-
- 出院时间*
-
-
-
- h
-
-
-
-
-
- 住院天数*
-
-
-
- 天
-
-
-
-
-
- 出院情况*
-
-
-
-
-
-
-
- 上传图片识别内容
-
-
-
-
-
-
- 出院状态(单选)*
+ 模式(单选)*
- {{item.name}}
-
+ {{item.name}}
+
+
+
+
+
+ 血浆吸附处理量(ml)*
+
+
+
+ ml
+
+
+
+
+
+ 血浆置换量(ml)*
+
+
+
+ ml
+
+
+
+
+
+ 抗凝剂量(多选)
+
+
+
+ {{item.name}}
+
+
+
+
+
+ 肝素:
+
+ 首剂
+
+
+ ml
+
+
+
+ 追加
+
+
+ ml
+
+
+
+
+ 低分子肝素:
+
+ 低分子肝素(IU)
+
+
+ ml
+
+
+
+
+ 枸橼酸:
+
+ 血液流速(ml/min)
+
+
+ ml
+
+
+
+ 枸橼酸钠流速(ml/h)
+
+
+ ml
+
+
+
+ 钙剂(ml/h)
+
+
+ ml/h
+
+ 10%葡萄糖酸钙
+ 5%氯化钙
+
+
+
+
+
+
+ 甲磺酸萘莫司他:
+
+ 甲磺酸萘莫司他(mg/h)
+
+
+ mg/h
+
+
+
+
+ 其他:
+
+ 名称
+
+
+
+
+
+
+ 剂量
+
+
+
+
+
+
+
+
+
+ 附人工肝治疗记录相关照片(可上传1-3张)*
+
+
+
+
-
-
-
+
+
+
+
+ (早前期为首次治疗前后、4次及以上为疗程化治疗前后)
+
+
+ 首次治疗前检测时间*
+
+
+
+ h
+
+
+
+
+
+ 首次治疗后检测时间*
+
+
+
+ h
+
+
+
+
+
+ 最后一次治疗后检测时间*
+
+
+
+ h
+
+
+
+
+
+ 总胆红素(TB-umol/L)*
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 直接胆红素(DB-umol/L)
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 间接胆红素(IB-umol/L)
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 丙氨酸氨基转移酶(ALT-U/L)*
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 天门冬氨酸氨基转移酶(AST-U/L)*
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 白蛋白(ALB-g/L)*
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 凝血酶原活动度(PTA-%)
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 国际标准化比值(INR)*
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ C反应蛋白(CRP-mg/L)
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+
+ 白介素6(IL-6-ng/L)
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 肿瘤坏死因子α(TNF-α-μg/L)
+
+
+ 首次治疗前
+
+
+
+
+
+ 首次治疗后
+
+
+
+
+
+ 最后一次治疗后
+
+
+
+
+
+
+
+ 检查报告单(可上传1-6张)*
+
+ 包含肝功能或生化检测(必须有、审查)、凝血功能、炎症因子化验单,至少包含首次治疗前后化验单拍照,需进行隐私信息脱敏(姓名、电话、身份证)
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+ 出院时间*
+
+
+
+ h
+
+
+
+
+
+ 住院天数*
+
+
+
+ 天
+
+
+
+
+
+ 出院情况*
+
+
+
+
+
+
+
+ 上传图片识别内容
+
+
+
+
+
+
+
+
+ 出院状态(单选)*
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
@@ -766,7 +770,7 @@
-
+
diff --git a/case/pages/createCase/createCase.wxss b/case/pages/createCase/createCase.wxss
index 7f62475..6ff5abe 100644
--- a/case/pages/createCase/createCase.wxss
+++ b/case/pages/createCase/createCase.wxss
@@ -2,6 +2,17 @@
page{
overflow: hidden;
}
+.container{
+ margin-top: 15rpx;
+ padding:20rpx 10rpx 50rpx;
+ border: 1rpx solid #E3E4E5;
+ border-radius:10rpx;
+ display: flex;
+ flex-direction: column;
+}
+.ql-container{
+ flex:1;
+}
.page{
overflow: hidden;
background: #F7F9F9;
diff --git a/components/paintCanvas/paintCanvas.js b/components/paintCanvas/paintCanvas.js
index 00da777..4c44973 100644
--- a/components/paintCanvas/paintCanvas.js
+++ b/components/paintCanvas/paintCanvas.js
@@ -11,6 +11,26 @@ Component({
});
},
},
+ paintFrom:{
+ type: String,
+ value:'',
+ observer(newval) {
+ this.setData({
+ paintFrom: newval
+ });
+ },
+ },
+ paintSrc:{
+ type: String,
+ value:'',
+ observer(newval) {
+ this.setData({
+ paintSrc: newval
+ });
+ this.initData();
+ },
+ }
+
},
ready(){
@@ -34,6 +54,7 @@ Component({
*/
data: {
showPaint:false,
+ paintFrom:'',
hasChoosedImg: false,
canvasWidth: 0,
showBars: false,
@@ -74,6 +95,29 @@ Component({
scope: false, // 是否有保存图片的权限
},
methods:{
+ initData(){
+ let that=this;
+ that.setData({
+ hasChoosedImg: true,
+ })
+ wx.getImageInfo({
+ src: this.data.paintSrc,
+ success: function (res) {
+ // 获取图片信息,主要为宽高,选择合适的自适应方式(将最大边完整显示)
+ console.log(res)
+ let [height, width] = [that.data.canvasWidth / res.width * res.height, that.data.canvasWidth];
+ if (height > that.data.windowHeight - 50) {
+ height = that.data.windowHeight - 50;
+ width = height / res.height * res.width;
+ }
+ that.setData({
+ canvasHeight: height,
+ canvasWidth: width,
+ background: res.path
+ });
+ }
+ })
+ },
hideTuya(){
this.setData({
showPaint:false,
@@ -93,7 +137,7 @@ Component({
// this.triggerEvent('confirmUpload')
// },
tapBtn: function (e) {
- utils.tapBtn(e, this, 2);
+ utils.tapBtn(e, this, 2,this.data.paintFrom);
},
showBarsHandler(e) {
//this.tapBtn(e)
@@ -130,7 +174,7 @@ Component({
chooseImg() {
let that = this;
wx.chooseImage({
- count:1,
+ count:1,
success: function (res) {
that.setData({
hasChoosedImg: true,
@@ -189,7 +233,7 @@ Component({
this.setData({
prevPosition: [e.touches[0].x, e.touches[0].y]
})
- console.log(11111)
+
},
clearCanvas: function (e) {
diff --git a/components/paintCanvas/paintCanvas.wxml b/components/paintCanvas/paintCanvas.wxml
index 347aabc..909e7df 100644
--- a/components/paintCanvas/paintCanvas.wxml
+++ b/components/paintCanvas/paintCanvas.wxml
@@ -1,6 +1,6 @@
-
+