Overview

Documents process for creating, editing, and deleting Reports and QA Checks and attaching them to map projects.

Creating Report and QA Check Definitions

Reports and QA Checks share the same basic structure, but behave differently in the application.  There are three types of report:

Reports, Difference Reports, and QA Checks can be defined via the Application Administration widget.  To create definitions:

 

Creating Report and Difference Report Definitions

Open the tab labeled Report Definitions and scroll down below the paged list of existing definitions until you see this blank form:

Basic Report Parameters

For both basic Reports and Difference Reports, the following parameters must be specified:

Note that the Query parameter has no input box;  this only appears once a non-difference/basic Report is specified.

Non-Difference Report Parameters

If a non-difference (basic) report (i.e., "Is Diff Report?" is set to "false"), an additional parameter appears:

where Query Type can be set to the following values:

Constructing Queries

When a non-difference report is specified, the Query input area becomes available.  Queries are required to return a list of three items:

For SQL, the query format must follow the following pattern:

select [RESULT] value, [RESULT] itemId, [RESULT] itemName
from table1 table_abbr1, table2 table_abbr2, ...
where [CRITERIA] 

For HQL, the query format must follow the following pattern:

select [RESULT] as value, [RESULT] as itemId, [RESULT] as itemName
from object1 object_abbr1, object2 object_abbr2, ...
where [CRITERIA]

Dynamic parameters are available for query criteria.  All are of the format :NAME:.  The available dynamic parameters are:

Parameter

Description

:MAP_PROJECT_ID:Restricts results to the project this definition is attached to. WARNING: If not specified, results may include erroneous results from other projects.
:SOURCE_TERMINOLOGY:The source terminology of the map project
:SOURCE_TERMINOLOGY_VERSION:The source terminology version of the map project
:DESTINATION_TERMINOLOGY:The destination terminology of the map project
:DESTINATION_TERMINOLOGY_VERSION:The destination terminology version of the map project
:EDITING_CYCLE_BEGIN_DATE:The date when this particular editing cycle began
:LATEST_PUBLICATION_DATE:The date at which all previous editing cycle work was completed and released
:TIMESTAMP:

Adds a timestamp restriction to the query. This is only meaningful when constructing historical data, i.e. running reports for dates other than today.
For generating current reports, this field has no meaning, as it is replaced by the current date.

:PREVIOUS_SOURCE_TERMINOLOGY_VERSION:The last version of the source terminology before the latest version currently in use for the map project
:PREVIOUS_DESTINATION_TERMINOLOGY_VERSION:The last version of the destination terminology before the latest version currently in use for the map project.

An example is shown below, for the "Specialist Productivity" report.  This report returns, by user name, the list of concepts for which editing is complete and that user participated in the editing process

select mu.userName value, mr.conceptId itemId, mr.conceptName itemName 
from map_records mr, map_projects mp, map_records_origin_ids mroi, map_records_AUD mra, map_users mu 
where mp.id = :MAP_PROJECT_ID: 							
  and mra.mapProjectId = mp.id 								
  and mr.id = mroi.id and 								
  mroi.originIds = mra.id 							
  and mra.owner_id = mu.id 
  and mr.workflowStatus IN ('READY_FOR_PUBLICATION') 
  and mu.userName != 'loader' 				
  and mr.lastModified <= :TIMESTAMP: 					
  and mr.lastModified >= :EDITING_CYCLE_BEGIN_DATE:    
  group by mu.userName, mr.lastModified 				
  order by 1,2;											

Note that the "group" and "order" commands are included only for visual inspection of query output, and are not necessary for constructing reports.

Adding the Report Definition

For Difference Report Definitions, simply click "Submit" to add the definition.  For basic Report Definitions, the query must be tested for successful result retrieval before the Report Definition can be added.

 Until the query successfully completes, the "Submit" button is disabled and the "Test" button is enabled, as shown:

If a query fails to complete, a red alert box containing the reason for failure will be displayed.  For example:

Once the query successfully passes testing, a green alert box will appear prompting you to save the Report Definition, and the "Submit" button will be enabled:

Click "Submit" to add the Report Definition.  Note that altering either "Query Type" or "Query" after testing will require re-testing the modified query.

Difference Report Parameters

If a difference report is specified (i.e. "Is Diff Report?" is set to "true"), two additional parameters become available:

where Diff Report Time Period specifies the time period over which differences are calculated, and can be set to:

and Diff Report Base Definition specifies the basic report from which differences will be calculated, e.g. "Specialist Productivity").  All non-difference/non-QA Check report definitions appear in a picklist for selection.

Queries are automatically constructed for difference reports, and do not require user entry.

Editing a report definition

To edit a previously created report definition, open the Reports tab and search/scroll to the desired definition.  

Editing any parameter other than "Query Type" or "Query" will cause a "Save" and "Cancel" button to appear on the right.  Click "Save" to update the definition, or "Cancel" to revert any changes.

When "Query Type" or "Query" are changed, a "Test" button appear in the same fashion as described for creating a Report Definition.  Once the query returns successfully, click "Save" to update the report definition, or "Cancel" to revert your changes.

Deleting a report definition

WARNING:  Deleting a report definition will also delete any reports created from this definition, and remove the definition from any projects it is currently attached to.

To delete a report definition, search/scroll to its entry on the paged list of report definitions and click the "X" at the top right of the entry.  A prompt will appear requesting confirmation. If a report definition is currently attached to existing projects, a second prompt will require additional confirmation.

QA Checks

Creating QA Checks is similar to the process for creating Report Definitions, except that:

Queries for QA Checks must also be tested before submitting the definition;  see Adding a Report Definition for details.

Editing and deleting QA Checks is performed in the same way as editing or deleting Report Definitions.

Attaching Report and QA Check Definitions to Projects

Reports and QA Checks are considered project metadata.  Once created, they can be added to the project from the Project Details widget (see Adding Metadata to a New Project).

References/Links