@@ -24,6 +24,11 @@ public List<PerReport> GetAvgPerfor(int hospitalid)
returnDapperQuery(sql,new{hospitalid}).ToList();
}
/// <summary>
/// 人群绩效比
/// </summary>
/// <param name="hospitalid"></param>
/// <returns></returns>
publicList<PerReport>AvgRatio(inthospitalid)
{
stringsql=@"select concat(allot.year,'-',lpad(allot.month,2,'0')) x, bc.PositionName y,round(bc.AvgValue / rbn.AvgValue,2) value
...
...
@@ -32,5 +37,45 @@ public List<PerReport> AvgRatio(int hospitalid)
order by str_to_date(concat(allot.month, '/', allot.year),'%m/%Y');";
returnDapperQuery(sql,new{hospitalid}).ToList();
}
/// <summary>
/// 门诊患者均次费用
/// </summary>
/// <returns></returns>
publicList<PerReport>OutFeeAvg()
{
stringsql=@"select concat(year,'-',lpad(month,2,'0')) x,deptname y,sum(fee) / sum(persontime) value from hos_personfee where source = '门诊' group by year,month,deptname;";
returnDapperQuery(sql,null).ToList();
}
/// <summary>
/// 住院患者均次费用
/// </summary>
/// <returns></returns>
publicList<PerReport>InpatFeeAvg()
{
stringsql=@"select concat(year,'-',lpad(month,2,'0')) x,deptname y,sum(fee) / sum(persontime) value from hos_personfee where source = '住院' group by year,month,deptname;";
returnDapperQuery(sql,null).ToList();
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
publicList<PerReport>Medicine()
{
stringsql=@"select concat(year,'-',lpad(month,2,'0')) x,deptname y,sum(if(category in ('中成药','西药','中草药'),fee,0)) / sum(fee) value from hos_personfee group by year,month,deptname;";
returnDapperQuery(sql,null).ToList();
}
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
publicList<PerReport>Income()
{
stringsql=@"select concat(year,'-',lpad(month,2,'0')) x,deptname y,sum(if(category not in ('中成药','西药','中草药','医材费'),fee,0)) / sum(fee) value from hos_personfee group by year,month,deptname;";