Importing Rules - single record
Understanding rules in the import/export specification
The import/export specification contains some rules which do not apply directly to the import function (e.g. rules about arrival date in section 4 – for importers, section 4 arrival date will always be the same as section 1 arrival date, whereas for direct entry, section 4 arrival date may be different to section 1 arrival date, where the team is not the first team in the patient pathway for a transferred record). We have included all webtool rules in this specification in order to ensure there is one key document to cover rules whether they relate to importing of records or direct data entry, as we know that many users will use a combination of imports and direct data entry. Importers can only import the first part of a record; it is not possible to continue a record entered by another team by importing into it (a record can be updated/overwritten with additional information, but only within one team, not across teams). For importers who wish to transfer records, this must be completed manually, by entering the record on the webtool and transferring to the next team.
Duplicate Validation Rules
The duplicate rules for the webtool are:
- Arrival date + NHS Number must be unique
- Arrival date + forename, surname and date of birth must be unique
- Arrival date + hospital number must be unique
Rules 1 and 2 are across all teams (e.g. if another team has entered a patient with same arrival date + NHS number as a record within you file, your record will be treated as a duplicate and not imported). Rule 3 is within a certain team (only if there is another record already assigned to your team will it treat this as a duplicate).
Minimum for Import – If patient identifiers (PIs) are allowed to be imported, then the minimum requirement for fields is based on those fields needed for the duplicate checking process (plus Import ID). If PIs are not allowed, the minimum is just Import ID, arrival date and duplicate checking cannot occur.
Standard minimum fields required for import
Import looks for all of these:
- Import Identifier
- Arrival date
- NHS number OR No NHS number
- Hospital number
- First name
- Last name
- Date of birth
Minimum fields required for import where PIs not allowed
If Northern Ireland team OR PIs not allowed because 7.102 or 8.1.5 = ‘patient refused’, then the import does not do duplicate checks as above and the minimum fields required for import are:
- Import Identifier
- Arrival date/time
ImportIdentifier
The ImportIdentifier can be set up as any value, including numeric and alphabetic values. The ImportIdentifier must be different for each patient record – if the same ImportIdentifier is used the webtool will treat this as a change to an existing record. The ImportIdentifier cannot be a patient identifier, so it must not include name or NHS number. We would recommend that once records have been imported, that the Patient Audit Number (PatientId) assigned to the record is recorded in your local system against the ImportIdentifier. The SSNAP helpdesk team will refer to patient records using the Patient Audit Number assigned by the webtool rather than the ImportIdentifier.
Northern Ireland teams
Patient identifiable information cannot be entered onto the web tool
Ethnicity values are different for Northern Ireland.
W - White |
C - Chinese |
IT - Irish Traveller |
I - Indian |
P - Pakistani |
B - Bangladeshi |
BC - Black Caribbean |
BA - Black African |
BO - Black Other |
M - Mixed Ethnic Group |
O - Other Ethnic Group |
R - Roma Traveller |
Section 1 and section 4
For questions 4.1(S4ArrivalDateTime), 4.2(S4FirstWard) and 4.3(S4StrokeUnitArrivalDateTime), the fields in the import file must match the fields for corresponding questions in section 1: 1.13(S1FirstArrivalDateTime), 1.14(S1FirstWard), 1.15(S1FirstStrokeUnitArrivalDateTime). If these values do not match, the webtool will highlight an error, as shown below:
Patient consent: S8FollowUpPIConsent and S7DischargePIConsent
The patient consent question in Section 8 (yes or no) should override the patient consent question in section 7. So if the patient is asked both times (N.B. not mandatory in section 7), the more recent decision should take precedence. However, section 8 'not asked' should not overwrite section 7 'no' (i.e. if the patient refused in hospital and was not asked at 6 months, their PIs should not be entered).
Importing Errors - whole csv file
Fatal errors – A fatal error within the csv file means that none of the records within the file will be imported. Therefore it is vital that these errors are fixed at source, so that they do not occur again for future records. Fatal errors are for anything that could not physically occur if attempted for direct data entry: if any fields have a wrong ‘data type’; if any fields have a value which is not one of the stated allowable values; and when certain rules are not adhered to (such as selecting a date and time for an assessment and then ticking not assessed; if this is attempted for direct entry, the webtool simply wipes the date/time).
Tip: look out for seemingly minor formatting errors within your csv file, which can cause fatal errors – e.g. if the date and time is entered with 2 spaces between the date and time rather than 1, it will not comply with the dd/mm/yyyy hh:mm format.
Validation errors – A validation error will not prevent the csv file from being imported, but will prevent the record from being locked until the errors are rectified. Validation errors can be rectified either by importing the records again in a new file with the errors corrected (ensuring ‘overwrite’ is selected for “What should be done with existing records”) or directly on the webtool by entering the patient record and changing incorrect answers. On the webtool record, the section(s) with errors will show up in red. Validation errors relate to the rules column in the import specification, and are for errors which physically can be entered into the webtool but are illogical (e.g. conflicting times). Please view below some examples of the validation errors:
Understanding the error table
Row no. -the position of the patient record in the import file, in sequence. Since there must be a header row for the import file, row 1 refers to row 2 in the spreadsheet, and so on.
Import identifier -this column is the unique identifier given to the individual record by the user, and can be used to refer back to the relevant record.
Field - this is the field which contains the error; you can view the Import/Export specification to get a better understanding of the error that originates from this field.
Error message - an explanation of why the error occurred for each particular field.