Tutorial
From Ajexus
The tutorial steps you through configuring Ajexus for a hospital Orthopaedic department. Other samples include Audiology, Cardiology, Diabetes, Geriatric, Gynaecology, NASC, Neurology, Oncology, Orthopaedic, Psychiatric
The purpose of the tutorial
This tutorial will introduce you to the key capabilities of Ajexus.
It is split into 2 stages:
- Stage 1 gives a quick introduction for those with limited time
- Stage 2 builds on Stage 1 to give a deeper understanding of the true capabilities of Ajexus
The tutorial will cover the following aspects:
Data Dictionary
How to use it, and how you can tailor Ajexus to meet the needs of your organisation.
Patient Record
How to take a patient through your service using Ajexus, and how to record details of their care, therefore improving the quality and efficiency of your service.
Please take the time to complete this tutorial to learn how to get the greatest benefit from the capabilities Ajexus offers your organisation.
The scenario
This tutorial will use an example of a fictitious organisation called 'ABC Healthcare', and a fictitious patient called 'Jan Jones'.
ABC Healthcare provide a number of different healthcare services. They are going to pilot Ajexus in their Orthopaedic Department, with a view to expanding Ajexus to other services in the near future.
As you work through the tutorial you can substitute your own details for those of ABC Healthcare.
Jan was out playing a friendly game of basketball with some old team mates when she turned quickly, and her knee pulled in the wrong direction. Jan went to the family doctor, who in turn referred her to the Orthopaedic Department of ABC Healthcare to assess the damage, as the swelling was severe, and the doctor felt she should be referred for specialist diagnosis and treatment.
While Jan presents with specific problems, the basic principles of her case, with a typical continuum of care covering referral/triage, assessment/investigation, treatment, and then discharge, can be applied to any patient of any healthcare service.
Key Points
- While this tutorial uses the example of Ajexus in an Orthopaedic Department, you can apply the principles of this tutorial to any specialist service you may provide.
- Ajexus is not 'hard wired' and can be tailored to closely match the particular requirements your organisation may have.
- With Ajexus you choose the data to manage; you control the information.
Getting Started
1 Create the database
Task objective
To open the Tutorial database from the START Menu, click START, select Programs, Open "Database Utility".
Ajexus in the START Menu
Task steps
- Ensure you are on "Create" tab in the Ajexus Database Utility.
- Type in your SQL Server name in the "Server" field.
- Type in your Database name as "AjexusTutorial" or any other name without using any spaces.
- Type in the SA Password for the SQL Server.
- Select Database type as "Tutorial/Blank".
- Click on the "Create Database" button.
Creating Ajexus Database for the first time
2 To open and log into Ajexus as the Administrator
Task objective
To successfully open the Ajexus tutorial from the START Menu, click START, select Programs, Open "Ajexus".
Ajexus will load and the Welcome screen will be displayed.
To successfully log in to Ajexus for the first time as the administrator.
Task steps
To be able to use Ajexus, you must first log in by supplying your User Name and Password. The fields in which to enter these are displayed at the top of the Welcome screen.
For the purposes of this tutorial, the User name and Password fields will already be populated with default information. If the User name and Password fields are blank, then follow the task steps below (''Note: ''you will need to follow this process when you use Ajexus outside of the tutorial environment):
- Enter the User name in the User Name field (for the purpose of this tutorial the User name is 'administrator')
- Enter the Password in the Password field (for the purpose of this task the Password is 'password'). An * will be displayed to prevent other users from seeing your password
- Enter the name of the SQL Server on which you created the tutorial database on Step 1.
- Enter the name of the database you created. Our example was AjexusTutorial.
- The Server and database fields will remember the last entry used, so you should not have to enter these fields each time.
- Once the password is typed in the textbox field, you can either press [Enter] or click the Login button.
- If you have entered the information correctly 'Ajexus Ready' will appear on the status bar at the bottom of your screen. If the login was not successful, an error message will be displayed indicating either the User name or Password is incorrect.
Note: when you start Ajexus for the first time after installation, a dialogue box will appear on screen requesting you to provide a license key. This will have the word 'EVALUATION' in the textbox. If you click OK without removing 'EVALUATION' from the textbox, or without providing a license key.
Ajexus will run in evaluation mode, with only a few features restricted.
If you enter an invalid key, or leave the license key field empty, a message box will appear asking you if you wish to continue in evaluation mode. Click OK if you do not have a valid license key.
If you have a license key, paste it into the textbox (replacing 'EVALUATION') and click OK.
If you provide a license key, you will not be asked for the key again until your license period has expired. If you choose to continue in evaluation mode, you will be prompted for a key each time you start Ajexus.
3 Personalising the System Title
Task objective
To personalise Ajexus by putting an organisation's name on the title bar.
Task steps
- From the top menu, select Configuration, then Data Dictionary Settings. The Data Dictionary Settings screen will be displayed
- Type the name of the fictitious organisation 'ABC Healthcare' in the System Title fieldData Dictionary Settings screen
- When you have finished, click the Save
toolbar button. The Save Changes message box will be displayed:Click Save Changes message box
- Click Yes to save your changes. The title bar should now display 'Ajexus - ABC Healthcare - [Data Dictionary Settings]'.
More Information
More information on site settings can be found in User Preferences in the User Guide.
Setting up the Medical Record
4 Introduction to the Medical Record Structure
Task objective
To explain the structure of Ajexus.
What separates Ajexus from the rest
Ajexus can be tailored to suit your requirements, whatever they may be. With Ajexus, you define the information you wish to record. Using the Data Dictionary, you create the data elements which comprise a medical record. If your requirements change, simply define new data elements to record the new information, or modify existing data elements as required.
The definition of a data element:
- may consist of one or more quantities and dates with names defined by you
- may consist of any number of outcomes defined by you, from which the user may choose when entering an element of this kind
- may include a 'staff group' which you define, that determines which staff may be selected when a user enters an element of this kind
- may include a 'location group' which you define, that determines what locations may be selected when the user enters an element of this kind
- may include an equipment type, allowing you to define data elements to record the issue and return of equipment
- may have any number and kind of data element as a 'sub-element'
- allows you to define validation criteria, which users will be required to meet when entering the element
- allows you to add script to 'events' to perform additional tasks during events relating to the element
Any data element may also have pictures, sound, video, or any other information stored with it.
Sample databases are provided with Ajexus. These show how Ajexus may be configured to meet the requirements of quite different health services. You can use any of these as a starting point if your organisation has similar needs, or you can start from scratch as demonstrated in this tutorial.
What features does Ajexus have?
Complete Medical Record
- Displays element lists showing a patient's complete electronic medical record, with the ability to filter the list to view specific items of interest.
- Records healthcare information such as: referrals, demographics, alerts, medications, donor details, letters, assessments, diagnosis, consents, admissions, investigations, results, care plans, interventions, observations, treatments, consultations and reviews, and any other information you would like to record.
- Covers dates, times, staff, equipment, materials, and outcomes, whether once only, or recurring instances.
- Easily manages patients having separate episodes of care concurrently, within different parts of an organisation.
Powerful Scheduling and Tracking
Use tools to schedule and track staff, equipment, and locations, whether they be rooms, beds, wheelchairs, paper records, or any other item.
Directories
Use directories to record details of your staff, allied staff, outside organisations, and equipment, and their involvement in activities with your patients, regardless of their profession.
Easy to Report
Use built-in reporting tools, or popular reporting tools, such as Seagate Crystal Reports or Microsoft Access, to create day to day activity lists and management reports from any information held within Ajexus.
Secure
Enjoy comprehensive security, allowing fine control over what information users can view and/or enter.
Scalable
Use in both smaller and larger organisations, and operates with industry standard databases, across local and remote networks.
Flexible
Fully customise the information captured using the Data Dictionary.
Form Designer
Create your own forms to customise the system exactly to your requirements.
How does Ajexus work?
In designing Ajexus, we became aware of the differing health information system requirements within and between various health care providers. Because of this, Ajexus was designed with an architecture not available in competing products. This gives a unique flexibility which allows it to be deployed in a wide variety of healthcare situations.
Ajexus = The Ajexus Engine + The Ajexus Data Dictionary
Ajexus consists of a generic 'engine' (that is made up of a number of reusable business objects), coupled with a Data Dictionary to tailor Ajexus to meet the specific information needs of a particular healthcare organisation.
The Ajexus Data Dictionary can be created and modified by any person with business analysis skills and general computer applications experience. No specific programming or database skills are required! As your information needs evolve, so too can the Data Dictionary to ensure that these needs continue to be met.
Ajexus includes a number of predefined Data Dictionary classifications that can be used as a template to get you started creating your own unique dictionary. The examples in this guide can be performed using the sample dictionary definitions provided.
Using the Data Dictionary, you can set up Ajexus to allow the recording of any information you require. Although you will be recording most of your information against a patient's record, information can also be held against a staff, or allied staff member's record.
A patient record can contain episodes, which can be either active (in progress), or closed (no longer in progress).
You can record elements which are pieces of information or activities that have occurred within an episode.
You can also record elements against an element. These could be surveys, or other data relevant to one particular element.
The following diagram shows how episodes and elements are related:
Record
|
| Episode(s)
|
| Element(s)
|
| Sub-element(s)
|
The following example shows how a patient's record can be made up of a number of episodes, elements, and sub-elements:
Episodes
| Elements
| Sub-elements
|
Episode 1 Mental Health - Referring
| Subelement:
|
| Referral In for Assessment
|
Episode 2 Mental Health - Assessing
|
| Discharge letter typed
|
| Assessment performed
|
| Self Care is Excellent
|
| Accommodation is Living at home
|
This facility can also be applied for all categories of people recorded using Ajexus. That is, you can record elements against your own staff, and staff external to your organisation. The following section details the different types of people you can record information against in Ajexus.
What are record categories?
Record categories refer to the different types of people you can record information against.
Ajexus can record, display, and report on information for three types of people.
You can change the record category names as appropriate, but for the documentation, and in the Psychiatric Sample Database, the following category names have been used:
Record Category
| Description
|
Patient
| People your organisation provides services for
|
Staff
| People who work for your agency
|
Allied Staff
| People external to your agency, such as General Practitioners, Assessors and Service Coordinators from other agencies
|
What are episodes?
For a Patient, an episode is the period during which they have some type of interaction with your organisation. These periods may cover different phases such as triage, assessment, treatment, and discharge.
Where multiple services are available, they may be by service, that is, a patient might be in the treatment phase of an orthopaedic service and the assessment phase of a mental health service, which means they may have more than one episode active at a particular time. A patient cannot have more than one episode of the same type active at one time, however.
A patient may have no active episodes, which means their previous periods of care are complete, or they have not yet had any interaction with your organisation.
'Staff' and 'Allied Staff' can also have an episode. A staff member's episode is their designated occupation. For example, a Case Worker may have an active episode of 'Case Worker'.
What are elements?
Elements are the individual data components of the patient record. Examples of elements include: referrals, demographics, alerts, medications, donor details, letters, assessments, diagnosis, consents, admissions, investigations, results, care plans, interventions, observations, treatments, consultations and reviews, or any other information you would like to record.
An element must be recorded against a particular episode. Using the Data Dictionary you can enable certain elements to start or end episodes. For example a 'Discharge' element could close the episode that it was entered in, thereby indicating the period of care has ended.
Element Lists can be set up to filter elements any way you like. One element list may contain all elements for a patient, while another may contain only specific information, such as test results.
You can also record elements against elements, such as scores for an assessment, a check list for a care plan, and so forth. Elements that belong to another element, or are part of another element are called sub-elements.
5 Customising the Demographic Fields
Task objective
To show how custom fields may be defined for screens which display personal details for clients or staff. These custom fields may be given whatever name you choose to suit your organisation, and may contain predefined lists (also defined by you) from which the user may select an item.
Task steps
Titles
- From the menu, select Configuration, then Data Dictionary. The Data Dictionary screen will be displayed
- Select the Patient category from the Demographics item (click once)
- Custom fields available for the Patient category will appear to the right of the list
- Click the ellipses button
next to the Title field
- The Title Setup form will appear
- Click the New button
- Type 'Mr'
- Click New
- Type 'Mrs'
- Repeat the above two steps to enter the following titles:
- Ms
- Miss
- DrTitle Setup form
- Click Close to close the Title Setup form
This list of titles will now be available for users to select from on the demographics screen
Ethnicity
- Click the ellipses button
next to the Ethnicity field. The Ethnicity Setup form will appear
- Click New
- Type 'African American'
- Click New
- Type 'American Indian'
- Repeat the above two steps to enter the following ethnicities:
- Asian
- European
- Pacific Island
- Inuit
Ethnicity Setup form
- Click Close to close the Ethnicity Setup form
This list of ethnicities will now be available for users to select from in the demographics screen
Custom Number Fields
- In the Custom 1 Number field type 'Social Security #'
Custom List Fields
- In the Record Custom 1 field type 'Living Arrangements'
- Click the ellipses button
next to the entry. The newly named Living Arrangements Setup form will be displayed
- Click New
- Type 'Alone'
- Click New
- Type 'With Family'
- Repeat the above two steps to enter the following living arrangements:
-
Living Arrangements Setup form
- Click Close to close the Living Arrangements Setup form
- In the Record Custom 2 field type 'Transport'
- Click the ellipses button
next to the entry. The newly named Transport Setup form will be displayed
- Click New
- Type 'Bicycle'
- Click New
- Type 'Bus'
- Repeat the above two steps to enter the following modes of transport:
-
Transport Setup form
- Click Close to close the Transport Setup form.
These fields, and the lists they contain, should now appear in the demographics screen whenever you add/edit/view the personal details of a patient. When you create a patient record in Step 13 of this tutorial, you will be able to, for example, select a title from the list you have defined here, or record the fact that the patient lives alone by selecting 'Alone' from the Living Arrangements custom list you have just defined.
Address Fields
- From the menu select Configuration, then Data Dictionary Settings. The Data Dictionary Settings screen will be displayed
- Type 'Address Line 1' in the Address Line 1 field
- Type 'Address Line 2' in the Address Line 2 field
- Type 'City' in the Address Line 3 field
- Type 'State/Post Code' in the Address Line 4 field
- Type 'Country' in the Address Line 5 field
- Click the Save
toolbar button. A dialog box will appear prompting you to save your changes. Click Yes.
These fields will appear with the names you have given them wherever an address is displayed or required. For example, when you add new locations in Step 9 of this tutorial, you will be able to enter details for each of the address fields you have defined above. If any of the fields above have not been given a name, then they will not appear elsewhere in the application.
Additional Points
- The patient custom number and custom list fields can be setup to suit your requirements
- Custom fields are also available for the Staff and Allied Staff categories
6 Creating Staff and Allied Staff Episodes
Task objective
To show how the episode mechanism is used for staff and allied staff members.
Overview
Different episodes can be created to record a staff members role, and are used to control which parts of a patient's medical record that staff member can be recorded as having been involved in.
By giving staff members episodes, which describe that staff member's role in your organisation, you can later define staff groups, which consist of a list of staff episode types. These staff groups are in turn used to define the data elements which make up a patient record, by specifying what types of staff may be involved in the activity which the data element is defined to record.
For example, you may define a staff group that includes only the episode type 'General Practitioner', and then specify this staff group when defining a data element to record a ‘referral’. Then, when a user enters a ‘referral’, only staff members who have an active episode of the type ‘General Practitioner’ will be available for the user to choose from.
Task steps
- From the menu select Configuration, then Data Dictionary. The Data Dictionary screen will be displayed
- Click the Staff category underneath Demographics in the list box on the left
- Click Setup Episodes for Staff at the top right. The Episode Type Setup form will be displayed
- Click New and type 'Administrator'
- Repeat step 4 for the positions below:
- Nurse
- Ophthalmologist
- Orthopaedic Surgeon
- Physical Therapist
- Receptionist
- ResidentEpisode Type Setup form
- Click Close to close the Episode Type Setup form
- Click the Allied Staff category underneath Demographics in the list box on the left
- Click Setup Episodes for Allied Staff
- Click New and type 'Family Physician'
- Click Close to close the Episode Type Setup form.
Additional Points
- You can add notes to any of the entries by clicking the Description button on the Episode Type Setup form
More Information
More information can be found in the Episode section of the User Guide.
7 Creating the Patient Episodes
Task objective
To show how separate episodes of care can be defined for the different services that an organisation provides.
Task steps
- From the menu select Configuration, then Data Dictionary. The Data Dictionary screen will be displayed
- Click the Patient category underneath Demographics in the list box on the left
- Click Setup Episodes for Patients. The Episode Type Setup form will appear
- Click New and enter 'Orthopaedics':
Episode Type Setup
- Click Close to close the Episode Type Setup form
Additional Points
- It is possible to have separate episodes for each stage within the continuum of care for that episode (i.e. episodes could be set up for 'Orthopaedics-Triage', 'Orthopaedics-Assessment' , 'Orthopaedics-Treatment', and 'Orthopaedics-Discharge').
More Information
More information can be found in the Episode section of the User Guide.
Locations
8 Creating the Location Types
Task objective
To show how location types within organisations are defined.
Task steps
- From the menu select Configuration, then Locations and Clinics. The Locations and Clinics screen will be displayed
- Click the New toolbar button

