package com.ltkj.web.controller.his; import com.ltkj.common.core.controller.BaseController; import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.common.core.page.TableDataInfo; import com.ltkj.common.utils.http.HttpUtils; import com.ltkj.hosp.domain.DictSsdm; import com.ltkj.hosp.domain.TjCustomer; import com.ltkj.hosp.hisDto.OutpinimpapplyDto; import com.ltkj.hosp.hisDto.OutpinregapplyDto; import com.ltkj.hosp.service.ITjCustomerService; import com.ltkj.web.wxUtils.HttpClientUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @Api(tags = "AAAAA-----HISAPI相关接口文档") @RestController @RequestMapping("/api/His") public class HisApiController extends BaseController { @Autowired private ITjCustomerService tjCustomerService; private static final String HIS_URL = "https://mock.mengxuegu.com/mock/664d3dbce45d2156fa209c80/example/api/His/HisRequest"; @PostMapping("/Outpincreateapply") @ApiOperation(value = "新增/修改门诊注册信息") public AjaxResult Outpincreateapply(@RequestBody TjCustomer customer) { Map map = new HashMap<>(); if (null != customer.getCusId()) { map.put("pationid", customer.getCusId()); } else { map.put("pationid", null); } map.put("brxm", customer.getCusName()); map.put("brxb", customer.getCusSex()); map.put("csrq", customer.getCusBrithday()); map.put("brnl", customer.getAge()); map.put("brnldw", customer.getAgeUnit()); map.put("addr", customer.getAddr()); map.put("gzdw", null); map.put("dwdz", null); map.put("lxr", customer.getCusName()); map.put("lxrdh", customer.getCusPhone()); map.put("lxrgx", "本人"); map.put("sfzh", customer.getCusIdcard()); map.put("jhrxm", null); map.put("jhrsfzh", null); map.put("mz", customer.getCusNational()); map.put("zy", customer.getCareer()); map.put("fbbm", null); map.put("czy", customer.getCreateBy()); map.put("jkkkh", customer.getIndexCard()); map.put("mindex_id", customer.getIndexCard()); String post = HttpClientUtils.sendPost(HIS_URL, map); return AjaxResult.success(post); } @PostMapping("/Outpinconapply") @ApiOperation(value = "门诊医生接诊") public AjaxResult Outpinconapply(@RequestParam @ApiParam(value = "就诊号") String jzh, @ApiParam(value = "接诊日期") @RequestParam Date jzrq, @ApiParam(value = "接诊医师") @RequestParam String jzysbm) { Map map = new HashMap<>(); map.put("jzh",jzh); map.put("jzrq",jzrq); map.put("jzysbm",jzysbm); String post = HttpClientUtils.sendPost(HIS_URL, map); return AjaxResult.success(post); } @PostMapping("/Outpinunconapply") @ApiOperation(value = "门诊医生取消接诊") public AjaxResult Outpinunconapply(@RequestParam @ApiParam(value = "就诊号") String jzh, @ApiParam(value = "接诊日期") @RequestParam Date jzrq, @ApiParam(value = "接诊医师") @RequestParam String jzysbm) { Map map = new HashMap<>(); map.put("jzh",jzh); map.put("jzrq",jzrq); map.put("jzysbm",jzysbm); String post = HttpClientUtils.sendPost(HIS_URL, map); return AjaxResult.success(post); } @PostMapping("/Outpinimpapply") @ApiOperation(value = "新增/修改门诊诊断") public AjaxResult Outpinimpapply(@RequestBody OutpinimpapplyDto dto ) { Map map = new HashMap<>(); map.put("his_registration_id",dto.getHisRegistrationId()); map.put("mzzdid",dto.getMzzdid()); map.put("sqysbm",dto.getSqysbm()); map.put("mzksbm",dto.getMzksbm()); map.put("fbrq",dto.getFbrq()); map.put("zdrq",dto.getZdrq()); map.put("czybm",dto.getCzybm()); map.put("czyksbm",dto.getCzyksbm()); map.put("zs",dto.getZs()); map.put("bs",dto.getBs()); map.put("clyz",dto.getClyz()); map.put("jws",dto.getJws()); map.put("tgjc",dto.getTgjc()); map.put("gms",dto.getGms()); map.put("jbbm",dto.getJbbm()); map.put("jbbm1",dto.getJbbm1()); map.put("jbbm2",dto.getJbbm2()); map.put("tw",dto.getTw()); map.put("mb",dto.getMb()); map.put("hx",dto.getHx()); map.put("bp",dto.getBp()); map.put("fzbz",dto.getFzbz()); map.put("hzqx",dto.getHzqx()); map.put("sfqc",dto.getSfqc()); map.put("qchs",dto.getQchs()); map.put("sfqj",dto.getSfqj()); map.put("ckrq",dto.getCkrq()); String post = HttpClientUtils.sendPost(HIS_URL, map); return AjaxResult.success(post); } @PostMapping("/Outpinmesapply") @ApiOperation(value = "门诊预交收费") public AjaxResult Outpinmesapply(@RequestParam @ApiParam(value = "门诊患者 ID") String pationid, @ApiParam(value = "操作员") @RequestParam String czybm, @ApiParam(value = "支付类型编码") @RequestParam String zflxbm, @ApiParam(value = "预交金额") @RequestParam int yjje) { Map map = new HashMap<>(); map.put("pationid",pationid); map.put("czybm",czybm); map.put("zflxbm",zflxbm); map.put("yjje",yjje); String post = HttpClientUtils.sendPost(HIS_URL, map); return AjaxResult.success(post); } @PostMapping("/Outpinregapply") @ApiOperation(value = "新增/修改门诊挂号申请") public AjaxResult Outpinregapply(@RequestBody OutpinregapplyDto dao) { Map map = new HashMap<>(); map.put("pationid",dao.getPationid()); map.put("his_registration_id",dao.getHisRegistrationId()); map.put("sqysbm",dao.getSqysbm()); map.put("mzksbm",dao.getMzksbm()); map.put("czybm",dao.getCzybm()); map.put("sfjz",dao.getSfjz()); map.put("ghzlbm",dao.getGhzlbm()); map.put("ywckbm",dao.getYwckbm()); map.put("sflstd",dao.getSflstd()); map.put("ghrq",dao.getGhrq()); String post = HttpClientUtils.sendPost(HIS_URL, map); return AjaxResult.success(post); } }