package com.yihu.figure.dao.disease;

import com.yihu.figure.model.disease.Visit;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by chenweida on 2017/3/6.
 */
public interface VisitDao extends PagingAndSortingRepository<Visit, Long>, JpaSpecificationExecutor<Visit> {
    @Query(" from Visit v where v.patientCode=?1 ")
    List<Visit> findByPatientCode(String patientCode);
}
