Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

package gov.va.med.ars.dao.ars;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import gov.va.med.domain.ars.LoincCd;

@Repository
public interface LoincCdRepository extends JpaRepository<LoincCd, Long> {

LoincCd findOne(long loincId);

LoincCd findOneByStcloincCd(String stcloincCd);

@Query("select a.stcloincCd from aloincCd a")
List<String> getAllLoincCd();

//List<LoincCd> findByisactiveInAndIsarchive(List<Character> codesToProcess, Character active);

@Query("select l from aloincCd l JOIN FETCH l.claimLineBridge where l.isactive in :codesToProcess and l.isarchive = :active")
List<LoincCd> findByisactiveInAndIsarchive(@Param("codesToProcess") List<Character> codesToProcess, @Param("active") Character active);

@Transactional
@Modifying
@Query(value = "update ARS_OWNER.loinc_cd set isactive = 'N' WHERE enddate < to_date(CURRENT_DATE,'DD-MON-YY') and enddate is not null", nativeQuery = true)
void updateIsActiveOnEndDate();

LoincCd findBystcloincCd(String stcCd);

LoincCd findByloincId(Long cd);

}