Skip to content

Commit

Permalink
Revert "[ALS-6344] - Make new query that retuns patient count and con…
Browse files Browse the repository at this point in the history
…cept count"

This reverts commit 5fa91ad.
  • Loading branch information
Luke-Sikina authored Jul 1, 2024
1 parent 92310df commit 76b763a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,5 @@ public enum ResultType {
* is suitable to time series analysis and/or loading into another
* instance of HPDS.
*/
DATAFRAME_TIMESERIES,

/**
* Count number of patients and number of available concept paths. Useful for federated networks
* where not every concept path in a query is guaranteed to be in a specific portal
*/
PATIENT_AND_CONCEPT_COUNT
DATAFRAME_TIMESERIES
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,4 @@ public Map<String, Object> runVariantCount(Query query) {
}
return response;
}

public PatientAndConceptCount runPatientAndConceptCount(Query incomingQuery) {
log.info("Starting Patient and Concept Count query {}", incomingQuery.getPicSureId());
log.info("Calculating available concepts");
long concepts = incomingQuery.getFields().stream()
.map(abstractProcessor::nullableGetCube)
.filter(Optional::isPresent)
.count();
log.info("Calculating patient counts");
int patients = runCounts(incomingQuery);
PatientAndConceptCount patientAndConceptCount = new PatientAndConceptCount();
patientAndConceptCount.setConceptCount(concepts);
patientAndConceptCount.setPatientCount(patients);
log.info("Completed Patient and Concept Count query {}", incomingQuery.getPicSureId());
return patientAndConceptCount;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,6 @@ private Response submitQueryAndWaitForCompletion(QueryRequest resultRequest) thr
case COUNT:
return queryOkResponse(countProcessor.runCounts(incomingQuery), incomingQuery).build();

case PATIENT_AND_CONCEPT_COUNT:
return queryOkResponse(countProcessor.runPatientAndConceptCount(incomingQuery), incomingQuery).build();

default:
// no valid type
return Response.status(Status.BAD_REQUEST).build();
Expand Down

0 comments on commit 76b763a

Please sign in to comment.