cohort¶
Limits Solr query patients by ones matching the cohort.
Functions¶
OHDSI.getCohort(cohortId)¶
Returns a list of patients matching the OHDSI cohort id. Will limit patients in the Solr query.
cohort SocialSupportPatients:OHDSI.getCohort(100);
cohort can then be passed as an argument in tasks. For example:
define Widowed:
Clarity.ProviderAssertion({
cohort:SocialSupportPatients,
termset:[WidowedTerms]
});
Clarity.getJobResults¶
Returns a list of patients or documents, matching the job_id and parameters. Will limit patients or documents in the Solr query.
Example:
cohort OpiodPatients:
Clarity.getJobResults({
"context":"patient",
"job_id": 406,
"nlpql_feature":"tookOpioids"
});
Arguments:
Name | Type | Required | Notes |
---|---|---|---|
context | str | Yes | “patient” or “document” |
job_id | int | No | The job_id. Not strictly required, but desirable to select the correct phenotype. |
nlpql_feature | str | No | The feature name used in the NLPQL define |
report_type | str | No | |
pipeline_type | str | No | The NLPQL pipeline feature type (e.g. “ValueExtractor”) |
pipeline_id | int | No | |
subject | str | No | |
phenotype_final | bool | No | Whether the results were tagged as final or not |
<any_generated_feature> | <type> | No | Any feature you wish to filter or that was generated by ClarityNLP. |