import { IComminList } from '../common.type';

export interface WeightControlRateByYearParams {
	clientCode: string;
	year: number;
	quarter: number;
	maxValue: number;
	minValue: number;
}

export interface WeightControlRateByYear {
	allcount: number;
	conditionCount: number;
}

export interface WeightControlRateDetailstParams {
	year: number;
	quarter?: number;
	month?: number;
	weightControlRateDetailsCondition: {
		page: number;
		size: number;
		clientCode: string;
		maxValue: number;
		minValue: number;
	};
}

export interface WeightControlRateDetail {
	age: string;
	code: string;
	patientGender: number;
	patientName: string;
}

export interface IGetKtvAndUrrListByCondition {
	page: number;
	size: number;
	clientCode: string;
	startTime: string;
	endTime: string;
	patientName: string;
	patientCodes: string[];
}

export interface ItKtvAndUrrListByCondition {
	code: string; //数据代码
	dataKtv: number; //KTV
	dataMedPeriod: number; //透析时间(小时)
	dataNiaosu1: number; //透前尿素
	dataNiaosu2: number; //透后尿素
	dataUrr: number; //URR
	dataWeight1: number; //透前体重
	dataWeight2: number; //透后体重
	id: number; //记录ID
	patientCode: string; //患者编号
	patientName: string; //患者姓名
	recordCode: string; //透析单
	sampleDate: string; //采样日期
}


export interface IPatientDialysisFrequencyCountParams {
	page: number;
	size: number;
	clientCode: string;
	patientCodes: string[];
	scheduleTimeSlots: string[];
	recordsStatus: string;
	startTime: string;
	endTime: string;
}


export interface IPatientDialysisFrequencyCount {
	allCount: string;
	patientCode: string;
	patientName: string;
	typeCounts: IPatientDialysisFrequencyCountTypeCount[];
}

export interface IPatientDialysisFrequencyCountTypeCount {
	schemeName: string;
	typeCount: string;
}


export interface IPatientDialysisFrequencyCountRes extends Omit<IComminList, 'list'> {
    list: IPatientDialysisFrequencyCount[];
}

export interface IWypertensionStatisticsParams {
    clientCode: string;
    beginTime: string;
    endTime: string;
}

export interface IQualityControlReportLisResults {
	client_code: string;
	item_name: string;
	item_result: string;
	item_result_flag: string;
	item_result_ref: string;
	item_result_unit: string;
	patient_name: string;
	sample_date: string;
	sample_date_str: string;
	最新报告日期: string;
}


export interface IWypertensionStatistics {
    大于60岁患者: IWypertensionStatisticsObj;
    小于等于60岁患者: IWypertensionStatisticsObj;
    没有年龄的患者: IWypertensionStatisticsItem[];
    透析总人数: number;
}

export interface IWypertensionStatisticsItem {
    patientCode: string;
    patientName: string;
    preMbpH: string;
    preMbpL: string;
    signTime: string;
}

export interface IWypertensionStatisticsObj {
    count: number;
    eligiblePatientCount: number;
    eligiblePatients: IWypertensionStatisticsItem[];
    noEligiblePatientCount: number;
    noEligiblePatients: IWypertensionStatisticsItem[];
}

export interface IQualityControlReportParams {
    clientCode: string;
    beginTime: string;
    endTime: string;
    page: number;
    size: number;
	systemItemNames: string;
}

export interface IQualityControlReport {
    accessFirstUseDate: string;
    age: number;
    code: string;
    dictText: string;
    patientDiagnose: string;
    patientName: string;
    sex: string;
    survivalTime: string;
	lisResults: IQualityControlReportLisResults[];
}

export interface IQualityControlReportReponse {
    total: number;
    list: IQualityControlReport[];
    [key: string]: any;
}