All the operations exposed by this data source plugin to the TI Note Data Manager runtime are listed here, with their supported parameters, results, and output data objects shared IDs.
Exploration of the concepts of the tree-like ontology.
{
"path": "/TEST/test",
"operation": "children|info",
"limit": "200"
}
path
: path to the requested conceptoperation
:info
: request metadata about the concept itselfchildren
: request children of the concept (both concepts and modifiers)
limit
: maximum number of ontology elements returned by the search operation (optional, default to the value defined at datasource creation). To return all found elements, it must be set to 0.
{
"searchResult": [{
"path": "/TEST/test",
"appliedPath": "x",
"name": "x",
"displayName": "x",
"code": "x",
"comment": "x",
"type": "concept|concept_container|concept_folder|modifier|modifier_container|modifier_folder|genomic_annotation",
"leaf": true,
"metadata": {
"valueMetadata": {
"creationDateTime": "x",
"dataType": "PosInteger|Integer|Float|PosFloat|Enum|String",
"enumValues": "x",
"flagsToUse": "x",
"OkToUseValues": "Y",
"testID": "x",
"testName": "x",
"unitValues": [
{
"convertingUnits": [
{
"multiplyingFactor": "x",
"units": "x"
}
],
"equalUnits": "x",
"excludingUnits": "x",
"normalUnits": "x"
}
]
}
}
}]
}
searchResult
: array of results, either concepts or modifierspath
: path to the modifier or conceptappliedPath
: path(s) onto which the modifier applies (if a modifier)name
: name of the elementdisplayName
: nicely formatted name of the elementcode
: i2b2 two-elements codecomment
: comment that can be used as tooltiptype
: type of the elementconcept
: conceptconcept_container
: concept with children, queryableconcept_folder
: concept with children, not queryablemodifier
: modifiermodifier_container
: modifier with children, queryablemodifier_folder
: modifier with children, not queryablegenomic_annotations
: genomic annotation
leaf
: true if element is a leaf, i.e. does not have childrenmetadata
: some additional metadata (refer to the (i2b2 doc)[https://community.i2b2.org/wiki/display/DevForum/Metadata+XML+for+Medication+Modifiers] for details.)
Exploration of the modifiers of the tree-like ontology.
{
"path": "/TEST/modifiers/",
"appliedPath": "/test/%",
"appliedConcept": "/TEST/test/1/",
"operation": "concept|children|info",
"limit": "200"
}
path
: path to the requested modifier or conceptappliedPath
: path(s) onto which the modifier appliesappliedConcept
: concept onto which the modifier appliesoperation
:info
: request metadata about the modifier itselfchildren
: request children of the modifierconcept
: request modifiers of the requested concept
limit
: maximum number of ontology elements returned by the search operation (optional, default to the value defined at datasource creation). To return all found elements, it must be set to 0.
See results of searchConcept
.
Search the elements (both concepts and modifiers) of the ontology.
{
"searchString": "xxxx",
"limit": "1000"
}
searchString
: string to search for in concepts and modifiers names.limit
: maximum number of returned ontology elements (default 10).
See results of searchConcept
.
Retrieve patient IDs from i2b2 based on explore query terms. See i2b2 CRC API for more details.
{
"id": "99999999-9999-9999-9999-999999999999",
"patientList": true,
"definition": {
"selectionPanels": [{
"not": false,
"timing": "any|samevisit|sameinstancenum",
"cohortItems": ["cohortName0", "cohortName1"],
"conceptItems": [{
"queryTerm": "/TEST/test/1/",
"operator": "EQ|NE|GT|GE|LT||LE|BETWEEN|IN|LIKE[exact]|LIKE[begin]|LIKE[end]|LIKE[contains]",
"value": "xxx",
"type": "NUMBER|TEXT",
"modifier": {
"appliedPath": "/test/1/",
"key": "/TEST/modifiers/1/"
}
}]
}],
"sequentialPanels": [{
}],
"sequentialOperators": [{
"whichDateFirst": "STARTDATE|ENDDATE",
"whichObservationFirst": "FIRST|LAST|ANY",
"when": "LESS|LESSEQUAL|EQUAL",
"whichDateSecond": "STARTDATE|ENDDATE",
"whichObservationSecond": "FIRST|LAST|ANY",
"spans": [{
"value": 5,
"units": "HOUR|DAY|MONTH|YEAR",
"operator": "LESS|LESSEQUAL|EQUAL|GREATEREQUAL|GREATER"
}]
}],
"timing": "any|samevisit|sameinstancenum"
},
"outputDataObjectsSharedIDs": [
{
"name": "count",
"sharedID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
{
"name": "patientList",
"sharedID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxy"
}
]
}
id
: ID of the query, must be an UUIDpatientList
: true if you want to retrieve the patient IDs from i2b2 and store them in TI4Health (used for queries run by user who can retrieve tha patient list)definition
: definition of the explore queryselectionPanels
: panels of the explore query (linked together by an AND)not
: true if the panel is invertedtiming
: timing of the panelany
: no constrain (default)samevisit
: constrain to the same visitsameinstancenum
: constrain to the same instance number
cohortItems
: array of explore query IDs (linked together by an OR)conceptItems
: array of concepts (linked together by an OR)queryTerm
: path to the queried conceptoperator
: apply an operator to the queried conceptEQ
: equal (type=NUMBER)NE
: not equal (type=NUMBER)GT
: greater (type=NUMBER)GE
: greater or equal (type=NUMBER)LT
: less (type=NUMBER)LE
: less or equal (type=NUMBER)BETWEEN
: between values, value example: "100 and 200" (type=NUMBER)IN
: value among set, value example: "('NEG','NEGATIVE')" (type=TEXT)LIKE[exact]
: string is equal to (type=TEXT)LIKE[begin]
: string begins with (type=TEXT)LIKE[end]
: string ends with (type=TEXT)LIKE[contains]
: string contains (type=TEXT)
value
: value to use with operatortype
: type of conceptNUMBER
: numeric typeTEXT
: string type
modifier
: apply a modifier to the queried conceptAppliedPath
: path(s) onto which the modifier appliesKey
: path of the modifier
timing
: timing of the queryany
: no constrain (default)samevisit
: constrain to the same visitsameinstancenum
: constrain to the same instance number
sequentialPanels
: sequential panels of the explore query (linked together by a sequential operator, and with theselectionPanels
by an AND)sequentialOperators
: operators determining the temporal relations between thesequentialPanels
. The element at positioni
determines the relation between the panels at positionsi
andi + 1
.
The observations identified by the first panel occur before the observations identified by the second panel if
thewhichDateFirst
of thewhichObservationFirst
observation in the first panel
occurswhen
[byspans[0]
[andspans[1]
]] than
thewhichDateSecond
of thewhichObservationSecond
observation in the second panelwhichDateFirst
: the date to be considered to determine the time of the first panelSTARTDATE
: the start date of the observation (default)ENDDATE
: the end date of the observation
whichObservationFirst
: the observation to be considered to determine the time of the first panelFIRST
: the first observation (default)LAST
: the last observationANY
: any observation
when
: the relation between the time of the first panel and the time of the second panelLESS
: before (default)LESSEQUAL
: before or at the same timeEQUAL
: at the same time
whichDateSecond
: the date to be considered to determine the time of the second panelSTARTDATE
: the start date of the observation (default)ENDDATE
: the end date of the observation
whichObservationSecond
: the observation to be considered to determine the time of the second panelFIRST
: the first observation (default)LAST
: the last observationANY
: any observation
spans
: optionally add a time constraint towhen
, e.g. it specifies the difference between the time of the first panel and the time of the second panel (e.g. by 1 and 3 months).
It contains max 2 elements, the first one being the left endpoint of the time constraint, the second the right one.value
: numeric value of one of the endpoint of the time constraintunits
: the units of the time constraintHOUR
DAY
MONTH
YEAR
operator
:LESS
LESSEQUAL
EQUAL
GREATEREQUAL
GREATER
outputDataObjectsSharedIDs
: the mapping between the names of the dataobjects generated by the operation and the related shared IDs
count
: integer containing the count of patientspatientList
: vector of integers containing the patient IDs
Retrieve the list of saved cohorts.
{
"projectID": "99999999-9999-9999-9999-999999999999",
"limit": 10
}
projectID
: ID of the project to which the cohorts to retrieve are linkedlimit
: max number of cohorts to retrieve
{
"cohorts": [{
"name": "Cohort 1",
"creationDate": "xxx",
"exploreQuery": {
"id": "99999999-9999-9999-9999-999999999999",
"creationDate": "xxx",
"status": "running|success|error",
"definition": {},
"outputDataObjectsSharedIDs": {
"count": "xxx",
"patientList": "xxx"
}
}
}]
}
cohorts
: array of cohortsname
: name of the cohortcreationDate
: date of the creation of the cohortexploreQuery
: the query tied to the cohortid
: identifier of the querycreationDate
: date of the creation of the querystatus
: status of the queryrunning
: query is runningsuccess
: query successfully ranerror
: query has errored
definition
: definition of the query (see above for syntax)
outputDataObjectsSharedIDs
:count
: data object shared ID of the countpatientList
: data object shared ID of the patient list
Add a cohort.
{
"name": "Cohort 1",
"projectID": "99999999-9999-9999-9999-999999999999",
"exploreQueryID": "99999999-9999-9999-9999-999999999999"
}
name
: name of the cohortprojectID
: ID of the project to which the cohort to create is linkedexploreQueryID
: query to associate to the cohort
Delete a cohort.
{
"name": "Cohort 1",
"exploreQueryID": "99999999-9999-9999-9999-999999999999"
}
name
: name of the cohortexploreQueryID
: query associated to the cohort
Run survival query.
{
"id": "99999999-9999-9999-9999-999999999999",
"cohortQueryID": "xxxx",
"startConcept": "xxxx",
"startModifier": {
"modifierKey": "xxxx",
"appliedPath": "xxxx"
},
"startsWhen": "earliest|latest",
"endConcept": "xxxx",
"endModifier": {
"modifierKey": "xxxx",
"appliedPath": "xxxx"
},
"endsWhen": "earliest|latest",
"timeGranularity": "day|week|month|year",
"timeLimit": 10,
"subGroupsDefinitions": [
{
"name": "xxxx",
"constraint": {
}
}
],
"outputDataObjectsSharedIDs": [
{
"name": "survivalQueryResult",
"sharedID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
]
}
id
: ID of the survival query, must be an UUIDcohortQueryID
: ID of the query which generated the cohortstartConcept/endConcept
: survival start/end conceptstartModifier/endModifier
: survival start/end modifiermodifierKey
: modifier keyappliedPath
: modifier applied path
startsWhen/endsWhen
: indicates which occurrence of the start/end event to take into account (earliest|latest)timeGranularity
: granularity of the bins of the survival query (day|week|month|year)timeLimit
: time limit (how many bins) to consider for the survival querysubGroupsDefinitions
: subgroups definitionsname
: name of the subgroupconstraint
:definition
as defined in exploreQuery parameters
outputDataObjectsSharedIDs
: the mapping between the names of the dataobjects generated by the operation and the related shared IDs
survivalQueryResult
: vector of integers containing the flattened event groups
Each event group is flattened as a vector of 1 + 2n elements, where n is the number of group's time points.
The element at position 0 contains the initial count for the group, and each couple of following elements contains
the aggregated number of events of interest and the aggregated number of censoring events for each time point in the group.
All flattened event groups are concatenated in survivalQueryResult
, whose size is then m(1 + 2n), where m is the number of event groups.
Run statistics query.
{
"id": "99999999-9999-9999-9999-999999999999",
"constraint": [
],
"analytes": [
],
"bucketSize": 1.5,
"minObservations": 2,
"outputDataObjectsSharedIDs": [
{
"name": "statisticsQueryResult",
"sharedID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
]
}
id
: ID of the statistics query, must be an UUIDconstraint
:definition
as defined in exploreQuery parametersanalytes
: the concepts (seeconceptItems
in "exploreQuery") used as analytes of the statistics querybucketSize
: bucket size for each analyte (float64)minObservations
: the minimum observation value for each analyteoutputDataObjectsSharedIDs
: the mapping between the names of the dataobjects generated by the operation and the related shared IDs
statisticsQueryResult
: matrix of integers containing the number of observations for each analyte and each bucket. Each row of the matrix represents one analyte, each column of the matrix represents a bucket. The element of the matrix at position (i, j) contains the number of observations for the j-th bucket of the i-th analyte.