|
|
@@ -316,8 +316,8 @@
|
|
|
</div>
|
|
|
<!-- 右侧按钮 -->
|
|
|
<div class="flex-vertical-center-r flex-wrap">
|
|
|
- <el-button size="mini" @click="openUnifyPrescPrec" type="primary">统建处方</el-button>
|
|
|
- <el-button size="mini" :loading="tongueAndFaceLoading" :disabled="!tongueAndFaceAnalysis" @click="openTongueAndFaceAnalysis" type="primary">萧山区中医健康微管家</el-button>
|
|
|
+ <el-button size="mini" @click="openUnifyPrescPrec" type="primary">萧然医派协定方</el-button>
|
|
|
+ <el-button size="mini" :loading="tongueAndFaceLoading" :disabled="!tongueAndFaceAnalysis" @click="openTongueAndFaceAnalysis" type="primary">舌面诊影像</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@@ -1060,11 +1060,11 @@
|
|
|
</div>
|
|
|
</Popup>
|
|
|
|
|
|
- <!-- 查询统建处方 页面768 -->
|
|
|
+ <!-- 查询萧然医派协定方 页面768 -->
|
|
|
<Popup
|
|
|
:showDialog="showUnifyPresc"
|
|
|
@cancle="showUnifyPresc=false"
|
|
|
- title="查询统建处方"
|
|
|
+ title="查询萧然医派协定方"
|
|
|
:showBtns="false"
|
|
|
width="78%"
|
|
|
distanceTop="5vh"
|
|
|
@@ -1078,7 +1078,7 @@
|
|
|
<Popup
|
|
|
:showDialog="showTongueAnalysis"
|
|
|
@cancle="showTongueAnalysis=false"
|
|
|
- title="萧山区中医健康微管家"
|
|
|
+ title="舌面诊影像"
|
|
|
:showBtns="false"
|
|
|
width="70%"
|
|
|
distanceTop="5vh"
|
|
|
@@ -2595,8 +2595,40 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
// 提交中药处方
|
|
|
- submitRecipe1() {
|
|
|
+ async submitRecipe1() {
|
|
|
let zhongPrescriptionVo = this.dealRecipe1();
|
|
|
+ if (!zhongPrescriptionVo.length) return;
|
|
|
+
|
|
|
+ this.saving = true;
|
|
|
+ try {
|
|
|
+ const {options, force} = await this.getRationalSafeUse();
|
|
|
+ if (options.length) {
|
|
|
+ const child = this.$children.find(item => item.name === "中药处方");
|
|
|
+ const results = await Promise.all(child.recipe_tabs.map((_, index) => this.getRationalMed2(index)));
|
|
|
+ const tips = results.map((item, index) => {
|
|
|
+ const value = options.map(i => item[i] ? `<div class="title">${item[i].title}</div><div class="content">${item[i].collection.join('')}</div>` : '').join('');
|
|
|
+ return value ? `<div style="padding-top: ${index ? 12 : 0}px;border-bottom: 1px dashed #dcdcdc;"><h2 style="margin-bottom: 16px;">${item.title}</h2>${value}</div>` : '';
|
|
|
+ }).join('');
|
|
|
+ if (tips) {
|
|
|
+ if (!force) {
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ customClass: 'message-rational-safe-use-wrapper',
|
|
|
+ message: tips,
|
|
|
+ duration: 1000 * 3,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ } else if (await this.$confirm(tips, '温馨提示:是否保存处方?', {
|
|
|
+ confirmButtonText: '保存',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ customClass: 'message-rational-safe-use-wrapper',
|
|
|
+ }).then(() => /* 继续 */ false, () => /* 取消 */ true)) return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (e) {}
|
|
|
+ this.saving = false;
|
|
|
+
|
|
|
let chengPrescriptionVo = {};
|
|
|
// setTimeout(() => {
|
|
|
// chengPrescriptionVo = this.dealRecipe2();
|
|
|
@@ -3421,6 +3453,108 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 获取右侧合理用药信息展示
|
|
|
+ async getRationalMed2(index) {
|
|
|
+ const child = this.$children.find(item => item.name === "中药处方");
|
|
|
+ if (index == null) index = child.recipe_tabs_c;
|
|
|
+ const gather = child.recipe_tabs[index].totalTableD.filter(item => item.name && item.medid).map(item => item.medid);
|
|
|
+
|
|
|
+ const request = (id, i, ids) => getRationalMed({
|
|
|
+ matID: id,
|
|
|
+ matIds: [...ids.slice(0, i), ...ids.slice(i + 1)],
|
|
|
+ orgId: this.getuserinfo.organizationid,
|
|
|
+ }).then(res => res.code === 0 ? Object.assign({matid: id}, res.data) : null).catch(err => null)
|
|
|
+
|
|
|
+ const rationalMed = await Promise.all(gather.map(request)).then(data => data.filter(Boolean));
|
|
|
+ return rationalMed.reduce((data, item) => {
|
|
|
+ const color = 'blue';
|
|
|
+
|
|
|
+ if (item.matdosage && item.showDose) {
|
|
|
+ const ref = {}, i = 1;
|
|
|
+ const child = data[i] || (data[i] = {title: '', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">${ref[item.matdosage]}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matsjj) {
|
|
|
+ const ref = {1: '慎用', 2: '忌用', 3: '禁用'}, i = 2;
|
|
|
+ const child = data[i] || (data[i] = {title: '慎忌禁用药', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">${ref[item.matsjj]}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matyfsjj) {
|
|
|
+ const color = item.matyfsjj === '3' ? 'red' : 'blue';
|
|
|
+ const ref = {1: '孕妇慎用', 2: '孕妇忌用', 3: '孕妇禁用'}, i = 3;
|
|
|
+ const child = data[i] || (data[i] = {title: '孕妇慎忌禁', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">${ref[item.matyfsjj]}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matysjj) {
|
|
|
+ const ref = {}, i = 4;
|
|
|
+ const child = data[i] || (data[i] = {title: '服药饮食禁忌', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">${item.matysjj || '无'}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matdxsm) {
|
|
|
+ const color = 'red';
|
|
|
+ const ref = {}, i = 5;
|
|
|
+ const child = data[i] || (data[i] = {title: '药物毒性说明', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">${item.matdxsm || '无'}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matbzjj) {
|
|
|
+ const ref = {}, i = 6;
|
|
|
+ const child = data[i] || (data[i] = {title: '病证用药禁忌', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">${item.matbzjj || '无'}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matsbf) {
|
|
|
+ const color = 'red';
|
|
|
+ const ref = {}, i = 7;
|
|
|
+ const child = data[i] || (data[i] = {title: '十八反', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">反${item.matsbf}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matsjw) {
|
|
|
+ const color = 'red';
|
|
|
+ const ref = {}, i = 8;
|
|
|
+ const child = data[i] || (data[i] = {title: '十九畏', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">畏${item.matsjw}</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matby) {
|
|
|
+ const ref = {}, i = 9;
|
|
|
+ const child = data[i] || (data[i] = {title: '用药不宜', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value">不宜与${item.matby}同用</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ if (item.matmindosage && item.matmaxdosage) {
|
|
|
+ const ref = {}, i = 10;
|
|
|
+ const child = data[i] || (data[i] = {title: '超剂量药品', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value" style="color: red;">(${item.matmindosage}-${item.matmaxdosage})</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ }, {title: `中药处方${index + 1}`});
|
|
|
+ },
|
|
|
async getRationalMed(id) {
|
|
|
let ids = [];
|
|
|
// this.rationalMed = []
|
|
|
@@ -5427,10 +5561,43 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
@import "../../style/media/diagnosis/prescribing.scss";
|
|
|
</style>
|
|
|
-<style>
|
|
|
+<style lang="scss">
|
|
|
/* @media screen and (max-width: 768px) {
|
|
|
body {
|
|
|
width: 100% !important;
|
|
|
}
|
|
|
} */
|
|
|
+
|
|
|
+.message-rational-safe-use-wrapper {
|
|
|
+ align-items: flex-start;
|
|
|
+ max-height: 80vh;
|
|
|
+ overflow-y: auto;
|
|
|
+
|
|
|
+ &.el-message-box {
|
|
|
+ overflow-y: hidden;
|
|
|
+
|
|
|
+ .el-message-box__content {
|
|
|
+ max-height: calc(80vh - 45px - 48px);
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ margin: 12px 0;
|
|
|
+
|
|
|
+ > div {
|
|
|
+ margin: 8px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-message__content {
|
|
|
+ width: 100%;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|