|
@@ -7,25 +7,26 @@ import cn.hnthyy.thmz.entity.MzException;
|
|
|
//import cn.hnthyy.thmz.entity.his.YjJcPatient;
|
|
|
import cn.hnthyy.thmz.entity.his.YjJcRecord;
|
|
|
import cn.hnthyy.thmz.entity.his.YjJcRecordReport;
|
|
|
-import cn.hnthyy.thmz.entity.his.mz.Employee;
|
|
|
-import cn.hnthyy.thmz.entity.his.mz.JcJyItemCharge;
|
|
|
+import cn.hnthyy.thmz.entity.his.mz.*;
|
|
|
import cn.hnthyy.thmz.entity.his.yz.YzOrderOccurence;
|
|
|
import cn.hnthyy.thmz.entity.his.zd.JcZdItem;
|
|
|
import cn.hnthyy.thmz.entity.his.zd.JyZdItem;
|
|
|
-import cn.hnthyy.thmz.entity.his.mz.MzYjReq;
|
|
|
import cn.hnthyy.thmz.entity.his.zd.ZdChargeItem;
|
|
|
import cn.hnthyy.thmz.entity.jy.InspectionsIndex;
|
|
|
+import cn.hnthyy.thmz.enums.GenderEnum;
|
|
|
import cn.hnthyy.thmz.enums.ReqTypeEnum;
|
|
|
import cn.hnthyy.thmz.enums.YesNoEnum;
|
|
|
import cn.hnthyy.thmz.mapper.his.YjJcPatientMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.YjJcRecordMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.YjJcRecordReportMapper;
|
|
|
+import cn.hnthyy.thmz.mapper.his.mz.MzPatientMiMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.yz.YzOrderOccurenceMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.zd.JcJyItemChargeMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.mz.MzYjReqMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.zd.JcZdItemMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.zd.JyZdItemMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.zd.ZdChargeItemMapper;
|
|
|
+import cn.hnthyy.thmz.service.his.RegionService;
|
|
|
import cn.hnthyy.thmz.service.his.jy.InspectionsService;
|
|
|
import cn.hnthyy.thmz.service.his.mz.EmployeeService;
|
|
|
import cn.hnthyy.thmz.service.his.zd.JcJyItemChargeService;
|
|
@@ -75,6 +76,9 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
|
|
|
@SuppressWarnings("all")
|
|
|
@Autowired
|
|
|
private JyZdItemMapper jyZdItemMapper;
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ @Autowired
|
|
|
+ private MzPatientMiMapper mzPatientMiMapper;
|
|
|
@Autowired
|
|
|
private ZdUnitCodeService zdUnitCodeService;
|
|
|
// @Autowired
|
|
@@ -85,6 +89,8 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
|
|
|
private InspectionsService inspectionsService;
|
|
|
@Autowired
|
|
|
private JyReportService jyReportService;
|
|
|
+ @Autowired
|
|
|
+ private RegionService regionService;
|
|
|
// @Override
|
|
|
// public List<JcJyItemCharge> queryJcItemChargeByCode(String code, String reqType) {
|
|
|
// return jcJyItemChargeMapper.selectJcItemChargeByCode(code, reqType, ReqTypeEnum.JIAN_CHA.code.equals(reqType) ? "jc_item_charge" : "jy_item_charge");
|
|
@@ -438,4 +444,33 @@ public class JcJyItemChargeServiceImpl implements JcJyItemChargeService {
|
|
|
public String queryJcIdFromYjJcPatient(String patientId) {
|
|
|
return mzYjReqMapper.selectJcIdFromYjJcPatient(patientId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Map<String, Object>> interfaceHisLisMz(String patientId, String printJy, String beninTime, String endTime) throws MzException {
|
|
|
+ List<Map<String, Object>> data=mzYjReqMapper.selectInterfaceHisLisMz(patientId,printJy,beninTime,endTime);
|
|
|
+ if(data==null || data.size()==0){
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ MzPatientMi mzPatientMi=mzPatientMiMapper.selectByPatientId(patientId);
|
|
|
+ if(mzPatientMi==null){
|
|
|
+ throw new MzException("患者Id没有查询到对应的患者信息!");
|
|
|
+ }
|
|
|
+ Map<String, String> regionMap=regionService.queryAll().stream().collect(Collectors.toMap(CodeNameEntity::getCode, CodeNameEntity::getName));
|
|
|
+ mzPatientMi.setFullAddress(regionMap,new StringBuffer());
|
|
|
+ Map<String,Object> ageAndUnit=DateUtil.getAgeAndUnit(mzPatientMi.getBirthDay());
|
|
|
+ for(Map<String, Object> map:data){
|
|
|
+ map.put("id_card",mzPatientMi.getSocialNo());
|
|
|
+ map.put("ic_card",mzPatientMi.getIcCardNo());
|
|
|
+ if(ageAndUnit!=null && ageAndUnit.size()>0){
|
|
|
+ map.put("ptnt_age",ageAndUnit.get("age"));
|
|
|
+ map.put("ptnt_age_unit",ageAndUnit.get("ageUnit"));
|
|
|
+ }
|
|
|
+ map.put("ptnt_sex",mzPatientMi.getSex()==null? GenderEnum.UNKNOWN:mzPatientMi.getSex());
|
|
|
+ map.put("src_ptnt_sex",mzPatientMi.getSex()==null? GenderEnum.UNKNOWN:mzPatientMi.getSex());
|
|
|
+ map.put("ctat_addr",mzPatientMi.getAddress());
|
|
|
+ map.put("phone_num",mzPatientMi.getPhoneNo());
|
|
|
+ map.put("ptnt_birth",mzPatientMi.getBirthDay());
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ }
|
|
|
}
|