Page MenuHomec4science

QueryType.java
No OneTemporary

File Metadata

Created
Thu, Jun 6, 00:16

QueryType.java

package ch.epfl.lca1.medco;
import ch.epfl.lca1.medco.i2b2.crc.I2B2QueryRequest;
import ch.epfl.lca1.medco.util.Logger;
import edu.harvard.i2b2.crc.datavo.pm.RolesType;
import edu.harvard.i2b2.crc.datavo.setfinder.query.ResultOutputOptionType;
public enum QueryType {
OBFUSCATED_PER_SITE,
AGGREGATED_PER_SITE,
AGGREGATED_TOTAL;
public static QueryType getResultQueryTypeFromQueryRequest(I2B2QueryRequest queryRequest) {
//TODO add the type to the queryRequest on i2b2 and then implement this
// if not defined, lowest
return AGGREGATED_PER_SITE;
}
/**
* i2b2 permissions: DATA_OBFSC / DATA_AGG / DATA_LDS / DATA_DEID / DATA_PROT
*
* @return
*/
public static Boolean resolveUserPermission(I2B2QueryRequest queryRequest, RolesType pmRoles) {
// ifnothing -> lowest
// todo implement me
for (ResultOutputOptionType qt : queryRequest.getOutputTypes()) {
Logger.warn("Riccardo: " + qt.getFullName() + " " + qt.getName() + " " + qt.getDisplayType());
}
return true;
}
}

Event Timeline