Commit 20605e4c95cd9e0dca0135de80291767dadbef66

Authored by wtt
1 parent b9656bbcd9

承德公卫增加通过接口修改数据

Showing 2 changed files with 303 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java View file @ 20605e4
... ... @@ -3785,10 +3785,35 @@
3785 3785 }
3786 3786 return br;
3787 3787 }
  3788 + public BaseObjectResponse saveYfController(String id,String cardNo){
  3789 + BaseObjectResponse br = null;
3788 3790  
  3791 + try{
  3792 + PatientsQuery patientsQuery = new PatientsQuery();
  3793 + patientsQuery.setId(id);
  3794 + patientsQuery.setCardNo(cardNo);
  3795 + List<Patients> list = patientsService.queryPatient(patientsQuery);
  3796 + System.out.println(DateUtil.getyyyy_MM_dd_hms(new java.util.Date())+" pateient size = "+ list.size());
  3797 + if(list != null && list.size()>0){
  3798 + for(Patients patients : list){
  3799 + try{
  3800 + br = saveBaseInfo(patients);
  3801 + }catch (Exception e){
  3802 + ExceptionUtils.catchException(e, "saveYf error.");
  3803 + continue;
  3804 + }
3789 3805  
  3806 + }
  3807 + }
  3808 + }catch (Exception e)
  3809 + {
  3810 + ExceptionUtils.catchException(e, "get patientsService error.");
  3811 + }
  3812 + return br;
  3813 + }
3790 3814  
3791 3815  
  3816 +