- Enter 'Medical Centre' for the highlighted entry in the Location Types list box on the left
- Repeat Steps 2 and 3 for the items below:
- Hospital
- Clinic Location
- Theatre Location
Locations and Clinics form
Additional Points
- The entries will sort themselves alphabetically
- To edit any of the entries in the Location Types list box on the left of the form, either double click the entry or select it and then press [F2].
More Information
More information can be found in the Location Directory section of the User Guide.
9 Adding New Locations
Task objective
To show how locations can be added to the Location Directory Ajexus maintains. These locations can then be selected when patient data is entered into Ajexus.
Task steps
- Select Directory, then Location Directory from the menu. The Location Directory form will be displayed
- Click the New
toolbar button. The Edit Location form will be displayed:Edit Location form
- Select 'Clinic Location' from the Location Type combo box
- Enter 'Orthopaedic Clinic' in the Name field. You may also enter address details if you wish
- Click the Save
toolbar button. The Save Changes message box will be displayed
- Click Yes to save your changes
- Repeat the steps 2 - 6 and enter the Location Type and Name of the locations below:
- Location type: Hospital; Location name: ABC Healthcare
- Location type: Medical Centre; Location name: Downtown Medical Centre
- Location type: Medical Centre; Location name: Uptown Medical Centre
- Location type: Theatre Location; Location name: Theatre 1
- Location type: Theatre Location; Location name: Theatre 2
- Location type: Theatre Location; Location name: Theatre 3
- Select Directory, then Location Directory from the menu. The Location Directory will be displayed with all the locations you have entered:Location Directory displaying all locations
Referral
10 Creating a Referral In
Task objective
To show how a 'Referral' element of the medical record can be defined using the Data Dictionary, so that the receipt of a referral for a patient, and the outcome of that referral, can later be recorded. This will include the definition of custom labels to enable and name element fields, and the setting up of location and staff groups.
Task steps
- From the menu select Configuration, then Data Dictionary. The Data Dictionary form will be displayed
- Click on the Main item under Elements in the list box on the left
Add the Element Type
- Click the New
toolbar button
- Fields for entering and defining an element type will be displayed
- Replace 'New Element Type' in the Type field with 'Referral'
- Enter 'Date' in the Actual Date field. This allows the referral date to be recorded
- Enter 'Source' in the Location field. This allows the referral source to be recorded
- Enter 'Assigned To' in the Staff field. This allows the staff member to whom the referral is assigned to be recorded
- Enter 'Outcome' in the Outcome field. This allows the outcome of the referral to be recorded
- Enter 'Outcome Date' in the Outcome Date field. This allows the date on which the referral outcome is decided to be recorded
- Enter 'Outcome Notified' in the Outcome Notified Date field. This allows the date on which the referrer is notified of the outcome to be recorded
- Enter 'Comments' in the Comments field. This allows comments to be recorded
- Select 'Element Type' for the Security Level field
Adding the element type 'Referral'
Add the Element Detail
- Click the New
toolbar button while Referral is still selected in the list to the left
- Fields for entering and defining a specific element of the type 'Referral' will be displayed. Note that controls for date, location, staff and outcome have the same caption as you used to define the element type in the steps above
- Replace 'New Element Detail' in the Detail field with 'Orthopaedics'
Add the Location Group
- Select '<..Edit this list..>' from the Source Group combo box. The Location Group Setup form will be displayed
- Click New and type 'Medical Centres':
Adding the Location Group
- Click on Close to close the Location Group Setup form. The Source Group combo box will now display 'Medical Centres'
Edit the Location Group
- Click on the ellipses button
to the right of the Source Group combo box. The Set up location group 'Medical Centres' form will be displayed
- Click New and select 'Medical Centre' from the drop list of location types in the Location Type column
- In the same row, click under the Include by default column. A ticked check box will appear in the column you ticked (and disappear from the Exclude by default column). Alternatively you can use the space bar to move the check box from Exclude by default to Include by default. This means that by default, when any new location of type 'medical centre' is added, it will be included in this group. Locations can be excluded later should you wish:
Editing the Location Group
- Click on Close to close the Set up location group 'Medical Centres' form
Add the Staff Group
- Select '<..Edit this list..>' from the Assigned To combo box. The Staff Group Setup form will be displayed
- Click New and type 'Referral Managers':
Adding the Staff Group
- Click on Close to close the Staff Group Setup form. The Assigned To combo box will now display 'Referral Managers'
Edit the Staff Group
- Click on the ellipses button
to the right of the Assigned To combo box. The Setup staff group 'Referral Managers' form will be displayed
- Click on 'Nurse' so that this item alone is highlighted. This means that the nurse will be responsible for triaging the referrals and deciding whether they should be accepted or declined:
Editing the Staff Group
- Click on Close to close the Setup staff group 'Referral Managers' form
Designate the types of episode to which the element may belong
- Under Episodes this data element can be used in click on the ellipses button
next to Maintain List. The Select Episodes form will be displayed
- Click on 'Patient/Orthopaedics' so that it is highlighted. This will allow 'Referral' elements to be recorded in 'Orthopaedics' episodes:
Designating Episode Types
- Click on Close to close the Select Episodes form. 'Patient/Orthopaedics' will be displayed in the list of episode types the element may be used in
Setup workflow (element automation)
- Also under Episodes this data element can be used in, from the Start Episode combo, select 'Orthopaedics' . This will allow the user to enter a 'Referral/Orthopaedics' element without first giving the patient an 'Orthopaedics' episode. An 'Orthopaedics' episode will start automatically, and the 'Referral/Orthopaedics' element will be added to the started episode
Add the possible outcomes
- Under Outcome, click on the ellipses button
next to Maintain List. The Select From Existing Outcomes form will be displayed
- Click on Go To Outcome Setup. The Data Element Outcome form will appear
- Click on New and type 'Accepted'
- Click on New and type 'Declined':
Creating Outcomes
- Click on Close to close the Data Element Outcome form
- Click on 'Accepted' and click on 'Declined' in the Select From Existing Outcomes form so that both are highlighted. This selects these two as possible outcomes for the 'Referral/Orthopaedics' element
- Click on Close to close the Select From Existing Outcomes form. Both 'Accepted' and 'Declined' will now display in the list of outcomes allowed for the element
Setup workflow (outcome automation)
- Under Outcome click on 'Declined' in the list
- Click Episode started or ended for outcome selected. The Outcome Episode Automation form will be displayed
- Select '<..End Episode..>' from the Start Episode combo. This will ensure that declining the referral to orthopaedics will automatically close the orthopaedic episode:
Automating Outcomes
- Click on Close to close the Outcome Episode Automation form
Referral/Orthopaedics element detail
Setup The Icon For this Element
- Select the Referral Element Type on the left hand side of the screen.
- Associate an Icon with the element type by clicking Choose Icon and selecting an icon from those provided.OK
Available Icon List
- Click the Save
toolbar button
- The element detail will be saved and the list on the left refreshed showing the selected icon rather than the default.
Additional Points
- As well as a referral to Orthopaedics, it is possible to create as many different referrals as you require.
- You do not have to create new location groups, staff groups and/or outcomes for every element detail. Existing ones can be used if suitable.
- The Ajexus engine component can be used to electronically send and receive data, including order requests.
- To ensure data integrity, it is possible to limit the number of referrals per episode to one, and also to set validation rules that the referral data entry must meet before it is accepted by Ajexus.
- A script editor is available to perform additional tasks relating to the element.
- If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
Creating a Medical Record Element List
11 Designing a Full Record Element List
Task objective
To show how an element list containing elements which represent a patient's entire medical record is created.
Task steps
- Select Administration, then Design Element List from the menu. The Design Element List form will be displayed
- Enter 'Full Record - Group By Episode' in the Report Name field
- The default Sort By fields should be left as they are
- Click on the Fields To Show ellipses button
. The Element Report Field Chooser form will be displayed. This is where you can choose the fields to display for the element list. The fields you choose will be the fields shown in the element list in the order they are chosen
- To remove element fields from the Display Fields grid, click on the column of the field you want to remove, hold down the mouse button and drag it off the grid, and then release the mouse button
- To remove sub-element fields from the Display Fields grid, click on the sub-element type (below the grey column header), hold down the mouse button and drag it off the grid, and then release the mouse button
Element Report Field Chooser with sub-element details removed
- To add fields, click on the field you want to add, hold down the mouse button and drag it on to the grid, and then release the mouse button. Add the following fields as both element fields and as sub-element fields to the Display Fields grid:
- Actual Date
- Actual Time
- Element Type
- Element Detail
- Quantity 1
- Quantity 1 Units
- Comments
- Location
- Outcome
- Outcome Date
- Staff Involved
Field Chooser showing fields to display for the Full Record - Group By Episode element list
- Click OK to close the Element Report Field Chooser form
- Click the Save
toolbar button. The Save Changes message box will be displayed
- Click Yes to save the criteria which defines the element list.
Design Element List form showing criteria for 'Full Record - Group By Episode' element list
- When you have added a patient and added data elements to that patients record, you will be able to select the 'Full Record - Group By Episode' element list from the Elements menu, or click the Elements
toolbar button drop menu and select it from the list. This will display the patients entire medical record, grouping elements by the episode they belong to.
Additional Points
- You can create other element lists and select other criteria to filter the patient's medical record, so that only certain data elements are displayed.
- Right clicking on a selected field in the Display Fields grid toggles an asterisk * on or off. This asterisk indicates that the optimal width of the field will be found when the element list is displayed (so that the 'widest' item in that column may be displayed in full). If the asterisk is removed, the field will be displayed with the same width as in the grid. In this case items will be truncated if necessary when the element list is displayed. A field can be resized by moving the mouse pointer over the left or right edge of the field (so that the mouse cursor changes to a resize cursor), and then dragging that edge to the desired width.
- At least one field must always be selected for an element list.
- If the Show Subelements checkbox on the Design Element List screen is ticked, then sub-elements will be included in the element list. Which sub-element fields are displayed depends on which fields are selected from the sub-elements list in the Element Report Field Chooser form, and are shown underneath the column headers in the Display Fields grid.
- If you select Episode, Element Type, Element Detail or Equipment Description as the first Sort By field, then you will also be given the option of grouping by that field.
- If you select a specific element type from the Element Type field on the Design Element List screen, the labels of other criteria fields and the names of Sort By and Date Type fields will change to the names defined in the Data Dictionary for that element type.
Adding Staff
12 Adding Staff and Allied Staff
Task objectives
To show how details of an organisation's staff members are recorded in Ajexus along with allied staff from other organisations who interact with your patients. To show how episode types are used to define what it is that a staff member does within the organisation and how to assign an episode to a staff member.
Task steps
For the purpose of this task, all details are based on fictitious people.
- To add a staff member in Ajexus, first search for them to see if a record already exists. This will prevent duplicate records being added
- Click the Select toolbar button
. The Select Record form will be displayed
- Select 'Staff' from the Category combo box
- Type 'Black' in the Surname field and click the Refresh toolbar button to display a list of possible matches. A dialog box will be displayed asking you if you wish to add a new record:
New Record Dialog
- Click on Yes, making sure you have the correct spelling
- A fresh Demographics form containing just the surname 'Black' will be displayed
- Select 'Mr' from the Title combo box
- Enter 'Jack' in the First Name(s) field
- Select 'ABC Healthcare' from the Work Address Address Name combo box
- Click the Save
toolbar button. The Save Changes message box will be displayed
- Click Yes to save your changes
Staff Demographics form
- Select View, then Episodes from the menu. The Episodes - Black, Jack form will be displayed
- Select 'Nurse' from the Episode Type combo box:
Episodes Form
- Click Apply. This will give the staff member Jack Black a new episode of type 'Nurse'
- Click Close to close the Episodes - Black Jack form.
More Information
More information can be found under Select a Patient Record in the User Guide.
Add Patient Data
13 Creating a Patient Record
Task objective
To show how a patient record is searched for, and if not found, a new medical record is created by entering the patients personal information.
Task steps
Personal Details
- Click the Select
toolbar button. The Select Record form will be displayed
- Ensure 'Patient' is selected in the Category combo box
- Enter 'Jones' in the Surname field and 'Jan' in the First Name field
- Click the Refresh
toolbar button. A message box asking you if you wish to add a new record will be displayed
- Click Yes
- A fresh Demographics screen containing your search criteria (Surname 'Jones', First name 'Jan') will be displayed</li>
- Enter Jan Jones personal details from the table below into the Demographic form for the new record (bold indicates headings, normal text indicates what is to be entered in these fields):
Title
| Mrs
|
Gender
| Female
|
First Name(s)
| Jan
|
Surname
| Jones
|
Date of Birth
| 23/03/1974
|
Ethnicity
| European
|
Home Address Line 1
| 1 Third St
|
City
| Christchurch
|
State/Postal Code
| 8043
|
Country
| New Zealand
|
- Click the Save
toolbar button and then click Yes when prompted to save your changes.
Additional Points
- You can search for a patient by entering the first few letters of the surname.
- Ensure that the year of date of birth is entered as a four digit year (i.e. 1974). Date settings in Ajexus depend on Date settings in Regional settings in Windows, therefore a 2 digit date, for example '29, will display as 2029 not 1929.
Patient Demographics form
Referral
14 Referring the Patient In
Task objective
To show how a referral is added to the patient's medical record.
Task steps
For the purposes of the tutorial, a referral has been received for our patient Jan Jones.
Record the referral
- Select Elements, then Full Record - Group By Episode from the menu. The Full Record - Group By Episode element list will be displayed
- Click on the New
toolbar button. The Edit Data Element form will be displayed
- Select '<...New Episode...>' from the Episode combo box. The Element Type/Entry Form combo box will be displayed
- Select 'Referral' from the Element Type/Entry Form combo box. The Detail combo box will be displayed
- Select 'Orthopaedics' from the Detail combo box. The fields which you enabled for the 'Referral' element type in Step 10 will appear (with the labels you defined)
- Select 'Downtown Medical Centre' from the Source combo box
- Select 'Black Jack' from the Assigned To combo box:
Adding a Referral/Orthopaedics element
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click on Yes. Notice that the element list is no longer empty. An Orthopaedics episode has been started automatically and the Referral element you have just added has been added to the episode.
Full Record - Group By Episode element list
Administration Reports
15 Designing a Report for All Referrals Received this Week
Task objective
To show how filtered lists of elements (summary reports) are defined by specifying criteria which restrict the elements by episode type, element type and/or detail, location, outcome, and many other types of criteria that organisations may use.
Task steps
- Select Administration, then Design Summary Report from the menu. The Summary Report Builder form will be displayed
Summary Report Builder form
- In the Report Name field enter 'All Referrals Received This Week'
- Select 'Referral' from the Element Type combo box. Notice again how labels have changed to those you defined for the 'Referral' element type in Step 10, and that those fields for which you did not define a label disappear when you select this item
- Clear the Sort By 2 combo box by selecting it and pressing the [Delete] key. The Sort By 3 value ('Firstname') will move up to take its place. Press [Delete] again to clear this. The Sort By 3 combo box will disappear
- In the combo box under Date Type, ensure that 'Actual Date' is selected
- In the adjacent combo box under Date Default select 'This Week'
- Click on the ellipses button
next to Fields To Show. The Element Report Field Chooser form will be displayed
- To remove fields from the Display Fields grid, click on the column of the field you want to remove, hold down the mouse button, drag it off the grid and then release the mouse button. To add fields, click on the field you want to add, hold down the mouse button, drag it on to the grid and then release the mouse button. Select the following fields to show in the grid:
- Actual Date
- Surname
- Firstname
- Home Phone
- Element Detail
- Location
- Staff Involved
Fields for 'All Referrals Received This Week' summary report
- Click on OK to close the Element Report Field Chooser form
- Click the Save
toolbar button and then click Yes when prompted to save your changes
Criteria for 'All Referrals Received This Week' summary report
- Select Report, then All Referrals Received This Week from the menu (the report you have just defined has been added to the Report menu). The All Referrals Received This Week summary will be displayed, and should show the referral you added for Jan Jones in the previous step. If you entered the referral on a previous week then it will not be shown, and you will need to adjust the From and To dates shown on the Date tab control.
'All Referrals Received this Week' report
Additional Points
- As well as adjusting the date criteria, the user may also specify element type, detail, location and staff criteria before updating a summary list. The user may only do this if the '<...ALL - Allow Select...>' option is selected for the corresponding field in the summary criteria.
Investigation
16 Creating an Assessment
Task objectives
To show how a typical assessment element of the medical record can be created to record the details of an assessment and to demonstrate how the assessment can be scheduled using the appointment planner, which is an option for any element for which appointments are relevant.
Task steps
Rather than detailing every step, a table of the data to be entered is used for steps already learnt in previous tasks.
- Select Configuration, then Data Dictionary from the menu. The Data Dictionary form will be displayed
- Click on the Main item under Elements in the list box on the left
- Following the instructions in 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Assessment
|
Detail
| Detail
|
Actual Date
| Date
|
Time
| Time
|
Length / Qty
| Length
|
Location
| Clinic
|
Staff
| Physician
|
Notified Date
| Notified Date
|
Outcome
| Outcome
|
Outcome Date
| Outcome Date
|
Outcome Notified Date
| Outcome Notified
|
Comments
| Comments
|
Security Level
| Element Type
|
Assessment Element Type
- Add an element detail to the Assessment element type using the following information:
Detail
| Medical
|
Default Date
| Today
|
Length Units
| mins
|
Clinic
| Add a new location group 'Clinics'. The location group determines which locations will be available to choose from when users schedule an assessment by adding an Assessment/Medical element to a patients record. Edit the location group (via the ellipses button) and add the 'Clinic Location' location type to the group. As a result only locations of this type will be included in the staff group. Ensure 'Include by default' is ticked for the 'Clinic Location' location type. This means that all locations of this type will automatically be included in the location group (it is possible to exclude specific locations from the location group).
|
Physician
| Add a new staff group 'Physicians'. The staff group determines which staff will be available to choose from when adding an Assessment/Medical element to a patients record. Edit the new staff group selecting the 'Orthopaedic Surgeon' and 'Ophthalmologist' staff types. As a result only staff who have an active episode of one of these types will be included in the staff group.
|
Allow Planner
| Check the box. This will enable users to use the appointment planner to schedule Assessment/Medical elements.
|
Outcome
|
Add the following new outcomes (Go To Outcome Setup via the Maintain List ellipses button) and link them to this element: 'Arrived', 'Did not arrive', and 'Cancelled'. When creating the 'Cancelled' outcome, check the box 'Cancelled Appointment'
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics'
|
Assessment/Medical Element Detail
Add sub-element type
- Select the Sub item from the list box on the left
- Click the New
toolbar button and enter 'Vital Signs' in the Type field
- Enter 'Detail' in Detail field
- Enter 'Value' in the Length / Qty field
- Check the Inherit Date From Parent check box
Add sub-element details (full details, auto add)
- Click the New
toolbar button and enter 'Height' in the Detail field
- Enter 'inches' in the Value Units field
- Enter '1' in the Sort Order field
Height Sub-element detail
- Select the Vital Signs sub-element type from the list on the left
- Add further sub-element details according to following table New
toolbar button for each item:
sub-element Detail
| Weight
| Temperature
| Systolic BP
| Diastolic BP
|
Value Units
| lbs
| F
| mm HG
| mm HG
|
Sort Order
| 2
| 3
| 4
| 5
|
Link the sub-elements to the element
- Select the Medical element detail from the list on the left. The Data Dictionary form will display the element details
- Click the Link sub data elements to this data element command button. The Assessment/Medical form will be displayed
- Click on New and select 'Vital Signs' from the drop list in the Sub-element Type column
- In the same row, click under the Full Details column so that this is now ticked instead of the Multi-Select column (Multi-Select means that when you add the sub-elements to a parent element you may only add one of each kind of sub-element. Once you have added a sub-element to a parent element, that sub-element will no longer be available to add to the parent element. Full Details means you may add as many of each kind as is required)
- In the same row click under the Auto Add column so that it is ticked. This will cause all these 'Vital Sign' sub-elements to be included automatically with the parent element when adding an 'Assessment/Medical' element to a patient's record:
- Click Close to close the Assessment/Medical form
Add sub-element type (Multi-select)
- Select the Sub item from the list box on the left
- Click the New
toolbar button and enter "Risk Factors' in the Type field
- Check the Inherit date from parent
Add sub-element detail (Multi-select)
- Ensure the 'Risk Factors' element type is selected in the list on the left
- Click the New
toolbar button and enter 'Smoking' in the Detail field
- Add further sub-element details according to the following list:
- Excessive alcohol
- Other drug abuse
- Poor diet & nutrition
- Inadequate physical activity
- Unprotected sexual activity
- Excessive sun exposure
- Obesity
- High blood pressure
- Raised blood cholesterol
Risk Factors Sub-element Type and Sub-element Details
Link the sub-elements to the element
- Select the Medical element detail from the list on the left. The Data Dictionary form should show the element details
- Click the Link sub data elements to this data element command button. The Assessment/Medical form will be shown
- Click New and select 'Risk Factors' from the drop list in the Sub-element Type column
- The Multi-Select column will already be ticked. Do not change it.
Assessment Medical form
- Click Close to close the Assessment/Medical form.
Additional Points
- Typical examination areas would include: deformities of the lower extremities, gait, ROM, tenderness, and knee stability. Additional sub-elements can be used to record these findings.
- Additional sub-element types together with their sub-element details can be added to record other information groups for the assessment.
- You can give the 'Assessment' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
Investigation
17 Creating an Order
Task objective
To show how an order can be created and added to the Data Dictionary, so that requests for assistance from another service can be recorded.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Order
|
Detail
| Detail
|
Actual Date
| Date
|
Staff
| Requested By
|
Outcome
| Outcome
|
Outcome Date
| Outcome Date
|
Comments
| Comments
|
Security Level
| Element Type
|
- Add an element detail using the following information:
Detail
| Knee X-ray
|
Default Date
| Today
|
Requested By
| Use the 'Physicians' staff group
|
Outcome
| Add an outcome 'Completed' and link to this and the existing 'Cancelled' outcome
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
- Select the Order element type from the list on the left
- Enter 'View' in the Extra Detail field
- Select the Knee X-Ray element detail from the list on the left
- Click the
toolbar button to add a new extra detail
- Enter 'Anteroposterior' in the Extra Detail field
- Repeat steps 7-9 to enter the following extra details:
Creating an Order element type with Knee X-ray element detail and extra details
Additional Points
- As well as an order for an X-ray, it is possible to create as many different orders as you require, by adding element details to the 'Order' element type.
- You do not have to create new location groups, staff groups and/or outcomes for every element detail. Existing ones can be used if suitable.
- The Ajexus engine component can be used to electronically send and receive data, including order requests.
- You can give the 'Order' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
18 Creating a Result
Task objective
To show how a 'Result' element can be created and added to the Data Dictionary, so that the receipt of a test result can be recorded.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Result
|
Detail
| Detail
|
Actual Date
| Date
|
Comments
| Comments
|
Security Level
| Element Type
|
- Add an element detail using the following information:
Detail
| Knee X-ray
|
Default Date
| Today
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
Additional Points
- As well as the X-ray result, it is possible to record as many different results as you like by adding element details to the 'Result' element type.
- For empirical results, the quantity fields may be used to record result values.
- You can give the 'Result' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
Diagnosis
19 Creating a Diagnosis
Task objective
To show how a 'Diagnosis' element may be defined using the Data Dictionary.
Once defined 'Diagnosis' elements may be added to the medical record of any patient with an 'Orthopaedics' episode, recording all the details of the diagnosis.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Diagnosis
|
Detail
| Detail
|
Actual Date
| Date
|
Staff
| Physician
|
Notified Date
| Notified Date
|
Comments
| Comments
|
Security Level
| Element Type
|
- Add an element detail using the following information:
Detail
| Orthopaedic
|
Default Date
| Today
|
Physician
| Use the existing 'Physicians' group
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
Diagnosis/Orthopaedic element type/detail
Add a sub-element type (Multi-select)
- Select the Sub item from the list box on the left
- Click the New
toolbar button and enter 'Orthopaedic Diagnosis' in the Type field
- Check the Inherit date from parent
Add sub-element details (Multi-select)
- Click the New
toolbar button and enter 'ACL Tear' in the Detail field
- Add further sub-element details according to the following list:
- Rupture of the Quadriceps
- Patellar Tendon Avulsion
Creating a Diagnosis element type, element detail, sub-element type and sub-element detail
Link the sub-elements to the element (Multi-select)
- Select the Orthopaedic element detail from the list on the left (under Diagnosis)
- Click the Link sub data elements to this element command button. The Diagnosis/Orthopaedic form will be displayed
- Click New and select 'Orthopaedic Diagnosis' from the drop list in the Subdata Element Type column
- The Multi-Select column will already be ticked. Do not change it
Diagnosis Orthopaedic form
- Click Close to close the Diagnosis/Orthopaedic form.
Additional Points
- Coding systems (e.g. DSM IV, ICD 10 CM) can also be used to record a diagnosis by creating element details for these codes, creating corresponding sub-element types with details for each code, and linking the sub-element type to the matching parent detail. When a user adds a diagnosis element to a patients record, they will be able to add one or more sub-elements representing the appropriate codes and record a value for each.
- You can give the 'Diagnosis' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
Treatment
20 Creating a Care Plan
Task objectives
To show how a typical care plan element of the medical record can be created to record the details of planned treatment. To demonstrate how the care plan can use sub-elements to record the individual care plan elements that are checked off as they are completed.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in Step 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Care Plan
|
Detail
| Detail
|
Actual Date
| Date
|
Staff
| Prepared By
|
Notified Date
| Printed
|
Outcome
| Consent
|
Outcome Date
| Consent Date
|
Comments
| Comments
|
- Add an element detail using the following information:
Detail
| Medical
|
Default Date
| Today
|
Prepared By
| Use the existing 'Physicians' staff group
|
Outcome
| Add the following new outcomes and link to this element: 'Consent Given', 'Consent Not Given'
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
Add sub-element type (Multi-select)
- Click on the Sub item in the list box on the left
- Click the New
toolbar button and enter 'Medical Treatment' in the Type field
- Check the Inherit date from parent check box
Add sub-element details (Multi-select)
- Ensure the Medical Treatment element type is still selected in the list on the left
- Click the New
toolbar button and enter 'Medication' in the Detail field
- Repeat steps 7 - 8 to add further sub-element details according to following list:
- Physical Therapy
- Counselling
- Surgery
Link the sub-elements to the element (Multi-select)
- Select the Medical element detail (under the Care Plan element type) from the list on the left
- Click the Link sub data elements to this data element command button. The Care Plan/Medical form will be displayed
- Click New and select 'Medical Treatment' from the drop list in the Sub-element Type column
- The Multi-Select column will already be ticked. Do not change it
Care Plan/Medical form
- Click Close to close the Care Plan/Medical form.
Additional Points
- Additional sub-element types together with their sub-element details can be added to record other information groups for the treatment.
- You can give the 'Care Plan' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
21 Creating a Medication
Task objective
To show how a medication element of the medical record can be set up to record existing medication, medication newly prescribed during care, and medications discontinued.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in Step 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Medication
|
Detail
| Detail
|
Extra Detail
| Frequency/Route
|
Actual Date
| Date
|
Length / Oty
| Dose
|
Staff
| Prescribed By
|
Outcome
| Consent
|
Outcome Date
| Consent Date
|
Comments
| Comments
|
- Add an element detail using the following information:
Detail
| Ibuprofen
|
Default Date
| Today
|
Quantity Units
| mg
|
Prescribed By
| Use the existing 'Physicians' group
|
Outcome
| Add a new outcome 'Discontinued' and link to this element
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
- Ensure the Ibuprofen element detail is still selected in the list on the left
- Click the New
toolbar button
- Enter 'Oral 1 x daily' in the Extra Detail field
- Click the New
toolbar button
- Enter 'Oral 2 x daily' in the Extra Detail field
Medication/Ibuprofen element type, detail and extra details
Additional Points
- By specifying a name for the Review Date element type field, and selecting a review period from the Default Review Date element detail combo box, a review date will be entered automatically whenever the user enters a 'Medication' element.
- Sub-elements can be defined to record when the medication is dispensed and added to the parent element whenever this occurs.
- Medication lists may be imported electronically if required.
- You can give the 'Medication' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
22 Creating a Surgery
Task objectives
To define a data element to record details of any surgery carried out against a patient's medical record. To demonstrate how Ajexus is able to be deployed as an organisation-wide system.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in Step 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Surgery
|
Detail
| Detail
|
Extra Detail
| Procedure
|
Actual Date
| Date
|
Time
| Time
|
Length / Qty
| Length
|
Location
| Theatre
|
Staff
| Physician
|
Notified Date
| Notified Date
|
Outcome
| Outcome
|
Outcome Date
| Outcome Date
|
Outcome Notified Date
| Outcome Notified
|
Comments
| Comments
|
- Add an element detail using the following information:
Detail
| ACL Reconstruction
|
Default Date
| Today
|
Length Units
| hours
|
Theatre
| Add a new location group 'Theatres'. Add the 'Theatre Location' location type to the group and ensure 'Include by default' is ticked for that location type
|
Physician
| Use the existing 'Physicians' staff group
|
Outcome
| Link the element to these existing outcomes: 'Completed', 'Cancelled'
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
- Ensure the ACL Reconstruction element detail is selected
- Click the New
toolbar button
- Enter 'Allograft Bone Patellar Bone' in the Extra Detail field
- Click the New
toolbar button again and enter 'Using Hamstrings' in the Extra Detail field.
Creating a Surgery/ACL Reconstruction element
Additional Points
- The Appointment Planner can be used to schedule theatre time. The Appointment Planner can be made available when an element is added to a patient's medical record by ensuring the Allow Planner field is checked in the Data Dictionary definition of the element detail.
- Sub-elements can be used to record surgical notes, recordings, and so forth.
- You can give the 'Surgery' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
23 Creating Therapy
Task objective
To define a typical therapy data element to record the details of the type of therapy carried out and to demonstrate how the therapy is recorded with the intention of reaching the outcome.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in Step 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Therapy
|
Detail
| Detail
|
Actual Date
| Date
|
Time
| Time
|
Length / Qty
| Length
|
Location
| Clinic
|
Staff
| Therapist
|
Notified Date
| Notified Date
|
Outcome
| Outcome
|
Outcome Date
| Outcome Date
|
Outcome Notified Date
| Outcome Notified
|
Comments
| Comments
|
- Add an element detail using the following information:
Detail
| Physical Therapy
|
Default Date
| Today
|
Length Units
| mins
|
Clinic
| Use the existing location group 'Clinics'
|
Therapist
| Add a new staff group 'Therapists' and select the 'Physical Therapist' staff episode type to define the group
|
Outcome
| Link the following previously created outcomes to this element: 'Arrived', 'Did Not Arrive', and 'Cancelled'
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
- In addition, make sure the field Recurring entries can be input in one go is ticked. This allows a number of these elements to be entered in a single operation.
Creating a Therapy/Physical Therapy element detail
Additional Points
- The appointment planner could be used to schedule therapy clinics.
- You can give the 'Therapy' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
24 Creating a Review
Task objective
To show how a typical review element of the medical record may be created to record the details of a review carried out at the completion of treatment. To demonstrate how the review element is used to record how effective that treatment was.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in Step 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields)
Type
| Review
|
Detail
| Detail
|
Actual Date
| Date
|
Time
| Time
|
Length / Qty
| Length
|
Location
| Clinic
|
Staff
| Reviewed By
|
Notified Date
| Notified Date
|
Outcome
| Outcome
|
Outcome Date
| Outcome Date
|
Outcome Notified Date
| Outcome Notified
|
Comments
| Comments
|
- Add an element detail using the following information:
Detail
| Medical
|
Default Date
| Today
|
Length Units
| mins
|
Clinic
| Use the existing location group 'Clinics'
|
Reviewed By
| Use the existing staff group 'Physicians'
|
Outcome
| Link the following outcomes to this element: 'Arrived', 'Did Not Arrive' , 'Cancelled'
|
Episodes this data element can be used in
| Select 'Patient/Orthopaedics' episode type
|
Creating a Review/Medical element type/detail
Additional Points
- The appointment planner can be used to schedule the review.
- Sub-elements should be used to record review data elements.
- Other types of reviews can be recorded, for example, nursing care.
- You can give the 'Review' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
Discharge
25 Creating a Discharge
Task objective
To show how a discharge element of the medical record can be created, so that discharge details can be recorded.
Task steps
- Click on the Main item under Elements in the list box on the left
- Following the instructions in Step 10 Creating a Referral In, add a new element type with the following information (bold indicates field names, plain text indicates what is to be entered in these fields):
Type
| Discharge
|
Detail
| Detail
|
Extra Detail
| Condition
|
Actual Date
| Date
|
Staff
| Discharged By
|
Comments
| Comments
|
- Add an element detail using the following information:
Detail
| Orthopaedics
|
Default Date
| Today
|
Discharged By
| Use the existing 'Physicians' staff group
|
Episodes this data element can be used in
| Select the 'Patient/Orthopaedics' episode type
|
- Ensure the Orthopaedics element detail is selected
- Click the New
toolbar button
- Enter 'Worse' in the Extra Detail field
- Repeat steps 4 - 6 entering the following extra details:
- Stable
- Improved
- Recovered
Add episode automation
- Ensure the Orthopaedics element detail is selected
- Under Episodes this data element can be used in, select '<...End Episode...>' from the Start Episode combo box. This will ensure that when a 'Discharge/Orthopaedics' element is added to the active 'Orthopaedics' episode of a patients medical record, that episode will automatically be closed.
Creating a Discharge/Orthopaedics element detail
Additional Points
- You can give the 'Discharge' element type its own icon by selecting it from the list on the left, clicking Choose Icon and then selecting an icon from those provided. If necessary you can create your own icons and load them into Ajexus. These icons are displayed in element lists.
Designing Printed Forms and Letters
26 Designing an Appointment Letter
Task objective
To show how the report writer is used to create a form letter to notify patients of an upcoming appointment and to show how element reports are linked to elements and/or their outcomes by dragging and dropping the report.
Task steps
- From the menu select Administration, then Design Printout. The Select Report Design form will be displayed
- Expand the Element Reports item in the list by clicking on the plus sign next to it
- Expand the Element Edit item underneath Element Reports in the list
Select Report Design form
- Click the New
toolbar button.
Report Designer form
Add Today's Date Field
- On the lowermost 'Tools' toolbar select the text Box

- Move the mouse pointer to the top left corner of the Page Header section of the report and 'draw' the text field on the report by holding the left button down and 'dragging' the bottom right corner of the solid rectangle which appears. The rectangle or 'rubber band' represents the dimensions of the text field with top left corner at the point where you first pressed the left button. Release the left button and the text control will appear. You can resize it again by moving the mouse pointer over one of the resize handles till the mouse pointer changes to a resize icon, and then dragging the rubber band as before. Make the text field large enough to hold a date in long format (e.g. 'Wednesday, 18 November 2015')
- Right click inside the text field and select Properties ... from the context menu. The properties dialog will appear
- On the Output Format tab select 'Custom' from the Category list
- Enter 'Long Date' in the Type text box. Other options are 'Short Date', 'Medium Date', 'dd mmm yyyy', 'ddd mm yy' etc. You can also select the 'Date' option from the Category list and choose a type. By using 'Custom' and 'Long Date' the system long date will be displayed as defined in Regional Settings:
Properties dialog
- Click Apply and then click OK to close the Properties dialog
- Ensure 'TextBox1' is selected in the combo box at the top of the Property Toolbox (on the right of the form)
- Select (Name) from the list of properties in the Property Toolbox and enter 'txtTodaysDate' in the property value field next to it
- Select Datafield from the list of properties in the Property Toolbox and enter '=System.DateTime.Today' for the property value. This will ensure the current date is displayed in the field when the report is run
Add Patient Name Formula Field
- Select the text tool

- As before draw the field on the report, this time in the top left corner of the Detail section. Make the field roughly the same width as the page
- Ensure 'TextBox1' is selected in the combo box at the top of the Property Toolbox
- Select (Name) from the list of properties in the Property Toolbox and enter 'txtPatientName' for the property value. Note that this is the name by which the control will be known - it will continue to appear with 'TextBox1' in its contents however you can change this by editing its Text property. For example, we have renamed 'TextBox1' as 'PatientName'. What is displayed in a text control when a report is run depends on its DataField property.
- Select Datafield from the list of properties in the Property Toolbox and enter:
= Trim (Title_Name + " " + (Record_Firstname + " "+ Record_Surname).Trim)
for the property value. This will ensure that when the report is printed or previewed the field will contain the title, first names, and surname of the selected person, and they will be concatenated with only a single space separating them (e.g. 'Mr John Brown'). Trim is a Visual Basic (VB) script function which removes any leading or trailing spaces (i.e. if there is no value for one of the fields). The Datafield of a control may contain a single field from the Fields List or a VB Script expression such as the one above which combines several fields. The formula above is useful for ensuring names are properly formatted (i.e. separated by a single space only)
Add Address Fields
- Using the mouse, select the 'HomeLocation_AddressLine1' field from the Fields List toolbox, drag it onto the report and drop it on the Detail section underneath txtPatientName.
- Resize the field making it wide enough to hold the first address line
- Ensure that 'txtHomeLocation_AddressLine1' is selected in the combo box at the top of the Property Toolbox. Note the (Name) and Datafield properties for this field have been set automatically to 'txtHomeLocation_AddressLine1' and 'HomeLocation_AddressLine1' respectively. Setting the Datafield property to this value means that when the report is printed or previewed, the field you have added will contain the first address line of the selected person
- Repeat the steps above to add the remaining home address lines
Add Dear etc Formula Field
- Select the text tool

- As before, draw the field on the report underneath the address fields. Make the field roughly the same width as the page
- Ensure 'TextBox1' is selected in the combo box at the top of the Property Toolbox
- Select (Name) from the list of properties in the Property Toolbox and enter 'txtDearName' for the property value
- Select Datafield from the list of properties in the Property Toolbox and enter:
= " Dear " Trim + (Title_Name & " " + (Record_Surname)
for the property value. This will give, for example, 'Dear Mrs Hammersley', when the report is printed or previewed
Add Letter Text Label
- Select the label tool

- As before, draw the label on the report underneath the last field added. Make the label roughly the same width as the page
- Ensure 'Label1' is selected in the combo box at the top of the Property Toolbox
- Select (Name) from the list of properties in the Property Toolbox and enter 'lblAppointment' for the property value
- Select Text from the list of properties in the Property Toolbox and enter:
"We have made the following appointment for you":
for the property value
Add Appointment Fields
- Using the mouse, drag the following fields into the Detail section underneath lblAppointment and arrange and resize them appropriately:
- Element_Staff1Firstname
- Element_Staff1Surname
- Element_ActualDate
- Element_ActualTime
- Location_Name
- Location_AddressLine1
- Location_Telephone
Follow steps 7 - 9 above to format the Element_ActualDate and Element_ActualTime fields (choose 'Short Time' for Element_ActualTime)
Properties dialog
- Click the Save
toolbar button, answer Yes when prompted to save your changes and then enter 'Appointment Letter' when prompted for the report's name
Save Report dialog
Completed Appointment Letter in Report Designer
Link the report to an element detail
Element reports must be linked to elements before they will be available to the user for printing or previewing. Beneath the Element Edit item underneath Element Reports is a list of all the element types and their element details which you defined earlier using the Data Dictionary. The instructions below explain how to link the report you have just created to the Medical detail underneath the Assessment type in the list. These are the element detail and element type respectively which we defined in Step 16 - Creating an Assessment. By selecting these the report we create will be available for printing and previewing whenever the user adds or edits an Assessment/Medical element to a patient's record. In order to link the report to other elements simply drag it and drop it on the desired element detail. When the report is printed the notified date of the element will be updated.
The report may also be linked to outcomes so that it will be available to be printed or previewed whenever the selected element is given that outcome. When the report is printed the outcome notified date of the element will be updated.
- Click the Back
toolbar button to return to the Select Report Design screen containing the list of report types and reports.
- 'Appointment Letter' should now be showing underneath the Element Edit item. Expand the Assessment item beneath Element Edit in the list
- Use the mouse to drag Appointment Letter to the Medical item underneath Assessment in the list. When you 'drop' Appointment Letter it should appear underneath the Medical element detail and above the list of outcomes which are defined for the Medical element detail.
The report will now be available for printing and previewing whenever the user adds or edits an Assessment/Medical element. Printing the report will cause the notified date field of the element to be updated.
Appointment Letter is linked to Assessment/Medical elements
Additional Points
- You can preview the report from the Report Designer by clicking the Preview
toolbar button , but until you add an 'Assessment/Medical' element to a patients record, the fields will be blank.
- If the report page is too wide for your printer you may get blank pages when you print the report. A red line will appear down the right hand side of the page in the preview screen if the page is too wide. Resize the page in the Report Designer until the red line disappears from the preview screen.
- Use the Align Controls toolbar button
to align controls and ensure they are of uniform size (also available from the Format menu). You must select more than one control to make these options available. To select multiple controls hold the Shift key down and click on the controls you wish to select or select them as described below.
- You can select a group of controls by drawing a rectangle on the report page so that the rectangle contains part of each control you wish to select. Hold the left mouse button down when the mouse is over an empty part of the report section, and move the mouse to drag a corner of the rectangle that appears.
- You can move a field or fields that are selected by holding down the Ctrl key and an arrow key. You can resize a field by holding down Shift and repeatedly pressing an arrow key.
- Make sure the BackStyle property of a field (in the Property Toolbox) is set to ddBKNormal if you want to give a field a BackColor. By default it is set to ddBKTransparent so that the BackColor of the field's container will show through.
Filtering the Medical Record using Element Lists
27 Designing a Medication Element List
Task objective
To show how information may be filtered from the patient's (or staff member's) record, so as to only show elements that meet the criteria which defines the element list.
Task steps
- Select Administration, then Design Element List from the menu. The Design Element List form will be displayed
- Click the New
toolbar button
- Enter 'Medications' in the Report Name field
- Select 'Medication' from the Type combo box. This will limit the element list to medications
- Select ''<...None...>' from the Consent combo box. This will further limit the element list to medications that have not been discontinued (i.e. have not been given the outcome 'Discontinued')
- Select the Sort By 2 combo box. Click in it once and the combo box will open. Click in it again and the combo box will close with the contents highlighted. Press [DEL] to clear the field
- Select 'Actual Date DESC' from the Sort By 1 combo box
- Click the Fields To Show
button. The Element Report Field Chooser form will be shown. This allows you to select the fields to be shown in the element list, and allows you to choose the order in which they are shown
- Remove fields from the Display Fields grid by dragging them off the grid using the mouse so that the following fields are left:
- Detail
- Date
- Dose
- Dose 1 Units
- Comments
- Consent DateFields for the Medication element list
- Click OK to close the form
- Click the Save
toolbar button. The Save Changes message box will appear
- Click Yes to save the element list's definition
Medication element list criteria
28 Designing an Element List Printout
Task objective
To show how the Report Designer can be used to create a printout of the element list.
Task steps
- Select Administration, then Design Printout from the menu. The Select Report Design form will be displayed
- Expand the Element List Reports item in the list by clicking on the plus sign next to it
- Select the Full Record - Group By Episode item underneath Element List Reports in the listSelect Report Design form
- Click on the New
toolbar button. The Report Designer form will appear showing a new blank report. The Fields List will contain the same fields as are returned by the Full Record - Group By Episode element list you defined in step 11.
- Click the Page Setup
toolbar button . The Report Settings dialog box will appear
- Select Printer Settings from the toolbar on the left of the Report Settings dialog
- In the Orientation frame select the Landscape optionReport Settings form
- Click OK to close the dialog
Design the Heading
- Increase the page width using the mouse to drag the edge of the page and using the ruler at the top of the designer as your guide. Note that if you make the page width too wide for your printer's landscape settings the page width will be automatically reduced to the maximum width allowed when you save the report.
- Select the Label
tool from the lowermost 'Tools' toolbar
- Using the mouse draw a label in the PageHeader section. Make it roughly as wide as the page
- Ensure 'Label1' is selected in the combo box at the top of the Property Toolbox
- From the list of properties for the label select (Name) and enter 'lblTitle' for the property value
- From the list of properties for the label select Text and enter 'Medical Record' for the property value
- Select a suitable font and font size from the combo boxes on the 'Fonts' toolbar
- Click the Script Editor
toolbar button. The Script Editor will appear
- Select 'PageHeader' from the 'Object' combo box in the Script Editor
- Select 'Format' from the 'Events' combo box in the Script Editor
- Enter the following in the Script Editor's text box:
Dim dlReport As DataDynamics.ActiveReports.DataLayer = rpt.DataLayer
Dim strName ' As String
If Not dlReport.EOF Then
strName = Trim(dlReport.Fields.Item("Record_Surname").Value & _
" " & Left (dlReport.Fields.Item("Record_Firstname").Value + " ",1))
Me.lblTitle.Text = "Medical Record for " + strName
End If
Script Editor with Sample Code
- Click Ok
This script does the same thing as the formula in the DataField property of the patient name field in Step 26 Designing an Appointment Letter. It obtains a reference to the RecordSet which will hold the report data when the report is previewed or printed. This RecordSet is a property of the ADO (Active Data Objects) data control which is preloaded into the Detail section of each report. The RecordSet fields which contain the title, first name and surname of the person are then concatenated (only the initial letter of the first name), any leading or trailing spaces are removed and the caption of the label is set to the result. As a result if we run this report when looking at Full Record - Group By Episode for Jan Jones the label's caption should be set to 'Medical Record for Mrs J. Jones'
In order to interact with the controls on a report using script, the name of the control must be prefixed with 'rpt.' The following syntax may also be used in the script to refer to a control.
rpt.Sections(name of section).Controls(name of control)
Add another field to the PageHeader section (using the
toolbar button) and format it to display the current date as described in 26 Designing an Appointment Letter
Add a Group Section
- Right click in the Detail section of the report, select Insert from the context menu and then select Group Header/Footer from the submenu. A new group header section will appear above the Detail section and a new group footer section will appear below it
- Ensure 'GroupHeader1' is selected in the combo box at the top of the Property Toolbox
- Select (Name) from the list of properties for the group header and enter 'grpHdrEpisode' for the property value
- Select Datafield from the list of properties for the group header and select 'Element_EpisodeKey' from the drop list for the property value. This will ensure that a new group will be started in the report every time the episode changes
- Select GrpKeepTogether from the list of properties for the group header and select 'First Detail' for the property value. This will ensure that a new group will only be started near the bottom of a page if there is room to show the first element in that group
- Drag the 'EpisodeType_Name' field from the Fields List into the grpHdrEpisode section. Make the width roughly the width of the page
- Click the Script Editor
toolbar button. The Script Editor will appear
- Select 'grpHdrEpisode' from the Object combo box in the Script Editor
- Select 'Format' from the Events combo box in the Script Editor
- Enter the following in the Script Editor's text box:
Dim dlReport As DataDynamics.ActiveReports.DataLayer = rpt.DataLayer
Dim blnEpisodeActive As Boolean
If Not dlReport.EOF Then
'dim dr as System.Data.Datarow = rpt.
If Not isdbnull(rpt.fields("Episode_Active").Value) Then
blnEpisodeActive = CBool (rpt.Fields("Episode_Active").Value)
End If
If blnEpisodeActive Then
Me.txtEpisodeType_Name1.Text = Me.txtEpisodeType_Name1.Text + """Active"""
Me.txtEpisodeType_Name1.ForeColor = color.Red ' RGB(150,0,0) ' red
Else
Me.txtEpisodeType_Name1.ForeColor = color.DarkBlue
End If
End If
Script Editor with Sample Code
- Click OK
Again, this accesses the RecordSet property of the report's ADO data control every time a new episode group is started to find out whether or not the current episode is an active episode or not (using the 'Episode_Active' field of the report data). If it is an active episode, it adds the word 'Active' to the end of the episode group header and changes the ForeColor property of the text to red. If not, it changes the ForeColor property of the group header to dark blue.
Add Report Details
- Drag the following fields from the Fields List into the Detail section and arrange in a single row:
- Element_ActualDate
- Element_ActualTime
- ElementType_Name
- ElementDetail_Name
- Element_Quantity1
- Element_DetailQuantity1Units
- Location_Name
- Outcome_Name
- Element_OutcomeDate
- Format the txtElement_ActualDate, txtElement_OutcomeDate and txtElement_ActualTime fields to display the date and time appropriately (see Step 26)
- Select all of these fields by drawing a rectangle around them using the mouse. Change the font size to 8 and adjust the height and width of the controls accordingly (use the 'Align Controls' toolbar button)
- Drag the GroupFooter1 divider up so that the Detail section is just big enough to display the fields above and set the Height property of the GroupFooter1 section to 0. This will ensure that the rows are as close together as possible, if there is more than one element in the element list and that there is not a large gap between groups.
Designing a Full Record - Group By Episode element list printout using the Report Designer
- Click the Save
toolbar button. The Save Changes message box will be displayed
- Click Yes to save your changes. A dialog box will appear prompting you to enter a name for the report
- Enter 'Medical Record' for the name of the report.
Preview of 'Medical Record' report for patient Jan Jones (Note: this screenshot was taken after completing the tutorial, so there are more elements shown in the list here than have as yet been added for this patient)
Additional Points
- You can preview the report from the Report Designer by clicking the Preview
toolbar button, but until you have selected a person the fields will contain only dummy values.
- If the report page is too wide for your printer you may get blank pages when you print the report. A red line will appear down the right hand side of the page in the preview window if the page is too wide. Resize the page until the red line disappears.
- Use the Align Controls toolbar button to align controls and ensure they are of uniform size.
- You can select a group of controls by drawing a rectangle on the report page which contains part of each control you wish to select. Hold the left mouse button down when the mouse is over an empty part of the report section, and move the mouse to drag a corner of the rectangle that appears.
- You can move a field or fields that are selected by holding down the Ctrl key and an arrow key. You can resize a field by holding down Shift and repeatedly pressing an arrow key.
- Make sure the BackStyle property of a field (in the Property Toolbox) is set to ddBKNormal if you want to give a field a BackColor. By default it is set to ddBKTransparent so that the BackColor of the field's container will show through.
Custom Forms
29 Creating an Assessment Entry Form
Task objective
To show how to create your own Custom Form to facilitate data entry
Task steps
- Click on the Administration menu item then Design Custom Forms option
- A new blank Form Designer Screen will appear

The Design Custom Screen
Give The Form a Name
- On the right side of the screen is the properties box
- Change the value of the field '(name)' to 'frmAssessmentEntry'
- Change the value of the field 'caption' to 'Assessment Entry'. This is the name that the users will see.
Hint: Use the Form Design Layout Below to help with the next steps
Add the Screen Title
- Click on the Label
toolbar button
- Using the Caption Property type in an appropriate title for the form e.g. "Assessment Entry"
- Change the font type, size and alignment to appropriate values.
- Use the handles on the form to resize it and move it across the form to allow room for the company logo to the left.
Add the Patient and Physician Name Fields
- Use the Label
toolbar button to add a label field, and move to below the Screen Title caption box
- In the properties box change the Caption property to 'Patient Name'
- Add another label field to the form, and move to the right of the Patient Name label
- Use the (Name) Property to rename this field to 'labPatientName'
- Using the above steps create the following fields in a line underneath the appointment date/time information
- A label with the caption 'Physician:'
- A label with the name 'labPhysician'
Use the Properties box to set the Font Size, Bold and Type properties
Add Appointment Information
- Now create the following fields
- A label with the caption 'Appointment Date:'
- A label with the name 'labAppointmentDate'
- A label with the caption 'Time:'
- A label with the name 'labAppointmentTime'
- A label with the caption 'Length:'
- A label with the name 'labAppointmentLength'
- Use the Properties box to set the Font Size, Bold and Type properties for these fields
Add Vital Statistics Entry Fields Information
- Create a label captioned 'Vital Statistics' below the Appointment Date, Time and length fields
- Using steps 7 and 8 create create a label fields with the caption 'Blood Pressure:' underneath the Vital Statistics label
- Use the Text Box
button to create a new textbox and move it next to the blood pressure label
- Set the name of the new textbox to 'txtSystolic'
- Create another label with the caption 'Over' next to the textbox
- Create another textbox named 'txtDiastolic' next to the over label
- In a line underneath these fields create the following:
- A label with the caption 'Height:'
- A textbox with the name 'txtHeight'
- A label with the name 'labHeightUnits'
- A label with the caption 'Weight:'
- A textbox with the name 'txtWeight'
- A label with the name 'labWeightUnits '
- A label with the caption 'Temperature:'
- A textbox with the name 'txtTemperature'
- A label with the name 'labTemperatureUnits'
Use the Properties box to set the Font Size, Bold and Type properties for these fields
Add Risk Factors Fields
- Add one more label to the form just below the last field and change the caption to 'Comments'
- Add a text box below the comments label, call it 'txtComments' and set the 'Multiline' property to True
Adding the Outcome Combobox
- Add a label box below the comments text box, with the caption 'Outcome'
- Use the Combo box
toolbar button to create a new combo box, call it 'cboOutcome' and place it next to the Outcome label
Creating the Company Logo
- Click on the Picture Box
icon on the object toolbar. A small box will appear in the top left of the design area.
- Add your picture by scrolling down the properties box on the right hand side until you find the 'Picture' Property.
- Click on the ellipses button
and use the open dialog to find and select your picture.
- Stretch the box to accommodate the picture chosen and position as appropriate.
Set the Icon and Save
- Click the Save
button or use Save on the File menu to save the form
- The form will appear in the toolbar menu
- Click on the Add Icon
button, then locate and select an icon file to use for your form.
- Save the form again and the form will appear in the toolbar menu with the icon you have chosen. If your screen resolution is too low the icons will be available in the drop down menu accessed by clicking on the two chevrons to the far right of the toolbar as shown below.
The Completed Form in Design Mode
Adding the Code to the Form
- Click on the Script
toolbar button to bring up the script window. The Script Window will appear.
The Script Window
- Ensure that the Object Selected is (General) and the Script Event is (Declarations)
- Paste the following script into the window
Option Explicit
Public mlngRecordKey 'As Long (the key of the person whose record is displayed on this form)
Public mlngElementKey ' As long (the key of the element we are dealing with)
Public mlngElementDetailKey ' As long (the key for the detail of the element)
Public mlngRiskFactorElementTypeKey ' as long
Public mlngSystolicKey ' As long
Public mlngDiastolicKey ' As long
Public mlngHeightKey ' As long
Public mlngWeightKey ' As long
Public mlngTemperatureKey ' As long
Public mlngEpisodeKey 'As Long
Public mastrOutcome()
Public mastrRiskFactor()
Public mlngOutcomeCount
'Return values for Save method of Forms
'---------------------------------------
Public Const gintIAJEXUS_SAVE_CANCEL = 0
Public Const gintIAJEXUS_SAVE_NO = 1
Public Const gintIAJEXUS_SAVE_YES = 2
'Values for passing variable types
'---------------------------------------
Public Const adSmallInt = 2
Public Const adInteger = 3
Public Const adSingle = 4
Public Const adDouble = 5
Public Const adCurrency = 6
Public Const adDate = 7
Public const adBoolean = 11
Public Const adDBDate = 133
Public Const adDBTime = 134
Public Const adDBTimeStamp = 135
Public Const adVarChar = 200
Public Const rcNone = -3 'used for getting elements with null outcome values
Public Const ioOnly = 3 ' Used for selecting subelements only in getElementList
'Values for setting the format tags
'---------------------------------------
Public Const gstrCTRLTAGFORMAT_TEXT = "0" 'zero
Public Const gstrCTRLTAGFORMAT_UPPER_TEXT = "U"
Public Const gstrCTRLTAGFORMAT_PROPER_TEXT = "P"
Public Const gstrCTRLTAGFORMAT_PROPER_LEAVE_UPPER_TEXT = "L"
Public Const gstrCTRLTAGFORMAT_DATE = "1"
Public Const gstrCTRLTAGFORMAT_INTEGER = "2"
Public Const gstrCTRLTAGFORMAT_LONG = "3"
Public Const gstrCTRLTAGFORMAT_SINGLE = "4"
Public Const gstrCTRLTAGFORMAT_TIME = "5"
Public Const gstrCTRLTAGFORMAT_NO_GATHER = "9"
Public Sub DataChangedFalse(varControls)
' This Script iterates through the controls on the form and
' sets the datachanged property to False. This property is
' set to true when a value is changed to allow testing of
' what data should be written back to the database
Dim ctl 'As Control
On Error Resume Next
For Each ctl In varControls
ctl.DataChanged = False
Next
End Sub
- From the 'Object' ComboBox select 'cboOutcome' and make sure that the 'Script Event' moves to 'Click'
- Paste the following line of code to the procedure
Me.Controls("cboOutcome").DataChanged = True
- From the 'Object' ComboBox select 'cboRiskFactors' and then from the 'Script Event' ComboBox select 'Click'
- Paste the following script into the window
' See If the Value Selected is in the List Box and if not add it
Dim cboRiskFactors 'As object
Dim lstRiskFactors 'As object
Dim i 'As Int
Dim blnExists 'As boolean
Set cboRiskFactors = Me.Controls("cboRiskFactors")
Set lstRiskFactors = Me.Controls("lstRiskFactors")
If cboRiskFactors.ListIndex > -1 then
' If there is a value selected in the combo box check if it is already in the listbox
blnExists = False
For i = 0 to lstRiskFactors.Listcount -1
If lstRiskFactors.List(i) = cboRiskFactors.List(cboRiskFactors.ListIndex) then
blnExists = True
End if
Next
If blnExists = False then
lstRiskFactors.AddItem cboRiskFactors.List(cboRiskFactors.ListIndex)
lstRiskFactors.DataChanged = True
End if
End If
set cboRiskFactors = Nothing
set lstRiskFactors = Nothing
- From the 'Object' ComboBox select 'lstRiskFactors' and then select 'KeyDown' from the 'Script Event' ComboBox
- Paste the following code into the window
dim lstRisks ' as object
If KeyCode = 46 then 'The delete button pressed
Set lstRisks = Me.Controls("lstRiskFactors")
if lstRisks.ListIndex > -1 Then
lstRisks.RemoveItem lstRiskFactors.ListIndex
lstRisks.DataChanged = True
End if
Set lstRisks = Nothing
End if
- From the 'Object' ComboBox select 'txtComments' and check that the 'Script Event' moves to 'Change'
- Add te following line of code to the procedure
Me.Controls("txtComments").DataChanged = true
- From the 'Object' ComboBox select 'txtDiastolic' and check that the 'Script Event' moves to 'Change'
- Add the following line of code to the procedure
Me.Controls("txtDiastolic").Datachanged = True
- From the 'Object' ComboBox select 'txtHeight' and check that the 'Script Event' moves to 'Change'
- Add the following line of code to the procedure
Me.Controls("txtHeight").Datachanged = True
- From the 'Object' ComboBox select 'txtSystolic' and check that the 'Script Event' moves to 'Change'
- Add the following line of code to the procedure
Me.Controls("txtSystolic").Datachanged = True
- From the 'Object' ComboBox select 'txtTemperature' and check that the 'Script Event' moves to 'Change'
- Add the following line of code to the procedure
Me.Controls("txtTemperature").Datachanged = True
- From the 'Object' ComboBox select 'txtWeight' and check that the 'Script Event' moves to 'Change'
- Add the following line of code to the procedure
Me.Controls("txtWeight").Datachanged = True
- From the 'Object' ComboBox select 'Form' and in the 'Script Event' select 'Load
- Add the following lines of code to the procedure
'Initially set the record key for this form to the key of the currently selected
'person in Ajexus
mlngRecordKey = glngRECORD_KEY
'Set the default value for the elementkeys
mlngElementKey = clng(0)
mlngHeightKey = clng(0)
mlngWeightKey = clng(0)
mlngTemperatureKey = clng(0)
mlngDiastolicKey = clng(0)
mlngSystolicKey = clng(0)
mlngRiskFactorElementTypeKey = clng(0)
- From the 'Object' ComboBox select 'Form' and in the 'Script Event' select 'Refresh'
- Add the lines of code from this link to the procedure.
Dim csRecord 'As AJEngine.CritriaSet
Dim rsRecord 'As ADODB.Recordset
Dim lngResult 'As Long
Dim strFields 'As String
Dim lngElementTypeKey ' as Long
Dim cboOutcomes ' as Object
Dim cboRiskFactors ' as object
Dim lstRiskFactors ' as Object
Dim lngOutcomeCount ' as long
Dim lngRiskFactorCount ' as long
Dim strOutcomeName ' as String
Dim fld 'as string
Dim lngListIndex 'as long
Dim strList ' as string
'get record details
'------------------
Set csRecord = CreateObject("AJEngine.CriteriaSet")
csRecord.Fields.Add "Record_Key", mlngRecordKey, 3 'adInteger = 3
lngResult = ajexus.GetRecord(glngSECURITY_KEY, csRecord, rsRecord)
Set csRecord = Nothing
If lngResult = 0 Then
'Set the Patients Name fields
Me.Controls("labPatientName").Caption = trim(rsRecord.Fields("Record_Firstname").Value & _
" " & rsRecord.Fields("Record_Surname").Value)
rsRecord.Close
Else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End If
Set rsRecord = Nothing
'get assessment details
'------------------
Set csRecord = CreateObject("AJEngine.CriteriaSet")
csRecord.Fields.Add "Record_Key", mlngRecordKey, adInteger
'If this is the first load find the element else use the one you have
if mlngElementKey = 0 then
csRecord.Fields.Add "ElementReport_OutcomeKey", rcNone, adInteger
else
csRecord.Fields.Add "Element_Key", mlngElementKey, adInteger
end if
'set up the fieldlist to get all the fields we want
strFields = "<DisplayFields>" & vbcrlf & _
"<Field sub=""Element_Key"">Element_Key</Field>" & vbcrlf & _
"<Field sub=""ElementType_Name"">ElementType_Name</Field>" & vbcrlf & _
"<Field sub=""ElementDetail_Name"">ElementDetail_Name</Field>" & vbcrlf & _
"<Field sub=""Element_ActualDate"">Element_ActualDate</Field>" & vbcrlf & _
"<Field sub=""Element_ActualTime"">Element_ActualTime</Field>" & vbcrlf & _
"<Field sub=""Element_Quantity1"">Element_Quantity1</Field>" & vbcrlf & _
"<Field sub=""Outcome_Name"">Outcome_Name</Field>" & vbcrlf & _
"<Field sub=""Element_Staff1Surname"">Element_Staff1Surname</Field>" & vbcrlf & _
"<Field sub=""Element_Staff1Firstname"">Element_Staff1Firstname</Field>" & vbcrlf & _
"<Field sub=""Element_Staff2Surname"">Element_Staff2Surname</Field>" & vbcrlf & _
"<Field sub=""Element_Staff2Firstname"">Element_Staff2Firstname</Field>" & vbcrlf & _
"<Field sub=""Element_Staff3Surname"">Element_Staff3Surname</Field>" & vbcrlf & _
"<Field sub=""Element_Staff3Firstname"">Element_Staff3Firstname</Field>" & vbcrlf & _
"<Field sub=""Element_Comments"">Element_Comments</Field>" & vbcrlf & _
"</DisplayFields>"
csRecord.Fields.Add "ElementReport_DisplayFields", strFields ,201
lngResult = ajexus.GetElementListReport(glngSECURITY_KEY, csRecord, rsRecord)
Set csRecord = Nothing
If lngResult = 0 Then
Do while not rsRecord.EOF
'Look for an assessment element
if (rsRecord.Fields("ElementType_Name").Value & "") = "Assessment" and (rsRecord.Fields("ElementDetail_Name").Value & "") = "Medical" then
'When you find an Assessment Element set up the fields on the form
mlngElementKey = clng(rsRecord.Fields("Element_Key").Value & "")
mlngElementDetailKey = clng(rsRecord.Fields("Element_DetailKey").Value & "")
mlngEpisodeKey = clng(rsRecord.Fields("Element_EpisodeKey").Value & "")
Me.Controls("labAppointmentDate").caption = rsRecord.Fields("Element_ActualDate").Value & ""
Me.Controls("labAppointmentTime").caption = FormatDateTime(rsRecord.Fields("Element_ActualTime").Value, 3) & ""
Me.Controls("labAppointmentLength").caption = rsRecord.Fields("Element_Quantity1").Value & ""
Me.Controls("txtComments").text = rsRecord.Fields("Element_Comments").Value & ""
'included in case form is refreshed after saving with an outcome
strOutcomeName = rsRecord.Fields("Outcome_Name").Value & ""
'Set up the Physician Field with any or all of the staff names from the element
if len(rsRecord.Fields("Element_Staff1Surname").Value) > 0 then
Me.Controls("labPhysician").caption = trim(rsRecord.Fields("Element_Staff1Firstname").Value & " " & rsRecord.Fields("Element_Staff1Surname").Value)
if len(rsRecord.Fields("Element_Staff2Surname").Value) > 0 then
Me.Controls("labPhysician").caption = Me.Controls("labPhysician").caption & ", " & trim(rsRecord.Fields("Element_Staff2Firstname").Value & " " & rsRecord.Fields("Element_Staff2Surname").Value)
end if
if len(rsRecord.Fields("Element_Staff3Surname").Value) > 0 then
Me.Controls("labPhysician").caption = Me.Controls("labPhysician").caption & ", " & trim(rsRecord.Fields("Element_Staff3Firstname").Value & " " & rsRecord.Fields("Element_Staff3Surname").Value)
end if
else
if len(rsRecord.Fields("Element_Staff2Surname").Value) > 0 then
Me.Controls("labPhysician").caption = trim(rsRecord.Fields("Element_Staff2Firstname").Value & " " & rsRecord.Fields("Element_Staff2Surname").Value)
if len(rsRecord.Fields("Element_Staff3Surname").Value) > 0 then
Me.Controls("labPhysician").caption = Me.Controls("labPhysician").caption & _
", " & trim(rsRecord.Fields("Element_Staff3Firstname").Value & " " & _
rsRecord.Fields("Element_Staff3Surname").Value)
end if
else
if len(rsRecord.Fields("Element_Staff3Surname").Value) > 0 then
Me.Controls("labPhysician").caption = Trim(rsRecord.Fields("Element_Staff3Firstname").Value & _
" " & rsRecord.Fields("Element_Staff3Surname").Value)
end if
end if
end if
end if
if mlngElementKey <> 0 then
rsRecord.movelast
end if
rsRecord.movenext
Loop
rsRecord.Close
Else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End If
Set rsRecord = Nothing
'If there is an element in the previous step check for any subelements
If mlngElementKey > 0 then
Set csRecord = CreateObject("AJEngine.CriteriaSet")
csRecord.Fields.Add "Record_Key", mlngRecordKey, adInteger
csRecord.Fields.Add "ElementReport_ParentKey", mlngElementKey, adInteger
lngResult = ajexus.GetElementListReport(glngSECURITY_KEY, csRecord, rsRecord)
Set csRecord = Nothing
If lngResult = 0 Then
set lstRiskFactors = Me.Controls("lstRiskFactors")
lstRiskFactors.Clear
Do while not rsRecord.EOF
'Check which subelement you have and set the appropriate fields
select Case rsRecord.Fields("ElementType_Name").Value
Case "Risk Factors"
lstRiskFactors.AddItem rsRecord.Fields("ElementDetail_Name").Value
case "Vital Signs"
Select Case rsRecord.Fields("ElementDetail_Name").Value
Case "Height"
mlngHeightKey = clng(rsRecord.Fields("Element_Key").Value)
Me.Controls("labHeightUnits").Caption = rsRecord.Fields("ElementDetail_Quantity1Units").Value
Me.controls("txtHeight").Text = rsRecord.Fields("Element_Quantity1").Value & ""
Case "Weight"
mlngWeightKey = clng(rsRecord.Fields("Element_Key").Value)
Me.Controls("labWeightUnits").Caption = rsRecord.Fields("ElementDetail_Quantity1Units").Value
Me.controls("txtWeight").Text = rsRecord.Fields("Element_Quantity1").Value & ""
Case "Temperature"
mlngTemperatureKey = clng(rsRecord.Fields("Element_Key").Value)
Me.Controls("labTemperatureUnits").Caption = rsRecord.Fields("ElementDetail_Quantity1Units").Value
Me.controls("txtTemperature").Text = rsRecord.Fields("Element_Quantity1").Value & ""
Case "Systolic BP"
mlngSystolicKey = clng(rsRecord.Fields("Element_Key").Value)
Me.controls("txtSystolic").Text = rsRecord.Fields("Element_Quantity1").Value & ""
Case "Diastolic BP"
mlngDiastolicKey = clng(rsRecord.Fields("Element_Key").Value)
Me.controls("txtDiastolic").Text = rsRecord.Fields("Element_Quantity1").Value & ""
End Select
End Select
rsRecord.Movenext
Loop
set lstRiskFactors = Nothing
rsRecord.Close
Else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End if
End if
Set rsRecord = Nothing
' Set up the outcomes comboBox
Set csRecord = CreateObject("AJEngine.CriteriaSet")
csRecord.Fields.Add "ElementDetail_Key", mlngElementDetailKey, adInteger
lngResult = ajexus.GetOutcomeList(glngSECURITY_KEY, csRecord, rsRecord)
Set csRecord = Nothing
If lngResult = 0 Then
Set cboOutcomes = Me.Controls("cboOutcome")
cboOutcomes.Clear
redim mastrOutcome(1,0)
mlngOutcomeCount = 0
lngListIndex = -1
Do while not rsRecord.EOF
If Not len(rsRecord.fields("Outcome_Key").value) = 0 then
cboOutcomes.Additem rsRecord.fields("Outcome_Name").value
redim preserve mastrOutcome(1,mlngOutcomeCount)
mastrOutcome(0,mlngOutcomeCount) = rsRecord.fields("Outcome_Key").value
mastrOutcome(1,mlngOutcomeCount) = rsRecord.fields("Outcome_Name").value
if strOutcomeName = rsRecord.fields("Outcome_Name").value Then
'if we have an assigned outcome then set the listindex
cboOutcomes.Listindex = mlngOutcomeCount
end if
mlngOutcomeCount = mlngOutcomeCount + 1
end if
rsRecord.Movenext
Loop
rsRecord.Close
Set cboOutcomes = Nothing
Else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End if
Set rsRecord = Nothing
' Set up the Risk Factors comboBox mastrRiskFactor
'First if we don't have a elementtypekey then find it
If mlngRiskFactorElementTypeKey = 0 then
Set csRecord = CreateObject("AJEngine.CriteriaSet")
csRecord.Fields.Add "Element_SubElementOption", ioOnly, adVarChar
lngResult = ajexus.GetElementTypeList(glngSECURITY_KEY, csRecord, rsRecord)
Set csRecord = Nothing
If lngResult = 0 Then
Do while not rsRecord.EOF
If rsRecord.Fields("ElementType_Name").Value = "Risk Factors" Then
mlngRiskFactorElementTypeKey = rsRecord.Fields("ElementType_Key").Value
End if
rsRecord.Movenext
Loop
rsRecord.Close
Else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End if
Set rsRecord = Nothing
End if
'If we now have an element type key then fill the combo box
If mlngRiskFactorElementTypeKey > 0 then
Set csRecord = CreateObject("AJEngine.CriteriaSet")
csRecord.Fields.Add "ElementType_Key", mlngRiskFactorElementTypeKey, adVarChar
lngResult = ajexus.GetElementDetailList(glngSECURITY_KEY, csRecord, rsRecord)
Set csRecord = Nothing
If lngResult = 0 Then
redim mastrRiskFactor(1,0)
lngRiskFactorCount = 0
Set cboRiskFactors = Me.Controls("cboRiskFactors")
cboRiskFactors.Clear
Do while not rsRecord.EOF
If Not len(rsRecord.fields("ElementDetail_Name").value) = 0 then
cboRiskFactors.Additem rsRecord.fields("ElementDetail_Name").value
redim preserve mastrRiskFactor(1,lngRiskFactorCount)
mastrRiskFactor(0,lngRiskFactorCount) = rsRecord.fields("ElementDetail_Key").value
mastrRiskFactor(1,lngRiskFactorCount) = rsRecord.fields("ElementDetail_Name").value
end if
lngRiskFactorCount = lngRiskFactorCount + 1
rsRecord.Movenext
Loop
rsRecord.Close
Set cboOutcomes = Nothing
Else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End if
Set rsRecord = Nothing
End if
DataChangedFalse(Me.Controls)
- From the 'Object' ComboBox ensure that 'Form' is still selected and in the 'Script Event' select 'Save'
- Add the following lines of code from this link to the procedure.
Dim csUpdateRecord ' as AJEngine.criteriaSet
Dim rsUpdateRecord ' as ADODB.RecordSet
Dim csRecord ' as AJEngine.criteriaSet
Dim rsRecord ' as ADODB.RecordSet
Dim lngResult ' as long
Dim blnSaveElement ' as boolean
Dim obj ' As Object
Dim i ' as int
Dim i2 ' as int
Dim lngListIndex 'As Long
Dim lngElementDetailKey ' As Long
' Check each of the editable fields to see if they have been updated
' Start with the subelements
' UPDATE RISK FACTORS
blnSaveElement = False
set obj = Me.Controls("lstRiskFactors")
If obj.DataChanged = true then
'First check listbox contents against database records, remove any deleted from database
' and remove any already in database from listbox to give list to add to database
'NOTE the listbox will be repopulated with teh current list during the refresh after the save
set csrecord = createobject("AJEngine.criteriaSet")
csRecord.Fields.Add "Record_Key", mlngRecordKey, adInteger
csRecord.Fields.Add "ElementReport_ParentKey", mlngElementKey, adInteger
csRecord.Fields.Add "ElementReport_TypeKey", mlngRiskFactorElementTypeKey, adInteger
lngResult = ajexus.getelementlistreport(glngSECURITY_KEY, csRecord, rsRecord)
set csRecord = Nothing
If lngResult = 0 then
Do While Not rsRecord.EOF
if len(rsRecord.Fields("ElementDetail_Name").Value) > 0 then
lngListIndex = -1
For i = 0 to obj.ListCount - 1
if obj.List(i) = rsRecord.Fields("ElementDetail_Name").Value then
'if we find the text value in the listbox record the listindex so we can temporarily remove it
lngListIndex = i
End if
Next
If lngListIndex = -1 then
'we did not find the record we need to delete from the database
set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_Key", rsRecord.Fields("Element_Key").Value, adInteger
lngResult = ajexus.DeleteElement(glngSECURITY_KEY, csUpdateRecord)
If lngResult <> 0 then
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End if
Set csUpdateRecord = Nothing
Else
' We found the record, remove from the listbox
obj.RemoveItem(lngListIndex)
End if
End if
rsRecord.movenext
Loop
rsRecord.Close
'Now we add to the database whatever is left in the listbox
if Obj.ListCount > 0 then
For i = 0 to Obj.Listcount - 1
'Find the elementDetailKay for the current object
lngElementDetailKey = 0
For i2 = 0 to UBound(maStrRiskFactor, 2)-1
If mastrRiskFactor(1,i2) = obj.List(i) then
lngElementDetailKey = mastrRiskFactor(0,i2)
End if
Next
If lngElementDetailKey > 0 then
set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_RecordKey", mlngRecordKey, adInteger
csUpdateRecord.Fields.Add "Element_EpisodeKey", mlngEpisodeKey, adInteger
csUpdateRecord.Fields.Add "Element_TypeKey", mlngRiskFactorElementTypeKey, adInteger
csUpdateRecord.Fields.Add "Element_DetailKey", lngElementDetailKey, adInteger
csUpdateRecord.Fields.Add "Element_ParentKey", mlngElementKey, adInteger
lngResult = Ajexus.AddElement(glngSECURITY_KEY, csUpdateRecord, rsUpdateRecord)
Set csUpdateRecord = Nothing
If lngResult = 0 then
rsUpdateRecord.Close
blnSaveElement = True
Else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End If
Set csUpdateRecord = Nothing
End If
Next
end if
else
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
End if
Set rsRecord = Nothing
end if
set obj = Nothing
If Me.Controls("txtHeight").Datachanged = True then
Set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_Key", mlngHeightKey, adInteger
csUpdateRecord.Fields.Add "Element_Quantity1", cInt(Me.Controls("txtHeight").text), adSingle
lngResult = Ajexus.UpdateElement(glngSECURITY_KEY, csUpdateRecord)
set csUpdateRecord = Nothing
If lngResult <> 0 then
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
end if
blnSaveElement = True
end if
If Me.Controls("txtWeight").Datachanged = True then
Set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_Key", mlngWeightKey, adInteger
csUpdateRecord.Fields.Add "Element_Quantity1", cInt(Me.Controls("txtWeight").text), adSingle
lngResult = Ajexus.UpdateElement(glngSECURITY_KEY, csUpdateRecord)
set csUpdateRecord = Nothing
If lngResult <> 0 then
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
end if
blnSaveElement = True
end if
If Me.Controls("txtTemperature").Datachanged = True then
Set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_Key", mlngTemperatureKey, adInteger
csUpdateRecord.Fields.Add "Element_Quantity1", cInt(Me.Controls("txtTemperature").text), adSingle
lngResult = Ajexus.UpdateElement(glngSECURITY_KEY, csUpdateRecord)
set csUpdateRecord = Nothing
If lngResult <> 0 then
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
end if
blnSaveElement = True
end if
If Me.Controls("txtSystolic").Datachanged = True then
Set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_Key", mlngSystolicKey, adInteger
csUpdateRecord.Fields.Add "Element_Quantity1", cInt(Me.Controls("txtSystolic").text), adSingle
lngResult = Ajexus.UpdateElement(glngSECURITY_KEY, csUpdateRecord)
set csUpdateRecord = Nothing
If lngResult <> 0 then
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
end if
blnSaveElement = True
end if
If Me.Controls("txtDiastolic").Datachanged = True then
Set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_Key", mlngDiastolicKey, adInteger
csUpdateRecord.Fields.Add "Element_Quantity1", cInt(Me.Controls("txtDiastolic").text), adSingle
lngResult = Ajexus.UpdateElement(glngSECURITY_KEY, csUpdateRecord)
set csUpdateRecord = Nothing
If lngResult <> 0 then
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
end if
'We want to set the update values of the element even if only subelements are changed
blnSaveElement = True
end if
' now check the main element
Set csUpdateRecord = CreateObject("AJEngine.CriteriaSet")
csUpdateRecord.Fields.Add "Element_Key", mlngElementKey, adInteger
set obj = Me.Controls("cboOutcome")
If obj.Datachanged = true then
if obj.listindex > -1 then
For i = 0 to mlngOutcomeCount - 1
if mastrOutcome(1,i) = obj.Seltext then
csUpdateRecord.Fields.Add "Element_OutcomeKey", mastrOutcome(0,i), adInteger
csUpdateRecord.Fields.Add "Element_OutcomeDate", date() , adInteger
blnSaveElement = True
end if
Next
else
'Outcome has been updated back to null
csUpdateRecord.Fields.Add "Element_OutcomeKey", null , adInteger
csUpdateRecord.Fields.Add "Element_OutcomeDate", null , adInteger
blnSaveElement = True
end if
end if
set obj = Nothing
if Me.Controls("txtComments").Datachanged = True then
csUpdateRecord.Fields.Add "Element_Comments", Me.Controls("txtComments").Text, adVarchar
blnSaveElement = True
End if
if blnSaveElement = True then
lngResult = Ajexus.UpdateElement(glngSECURITY_KEY, csUpdateRecord)
if lngResult <> 0 then
MsgBox "(" & lngResult & ") " & ajexus.GetErrorDescription(lngResult), 16, App.Title
end if
end if
set csUpdateRecord = Nothing
DataChangedFalse(Me.Controls)
- Close the window by clicking the Ok button
- Save the form design by clicking the Save
toolbar button
Additional Points
- The Form Design always opens with a Blank Form. To open an existing form click the Open
Toolbar button.
- For a more elaborate example of a Custom Form look at the sample form that comes with the Psychiatric Database
- The documentation for the Ajexus Engine Calls are documented in the Engine part of this guide... Ajexus Engine Component
- This example form uses the text identifiers for element type and detail to facilitate coding. It is recommended that the numeric key fields are used for production forms.
- This example only handles when an element exists. You can easily adjust the code to allow a new element to be added via this form as well
Adding Staff
30 Adding Additional Staff and Allied Staff
Task objective
To show how details of an organisation's staff members are recorded in Ajexus along with allied staff from other organisations who also interact with your patients.
Task steps
- Repeat steps 1 - 15 from Step 12 Adding Staff and Allied Staff, adding the following additional staff and allied staff:
Category
| Title
| First name
| Surname
| Work address
| Episode
|
Staff
| Mr
| Martin
| Gregg
| ABC Healthcare
| Orthopaedic Surgeon
|
Staff
| Mrs
| Joan
| Brown
| ABC Healthcare
| Ophthalmologist
|
Staff
| Miss
| Jane
| Adams
| ABC Healthcare
| Physical Therapist
|
Staff
| Mr
| John
| Smith
| ABC Healthcare
| Resident
|
Staff
| Miss
| Jane
| Wall
| ABC Healthcare
| Resident
|
Staff
| Mr
| Tim
| Moss
| ABC Healthcare
| Nurse
|
Staff
| Ms
| Joanna
| Poole
| ABC Healthcare
| Nurse
|
Staff
| Miss
| Lyn
| Bow
| ABC Healthcare
| Receptionist
|
Allied Staff
| Dr
| Nikki
| Marks
| Downtown Medical Centre
| Family Physician
|
Allied Staff
| Dr
| Tom
| Biggs
| Uptown Medical Centre
| Family Physician
|
Demographics for Allied Staff Tom Biggs
More Information
More information can be found under Select a Patient Record in the User Guide.
Add Patient Data
31 Selecting a Patient Record
Task objective
To show how a patient record is first searched for, and if not found a new medical record is then created by entering the patient's personal details.
Task steps
- Click the Select
toolbar button. The Select Record form will be displayed
- Select 'Patient' from the Category field
- Enter 'Jones' in the Surname field and 'Jan' in the First Name field
- Click the Refresh
toolbar button. Jan Jones will appear in the list
- Click the Open
toolbar button
- The Demographics form containing Jan Jones's details will be displayed:
Demographics form containing patient's details
Referral
32 Entering the Referral Outcome
Task objective
To show how to record the decision that was made about the referral that was received for the patient.
Task steps
- Select Jan Jones, if not already selected, then select Elements/Full Record - Group By Episode from the menu. The Full Record - Group By Episode element list will be displayed
- Select the 'Referral' element
- Click the Open
toolbar button. The Element Data Edit form will be displayed
- Select 'Accepted' from the Outcome combo box. Today's date will automatically be entered in the Outcome Date field. This records that the referral has been accepted
- Click on Back
to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click on Yes. The referral element together with the new outcome will now appear in the element list.
Editing outcome for Referral/Orthopaedics element
Additional Points
- If instead the referral were declined by selecting 'Declined' from the Outcome combo box, then because we specified that this outcome should end the current episode when we defined the 'Referral/Orthopaedics' element in the Data Dictionary, the 'Orthopaedics' episode would be closed.
- A 'Referral On' element can also be recorded if the patient is referred on to another service as the result of this referral being declined, or else if outside services are also required during the course of the episode.
Investigation
33 Planning an Assessment
Task objective
To show how to record a typical assessment for a patient. This task will use the appointment planner to schedule the assessment and add the element.
Task steps
- Select Plan, then Appointment from the menu. The Appointment Planner form will be displayed
- Choose the Task option from the Plan By field
- Select 'Assessment:Medical' from the Task combo box. Only element type/details in the Data Dictionary which have the Allow Planner option checked and which are linked to a patient episode type appear in this drop list.
- Select 'Orthopaedic Clinic' from the Clinic combo box. Only locations which belong to the location group defined for the selected element detail appear in this drop list.
- In the Staff Types list check the box for 'Orthopaedic Surgeon'
- In the Staff list check the box for 'Gregg, Martin'
- In the appointment grid click on the white area in the row next to '10.00' and then holding down the left mouse button drag the mouse down to the row with header '10.45'. The value of the field Length will change to 60:Appointment Planner form
- Click the Back
toolbar button. The Save Changes message box will be displayed
- Click Yes to save the appointment. The Appointment Confirmation form will be displayed:Appointment Confirmation form
- Click OK to confirm the appointment. The previous screen will be displayed. If this is the Full Record - Group By Episode form, the new appointment should appear in the element list along with sub-elements which have been added automatically. You will need to click the + sign next to the Assessment record to view the sub-elements.
Full Record - Group By Episode form displaying appointment details and sub-elements
34 Sending out an Appointment Letter
Task objective
To show how an appointment letter can be printed after planning the assessment.
Task steps
- Select Jan Jones if not already selected and then select Elements/Full Record - Group By Episode from the menu. The Full Record - Group By Episode element list will be displayed
- Select the 'Assessment' element in the element list
- Click the Open
toolbar button The Element Data Edit form will be displayed
- Click the Preview
toolbar button. The Select Report to Preview form will be displayed:Select Report to Preview form
- Select 'Appointment Letter' and click OK. The Preview Report form will be displayedReport Preview
- If you have a printer connected then you can click the Print toolbar button
- If you printed the letter in Step 6, the element's notified date will be automatically updated to indicate that the letter has been printed and the date it was printed. Thereafter, if you try to print the letter you will be reminded that a notification letter has already been sent. You may however still choose to print another.
- Click the Back
toolbar button to return to the Element Data Edit form
- If you printed the letter in Step 6, check that the Notified Date has indeed been updated
- Click the Back
toolbar button again to return to the Full Record - Group By Episode element list.
Additional Points
- As well as being printed individually in this way, element reports may also be printed in bulk from a Summary report.
- Similarly, if you print a letter which has been linked to the outcome of an element in the Data Dictionary, the Outcome Notified Date of the element will automatically be updated.
35 Entering the Outcome Assessment
Task Objective
To show how details of the assessment findings can be recorded against the assessment previously planned for the patient.
Task Steps
- Ensure that you have selected the client Jan Jones
- Click the Assessment Entry toolbar button. If there are too many buttons for your screen resolution you can access these by the drop down section at the far right of the toolbar. The Assessment Entry form you created in the last step will be displayedThe Assessment Entry Custom Form
- Click in the field next to the text Blood Pressure
- Enter '120' into the field
- Use Tab to move to the 'Over' Field
- Enter '80'
- Using <TAB> to continue to move between the fields enter the following
- Height 68
- Weight 156
- Temperature 98
- Expand the Risk Factors combo box, and select 'Excessive Sun Exposure'. This will appear in the List box next to it
- Select 'Arrived' from the Outcome combo box to show that the patient arrived for the assessment
- Click the Back
toolbar button to return to the Full Record - Group By Episode. The Save Changes message box will be displayed
- Click Yes to save your changes
- Expand the 'Assessment' element by clicking on the plus icon next to the element. The sub-elements will be displayed with the values you have just entered.
Full Record Group By Episode element list showing updated 'Vital Signs' and 'Risk Factors' sub-elements
Additional Points
- If the appointment is cancelled (by selecting 'Cancelled' from the Outcome combo box) then it will not be shown in the appointment planner.
36 Ordering a Test
Task objective
To show how to record an order for a product or service.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Order' from the Element Type combo box
- Select 'Knee X-Ray' from the Detail combo box
- Select 'Tunnel' from the View combo box
- Select 'Gregg Martin' from the Requested By combo box:Ordering a Knee X-ray
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click Yes to save your changes.
37 Entering a Result
Task objective
To show how to record the result of an investigation or test carried out by another service.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Result' from the Element Type combo box
- Select 'Knee X-Ray' from the Detail combo box
- Enter the transcript of the result into the Comments field:Entering a Result
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click Yes to save your changes.
Additional Points
- The Ajexus engine component can be used to electronically send and receive data including test results so that they do not need to be entered manually.
38 Entering the Diagnosis
Task objective
To show how the diagnosis for the patient can be entered in the medical record.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Diagnosis' from the Element Type combo box
- Select 'Orthopaedic' from the Detail combo box
- Select 'Gregg Martin' from the Physician combo box
- Click on the New row header button in the Orthopaedic Diagnosis sub-elements list. The Save Changes message box will be displayed
- Click Yes to save the parent element's details before adding the sub-element
- Details for a new 'Orthopaedic Diagnosis' sub-element will be displayed
- Select 'ACL Tear' from the Detail combo box
- Click the Back
toolbar button to save the 'ACL Tear' diagnosis and return to the Element Data Edit form displaying the parent element's details. The Save Changes message box will be displayed
- Click Yes to save the new sub-elementEntering the Diagnosis
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list
- Expand the 'Diagnosis' element by clicking on the plus icon next to it in the list. The new sub-element's details will be displayed.
Full Record - Group By Episode element list showing Diagnosis element and sub-element
Care Plan
39 Entering a Care Plan
Task objective
To show how you can record a care plan of the steps to be carried out in the treatment of the patient.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Care Plan' from the Element Type combo box
- Select 'Medical' from the Detail combo box
- Select 'Gregg Martin' from the Physician combo box
- Click on the New row header button in the Medical Treatment sub-elements list. The Save Changes message box will be displayed
- Click Yes to save the parent element's details before adding the sub-element
- Details for a new 'Medical Treatment' sub-element will be displayed
- Select 'Medication' from the Detail combo box
- Click the Back
toolbar button to save the 'Medication' sub-element and return to the Element Data Edit form displaying the parent element's details. The Save Changes message box will be displayed
- Click Yes to save the new sub-element
- Repeat steps 6 - 11 above to add the following sub-elements:
- Select 'Consent Given' from the Consent combo box to show that the patient has agreed to the care plan:Care Plan element showing Medical Treatment sub-elements
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click Yes to save the new outcome
- Expand the 'Care Plan' element by clicking on the plus icon next to it in the list. The sub-elements will be displayed.
Full Record - Group by Episode element list showing Care Plan element and sub-elements
Additional Points
- An element letter can be created using the Report Designer to print out the plan and be signed by the patient to signify their consent.
Treatment
40 Entering the Medication Details
Task objective
To show how medication details are entered into the patients medical record.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Medication' from the Element Type combo box
- Select 'Ibuprofen' from the Detail combo box
- Select 'Oral 2x Daily' from the Route/Frequency combo box
- Enter '500' in the Dose field
- Select 'Gregg Martin' from the Prescribed By combo box:Medication Details
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click Yes to save your changes.
41 Entering the Surgery Details
Task objective
To show how surgery details are entered into the patients medical record.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Surgery' from the Element Type combo box
- Select 'ACL Reconstruction' from the Detail combo box
- Select 'Allograft Bone Patellar Bone' from the Procedure combo box
- Click on the ellipses button ... to the right of the Date field. The Select Date form will be displayed:Select Date form
- Select the next Monday following today by clicking the appropriate date in the calendar
- Click OK to close the Select Date form
- Enter the start time '14.20' for the surgery in the Time field and then press [TAB]. The time will be displayed according to your Windows locale settings
- Enter '3' for the expected surgery duration in the Length field
- Select 'Theatre 1' from the Theatre combo box
- Select 'Gregg Martin' from the Physician combo box:Surgery Details
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click Yes to save your changes.
Additional Points
- The Appointment Planner can be used instead to schedule theatre time.
42 Entering the Therapy Details
Task objectives
To show how the therapy element is used to record the patients physical therapy sessions. To show how multiple elements may be entered at once to record a regularly recurring event.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Therapy' from the Element Type combo box
- Select 'Physical Therapy' from the Detail combo box
- Click on the ellipses button ... to the right of the Date field. The Select Date form will be displayed
- Select the next Wednesday following the surgery by clicking the appropriate date
- Click OK to close the Select Date form
- Enter the start time '10.00' for the therapy in the Time field and press the [TAB] key. The time will be displayed according to your Windows locale settings
- Enter '45' for the expected duration of the treatment in the Length field
- Select 'Orthopaedic Clinic' from the Clinic combo box
- Select 'Adams Jane' from the Therapist combo boxTherapy Details showing number of occurrences
- Click the Back
toolbar button. The Save Changes message box will be displayed
- Click Yes to save your changes and return to the Full Record - Group By Episode element list
Full Record - Group By Episode element list showing scheduled Physical Therapy elements
Additional Points
- The Appointment Planner can be used to schedule therapy sessions.
- The outcome of each therapy session can be used to record whether the patient arrived or not, or if the session was cancelled.
- Clinics can be setup, and appointment time intervals, clinic hours and available days of the week can be configured for each clinic by selecting Locations and Clinics from the Configuration menu.
Review
43 Entering a Review
Task objective
To show how a follow up review at the end of treatment can be entered.
Task steps
- While on the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Review' from the Element Type combo box
- Select 'Medical' from the Detail combo box
- Click on the ellipses button ... to the right of the Date field. The Select Date form will be displayed
- Select the next Thursday after the last therapy session by clicking the appropriate date
- Click OK to close the Select Date form
- Enter the start time '9.00' for the therapy in the Time field and press the [TAB] key. The time will be displayed according to your Windows locale settings
- Enter '20' for the expected duration in the Length field
- Select 'Orthopaedic Clinic' from the Clinic combo box
- Select 'Gregg Martin' from the Physician combo box:Review Details
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed
- Click Yes to save your changes.
Additional Points
- The Appointment Planner form can be used to schedule the review.
- Sub-elements can be used to record details of the review findings.
- A clinic can be created to define what location, days, time period and time slots the review can have by using the Location and Clinics form from the Configuration menu.
Discharge
44 Entering the Discharge Details
Task objectives
To show how you record the actual discharge of the patient. To show how entering a discharge element automatically ends the episode it was entered because of the way the element was defined in Step 25.
Task steps
- From the Full Record - Group By Episode element list click the New
toolbar button. The Edit Data Element form will be displayed
- Select 'Orthopaedics' from the Episode combo box
- Select 'Discharge' from the Element Type combo box
- Select 'Orthopaedics' from the Detail combo box
- Select 'Recovered' from the Condition combo box
- Select 'Gregg, Martin' from the Discharged By combo box
- Click the Back
toolbar button to return to the Full Record - Group By Episode element list. The Save Changes message box will be displayed:Discharge Details
- Click Yes to save your changes (Note: the 'Orthopaedic' episode has automatically been closed as a consequence of entering this element (provided you did not change the date of the discharge element to a date in the future in which case the episode will not be deactivated until this date is reached). This is the result of selecting '<...End Episode...>' from the Start Episode combo box in the Data Dictionary definition of the Discharge/Orthopaedics element in Step 25 Creating a Discharge).
Full Record - Group By Episode element list showing closed episode after entering a Discharge element
Administration Reports
45 Designing a Report for All Assessments for Today
Task objective
To show how a summary report can be created to list all assessments scheduled for today.
Task steps
- Select Administration, then Design Summary Report from the menu. The Summary Report Builder form will appear
- Click the New
toolbar button to add a new summary report definition
- Enter 'All Assessments For Today' in the Report Name field
- Select 'Assessment' from the Type combo box (Note: the field labels change to the labels you defined when you created the 'Assessment' element type in Step 16 Creating an Assessment)
- Remove 'Surname' from the Sort By 2 combo box by selecting it and then pressing the [Del] key. Press [Del] again to remove the 'Firstname' option also
- Select 'Time' from the Sort By 1 combo box
- Ensure that 'Date' is selected from the Date Type combo box
- Select 'Today' from the adjacent Date Default combo box
- Click on the ellipses button ... next to Fields To Show. The Element Report Field Chooser dialog will be displayed
- Select the following fields to show in the grid:
- Time
- Length
- Surname
- Firstname
- Number
- Home Phone
- Detail
- Clinic
- PhysicianFields for 'All Assessments for Today' Summary Report
- Click OK to close the Element Report Field Chooser form
- Click the Save
toolbar button to save the summary report criteria you have chosen. The Save Changes message box will appear
- Click Yes to save the summary criteria'All Assessments for Today' summary report criteria
- Select Report, then All Assessments For Today, from the top menu to display the list of elements defined by the criteria you have specified. The assessment you entered for Jan Jones in Step 33 Planning an assessment should be listed. If you entered the assessment on a previous day, then it will not be shown, and you will need to adjust the dates displayed in the Date tab control and then click the Update button on the summary form before you will be able to see it.
'All Assessments for Today' summary report
Additional Points
- Security can be used to determine which user can see what reports, both to prevent unauthorised users accessing information, and to prevent clutter from irrelevant reports. This is available by selecting the Set Data and Report Security item from the Administration menu.
- If a user has access to a report which includes data that they are not allowed to see, then this data will be excluded from the report. For this reason, it is important to ensure you have sufficient rights to view data before printing a report.
46 Designing a Printout for All Assessments for Today
Task objective
To show how you can create a printout of a summary by using the Report Designer.
Task steps
- Select Administration, then Design Printout from the top menu. The Select Report Design form will be displayed
- Expand the Summary Reports item and select 'All Assessments For Today'
Select Report Design form
- Click the New
toolbar button. The Report Designer form will appear showing a new blank report. The Fields list will contain all the fields returned by the 'All Assessments For Today' summary report. You will use these fields to design the printout.
- Click the Page Setup
toolbar button. The Report Settings dialog will be displayed
- Click the Printer Settings toolbar button from the toolbar down the left hand side of the dialog
- In the Orientation frame select the Landscape optionReport Settings form
- Click OK to close the Report Settings dialog
- Increase the page width using the mouse to drag the edge of the page and using the ruler at the top of the designer as your guide. Note that if you make the page width too wide for your printer's landscape settings the page width will be automatically reduced to the maximum width allowed when you save the report.
- Drag the following fields from the Fields List toolbox and arrange them in a single row at the top of the Detail1 section of the report:
- Record_Surname
- Record_Firstname
- ElementDetail_Name
- Element_ActualTime
- Element_Quantity1
- Location_Name
Select the Text
tool from the 'Tools' toolbar and then using the mouse draw a new field alongside the others in the Detail section of the report
Ensure that 'TextBox1' is selected in the combo box at the top of the Property Toolbox
Select the (Name) property from the Property Toolbox and enter 'txtStaff' for the property value
Click the Script Editor
toolbar button from the toolbars above the report page. The Script Editor will be displayed
Select 'Detail1' from the Object combo box top left in the Script Editor
Select 'Format' from the adjacent Events combo box (if it is not already selected)
Enter the following Visual Basic script in the Script Editor's text box, and close the box:
Dim dlReport As DataDynamics.ActiveReports.DataLayer
Dim strStaff As String
Dim strStaff1 As String
Dim strStaff2 As String
Dim strStaff3 As String
' get reference to RecordSet containing report data
dlReport = rpt.DataLayer
' get names of the staff involved (initial + surname)
If Not isdbnull(dlReport.Fields.Item("Element_Staff1Surname").Value) Then
strStaff1 = Trim(dlReport.Fields.Item("Element_Staff1Surname").Value & " " & _
Left(dlReport.Fields.Item("Element_Staff1Firstname").Value, 1))
End If
If Not isdbnull(dlReport.Fields.Item("Element_Staff2Surname").Value) Then
strStaff2 = Trim(dlReport.Fields.Item("Element_Staff2Surname").Value & " " & _
Left(dlReport.Fields.Item("Element_Staff2Firstname").Value, 1))
End If
If Not isdbnull(dlReport.Fields.Item("Element_Staff3Surname").Value) Then
strStaff3 = Trim(dlReport.Fields.Item("Element_Staff3Surname").Value & " " & _
Left(dlReport.Fields.Item("Element_Staff3Firstname").Value, 1)
End If
If Not isdbnull(dlReport.Fields.Item("Element_Staff3Surname").Value) Then
strStaff3 = Trim(dlReport.Fields.Item("Element_Staff3Surname").Value & " " & _
Left(dlReport.Fields.Item("Element_Staff3Firstname").Value, 1))
End If
' concatenate staff names into a string separated by commas ...
strStaff = strStaff1
' if there is a second staff member then add name to end
If Not String.IsNullOrWhiteSpace(strStaff2) Then
If Not String.IsNullOrWhiteSpace(strStaff) Then
strStaff &= ", " & strStaff2
End If
If Not dlReport.EOF Then
strStaff = strStaff2
End If
End If
' if there is a third staff member the add name to end
If Not String.IsNullOrWhiteSpace(strStaff3) Then
If Not String.IsNullOrWhiteSpace(strStaff) Then
strStaff &= ", " & strStaff3
Else
strStaff = strStaff3
End If
End If
' set the Staff field's value to result
Me.txtStaff.Text = strStaff
Script Editor
The script above obtains a reference to the RecordSet which will hold the report data when the report is previewed or printed. This RecordSet is a property of the ADO (Active Data Objects) data control which is preloaded into the Detail section of each report (you can't see it because its Left property is set negative so that it doesn't appear but it does appear among the list of controls in the Property toolbox). The RecordSet fields which contain the first name and surname of each staff member are then concatenated (only the initial letter of the first name), any leading or trailing spaces are removed and the Text property of the 'txtStaff' field you added in Step 10 above is set to the result.If you are unfamiliar with VB script and cannot follow the script above, you can alternatively just drag each of the staff fields (Element_Staff1Surname, Element_Staff2Surname etc) onto the report and resize them appropriately.
- Select the label
tool from the toolbox and draw a label in the Page Header section of the report aligning it with the first field in the Detail Section
- Using the mouse drag the PageFooter section header up so that it is just below the controls in the Detail section. This will ensure that there is not a large gap between rows if there is more than one record in the report.
- Set the Caption property of the label to 'Name' and make the font bold and underlined by checking the appropriate toolbar buttons (B and U)
- Add identical labels for the other fields (Detail, Date, Length, Clinic and Physician)
- Add a label for the report heading and set its Caption property to 'Assessments for Today'. Set font, font size and style as desired
Report Designer - All Assessments for Today
- Click the Save
toolbar button. The Save Changes message box will appear
- Click Yes to save your changes
- You will be prompted to enter a name for the report. Enter 'Assessments For Today' and then click OK.
Additional Points
- The report page may be widened as necessary by dragging the right hand side using the mouse. The ruler above the page can be used as a guide (roughly 22 cm for Landscape depending on printer settings). When you preview the report, if the report page is too wide, a red line will appear down the right hand side of the page. If the page is too wide the printer will often print blank pages along with the report pages.
- The CanGrow and CanShrink properties of fields can be set to True if you do not wish a field to be truncated if it is too big to fit or if you want a field to shrink if it does not require the space provided by the field. Note that the width of the field will not change, just the height.
- By default a grid overlays the report designer page to make it easier to align controls. This can be removed by unchecking the corresponding toolbar button
if you would prefer to use the Format menu options.
Management Reports
47 Designing a Report - Total Number of Referrals this Month
Task objective
To show how a total report can be designed that counts and groups elements according to the criteria which you define.
Task steps
- Select Administration, then Design Total Report from the menu. The Total Report Builder form will be displayed
- Click the New
toolbar button to create a new report definition
- Enter 'Referrals - Total Received This Month' in the Report Name field
- Select 'Referral' from the Element Type combo box
- Clear the Sort By 2 combo box
- Ensure that 'Date' is selected from the combo box under Date Type
- From the adjacent combo under Date Default select 'This Month'
- Click the Save
toolbar button. The Save Changes message box will be displayed
- Click Yes to save your changes 'Referrals - Total Received This Month' total report criteria
- Select Report, then Referrals - Total Received This Month from the menu. The Referrals - Total Received This Month form will be displayed showing a count of the number of Referral elements entered during the current month:
'Referrals - Total Received This Month' totals report
Additional Points
- A printout can be created for this report in a similar way a printout was created for the 'All Assessments Received this Week' report.
48 Designing a Record Report for All Patients Over 20
Task objective
To show how to define a report which will display all patients who are over the age of 20 years.
Task steps
- Select Administration, then Design Record Report from the menu. The Record Report Builder form will be displayed
- Click the New
toolbar button to create a new report definition
- Enter 'All Patients Over 20' in the Report Name field
- Ensure 'Patient' is selected from the Category combo box
- Enter '21' in the Age From field. This will select all patients older than 20:'All Patients Over 20' record report criteria
- Click the Save
toolbar button. The Save Changes message box will appear
- Click Yes to save your changes
- Click the Select
toolbar button. The Select Record form will be displayed
- Check the Use predefined record report check box
- Ensure the 'All Patients Over 20' record report is selected in the list
- Click the Refresh
toolbar button, or the Update button on the form
- A list of all patients who are over 20 will be displayed:
Search results using the 'All Patients Over 20' predefined report
Additional Points
- It is possible to select patient records by specifying all or part of a surname, first names, date of birth, record category or record number. Alternatively, predefined report criteria can be used for advanced searching.
- Predefined record criteria can also be used in summary and total report definitions to restrict the results to patients who meet the criteria.
- Clicking a column header button in the list of results will cause the list to be sorted by that column.
More Information
More information on designing record reports can be found in the Administration Guide.
Security Group Setup
49 Setting up Security Rights for Individual Users
Task objective
To show how security groups are set up that specify rights to add, edit, or view elements, view episodes, and view reports. These groups are then assigned to one or more users to control their access to data.
Task steps
- Select Administration, then Set Data and Report Security from the menu. The Data and Report Security form will be displayed
- Click the New
toolbar button. A new security group will appear
- Replace 'New Security Group' with 'Receptionists' for the new item and press the [ENTER] key. If it is not already in edit mode double click on the item or press [F2] to allow in place editing
- Expand the new security group by clicking + next to it
- Click on the ALL box under the Add/Edit/View column in the Elements row. A message box will be displayed:Security Change Confirmation dialog
- Click Yes
- Repeat for the Episodes, Element Lists, Summary Reports and Total Reports rows, this time however, checking the ALL box under the View column
- Click the Save
toolbar button to save your changes.
Data and Report Security form
Additional Points
- It is possible to give fine control over what access users have by defining security groups.
- Rights to individual episodes, elements, and sub-elements are applied to reports. Even if a user has access to a report, they will not see any data they do not have rights to. Therefore if a user is printing or previewing a report, they must ensure that they have rights to view any episodes, elements or sub-elements which would normally be included in the report.
More Information
More information can be found under Security Groups in the Administration Guide.
User Administration
50 Adding a New User
Task objectives
To show how user names, passwords and security rights are set up. To show how a staff member whose details have previously been recorded may become a user.
Task steps
- Select Administration, then Set Users and Passwords from the menu. The Users and Passwords form will be displayed
- Select 'Bow, Lynn' from the list of current staff members. This will select the receptionist as a user
- Enter 'lynb' in the User Name field
- Check the box next to the following fields under Privileges:
- Edit Patient
- Add Patient
- Add/Edit Locations
- Select 'Receptionists' from the Security Group combo box:Set Users and Passwords form
- Click the Save
toolbar button to save your changes.
Additional Points
- Any time a new user is created their password will default to 'password'. The new user should change this at the first opportunity by selecting Change Password from the File menu.
More Information
More information can be found in theUser Administration section of the Administration Guide.
Logging In
51 Logging In as the New User
Task objectives
To show how a user can log out by locking Ajexus when their work is complete (or their computer is to be left unattended). To show how a new user may log in without needing to restart.
Task steps
- Click the Lock
toolbar button. 'Ajexus locked' will appear in the status bar at the bottom left of the Ajexus screen. You are now logged out
- Enter 'lynb' in the User Name field
- Enter 'password' in the Password field
- You can either press [Enter] or click LoginLogin screen
- You will now be logged in as the user you created when adding a new user.
More Information
More information can be found under Logging out of Ajexus in the User Guide.
Managing Passwords
52 Changing the Password of the New User
Task objective
To show how a user can change their password.
Task steps
- Select File, then Change Password from the menu.
- The Change User Password form will be displayed Change Password form
- Enter 'password' in the Current Password field
- Enter your choice of new password in the New Password and Verify Password fields
- Click OK. A message box informing you that the password has been updated will be displayed:Confirmation
Additional Points
- Any user with the Administration right can reset a users password from the Users and Passwords form.
- Selecting the Administration right automatically confers all other rights except the Configuration right upon the user, and allows the user to add, edit, and view all episodes, elements, and reports. It is therefore not necessary to specify a security group for a user with the Administration right.
- Selecting the Configuration right automatically confers all other rights upon the user.
Shutdown
53 Shutting Down
Task objective
To show how to shut down.
Task steps
- Select File, then Exit from the menu.
- A message box will be displayed:Shutdown Confirmation
- Select Yes to exit Ajexus
- This completes the tutorial.