Processing and Cleaning of Diagnosis and Procedure Codes in the National Patient Register (NPR): SAS Syntax and Documentation

This record provides SAS syntax for processing three variables, hdia, diagnos, and op, from the National Patient Register (NPR), supplied by the Swedish National Board of Health and Welfare (Socialstyrelsen). The syntax performs two main tasks: Separation of concatenated diagnosis and procedure codes into up to 30 individual variables each. Identification and handling of entries that do not represent valid diagnosis codes. Codes suspected to be ATC codes and functional status codes are extracted into dedicated variables and replaced with standardized placeholders ("_atc_" and "_func_") in the diagnosis variables. This data-cleaning procedure complements the preprocessing performed by Socialstyrelsen and forms part of the data curation for research within the IMAS project. The work underlying this syntax utilised data from the REWHARD consortium and was supported by the Swedish Research Council (grant number 2021-00154). The syntax is made publicly available to support reproducible research and may be useful for other projects working with National Patient Register (NPR) data. Further information about the IMAS-project is available on the project's website. Contact information: [email protected]

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-05-21
DOI
https://doi.org/10.5281/zenodo.20325779
Primary Topic
SAS software applications and methods
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Processing and Cleaning of Diagnosis and Procedure Codes in the National Patient Register (NPR): SAS Syntax and Documentation

Mira Müller, IMAS project group
Zenodo (CERN European Organization for Nuclear Research)
SAS software applications and methods
article

Processing and Cleaning of Diagnosis and Procedure Codes in the National Patient Register (NPR): SAS Syntax and Documentation

Mira Müller, IMAS project group
article en

Abstract

This record provides SAS syntax for processing three variables, hdia, diagnos, and op, from the National Patient Register (NPR), supplied by the Swedish National Board of Health and Welfare (Socialstyrelsen). The syntax performs two main tasks: Separation of concatenated diagnosis and procedure codes into up to 30 individual variables each. Identification and handling of entries that do not represent valid diagnosis codes. Codes suspected to be ATC codes and functional status codes are extracted into dedicated variables and replaced with standardized placeholders ("_atc_" and "_func_") in the diagnosis variables. This data-cleaning procedure complements the preprocessing performed by Socialstyrelsen and forms part of the data curation for research within the IMAS project. The work underlying this syntax utilised data from the REWHARD consortium and was supported by the Swedish Research Council (grant number 2021-00154). The syntax is made publicly available to support reproducible research and may be useful for other projects working with National Patient Register (NPR) data. Further information about the IMAS-project is available on the project's website. Contact information: [email protected]

Zenodo (CERN European Organization for Nuclear Research)
Karolinska Institutet (SE)
Openalex Percentile: Top 9%
SAS software applications and methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.