diff --git a/src/api/health/chronicDisease.js b/src/api/health/chronicDisease.js new file mode 100644 index 0000000..a0cc44c --- /dev/null +++ b/src/api/health/chronicDisease.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询慢性疾病档案列表 +export function listChronicDisease(query) { + return request({ + url: '/health/chronicDisease/list', + method: 'get', + params: query + }) +} + +// 根据成员ID查询慢性疾病档案列表 +export function listChronicDiseaseByMember(personId) { + return request({ + url: '/health/chronicDisease/listByPerson/' + personId, + method: 'get' + }) +} + +// 查询慢性疾病档案详细 +export function getChronicDisease(id) { + return request({ + url: '/health/chronicDisease/' + id, + method: 'get' + }) +} + +// 新增慢性疾病档案 +export function addChronicDisease(data) { + return request({ + url: '/health/chronicDisease', + method: 'post', + data + }) +} + +// 修改慢性疾病档案 +export function updateChronicDisease(data) { + return request({ + url: '/health/chronicDisease', + method: 'put', + data + }) +} + +// 删除慢性疾病档案 +export function delChronicDisease(id) { + return request({ + url: '/health/chronicDisease/' + id, + method: 'delete' + }) +} diff --git a/src/api/health/medicationAdherence.js b/src/api/health/medicationAdherence.js new file mode 100644 index 0000000..f8569a3 --- /dev/null +++ b/src/api/health/medicationAdherence.js @@ -0,0 +1,46 @@ +import request from '@/utils/request' + +// 获取总体依从性统计 +export function getOverallAdherence(query) { + return request({ + url: '/health/adherence/overall', + method: 'get', + params: query + }) +} + +// 获取每日依从性统计列表 +export function getDailyAdherence(query) { + return request({ + url: '/health/adherence/daily', + method: 'get', + params: query + }) +} + +// 获取日历视图数据 +export function getCalendarData(memberId, yearMonth) { + return request({ + url: '/health/adherence/calendar', + method: 'get', + params: { memberId, yearMonth } + }) +} + +// 获取各时段服药统计 +export function getTimeSlotAdherence(query) { + return request({ + url: '/health/adherence/timeSlot', + method: 'get', + params: query + }) +} + +// 获取仪表盘概览数据 +export function getDashboard(memberId) { + return request({ + url: '/health/adherence/dashboard', + method: 'get', + params: { memberId } + }) +} diff --git a/src/api/health/medicationPlan.js b/src/api/health/medicationPlan.js new file mode 100644 index 0000000..5b61079 --- /dev/null +++ b/src/api/health/medicationPlan.js @@ -0,0 +1,68 @@ +import request from '@/utils/request' + +// 查询用药计划列表 +export function listMedicationPlan(query) { + return request({ + url: '/health/medicationPlan/list', + method: 'get', + params: query + }) +} + +// 查询用药计划详细 +export function getMedicationPlan(id) { + return request({ + url: '/health/medicationPlan/' + id, + method: 'get' + }) +} + +// 新增用药计划 +export function addMedicationPlan(data) { + return request({ + url: '/health/medicationPlan', + method: 'post', + data + }) +} + +// 修改用药计划 +export function updateMedicationPlan(data) { + return request({ + url: '/health/medicationPlan', + method: 'put', + data + }) +} + +// 删除用药计划 +export function delMedicationPlan(id) { + return request({ + url: '/health/medicationPlan/' + id, + method: 'delete' + }) +} + +// 暂停用药计划 +export function pauseMedicationPlan(id) { + return request({ + url: '/health/medicationPlan/pause/' + id, + method: 'put' + }) +} + +// 恢复用药计划 +export function resumeMedicationPlan(id) { + return request({ + url: '/health/medicationPlan/resume/' + id, + method: 'put' + }) +} + +// 结束用药计划 +export function endMedicationPlan(id) { + return request({ + url: '/health/medicationPlan/end/' + id, + method: 'put' + }) +} diff --git a/src/api/health/medicationTask.js b/src/api/health/medicationTask.js new file mode 100644 index 0000000..0a2a03c --- /dev/null +++ b/src/api/health/medicationTask.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询服药任务列表 +export function listMedicationTask(query) { + return request({ + url: '/health/medicationTask/list', + method: 'get', + params: query + }) +} + +// 查询服药任务详细 +export function getMedicationTask(id) { + return request({ + url: '/health/medicationTask/' + id, + method: 'get' + }) +} + +// 删除服药任务 +export function delMedicationTask(id) { + return request({ + url: '/health/medicationTask/' + id, + method: 'delete' + }) +} + +// 确认服药 +export function confirmMedication(id, confirmType, confirmTime) { + return request({ + url: '/health/medicationTask/confirm/' + id, + method: 'put', + params: { confirmType, confirmTime } + }) +} + +// 跳过服药 +export function skipMedication(id, notes) { + return request({ + url: '/health/medicationTask/skip/' + id, + method: 'put', + params: { notes } + }) +} + +// 标记漏服 +export function markMissed(id, notes) { + return request({ + url: '/health/medicationTask/missed/' + id, + method: 'put', + params: { notes } + }) +} diff --git a/src/views/health/chronicDisease/index.vue b/src/views/health/chronicDisease/index.vue new file mode 100644 index 0000000..bff044e --- /dev/null +++ b/src/views/health/chronicDisease/index.vue @@ -0,0 +1,403 @@ + + + + 查询条件 + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + 慢性疾病档案 + + 新增 + 删除 + + + + + + + + + + + + {{ parseTime(scope.row.diagnosisDate, '{y}-{m}-{d}') }} + + + + + + {{ getStatusLabel(scope.row.diseaseStatus) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/health/medicationPlan/index.vue b/src/views/health/medicationPlan/index.vue new file mode 100644 index 0000000..a94b570 --- /dev/null +++ b/src/views/health/medicationPlan/index.vue @@ -0,0 +1,679 @@ + + + + 查询条件 + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + 用药计划 + + 新增 + 删除 + + + + + + + + + + + + + {{ scope.row.dosagePerTime }} + + + + + + + + + + + + + + {{ time }} + + + -- + + + + + {{ formatDate(scope.row.startDate) }} + + + + + {{ scope.row.endDate ? formatDate(scope.row.endDate) : '长期' }} + + + + + {{ scope.row.todayCompleted || 0 }}/{{ scope.row.todayTotal || 0 }} + -- + + + + + 开 + 关 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ time }} + + + + + + + + + + + + + + + + + 分钟 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/health/medicationStatistic/index.vue b/src/views/health/medicationStatistic/index.vue new file mode 100644 index 0000000..6b9b9a9 --- /dev/null +++ b/src/views/health/medicationStatistic/index.vue @@ -0,0 +1,555 @@ + + + + + 查询条件 + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + {{ overview.totalTasks || 0 }} + 总任务数 + + + + + + + + {{ overview.completedTasks || 0 }} + 已服药 + + + + + + + + {{ overview.missedTasks || 0 }} + 漏服 + + + + + + + + {{ overview.adherenceRate || 0 }}% + 服药率 + + + + + + + + {{ overview.ontimeRate || 0 }}% + 准时率 + + + + + + + + + 服药趋势(最近7天) + + + + + 时段分布 + + + + + + + + 日历视图 + + + 上月 + {{ currentMonth }} + 下月 + + + + + + {{ day }} + + + + {{ day.day }} + + + + {{ day.data.adherenceRate }}% + + + + + + + + + + + diff --git a/src/views/health/medicationTask/index.vue b/src/views/health/medicationTask/index.vue new file mode 100644 index 0000000..d2ac5bc --- /dev/null +++ b/src/views/health/medicationTask/index.vue @@ -0,0 +1,298 @@ + + + + 查询条件 + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + 服药任务 + + 删除 + + + + + + + + + + + + {{ formatDate(scope.row.plannedDate) }} + + + + + {{ formatTime(scope.row.plannedTime) }} + + + + + {{ scope.row.actualTime ? formatDateTime(scope.row.actualTime) : '--' }} + + + + + {{ scope.row.plannedDosage }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 确定 + + + + + + + + + + + + 取消 + 确定 + + + + + + + +