zjh
2024-07-19 f2f83ca83f31f9a9cd0e78d394000c08f5434cdd
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethodService.java
@@ -8,6 +8,7 @@
import com.ltkj.hosp.service.ITjCustomerService;
import com.ltkj.web.wxUtils.HttpClientUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.FileInputStream;
@@ -34,9 +35,13 @@
    // 数据库配置文件路径
//    private static final String CONFIG_PATH = "/Users/chacca/开发相关/代码/ltkj_peis/ltkj-admin/src/main/resources/config.properties";
    private static final String CONFIG_PATH = "D:\\ltkjprojectconf\\config.properties";
//    private static final String CONFIG_PATH = "D:\\ltkjprojectconf\\config.properties";
    static  {
    private static String CONFIG_PATH;
    @Value ("${config.properties}")
    public void setConfigPath(String configPath) {
        CONFIG_PATH = configPath;
        try {
            FileInputStream inputStream = new FileInputStream(CONFIG_PATH);
            Properties props = new Properties();
@@ -49,6 +54,19 @@
        }
    }
/*    static  {
        try {
            FileInputStream inputStream = new FileInputStream(CONFIG_PATH);
            Properties props = new Properties();
            props.load(inputStream);
            String url = props.getProperty("his_api_url");
            String port = props.getProperty("his_api_port");
            HIS_URL=url+":"+port+"/api/His/";
        } catch (IOException throwables) {
            throwables.printStackTrace();
        }
    }*/
    //    @ApiOperation(value = "新增/修改门诊注册信息")
    public AjaxResult Outpincreateapply (TjCustomer customer) {
@@ -59,11 +77,18 @@
            map.put ("Pationid", null);
        }
        map.put ("brxm", customer.getCusName ());
        map.put ("brxb", customer.getCusSex ());
        Long cusSex = customer.getCusSex();
        if(cusSex==0L){
            map.put ("brxb",1);
        }else if(cusSex==1L){
            map.put ("brxb",2);
        }else {
            map.put ("brxb",9);
        }
        map.put ("csrq", DateUtil.format(customer.getCusBrithday(),"yyyy-MM-dd"));
        map.put ("brnl", customer.getAge ());
        map.put ("brnldw", customer.getAgeUnit ());
        map.put ("addr", customer.getAddr ());
        map.put ("addr", customer.getCusAddr());
        map.put ("gzdw", null);
        map.put ("dwdz", null);
        map.put ("lxr", customer.getCusName ());
@@ -115,34 +140,30 @@
    //    @ApiOperation(value = "新增/修改门诊诊断")
    public AjaxResult Outpinimpapply (OutpinimpapplyDto dto) {
        Map<String, Object> 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 ());
        Map<String, Object> 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("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("jzqk",dto.getJzqk());
        String post = HttpClientUtils.sendPost (HIS_URL+"Outpinimpapply", map);
        return AjaxResult.success ().put ("data", post);
    }
@@ -310,7 +331,7 @@
    public AjaxResult Outpinmedicapply (OutpinmedicapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("sfzh", dao.getHisRegistrationId ());
        map.put ("sfzh", dao.getSfzh ());
        map.put ("sqysbm", dao.getSqysbm ());
        map.put ("mzksbm", dao.getMzksbm ());
        map.put ("sjrq", dao.getSjrq ());
@@ -318,9 +339,9 @@
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("cflxbm", dao.getCflxbm ());
        map.put ("yfbm", dao.getYfbm ());
        map.put ("fyts", dao.getFyts ());
        map.put ("mzzd", dao.getMzzd ());
        map.put ("details", dao.getDetails ());
        map.put ("fyts","1");
        map.put ("mzzd","");
        map.put ("details", dao.getDetails());
        String post = HttpClientUtils.sendPost (HIS_URL+"Outpinmedicapply", map);
        return AjaxResult.success ().put ("data", post);
    }
@@ -499,7 +520,6 @@
//        map.put ("pationid", pationid);
//        map.put ("pagecount", pagecount);
//        map.put ("page", page);
        String post = HttpClientUtils.sendPost (HIS_URL+"Getlabreportinfo", map);
        return AjaxResult.success ().put ("data", post);
    }
@@ -662,6 +682,7 @@
        return AjaxResult.success ().put ("data", post);
    }
    // @ApiOperation(value = "2.4.3 获取检验结果记录信息")
    public AjaxResult Getlabdetailinfo (Map<String ,Object> map) {
        String post = HttpClientUtils.sendPost (HIS_URL+"Getlabdetailinfo", map);
        return AjaxResult.success ().put ("data", post);