瀏覽代碼

根据居民id获取就诊信息、康复计划执行情况列表

humingfen 7 年之前
父節點
當前提交
c54ee35a1e

+ 3 - 1
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/controller/RehabilitationInformationController.java

@ -13,6 +13,8 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import com.yihu.jw.rm.rehabilitation.RehabilitationRequestMapping;
import java.util.List;
/**
 * @author humingfen on 2018/4/25.
 */
@ -80,7 +82,7 @@ public class RehabilitationInformationController extends EnvelopRestController {
    public Envelop<RehabilitationInformationDO> findByPatientId(@ApiParam(name = "patientId", value = "patientId")
                                                           @RequestParam(value = "patientId", required = true) String patientId) {
        try {
            RehabilitationInformationDO informationDO = rehabilitationInformationService.findByPatientId(patientId);
            List<RehabilitationInformationDO> informationDO = rehabilitationInformationService.findByPatientId(patientId);
            return Envelop.getSuccess(RehabilitationRequestMapping.Common.message_success_find, informationDO);
        } catch (Exception e) {
            e.printStackTrace();

+ 3 - 1
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/controller/RehabilitationPerformanceController.java

@ -12,6 +12,8 @@ import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @author humingfen on 2018/5/2.
 */
@ -75,7 +77,7 @@ public class RehabilitationPerformanceController extends EnvelopRestController {
    public Envelop<RehabilitationPerformanceDO> findByPatientId(@ApiParam(name = "patientId", value = "patientId")
                                                         @RequestParam(value = "patientId", required = true) String patientId) {
        try {
            RehabilitationPerformanceDO performanceDO = performanceService.findByPatientId(patientId);
            List<RehabilitationPerformanceDO> performanceDO = performanceService.findByPatientId(patientId);
            return Envelop.getSuccess(RehabilitationRequestMapping.Common.message_success_find, performanceDO);
        } catch (Exception e) {
            e.printStackTrace();

+ 2 - 2
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/controller/RehabilitationPlanningController.java

@ -24,7 +24,7 @@ public class RehabilitationPlanningController extends EnvelopRestController {
    @Autowired
    private RehabilitationPlanningService planningService;
    @Autowired
    private RehabilitationTreatmentProgramService TreatmentProgramService;
    private RehabilitationTreatmentProgramService treatmentProgramService;
    @GetMapping(value = RehabilitationRequestMapping.Planning.findPlanningPage)
    @ApiOperation(value = "分页查找康复计划", notes = "分页查找康复计划")
@ -82,7 +82,7 @@ public class RehabilitationPlanningController extends EnvelopRestController {
    public Envelop<RehabilitationPlanningDO> findTreatmentByProgramId(@ApiParam(name = "programId", value = "programId")
                                                      @RequestParam(value = "programId", required = true) String programId) {
        try {
            RehabilitationTreatmentProgramDO treatmentProgramDO = TreatmentProgramService.findById(programId);
            RehabilitationTreatmentProgramDO treatmentProgramDO = treatmentProgramService.findById(programId);
            return Envelop.getSuccess(RehabilitationRequestMapping.Common.message_success_find, treatmentProgramDO);
        } catch (Exception e) {
            e.printStackTrace();

+ 3 - 1
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/dao/RehabilitationInformationDao.java

@ -5,6 +5,8 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface RehabilitationInformationDao extends PagingAndSortingRepository<RehabilitationInformationDO, String>,
        JpaSpecificationExecutor<RehabilitationInformationDO> {
@ -12,5 +14,5 @@ public interface RehabilitationInformationDao extends PagingAndSortingRepository
    RehabilitationInformationDO findById(String id);
    @Query("from RehabilitationInformationDO w where w.patientId =?1 order by dischargeTime desc")
    RehabilitationInformationDO findByPatientId(String patientId);
    List<RehabilitationInformationDO> findByPatientId(String patientId);
}

+ 3 - 1
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/dao/RehabilitationPerformanceDao.java

@ -5,6 +5,8 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface RehabilitationPerformanceDao extends PagingAndSortingRepository<RehabilitationPerformanceDO, String>,
        JpaSpecificationExecutor<RehabilitationPerformanceDO> {
@ -12,5 +14,5 @@ public interface RehabilitationPerformanceDao extends PagingAndSortingRepository
    RehabilitationPerformanceDO findById(String id);
    @Query("from RehabilitationPerformanceDO w where w.createUser = ?1")
    RehabilitationPerformanceDO findByPatientId(String patientId);
    List<RehabilitationPerformanceDO> findByPatientId(String patientId);
}

+ 2 - 2
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/service/RehabilitationInformationService.java

@ -89,8 +89,8 @@ public class RehabilitationInformationService extends BaseJpaService<Rehabilitat
     * @param patientId
     * @return
     */
    public RehabilitationInformationDO findByPatientId(String patientId) {
        RehabilitationInformationDO informationDO = rehabilitationInformationDao.findByPatientId(patientId);
    public List<RehabilitationInformationDO> findByPatientId(String patientId) {
        List<RehabilitationInformationDO> informationDO = rehabilitationInformationDao.findByPatientId(patientId);
        return informationDO;
    }

+ 2 - 2
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/service/RehabilitationPerformanceService.java

@ -67,8 +67,8 @@ public class RehabilitationPerformanceService extends BaseJpaService<Rehabilitat
     * @param patientId
     * @return
     */
    public RehabilitationPerformanceDO findByPatientId(String patientId) {
        RehabilitationPerformanceDO performanceDO = performanceDao.findByPatientId(patientId);
    public List<RehabilitationPerformanceDO> findByPatientId(String patientId) {
        List<RehabilitationPerformanceDO> performanceDO = performanceDao.findByPatientId(patientId);
        return performanceDO;
    }