提交 3b5cff13 编写于 作者: chengxiang.li's avatar chengxiang.li

merge

此差异已折叠。
......@@ -4,6 +4,8 @@ import common from './education/common';
//随访
import followModules from './followup/index';
import getters from './getters'
//居民诊断
import patientsDiagnose from './patientsManage/patientsDiagnose';
Vue.use(Vuex)
......@@ -11,7 +13,8 @@ Vue.use(Vuex)
export default new Vuex.Store({
modules: {
common,
...followModules
...followModules,
patientsDiagnose,
},
getters
})
......
const patientsDiagnose = {
namespaced: true,
state: {
selectedDiagList: [],
},
mutations: {
CHANGE_DIAGNOSE_LIST: (state, data) => {
state.selectedDiagList = data;
}
},
actions: {
changeDiagnoseList({ commit }, list) {
commit('CHANGE_DIAGNOSE_LIST', list);
}
}
}
export default patientsDiagnose;
\ No newline at end of file
......@@ -54,7 +54,9 @@ service.interceptors.request.use(config => {
}
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = 'D2E29BE9FF794703A482518A04D344E2';
// config.headers['token'] = 'BFD804F3A3194FBBBE113962222839F6';
config.headers['token'] = 'A97A609C1A98467C9372ACF55DD3BA35';
}else{
config.headers['token'] = localStorage.getItem('storageToken')
}
......
......@@ -377,6 +377,7 @@ export const getRemindPatient = (data) => {
})
};
// 保存并新增
export const savePatientInfo = (data) => {
return utils.checkAuth(()=>{
return fetch({
......@@ -426,3 +427,38 @@ export const getPatientInfoList = (data) => {
})
};
// 添加诊断:获取常用诊断列表
export const getCommonDiagnoseList = params => {
return fetch({
headers,
url: getBaseUrl(`medicineDictionary/icdCommonDiagnosis`),
method: 'get',
params: params,
description: '获取常用诊断列表',
})
}
// 添加诊断:搜索
export const goToSearch = params => {
return fetch({
headers,
url: getBaseUrl(`medicineDictionary/icdContents`),
method: 'get',
params: params,
description: '常用诊断搜索',
})
}
// 选择或搜索诊断
export const getIcdList = params => {
return fetch({
headers,
url: getBaseUrl(`healths/icd/list`),
// url: 'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/46/healths/icd/list',
method: 'get',
params: params,
description: '选择或搜索诊断',
})
}
......@@ -54,7 +54,7 @@
</el-select>
</el-form-item>
<el-form-item prop="diseaseId">
<el-select
<!--<el-select
v-model="searchData.diseaseId"
multiple
collapse-tags
......@@ -67,8 +67,27 @@
:key="index"
:label="item.diseaseName"
:value="item.diseaseId">
</el-option>
</el-select>
</el-option>-->
<!--</el-select>-->
<el-select
v-model="searchData.icdCodeList"
multiple
collapse-tags
filterable
remote
reserve-keyword
placeholder="请选择或搜索诊断"
:remote-method="getDiseaseData"
:loading="loading"
class="set-width"
>
<el-option
v-for="item in icdOptions"
:key="item.icdCode"
:label="item.diseaseName"
:value="item.icdCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="labelId">
<el-select
......@@ -229,7 +248,7 @@
<script>
import { mapState, mapActions } from 'vuex'
import { getConstants, getPatientInfoList, getDiseasesList, getLabelList } from '@/utils/patients/patientsapi'
import { getConstants, getPatientInfoList, getDiseasesList, getLabelList, getIcdList } from '@/utils/patients/patientsapi'
import { getPlanList } from '@/utils/followup/followapis'
export default {
components: {},
......@@ -248,7 +267,8 @@
diseaseId: [],
labelId: [],
fuPlanIdList: [],
searchCondition: ''
searchCondition: '',
icdCodeList: [],
},
paginationSet: {
pageNum: 1,
......@@ -272,6 +292,8 @@
newSelects: [], //新选中的人
oldPatientList: [],
showReloadModal: false,
loading: false,
icdOptions: [],
getRowKeys(row) {
return row.patientId;
},
......@@ -292,6 +314,8 @@
isShowSelectPatient(val){
if(val){
this.getPatientsList()
//获取搜索诊断
this.getDiseaseData();
// 获取常量 性别、年龄
getConstants({
numList: 'P057,P006'
......@@ -342,6 +366,29 @@
return row.disableNum
}
},
getDiseaseData(query) {
// if (query !== '') {
let params = {
diseaseName: query ? query : '',
pageSize: 200,
pageNum: 1,
};
this.loading = true;
getIcdList(params).then(data => {
this.loading = false;
if(data.code == "000000") {
this.icdOptions = data.data;
}
}).catch((error) => {
this.$message({
message: error,
type: 'error'
});
});
// }else {
// this.icdOptions = [];
// }
},
getPatientsList(){
const data = {
pageSize: this.paginationSet.pageSize,
......@@ -355,6 +402,7 @@
addType: this.selectPatientType, //随访是1,分组是2,患教是3
fuPlanIdList: this.searchData.fuPlanIdList || [],
sourceId: this.sourceId, //若是随访的话,传planId;若是分组的话,传labeledId;
icdCodeList: this.searchData.icdCodeList
}
getPatientInfoList(data).then(res=>{
if(res.data.patientList){
......@@ -377,10 +425,10 @@
item.showLabelName = '-';
}
//转化疾病
//转化诊断
if(item.patientTypeModels) {
item.patientTypeModels.forEach(item => {
diseaseNames.push(item.name)
diseaseNames.push(item.diseaseName)
})
item.showDiseaseNames = diseaseNames.join('、');
......@@ -486,7 +534,8 @@
diseaseId: [],
labelId: [],
fuPlanIdList: [],
searchCondition: ''
searchCondition: '',
icdCodeList: [],
}
this.$emit('closeSelectPatient',false)
},
......@@ -499,7 +548,8 @@
diseaseId: [],
labelId: [],
fuPlanIdList: [],
searchCondition: ''
searchCondition: '',
icdCodeList: [],
}
this.$emit('sureSelectPatient',false,this.newSelects,this.oldPatientList)
} else {
......
<template>
<div class="form-warp">
<addDiagnose ref="addDiagnose"></addDiagnose>
<el-form
:model="patientInfoForm"
:rules="rules"
......@@ -30,46 +31,53 @@
</el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <div class="has-header">数据记录</div> -->
<el-row>
<el-col :span="12">
<el-form-item label="诊断" prop="diseaseIdList">
<!-- <el-select
v-model="diseaseIdList"
multiple
@change="changeDiseases"
:popper-append-to-body="false"
placeholder="请选择居民疾病诊断">
<el-option
v-for="(item, index) in diseasesList"
:key="item.diseaseId"
:label="item.diseaseName"
:value="item.diseaseId">
</el-option>
</el-select> -->
<el-button icon="el-icon-plus" @click="handleAddDiagnose">添加诊断</el-button>
<ul class="final-diagnose-list" v-if="selectedDiagList && selectedDiagList.length > 0">
<li v-for="diagnose in selectedDiagList" v-html="diagnose.alias ? diagnose.alias+'; ' : diagnose.diseaseName+'; '"></li>
</ul>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="分组" prop="labelIdList">
<el-select
v-model="labelIdList"
multiple
@change="changeLabels"
:popper-append-to-body="false"
placeholder="请选择居民分组">
<el-option
v-for="(item, index) in labelsList"
:key="index.labelId"
:label="item.labelName"
:value="item.labelId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: center;margin-top:15px;" v-show="!patientId"> <el-button plain size="small" @click="toggleClick">{{tipsText}}</el-button></el-col>
</el-row>
<div v-show="isShowAll || patientId">
<div class="has-header">数据记录</div>
<el-row>
<el-col :span="12">
<el-form-item label="诊断" prop="diseaseIdList">
<el-select
v-model="diseaseIdList"
multiple
@change="changeDiseases"
:popper-append-to-body="false"
placeholder="请选择居民疾病诊断">
<el-option
v-for="(item, index) in diseasesList"
:key="item.diseaseId"
:label="item.diseaseName"
:value="item.diseaseId">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="分组" prop="labelIdList">
<el-select
v-model="labelIdList"
multiple
@change="changeLabels"
:popper-append-to-body="false"
placeholder="请选择居民分组">
<el-option
v-for="(item, index) in labelsList"
:key="index.labelId"
:label="item.labelName"
:value="item.labelId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div class="has-header">基本信息</div>
<el-row>
<el-col :span="12">
......@@ -240,7 +248,7 @@
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { mapGetters, mapState } from 'vuex';
import { checkMobile } from '@/utils/patients/checkValid';
import { isCardNo, checkProvince, checkBirthday, checkParity, validateIdCard } from '@/utils/patients/checkCardNum';
import {
......@@ -254,9 +262,10 @@
getCountyList,
getTownList } from '@/utils/patients/patientsapi';
let vm = null;
import addDiagnose from '@/components/icd/addDiagnose.vue';
export default {
name: "basicInfo",
components: {},
components: { addDiagnose },
data() {
let validCode=(rule,value,callback)=>{
if(value) {
......@@ -427,7 +436,8 @@
this.patientInfoForm = val;
this.baseInfoEdit = this.patientInfoForm.baseInfoEdit;
let customLabels = this.patientInfoForm.customLabels;
let diseases = this.patientInfoForm.diseases;
// let diseases = this.patientInfoForm.diseases;
let icdList = this.patientInfoForm.icdList;
if(customLabels && customLabels.length > 0){
customLabels.forEach((kkk)=>{
this.labelIdList.push(Number(kkk.labelId))
......@@ -435,12 +445,17 @@
}else {
this.labelIdList = [];
}
if(diseases && diseases.length > 0) {
diseases.forEach((dis)=>{
this.diseaseIdList.push(Number(dis.diseaseId))
})
// if(diseases && diseases.length > 0) {
// diseases.forEach((dis)=>{
// this.diseaseIdList.push(Number(dis.diseaseId))
// })
// }else {
// this.diseaseIdList = [];
// }
if(icdList && icdList.length > 0) {
this.$store.dispatch('patientsDiagnose/changeDiagnoseList', icdList)
}else {
this.diseaseIdList = [];
this.$store.dispatch('patientsDiagnose/changeDiagnoseList', [])
}
if(this.patientInfoForm.idNo) {
this.hasIdNo = true;
......@@ -494,6 +509,9 @@
...mapGetters([
'_token',
]),
...mapState('patientsDiagnose', {
selectedDiagList: state => state.selectedDiagList
}),
currentCount(){
if(this.patientInfoForm.remark) {
return this.patientInfoForm.remark.length
......@@ -529,7 +547,12 @@
cityId: null,
countyId: null,
townId: null,
}
},
this.$store.dispatch('patientsDiagnose/changeDiagnoseList', [])
},
// 点击 添加诊断
handleAddDiagnose() {
this.$refs.addDiagnose.showSelf();
},
initConstant(){
getDiseasesList().then((data) => {
......@@ -559,17 +582,18 @@
});
this.getProvinceLists();
},
changeDiseases(val) {
let newDiseaseList = [];
val.forEach((valItem) => {
this.diseasesList.forEach((item2) => {
if(valItem == item2.diseaseId){
newDiseaseList.push({parentDiseaseId: item2.diseaseId});
}
})
});
this.patientInfoForm.patientDiseases = newDiseaseList;
},
// changeDiseases(val) {
// // 格式化数据 提交用
// let newDiseaseList = [];
// val.forEach((valItem) => {
// this.diseasesList.forEach((item2) => {
// if(valItem == item2.diseaseId){
// newDiseaseList.push({parentDiseaseId: item2.diseaseId});
// }
// })
// });
// this.patientInfoForm.patientDiseases = newDiseaseList;
// },
changeLabels(val){
let newLabelsList = [];
val.forEach((valItem) => {
......@@ -654,6 +678,7 @@
status: true,
patientInfoForm: {
...this.patientInfoForm,
icdList: this.selectedDiagList,
birthTime: this.patientInfoForm.birthTime ? `${this.patientInfoForm.birthTime} 00:00:00` : '',
}
})
......@@ -663,6 +688,7 @@
// patientInfoForm: this.patientInfoForm,
patientInfoForm: {
...this.patientInfoForm,
icdList: this.selectedDiagList,
birthTime: this.patientInfoForm.birthTime ? `${this.patientInfoForm.birthTime} 00:00:00` : '',
}
})
......@@ -871,5 +897,15 @@
.idNoTxt{
display: inline-flex;color:#C0C4CC;line-height:20px;vertical-align: middle;
}
.final-diagnose-list{
color: #BBB;
line-height: 20px;
margin-top: 15px;
overflow: hidden;
li{
float:left;
margin-right: 5px;
}
}
}
</style>
......@@ -35,11 +35,15 @@
<!--<div><p class="title">健康档案编号:</p><p class="info">{{patientInfo.fileLocator | emptyFilter}}</p></div>-->
<!--<div><p class="title">医保号:</p><p class="info">{{patientInfo.socialCard | emptyFilter}}</p></div>-->
<!--</div>-->
<div class="has-header">数据记录</div>
<div class="item wrap-p">
<div><p class="title">诊断:</p><p class="info">{{showDiseaseName | emptyFilter}}</p></div>
<div><p class="title">分组:</p><p class="info">{{showLabelName | emptyFilter}}</p></div>
</div>
<!-- <div class="has-header">数据记录</div>
<div class="item wrap-p">
<div><p class="title">诊断:</p><p class="info">{{showDiseaseName | emptyFilter}}</p></div>
<div><p class="title">分组:</p><p class="info">{{showLabelName | emptyFilter}}</p></div>
</div>-->
<div class="has-header">联系方式</div>
<div class="item">
<div><p class="title">手机号:</p><p class="info">{{patientInfo.mobilePhone | emptyFilter}}</p></div>
......@@ -180,7 +184,8 @@
if(this.patientInfo){
this.doctorId = this.patientInfo.doctorId;
let customLabels = this.patientInfo.customLabels;
let diseases = this.patientInfo.diseases;
// let diseases = this.patientInfo.diseases;
let icdList = this.patientInfo.icdList;
let groupLabelNames = [];
let groupDiseaseNames = [];
//对出生日期的处理
......@@ -201,9 +206,18 @@
} else {
this.showLabelName = '';
}
// 对诊断疾病的处理
if(diseases) {
diseases.forEach(item => {
// 对诊断疾病的处理(老版诊断)
// if(diseases) {
// diseases.forEach(item => {
// groupDiseaseNames.push(item.diseaseName)
// });
// this.showDiseaseName = groupDiseaseNames.join(';');
// } else {
// this.showDiseaseName = '';
// }
// 对诊断疾病的处理(新版诊断)
if(icdList) {
icdList.forEach(item => {
groupDiseaseNames.push(item.diseaseName)
});
this.showDiseaseName = groupDiseaseNames.join(';');
......
......@@ -30,15 +30,37 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="诊断:" prop="startDate">
<el-select v-model="searchData.diseaseId" size="small" clearable :popper-append-to-body="false">
<el-form-item label="诊断:" prop="startDate" class="diagnose-select-style">
<!-- <el-select v-model="searchData.diseaseId" size="small" clearable :popper-append-to-body="false" placeholder="请选择或搜索诊断">
<el-option
v-for="item in diseaseList"
:key="item.diseaseId"
:label="item.diseaseName"
:value="item.diseaseId">
</el-option>
</el-select> -->
<!-- new Start -->
<el-select
v-model="searchData.icdCodeList"
multiple
filterable
remote
size="small"
collapse-tags
reserve-keyword
placeholder="请选择或搜索诊断"
:remote-method="getDiseaseData"
:loading="loading"
:popper-append-to-body="false"
>
<el-option
v-for="item in options"
:key="item.icdCode"
:label="item.diseaseName"
:value="item.icdCode">
</el-option>
</el-select>
<!-- new End -->
</el-form-item>
<el-form-item label="分组:" prop="labelId">
<el-select v-model="searchData.labelId" size="small" clearable :popper-append-to-body="false">
......@@ -138,7 +160,8 @@
<script>
import BreadCrumb from '../../../components/breadcrumb.vue'
import { getConstants,
getDiseasesList,
// getDiseasesList,
getIcdList,
getLabelList,
getPatientList} from '../../../utils/patients/patientsapi'
export default {
......@@ -161,12 +184,14 @@
agesList: [], //年龄
diseaseList: [],
groupList: [],
patientList: []
patientList: [],
options: [],
loading: false,
}
},
mounted() {
this.getConstantData(); //获取性别、年龄段常量
this.getDiseaseData(); //获取疾病种类
this.getDiseaseData(); //获取 搜索诊断
this.getGroupList(); //获取分组
this.getPatients({
...this.searchData
......@@ -188,10 +213,27 @@
});
});
},
getDiseaseData() {
getDiseasesList().then((data) => {
getDiseaseData(query) {
// getDiseasesList().then((data) => {
// if(data.code == "000000") {
// this.diseaseList = data.data;
// }
// }).catch((error) => {
// this.$message({
// message: error,
// type: 'error'
// });
// });
let params = {
diseaseName: query ? query : '',
pageNum: 1,
pageSize: 200,
};
this.loading = true;
getIcdList(params).then(data => {
this.loading = false;
if(data.code == "000000") {
this.diseaseList = data.data;
this.options = data.data;
}
}).catch((error) => {
this.$message({
......@@ -262,7 +304,7 @@
//转化疾病
if (item.patientTypeModels) {
item.patientTypeModels.forEach(item => {
diseaseNames.push(item.name)
diseaseNames.push(item.diseaseName)
})
item.showDiseaseNames = diseaseNames.join('、');
} else {
......@@ -337,6 +379,22 @@
border-bottom: 1px solid #efefef;
.search-input{
flex: 1;
.diagnose-select-style{
.el-input__inner{
height: 32px !important;
}
.el-select__tags-text{
display: inline-block;
max-width: 75px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.el-tag__close.el-icon-close{
top: -6px;
}
}
}
.search-btn {
text-align: right;
......
......@@ -95,6 +95,9 @@
this.$refs.newForm.diseaseIdList = [];
this.$refs.newForm.labelIdList = [];
this.$refs.newForm.addressList = [];
// 清空已选的诊断列表
this.$store.dispatch('patientsDiagnose/changeDiagnoseList', []);
// this.$router.go(0);//体验不好
},500)
}else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册