Procedures are provided in a form of  NOMESCO codes called the Norwegian Clinical Procedure Coding (NKPK) system. This is the adopted system and is updated annually. Note! That some older NOMESCO codes from before 2023 are still in use.  For example, the code AAD10 was replaced by AAD11 in 2023, but AAD10 may still be used by some institutions.


All codes can be downloaded from URL:

https://www.helsedirektoratet.no/digitalisering-og-e-helse/helsefaglige-kodeverk/nkpk

Click on All procedure codes NKPK 20xx (Excel) where xx is the most current year found under section Download current files for NKPK


Prerequisite

Build the latest procedural data which will form the reference table

Fetch an up to date spreadsheet from URL: https://finnkode.helsedirektoratet.no/nkpk/search

Translate the webpage

Click on More choices located on the top right hand side

Click on Download Excel

Open the spreadsheet and delete the first sheet as Google Translate service does not like it and the save as a different name, for example: NKPK codes 2025.xlsx

Translate spreadsheet using Google's service

Open the translated spreadsheet and delete rows marked with an X  in column called Pure additional code (should never be the first procedural code)

Remove column called Pure additional code (should never be the first procedural code), Sex, New code in xxxx (where xxxx is the year), Text with a maximum of 60 characters and Source code works

Rename the column headers to just code and description

Check there are approximately 8500 codes left

Save file as nkpk_procedure_codes.csv

Import into your WampServer's Norway procedure database


Note! Some codes are being automatically translated, for example, LAG20 changes to TEAM20. The workaround is to replace the translated code column with its original, untranslated version.



Objective of the code is to cleanse the data, assign serials together with regions, match the code with PE's code db and to process any duplicates. This is carried out in steps 1 to 6.


Prerequist MySQL tables are mandatory and are used to refer to:

1.Table hospital_serial contains PurpleXtra's serial number against the hospital name and where the serial number is a `x` indicates that the data is invalid i.e. the hospital is closed.

2.hospitals_norway

3.hospitals_from_pe_db

4.


Step 1:

Check the NOMESCO and NPKP codes are valid. Unwanted codes have been removed along with their corresponding data.


Step 2:

Populates the serial column from the reference table hospital_serial

Renames the columns to match our methodology


Step 3:

Clean up serials by:

Removing the data if the column is populated with an x

Checks the serial columns don't contain a zero (0) value. If they exist it means that

the script will abort so that you can check the hospital name against our (PE) database.


Step 4:

Review the Norwegian small cases policy and translate the character into a valid numerical value. 

Usually it is represented by a * in the cases column, it typically indicates that an integer between 1 and 4 must be assigned.


Step 5:

Deal with any duplicates

Delete hospital column

Add region column (VARCHAR(50))

Populate the region column

Check for any blank cells


Step 6:

PHP file ran Step 6 - Validate final data v0.1.php

1.Create table called step_6_diagnostics

2.Change serial column to MEDIUMINT

3.Check / process any duplicates

4.Check for any blank cells

5.Display minimum and maximum code length and if < 8 set to VARCHAR(7)

6.Change cases column from VARCHAR to INT

7.Check the total cases match in original and final tables

8.Count number of regions in final table

9.Display year spread.



Topic last reviewed: 15/12/25