yeshijie 7 år sedan
förälder
incheckning
771835e431

+ 2 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/ArchivesController.java

@ -133,6 +133,7 @@ public class ArchivesController {
			String response = archivesService.getSickArchiveRecord(idcard);
			return Result.success("查询居民健康档案信息接口!",response);
		} catch (Exception ex) {
			ex.printStackTrace();
			if(ex instanceof ApiException)
			{
				ApiException apiEx = (ApiException) ex;
@ -154,6 +155,7 @@ public class ArchivesController {
			String response = archivesService.saveSickArchiveRecord(json,doctor);
			return Result.success("上传居民档案建档信息接口!",response);
		} catch (Exception ex) {
			ex.printStackTrace();
			if(ex instanceof ApiException)
			{
				ApiException apiEx = (ApiException) ex;

+ 17 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java

@ -195,6 +195,23 @@ public class PrescriptionController extends BaseController{
		}
	}
	@RequestMapping(value = "getRecipeMasterList",method = RequestMethod.POST)
	@ApiOperation("获取历史处方列表")
	public Result getRecipeMasterList(@ApiParam(name="cardNo",value="病人卡号",defaultValue = "")
							@RequestParam(value = "cardNo",required = true) String cardNo,
							@ApiParam(name="applyTimeFrom",value="开始时间",defaultValue = "")
							@RequestParam(value = "applyTimeFrom",required = true) String applyTimeFrom,
							@ApiParam(name="applyTimeEnd",value="结束时间",defaultValue = "")
							@RequestParam(value = "applyTimeEnd",required = true) String applyTimeEnd){
		try {
			String re = prescriptionService.getRecipeMasterList(cardNo,applyTimeFrom,applyTimeEnd);
			return Result.success("调阅单条处方接口!",re);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
		}
	}
	@RequestMapping(value = "saveRecipe",method = RequestMethod.POST)
	@ApiOperation("挂号开处方接口,调整处方接口")

+ 25 - 5
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/SignController.java

@ -9,10 +9,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@ -20,6 +17,7 @@ import java.util.Map;
 * 智业服务接口
 * */
@Controller
@RestController
@RequestMapping(value = "/third/sign/")
@Api(description = "基卫签约服务接口")
public class SignController {
@ -33,7 +31,6 @@ public class SignController {
	/******************************* 签约接口 ********************************************************/
	@RequestMapping(value = "CheckSignFamily",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("查询是否已签约")
	public Result checkSignFamily(
			@ApiParam(name="idcard",value="患者身份证",defaultValue = "350821201112240026")
@ -53,4 +50,27 @@ public class SignController {
		}
	}
	@RequestMapping(value = "getSickFamilyDoctorSignLimit",method = RequestMethod.POST)
	@ApiOperation("查询家庭医生签约人数上限接口")
	public Result getSickFamilyDoctorSignLimit(
			@ApiParam(name="jwTeamCode",value="智业行政团队code",defaultValue = "44")
			@RequestParam(value="jwTeamCode",required = true) String jwTeamCode){
		try {
			String response = signZYService.getSickFamilyDoctorSignLimit(jwTeamCode);
			return Result.success("查询签约成功!",response);
		} catch (Exception ex) {
			ex.printStackTrace();
			if(ex instanceof ApiException)
			{
				ApiException apiEx = (ApiException) ex;
				return Result.error(apiEx.errorCode(),ex.getMessage());
			}
			else{
				return Result.error(ex.getMessage());
			}
		}
	}
}

+ 3 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/DoctorMappingDao.java

@ -27,4 +27,7 @@ public interface DoctorMappingDao extends PagingAndSortingRepository<DoctorMappi
    @Query("select a from Doctor a,DoctorMapping b where a.code = b.doctorCode and a.code = ?1 and b.jwDoctorHospital = ?2")
    Doctor getDoctor(String docotrCode,String jwDoctorHospital);
    @Query(value = "select a.* from wlyy_doctor_mapping a where a.jw_doctor_hospital = ?1 and a.doctor_code=?2 order by a.id DESC limit 1",nativeQuery = true)
    DoctorMapping findByJwDoctorHospitalAndDoctorCode(String jwDoctorHospital,String doctorCode);
}

+ 32 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -687,6 +687,38 @@ public class PrescriptionService extends ZysoftBaseService{
        return response;
    }
    /**
     * 获取历史处方列表
     * @param cardNo
     * @param applyTimeFrom
     * @param applyTimeEnd
     * @return
     * @throws Exception
     */
    public String getRecipeMasterList(String cardNo,String applyTimeFrom,String applyTimeEnd)  throws Exception
    {
        Patient patient = patientDao.findBySsc(cardNo);
        SignFamily signFamily = signFamilyDao.findByPatient(patient.getCode());
        String[] hospitalMapping = getHospitalMapping(signFamily.getHospital()); //获取机构映射
        String hospital = hospitalMapping[0];
        String licence = hospitalMapping[1];
        Map<String,String> header = new HashMap<>();
        header.put("ORGCODE",hospital);
        header.put("LICENCE",licence);
        Map<String,String> params = new HashMap<>();
        params.put("cardNo",cardNo);
        params.put("applyTimeFrom",applyTimeFrom);
        params.put("applyTimeEnd",applyTimeEnd);
        String response = postSecond("getRecipeMasterList","获取历史处方列表",params,null,header,false,2);
        return response;
    }
    /**
     * 7.4 挂号开处方接口,调整处方接口
     * 开方和调整处方接口的区别-开方会传ca认证