import request from "@/api/request.js"

// 获取体检日期
export function getPhysicalTime(identity) {
	return request({
		url: `/applet/followup/fetch/record/${identity}`,
		method: 'get',
		header: {
			region: uni.getStorageSync('region'),
		}
	})
}
// 获取随访日期
export function getVisitTime(phType, identity) {
	return request({
		url: `/applet/followup/dateList/${phType}/${identity}`,
		method: 'get',
		header: {
			region: uni.getStorageSync('region'),
		}
	})
}

// 获取个人基本信息
export function getUserInfo(identity) {
	return request({
		url: `/applet/signinfo/archive/${identity}`,
		method: 'get',
		header: {
			region: uni.getStorageSync('region')
		}
	})
}

// 获取体检详情
export function getPhysicalDetail(identity, id) {
	return request({
		url: `/applet/followup/fetch/detail/${identity}/${id}`,
		method: 'get',
		header: {
			region: uni.getStorageSync('region')
		}
	})
}
// 获取随访详情
export function getVisitDetail(phType, identity, id) {
	return request({
		url: `/applet/followup/detail/${phType}/${identity}/${id}`,
		method: 'get',
		header: {
			region: uni.getStorageSync('region')
		}
	})
}

// 获取复诊记录时间轴
export function getSubsequentVisitTime(identity) {
	return request({
		url: `/applet/performance/timelineList/${identity}`,
		method: 'get',
		header: {
			region: uni.getStorageSync('region'),
		}
	})
}

// 获取复诊记录详情
export function getSubsequentVisitDetail(perRecordId) {
	return request({
		url: `/applet/performance/getDetail/${perRecordId}`,
		method: 'get',
		header: {
			region: uni.getStorageSync('region')
		}
	})
}