|
@@ -969,18 +969,15 @@ public class StandardReportServiceImpl implements StandardReportService {
|
|
|
return medServiceCostDetailList;
|
|
return medServiceCostDetailList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 获取医院病种成本明细表数据
|
|
|
|
|
- *
|
|
|
|
|
- * @return 病种成本明细列表
|
|
|
|
|
- */
|
|
|
|
|
- @Override
|
|
|
|
|
- public List<DiseaseCostDetailVO> getDiseaseCostDetail(String computeDate) {
|
|
|
|
|
- List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostDetailList(computeDate);
|
|
|
|
|
- if(CollectionUtils.isEmpty(projectCostAccountList)){
|
|
|
|
|
- throw new CostException("请先计算患者成本");
|
|
|
|
|
|
|
+ public List<DiseaseCostDetailVO> getDiseaseCostDetail(String computeDate, String diseaseFilter) {
|
|
|
|
|
+ List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostDetailList(computeDate,diseaseFilter);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(projectCostAccountList)) {
|
|
|
|
|
+ throw new CostException("找不到满足条件的数据");
|
|
|
}
|
|
}
|
|
|
|
|
+ return getDiseaseCostDetail( computeDate,projectCostAccountList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public List<DiseaseCostDetailVO> getDiseaseCostDetail(String computeDate, List<DiseaseCostDetailVO> projectCostAccountList){
|
|
|
// 获取所有的标准字典数据
|
|
// 获取所有的标准字典数据
|
|
|
StandCostDictMapVO standCostDictMaps = getStandCostDictMaps();
|
|
StandCostDictMapVO standCostDictMaps = getStandCostDictMaps();
|
|
|
// 记录项目类别对象
|
|
// 记录项目类别对象
|
|
@@ -1034,17 +1031,29 @@ public class StandardReportServiceImpl implements StandardReportService {
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取病种成本构成明细表数据
|
|
|
|
|
|
|
+ * 获取医院病种成本明细表数据
|
|
|
*
|
|
*
|
|
|
- * @return 病种成本明细列表,包含各病种的成本明细及总计行
|
|
|
|
|
|
|
+ * @return 病种成本明细列表
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate) {
|
|
|
|
|
-
|
|
|
|
|
- List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostCompositionDetail(computeDate);
|
|
|
|
|
|
|
+ public List<DiseaseCostDetailVO> getDiseaseCostDetail(String computeDate) {
|
|
|
|
|
+ List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostDetailList(computeDate,null);
|
|
|
if(CollectionUtils.isEmpty(projectCostAccountList)){
|
|
if(CollectionUtils.isEmpty(projectCostAccountList)){
|
|
|
throw new CostException("请先计算患者成本");
|
|
throw new CostException("请先计算患者成本");
|
|
|
}
|
|
}
|
|
|
|
|
+ return getDiseaseCostDetail( computeDate,projectCostAccountList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate, String diseaseFilter) {
|
|
|
|
|
+
|
|
|
|
|
+ List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostCompositionDetail(computeDate, diseaseFilter);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(projectCostAccountList)) {
|
|
|
|
|
+ throw new CostException("找不到满足条件的数据");
|
|
|
|
|
+ }
|
|
|
|
|
+ return getDiseaseCostCompositionDetail(computeDate,projectCostAccountList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate, List<DiseaseCostDetailVO> projectCostAccountList) {
|
|
|
// 记录项目类别对象
|
|
// 记录项目类别对象
|
|
|
Map<String, DiseaseCostDetailVO> diseaseCostMap = new HashMap<>();
|
|
Map<String, DiseaseCostDetailVO> diseaseCostMap = new HashMap<>();
|
|
|
for (DiseaseCostDetailVO projectCostAccount : projectCostAccountList) {
|
|
for (DiseaseCostDetailVO projectCostAccount : projectCostAccountList) {
|
|
@@ -1070,20 +1079,35 @@ public class StandardReportServiceImpl implements StandardReportService {
|
|
|
List<DiseaseCostDetailVO> diseaseCostDetailList =new ArrayList<>(diseaseCostMap.values());
|
|
List<DiseaseCostDetailVO> diseaseCostDetailList =new ArrayList<>(diseaseCostMap.values());
|
|
|
//按会计科目类型计算占比
|
|
//按会计科目类型计算占比
|
|
|
diseaseCostDetailList.forEach(vo -> setAccountTypeExpenseRatio(vo));
|
|
diseaseCostDetailList.forEach(vo -> setAccountTypeExpenseRatio(vo));
|
|
|
|
|
+ diseaseCostDetailList.sort(Comparator.comparing(DiseaseCostDetailVO::getItemCode));
|
|
|
return diseaseCostDetailList;
|
|
return diseaseCostDetailList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
- * 获取服务单元病种成本构成明细表数据
|
|
|
|
|
- * @param computeDate
|
|
|
|
|
- * @return
|
|
|
|
|
|
|
+ * 获取病种成本构成明细表数据
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return 病种成本明细列表,包含各病种的成本明细及总计行
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public StandardDeptCostCollectResponse getDeptDiseaseCostCompositionDetail(String computeDate) {
|
|
|
|
|
- List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDeptDiseaseCostCompositionDetail(computeDate);
|
|
|
|
|
|
|
+ public List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate) {
|
|
|
|
|
+
|
|
|
|
|
+ List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostCompositionDetail(computeDate,null);
|
|
|
if(CollectionUtils.isEmpty(projectCostAccountList)){
|
|
if(CollectionUtils.isEmpty(projectCostAccountList)){
|
|
|
throw new CostException("请先计算患者成本");
|
|
throw new CostException("请先计算患者成本");
|
|
|
}
|
|
}
|
|
|
|
|
+ return getDiseaseCostCompositionDetail(computeDate,projectCostAccountList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public StandardDeptCostCollectResponse getDeptDiseaseCostCompositionDetail(String computeDate, String diseaseFilter) {
|
|
|
|
|
+ List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDeptDiseaseCostCompositionDetail(computeDate,diseaseFilter);
|
|
|
|
|
+ if(CollectionUtils.isEmpty(projectCostAccountList)){
|
|
|
|
|
+ throw new CostException("找不到满足条件的数据");
|
|
|
|
|
+ }
|
|
|
|
|
+ return getDeptDiseaseCostCompositionDetail( computeDate,projectCostAccountList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public StandardDeptCostCollectResponse getDeptDiseaseCostCompositionDetail(String computeDate,List<DiseaseCostDetailVO> projectCostAccountList) {
|
|
|
//科室责任中心对照数据
|
|
//科室责任中心对照数据
|
|
|
List<ResponsibilityDepartIdVO> responsibilityDepartment = responsibilityDepartmentRepository.getResponsibility(UserContext.getHospId());
|
|
List<ResponsibilityDepartIdVO> responsibilityDepartment = responsibilityDepartmentRepository.getResponsibility(UserContext.getHospId());
|
|
|
Map<String, List<ResponsibilityDepartIdVO>> deptRespMap = responsibilityDepartment.stream()
|
|
Map<String, List<ResponsibilityDepartIdVO>> deptRespMap = responsibilityDepartment.stream()
|
|
@@ -1183,6 +1207,20 @@ public class StandardReportServiceImpl implements StandardReportService {
|
|
|
return response;
|
|
return response;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取服务单元病种成本构成明细表数据
|
|
|
|
|
+ * @param computeDate
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public StandardDeptCostCollectResponse getDeptDiseaseCostCompositionDetail(String computeDate) {
|
|
|
|
|
+ List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDeptDiseaseCostCompositionDetail(computeDate,null);
|
|
|
|
|
+ if(CollectionUtils.isEmpty(projectCostAccountList)){
|
|
|
|
|
+ throw new CostException("请先计算患者成本");
|
|
|
|
|
+ }
|
|
|
|
|
+ return getDeptDiseaseCostCompositionDetail( computeDate,projectCostAccountList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取医院DRG成本明细表数据
|
|
* 获取医院DRG成本明细表数据
|
|
|
*
|
|
*
|
|
@@ -2358,9 +2396,14 @@ public class StandardReportServiceImpl implements StandardReportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public Object getDiseaseCostDetailByPage(Integer current, Integer pageSize, String computeDate) {
|
|
|
|
|
|
|
+ public Object getDiseaseCostDetailByPage(Integer current, Integer pageSize, String computeDate, String diseaseFilter) {
|
|
|
// 获取完整数据列表
|
|
// 获取完整数据列表
|
|
|
- List<DiseaseCostDetailVO> fullList = getDiseaseCostDetail(computeDate);
|
|
|
|
|
|
|
+ List<DiseaseCostDetailVO> fullList;
|
|
|
|
|
+ if (StringUtils.isEmpty(diseaseFilter)) {
|
|
|
|
|
+ fullList = getDiseaseCostDetail(computeDate);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fullList = getDiseaseCostDetail(computeDate, diseaseFilter);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 手动分页
|
|
// 手动分页
|
|
|
int total = fullList.size();
|
|
int total = fullList.size();
|
|
@@ -2377,10 +2420,14 @@ public class StandardReportServiceImpl implements StandardReportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public Object getDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate) {
|
|
|
|
|
|
|
+ public Object getDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate, String diseaseFilter) {
|
|
|
// 获取完整数据列表
|
|
// 获取完整数据列表
|
|
|
- List<DiseaseCostDetailVO> fullList = getDiseaseCostCompositionDetail(computeDate);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ List<DiseaseCostDetailVO> fullList ;
|
|
|
|
|
+ if (StringUtils.isEmpty(diseaseFilter)) {
|
|
|
|
|
+ fullList = getDiseaseCostCompositionDetail(computeDate);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fullList = getDiseaseCostCompositionDetail(computeDate,diseaseFilter);
|
|
|
|
|
+ }
|
|
|
// 手动分页
|
|
// 手动分页
|
|
|
int total = fullList.size();
|
|
int total = fullList.size();
|
|
|
int startIndex = (current - 1) * pageSize;
|
|
int startIndex = (current - 1) * pageSize;
|
|
@@ -2396,10 +2443,14 @@ public class StandardReportServiceImpl implements StandardReportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public Object getDeptDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate) {
|
|
|
|
|
|
|
+ public Object getDeptDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate, String diseaseFilter) {
|
|
|
// 获取完整数据
|
|
// 获取完整数据
|
|
|
- StandardDeptCostCollectResponse fullData = getDeptDiseaseCostCompositionDetail(computeDate);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ StandardDeptCostCollectResponse fullData ;
|
|
|
|
|
+ if (StringUtils.isEmpty(diseaseFilter)) {
|
|
|
|
|
+ fullData = getDeptDiseaseCostCompositionDetail(computeDate);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fullData = getDeptDiseaseCostCompositionDetail(computeDate,diseaseFilter);
|
|
|
|
|
+ }
|
|
|
// 对数据进行分页
|
|
// 对数据进行分页
|
|
|
List<StandardReportFormCustomVo> fullList = fullData.getData();
|
|
List<StandardReportFormCustomVo> fullList = fullData.getData();
|
|
|
int total = fullList.size();
|
|
int total = fullList.size();
|