|
@ -1879,7 +1879,10 @@ public class YkyyEntranceService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS = new ArrayList<>();
|
|
|
|
System.out.println(wlyyPrescriptionInfoVOS.get(0).getHisCode());
|
|
|
|
}
|
|
|
|
|
|
public String findByRealOrder(String code,boolean demoFlag) throws Exception {
|
|
public String findByRealOrder(String code,boolean demoFlag) throws Exception {
|
|
List<WlyyPrescriptionDO> wlyyPrescriptionDOs = prescriptionDao.findById(code);
|
|
List<WlyyPrescriptionDO> wlyyPrescriptionDOs = prescriptionDao.findById(code);
|
|
@ -1897,8 +1900,13 @@ public class YkyyEntranceService {
|
|
}
|
|
}
|
|
//诊断
|
|
//诊断
|
|
synPrescriptionDiagnosis(prescriptionVO,code,demoFlag);
|
|
synPrescriptionDiagnosis(prescriptionVO,code,demoFlag);
|
|
|
|
if (wlyyPrescriptionInfoVOS!=null&&wlyyPrescriptionInfoVOS.size()>0){
|
|
|
|
prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
|
|
|
|
}else {
|
|
|
|
System.out.println("=====setInfoVOs");
|
|
|
|
prescriptionVO.setInfoVOs(null);
|
|
|
|
}
|
|
|
|
|
|
prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
|
|
|
|
|
|
|
|
List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(code,1);
|
|
List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(code,1);
|
|
synPrecriptionHis(prescriptionVO,code);
|
|
synPrecriptionHis(prescriptionVO,code);
|
|
@ -1942,13 +1950,13 @@ public class YkyyEntranceService {
|
|
for (WlyyInspectionDO wlyyInspectionDO:inspectionDOS){
|
|
for (WlyyInspectionDO wlyyInspectionDO:inspectionDOS){
|
|
YkEmrJcsqDO ykEmrJcsqDO = new YkEmrJcsqDO();
|
|
YkEmrJcsqDO ykEmrJcsqDO = new YkEmrJcsqDO();
|
|
System.out.println("jcjy=="+wlyyInspectionDO.getOutpatientId());
|
|
System.out.println("jcjy=="+wlyyInspectionDO.getOutpatientId());
|
|
ykEmrJcsqDO.setJzhm(registNo);
|
|
|
|
|
|
//ykEmrJcsqDO.setJzhm(registNo);
|
|
if (StringUtils.isNotEmpty(admNo)){
|
|
if (StringUtils.isNotEmpty(admNo)){
|
|
System.out.println("admno=="+admNo);
|
|
System.out.println("admno=="+admNo);
|
|
ykEmrJcsqDO.setJzxh(Integer.parseInt(admNo));
|
|
ykEmrJcsqDO.setJzxh(Integer.parseInt(admNo));
|
|
}
|
|
}
|
|
ykEmrJcsqDO.setXmid(Integer.valueOf(wlyyInspectionDO.getCode()));
|
|
ykEmrJcsqDO.setXmid(Integer.valueOf(wlyyInspectionDO.getCode()));
|
|
JSONArray jsonArray = this.findZlxm(null,wlyyInspectionDO.getCode(),"");
|
|
|
|
|
|
JSONArray jsonArray = this.findZlxm(null,wlyyInspectionDO.getCode(),"","","");
|
|
if (jsonArray!=null&&jsonArray.size()>0){
|
|
if (jsonArray!=null&&jsonArray.size()>0){
|
|
JSONObject deptobject = jsonArray.getJSONObject(0);
|
|
JSONObject deptobject = jsonArray.getJSONObject(0);
|
|
deptNo = deptobject.getString("dept");
|
|
deptNo = deptobject.getString("dept");
|
|
@ -1961,6 +1969,7 @@ public class YkyyEntranceService {
|
|
ykEmrJcsqDO.setXmdw(wlyyInspectionDO.getTotalUnit());
|
|
ykEmrJcsqDO.setXmdw(wlyyInspectionDO.getTotalUnit());
|
|
ykEmrJcsqDO.setKdsj(new Date());
|
|
ykEmrJcsqDO.setKdsj(new Date());
|
|
ykEmrJcsqDOS.add(ykEmrJcsqDO);
|
|
ykEmrJcsqDOS.add(ykEmrJcsqDO);
|
|
|
|
|
|
}
|
|
}
|
|
//同步his
|
|
//同步his
|
|
logger.info("开始同步检查检验");
|
|
logger.info("开始同步检查检验");
|
|
@ -2591,7 +2600,7 @@ public class YkyyEntranceService {
|
|
public WlyyPrescriptionVO synPrecriptionHis(WlyyPrescriptionVO wlyyPrescriptionVO,String code) throws Exception {
|
|
public WlyyPrescriptionVO synPrecriptionHis(WlyyPrescriptionVO wlyyPrescriptionVO,String code) throws Exception {
|
|
HlwCf01DO hlwCf01DO = new HlwCf01DO();
|
|
HlwCf01DO hlwCf01DO = new HlwCf01DO();
|
|
logger.info("开始===================");
|
|
logger.info("开始===================");
|
|
if (wlyyPrescriptionVO!=null){
|
|
|
|
|
|
if (wlyyPrescriptionVO!=null&&wlyyPrescriptionVO.getInfoVOs()!=null){
|
|
try {
|
|
try {
|
|
hlwCf01DO.setSPZT(0);
|
|
hlwCf01DO.setSPZT(0);
|
|
hlwCf01DO.setFKZT(wlyyPrescriptionVO.getPayStatus());
|
|
hlwCf01DO.setFKZT(wlyyPrescriptionVO.getPayStatus());
|
|
@ -2939,15 +2948,21 @@ public class YkyyEntranceService {
|
|
|
|
|
|
}
|
|
}
|
|
//查询诊疗项目视图
|
|
//查询诊疗项目视图
|
|
public JSONArray findZlxm(String itemName,String itemCode,String deptCode) throws Exception{
|
|
|
|
|
|
public JSONArray findZlxm(String itemName,String itemCode,String deptCode,String yqdm,String pyCode) throws Exception{
|
|
String sql = "select t.item_code as \"code\",t.item_name as \"name\"," +
|
|
String sql = "select t.item_code as \"code\",t.item_name as \"name\"," +
|
|
"t.price as \"chargeAmount\",t.total_unit as \"totalUnit\"," +
|
|
"t.price as \"chargeAmount\",t.total_unit as \"totalUnit\"," +
|
|
"t.zxks as \"dept\" ,m.name as \"exec_unit_name\" from VEMR_ORDER_ITEM t " +
|
|
|
|
|
|
"t.zxks as \"dept\" ,t.yqdm as \"yqdm\" ,m.name as \"exec_unit_name\" from VEMR_ORDER_ITEM t " +
|
|
" left join V_HLW_KSXX m on m.code = t.zxks " +
|
|
" left join V_HLW_KSXX m on m.code = t.zxks " +
|
|
" where 1=1";
|
|
" where 1=1";
|
|
if (StringUtils.isNotEmpty(itemName)){
|
|
if (StringUtils.isNotEmpty(itemName)){
|
|
sql+=" and t.ITEM_NAME like '%"+itemName+"%'";
|
|
sql+=" and t.ITEM_NAME like '%"+itemName+"%'";
|
|
}
|
|
}
|
|
|
|
if (StringUtils.isNotEmpty(yqdm)){
|
|
|
|
sql+=" and t.yqdm = '"+yqdm+"'";
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(pyCode)){
|
|
|
|
sql+=" and lower(t.kb_code) like '%"+pyCode.toLowerCase()+"%'";
|
|
|
|
}
|
|
if (StringUtils.isNotEmpty(itemCode)){
|
|
if (StringUtils.isNotEmpty(itemCode)){
|
|
String[] split = itemCode.split(",|,");
|
|
String[] split = itemCode.split(",|,");
|
|
String ids = org.apache.commons.lang.StringUtils.join(split, ",");
|
|
String ids = org.apache.commons.lang.StringUtils.join(split, ",");
|
|
@ -2969,7 +2984,15 @@ public class YkyyEntranceService {
|
|
if (status==200){
|
|
if (status==200){
|
|
array = rs.getJSONArray("detailModelList");
|
|
array = rs.getJSONArray("detailModelList");
|
|
for (int i=0;i<array.size();i++){
|
|
for (int i=0;i<array.size();i++){
|
|
|
|
|
|
|
|
JSONObject jsonObject =array.getJSONObject(i);
|
|
|
|
if (jsonObject.get("yqdm")!=null){
|
|
|
|
if ("1001".equalsIgnoreCase(jsonObject.get("yqdm").toString())){
|
|
|
|
jsonObject.put("yqmc","思北院区");
|
|
|
|
}
|
|
|
|
if ("1002".equalsIgnoreCase(jsonObject.get("yqdm").toString())){
|
|
|
|
jsonObject.put("yqmc","五缘院区");
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return array;
|
|
return array;
|
|
@ -3033,6 +3056,7 @@ public class YkyyEntranceService {
|
|
String doctorHis="";
|
|
String doctorHis="";
|
|
Integer kdks = 0;
|
|
Integer kdks = 0;
|
|
Integer brid=0;
|
|
Integer brid=0;
|
|
|
|
String mzhm="0";
|
|
JSONArray jsonArray = findHisPatientBySscAndIdcard(patientMedicareCardDO.getCode(),patientDO.getIdcard(),demoFlag);
|
|
JSONArray jsonArray = findHisPatientBySscAndIdcard(patientMedicareCardDO.getCode(),patientDO.getIdcard(),demoFlag);
|
|
Map<String,Object> resultMap = new HashMap();
|
|
Map<String,Object> resultMap = new HashMap();
|
|
if(jsonArray!=null&&jsonArray.size()>0){
|
|
if(jsonArray!=null&&jsonArray.size()>0){
|
|
@ -3043,6 +3067,8 @@ public class YkyyEntranceService {
|
|
csny = json.getDate("csny");
|
|
csny = json.getDate("csny");
|
|
brnl = this.getBrnl(csny);
|
|
brnl = this.getBrnl(csny);
|
|
brid=json.getInteger("brid");
|
|
brid=json.getInteger("brid");
|
|
|
|
mzhm = json.getString("mzhm");
|
|
|
|
|
|
}
|
|
}
|
|
//操作医生信息
|
|
//操作医生信息
|
|
JSONArray jsonArray1 = findHisDoctor(doctorMappingDO.getIdcard());
|
|
JSONArray jsonArray1 = findHisDoctor(doctorMappingDO.getIdcard());
|
|
@ -3063,7 +3089,9 @@ public class YkyyEntranceService {
|
|
ykEmrJcsqDO.setBrnl(brnl);
|
|
ykEmrJcsqDO.setBrnl(brnl);
|
|
ykEmrJcsqDO.setKdys(doctorHis);
|
|
ykEmrJcsqDO.setKdys(doctorHis);
|
|
ykEmrJcsqDO.setBrks(kdks);
|
|
ykEmrJcsqDO.setBrks(kdks);
|
|
|
|
ykEmrJcsqDO.setJzhm(mzhm);
|
|
ykEmrJcsqDO.setTjys(doctorHis);
|
|
ykEmrJcsqDO.setTjys(doctorHis);
|
|
|
|
|
|
}
|
|
}
|
|
String jsonString = JSONObject.toJSONString(surveys);
|
|
String jsonString = JSONObject.toJSONString(surveys);
|
|
Map<String,Object> params = new HashedMap();
|
|
Map<String,Object> params = new HashedMap();
|