next up previous contents
Next: Transparent Handling of DBMS Up: Clinical Data Queries Previous: Clinical Data Queries   Contents

Assessment Query Builder Wizard

The SelAs.jsp is the page where the assessment on which scores the query will built, is selected. The controller is SelectAssessmentAction. Also, in this page one of saved query templates can be loaded. The form bean is AsQueryBuilderForm.

The CollectQuery.jsp is the page where the user constructs a query on the scores from asssessments he/she selected. The controller is AsQueryAction.java and the form bean is AsQueryBuilderForm.java. The Struts action path /collectquery dispatches the assessment query to AsQueryAction which forwards the results to SvResults.jsp page.

AsQueryAction handles query build and submission to one or more databases (doQuasiMediatedQuery ), going to previous wizard page or saving the query for later usage as a template.

In AsQueryAction.doQuasiMediatedQuery, first the user query input is validated, then an operator tree (intermediate representation of the query) which is traversed by visitors to generate an SQL query or XML representation etc, is generated. For the derived data, another operator tree is generated, if there are any derived data related queries. The MultiSiteQueryHelper is responsible for preparing queries for multiple databases and sending them to the connected databases in parallel and combining the results. The parallel queries are handled by MultiSiteQueryWorker classes, which delegate the query submission to DebugAssessmentService or DerivedDataService classes, calling either queryForScores() or getSubCorticalValuesForSubjects() methods.

The DerivedDataService.queryForScores() method uses the visitor MultiSiteAssessmentQueryBuilder to build the SQL query for the given site.

The query results are prepared by AsQueryHelper.processQueryResults() method.

The query results are displayed by SVresults.jsp grouped by subject. Subject details drilldown is thru the generated links in SvResults.jsp which dispatch the request to action /subvisit handled by the controller SubjectVisitAction.java and the subject details are shown in SubjectVisit.jsp.


next up previous contents
Next: Transparent Handling of DBMS Up: Clinical Data Queries Previous: Clinical Data Queries   Contents
Burak Ozyurt 2008-03-28