Incremental progress on large ValueSet expansion.
This commit is contained in:
parent
6fa9658b24
commit
0cabc0392f
|
@ -149,7 +149,7 @@ public class DaoConfig {
|
||||||
/**
|
/**
|
||||||
* EXPERIMENTAL - Do not use in production! Do not change default of {@code false}!
|
* EXPERIMENTAL - Do not use in production! Do not change default of {@code false}!
|
||||||
*/
|
*/
|
||||||
private boolean myPreExpandValueSetsExperimental = false;
|
private boolean myPreExpandValueSetsExperimental = true; // FIXME: DM 2019-09-03 - Return to false.
|
||||||
private boolean myFilterParameterEnabled = false;
|
private boolean myFilterParameterEnabled = false;
|
||||||
private StoreMetaSourceInformationEnum myStoreMetaSourceInformation = StoreMetaSourceInformationEnum.SOURCE_URI_AND_REQUEST_ID;
|
private StoreMetaSourceInformationEnum myStoreMetaSourceInformation = StoreMetaSourceInformationEnum.SOURCE_URI_AND_REQUEST_ID;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -40,7 +40,11 @@ public interface ITermValueSetConceptDao extends JpaRepository<TermValueSetConce
|
||||||
@Modifying
|
@Modifying
|
||||||
void deleteByTermValueSetId(@Param("pid") Long theValueSetId);
|
void deleteByTermValueSetId(@Param("pid") Long theValueSetId);
|
||||||
|
|
||||||
@Query("SELECT vsc from TermValueSetConcept vsc LEFT OUTER JOIN FETCH vsc.myDesignations WHERE vsc.myValueSetPid = :pid ORDER BY vsc.myOrder ASC")
|
// FIXME: DM 2019-09-05 - Let's try removing the pre-fetch and the code in BaseHapiTerminologySvcImpl that handles designations so we can compare the processing time. 1/2
|
||||||
|
// @Query("SELECT vsc from TermValueSetConcept vsc WHERE vsc.myValueSetPid = :pid ORDER BY vsc.myOrder")
|
||||||
|
// Slice<TermValueSetConcept> findByTermValueSetIdAndPreFetchDesignations(Pageable thePage, @Param("pid") Long theValueSetId);
|
||||||
|
|
||||||
|
@Query("SELECT vsc from TermValueSetConcept vsc LEFT OUTER JOIN FETCH vsc.myDesignations WHERE vsc.myValueSetPid = :pid ORDER BY vsc.myOrder")
|
||||||
Slice<TermValueSetConcept> findByTermValueSetIdAndPreFetchDesignations(Pageable thePage, @Param("pid") Long theValueSetId);
|
Slice<TermValueSetConcept> findByTermValueSetIdAndPreFetchDesignations(Pageable thePage, @Param("pid") Long theValueSetId);
|
||||||
|
|
||||||
@Query("SELECT vsc FROM TermValueSetConcept vsc WHERE vsc.myValueSetPid = :pid AND vsc.mySystem = :system_url AND vsc.myCode = :codeval")
|
@Query("SELECT vsc FROM TermValueSetConcept vsc WHERE vsc.myValueSetPid = :pid AND vsc.mySystem = :system_url AND vsc.myCode = :codeval")
|
||||||
|
|
|
@ -541,6 +541,7 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
|
||||||
containsComponent.setDisplay(concept.getDisplay());
|
containsComponent.setDisplay(concept.getDisplay());
|
||||||
|
|
||||||
// TODO: DM 2019-08-17 - Implement includeDesignations parameter for $expand operation to make this optional.
|
// TODO: DM 2019-08-17 - Implement includeDesignations parameter for $expand operation to make this optional.
|
||||||
|
// FIXME: DM 2019-09-05 - Let's try removing the pre-fetch and the code in BaseHapiTerminologySvcImpl that handles designations so we can compare the processing time. 2/2
|
||||||
expandDesignations(theTermValueSet, concept, containsComponent);
|
expandDesignations(theTermValueSet, concept, containsComponent);
|
||||||
|
|
||||||
if (++conceptsExpanded % 250 == 0) {
|
if (++conceptsExpanded % 250 == 0) {
|
||||||
|
@ -553,6 +554,7 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
|
||||||
|
|
||||||
private void logConceptsExpanded(TermValueSet theTermValueSet, int theConceptsExpanded) {
|
private void logConceptsExpanded(TermValueSet theTermValueSet, int theConceptsExpanded) {
|
||||||
if (theConceptsExpanded > 0) {
|
if (theConceptsExpanded > 0) {
|
||||||
|
// FIXME: DM 2019-09-05 - Account for in progress vs. total.
|
||||||
ourLog.info("Have expanded {} concepts in ValueSet[{}]", theConceptsExpanded, theTermValueSet.getUrl());
|
ourLog.info("Have expanded {} concepts in ValueSet[{}]", theConceptsExpanded, theTermValueSet.getUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -578,7 +580,9 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
|
||||||
|
|
||||||
private void logDesignationsExpanded(TermValueSet theValueSet, TermValueSetConcept theConcept, int theDesignationsExpanded) {
|
private void logDesignationsExpanded(TermValueSet theValueSet, TermValueSetConcept theConcept, int theDesignationsExpanded) {
|
||||||
if (theDesignationsExpanded > 0) {
|
if (theDesignationsExpanded > 0) {
|
||||||
ourLog.debug("Have expanded {} designations for Concept[{}|{}] in ValueSet[{}]", theDesignationsExpanded, theConcept.getSystem(), theConcept.getCode(), theValueSet.getUrl());
|
// FIXME: DM 2019-09-05 - Account for in progress vs. total.
|
||||||
|
// FIXME: DM 2019-09-06 - Change to debug.
|
||||||
|
ourLog.info("Have expanded {} designations for Concept[{}|{}] in ValueSet[{}]", theDesignationsExpanded, theConcept.getSystem(), theConcept.getCode(), theValueSet.getUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1818,6 +1822,7 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
|
||||||
ourLog.info("Done storing TermConceptMap[{}]", termConceptMap.getId());
|
ourLog.info("Done storing TermConceptMap[{}]", termConceptMap.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: DM 2019-09-05 - Return to 600000
|
||||||
@Scheduled(fixedDelay = 600000) // 10 minutes.
|
@Scheduled(fixedDelay = 600000) // 10 minutes.
|
||||||
@Override
|
@Override
|
||||||
public synchronized void preExpandDeferredValueSetsToTerminologyTables() {
|
public synchronized void preExpandDeferredValueSetsToTerminologyTables() {
|
||||||
|
|
Loading…
Reference in New Issue