|
|
|
|
@@ -21,6 +21,19 @@ import java.util.stream.Collectors;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import com.core.common.annotation.Anonymous;
|
|
|
|
|
import com.openhis.web.ybmanage.dto.*;
|
|
|
|
|
import com.openhis.yb.domain.InpatientDischarge;
|
|
|
|
|
import com.openhis.yb.domain.InpatientReg;
|
|
|
|
|
import com.openhis.yb.dto.Catalogue1312Output;
|
|
|
|
|
import com.openhis.yb.dto.Clinic2208UnSetlInfoOutput;
|
|
|
|
|
import com.openhis.yb.dto.Financial3203AWebParam;
|
|
|
|
|
import com.openhis.yb.dto.Info1101Output;
|
|
|
|
|
import com.openhis.yb.dto.PatientInfoDto;
|
|
|
|
|
import com.openhis.yb.dto.Result;
|
|
|
|
|
import com.openhis.yb.dto.Settlement3201WebParam;
|
|
|
|
|
import com.openhis.yb.dto.Settlement3202WebParam;
|
|
|
|
|
import com.openhis.yb.dto.Settlement3209AWebParam;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.core.io.Resource;
|
|
|
|
|
import org.springframework.core.io.ResourceLoader;
|
|
|
|
|
@@ -43,10 +56,6 @@ import com.openhis.clinical.service.IConditionDefinitionService;
|
|
|
|
|
import com.openhis.common.constant.CommonConstants;
|
|
|
|
|
import com.openhis.financial.domain.Contract;
|
|
|
|
|
import com.openhis.financial.service.IContractService;
|
|
|
|
|
import com.openhis.web.ybmanage.dto.Financial3202WebParam;
|
|
|
|
|
import com.openhis.web.ybmanage.dto.FinancialHand3201WebParam;
|
|
|
|
|
import com.openhis.web.ybmanage.dto.FinancialHand3203AWebParam;
|
|
|
|
|
import com.openhis.web.ybmanage.dto.Yb5205SpecialDiseaseWebParam;
|
|
|
|
|
import com.openhis.web.ybmanage.service.IYbService;
|
|
|
|
|
import com.openhis.yb.domain.FinancialApplyRecord;
|
|
|
|
|
import com.openhis.yb.domain.InfoPerson;
|
|
|
|
|
@@ -887,6 +896,116 @@ public class YbController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return R.ok(yb5205OutputSpecialDiseases);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 【2208】医保门诊退费
|
|
|
|
|
*
|
|
|
|
|
* @param psnNo 医保人员编号
|
|
|
|
|
* @param mdtrtId 医保就诊id
|
|
|
|
|
* @param settleId 医保结算id
|
|
|
|
|
* @param insuplcAdmdvs 参保地
|
|
|
|
|
* @param contractNo 合同编号
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/yb-return-settle")
|
|
|
|
|
@Anonymous
|
|
|
|
|
public R<?> ybReturnSettle(@RequestParam("psnNo") String psnNo, @RequestParam("mdtrtId") String mdtrtId,
|
|
|
|
|
@RequestParam("settleId") String settleId, @RequestParam("insuplcAdmdvs") String insuplcAdmdvs,
|
|
|
|
|
@RequestParam("contractNo") String contractNo){
|
|
|
|
|
|
|
|
|
|
Clinic2208UnSetlInfoParam clinicSetl = new Clinic2208UnSetlInfoParam();
|
|
|
|
|
clinicSetl.setPsnNo(psnNo).setMdtrtId(mdtrtId).setSetlId(settleId)
|
|
|
|
|
.setInsuplcAdmdvs(insuplcAdmdvs);
|
|
|
|
|
|
|
|
|
|
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoOutput = ybHttpUtils.unSettle(clinicSetl, iContractService.getContract(contractNo));
|
|
|
|
|
|
|
|
|
|
return R.ok(clinic2208UnSetlInfoOutput);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 【目录下载】
|
|
|
|
|
*
|
|
|
|
|
* @param address 接口
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/query-catalog")
|
|
|
|
|
public R<?> queryCatalog(@RequestParam("address") String address, @RequestParam("v") String version) {
|
|
|
|
|
|
|
|
|
|
CatalogFileInput catalogFileInput = new CatalogFileInput();
|
|
|
|
|
catalogFileInput.setAddress(address);
|
|
|
|
|
catalogFileInput.setVer(version);
|
|
|
|
|
|
|
|
|
|
FileResult fileResult = ybHttpUtils.queryCatalog(catalogFileInput);
|
|
|
|
|
|
|
|
|
|
fileResult = ybHttpUtils.downLoadFile(fileResult);
|
|
|
|
|
|
|
|
|
|
if (fileResult == null) {
|
|
|
|
|
return R.fail("获取失败");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return R.ok(fileResult);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 【2401】入院办理
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/inpatient-reg")
|
|
|
|
|
public R<?> inpatientReg(Yb2401InpatientRegParamDto yb2401InpatientRegParamDto){
|
|
|
|
|
|
|
|
|
|
Yb2401InputInpatientMdtrtInfo yb2401InputInpatientMdtrtInfo = ybDao.getYb2401InputInpatientMdtrtInfo(yb2401InpatientRegParamDto.getEncounterId());
|
|
|
|
|
|
|
|
|
|
yb2401InputInpatientMdtrtInfo.setMdtrtCertType(yb2401InpatientRegParamDto.getYbMdtrtCertType());
|
|
|
|
|
yb2401InputInpatientMdtrtInfo.setMdtrtCertNo(yb2401InpatientRegParamDto.getBusiCardInfo());
|
|
|
|
|
|
|
|
|
|
InpatientReg inpatientReg = ybHttpUtils.inpatientReg(yb2401InputInpatientMdtrtInfo);
|
|
|
|
|
|
|
|
|
|
if(inpatientReg!=null){
|
|
|
|
|
|
|
|
|
|
inpatientReg.setInputParam(JSON.toJSONString(yb2401InputInpatientMdtrtInfo));
|
|
|
|
|
ybDao.save2401InpatientReg(inpatientReg);
|
|
|
|
|
return R.ok("医保入院办理成功!");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return R.fail("医保入院办理失败!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 【2402】入院办理
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/inpatient-dis-charge")
|
|
|
|
|
public R<?> inpatientCheckOut(Long encounterId){
|
|
|
|
|
|
|
|
|
|
Contract contract = new Contract();
|
|
|
|
|
Yb2402InputParam yb2402InputInpatientDscgInfo = ybDao.getYb2402InputInpatientDscgInfo(encounterId,contract);
|
|
|
|
|
|
|
|
|
|
InpatientDischarge inpatientReg = ybHttpUtils.inpatientCheckOut(contract,yb2402InputInpatientDscgInfo);
|
|
|
|
|
|
|
|
|
|
if(inpatientReg!=null){
|
|
|
|
|
|
|
|
|
|
inpatientReg.setInputParam(JSON.toJSONString(yb2402InputInpatientDscgInfo));
|
|
|
|
|
ybDao.save2402InpatientDscg(inpatientReg);
|
|
|
|
|
return R.ok("医保出院办理成功!");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return R.fail("医保出院办理失败!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 【2403】入院办理
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/update-inpatient-info")
|
|
|
|
|
public R<?> updateInpatientInfo(Long encounterId){
|
|
|
|
|
|
|
|
|
|
Yb2403InputParam yb2403InputParam = ybDao.getYb2403InputParam(encounterId);
|
|
|
|
|
|
|
|
|
|
ybHttpUtils.updateInpatientInfo(yb2403InputParam);
|
|
|
|
|
|
|
|
|
|
ybDao.save2403InputInpatient(yb2403InputParam);
|
|
|
|
|
|
|
|
|
|
return R.fail("医保出院办理失败!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|