Views documentation¶
Documentation regarding views defined on the cube.
piws.views.highcharts_views
: HighChartsBasicPieView¶
All the views designed in this section are based on the ‘highcharts’ JavaScript library. The aim here is to propose a bunch of views to summarize the database content.
User Views¶
highcharts_views.HighChartsBasicPieView ([...]) |
Create a basic pie chart using highcharts. |
highcharts_views.HighChartsRelationSummaryView ([...]) |
Create a basic table view that summarized an entity relation. |
highcharts_views.HighChartsBasicPlotView ([...]) |
Create a basic plot using highcharts. |
piws.views.longitudinal_views
: Longitudinal views¶
When dealing with multiple timepoints, it is crucial to display the scores of a subject at these timepoints.
-
class
cubes.piws.views.longitudinal_views.
QuestionnaireLongitudinalView
(req=None, rset=None, **kwargs)[source]¶ Create a view that summarized the longitudinal material for a subject.
-
call
(rset=None, patient_id='', **kwargs)[source]¶ Method that will create the subject longitudinal views.
If no resultset are passed to this method, the current resultset is used.
Only digits answers are considered.
Parameters: rset: resultset (optional, default None) :
a cw resultset
patient_id: string (optional, default None) :
the patient identifier.
-
piws.views.table_views
: Table views¶
All the views designed in this section are based on the ‘datatables’ JavaScript library. Such views are convenient to display questionnaires associated answers or huge dataset as we may be confronted when treating genetic data.
User Views¶
The ‘JhugetableView’ class will send a single request to the server and then everything will be deported to the client. The ‘JtableView’ will interact with the server each time the user interact with the JavaScript table (ie, paging, sorting, ....).
table_views.JHugetableView ([req, rset]) |
Create a table view with DataTables. |
table_views.JtableView (*args, **kwargs) |
Create a table view with DataTables. |
Derived Views¶
table_views.FileAnswerTableView ([req, rset]) |
QuestionnaireRuns table view when subject questionnaires are inserted using the QuestionnaireRun -> file -> File strategy, ie. |
Export Views¶
table_views.PIWSCSVView ([req, rset]) |
Dumps table data in CSV: used by ‘jtable-table’ view. |
Ajax inner callbacks¶
table_views.get_open_answers_data (self) |
Get the subject answer data. |
table_views.get_questionnaires_data (self) |
Get the questionnaires data. |
piws.views.primary
: Primary views¶
Each entity content is displayed with a primary view.
-
class
cubes.piws.views.primary.
PIWSFilePrimaryView
(req=None, rset=None, **kwargs)[source]¶ Specific view for File entities where binary content has to be displayed.
-
class
cubes.piws.views.primary.
PIWSPrimaryView
(req=None, rset=None, **kwargs)[source]¶ Default primary view rendering.
-
_prepare_side_boxes
(entity)[source]¶ Create the right relation boxes to display.
This is a common functionality to learn the schema by browsing the database content that will enalbe the users to phrase direct RQL to get their data.
In the case of ‘FileSet’ object, go directly to the associated ‘ExternalResource’ if only one ‘FileSet’ has been specified.
-
piws.views.secondary
: Secondary views¶
A request may returns a bunch of results that are displayed in a list where each returned entity is displayed with a secondary view.
-
class
cubes.piws.views.secondary.
BaseOutOfContextView
(req=None, rset=None, **kwargs)[source]¶ Default secondary view rendering.
-
class
cubes.piws.views.secondary.
OutOfContextAssessmentView
(req=None, rset=None, **kwargs)[source]¶ Assessment secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextCWSearchView
(req=None, rset=None, **kwargs)[source]¶ CWSearch secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextCWUploadView
(req=None, rset=None, **kwargs)[source]¶ CWUpload secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextDeviceView
(req=None, rset=None, **kwargs)[source]¶ Device secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextExternalFileView
(req=None, rset=None, **kwargs)[source]¶ ExternalFile secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextFileSetView
(req=None, rset=None, **kwargs)[source]¶ FileSet secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextFileView
(req=None, rset=None, **kwargs)[source]¶ File secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextGenomicMeasureView
(req=None, rset=None, **kwargs)[source]¶ GenomicMeasure secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextGenomicPlatformView
(req=None, rset=None, **kwargs)[source]¶ GenomicPlatform secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextProcessingRunView
(req=None, rset=None, **kwargs)[source]¶ ProcessingRun secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextQuestionView
(req=None, rset=None, **kwargs)[source]¶ Question secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextQuestionnaireRunView
(req=None, rset=None, **kwargs)[source]¶ QuestionnaireRun secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextQuestionnaireView
(req=None, rset=None, **kwargs)[source]¶ Questionnaire secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextRestrictedFileView
(req=None, rset=None, **kwargs)[source]¶ RestrictedFile secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextScanView
(req=None, rset=None, **kwargs)[source]¶ Scan secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextSnpView
(req=None, rset=None, **kwargs)[source]¶ Snp secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextSubjectView
(req=None, rset=None, **kwargs)[source]¶ Subject secondary rendering.
-
class
cubes.piws.views.secondary.
OutOfContextUploadFieldView
(req=None, rset=None, **kwargs)[source]¶ UploadField secondary rendering.