Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65755007
QueryType.java
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jun 6, 00:16
Size
1 KB
Mime Type
text/x-java
Expires
Sat, Jun 8, 00:16 (2 d)
Engine
blob
Format
Raw Data
Handle
18122369
Attached To
R4434 MedCo I2b2 Cell
QueryType.java
View Options
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
Log In to Comment