Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add summary service #108

Closed
t-abdul-basser opened this issue Jun 14, 2016 · 3 comments
Closed

Add summary service #108

t-abdul-basser opened this issue Jun 14, 2016 · 3 comments
Milestone

Comments

@t-abdul-basser
Copy link
Contributor

t-abdul-basser commented Jun 14, 2016

Enhance WebAPI so that it features a summarization/characterization service. The proposed service would accept requests for and respond with data directly from the Achilles results table, rather than from the Achilles-exported JSON files. The data from the service could then be used to populate the visualizations in Atlas (Datasources).

This issue is potentially part of the Achilles integration effort that may subsume issue #49.

@mark-velez
Copy link
Contributor

Does this require the addition of another daimon? Daimons delineate capabilities a source may or may not have and enable one to qualify tables that are associated with those capabilities. It is possible that a site/source will not have the achilles data (yet). At Columbia the achilles results tables are located in a different schema (if not database) from tables associated with existing daimons; a new daimon would enable WebAPI to find and use the right table prefix in the queries it executes.

@t-abdul-basser
Copy link
Contributor Author

t-abdul-basser commented Jun 14, 2016

Yes, the implementation that I am working on would require the deployment of the results daimon.

@t-abdul-basser t-abdul-basser changed the title Add summarization/characterization service Add summarization service Jun 15, 2016
@t-abdul-basser t-abdul-basser changed the title Add summarization service Add summary service Jun 15, 2016
@mark-velez
Copy link
Contributor

Thanks @t-abdul-basser, I didn't realize the achilles tables were expected to be in the tables associated with the results daimon.

@fdefalco fdefalco added this to the V1.3.0 milestone Jun 16, 2016
@chrisknoll chrisknoll modified the milestones: V1.3.1, V1.3.0 Aug 15, 2016
t-abdul-basser added a commit to t-abdul-basser/WebAPI that referenced this issue Jan 11, 2017
* add initial set of refactored class for summary service

* Added SQL for summary service functionality. See issue OHDSI/issues/108

* imported SQL file from Achilles Export2JSON, add'l refactoring of CDMResultsService impl

* added stub method for retrieval of drug and procedure reports to CDMResultsService

* Demographic Criteria Implementation.

* Removed BETWEEN usage in criteria
A BETWEEN X and Y becomes A >= X and A <= Y.  BETWEEN is not consistent between all db platforms.

* Incidence Rate Analysis Implementation
Implementation of Incidence Rate web services, tasklets and repositories and IR Analysis Report Generation.
Added new dependency: apache commons collections v4.1.

* Remove BETWEEN expression from numeric and date range criteria input types.

* Add null check for correlated criteria end date.
Existing cohorts will have this null, so a null check is required.

* enhancements for person profile service and cohort comparison service

* sql syntax error

* Fix to allow more than 1 person per cohort.

* Flyway deployment scripts for postgreSQL and Oracle.

* adding outcome model retrieval and updates to comparative cohort analysis

* Negative controls implementation
	modified:   src/test/java/org/ohdsi/webapi/test/feasibility/StudyInfoTest.java

* ConceptSet optimization and comparison utilities

* ConceptSet utilties

* Moving GenerationStatus enum

* Delete concept sets per OHDSI/Atlas#87

* Fixing ir calc flyway script for postgreSql

* sql cleanup

* Flyway fixes for sql server

* Fixed oracle migration scripts.

* Added @generated to NegativeControlRecord.

JPA will manage this entity's auto-number.

* Fix IR Strata TAR.

IR Strata was not calculating TAR in years.

* resolve interface changes with r packages

* logging

* resolve missing placeholder

* made several sql translation changes

* moved mappers and model objects to report package in prep for refactoring.

* added DTO  to report package and stubbed out service and runner classes.

* Use same method (getTreemap) for all (non-temporal) treemaps

* Add generic row mapper, text hack impls

