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
- Mira Müller (ORCID: https://orcid.org/0000-0003-4625-1019)
- IMAS project group
Institutions
- Karolinska Institutet (SE)
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