3792 3817 /**
3793 3818 * 承德智业初诊调用方法
3794 3819 * @param startDate
3795 3820  
3796 3821  
... ... @@ -3814,8 +3839,26 @@
3814 3839 }
3815 3840 return br;
3816 3841 }
  3842 + public BaseObjectResponse saveChuZhenController(String parentId){
  3843 + BaseObjectResponse br = null;
  3844 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  3845 + antExChuQuery.setParentId(parentId);
  3846 + List<AntExChuModel> list = antExService.queryAntExChu(antExChuQuery);
  3847 + if(list != null && list.size()>0){
  3848 + for(AntExChuModel antExChuModel : list){
  3849 + try{
  3850 + br = saveWoman_Prefirstvisit(antExChuModel);
  3851 + }catch (Exception e){
  3852 + ExceptionUtils.catchException(e, "saveChuZhen error.");
  3853 + continue;
  3854 + }
3817 3855  
  3856 + }
  3857 + }
  3858 + return br;
  3859 + }
3818 3860  
  3861 +
3819 3862 /**
3820 3863 * 承德智业复诊调用方法
3821 3864 * @param startDate
3822 3865  
3823 3866  
... ... @@ -3843,8 +3886,28 @@
3843 3886  
3844 3887 return br;
3845 3888 }
  3889 + public BaseObjectResponse saveFuZhenController(String parentId){
  3890 + BaseObjectResponse br = null;
  3891 + AntExQuery antExQuery = new AntExQuery();
  3892 + antExQuery.setParentId(parentId);
  3893 + //antExQuery.setId("5b2b4a760cf24b66d2c0af28");
  3894 + List<AntenatalExaminationModel> list = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
  3895 + if(list != null && list.size()>0){
  3896 + for(AntenatalExaminationModel antenatalExaminationModel : list){
  3897 + try{
  3898 + br = saveWoman_Preothervisit(antenatalExaminationModel);
  3899 + }catch (Exception e){
  3900 + ExceptionUtils.catchException(e, "saveFuZhen error.");
  3901 + continue;
  3902 + }
3846 3903  
  3904 + }
  3905 + }
3847 3906  
  3907 + return br;
  3908 + }
  3909 +
  3910 +
3848 3911 /**
3849 3912 * 承德智业分娩调用方法
3850 3913 * @param startDate
3851 3914  
3852 3915  
... ... @@ -3871,8 +3934,27 @@
3871 3934 return br;
3872 3935  
3873 3936 }
  3937 + public BaseObjectResponse saveFmController(String parentId){
  3938 + BaseObjectResponse br = null;
  3939 + MatDeliverQuery deliverQuery = new MatDeliverQuery();
  3940 + deliverQuery.setParentId(parentId);
  3941 + List<MaternalDeliverModel> list = matDeliverService.query(deliverQuery);
  3942 + if(null != list && list.size() > 0){
  3943 + for(MaternalDeliverModel maternalDeliverModel : list){
  3944 + try{
  3945 + br = saveWomen_Delivery(maternalDeliverModel);
  3946 + }catch (Exception e){
  3947 + ExceptionUtils.catchException(e, "saveFm error.");
  3948 + continue;
  3949 + }
3874 3950  
  3951 + }
  3952 + }
  3953 + return br;
3875 3954  
  3955 + }
  3956 +
  3957 +
3876 3958 /**
3877 3959 * 承德智业产后访视调用方法
3878 3960 * @param startDate
3879 3961  
3880 3962  
... ... @@ -3898,8 +3980,26 @@
3898 3980 }
3899 3981 return br;
3900 3982 }
  3983 + public BaseResponse saveChFsController(String pid){
  3984 + BaseResponse br = null;
  3985 + MatDeliverFollowQuery deliverQuery = new MatDeliverFollowQuery();
  3986 + deliverQuery.setPid(pid);
  3987 + List<MatdeliverFollowModel> list = matDeliverFollowService.query(deliverQuery);
  3988 + if(null != list && list.size() > 0){
  3989 + for(MatdeliverFollowModel matdeliverFollowModel : list){
  3990 + try{
  3991 + br = saveWoman_Postvisit(matdeliverFollowModel);
  3992 + }catch (Exception e){
  3993 + ExceptionUtils.catchException(e, "saveChFs error.");
  3994 + continue;
  3995 + }
3901 3996  
  3997 + }
  3998 + }
  3999 + return br;
  4000 + }
3902 4001  
  4002 +
3903 4003 /**
3904 4004 * 承德智业产后复查调用方法
3905 4005 * @param startDate
3906 4006  
3907 4007  
... ... @@ -3925,8 +4025,26 @@
3925 4025 }
3926 4026 return br;
3927 4027 }
  4028 + public BaseResponse saveChFcController(String pid){
  4029 + BaseResponse br = null;
  4030 + PostReviewQuery mongoQuery = new PostReviewQuery();
  4031 + mongoQuery.setPid(pid);
  4032 + List<PostReviewModel> list = postReviewService.findWithList(mongoQuery);
  4033 + if(list != null && list.size() > 0){
  4034 + for(PostReviewModel postReviewModel : list){
  4035 + try{
  4036 + br = saveWoman_Post42Exam(postReviewModel);
  4037 + }catch (Exception e){
  4038 + ExceptionUtils.catchException(e, "saveChFc error.");
  4039 + continue;
  4040 + }
3928 4041  
  4042 + }
  4043 + }
  4044 + return br;
  4045 + }
3929 4046  
  4047 +
3930 4048 /**
3931 4049 * 承德智业儿童建档基本信息调用方法
3932 4050 * @param startDate
3933 4051  
... ... @@ -3953,7 +4071,25 @@
3953 4071 }
3954 4072 return br;
3955 4073 }
  4074 + public BaseObjectResponse saveEtDaController(String parentId){
  4075 + BaseObjectResponse br = null;
  4076 + BabyModelQuery babyQuery = new BabyModelQuery();
  4077 + babyQuery.setParentId(parentId);
  4078 + babyQuery.setYn(YnEnums.YES.getId());
  4079 + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  4080 + if(models != null && models.size() > 0){
  4081 + for(BabyModel babyModel : models){
  4082 + try{
  4083 + br = saveChild_Info(babyModel);
  4084 + }catch (Exception e){
  4085 + ExceptionUtils.catchException(e, "saveEtDa error.");
  4086 + continue;
  4087 + }
3956 4088  
  4089 + }
  4090 + }
  4091 + return br;
  4092 + }
3957 4093  
3958 4094  
3959 4095 /**
3960 4096  
3961 4097  
... ... @@ -3980,8 +4116,26 @@
3980 4116 }
3981 4117 return br;
3982 4118 }
  4119 + public BaseObjectResponse saveXsrFsController(String babyId){
  4120 + BaseObjectResponse br = null;
  4121 + Criteria c = null;
  4122 + c = Criteria.where("babyId").is(babyId);;
  4123 + List<NewbornVisit> visit = mongoTemplate.find(Query.query(c), NewbornVisit.class);
  4124 + if(visit != null && visit.size() > 0){
  4125 + for(NewbornVisit newbornVisit : visit){
  4126 + try{
  4127 + br = saveChild_HomeVisit_Memo(newbornVisit);
  4128 + }catch (Exception e){
  4129 + ExceptionUtils.catchException(e, "saveXsrFs error.");
  4130 + continue;
  4131 + }
3983 4132  
  4133 + }
  4134 + }
  4135 + return br;
  4136 + }
3984 4137  
  4138 +
3985 4139 /**
3986 4140 * 承德智业儿保调用方法
3987 4141 * @param startDate
3988 4142  
... ... @@ -4007,7 +4161,24 @@
4007 4161 }
4008 4162 return br;
4009 4163 }
  4164 + public BaseObjectResponse saveEbController(String babyId){
  4165 + BaseObjectResponse br = null;
  4166 + BabyCheckModelQuery babyQuery = new BabyCheckModelQuery();
  4167 + babyQuery.setBuildId(babyId);
  4168 + List<BabyCheckModel> list = babyCheckService.queryBabyCheckRecord(babyQuery);
  4169 + if(list != null && list.size() > 0){
  4170 + for(BabyCheckModel babyCheckModel : list){
  4171 + try{
  4172 + br = saveChild_HealthExam(babyCheckModel);
  4173 + }catch (Exception e){
  4174 + ExceptionUtils.catchException(e, "saveEb error.");
  4175 + continue;
  4176 + }
4010 4177  
  4178 + }
  4179 + }
  4180 + return br;
  4181 + }
4011 4182  
4012 4183  
4013 4184  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CdGwController.java View file @ 20605e4
  1 +package com.lyms.platform.operate.web.controller;
  2 +
  3 +import com.lyms.hospitalapi.Cdfy.CdGwInterface;
  4 +import com.lyms.platform.common.base.BaseController;
  5 +import com.lyms.platform.common.result.BaseObjectResponse;
  6 +import com.lyms.platform.common.result.BaseResponse;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Controller;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestMethod;
  11 +import org.springframework.web.bind.annotation.RequestParam;
  12 +import org.springframework.web.bind.annotation.ResponseBody;
  13 +
  14 +import javax.servlet.http.HttpServletRequest;
  15 +
  16 +@Controller
  17 +@RequestMapping("/cdgw")
  18 +public class CdGwController extends BaseController {
  19 +
  20 + @Autowired
  21 + private CdGwInterface cdGwInterface;
  22 +
  23 + /**
  24 + * @param id 孕妇建档id
  25 + * @param cardNo 身份证号
  26 + */
  27 + @ResponseBody
  28 + @RequestMapping(value = "/saveYfController", method = RequestMethod.GET)
  29 + public BaseObjectResponse saveYfController(
  30 + @RequestParam(required = false) String id,
  31 + @RequestParam(required = false) String cardNo
  32 + ) {
  33 + return cdGwInterface.saveYfController(id, cardNo);
  34 + }
  35 +
  36 + /**
  37 + * 初诊
  38 + * @param parentId 孕妇建档id
  39 + */
  40 + @ResponseBody
  41 + @RequestMapping(value = "/saveChuZhenController", method = RequestMethod.GET)
  42 + public BaseObjectResponse saveChuZhenController(@RequestParam(required = false) String parentId
  43 + ) {
  44 + return cdGwInterface.saveChuZhenController(parentId);
  45 + }
  46 +
  47 + /**
  48 + * 复诊
  49 + * @param parentId 孕妇建档id
  50 + */
  51 + @ResponseBody
  52 + @RequestMapping(value = "/saveFuZhenController", method = RequestMethod.GET)
  53 + public BaseObjectResponse saveFuZhenController(
  54 + @RequestParam(required = false) String parentId
  55 + ) {
  56 + return cdGwInterface.saveFuZhenController(parentId);
  57 + }
  58 +
  59 + /**
  60 + * 产妇分娩
  61 + * @param parentId 孕妇建档id
  62 + */
  63 + @ResponseBody
  64 + @RequestMapping(value = "/saveFmController", method = RequestMethod.GET)
  65 + public BaseResponse saveFmController(
  66 + @RequestParam(required = false) String parentId
  67 + ) {
  68 + return cdGwInterface.saveFmController(parentId);
  69 + }
  70 +
  71 + /**
  72 + * 产妇访视
  73 + * @param pid lyms_person id
  74 + */
  75 + @ResponseBody
  76 + @RequestMapping(value = "/saveChFsController", method = RequestMethod.GET)
  77 + public BaseResponse saveChFsController(
  78 + @RequestParam(required = false) String pid
  79 + ) {
  80 + return cdGwInterface.saveChFsController(pid);
  81 + }
  82 +
  83 + /**
  84 + * 产后复查
  85 + * @param pid lyms_person id
  86 + */
  87 + @ResponseBody
  88 + @RequestMapping(value = "/saveChFcController", method = RequestMethod.GET)
  89 + public BaseResponse saveChFcController(
  90 + @RequestParam(required = false) String pid
  91 + ) {
  92 + return cdGwInterface.saveChFcController(pid);
  93 + }
  94 +
  95 + /**
  96 + * 新生儿
  97 + * @param parentId 孕妇建档id
  98 + */
  99 + @ResponseBody
  100 + @RequestMapping(value = "/saveEtDaController", method = RequestMethod.GET)
  101 + public BaseObjectResponse saveEtDaController(
  102 + @RequestParam(required = false) String parentId
  103 + ) {
  104 + return cdGwInterface.saveEtDaController(parentId);
  105 + }
  106 +
  107 + /**
  108 + * 新生儿访视
  109 + * @param babyId 儿童id
  110 + */
  111 + @ResponseBody
  112 + @RequestMapping(value = "/saveXsrFsController", method = RequestMethod.GET)
  113 + public BaseObjectResponse saveXsrFsController(
  114 + @RequestParam(required = false) String babyId
  115 + ) {
  116 + return cdGwInterface.saveXsrFsController(babyId);
  117 + }
  118 +
  119 + /**
  120 + * 儿保检查
  121 + * @param babyId 儿童id
  122 + */
  123 + @ResponseBody
  124 + @RequestMapping(value = "/saveEbController", method = RequestMethod.GET)
  125 + public BaseObjectResponse saveEbController(
  126 + @RequestParam(required = false) String babyId
  127 + ) {
  128 + return cdGwInterface.saveEbController(babyId);
  129 + }
  130 +
  131 +
  132 +}