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 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.domain.ars.ReferenceIdentification;

@Repository
public interface IReferenceIdentificationRepository extends JpaRepository<ReferenceIdentification, Long> {


@Query("SELECT ri.ref02 FROM areferenceidentification ri where ri.ref01 = 'EA' and ri.attachmentId = :attachmentId")
String getMedicalRecordNumberByAttachmentId(@Param("attachmentId") Integer attachmentId);

@Query("SELECT ri.ref02 FROM areferenceidentification ri where ri.ref01 = 'EJ' and ri.attachmentId = :attachmentId")
String getPatientCtrlNoByAttachId(@Param("attachmentId") Integer attachmentId);
}