Document history
Date Doc version Ifx version Editor Change
11/10/2006 3 584 HV
21/8/2008 3.1 584 JW Minor changes and screenshot updates for new database.
5/8/2009 3.2 584 JW Screenshot updates for new database
September
2010
4.1 5.40.0100 JW Rewrite.
Removal of QDM and inclusion of advanced analysis functionality.
September
2010
4.1b 5.40.0100 JW Proofreading
August 2012 4.2 5.50.0200 JW Updates for 5.50.0200
New Extract Add-In properties / Extract Add-In as a task.
October 2012 4.2 5.50.0200 JW Tidying up for pdf
Nov 2017 4.3 5.70.0100 JW Removal of charting section (4.15) Remove registering of the Extract Add-in.
Dec 2018 4.3a 5.70.0100 EM Rebranded front cover
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 2
CONTENTS
About this document ...................................................................... 4
1 About the Analysis Module .................................................. 5 1.1 User Permissions ............................................................................ 5 1.2 Loading the Analysis module ......................................................... 5
2 Navigation .............................................................................. 6 2.1 Data view selection ........................................................................ 6 2.2 Query modes .................................................................................. 6 2.3 Query Design Manager .................................................................. 7 2.4 Definition symbols ......................................................................... 7 2.5 Exercise .......................................................................................... 8
3 Dynamic Queries using Default Views and Filters ............ 9 3.1 Navigation in Dynamic Querying .................................................. 9 3.2 Selecting a view ............................................................................10
3.2.1 Default Event Views ..........................................................10 3.2.2 User-Defined Views ..........................................................10
3.3 Selecting a filter ............................................................................11 3.4 Running a dynamic query .............................................................12 3.5 Setting query parameters in dynamic querying mode ...................13
3.5.1 Join.....................................................................................13 3.5.2 Link level ...........................................................................13
3.6 Creating new views and filters in Dynamic querying mode .........14 3.7 Editing views and filters in Dynamic querying mode ...................16 3.8 Creating new queries in Dynamic querying mode ........................17 3.9 Exercise .........................................................................................19
4 Grid functionality ................................................................ 20 4.1 Navigation .....................................................................................20 4.2 Event Identifiers ............................................................................21 4.3 Show Results only .........................................................................22 4.4 Single grid view ............................................................................23 4.5 Clearing queries ............................................................................25 4.6 Duplicate Records .........................................................................26 4.7 Ordering data within a column ......................................................27 4.8 Re-order columns ..........................................................................27 4.9 Selecting cells ...............................................................................28 4.10 Copying cells ................................................................................28 4.11 Code display..................................................................................29 4.12 Filters ............................................................................................30
4.12.1 Applying multiple filters ....................................................32 4.12.2 Editing Filter criteria ..........................................................33 4.12.3 Removing individual a filters.............................................35 4.12.4 Clearing all filters ..............................................................35 4.12.5 Applying filters to different item types ..............................36
4.13 Summarise Data ............................................................................37 4.13.1 Closing the Data Summary ................................................39
4.14 Grouping by column .....................................................................40 4.15 Insert columns ...............................................................................43 4.16 Delete columns..............................................................................43 4.17 Rename columns ...........................................................................44 4.18 Clear columns ...............................................................................44 4.19 Exercise .........................................................................................45
5 Exporting ............................................................................. 46 5.1 Exporting to a file .........................................................................46
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 3
5.2 Exporting to Excel ........................................................................47 5.3 Output to grid ................................................................................48 5.4 Exercise .........................................................................................48
6 Predefined queries .............................................................. 49 6.1 Navigation in Pre-Defined Queries mode .....................................49 6.2 Selecting a Pre-defined Query ......................................................50 6.3 Running a Pre-defined Query ........................................................50 6.4 Defining a new query in Pre-Defined Queries mode ....................52 6.5 Editing existing queries in Pre-Defined Queries mode .................53 6.6 Exercise .........................................................................................54
7 Extract Add-In .................................................................... 55 7.1 Registering the Add-In ..................................................................55 7.2 Configuring the Add-In .................................................................56
7.2.1 Naming the Add-In ............................................................57 7.2.2 Definition tab .....................................................................57 7.2.3 Extract tab ..........................................................................59 7.2.4 SQL tab ..............................................................................62 7.2.5 Saving the Add-In configuration .......................................63 7.2.6 Setting Data View Permissions ..........................................64 7.2.7 Setting User Permissions ...................................................65
7.3 Running the extract add-in ............................................................66 7.4 Configuring further instances of the add-in ..................................67 7.5 Running the Extract Add-In as a task ............................................68 7.6 Exercise .........................................................................................70
8 Pivot Tables ......................................................................... 71 8.1 Creating a pivot table ....................................................................72 8.2 Defining the pivot table .................................................................73 8.3 Displaying the pivot table .............................................................74
8.3.1 Defining specific views for use in pivot tables ..................75 8.4 Pivot table functionality ................................................................76
8.4.1 Filtering .............................................................................76 8.4.2 Re-order rows and columns ...............................................76 8.4.3 Expand and collapse ..........................................................77 8.4.4 Print ...................................................................................78 8.4.5 Export ................................................................................78
8.5 Editing the pivot table definition ...................................................79 8.6 Filtering using the Page item .........................................................80 8.7 Closing the pivot table ..................................................................81 8.8 Exercise .........................................................................................81
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 4
About this document
This document is a reference guide for the InfoFlex Analysis module.
This document can also be used as a training guide in conjunction with the CIMS General training
database. Wherever appropriate, exercises are included at the end of a section.
The exercises in this document use the CIMS General training database.
The Username is training and the Password is training.
Before starting the exercises, you should login to the CIMS General training database, go to Design
Management and ensure that the following domains and data views are unarchived:
Clinical Domain
Clinical Data view
Training Domain
Training Data view
This document assumes that the user is familiar with InfoFlex Design Management 1 and 2 and Query
Design Manager.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 5
1 ABOUT THE ANALYSIS MODULE
The Analysis module uses views, filters and queries defined in a data view (using Query Design
Manager) to return data into an InfoFlex grid, a file or an Excel spreadsheet.
This document explains how to return data into the InfoFlex grid and the grid functionality available
within InfoFlex, how to return data into a file or Excel, and how to use the InfoFlex Extract Add-In
which runs multiple queries into multiple files.
Analysis module users have access to Query Design Manager (data views only) and therefore have
access to queries defined within the Analysis query group within data views. Each user can access the
Global query group and their named query group within the Analysis query group.
This course assumes that the user is familiar with the InfoFlex Design Management module and with
the InfoFlex Query Design Manager.
Query Design Manager will be referred to as QDM throughout this document.
1.1 User Permissions
In order to access the Analysis module, a user should be given module permissions to the Analysis
module, and permissions to whichever data views need to be viewed. It is possible to grant read only
access to the Analysis module. Users with read only access can run queries and view their properties
but cannot create or edit views, filters and queries.
1.2 Loading the Analysis module
To start the analysis module,
either press the Data Analysis button when you first log into InfoFlex.
or if you are already logged into InfoFlex, press the Data Analysis button on the toolbar
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 6
2 NAVIGATION
2.1 Data view selection
Data is accessed from within data views, so on first loading the Analysis module, you should select the
data view from which you wish to view data.
The Data Views Available dropdown list displays all the unarchived data views which the user has
permission to use.
This list can be toggled to dictionary selection.
2.2 Query modes
Two query modes are available.
Dynamic querying mode allows you to return data without defining a query. Each event view in the
data view is defined as a default view and a default filter returning all subjects is available. You can
therefore select an event and view all the data in that event. Additionally, if views and filters have
been defined, you can choose to run any pre-existing view with any pre-existing filter. Query
parameters can be set each time you run a view and filter together.
To switch to Dynamic querying mode, press the Dynamic Queries button on the toolbar or select
Dynamic Queries from the View menu.
Dynamic querying mode is displayed by default on first loading the Analysis module.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 7
Pre-defined queries mode allows you to run queries that have been defined in QDM. You can run
any pre-defined query that has been defined in the selected data view.
To switch to Pre-defined Queries mode, press the Pre-defined Queries button on the toolbar or select
Pre-defined Queries from the View menu.
2.3 Query Design Manager
Query Design Manager can be opened from the Analysis module to allow you to create new views,
filters and queries or to edit existing views, filters and queries.
To open QDM, go to the Actions menu
and choose Query Design Manager
or press the Query Design Manager toolbar button
2.4 Definition symbols
The Analysis module uses the same symbols as QDM to represent view, filter, query and query group
definitions:
represents a query group
represents a query
represents a view
represents a filter
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 8
2.5 Exercise
Log into the InfoFlex CIMS General training database using the username training and the
password training.
Go to the Analysis module and select the Clinical data view.
Use the toolbar buttons to switch between Pre-defined queries and Dynamic Querying modes.
In Pre-defined Queries mode, expand Training group 1 and double click the Referral query.
See how the view and filter are displayed attached to the query. Note that the same symbols as in
QDM are used.
Go to the Actions menu and choose Query Design Manager.
Close QDM.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 9
3 DYNAMIC QUERIES USING DEFAULT VIEWS AND FILTERS
On first selecting the Analysis module, the navigation bar displays Dynamic Querying mode.
Dynamic Querying allows you to retrieve data quickly without actually defining a query.
To retrieve data in Dynamic querying simply select a view and a filter and run them together.
You can make sure that you are in Dynamic Querying mode by checking that the Dynamic Querying
button on the toolbar is switched on.
3.1 Navigation in Dynamic Querying
In Dynamic Querying mode, the navigation bar displays the data view selection as well as a view
selection box, a filter selection box and a Link level section box.
Data view selection
View selection
Filter selection
Link level selection
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 10
3.2 Selecting a view
3.2.1 Default Event Views
By default, the view selection box displays the default Event Views. Each event view in the data view
is defined as a default view. When run with a filter, every item contained in the selected event view
will be returned in the grid.
Default views are indicated by the yellow folder symbol.
To select a default view, double click the event view. A green tick is displayed against the event
view name indicating that this is the view that will be used when the data is retrieved.
3.2.2 User-Defined Views
The view selection box can be toggled to display User-Defined Views.
User-defined views are views that have been defined using QDM. When switched to User-Defined
Views, the view selection box displays all the query groups and views that have been defined in the
Analysis query group in the current data view.
User-Defined views are indicated by the QDM view symbol.
To select a user-defined view, double click the view. A green tick is displayed against the view
name indicating that this is the view that will be used when the data is retrieved.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 11
3.3 Selecting a filter
The filter selection box displays both a default filter and user-defined filters.
The default filter is called All Subjects – no constraints. This means that the items in the chosen
view will be displayed for every patient in the data view.
User-defined filters are filters that have been defined using QDM. The filter selection box displays all
the query groups and filters that have been defined in the Analysis query group in the current data view
All filters are indicated by the QDM filter symbol.
To select a filter, double click the filter. A green tick is displayed against the filter name indicating
that this is the view that will be used when the data is retrieved.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 12
3.4 Running a dynamic query
To run a dynamic query, first ensure that you have selected a view and a filter.
Then press the Run button on the toolbar or right click and choose Run
You can also run queries by going to the Actions menu and choosing Run.
The results are shown in the analysis grid. See section 4 Grid functionality for further information
about grid functionality.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 13
3.5 Setting query parameters in dynamic querying mode
Linking and Joining parameters can be set when running a dynamic query. See the QDM manual for a
full explanation of these parameters. See below for how to set the parameters in dynamic querying
mode.
3.5.1 Join
By default, dynamic queries are run with an inner
join. To set the query to run with an outer join, after
selecting the view and filter, right click and choose
Outer Join. Then run the query.
3.5.2 Link level
The Link Level is set in the Link Level selection box
beneath the Filter selection. By default the box is
disabled and the query is run with the lowest link
level possible.
To set the query to run with a different link level,
select the view and filter then tick the User-Defined
Linking check box. Double click the event which
you wish to set as the common parent. The link
symbol is shown against the event which is set as the
common parent.
Then run the query.
Double click an event to set
it as the common parent.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 14
3.6 Creating new views and filters in Dynamic querying mode
It is possible to create new views and filters from Dynamic Querying mode.
In the view selection box (must be set to
User-Defined Views) or the filter
selection box, right click the query group
in which you wish to define the view or
filter and choose New.
Query Design Manager is opened at the view (or filter) tab, and a new view (or filter) is displayed.
You can name the view (or filter) and configure it as required. When you have finished, save the view
(or filter) then close QDM.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 15
Your new view (or filter) is displayed in the view (or filter) selection box and can be used in a dynamic
query.
(Note that on closing QDM, the new view (or filter) is not automatically selected in Dynamic
Querying).
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 16
3.7 Editing views and filters in Dynamic querying mode
It is possible to edit views and filters from Dynamic query mode.
In the view selection box (must be set to
User-Defined Views) or the filter
selection box, right click the view (or
filter) you wish to edit and choose Edit.
Note that for read only users, the menu
option is called View since read only
users can view but not change any
settings in QDM.
Query Design Manager is opened at the view (or filter) tab, and the view (or filter) that you chose to
edit is selected.
You can edit the view (or filter) as required. When you have finished, save the view (or filter) then
close QDM.
Your view (or filter) is once more displayed in the view (or filter) selection box and is ready to be used
in a dynamic query. (Note that the view (or filter) being edited in QDM will not necessarily be
selected on returning to Dynamic Querying).
Note: You should be aware that any view or filter that you edit may already be used in an existing
query in QDM. Any changes you make may therefore affect an existing query. You should be sure
that any changes you make will not have an impact on any existing query.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 17
3.8 Creating new queries in Dynamic querying mode
It is possible to create a new query from a selected user-defined view and user-defined filter when in
Dynamic querying mode.
To create a query, first select a user-defined view and a user-defined filter in dynamic querying mode.
Then right click and choose Create Query.
A confirmation message is displayed when the query has been created. Choose Yes to view the query
in QDM.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 18
QDM is opened at the Queries tab. The new query is selected. It has been given a name of Query
followed by the date and time it was created.
The query is created with whichever linking and joining parameters were set in dynamic querying
mode. You can now edit the query as appropriate.
On closing QDM, the Data Analysis module still displays Dynamic Querying mode, so the query you
have created will not be visible.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 19
3.9 Exercise
Select Dynamic Querying mode.
Set the view selection box to display Event Views.
Select (double click) the Patient Registration event then press Run. The grid should display all the
data items in the Patient Registration event for all patients.
Select (double click) the Referral event then press Run. The grid should display all the data items in
the Referral event for all patients.
Set the view selection box to display User-Defined Views.
Select the Referral view in Training group 1 then press Run. Check that the grid displays the data
you expect.
In the Filters Available box, select the Referral filter in Training group 1 then press Run.
Creating new views and filters
Set the view selection box to display User-Defined Views.
Create a new view in Training group 2 called View 1. Add some items to the view in QDM, then
save and close QDM.
Ensure your new view is displayed in the User-Defined Views box.
Create a new filter in Training group 2 called Filter 1. Add some criteria to the filter in QDM, then
save and close QDM.
Ensure your new filter is displayed in the Filters Available box.
Editing views and filters
Edit the view you created in Training group 2. Note how QDM opens with the view already selected.
Close QDM.
Edit the filter you created in Training group 2. Note how QDM opens with the filter already selected.
Close QDM.
Creating new queries in dynamic querying mode
Create a new query from the view and filter you have just defined. Edit the query in QDM and name it
Query 1.
Close QDM and switch to pre-defined query mode to check that the query is there.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 20
4 GRID FUNCTIONALITY
The InfoFlex grid displays the data retrieved by a query and also allows the data to be manipulated in a
variety of ways.
Note: Many grid functions rely on the right click menu. However, right clicking a column does not
select that column. If the command you wish to use relates to a specific column, you should first
select that column by left clicking in it, and then right click to display the right click menu.
4.1 Navigation
When a query is run whether in dynamic or pre-defined mode, the data is displayed in the InfoFlex
grid.
Each grid is displayed in its own window which is maximisable and minimisable.
The titlebars display the name of the view used and the number of records returned.
The status bar of the window displays the mode, the filter name, details of any grid filtering that has
been applied (see section 4.12) and the number of records returned.
The grid automatically includes the event identifiers of every event represented in the view, and of
each parent event, even if the event identifiers are not included in the view. (See section 4.2 below).
Each row in the grid is numbered and each column in the grid is given a letter in addition to displaying
the item names.
The name of the view. Number of records returned.
Each row is numbered.
Each column is given a letter.
Event identifiers indicated
by key symbol.
The name of the filter. Mode. Grid filtering details. Number of subjects
Maximise and
minimise buttons
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 21
4.2 Event Identifiers
Any grid returned will always display the identifier items of the events used in the view, and the
identifiers of all parents of events used in the view. This rule applies whether the view in use is a
default view (event view) or a user-defined view or a pre-defined query.
In the example below, a default event view has been used. The first three items in the grid are the
identifiers of each of the parent events and the current event.
In the example below, a pre-defined query has been run. The first three items in the grid are the
identifiers of the current and parent events, even though they do not exist in the defined view.
Note: If you output the query to a file or to Excel, the identifiers will still be added to the data.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 22
4.3 Show Results only
To hide the navigation bar so that the grid fills the whole screen, switch on the Show Results only
button on the toolbar.
The results grid fills the whole screen, allowing you to see more of the data.
To display the navigation bar again, switch off the Show Results only button.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 23
4.4 Single grid view
The Single Grid View option allows you to choose whether your query results are returned in one grid
only, or in several grids – one for each event used in the view.
When Single grid view is switched on (this is the default) the query results are returned in a single
grid.
When Single Grid View is switched off, the query results are returned in several grids - one for each
event represented in the view.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 24
To switch the Single Grid View option on and off, go to the View menu and select Single Grid View.
A tick next to Single Grid View indicates that the option is switched on.
Note that it is not possible to switch off Single Grid View when using Default Event Views in
Dynamic Querying mode, since the only items from parent events that could be displayed separately
would be the event identifiers.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 25
4.5 Clearing queries
The Automatically Clear Queries option controls whether the first query you have run is
automatically cleared from the grid when you run a second query. You can choose whether the grid is
always cleared when you run a new query, or whether the previous results windows remain open in the
grid when you run a new query. If you choose not to clear previous queries, you can view multiple
windows side by side. Each results window can be maximised, minimised, resized or closed
individually.
Automatically Clear Queries is switched off by default so that previous results windows remain open
in the grid.
In this example, with Automatically Clear Queries switched off, each time a query is run, the
previous query results windows remain open. Simply minimise the latest results window to view the
previous results windows.
With Automatically Clear Queries switched on, only the current query results are available to view.
Each time a query is run the previous results windows are automatically closed.
To switch on Automatically Clear Queries, go to the View menu and select Automatically Clear
Queries. A tick indicates that the option is switched on.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 26
4.6 Duplicate Records
For certain queries, depending on how the link level is set, duplicate rows can be returned in the grid.
You can choose whether or not to allow duplicate records to be displayed in the grid by using the
Allow Duplicates in Grids function on the View menu.
When Allow Duplicates in Grids is switched on, duplicate rows will be displayed in the grid, if the
query returns those records.
When Allow Duplicates in Grids is switched off, duplicate rows will not be displayed in the grid.
To switch the Allow Duplicates in Grids option on and off, go to the View menu and select the Allow
Duplicates in Grids option. A tick indicates that the option is switched on.
Note that the Allow Duplicates in Grids option is not available when using Default Event Views in
Dynamic Querying mode, since it is not possible to have duplicate records with default event views.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 27
4.7 Ordering data within a column
To order the data in a column, click the column heading (click the letter rather than the item name).
The first click will order the column in ascending order; the second click will order the column in
descending order.
When the data is ordered ascending, an up arrow is displayed in the column header.
When the data is ordered descending, a down arrow is displayed in the column header.
4.8 Re-order columns
To move a column to a different position within the grid, drag the column heading and drop it when
the mouse and the vertical line reach the required position in the grid.
Drag and drop
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 28
4.9 Selecting cells
Some grid functions require cells to be selected. It is possible to select a range of cells, whole rows
and columns, and the whole grid.
Highlighted cells are shown with blue text and a pale yellow background.
To select a range of cells, click and drag the mouse. You can select a whole row by selecting the row
number or you can select a whole column by selecting the item name column heading. You can select
the whole grid by selecting the grey cell in the top left corner of the grid.
4.10 Copying cells
Data can be copied from the grid and pasted into other applications. To copy data, select a range of
cells (see section 4.9above) and then right click and choose Copy current selection or use the
keyboard shortcut Ctrl + C.
The selected cells are copied into the clipboard, and can then be pasted into other applications. Tabs
are used to delimit each column and line breaks are used to delimit the end of each row.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 29
4.11 Code display
For dictionary and coded items, you can choose whether to display the code, the meaning or both code
and meaning.
To change the code display of a column, select the column then right click and choose Code Display
then Code, Meaning or Both.
This column is displayed as specified:
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 30
4.12 Filters
The Filter function allows you to include or exclude rows of data depending on the data contained in a
particular column. For example you could choose to display only those rows where a particular code
or codes exist in a particular data item.
To apply a filter, select the column on
which you wish to apply the filter, then
right click and choose Filter then Define.
The Filtering dialog is displayed. The Column
dropdown list displays the column on which you
chose to filter, but you can select any other
column in the view.
The grid displays all the values that exist in the
selected column. (See below for details of how
the grid differs according to the item type that has
been selected).
Select the value(s) by which you want to filter
by ticking the check box for that value(s) in the
Selected column.
If the Include check box is ticked, then the rows
which contain the value(s) you select will be
included in the grid when the filter is applied.
If the Include check box is not ticked, then the
rows which contain the value(s) you select will
excluded from the grid when the filter is
applied.
These are
the values
that exist in
the selected
column
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 31
When you have selected the values by which
you want to filter, press the Add button.
The name of the column on which you have
defined a filter is displayed in the Filters
Defined grid.
Press Apply to apply the filter to the grid.
The grid now contains only those rows that
meet the filter criteria you have specified.
A filter symbol is displayed in the column
label of the column on which you have
defined the filter.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 32
4.12.1 Applying multiple filters
More than one filter can be applied to the grid at any one time. If you define a second, third or fourth
filter while your first filter is still applied, the subsequent filter is applied to the displayed rows. To
define a subsequent filter, display the Filtering dialog again.
Use the drop down list in the Column dropdown
to select a second column.
If the Use filtered values check box is ticked,
then the grid only displays the values that exist
for that item in the filtered records.
If the Use filtered values check box is not ticked,
then the grid displays all the values that exist for
that item across all the records (ie more values
might be displayed which exist in records that are
currently filtered out).
Select the value(s) by which you want to filter
this second column then press the Add button.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 33
The name of the second column on which you
have defined a filter is displayed in the Filters
Defined grid along with the first column.
Press Apply to apply the filter to the grid.
The grid now contains only those
rows that meet both sets of filter
criteria. Both column labels now
contain a filter symbol.
4.12.2 Editing Filter criteria
Filter criteria that have been applied can be edited
and the new criteria immediately reapplied.
Display the Filtering dialog.
In the Filters Defined grid, select the column
whose criteria you wish to edit and press the Edit
button.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 34
The current filter criteria for that column are
displayed.
If the Use filtered values option is ticked, then
only the values currently being filtered on are
displayed. If you wish to filter on other values,
untick the Use filtered values option to display
all the values that have been entered in that item.
Select the new filter criteria then press the Add
button to add them to the Filters Defined.
The Add button becomes disabled. Press Apply
to apply the new criteria to the grid.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 35
4.12.3 Removing individual a filters
If a grid has more than one filter applied, each filter can be deleted separately by highlighting the filter
that is no longer required and pressing the Delete button:
The filter is removed from the grid immediately without needing to press the Apply button.
4.12.4 Clearing all filters
To remove all filter criteria from the grid, right click in the grid and choose Filter then Clear.
All rows will be displayed in the grid again.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 36
4.12.5 Applying filters to different item types
When defining filters, the options available in the Value column vary depending on the item type on
which filter criteria are being defined.
Coded and dictionary
For coded and dictionary items, the value column displays each value that exists in the column.
Values and dates
Value and date item columns are filtered by defining a range of values to include.
In the From and To boxes, InfoFlex displays the highest and lowest value or the earliest and latest
dates entered in the selected column. To define filter criteria, replace the entries in the From and To
boxes with the highest and lowest values or earliest and latest dates that you wish to filter on.
You can also choose whether to include or exclude empty, unknown or missing dates.
Text items
If you filter on a text item, every different entry made in the item will be available as filter criteria.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 37
4.13 Summarise Data
The Summarise data function displays summary statistics about the data entered in a column. To
summarise any column, select the column then right click and choose Summarise data.
The data summary is displayed.
The upper section of the summary displays total number of rows, the number of rows with data entered
and the number of rows that are empty or marked with missing or unknown. In the case of coded and
dictionary items, there is also a count of the number of different codes from the dictionary or code list
that have been used.
The lower section of the summary displays detailed information about the actual values entered in the
item. The format of this varies according to the type of item being summarised.
For coded and dictionary items, in the lower section of the summary each code that appears in the
column is displayed with a count of the number of times it has been used.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 38
For Multiple Response coded items the lower section of the summary displays the number of times
each combination of codes has been used, as well as the number of times each individual code has
been used.
For value items, the lower section of the summary displays the minimum, maximum, mean, standard
deviation and sum of the values.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 39
For text items, the lower section of the summary displays the number of times in each different entry
made in the item occurred.
4.13.1 Closing the Data Summary
If you wish to close the summary and return to the grid, you should right click in the summary and
choose Grid. Closing the summary window closes the grid as well.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 40
4.14 Grouping by column
The Group By function allows the grid to be grouped by a selected column.
To group by a column, select that column then right click and choose Group by.
The grid is displayed with the rows grouped together by the selected column. Each group can be
expanded and collapsed by pressing the + and – symbols.
The grid is grouped by this item.
Click to expand or
contract a group.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 41
Groups within groups
You can choose to group within groups.
To group by a further column, drag a column heading onto the header bar and drop it next to the first
column heading.
Each original group now has subgroups within it.
To ungroup the columns, either drag each column heading from the header bar back into the grid, or
right click and choose Grid.
This grid is grouped by Source
of Referral then Category.
Drag and drop
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 42
Copying a group
When the grid is in grouped, it is possible to copy all the data within a group to the clipboard.
To copy a group, right click the group heading and choose Copy Subgroup.
All the data in that group is copied to the clipboard and can be used in other applications.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 43
4.15 Insert columns
To insert a blank column in the grid, select then right click a column and choose Insert Column.
A dialogue box will be displayed for you to enter the name of the new column. Enter a name and press
OK.
The new column is inserted to the left of the column that you right clicked in.
4.16 Delete columns
To delete a column from the grid, select that column then right click and choose Delete Column.
The entire column and its data will be deleted from the grid.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 44
4.17 Rename columns
To rename a column, select the column then right click and choose Rename Column.
A dialogue box will be displayed for you to enter the new name of the column. Enter a name and press
OK.
4.18 Clear columns
To empty a column of data, select then right click the column and choose Clear Column.
The column will be emptied of data, but the column itself will not be deleted.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 45
4.19 Exercise
In the Clinical data view, in Dynamic querying mode, set the view selection to Event views and
select the Referral event view.
Select the All Subjects – no constraints filter and then press the Run button.
Click some column headings (letter) to order the columns in ascending then descending order.
Move the Date of Referral column so that it is next to the Appointment Date column.
Select a column by clicking a column heading (item name). Ensure that the whole column is selected
– the text is displayed in blue and the background is yellow.
Select the whole grid by clicking the top left corner.
Select a range of cells by dragging the mouse.
Copy the selected data and paste it into Excel. Do not save the document.
Set the grid to show results only, then display the navigation bar again.
Minimise the current grid and note that the previous grids you generated are displayed.
Switch on Automatically Clear Queries on the View menu then re-run the Referral event view.
Minimise the grid and note that the previous grids are no longer displayed.
Filtering
Set the code display in the Source of Referral and Category columns to Code and Meaning.
Apply a filter to the Source of Referral column.
Set it to show codes 0, 1 and 2 only.
Apply a second filter so that the Category column displays only NHS and Private patients.
Edit the filter on the Source of Referral column so that code 3 is now also displayed.
Edit the filter on the Category column so that it now only displays Overseas visitors.
Remove all the filters from the grid.
Summarise data
Summarise the Consultant column.
Summarise the Source of Referral column. (Remember to right click and choose Grid to return to the
analysis grid).
Group by
Group the grid by Source of Referral.
Add the Category item as a second group.
Copy a subgroup to the clipboard and paste it into Excel. Do not save the file.
Remove the groupings from the grid.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 46
5 EXPORTING
You can choose to export your data either to Excel or to a File from the Data Analysis module. The
data can then be manipulated or printed. (It is also possible to export to Excel or a file from QDM.
Please see the separate QDM document).
5.1 Exporting to a file
Once you have selected a view and filter, go the Actions
menu and choose Output to File.
When you run the query, InfoFlex
displays the same Save Results
window as when data is being
exported to a file from QDM.
In the Filename box press the … button.
Navigate to a folder location and give the
file a name.
For full details of the properties that can be set for the file in the Save Results window, please refer to
the QDM manual, section 11.2 Export to File.
When you have set the properties, press OK to export the data to the specified file.
A confirmation message indicates that the data has been exported.
You can now open and review the exported data file.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 47
5.2 Exporting to Excel
Once you have selected a view and filter, go the Actions menu and choose Output to Excel.
When you run the query the results will be displayed in an Excel worksheet. A confirmation indicates
that the data has been exported.
Note that the worksheet is given the name Book1 but it is not yet saved. If you wish to save the file,
you can save it in a location of your choice and in the format of your choice.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 48
5.3 Output to grid
By default, on loading the Analysis module, the Output is to the InfoFlex grid.
After choosing to export your analysis results to Excel or a file, you can reset the module to output the
results to the InfoFlex grid by going to the Actions menu and choosing Output to Grid.
The next time you run a query it will display the results in the InfoFlex grid.
5.4 Exercise
In Dynamic querying mode, set the view selection to Event views and select the Referral event view.
Select the All Subjects – no constraints filter.
Export to file
Go to the Actions menu and select Output to File. Run the query. Set a file location (use the
Desktop or c:\infoflex v5/data/) and review the other options that can be set.
Press OK to export the data.
Open the file and check that the data is exported as expected.
Delete the file you have just created.
Export to Excel
Go to the Actions menu and select Output to Excel.
Press the Run button to run the query.
Ensure that Excel is displayed with the data you expected.
Close Excel without saving.
Export to Grid
Go to the Actions menu and select Output to Grid.
Press the Run button to run the query.
Ensure that the data is now displayed in the grid.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 49
6 PREDEFINED QUERIES
Pre-defined queries mode allows you to run queries that have been defined in QDM. You can run
any query that has been defined in the selected data view in the Global query group or your named
query group.
To switch to Pre-defined Queries mode, press the Pre-defined Queries button on the toolbar or select
Pre-defined Queries from the View menu.
6.1 Navigation in Pre-Defined Queries mode
When you choose Pre-Defined Queries mode, the navigation bar simply shows a Query selection box.
The Query selection box lists all the groups and queries defined in the Global query group and the
named query group.
Data view selection
Query selection
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 50
6.2 Selecting a Pre-defined Query
To select a pre-defined query, double click the query in the query selection box. A green tick is
displayed against the query name indicating that this is the query that will be run.
Additionally, the view and filter that belong to the query are displayed beneath the query for reference.
6.3 Running a Pre-defined Query
To run a pre-defined query, ensure that the query is selected then press the Run button on the
toolbar or right click and choose Run.
You can also run a query by going to the Actions menu and choosing Run.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 51
The results are shown in the analysis grid. See section 4 Grid functionality for further information
about grid functionality.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 52
6.4 Defining a new query in Pre-Defined Queries mode
It is possible to create new queries from Pre-Defined Queries mode.
In the query selection box right click the
query group in which you wish to define
the query and choose New.
Query Design Manager is opened at the Queries tab, and a new query displayed.
You can now configure the query properties, test the query or create new views and filters as required.
When you have finished, save the query then close QDM.
Your new query is displayed in the
query selection box and can be run
in Pre-Defined Queries mode.
(Note that on closing QDM, the new
query is not automatically selected
in the query selection box).
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 53
6.5 Editing existing queries in Pre-Defined Queries mode
It is possible to edit existing queries from Pre-Defined Queries mode.
In the query selection box right click the
query group in which you wish to define
the query and choose Edit.
Query Design Manager is opened at the Queries tab, and the query you chose to edit is selected.
You can edit the query as required. When you have finished, save the query then close QDM.
Your query is once more displayed in the query selection box and can be run in Pre-Defined Queries
mode. (Note that the query being edited in QDM will not necessarily be selected on returning to Pre-
Defined Queries mode).
Note: You should be aware that any query that you edit may already be part of a report. Any changes
you make may therefore affect an existing report. You should be sure that any changes you make will
not have an impact on any existing report.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 54
6.6 Exercise
In Pre-Defined Queries mode, select the Referral query in Training group 1.
Run the query and ensure the results are displayed as expected.
Select and run a different query.
In the Training group 2, create a new query.
Note that QDM is displayed with the new query already created in the group.
Name the query Query 2 and then select a view and a filter.
Close QDM and ensure your new query is displayed in Training group 2.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 55
7 EXTRACT ADD-IN
The InfoFlex Extract Add-In allows users to run multiple queries and export the results to files. These
are known as extracts. Once defined, a set of extracts can be run at any time from a menu item in the
Data Analysis module. Extracts must be defined by a user with User Management permission.
Extracts can be run by anyone who has been granted permission to use both the add-in and the Data
Analysis module.
Note that it is possible to define several queries to be run by one instance of the Add-In. It is also
possible to configure several instances of the Add-In, each instance running a different set of queries.
Each separate query is exported to its own separate file.
Care should be taken when selecting queries for an instance of the Add-In to run and in setting user
permissions. Although an instance of the Add-In is run from a single data view it can run extracts
from multiple domains and data views. If a user has permission to run the Add-In itself, then all the
extracts in that instance of the Add-In will be run, regardless of whether the user has access to all the
data views on which the queries are defined.
7.1 Registering the Add-In
Before using the add-in, it must be registered. This step needs only to be done once per database (ie it
does not need to be done by every user).
Go to the User Management module. Go to the Add-Ins menu and select Add-In Manager….
The InfoFlex Add-In Manager is displayed.
Press the New… button and navigate to IfxExtractAddin.dll in the Progs folder.
Now configure the Add-In with details of the queries that need to be run. Press Yes on the message to
configure it now,
or configure it later by returning to the Add-In Manager. See Section 7.2 Configuring the Add-In.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 56
7.2 Configuring the Add-In
To configure the Extract Add-In, go to the User Management module. Go to the Add-Ins menu and
choose Add-In Manager….
Select the Extract Add-In that you registered in 7.1above and press the Edit button.
The Extract Add-In Properties window is displayed.
A name for this instance of the Add-in can be set in the Add-In Display Name field (see section 7.2.1)
Properties relating to the format of the output files are set on the Definition tab (see section 7.2.2).
The queries to be run are selected on the Extracts tab (see section 7.2.3).
The SQL tab allows users to run SQL prior to running the extract (see section 7.2.4).
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 57
7.2.1 Naming the Add-In
Since multiple instances of the Add-In can be created to run different sets of extracts, you should give
each instance of the Add-In a unique name. This name will be displayed in the Add-In Manager and
on the Add-Ins menu in the Analysis module when you run the Add-In.
To name the Add-In, type a name in the Add-in Display Name field at the top of the Extract Add-In
Properties window.
7.2.2 Definition tab
The following properties relating to the extract file format should be set on the Definition tab:
Property Description What to enter
Include column names Controls whether the file contains column headers Yes or No.
Defaults to No.
Column Delimiter Controls how the file is delimited. Select from list, or type in a
delimiter. Defaults to comma.
Column Name Prefix Controls whether the row containing the column names is
given a prefix.
Free text. Optional
Column Name Suffix Controls whether the row containing column names is
given a suffix.
Free text. Optional
Delimiter Replacement If you wish, specify an alternative delimiter to be used
where the specified column delimiter is found in the data
being exported.
Free text Optional
Character at start of data If you wish, enter a character that should appear at the
start of every piece of data eg ‘.
Free text Optional
Character at end of data If you wish, enter a character that should appear at the
end of every piece of data eg’.
Free text Optional
Replace Missing Value Controls whether -99999 indicating Unknown data
should be replaced with specified text. If Yes, enter the
text in the next field.
Yes or No
Defaults to No
Missing Replacement
Value
Specify the text that -99999 should be replaced with.
Only relevant if Replace Missing Value is set to Yes.
Can be left blank to replace -99999 with blank.
Free text
Replace Unknown Value Controls whether -88888 indicating Missing data should
be replaced with specified text. If Yes, enter the text in
the next field.
Yes or No
Defaults to No.
Unknown Replacement
Value
Specify the text that -88888 should be replaced with.
Only relevant if Replace Unknown Value is set to Yes.
Can be left blank to replace -88888 with blank.
Free text
CarriageReturn/LineFeed
Replacement Value
Specify the text to replace carriage returns in memo and
text items. See notes below.
Select from the list or type
free text.
Enclose column headings Tick if you wish the start and end characters to be
applied to each column heading.
Yes or No
Defaults to No.
Export Path The location that the files will be exported to. Defaults to c:\InfoFlex\data
Archive Existing Files When set to yes, any files already in the export path that
may get overwritten by the extract are archived into a
date stamped subfolder of the Export Path. When set to
No, any existing files already in the export path will be
overwritten.
Yes or No.
Defaults to Yes.
File Header Enter header text which will be the first row of the file.
This can include the date/time in the following format:
Free text
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 58
<SYSTEM_DATE, format>
Eg <SYSTEM_DATE, “dd/mm/yyyy hh:nn:ss”>
File Footer Enter footer text which will be the last row of the file.
This can include the date/time in the following format:
<SYSTEM_DATE, format>
Eg <SYSTEM_DATE, “dd/mm/yyyy hh:nn:ss”>
Free text
Row Prefix Enter a prefix which will appear at the start of every row Free text
Row Suffix Enter a suffix which will appear at the end of every row. Free text
Line Termination Value The character that appears at the end of each line
See notes below.
Select from the list or type
free text.
File Termination Value The character that appears at the end of the file.
See notes below.
Select from the list or type
free text.
Notes about the CarriageReturn/LineFeed Replacement Value
The default value of this property is CarriageReturn/LineFeed which means that there is no change
to the underlying data.
Pressing the delete key in the CarriageReturn/LineFeed Replacement Value property sets the
property back to its default value, which means there is no change to the underlying data.
As well as selecting one of the options, it is possible to set your own value by typing in the selection
box.
Selecting [None] means that the Carriage Return/LineFeed will be removed ie replaced with nothing
so that there is no separation between the lines.
When set, carriage returns in the Header and Footer are also replaced.
Notes about the Line and File Termination Values
The default value of these properties is CarriageReturn/LineFeed.
Pressing the delete key in either of these properties sets the property back to its default value, which is
CarriageReturn/LineFeed.
As well as selecting one of the options, it is possible to set your own value by typing in the selection
box.
Selecting [None] for the Line Termination value will mean that there is no separation between lines.
The Line Termination Value occurs once at the end of any header, but not at the end of any footer. If
there is no footer, the Line Termination Value does not appear after the last line of data.
The Line Termination Value occurs after any row suffix.
The File Termination Value appears after any footer that has been defined.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 59
7.2.3 Extract tab
The queries to be run in the extract are selected on the Extract tab.
For each query that is to be run, the query, export filename and target data view need to be selected.
New queries are added in the top section of the Extracts tab. Queries that have already been selected
are displayed in the Extract Definitions grid.
To add a query, press the New button.
(Note that if you do not press New before selecting a new query, you may overwrite an existing query
with new details or set duplicate filenames for the query extracts.)
In the Query field, navigate to a query. You can choose queries from domain Document Query
Groups or from data view Analysis Query Groups. (Within the Analysis groups you can only choose
from the Global group or your own named query group).
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 60
When you select a query, the query name is displayed in the Query field.
You should ensure that the Export file field is completed. By default it displays the query name with
a .txt extension. The filename can be changed if necessary.
You should also ensure that the Target Dataview field is completed. If you select a query defined on
a data view, the field automatically displays the name of the data view that the query is defined on.
The Target Dataview cannot be changed where queries are defined on a data view.
If you select a query defined on a domain, you will need to select a Target Dataview. If you leave the
Target Dataview blank, the current data view when the add-in is run will be used.
When you have selected a Query, Export file and Target Dataview, press the Add button.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 61
The query, export file and target data view are displayed in the Extract Definitions grid.
Press the New button to add a further query, and repeat the process.
Add as many queries as you need to run.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 62
7.2.4 SQL tab
SQL can be run prior to running the queries. Parameters in the queries can be substituted into the
SQL.
The SQL tab is used to define SQL that needs to be run before the Extract Add-In is run.
You can type directly into the text box, paste text into the box, or import text from a file. Note that if
you import text from a file, no link to the file is retained. If the text in the file changes you must
update the Extract Add-In accordingly.
Comments in the SQL should be preceded by two dashes. For example
-- This is a comment
The SQL can contain parameter names which must take the form <<ParameterName>> where
ParameterName is the same as the parameter name specified in the Parameter Name column of the
query filter definition.
If any of the queries contain prompt parameters, the user will be prompted for these before the SQL is
run.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 63
7.2.5 Saving the Add-In configuration
When you have selected all the queries you wish to run, ensure that the Add-in configuration is saved
(the Save button will be enabled if you have made changes but not saved them).
Press the OK button.
The Add-In is displayed in the Add-In manager.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 64
7.2.6 Setting Data View Permissions
After configuring the add-in, you should set the Data View permissions to specify which data views
the Add-In can be run from. (Note that you only need to select the data views from which the Add-In
can be run. All the queries in the Add-In will be run even if the data view on which the query is
defined is not selected here).
To set the Data View permissions, select the relevant instance of the Add-In in the Add-In Manager
and press the Data Views button.
By default, all data views are displayed on both sides. The Add-In will only be able to be run in the
data views in the list on the right. Use the single and double arrows to add and remove the data views
from the list. The single arrow moves one selected data view. The double arrow moves all data views.
Press OK when you have finished.
Note that you may need to restart InfoFlex in order for these settings to take effect.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 65
7.2.7 Setting User Permissions
User Permissions specify which users have permission to use the Add-In. By default no users have
permission to use the Add-In. Note that the user will also need to be given module permission to the
Analysis Module in User Management, and data view permission to the data views from which the
Add-In can be run.
To set the User Permissions, select the relevant instance of the Add-In in the Add-In Manager and
press the Permissions button.
On the Permissions window, press the Add… button.
Select one or more users or groups (use the ctrl or shift keys to multi-select) and press OK.
The users and/or groups you have selected are displayed. Press OK to return to the InfoFlex Add-In
Manager.
Note that you may need to restart InfoFlex in order for these settings to take effect.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 66
7.3 Running the extract add-in
To run the Add-In, go to the Analysis module and select the data view from which the Add-In has been
configured to run. Note that the Add-In will only be available if the user has been granted user
permissions and data view permissions in the Add-In configuration.
Go to the Add-Ins menu and select the required instance
of the Extract Add-In.
Press Start to run the Add-In.
On pressing Start, any existing extract files are archived (if that option is set) and the extracts are run.
The progress is displayed in the InfoFlex Extract Addin window. If any queries contain prompted
items, the prompt windows are displayed. When all the extracts have run, the progress shows Batch
extract completed! and the Start button is enabled again.
The extract files are created in the location specified in the add-in configuration and can now be
reviewed.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 67
7.4 Configuring further instances of the add-in
It is possible to configure several instances of the add-in, each running a different set of extracts.
To configure another instance of the add-in go to the User Management module. Go to the Add-Ins
menu and select Add-In Manager….
The InfoFlex Add-In Manager is displayed. The first instance of the add-in that you configured is
displayed.
Press the New… button and navigate to IfxExtractAddin.dll in the Progs folder. Since the add-in has
already been registered, you will not be required to enter the licence key again.
The second instance of the add-in is displayed on a second row in the Add-In Manager.
Configure the add-in by following the steps in section 7.2 above. Note that it is important to give each
instance of the add-in a unique name so that you can distinguish between the instances.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 68
7.5 Running the Extract Add-In as a task
The Extract Add-In can be run as a task using the InfoFlex Task Manager.
When setting up the task handler, add a Scheduled task and enter this Object Name:
IfxExtractAddin.CExtractHandler.
Then press the Options button on the Scheduled Tasks tab.
A list of extracts that are available is displayed. The list only displays instances of the extract Add-In
that contain queries. Any instances that contain prompt queries are not displayed.
Once you have specified
the Object name, press
the Options button.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 69
Select the extracts that you wish to be run. If necessary select a default data view. The default data
view will be used for any queries that do not have target data view specified in the extract. Note that it
is only possible to specify one default data view, and this will be used for all queries that do not
specify a data view. If the same query needs to be run against different data views, or there are several
queries each needing a different data view, then a separate task server definition will be required for
each data view.
Once you have selected the extracts, press OK and then on the Scheduled Tasks tab, set Enabled to
Yes and set Keep Loaded to No.
Finally, go to the Schedule tab and define the schedule for the running of the extract(s).
Note that if there are extracts that require different schedules, a separate Task Server definition needs
to be defined to handle each separate schedule.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 70
7.6 Exercise
In the User Management module, go to the Add-Ins menu and choose Add-In Manager. Highlight
the instance of the Extract Add-In that is shown in the grid and press the Edit button.
In the Add-In Display Name, type My First Extract.
Leave the Export Path set to c:\InfoFlex v5\data and set Archive Existing Files to Yes.
Set any other options on the Definition tab that you wish.
Go to the Extracts tab.
Press the New button. Press the ellipsis button in the Query field. Expand the Clinical Domain and
Data view and select the Referral query in the Training group 1. Press Add. Note that a row is
displayed in the Extract Definitions grid.
Press the New button again. Press the ellipsis button in the Query field. Expand the Clinical Domain
and Data view and select the Join Example query in the Training group 1. Press Add. Note that a
second row is displayed in the Extract Definitions grid.
Press the New button again. Press the ellipsis button in the Query field. Expand the Clinical Domain
and Data view and select the Occurrence Counting query in the Training group 1. Press Add. Note
that a third row is displayed in the Extract Definitions grid.
Press OK to close the Extract Definition. Note that the row in the Add-In Manager now says My
First Extract in the Display Name column.
Press the Data Views button and note that all data views are already selected.
Press the Permissions button and grant permission to the training user.
Close the Add-In Manager and go to the Analysis module.
Go to the Add-Ins menu and choose My First Extract.
Press the Start button and watch the progress of the add-in.
When it has finished, open Windows Explorer and review the extract files that have been created in
c:\infoflex v5\data.
Go back to the Analysis module and run the extract again.
When it has finished, go to Windows Explorer and note that an archive folder has been created with
the first extract files, and that a new set of extract files are now located in c:\infoflex v5\data.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 71
8 PIVOT TABLES
Pivot tables enable the easy analysis of related totals in a table matrix.
Data can be summarised using counts, sums or averages etc.
In the example below, a pivot table has been defined which plots Category against Referral source and
shows the number of patients with each combination of data.
Totals have been added to show the total number of patients with each Referral Source and the total
number of patients with each Category.
It is possible to define which data items are shown in the columns, which data items are shown in the
grid, and which data item is being counted.
Row data item
Total of each column
Column data item Total of each row
No of patients
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 72
8.1 Creating a pivot table
To create a pivot table, run a
query, then right click in the
grid and choose Pivot Table.
Note – you should set any
dictionary and coded items to
display code and meaning
before creating your pivot
table.
The Pivot Table Definition dialog is displayed.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 73
8.2 Defining the pivot table
To define the pivot table, carry out the following steps:
Set the Column items - Click and drag one or
more items from the Items list into the
Columns box. The items in Columns box are
displayed across the top of the pivot table.
Set the Row items - Click and drag one or more
items from the Items list into the Rows box.
The items in Rows box are displayed downs the
side of the pivot table.
Set the Data items - Click and drag one (or
more?) items from the Items list into the Data
box. The items in Data box are summarised in
the body of the pivot table.
Set the Page items - Click and drag one or
more items from the Items list into the Page
box. The items in Page box provide an
additional filter for the data.
Set the item properties
Properties can be set for the items that have been selected for use in the Pivot Table Definition.
To set the properties for an item, select the item in the Row, Column, Data or Page box.
Look at the Properties grid at the bottom of the Pivot Table Definition and ensure that the Name
property displays the name of the item you have selected. Set the other properties as required.
Properties for Columns, Rows and Page items
Caption – the item name to display in the pivot table. If no caption is set, then the item name will be
used.
Subtotal as - Optional. If set, an additional subtotal column or row will show the sum, average or
count or each row or column.
Subtotal Caption - Optional. If Subtotal As has been set, the Subtotal Caption sets the name of the
additional column or row.
Properties for Data items
Caption – the item name to display. Only used where more than one item has been set in the Data box.
Aggregate As – Defaults to Count. Select from Sum, Count, Average, Max, Min, St Dev, St Dev
(sample), Var, Var (Sample).
Display As – Defaults to Normal. Normal, Percent of row, Percent of column, Total.
Format – Set a format. Defaults to 0.
Columns – item(s) for
the top of the table
Rows – item(s) for
the side of the table
Data – item(s) to
be summarised
Summary definition for the
currently selected item.
Page – item(s) to
filter by
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 74
8.3 Displaying the pivot table
Once you have defined the pivot table, right click in the Pivot Table Definition and choose Apply to
display the pivot table.
The pivot table is displayed. The example below plots Source of Referral against Category and
shows how many patients (Hospital Number aggregated as Count) have each combination of values
entered.
Values entered in the
Source of Referral item
Source of Referral has been
set as the Column item. The
caption set is shown rather
than the item name.
Subtotal column defined
for the Column item
(Source of Referral)
Category has been set as the
Row item. The item name is
shown since no caption has
been set.
Subtotal row defined for the
Row item (Category)
Values entered in the
Category item
The item set as the Data item is
summarised according to the
properties set. In this case a
count of hospital numbers is
shown.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 75
This example plots Source of Referral against Category, showing both the number of patients
(Hospital Number aggregated as Count) and the average age of patients (Age aggregated as Average)
for each combination of values.
This is the Pivot Table Definition for
the above example:
8.3.1 Defining specific views for use in pivot tables
You may wish to define a specific view with specific formatting applied in order to view results.
In this example, a view has been defined with the Appointment Date given a format of mm/yyyy. The
pivot table results therefore show how many of each type of Referral have occurred within each
month.
These column headings show
that two Data items that have
been defined.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 76
8.4 Pivot table functionality
Once a pivot table is displayed, the following functionality is available:
8.4.1 Filtering
Each row and column heading can be filtered to remove rows or columns from the pivot table.
To filter, press the dropdown arrow to the right of each row or column heading.
8.4.2 Re-order rows and columns
Where multiple rows or columns have been defined, they can be re-ordered. Drag and drop the item
name heading to the required position.
Drag and drop
Columns are re-ordered.
Click to filter the row or column
Select and
deselect the
item values.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 77
8.4.3 Expand and collapse
Where multiple items have been selected for the Row or Column, it is possible to expand and collapse
the values in the initial rows or columns. Plus and minus symbols will be displayed where it is
possible to expand and collapse. Where rows or columns are collapsed, the row is no longer
subdivided by the following rows or columns.
When this category is collapsed,
one row will be displayed, and
the category will no longer be
subdivided by consultant.
The values for this category are
now displayed rather than
subdivided by consultant.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 78
8.4.4 Print
It is possible to print the pivot table.
To print the pivot table, right click the pivot table and choose Print Preview to view a preview, or
Print to print the pivot table.
8.4.5 Export
It is possible to export the pivot table to a file, Excel or the clipboard.
To export the pivot table, right click the pivot table and choose Export then File, Excel or Clipboard.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 79
8.5 Editing the pivot table definition
Once a pivot table definition has been defined and displayed, changes can be made to the definition.
To edit the definition, display the Pivot Table
Definition dialog. If the dialog has been closed
you can display it by right clicking in the pivot
table and choosing Define.
To clear the properties completely, right click
and choose Reset.
To remove an individual item from the definition,
right click that item and choose Delete.
When you have finished making changes, right
click the Pivot Table Definition and choose
Apply to update the pivot table with the new
properties.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 80
8.6 Filtering using the Page item
If you select a Page item in the Pivot table definition, this provides an additional method of filtering
the data.
In this example, the Consultant field has been added as a Page item.
The Consultant item is displayed in the top left corner of the pivot table window.
The values entered in the Consultant
field can be displayed using the
dropdown arrow and you can filter out
those records you do not wish to see in
the pivot table.
To add a Page item to a pivot table, add an
item to the Page box in the Pivot Table
Definition dialog as described in section 8.2
above
Consultant has been
defined as a Page item.
Chameleon Information Management Services Ltd InfoFlex Data Analysis and Extract Add-In User Guide
_____________________________________________________________________________________________
November 2017 Page 81
8.7 Closing the pivot table
If you wish to close the pivot table and return to the grid, you should right click in the pivot table and
choose Grid. Closing the pivot table window closes the grid as well.
8.8 Exercise
In Dynamic querying mode, set the view selection to Event views and select the Referral event view.
Select the All Subjects – no constraints filter and then press the Run button.
Set the Code Display for Source of Referral, Category and Consultant to code and meaning.
Right click the grid and choose Pivot Table.
In the pivot table definition, add Source of Referral to the Column box, add Category to the Row
box and add Hospital Number to the Data box.
Right click the pivot table definition and press Apply. Review the pivot table that has been created.
In the pivot table definition, select Source of Referral and set the Subtotal as property to Sum and set
Subtotal Caption to Total.
In the pivot table definition, select Category and set the Subtotal as to Sum and set Subtotal Caption
to Total.
Right click the pivot table definition and press Apply. Review the total columns that have been added
to the pivot table.
In the pivot table definition, add Age to the Data box. Select the Age item in the Data box and set the
Aggregate as property to Average.
Right click the pivot table definition and press Apply. Review the additional data that is displayed.
In the pivot table definition, delete the Age item from the Data box. Right click the pivot table
definition and press Apply.
In the pivot table definition, add Consultant item to the Row box. Right click the pivot table
definition and press Apply.
Review the additional data in the pivot table. Move the Consultant heading so that it is displayed to
the left of the Category.
Right click the dropdown arrow next to the Consultant and remove the cross from consultants Hughes,
Brown and Clark. Right click the dropdown arrow to hide the dropdown list of consultants, and
review the changes to the pivot table. Ensure that only the selected consultants are displayed.
Collapse some of the Consultants (press the – button next to the Consultant code) and note that the
categories for those consultants are no longer displayed.
In the pivot table definition, delete Consultant from the Row box. Right click the pivot table definition
and press Apply.
In the pivot table definition, add Consultant to the Page box. Right click the pivot table definition
and press Apply. Consultant is now displayed in the top left of the pivot table. Press the dropdown
arrow against the Consultant heading to display a list of consultants. You can filter out consultants
from the pivot table by unchecking consultants in the dropdown list.