import request from '$project/utils/request'
import Qs from 'qs';

//获取长者信息
export function getElderInfo(params) {
	return request({
		url: '/mobile/medicalRecordsApi/getElderInfo',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取就医档案
export function medicalPersonDetail(id) {
	return request({
		url: '/mobile/medicalRecordsApi/medicalPersonDetail/'+id,
		//data: Qs.stringify(params),
		method: 'get',
	})
}
//就医档案保存
export function medicalPersonSave(params) {

	  return request.post('/mobile/medicalRecordsApi/medicalPersonSave', params,{
            headers: {
                "Content-Type": "application/json"
            }

        });
}
//就医记录列表
export function pageList(params) {
	return request({
		url: '/mobile/medicalRecordsApi/pageList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//添加就医记录
export function medicalRecordAdd(params) {
	return request.post('/mobile/medicalRecordsApi/medicalRecordAdd', params,{
                headers: {
                    "Content-Type": "application/json"
                }

            });
}
//就医记录详情
export function medicalRecordDetail(id) {
	return request({
		url: '/mobile/medicalRecordsApi/medicalRecordDetail/'+id,
 		method: 'get',
	})
}
//更新就医记录
export function medicalRecordUpdate(params) {
	return request.post('/mobile/medicalRecordsApi/medicalRecordUpdate', params,{
                headers: {
                    "Content-Type": "application/json"
                }

            });
}