Interface IMdmLinkDao

    • Method Detail

      • deleteWithAnyReferenceToPid

        @Modifying
        @Query("DELETE FROM MdmLink f WHERE myGoldenResourcePid = :pid OR mySourcePid = :pid")
        int deleteWithAnyReferenceToPid​(@Param("pid")
                                        Long thePid)
      • deleteWithAnyReferenceToPidAndMatchResultNot

        @Modifying
        @Query("DELETE FROM MdmLink f WHERE (myGoldenResourcePid = :pid OR mySourcePid = :pid) AND myMatchResult <> :matchResult")
        int deleteWithAnyReferenceToPidAndMatchResultNot​(@Param("pid")
                                                         Long thePid,
                                                         @Param("matchResult")
                                                         ca.uhn.fhir.mdm.api.MdmMatchResultEnum theMatchResult)
      • expandPidsFromGroupPidGivenMatchResult

        @Query("SELECT ml2.myGoldenResourcePid as goldenPid, ml2.mySourcePid as sourcePid FROM MdmLink ml2 WHERE ml2.myMatchResult=:matchResult AND ml2.myGoldenResourcePid IN (SELECT ml.myGoldenResourcePid FROM MdmLink ml INNER JOIN ResourceLink hrl ON hrl.myTargetResourcePid=ml.mySourcePid AND hrl.mySourceResourcePid=:groupPid AND hrl.mySourcePath=\'Group.member.entity\' AND hrl.myTargetResourceType=\'Patient\')")
        List<IMdmLinkDao.MdmPidTupleexpandPidsFromGroupPidGivenMatchResult​(@Param("groupPid")
                                                                             Long theGroupPid,
                                                                             @Param("matchResult")
                                                                             ca.uhn.fhir.mdm.api.MdmMatchResultEnum theMdmMatchResultEnum)
      • expandPidsBySourcePidAndMatchResult

        @Query("SELECT ml.myGoldenResourcePid as goldenPid, ml.mySourcePid as sourcePid FROM MdmLink ml INNER JOIN MdmLink ml2 on ml.myGoldenResourcePid=ml2.myGoldenResourcePid WHERE ml2.mySourcePid=:sourcePid AND ml2.myMatchResult=:matchResult AND ml.myMatchResult=:matchResult")
        List<IMdmLinkDao.MdmPidTupleexpandPidsBySourcePidAndMatchResult​(@Param("sourcePid")
                                                                          Long theSourcePid,
                                                                          @Param("matchResult")
                                                                          ca.uhn.fhir.mdm.api.MdmMatchResultEnum theMdmMatchResultEnum)
      • expandPidsByGoldenResourcePidAndMatchResult

        @Query("SELECT ml.myGoldenResourcePid as goldenPid, ml.mySourcePid as sourcePid FROM MdmLink ml WHERE ml.myGoldenResourcePid = :goldenPid and ml.myMatchResult = :matchResult")
        List<IMdmLinkDao.MdmPidTupleexpandPidsByGoldenResourcePidAndMatchResult​(@Param("goldenPid")
                                                                                  Long theSourcePid,
                                                                                  @Param("matchResult")
                                                                                  ca.uhn.fhir.mdm.api.MdmMatchResultEnum theMdmMatchResultEnum)
      • findPidByResourceNameAndThreshold

        @Query("SELECT ml.myId FROM MdmLink ml WHERE ml.myMdmSourceType = :resourceName AND ml.myCreated <= :highThreshold ORDER BY ml.myCreated DESC")
        List<LongfindPidByResourceNameAndThreshold​(@Param("resourceName")
                                                     String theResourceName,
                                                     @Param("highThreshold")
                                                     Date theHighThreshold,
                                                     org.springframework.data.domain.Pageable thePageable)