8.10提交代码 糖组检测

This commit is contained in:
zoujiandong
2023-08-10 16:17:27 +08:00
parent 34e177d957
commit 833def112c
33 changed files with 688 additions and 190 deletions
+20 -1
View File
@@ -10,6 +10,8 @@ Page({
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '在线开方', //导航栏 中间的标题
},
autoHeight:{ minHeight: 100},
add_disease_desc:'',//医生填写的病情主诉
height: app.globalData.height,
zhenduan_popshow: false,
drugs_popshow: false,
@@ -323,6 +325,11 @@ Page({
})
}
},
onChangeTextAraa(event){
this.setData({
add_disease_desc:event.detail
})
},
getAdvice(e){
console.log(e.detail.value)
this.setData({
@@ -351,7 +358,19 @@ Page({
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: '请选择诊断',
+24 -147
View File
@@ -1,5 +1,5 @@
<!-- <page-meta page-style="{{ page_meta_show ? 'overflow: hidden;' : '' }}" /> -->
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar>
<view class="container">
<view class="item">
<!-- 头部 -->
@@ -12,7 +12,8 @@
<view class="item_content">
<view class="item_content_li">
<view class="item_content_li_title">病情主诉:</view>
<view class="item_content_li_txt">{{case_detail.disease_desc}}</view>
<van-field value="{{add_disease_desc}}" class="item_content_li_txt" label="" custom-style="border:1px solid #dfdfdf;border-radius:8rpx;" type="textarea" maxlength="500" placeholder="请填写患者病情" show-word-limit="{{true}}" autosize="{{autoHeight}}" wx:if="{{!case_detail.disease_desc}}" 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>
@@ -30,11 +31,11 @@
</view>
<van-cell-group inset>
<van-cell use-label-slot bind:click="showZhenDuan" custom-style="font-size:30rpx;color: #333;" title="诊断" >
<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'}}"/>
<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>
@@ -77,140 +78,38 @@
</form>
<van-popup
show="{{ drugs_popshow }}"
closeable
round
position="bottom"
custom-style=""
bind:close="onClose"
>
<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"
/>
<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"
/>
<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}}"
bindtap="select_drug"
wx:for="{{search_drug_list}}">
<view>{{item.product_name}}</view>
<view style="font-size: 26rpx;color: #3CC7C0;">{{item.manufacturer}}</view>
<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}}" 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-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>
@@ -218,35 +117,13 @@
</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 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"
>
<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"
/>
<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}}
@@ -258,4 +135,4 @@
<view style="height: 50rpx;">
</view>
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0"/>
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />