提交 a4b696e1 编写于 作者: hujun's avatar hujun

Merge branch 'dev-patients-20190513' into 'release-0612'

Dev patients 20190513



See merge request !31
...@@ -8,7 +8,8 @@ import utils from './followupUtils'; ...@@ -8,7 +8,8 @@ import utils from './followupUtils';
const headers = { const headers = {
sysCode: 45 sysCode: 45,
hospitalAuth:true
} /**/ } /**/
/*工作台*/ /*工作台*/
export const getTodayAppointsList = (params) => { export const getTodayAppointsList = (params) => {
...@@ -41,15 +42,19 @@ export const getTodayPlans = (params) => { ...@@ -41,15 +42,19 @@ export const getTodayPlans = (params) => {
/*计划管理*/ /*计划管理*/
export const createFollowPlan = (data) => { export const createFollowPlan = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans`), url: getFollowUpSC(`/followup/plans`),
method: 'post', method: 'post',
data: data, data: data,
description: '新增、修改随访计划', description: '新增、修改随访计划',
},) })
})
} }
export const getPlanList = (params) => { export const getPlanList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans`), url: getFollowUpSC(`/followup/plans`),
...@@ -57,32 +62,44 @@ export const getPlanList = (params) => { ...@@ -57,32 +62,44 @@ export const getPlanList = (params) => {
params: params, params: params,
description: '获取计划列表', description: '获取计划列表',
}) })
})
}; };
export const getPlanDetail = (planId) => { export const getPlanDetail = (planId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/${planId}`), url: getFollowUpSC(`/followup/plans/${planId}`),
method: 'get', method: 'get',
description: '获取计划详情', description: '获取计划详情',
}) })
})
}; };
export const getNodeTimeList = (planId) => { export const getNodeTimeList = (planId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/${planId}/time`), url: getFollowUpSC(`/followup/plans/${planId}/time`),
method: 'get', method: 'get',
description: '获取随访时间节点列表', description: '获取随访时间节点列表',
}) })
})
}; };
export const getNodeTimeContent = (planTimeId) => { export const getNodeTimeContent = (planTimeId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/time/${planTimeId}`), url: getFollowUpSC(`/followup/plans/time/${planTimeId}`),
method: 'get', method: 'get',
description: '获取节点详情', description: '获取节点详情',
}) })
})
}; };
export const getResidentList = (params) => { export const getResidentList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/planPatient/`), url: getFollowUpSC(`/followup/planPatient/`),
...@@ -90,8 +107,11 @@ export const getResidentList = (params) => { ...@@ -90,8 +107,11 @@ export const getResidentList = (params) => {
params: params, params: params,
description: '获取居民列表', description: '获取居民列表',
}) })
})
}; };
export const getGroupList = (params) => { export const getGroupList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/planPatient/group`), url: getFollowUpSC(`/followup/planPatient/group`),
...@@ -99,24 +119,33 @@ export const getGroupList = (params) => { ...@@ -99,24 +119,33 @@ export const getGroupList = (params) => {
params: params, params: params,
description: '获取分组列表', description: '获取分组列表',
}) })
})
}; };
export const getFollowStartTimeList = (planId) => { export const getFollowStartTimeList = (planId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/planPatient/${planId}/times`), url: getFollowUpSC(`/followup/planPatient/${planId}/times`),
method: 'get', method: 'get',
description: '获取随访开始时间列表(居民相关)', description: '获取随访开始时间列表(居民相关)',
}) })
})
}; };
export const getResidentDetail = (planId,patientId,fuPlanPatientId ) => { export const getResidentDetail = (planId,patientId,fuPlanPatientId ) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/planPatient/${planId}/detail/${patientId}?planPatientsId=${fuPlanPatientId}`), url: getFollowUpSC(`/followup/planPatient/${planId}/detail/${patientId}?planPatientsId=${fuPlanPatientId}`),
method: 'get', method: 'get',
description: '获取居民详情', description: '获取居民详情',
}) })
})
}; };
export const changePlan = (data) => { export const changePlan = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/planPatient/change`), url: getFollowUpSC(`/followup/planPatient/change`),
...@@ -124,8 +153,11 @@ export const changePlan = (data) => { ...@@ -124,8 +153,11 @@ export const changePlan = (data) => {
data: data, data: data,
description: '变更计划', description: '变更计划',
}) })
})
}; };
export const finishPlan = (data) => { export const finishPlan = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/planPatient/status`), url: getFollowUpSC(`/followup/planPatient/status`),
...@@ -133,16 +165,22 @@ export const finishPlan = (data) => { ...@@ -133,16 +165,22 @@ export const finishPlan = (data) => {
data: data, data: data,
description: '变更计划', description: '变更计划',
}) })
})
}; };
export const deletePlan = (planId) => { export const deletePlan = (planId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/${planId}`), url: getFollowUpSC(`/followup/plans/${planId}`),
method: 'delete', method: 'delete',
description: '删除计划', description: '删除计划',
}) })
})
}; };
export const getVerifyStatus = (params) => { export const getVerifyStatus = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/validate/status`), url: getFollowUpSC(`/followup/plans/validate/status`),
...@@ -150,9 +188,12 @@ export const getVerifyStatus = (params) => { ...@@ -150,9 +188,12 @@ export const getVerifyStatus = (params) => {
params: params, params: params,
description: '认证校验', description: '认证校验',
}) })
})
}; };
/*预约管理*/ /*预约管理*/
export const getReservationList = (data) => { export const getReservationList = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/appoint/appointed/list`), url: getFollowUpSC(`/followup/appoint/appointed/list`),
...@@ -160,8 +201,11 @@ export const getReservationList = (data) => { ...@@ -160,8 +201,11 @@ export const getReservationList = (data) => {
data: data, data: data,
description: '获取预约列表', description: '获取预约列表',
}) })
})
}; };
export const getCheckReservation = (data) => { export const getCheckReservation = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/healths/notice/fu/doctor/appoint/pushValid`), url: getFollowUpSC(`/healths/notice/fu/doctor/appoint/pushValid`),
...@@ -169,8 +213,11 @@ export const getCheckReservation = (data) => { ...@@ -169,8 +213,11 @@ export const getCheckReservation = (data) => {
data: data, data: data,
description: '发送预约校验', description: '发送预约校验',
}) })
})
}; };
export const getReservationPatients = (data) => { export const getReservationPatients = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/appoint/appointed/count`), url: getFollowUpSC(`/followup/appoint/appointed/count`),
...@@ -178,8 +225,11 @@ export const getReservationPatients = (data) => { ...@@ -178,8 +225,11 @@ export const getReservationPatients = (data) => {
data: data, data: data,
description: '查看预约人数', description: '查看预约人数',
}) })
})
}; };
export const changeReservationStatus = (data) => { export const changeReservationStatus = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/appoint/status/`), url: getFollowUpSC(`/followup/appoint/status/`),
...@@ -187,8 +237,11 @@ export const changeReservationStatus = (data) => { ...@@ -187,8 +237,11 @@ export const changeReservationStatus = (data) => {
data: data, data: data,
description: '手动变更预约状态', description: '手动变更预约状态',
}) })
})
}; };
export const sendReservation = (data) => { export const sendReservation = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/appoint/`), url: getFollowUpSC(`/followup/appoint/`),
...@@ -196,9 +249,12 @@ export const sendReservation = (data) => { ...@@ -196,9 +249,12 @@ export const sendReservation = (data) => {
data: data, data: data,
description: '发送预约', description: '发送预约',
}) })
})
}; };
/*录入管理*/ /*录入管理*/
export const getEnteringList = (data) => { export const getEnteringList = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/entering/list`), url: getFollowUpSC(`/followup/entering/list`),
...@@ -206,17 +262,23 @@ export const getEnteringList = (data) => { ...@@ -206,17 +262,23 @@ export const getEnteringList = (data) => {
data: data, data: data,
description: '录入列表查看', description: '录入列表查看',
}) })
})
} }
export const changeEnteringStatus = (data) => { export const changeEnteringStatus = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/entering/status/change`), url: getFollowUpSC(`/followup/entering/status/change`),
method: 'post', method: 'post',
data: data, data: data,
description: '变更随访状态', description: '变更随访状态',
},) })
})
} }
export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => { export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/entering/${patientId}/fuInfo/${fuPlanPatientTimesId}`), url: getFollowUpSC(`/followup/entering/${patientId}/fuInfo/${fuPlanPatientTimesId}`),
...@@ -224,8 +286,11 @@ export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => { ...@@ -224,8 +286,11 @@ export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
// params: params, // params: params,
description: '随访单条信息查看', description: '随访单条信息查看',
},) },)
})
} }
export const getFormList = (planTimesId) => { export const getFormList = (planTimesId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/entering/scale/${planTimesId}/list`), url: getFollowUpSC(`/followup/entering/scale/${planTimesId}/list`),
...@@ -233,23 +298,30 @@ export const getFormList = (planTimesId) => { ...@@ -233,23 +298,30 @@ export const getFormList = (planTimesId) => {
// params: params, // params: params,
description: '获取量表列表', description: '获取量表列表',
},) },)
})
} }
//获取新建计划居民列表 //获取新建计划居民列表
export const getPlanPatientsList = (data) =>{ export const getPlanPatientsList = (data) =>{
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers:{ headers:{
sysCode: 9 sysCode: 9,
hospitalAuth:true
}, },
url: getFollowUpSC(`/healths/patients/infolist`), url: getFollowUpSC(`/healths/patients/infolist`),
method: 'post', method: 'post',
data: data, data: data,
description: '获取新建计划居民列表', description: '获取新建计划居民列表',
},) },)
})
} }
// 获取随访计划模板列表 // 获取随访计划模板列表
export const getFollowupTemplate = (data) => { export const getFollowupTemplate = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/templets`), url: getFollowUpSC(`/followup/plans/templets`),
...@@ -257,10 +329,13 @@ export const getFollowupTemplate = (data) => { ...@@ -257,10 +329,13 @@ export const getFollowupTemplate = (data) => {
data: data, data: data,
description: '获取随访计划模板列表', description: '获取随访计划模板列表',
}) })
})
} }
// 获取随访量表固定模板 // 获取随访量表固定模板
export const getFollowupTableTemplate = (id) => { export const getFollowupTableTemplate = (id) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/templets/${id}`), url: getFollowUpSC(`/followup/plans/templets/${id}`),
...@@ -268,10 +343,13 @@ export const getFollowupTableTemplate = (id) => { ...@@ -268,10 +343,13 @@ export const getFollowupTableTemplate = (id) => {
data: {}, data: {},
description: '获取随访量表固定模板', description: '获取随访量表固定模板',
}) })
})
} }
// 获取量表列表 // 获取量表列表
export const getFormOptions = (data)=>{ export const getFormOptions = (data)=>{
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/entering/scale/list`), url: getFollowUpSC(`/followup/entering/scale/list`),
...@@ -279,10 +357,13 @@ export const getFormOptions = (data)=>{ ...@@ -279,10 +357,13 @@ export const getFormOptions = (data)=>{
data: data, data: data,
description: '获取量表列表', description: '获取量表列表',
}) })
})
} }
/*常量*/ /*常量*/
export const getBasicData = (params) => { export const getBasicData = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/basic-data/constants/`), url: getFollowUpSC(`/basic-data/constants/`),
...@@ -290,10 +371,13 @@ export const getBasicData = (params) => { ...@@ -290,10 +371,13 @@ export const getBasicData = (params) => {
params: params, params: params,
description: '获取常量', description: '获取常量',
}) })
})
}; };
// 获取所有漫画列表 // 获取所有漫画列表
export const getAllEducationComtent = (data) => { export const getAllEducationComtent = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/healths/comtent/workstation/list`), url: getFollowUpSC(`/healths/comtent/workstation/list`),
...@@ -301,10 +385,13 @@ export const getAllEducationComtent = (data) => { ...@@ -301,10 +385,13 @@ export const getAllEducationComtent = (data) => {
data: data, data: data,
description: '获取所有漫画列表' description: '获取所有漫画列表'
}) })
})
} }
// 获取所有疾病 // 获取所有疾病
export const getAllDiseases = (params) => { export const getAllDiseases = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/healths/patients/diseases/-1`), url: getFollowUpSC(`/healths/patients/diseases/-1`),
...@@ -312,10 +399,13 @@ export const getAllDiseases = (params) => { ...@@ -312,10 +399,13 @@ export const getAllDiseases = (params) => {
params: params, params: params,
description: '获取所有疾病', description: '获取所有疾病',
}) })
})
} }
// 获取所有分组 // 获取所有分组
export const getAllLabels = (params) => { export const getAllLabels = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/healths/labels/`), url: getFollowUpSC(`/healths/labels/`),
...@@ -323,19 +413,25 @@ export const getAllLabels = (params) => { ...@@ -323,19 +413,25 @@ export const getAllLabels = (params) => {
params: params, params: params,
description: '获取所有分组', description: '获取所有分组',
}) })
})
} }
// 获取微信和短信病人数接口 // 获取微信和短信病人数接口
export const getPatientNumber = (data) => { export const getPatientNumber = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers: { headers: {
sysCode: 9 sysCode: 9,
hospitalAuth:true
}, },
url: getFollowUpSC(`/healths/patientEducation/getSendPatientTypeNum`), url: getFollowUpSC(`/healths/patientEducation/getSendPatientTypeNum`),
method: 'post', method: 'post',
data: data, data: data,
description: '获取微信和短信病人数接口', description: '获取微信和短信病人数接口',
}) })
})
} }
...@@ -347,6 +443,9 @@ export const getPatientNumber = (data) => { ...@@ -347,6 +443,9 @@ export const getPatientNumber = (data) => {
export const getDomain = (data) => { export const getDomain = (data) => {
return fetch({ return fetch({
url: getFollowUpSC(`/followup/route/domain?type=1`), url: getFollowUpSC(`/followup/route/domain?type=1`),
headers:{
hospitalAuth:true
},
method: 'get', method: 'get',
data: {}, data: {},
}) })
...@@ -356,6 +455,9 @@ export const getDomain = (data) => { ...@@ -356,6 +455,9 @@ export const getDomain = (data) => {
export const getScaleModels = (domain,scaleNo) => { export const getScaleModels = (domain,scaleNo) => {
return fetch({ return fetch({
url: `${domain}/scale/${scaleNo}/models`, url: `${domain}/scale/${scaleNo}/models`,
headers:{
hospitalAuth:true
},
method: 'get', method: 'get',
data: {}, data: {},
}) })
...@@ -365,6 +467,9 @@ export const getScaleModels = (domain,scaleNo) => { ...@@ -365,6 +467,9 @@ export const getScaleModels = (domain,scaleNo) => {
export const getScaleDetail = (domain,planPatientsTimesId,scaleNo) => { export const getScaleDetail = (domain,planPatientsTimesId,scaleNo) => {
return fetch({ return fetch({
url: `${domain}/scale/${planPatientsTimesId}/${scaleNo}/info?type=2&isLine=2`, url: `${domain}/scale/${planPatientsTimesId}/${scaleNo}/info?type=2&isLine=2`,
headers:{
hospitalAuth:true
},
method: 'get', method: 'get',
data: {}, data: {},
}) })
...@@ -374,6 +479,9 @@ export const getScaleDetail = (domain,planPatientsTimesId,scaleNo) => { ...@@ -374,6 +479,9 @@ export const getScaleDetail = (domain,planPatientsTimesId,scaleNo) => {
export const postScale = ( domain,data ) => { export const postScale = ( domain,data ) => {
return fetch({ return fetch({
url: `${domain}/scale/save`, url: `${domain}/scale/save`,
headers:{
hospitalAuth:true
},
method: 'post', method: 'post',
data: JSON.stringify(data), data: JSON.stringify(data),
}) })
...@@ -383,6 +491,9 @@ export const postScale = ( domain,data ) => { ...@@ -383,6 +491,9 @@ export const postScale = ( domain,data ) => {
export const updateScalesStatus = ( data ) => { export const updateScalesStatus = ( data ) => {
return fetch({ return fetch({
url: getFollowUpSC(`/followup/entering/scale/updateScalesStatus`), url: getFollowUpSC(`/followup/entering/scale/updateScalesStatus`),
headers:{
hospitalAuth:true
},
method: 'post', method: 'post',
data: data, data: data,
}) })
......
import dataConverter from './dataConverter'; import dataConverter from './dataConverter';
import fetch from '@/utils/fetch';
import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index'
import Vue from 'vue';
function getSaasHost(){
var host;
if(location.host.indexOf('dev-work')>-1 || location.host.indexOf('localhost')>-1){
host = 'https://dev-saas.yunqueyi.com'
}else if(location.host.indexOf('test1-work')>-1){
host = 'https://test1.yunqueyi.com'
}else if(location.host.indexOf('uat-work')>-1){
host = 'https://uat.yunqueyi.com'
}else{
host = 'https://www.yunqueyi.com'
}
return host
}
function getWsHost(){
var host;
if(location.host.indexOf('dev-work')>-1 || location.host.indexOf('localhost')>-1){
host = 'https://dev-ws.yunqueyi.com'
}else if(location.host.indexOf('test1-work')>-1){
host = 'https://test1-ws.yunqueyi.com'
}else if(location.host.indexOf('uat-work')>-1){
host = 'https://uat-ws.yunqueyi.com'
}else{
host = 'https://ws.yunqueyi.com'
}
return host
}
const alertMessage = (msg, confirmButtonText, cancelButtonText, callback) => {
Vue.prototype.$confirm(msg, '提醒', {
confirmButtonText: confirmButtonText,
cancelButtonText: cancelButtonText,
}).then(() => {
callback();
}).catch(() => {
// 关闭弹窗
});
}
export default { export default {
DC: dataConverter, DC: dataConverter,
checkAuth: (callback) => {
return new Promise((resolve, reject) => {
fetch({
headers: {
token: localStorage.getItem('storageToken')
},
url: getBaseUrl(`/healths/doctor/hospitalAuth`),
method: 'get',
description: '检查用户的机构权限',
}).then(res => {
// 1、未加入 2、审核中 3、加入成功
// res.data = 2
if (res.code == '000000') {
if (res.data == 1) {
// 点击 去加入,进入加入机构流程
alertMessage('您当前暂无机构,无法使用居民管理、随访管理和群发消息等功能,请在加入机构后重试。','去加入','暂不加入', ()=>{
location.href = getSaasHost() + '/pica-base/pica_join.html'
})
// return new Promise((resolve, reject) => {
// })
} else if (res.data == 2) {
alertMessage('您创建的机构正在审核中,暂无法使用居民管理、随访管理和群发消息等功能,请在审核通过后重试。','查看审核','取消', ()=>{
location.href = getWsHost() + '/outside/status?tk=' + localStorage.getItem('storageToken')
})
// return new Promise((resolve, reject) => {
// })
} else if (res.data == 3) {
return callback
}
}
})
})
}
}; };
import fetch from '../fetch'; import fetch from '../fetch';
import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index' import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index'
import utils from '@/utils/followup/followupUtils';
// const utils.checkAuth = (callback) => {
// return new Promise((resolve, reject) => {
// fetch({
// headers: {
// token: localStorage.getItem('storageToken')
// },
// url: getBaseUrl(`/healths/doctor/hospitalAuth`),
// method: 'get',
// description: '检查用户的机构权限',
// }).then(res => {
// // res.data =1
// if (res.code == '000000') {
// // 1、未加入 2、审核中 3、加入成功
// if (res.data == 1) {
// return new Promise((resolve, reject) => {
// })
// } else if (res.data == 2) {
// return new Promise((resolve, reject) => {
// })
// } else if (res.data == 3) {
// return callback
// }
// }
// })
// })
// }
const headers = { const headers = {
sysCode: 9 sysCode: 9,
hospitalAuth:true
} }
/*常量API*/ /*常量API*/
export const getConstants = (params) => { export const getConstants = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`basic-data/constants/`), url: getBaseUrl(`basic-data/constants/`),
...@@ -15,9 +43,11 @@ export const getConstants = (params) => { ...@@ -15,9 +43,11 @@ export const getConstants = (params) => {
params: params, params: params,
description: '获取常量', description: '获取常量',
}) })
})
}; };
/*获取省市县乡列表*/ /*获取省市县乡列表*/
export const getProvinceList = (params) => { export const getProvinceList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`basic-data/position/provinces`), url: getBaseUrl(`basic-data/position/provinces`),
...@@ -25,8 +55,10 @@ export const getProvinceList = (params) => { ...@@ -25,8 +55,10 @@ export const getProvinceList = (params) => {
params: params, params: params,
description: '获取省列表', description: '获取省列表',
}) })
})
}; };
export const getCityList = (params) => { export const getCityList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`basic-data/position/cities`), url: getBaseUrl(`basic-data/position/cities`),
...@@ -34,8 +66,10 @@ export const getCityList = (params) => { ...@@ -34,8 +66,10 @@ export const getCityList = (params) => {
params: params, params: params,
description: '获取市列表', description: '获取市列表',
}) })
})
}; };
export const getCountyList = (params) => { export const getCountyList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`basic-data/position/counties`), url: getBaseUrl(`basic-data/position/counties`),
...@@ -43,8 +77,10 @@ export const getCountyList = (params) => { ...@@ -43,8 +77,10 @@ export const getCountyList = (params) => {
params: params, params: params,
description: '获取区县列表', description: '获取区县列表',
}) })
})
}; };
export const getTownList = (params) => { export const getTownList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`basic-data/position/towns`), url: getBaseUrl(`basic-data/position/towns`),
...@@ -52,9 +88,11 @@ export const getTownList = (params) => { ...@@ -52,9 +88,11 @@ export const getTownList = (params) => {
params: params, params: params,
description: '获取乡镇列表', description: '获取乡镇列表',
}) })
})
}; };
/*居民管理*/ /*居民管理*/
export const getPatientList = (data) => { export const getPatientList = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/infolist`), url: getBaseUrl(`healths/patients/infolist`),
...@@ -62,8 +100,10 @@ export const getPatientList = (data) => { ...@@ -62,8 +100,10 @@ export const getPatientList = (data) => {
data: data, data: data,
description: '获取居民列表', description: '获取居民列表',
}) })
})
}; };
export const getDiseasesList = (params) => { export const getDiseasesList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/diseases/-1`), url: getBaseUrl(`healths/patients/diseases/-1`),
...@@ -71,10 +111,12 @@ export const getDiseasesList = (params) => { ...@@ -71,10 +111,12 @@ export const getDiseasesList = (params) => {
params: params, params: params,
description: '获取所有疾病', description: '获取所有疾病',
}) })
})
}; };
// 新增居民 // 新增居民
export const getQRCode = data => { export const getQRCode = data => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/qrcodes/get`), url: getBaseUrl(`healths/qrcodes/get`),
...@@ -82,9 +124,11 @@ export const getQRCode = data => { ...@@ -82,9 +124,11 @@ export const getQRCode = data => {
data: data, data: data,
description: '获取二维码', description: '获取二维码',
}) })
})
} }
export const getUploadHistory = params => { export const getUploadHistory = params => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/docImpPat/import/records`), url: getBaseUrl(`healths/docImpPat/import/records`),
...@@ -92,9 +136,11 @@ export const getUploadHistory = params => { ...@@ -92,9 +136,11 @@ export const getUploadHistory = params => {
params: params, params: params,
description: '获取上传历史记录', description: '获取上传历史记录',
}) })
})
} }
export const refreshCode = data => { export const refreshCode = data => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/qrcodes/refresh`), url: getBaseUrl(`healths/qrcodes/refresh`),
...@@ -102,9 +148,11 @@ export const refreshCode = data => { ...@@ -102,9 +148,11 @@ export const refreshCode = data => {
data: data, data: data,
description: '刷新二维码有效期', description: '刷新二维码有效期',
}) })
})
} }
export const getLabelsInfo = params => { export const getLabelsInfo = params => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/qrcodes/getLabelsInfo`), url: getBaseUrl(`healths/qrcodes/getLabelsInfo`),
...@@ -112,9 +160,11 @@ export const getLabelsInfo = params => { ...@@ -112,9 +160,11 @@ export const getLabelsInfo = params => {
params: params, params: params,
description: '获取分组信息', description: '获取分组信息',
}) })
})
} }
export const downloadQRCode = data => { export const downloadQRCode = data => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/qrcodes/shareUrl`), url: getBaseUrl(`healths/qrcodes/shareUrl`),
...@@ -122,22 +172,27 @@ export const downloadQRCode = data => { ...@@ -122,22 +172,27 @@ export const downloadQRCode = data => {
data: data, data: data,
description: '下载二维码', description: '下载二维码',
}) })
})
} }
export const uploadExcel = data => { export const uploadExcel = data => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers: { headers: {
noSysCode: true, noSysCode: true,
hospitalAuth:true
}, },
url: getSaasDomain('web/patientManages/import'), url: getSaasDomain('web/patientManages/import'),
method: 'post', method: 'post',
data: data, data: data,
description: '上传excel文件', description: '上传excel文件',
}) })
})
} }
// 分组管理 // 分组管理
export const getLabelList = (params) => { export const getLabelList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/labels/`), url: getBaseUrl(`healths/labels/`),
...@@ -145,33 +200,38 @@ export const getLabelList = (params) => { ...@@ -145,33 +200,38 @@ export const getLabelList = (params) => {
params: params, params: params,
description: '获取分组列表', description: '获取分组列表',
}) })
})
} }
export const createNewLabel = (data) => { export const createNewLabel = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
url: getBaseUrl(`healths/labels/`), url: getBaseUrl(`healths/labels/`),
headers: { headers: {
"Content-Type": 'application/json' "Content-Type": 'application/json',
hospitalAuth:true
}, },
method: 'post', method: 'post',
data: data, data: data,
description: '新增分组', description: '新增分组',
}) })
})
} }
export const changeLabelName = (data) => { export const changeLabelName = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
url: getBaseUrl(`healths/labels/`), url: getBaseUrl(`healths/labels/`),
// headers: { headers,
// "Content-Type": 'application/json'
// },
method: 'put', method: 'put',
data: data, data: data,
description: '修改分组名', description: '修改分组名',
}) })
})
} }
export const getLabelDetail = (labelId, params) => { export const getLabelDetail = (labelId, params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/labels/v2/${labelId}/patients`), url: getBaseUrl(`healths/labels/v2/${labelId}/patients`),
...@@ -179,9 +239,11 @@ export const getLabelDetail = (labelId, params) => { ...@@ -179,9 +239,11 @@ export const getLabelDetail = (labelId, params) => {
params: params, params: params,
description: '获取分组详情', description: '获取分组详情',
}) })
})
} }
export const deleteCurrentLabel = (data) => { export const deleteCurrentLabel = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/labels/`), url: getBaseUrl(`healths/labels/`),
...@@ -189,9 +251,11 @@ export const deleteCurrentLabel = (data) => { ...@@ -189,9 +251,11 @@ export const deleteCurrentLabel = (data) => {
data: data, data: data,
description: '删除分组', description: '删除分组',
}) })
})
} }
export const deleteCurrentPatients = data => { export const deleteCurrentPatients = data => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/labels/patients`), url: getBaseUrl(`healths/labels/patients`),
...@@ -199,9 +263,12 @@ export const deleteCurrentPatients = data => { ...@@ -199,9 +263,12 @@ export const deleteCurrentPatients = data => {
data: data, data: data,
description: '删除分组下的居民', description: '删除分组下的居民',
}) })
})
} }
export const saveLabelsForPatient = (labelId, data) => { export const saveLabelsForPatient = (labelId, data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/labels/v2/${labelId}/patients`), url: getBaseUrl(`healths/labels/v2/${labelId}/patients`),
...@@ -209,22 +276,29 @@ export const saveLabelsForPatient = (labelId, data) => { ...@@ -209,22 +276,29 @@ export const saveLabelsForPatient = (labelId, data) => {
data: data, data: data,
description: '分组中添加居民', description: '分组中添加居民',
}) })
})
} }
// 获取七牛上传token // 获取七牛上传token
export const getQiniuToken = (params) => { export const getQiniuToken = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`file/image/token`), url: getBaseUrl(`file/image/token`),
method: 'get', method: 'get',
params: params, params: params,
}) })
})
}; };
// 意见反馈 getSaasApiDomain // 意见反馈 getSaasApiDomain
export const submitFeedback = (data) => { export const submitFeedback = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers: { headers: {
hospitalAuth:true,
noSysCode: true, noSysCode: true,
"Content-Type": 'application/json' "Content-Type": 'application/json'
}, },
...@@ -232,18 +306,24 @@ export const submitFeedback = (data) => { ...@@ -232,18 +306,24 @@ export const submitFeedback = (data) => {
method: 'post', method: 'post',
data: data, data: data,
}) })
})
}; };
/*资料不全居民*/ /*资料不全居民*/
export const getNotCompleteList = (params) => { export const getNotCompleteList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/uncomplate/${params.pageNo}/${params.pageSize}`), url: getBaseUrl(`healths/patients/uncomplate/${params.pageNo}/${params.pageSize}`),
method: 'get', method: 'get',
description: '获取资料不全居民列表', description: '获取资料不全居民列表',
}) })
})
}; };
export const sendCompleteMessage = (data) => { export const sendCompleteMessage = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/remind`), url: getBaseUrl(`healths/patients/remind`),
...@@ -251,8 +331,11 @@ export const sendCompleteMessage = (data) => { ...@@ -251,8 +331,11 @@ export const sendCompleteMessage = (data) => {
data: data, data: data,
description: '提醒居民完善信息', description: '提醒居民完善信息',
}) })
})
}; };
export const sendCompleteMessageList = (data) => { export const sendCompleteMessageList = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/list/remind`), url: getBaseUrl(`healths/patients/list/remind`),
...@@ -260,8 +343,11 @@ export const sendCompleteMessageList = (data) => { ...@@ -260,8 +343,11 @@ export const sendCompleteMessageList = (data) => {
data: data, data: data,
description: '批量提醒居民完善信息', description: '批量提醒居民完善信息',
}) })
})
}; };
export const getNotCompleteCount = (params) => { export const getNotCompleteCount = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/uncomplate/counts`), url: getBaseUrl(`healths/patients/uncomplate/counts`),
...@@ -269,8 +355,11 @@ export const getNotCompleteCount = (params) => { ...@@ -269,8 +355,11 @@ export const getNotCompleteCount = (params) => {
params: params, params: params,
description: '获取未完善居民人数', description: '获取未完善居民人数',
}) })
})
}; };
export const getRedNum = (params) => { export const getRedNum = (params) => {
// 这个方法暂不做权限校验
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/uncompleted/last/counts`), url: getBaseUrl(`healths/patients/uncompleted/last/counts`),
...@@ -280,6 +369,7 @@ export const getRedNum = (params) => { ...@@ -280,6 +369,7 @@ export const getRedNum = (params) => {
}) })
}; };
export const getPatientDetail = (patientId) => { export const getPatientDetail = (patientId) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/${patientId}`), url: getBaseUrl(`healths/patients/${patientId}`),
...@@ -287,8 +377,11 @@ export const getPatientDetail = (patientId) => { ...@@ -287,8 +377,11 @@ export const getPatientDetail = (patientId) => {
// params: params, // params: params,
description: '获取居民详情', description: '获取居民详情',
}) })
})
}; };
export const deletePatient = (data) => { export const deletePatient = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/batch`), url: getBaseUrl(`healths/patients/batch`),
...@@ -296,8 +389,11 @@ export const deletePatient = (data) => { ...@@ -296,8 +389,11 @@ export const deletePatient = (data) => {
data: data, data: data,
description: '删除居民', description: '删除居民',
}) })
})
}; };
export const getRemindPatient = (data) => { export const getRemindPatient = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/remind`), url: getBaseUrl(`healths/patients/remind`),
...@@ -305,8 +401,11 @@ export const getRemindPatient = (data) => { ...@@ -305,8 +401,11 @@ export const getRemindPatient = (data) => {
data: data, data: data,
description: '提醒居民绑定微信', description: '提醒居民绑定微信',
}) })
})
}; };
export const savePatientInfo = (data) => { export const savePatientInfo = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/update`), url: getBaseUrl(`healths/patients/update`),
...@@ -314,8 +413,11 @@ export const savePatientInfo = (data) => { ...@@ -314,8 +413,11 @@ export const savePatientInfo = (data) => {
data: data, data: data,
description: '保存居民信息', description: '保存居民信息',
}) })
})
}; };
export const getNationsList = (params) => { export const getNationsList = (params) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`resident/constants/nations`), url: getBaseUrl(`resident/constants/nations`),
...@@ -323,8 +425,11 @@ export const getNationsList = (params) => { ...@@ -323,8 +425,11 @@ export const getNationsList = (params) => {
params: params, params: params,
description: '获取56个民族列表', description: '获取56个民族列表',
}) })
})
}; };
export const getHealthRecordList = (data) => { export const getHealthRecordList = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`followup/entering/health/records`), url: getBaseUrl(`followup/entering/health/records`),
...@@ -332,9 +437,12 @@ export const getHealthRecordList = (data) => { ...@@ -332,9 +437,12 @@ export const getHealthRecordList = (data) => {
data: data, data: data,
description: '健康档案记录列表', description: '健康档案记录列表',
}) })
})
}; };
/*新的获取居民接口,搜索条件有变化*/ /*新的获取居民接口,搜索条件有变化*/
export const getPatientInfoList = (data) => { export const getPatientInfoList = (data) => {
return utils.checkAuth(()=>{
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/v2/infolist`), url: getBaseUrl(`healths/patients/v2/infolist`),
...@@ -342,4 +450,6 @@ export const getPatientInfoList = (data) => { ...@@ -342,4 +450,6 @@ export const getPatientInfoList = (data) => {
data: data, data: data,
description: '获取居民列表', description: '获取居民列表',
}) })
})
}; };
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册