import request from '@/utils/request'
import Qs from 'qs';

//提交用药提醒
export function submitMedicationRemind(params) {
	return request({
		url: '/mobile/personInfoApi/submitMedicationRemind',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取用药提醒日历
export function medicationCalendar(id) {
	return request({
		url: '/mobile/personInfoApi/medicationCalendar',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}

//获取用药计划
export function medicationList() {
	return request({
		url: '/mobile/personInfoApi/medicationList',
		data: Qs.stringify({}),
		method: 'post',
	})
}

//获取用药详情
export function medicationDetail(id) {
	return request({
		url: '/mobile/personInfoApi/medicationDetail',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}

//用药删除
export function medicationDelete(id) {
	return request({
		url: '/mobile/personInfoApi/medicationDelete',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}

//用药切换
export function medicationRemindSwitch(params) {
	return request({
		url: '/mobile/personInfoApi/medicationRemindSwitch',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//新增确认
export function medicationCalendarDefine(id) {
	return request({
		url: '/mobile/personInfoApi/medicationCalendarDefine',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}
