diff --git a/src/api/health/medicationPlan.js b/src/api/health/medicationPlan.js new file mode 100644 index 0000000..455b3dc --- /dev/null +++ b/src/api/health/medicationPlan.js @@ -0,0 +1,86 @@ +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' + }) +} + +// 查询成员列表 +export function listPerson(query) { + return request({ + url: '/health/person/list', + method: 'get', + params: query + }) +} + +// 查询药品列表 +export function listMedicineBasic(query) { + return request({ + url: '/health/medicineBasic/list', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/health/medicationRecord.js b/src/api/health/medicationRecord.js new file mode 100644 index 0000000..42cd863 --- /dev/null +++ b/src/api/health/medicationRecord.js @@ -0,0 +1,79 @@ +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/pages.json b/src/pages.json index 3059d24..65a2421 100644 --- a/src/pages.json +++ b/src/pages.json @@ -816,6 +816,30 @@ "style": { "navigationBarTitleText": "慢性疾病档案" } + }, + { + "path": "pages/work/health/medicationPlan/list", + "style": { + "navigationBarTitleText": "用药计划" + } + }, + { + "path": "pages/work/health/medicationPlan/details", + "style": { + "navigationBarTitleText": "用药计划详情" + } + }, + { + "path": "pages/work/health/medicationPlan/addEdit", + "style": { + "navigationBarTitleText": "用药计划" + } + }, + { + "path": "pages/work/health/medicationRecord/index", + "style": { + "navigationBarTitleText": "用药记录" + } } ], "subPackages": [ diff --git a/src/pages/work/health/medicationPlan/addEdit.vue b/src/pages/work/health/medicationPlan/addEdit.vue new file mode 100644 index 0000000..7bc8e33 --- /dev/null +++ b/src/pages/work/health/medicationPlan/addEdit.vue @@ -0,0 +1,398 @@ + + + + + \ No newline at end of file diff --git a/src/pages/work/health/medicationPlan/details.vue b/src/pages/work/health/medicationPlan/details.vue new file mode 100644 index 0000000..122daa9 --- /dev/null +++ b/src/pages/work/health/medicationPlan/details.vue @@ -0,0 +1,354 @@ + + + + + \ No newline at end of file diff --git a/src/pages/work/health/medicationPlan/list.vue b/src/pages/work/health/medicationPlan/list.vue new file mode 100644 index 0000000..c6f9f51 --- /dev/null +++ b/src/pages/work/health/medicationPlan/list.vue @@ -0,0 +1,569 @@ + + + + + \ No newline at end of file diff --git a/src/pages/work/health/medicationRecord/index.vue b/src/pages/work/health/medicationRecord/index.vue new file mode 100644 index 0000000..568bc11 --- /dev/null +++ b/src/pages/work/health/medicationRecord/index.vue @@ -0,0 +1,663 @@ + + + + + \ No newline at end of file