Summary Table

Categories Total Count
PII 0
URL 0
DNS 1
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.erepos;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import gov.va.med.ars.model.ReportCodeAndRecId;
import gov.va.med.domain.ereposModel.Claim;
import gov.va.med.domain.ereposModel.ClaimSuplInfo;
import gov.va.med.domain.ereposModel.EntityAdtlId;
import gov.va.med.domain.ereposModel.EntityName;

/**
* @author
DNS
*
*/
@Repository
public interface IRfaiEreposRepository extends JpaRepository<Claim, String> {

@Query("select c from eClaim c where c.claimKey = :claimIndex")
List<Claim> getEreposClaimInformation(@Param("claimIndex") String claimIndex);

@Query("select clm.receiverId from eClaim clm where clm.claimKey = :claimKey")
String getReceiverIdByClaimKey(@Param("claimKey") String claimKey);

@Query("select supl.pwk01rptTypeCd as reportcode, claim.receiverId as receiverid from eClaim claim, eClaimSuplInfo supl where claim.claimKey = supl.claim.claimKey and claim.claimKey = :claimKey")
List<ReportCodeAndRecId> findReportCodeAndRecIdByClaimKey(@Param("claimKey") String claimKey);

@Query("select c from eClaim c JOIN FETCH c.claimSuplInfos supl where c.claimKey = :claimKey")
List<Claim> getEreposClaimInfo(@Param("claimKey") String claimKey);

@Query("select c from eClaim c where c.claimKey = :claimKey")
List<Claim> getEreposClaimRows(@Param("claimKey") String claimKey);

@Query("select supl from eClaimSuplInfo supl where supl.claim = :claim")
List<ClaimSuplInfo> getEreposClaimSup(@Param("claim") Claim claim);

@Query("select en from eEntityName en, eClaim c where c.claimKey = :claimIndex"
+ " and c.fileNumber = en.txnSet.id.fileNumber"
+ " and c.st02txnCtlNbr = en.txnSet.id.st02txnCtlNbr" )
List<EntityName> getEntityNamesFromClaimKey(@Param("claimIndex") String claimIndex);

@Query("select ea from eEntityAdtlId ea, eClaim c where c.claimKey = :claimIndex"
+ " and c.fileNumber = ea.txnSet.id.fileNumber"
+ " and c.st02txnCtlNbr = ea.txnSet.id.st02txnCtlNbr" )
List<EntityAdtlId> getEntityAdtlIdsFromClaimKey(@Param("claimIndex") String claimIndex);

@Query(nativeQuery = true, value = "select en.nm109id_Cd from e_repos.claim clm, e_repos.entity_name en "
+ "where clm.FILE_NUMBER = en.FILE_NUMBER "
+ "and clm.ST02TXN_CTL_NBR = en.ST02TXN_CTL_NBR "
+ "and clm.CLAIM_KEY = :ediClaimKey and en.LOOP_ID = '2010BA'")
List<String> getPatientIdsFromErepos(@Param("ediClaimKey") String ediClaimKey);

}