* new drugService call: http://localhost:8080/WebAPI/OPTUM-PDW/drugexp/personId/33034143174.  working as is, but planning to add some fields and allow drug_concept_id to be specified in addition to or instead of person_id

* Meant to push this to fork and then make pull request. Reverting.
Revert "new drugService call: http://localhost:8080/WebAPI/OPTUM-PDW/drugexp/personId/33034143174.  working as is, but planning to add some fields and allow drug_concept_id to be specified in addition to or instead of person_id"

This reverts commit 19fee59.

* Reverting revert. Will push this to fork instead of ohdsi
Revert "Meant to push this to fork and then make pull request. Reverting."

This reverts commit 14e1f79.

* made the same mistake twice.
Revert "Reverting revert. Will push this to fork instead of ohdsi"

This reverts commit 5b699ad.

* Fix OHDSI#137

Updated criteria group query to left join to @eventTable to capture events that matched 0 of the criteria in the group.

* Cohort def optimizations (OHDSI#142)

* Make first occurrence of event deterministic.

Added order by _date, _id to criteria queries to use the event ID as the tiebreaker.

Fixes OHDSI#139.

* Cohort Definition Query Optimization

Optimized #primary_events and #qualified_events into single query, eliminating one temp table creation.
Partitioning on person_id for event_ids allowing MPP architectures to leverage hashing on person_id.

Fixes OHDSI#141.

* Added proper partitioning on person and event for gain counts.

* Switched from qualified_events to included_events for end date selection.

* Fixes OHDSI#144.

Removed ExceptionHandler from generate cohort step; it was masking the failed job completion status by returning 'COMPLETED' after failure.

* Use same method (getTreemap) for all (non-temporal) treemaps

* Add generic row mapper, text hack impls

* Reformat cdmresults sql scripts

* Use AS keyword in all cdm report query aliases

* Remove text hack and camel case column names in cdm report queries

* Replace all treemap endpoints with a single generic implementation

 * Rename all treemap CDM report files to treemap.sql
 * Enquote aliases in CDM report queries to preserve case
 * Add GenericRowMapper ctor with ObjectMapper for performance
 * CDMResultsAnalysisRunner.getTreemap returns ArrayNode

* Fix condition CDM results queries (by concept)

 * include conceptId parameter
 * rename sqlAgeAtFirstDiagnosis to sqlAgeAtFirstOccurrence
 * modify sqlConditionsByType to check vocabulary_id, not domain_id
 * cast xCalendarYear to INT in sqlPrevalenceByGenderAgeYear

* Fix queries associated with generic drilldown reports

 * Data types include conditionera, drug, drugera, measurement, observation, procedure, visit
 * Queries include AgeAtFirstOccurrence, PrevalenceByGenderAgeYear, ByType, ByMonth
 * Include parameter @conceptId
 * Cast xCalendarYear to INT (where applicable)

* Remove obsoleted code from CDMResultsService (activates observation reports)

* Standardize names of "by type" query files for cdm reports to sqlByType.sql

Applies to condition, drug, measurement, observation, procedure

* Add cdm_database_schema to CDMResultsAnalysisRunner standard columns (for measurement treemap)

* Fix typo in sqlVisitDurationByType.sql

* added fixes to row mapping in /person and dashboard

* implemented /achillesheel, /datadensity
started implementation of /death
refactored CohortAttributeMapper --> CDMAttributeMapper
created new report data objects
drop unused/superfluous CDMResultsAnalysisRunner

* Fixes for demographic criteria. (OHDSI#146)

* Added correct fields to select to match UNION of other criteria queries.
* Change IR Analysis strata queries to properly partition by person_id.

* Updated sql to match SqlRender 

SqlRender does not support 'TOP' instruction, changed

* HTTP verb normalization

POST = create
PUT = update

Fixes OHDSI#147.

* fixed /datadensity

* IR Enhancments

Calculate distribution of Time At Risk and Time to Outcome.
Provide new export to zip function to export definition and raw data from analysis results.

* Cohort Definition Correlated Criteria

Extends cohort definition criteria to allow specification of a criteria group whose members must result in a true result in order for the criteria to be satisfied.

* Allow censoring criteria in cohort definitions.

* Gracefully handle empty criteria groups in cohort definitions.

Fixes OHDSI#155

* cleaned up and changes /achillesheel --> /heel

* 	Add cdm_database_schema to CDMResultsAnalysisRunner standard columns as per mark-velez/* #e862d53

* changed endpoint signature (/heel -->/achillesheel), fixed summary yob and yob in person report

* fixed null totalRecords element in Data Density report

* added summary to dashboard report in CDM results service

* implemented death report
@anthonysena anthonysena modified the milestones: V2.0.0, V1.3.1 Jan 20, 2017
chrisknoll pushed a commit that referenced this issue Jan 27, 2017
* ignore IntelliJ files
add'l characterization/summarization work
added SQL files for summary service from Achilles::ExportToJSON
added data transfer objects (DTOs)
modified CDMResultsService, made several sql translation changes, moved
mappers and DTOs to report package in preparation for refactoring.
added add'l DTOs to report package and stubbed out service and runner classes.
fixed imports in some DTOs and RowMappers

* Use same method (getTreemap) for all (non-temporal) treemaps
Add generic row mapper, text hack impls
made several sql translation-related changes
Use same method (getTreemap) for all (non-temporal) treemaps
Use AS keyword in all cdm report query aliases
Remove text hack and camel case column names in cdm report queries
Replace all treemap endpoints with a single generic implementation
 * Rename all treemap CDM report files to treemap.sql
 * Enquote aliases in CDM report queries to preserve case
 * Add GenericRowMapper ctor with ObjectMapper for performance
 * CDMResultsAnalysisRunner.getTreemap returns ArrayNode

Fix condition CDM results queries (by concept)

 * include conceptId parameter
 * rename sqlAgeAtFirstDiagnosis to sqlAgeAtFirstOccurrence
 * modify sqlConditionsByType to check vocabulary_id, not domain_id
 * cast xCalendarYear to INT in sqlPrevalenceByGenderAgeYear

added fixes to row mapping in /person and dashboard

implemented /achillesheel, /datadensity
started implementation of /death
refactored CohortAttributeMapper --> CDMAttributeMapper
created new report data objects
drop unused/superfluous CDMResultsAnalysisRunner

fixed /datadensity

Fix queries associated with generic drilldown reports

 * Data types include conditionera, drug, drugera, measurement, observation, procedure, visit
 * Queries include AgeAtFirstOccurrence, PrevalenceByGenderAgeYear, ByType, ByMonth
 * Include parameter @conceptId
 * Cast xCalendarYear to INT (where applicable)

Remove obsoleted code from CDMResultsService (activates observation reports)

Standardize names of "by type" query files for cdm reports to sqlByType.sql

Applies to condition, drug, measurement, observation, procedure

Add cdm_database_schema to CDMResultsAnalysisRunner standard columns (for measurement treemap)

Fix typo in sqlVisitDurationByType.sql

cleaned up and changes /achillesheel --> /heel

	Add cdm_database_schema to CDMResultsAnalysisRunner standard columns as per mark-velez/* #e862d53

changed endpoint signature (/heel -->/achillesheel), fixed summary yob and yob in person report

fixed null totalRecords element in Data Density report

added summary to dashboard report in CDM results service

implemented death report

removed superfluous code (imports, methods, etc)

Reorganize sql files for cdm drilldowns (to reduce text wrangling) (#2)

* Remove sql prefix from files names
 * Camel-case filename
 * Move drilldown files to folders
 * Delete treemap files that were reverted back

removed unused method - renderDrillDownSql()

changed access modifier on several fields and methods

removed unused test and related resource

made post-rebase reconciliations in prep for PR
anthonysena added a commit that referenced this issue Feb 22, 2017
* Apache Shiro integration.

* Reflect HTTP verb normalization.

* Final updates to Shiro implementation
* Added hibernate dialect to POM.xml.
* Added schema qualifier for FK references in migraiton scripts

* Fixes #108 (#163)

* ignore IntelliJ files
add'l characterization/summarization work
added SQL files for summary service from Achilles::ExportToJSON
added data transfer objects (DTOs)
modified CDMResultsService, made several sql translation changes, moved
mappers and DTOs to report package in preparation for refactoring.
added add'l DTOs to report package and stubbed out service and runner classes.
fixed imports in some DTOs and RowMappers

* Use same method (getTreemap) for all (non-temporal) treemaps
Add generic row mapper, text hack impls
made several sql translation-related changes
Use same method (getTreemap) for all (non-temporal) treemaps
Use AS keyword in all cdm report query aliases
Remove text hack and camel case column names in cdm report queries
Replace all treemap endpoints with a single generic implementation
 * Rename all treemap CDM report files to treemap.sql
 * Enquote aliases in CDM report queries to preserve case
 * Add GenericRowMapper ctor with ObjectMapper for performance
 * CDMResultsAnalysisRunner.getTreemap returns ArrayNode

Fix condition CDM results queries (by concept)

 * include conceptId parameter
 * rename sqlAgeAtFirstDiagnosis to sqlAgeAtFirstOccurrence
 * modify sqlConditionsByType to check vocabulary_id, not domain_id
 * cast xCalendarYear to INT in sqlPrevalenceByGenderAgeYear

added fixes to row mapping in /person and dashboard

implemented /achillesheel, /datadensity
started implementation of /death
refactored CohortAttributeMapper --> CDMAttributeMapper
created new report data objects
drop unused/superfluous CDMResultsAnalysisRunner

fixed /datadensity

Fix queries associated with generic drilldown reports

 * Data types include conditionera, drug, drugera, measurement, observation, procedure, visit
 * Queries include AgeAtFirstOccurrence, PrevalenceByGenderAgeYear, ByType, ByMonth
 * Include parameter @conceptId
 * Cast xCalendarYear to INT (where applicable)

Remove obsoleted code from CDMResultsService (activates observation reports)

Standardize names of "by type" query files for cdm reports to sqlByType.sql

Applies to condition, drug, measurement, observation, procedure

Add cdm_database_schema to CDMResultsAnalysisRunner standard columns (for measurement treemap)

Fix typo in sqlVisitDurationByType.sql

cleaned up and changes /achillesheel --> /heel

	Add cdm_database_schema to CDMResultsAnalysisRunner standard columns as per mark-velez/* #e862d53

changed endpoint signature (/heel -->/achillesheel), fixed summary yob and yob in person report

fixed null totalRecords element in Data Density report

added summary to dashboard report in CDM results service

implemented death report

removed superfluous code (imports, methods, etc)

Reorganize sql files for cdm drilldowns (to reduce text wrangling) (#2)

* Remove sql prefix from files names
 * Camel-case filename
 * Move drilldown files to folders
 * Delete treemap files that were reverted back

removed unused method - renderDrillDownSql()

changed access modifier on several fields and methods

removed unused test and related resource

made post-rebase reconciliations in prep for PR

* Fixes #167 (#168)

* Fixes #170

* removed extraneous folder

* Added support for user-defined OP start and end dates.

* Route cleanup.

Made service routes for CDMResutlsService, CohortResultsService, EvidenceService and Vocabulary service to stem from the url of the service (such as /cdmresults) vs. stemming from a source key.

Added a default handler for vocabulary searching as an example of where it's advantageous to use a route of /vocabulary/search/{query} directly instead of coding to a specific source key (which may not always be available).

Fixes #173.

* Exposing default routes for vocabulary service endpoints that previously required a source key.

* Added WebAPI endpoint: /info.

Currently only contains version information, stored in pom.xml property 'webapi.version'.

Fixes #176.

* Fixes #177

* Fixes #178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants