What is the context?
Data Imports is a built-in feature of Meddbase, allowing importing new entities or updating existing entities to/in your system in bulk. An entity in Meddbase, generally speaking, is:
- A record or document - e.g. Patient, Company or Invoice
- An event - e.g. Appointment or Episode
- An entry - e.g. Event log
As mentioned, the Data Imports tool allows creating new entities or updating existing entities in bulk, saving you the trouble of having to create or update these entities one-by-one manually.
There are strict rules and solid logic behind running a successful import.
Large data imports, given their nature and complexity, may require assistance and oversight of the MMS Imports Team. Please contact the Client Account Management Team to discuss your import requirement on: firstname.lastname@example.org
What is the purpose of the article?
- Describes importing a billing rule for a specific Company, incl.:
- Explains the Import Rollback option
Importing a Billing Rule
The process of importing a new billing rule can be broken down into the below steps
Creating an Import Template
Creating a template for an import is useful as a starting point*, where the same import will be repeated. To create a new template:-
1. From the Start Page click the Admin tile
2. Click the Data imports tile
3. Click New Template
4. Name the template accordingly, e.g. Price List Import
5. Click Add**
6. From the dropdown menus select:
- Entity Type - the 1st dropdown lists all entities currently supported for importing. In this example we will select Billing Rule - price list
- Entity Type - the 2nd dropdown allows selecting:
A) New - the import will create new entities in your system
B) Existing - the import will update existing entities
7. For this example we will select New, as we intend to add a new billing rule.
8. Add a Description, e.g. New Price List
9. Click Add again and select:
- Entity Type - in the 1st dropdown select Company
- Entity Type - in the 2nd dropdown select Existing
10. Add a Description, e.g. Existing Company
11. Click Save Template
*When running an Import from a Template you can change/add/remove entities and the descriptions, thus completely overriding the template
**As explained later in the article, this particular import involves 2 entities, 1 New and 1 Existing, where the New entity references the Existing entity, hence we are adding 2 rows in the Template.
New Import Instance and Import Schema
Once you have created an import template, you can use it to run a new instance of an import in the Data imports section:-
1. Click the Template you wish to use
2. Click +New Instance
3. Type in the Instance Description
4. Click Schema in the respective entity's row to download a .csv spreadsheet. The Schema outlines:
- What information is Required (mandatory) for importing this entity type
- What information is Optional for importing this entity type
- What is the expected Description, so how is the information allowed to be expressed, e.g. Unique Identifier
- What are the Allowed values, e.g. benefit maxima or total charged price
- What References is a given column making*
*Importing a piece of information in a column for an entity type may Reference another entity. This means that you will need to import another spreadsheet for that entity type following its respective Schema.
Price List schema
As per the Price List schema, you must provide the following information:
- OWNER_COMPANY_ID - this column references an existing entity: a Company, which means we must upload a spreadsheet for that entity in line with its respective Schema.
As per the Company schema the only Required column is COMPANY_ID.
Once you have familiarised yourself with the schema(s), you can download a Template for each entity type required for the import. Templates will include all column headers*, labelled correctly** (required and optional) that were listed in the respective schema.
*It is recommended that you delete those columns from the Template where no information will be provided, so that you do not import [empty] columns.
**When uploading a spreadsheet containing information you wish to import, column headers must be labelled as per the schema, incl. upper case letters and ' _ '(underscores).
In this examples, both Templates completed might look as shown below*:
*The spreadsheets shown below show only the Required columns completed, as per the respective schema
- Price List spreadsheet
- Company spreadsheet
Upload spreadsheets and 'Submit Tables' stage of the import
Once you populated the templates for the entity types in your import with required and optional information as needed, you can complete the 1st stage of the import:
- Click Upload in each entity's row and upload the respective spreadsheet (Drag & drop or Choose files from your computer)
- Click Submit Tables and the system will check whether the spreadsheets you uploaded are in line with the schema(s).
- Once the Table submission is successful* click Next to move to the next stage of the import.
*If the system identifies any errors in the spreadsheets you had uploaded, clicking the View Report button allows you to view the error details and take corrective action.
'Validate' stage of the import
You can now move to the 2nd stage of the import:
1. Click Validate and the system will check the values uploaded in the spreadsheet columns against the data type they correspond to.
2. Once Validation is successful* click Next to move to the final stage of the import.
*If the system identifies any errors in the data you had uploaded, clicking the View Report button allows you to view the error details and take corrective action.
'Commit' stage of the import
Once the validation is complete you can move to the final stage of the import:
1. Click Commit and the system will create the new entities/update the existing entities in your system
2. Click Finished to end the import and you will be taken back to the main Data Imports page where you can view reports from all stages of the import, download an Entity Overview spreadsheet and more.
The outcome of the import described in this article is a Price List being imported for the Company you referenced. The new billing rule can be viewed by following these steps:
1. From the Start Page click the Admin tile
2. Click Billing Rules
3. In the Add Companies field, search for the company you referenced and click the search result
4. Expand the company icon and you will see the New Price List*
*To perform its function, a billing rule must be added to (a) Charge Band(s). Click here for more details.
A successful import can be rolled back and any new entities created will be removed or changes made to existing entities reversed.
A successful instance of an import is marked with icon in the Data Imports section under the Import Template the instance started from. To Rollback the import:
1. Expand the relevant Template icon
2. Click the import instance you wish to rollback
3. Click Rollback import*
4. Click Rollback to proceed
5. Click Ok on the pop-up warning
*There is also an option for a Partial Rollback where you can choose the entities you wish to rollback, e.g. If you imported Patients and their Employers simultaneously you can rollback only the patients you have created, whilst leaving the newly created companies intact.
This article was last updated on 25th of Oct 2022 in the context of Meddbase version 18.104.22.16825