diff --git a/src/api/health/medicationAdherence.js b/src/api/health/medicationAdherence.js index 0a637b9..e0ae9c0 100644 --- a/src/api/health/medicationAdherence.js +++ b/src/api/health/medicationAdherence.js @@ -19,11 +19,11 @@ export function getDailyAdherence(query) { } // 获取日历视图数据 -export function getCalendarData(personId, yearMonth) { +export function getCalendarData(memberId, yearMonth) { return request({ url: '/health/adherence/calendar', method: 'get', - params: { personId, yearMonth } + params: { memberId, yearMonth } }) } @@ -36,38 +36,11 @@ export function getTimeSlotAdherence(query) { }) } -// 获取各药品依从性统计 -export function getMedicineAdherence(query) { - return request({ - url: '/health/adherence/medicine', - method: 'get', - params: query - }) -} - -// 获取各人员依从性统计 -export function getPersonAdherence(query) { - return request({ - url: '/health/adherence/person', - method: 'get', - params: query - }) -} - -// 获取漏服原因统计 -export function getMissedReasonStats(query) { - return request({ - url: '/health/adherence/missedReason', - method: 'get', - params: query - }) -} - // 获取仪表盘概览数据 -export function getDashboard(personId) { +export function getDashboard(memberId) { return request({ url: '/health/adherence/dashboard', method: 'get', - params: { personId } + params: { memberId } }) } \ No newline at end of file diff --git a/src/api/health/medicationRecord.js b/src/api/health/medicationRecord.js deleted file mode 100644 index 42cd863..0000000 --- a/src/api/health/medicationRecord.js +++ /dev/null @@ -1,79 +0,0 @@ -import request from '@/utils/request' - -// 查询用药记录列表 -export function listMedicationRecord(query) { - return request({ - url: '/health/medicationRecord/list', - method: 'get', - params: query - }) -} - -// 查询今日用药记录 -export function getTodayRecords(personId) { - return request({ - url: '/health/medicationRecord/today', - method: 'get', - params: { personId } - }) -} - -// 查询某计划某天的用药记录 -export function getRecordsByPlanAndDate(planId, date) { - return request({ - url: '/health/medicationRecord/plan/' + planId + '/date/' + date, - method: 'get' - }) -} - -// 查询用药记录详细 -export function getMedicationRecord(id) { - return request({ - url: '/health/medicationRecord/' + id, - method: 'get' - }) -} - -// 新增用药记录 -export function addMedicationRecord(data) { - return request({ - url: '/health/medicationRecord', - method: 'post', - data - }) -} - -// 修改用药记录 -export function updateMedicationRecord(data) { - return request({ - url: '/health/medicationRecord', - method: 'put', - data - }) -} - -// 删除用药记录 -export function delMedicationRecord(id) { - return request({ - url: '/health/medicationRecord/' + id, - method: 'delete' - }) -} - -// 服药(标记为已服用) -export function takeMedication(id, dosage, remark) { - return request({ - url: '/health/medicationRecord/take/' + id, - method: 'put', - params: { dosage, remark } - }) -} - -// 跳过服药 -export function skipMedication(id, remark) { - return request({ - url: '/health/medicationRecord/skip/' + id, - method: 'put', - params: { remark } - }) -} \ No newline at end of file diff --git a/src/api/health/medicationTask.js b/src/api/health/medicationTask.js new file mode 100644 index 0000000..15dcbc0 --- /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) { + return request({ + url: '/health/medicationTask/confirm/' + id, + method: 'put', + params: { confirmType } + }) +} + +// 跳过服药 +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 } + }) +} \ No newline at end of file diff --git a/src/views/health/medicationRecord/index.vue b/src/views/health/medicationRecord/index.vue deleted file mode 100644 index f039be2..0000000 --- a/src/views/health/medicationRecord/index.vue +++ /dev/null @@ -1,356 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/health/medicationTask/index.vue b/src/views/health/medicationTask/index.vue new file mode 100644 index 0000000..ad81778 --- /dev/null +++ b/src/views/health/medicationTask/index.vue @@ -0,0 +1,255 @@ + + + + + \ No newline at end of file