The following is based upon Process Procedure Data v0.1.php. This is now out of date and we currently using version 3 (v0.3) of the file.


1.Before running the script you will need to convert the health authorities small number policy to actual cases. This varies because the small policy is not standardised across health authorities. NEED TO CHECK AS CAN’T REMEMBER IF ITALY IMPLEMENT A SMALL CASE POLICY


2.The procedure codes are all to 3 to 4 digits in length and DON’T start with a letter, for example: 678, 0123, etc


3.Range from 0001 to 9999 inclusive


4.identify any unwanted characters in the codes – see PHP file “Non numeric codes and produces a csv file to download v0.1.php”


5.Validate table name contains the word "diagnostics" or "procedures".


6.Add additional columns `country` and `region` to the procedures table.


7.Adds a Primary Key column called `id` for the purpose of tracking and displaying modifications to the data.


8.Remove rows where `cases` are blank, 0, or NULL.


9.Remove unwanted characters from VARCHAR columns and skip INT and YEAR columns (meaning non-string types) as defined in array $unwanted_chars and display any modifcations. For example:

[spaces]

,

.

*

!

Display the modifications.


10.Removes the Primary Key column `id` as no longer required as will upset the code to deal with duplications.


11.Process any duplicates for the procedure table so leaving only one occurrence of code with the cases summed.


12.Adds a Primary Key column called `id` for the purpose of tracking and displaying modifications to the data.


13.Compare $table_name code column with code column in reference table 1icd10_4 (supplied by Bob) and if there is a match step onto the next. If not strip the appended alpha character from the code and try for a match. Display the original and cleaned value. Also, re-add a Primary Key column called `id` for the purpose of tracking and displaying modifications to the data. AS A LAST RESORT WILL ALLOCATED CODES THAT CANNOT LOOKED UP IN REFERENCE TABLE.


14.Removes the Primary Key (`id`) column as no longer required to track changes.


15.Process procedure duplicates leaving just one occurrence of the code with the cases summed.


16.Modifies the `cases` column structure type to INT from VARCHAR.


17.Populates the columns from the provided comprehensive hospitals reference table:

`country`

`region`


18.Inspect the table for any empty cells within the VARCHAR, YEAR, and INT columns. If any blank cells are found, display a confirmation message detailing the specific column(s) containing the blank cells and flag them accordingly.



Topic last reviewed: 12/05/25