Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Selection of Medical Diagnostic Codes for Analysis of Electronic Patient Records. Application to Stroke in a Primary Care Database

Abstract

Background

Electronic patient records from primary care databases are increasingly used in public health and health services research but methods used to identify cases with disease are not well described. This study aimed to evaluate the relevance of different codes for the identification of acute stroke in a primary care database, and to evaluate trends in the use of different codes over time.

Methods

Data were obtained from the General Practice Research Database from 1997 to 2006. All subjects had a minimum of 24 months of up-to-standard record before the first recorded stroke diagnosis. Initially, we identified stroke cases using a supplemented version of the set of codes for prevalent stroke used by the Office for National Statistics in Key health statistics from general practice 1998 (ONS codes). The ONS codes were then independently reviewed by four raters and a restricted set of 121 codes for ‘acute stroke’ was identified but the kappa statistic was low at 0.23.

Results

Initial extraction of data using the ONS codes gave 48,239 cases of stroke from 1997 to 2006. Application of the restricted set of codes reduced this to 39,424 cases. There were 2,288 cases whose index medical codes were for ‘stroke annual review’ and 3,112 for ‘stroke monitoring’. The frequency of stroke review and monitoring codes as index codes increased from 9 per year in 1997 to 1,612 in 2004, 1,530 in 2005 and 1,424 in 2006. The one year mortality of cases with the restricted set of codes was 29.1% but for ‘stroke annual review,’ 4.6% and for ‘stroke monitoring codes’, 5.7%.

Conclusion

In the analysis of electronic patient records, different medical codes for a single condition may have varying clinical and prognostic significance; utilisation of different medical codes may change over time; researchers with differing clinical or epidemiological experience may have differing interpretations of the relevance of particular codes. There is a need for greater transparency in the selection of sets of codes for different conditions, for the reporting of sensitivity analyses using different sets of codes, as well as sharing of code sets among researchers.

Introduction

Electronic patient records from primary care databases are increasingly used in public health and health services research with applications in disease epidemiology, drug utilisation and pharmacoepidemiology [1]. Identification of patients with specific diseases for study from electronic patient records typically requires the use of selected medical codes but the process of selecting codes has not been well described. In an early publication from the General Practice Research Database (GPRD), the Office for National Statistics (ONS) published sets of codes for a range of diseases and conditions included in the publication Key Health Statistics from General Practice [2]. This example has not often been followed by researchers, even though the selection of appropriate sets of medical codes is recognised to be a difficult yet important component of research using electronic patient records. This paper therefore describes the procedure we used to select a set of codes for diagnosis of stroke in primary care.

Stroke is a long-term condition of public health importance that may be investigated in primary care databases. However, stroke represents an acute illness, around the time of initial occurrence or recurrence, as well as a long-term condition which may require secondary preventive medical care, rehabilitation and supportive care. One of the first studies to report on the epidemiology of stroke in a primary care database was the UK Office for National Statistics report Key Health Statistics in General Practice [2]. This publication reported on the prevalence of stroke in the UK General Practice Research Database (GPRD). Subjects with stroke were identified using a set of 192 medical codes that included diagnostic codes for acute stroke, as well as prevalent stroke and cerebrovascular disease. In a GPRD-based study we used the ONS codes with a 2 year stroke code free run-in period to identify incident stroke events [3]. However, in a study of trends in case fatality, we identified important trends in the use of different medical codes for stroke over time. In the present analysis, therefore, we aimed to re-evaluate the set of codes described by ONS to determine whether a subset of codes for acute stroke could be identified. The methods used for evaluation included: i) reclassification of codes by four independent raters; ii) evaluation of trends over time in the use of medical codes for stroke; and iii) evaluation of one year mortality for groups of subjects with different index medical codes for stroke. We also aimed to evaluate trends over time in the utilisation of different codes.

Methods

General Practice Research Database

The General Practice Research Database (GPRD) is a large database comprising the electronic patient records from approximately 5% of UK general practices. A number of studies have evaluated the validity of diagnoses recorded in GPRD with generally satisfactory results [4], [5]. Data were collected into the GPRD from 1987 up to the present. Clinical entries in the GPRD were coded initially using the Oxford Medical Information Systems (OXMIS) codes and later using READ codes, with the date of transition from Oxmis to READ coding systems varying for different practices in the database [1].

Data extraction

Initially, we used the set of diagnostic codes for prevalent stroke that was used by the Office for National Statistics in the publication Key Health Statistics from General Practice [2].

This set of codes does not include transient ischaemic attacks. There are 192 codes in the set used by ONS to define prevalent stroke. These were supplemented with codes from the READ and GPRD medical code dictionaries, giving a set of 202 codes. These codes were used for initial data extraction.

The baseline population consisted of all up-to-standard patients (UTS) in GPRD from 1st January 1987 to 31st December 2006 inclusive. In the GPRD data are classified as ‘up-to-standard’ when they are judged to be of a high enough quality to be used for research. Cases were all patients with a first recorded stroke code during the period 1st January 1997 to 31st December 2006 inclusive. The date of stroke diagnosis was defined as the first date on which a stroke medical code was recorded. Cases were selected if they had at least 24 months of up-to-standard follow-up, prior to the date of diagnosis of stroke. This process yielded a sample of 48,239 subjects.

Data analysis

Three methods were used to evaluate the medical codes and the extracted data.

i) reclassification of codes by four independent observers.

The list of 202 Read and Oxmis codes was independently reviewed by four different medically qualified raters. These included a public health/health services researcher, an epidemiologist, a stroke physician and a general practitioner. Each rater reviewed each code and determined, based on their clinical judgement, whether use of the code was likely to indicate an acute stroke event. Raters were compared using kappa statistics. For each code, the ratings were summed to give a score ranging from zero, with no raters agreeing that the code indicated acute stroke, to four, with all raters agreeing that the code was consistent with acute stroke. Based on consensus, codes rated 3 or 4 were classed as ‘acute stroke’. A rating of three affirmatives was used as a cut-point because one rater did not classify subarachnoid haemorrhage as stroke. Codes that were excluded through this process included codes for long-term stroke management including sequelae of stroke, extracranial atherosclerotic disease, disorders of the intracranial venous sinuses and other conditions. Three codes for stroke annual review or stroke monitoring were also classified into stroke annual review codes, including “Stroke/CVA annual review” (662e.00), and stroke monitoring codes, including “stroke monitoring” (662M.00) and “haemorrhagic stroke monitoring” (662o.00).

ii) evaluation of trends over time in the use of medical codes for stroke.

We evaluated trends over time in the use of different sets of codes including those affirmed by 0, 1, 2, 3 or 4 raters. We analysed the medical codes recorded on the stroke index date, that is the date of the earliest reported stroke code in the medical record. Where more than one stroke code was recorded on the index date then the code with the highest rating was selected for analysis. We also used the sets of codes resulting from reclassification – ‘acute stroke’, ‘stroke annual review’ and ‘stroke monitoring’. We estimated incidence rates for stroke for different groups of codes. Rates were estimated by study year, standardising by age and sex to the European Standard Population for reference.

iii) evaluation of one year mortality for groups of subjects with different types of first medical code for stroke.

We compared mortality within one year of stroke incidence for the same sets of codes outlined above. One year case fatality was estimated from a failure function in order to allow for censoring of cases that transferred out or reached the end of the study before one year follow-up was completed.

Ethics

The study was implemented utilising an anonymised dataset from the General Practice Research Database. The study protocol was approved by the Independent Scientific Advisory Committee (ISAC) of the Medicines and Healthcare products Regulatory Agency (MHRA) (ISAC Protocol No. 07_027R).

Results

Review of stroke codes

When the ONS codes were rated by four reviewers there was poor agreement concerning whether the codes were consistent with acute stroke. Table 1 shows pairwise values for percent agreement and kappa. While there was moderate or good agreement between raters one and three, one and four and between two and three, there was only weak agreement between raters one and two, two and four and three and four (Table 1). The value for kappa for all four raters was low at 0.23 suggesting no overall agreement. However, more than 80% of new stroke events were associated with codes that either three or four raters agreed were consistent with acute stroke. The number of raters who indicated a code was consistent with acute stroke and numbers of codes, were as follows: zero affirmative ratings, four codes; one affirmative rating, 36 codes; two affirmatives, 41 codes; three affirmatives, 41 codes; four affirmatives, 80 codes. Thus each of the raters agreed that codes for cerebral infarction, cerebral haemorrhage, cerebral embolism and ‘cerebral vascular accident’ were consistent with acute stroke. Of the 41 codes that only three raters affirmed as consistent with acute stroke, 16 were for subarachnoid haemorrhage which is included in the WHO definition of stroke but not in the definition of stroke used in the Quality and Outcomes Framework of the UK general practice contract. A further 12 codes were for hemiplegia or paralysis, which is a common presenting feature of acute stroke. Of the codes which two or fewer raters considered to be indicative of acute stroke, the majority of codes were for intracranial or extracranial arterial disease without mention of infarction, diseases of the cerebral venous sinuses, or for sequelae of stroke. Raters showed considerable disagreement over these codes. Based on these findings, we considered codes that were affirmed by three or more raters were consistent with acute stroke. This set of codes for ‘acute stroke’ included 121 codes.

Utilisation of stroke codes

Initial extraction of data using the ONS codes gave 48,239 cases of stroke from 1997 to 2006. The 48,239 subjects had a total of 70,288 stroke medical codes recorded on the stroke index date. The codes used and their relative frequencies are shown in the Table 2. There were only 17 codes that each accounted for more than 1% of subjects, and just two codes accounted for nearly half of subjects.

thumbnail
Table 2. READ and OXMIS terms for stroke, results of rating for acute stroke and relative frequency among 70,288 index stroke codes recorded in 48,239 subjects.

https://doi.org/10.1371/journal.pone.0007168.t002

The distribution of different sets of codes, as index codes, within this sample is shown in Table 3. Codes that received zero affirmative ratings were rarely utilised as index codes accounting for 56 (0.1%) subjects out of the entire sample. Codes that received one affirmative rating accounted for 14.7% of the patient sample, but the number of cases identified through these codes increased from 121 per year in 1997 to 1,861 in 2004, 1,730 in 2005, and 1,618 in 2006. Of 7,091 first occurrences of these codes 5,209 (73%) were in 2004 or later. This increase was accounted for by increased utilisation of codes for stroke annual review or stroke monitoring. Overall, there were 3,112 (6.5%) of cases initially diagnosed through codes for ‘stroke monitoring’ and 2,288 (4.7%) diagnosed through codes for ‘stroke annual review’. Codes affirmed by two raters accounted for 3.5% of the patient sample. Codes that received three or four affirmative ratings accounted for 81.7% of the patient sample. However, these codes accounted for 93% of the patient sample in 1997 but 68% in 2006. There were a further 860 subjects with valid acute stroke codes ever recorded, affirmed by three or four raters, in whom the valid acute stroke code was not an index code. There were 293/860 cases in whom the valid acute stroke code was recorded within 30 days of the index stroke code.

thumbnail
Table 3. Number of new stroke cases by study year and type of codes used for case selection.

https://doi.org/10.1371/journal.pone.0007168.t003

Table 4 shows age and sex standardised incidence rates for stroke by study year based on different sets of codes. The incidence of stroke using all codes remained approximately constant during the earlier part of this study period. However, the EU-standardised incidence of stroke increased from 1.13 per 1,000 in 2002 to 1.19 in 2003 and 1.36 in 2004 before declining to 1.15 in 2006. The incidence of stroke associated with stroke monitoring and stroke annual review codes showed a large increase over the period, with a steep increase between 2002 and 2004. The incidence of ‘acute stroke’ remained approximately constant initially but later declined from 1.00 per 1,000 in 2003 to 0.76 in 2006.

thumbnail
Table 4. Incidence of first stroke by study year and type of codes used for case selection.

https://doi.org/10.1371/journal.pone.0007168.t004

Table 5 shows the one year case fatality of groups of subjects with different index codes. Data for 394 cases in which the first stroke code was after the death date were excluded. The mortality of 47,845 subjects with stroke identified using the ONS codes was 25.5% within one year following the initial stroke event. The case fatality of subjects classified as having ‘acute stroke’ was 29.1%. The case fatality of subjects identified through ‘stroke annual review’ codes was 4.6% and for ‘stroke monitoring’ codes 5.7%. Codes that were not rated in the affirmative by any rater were infrequently utilised but were associated with unexpectedly high mortality. The reasons for this finding are unclear.

thumbnail
Table 5. One year mortality by type of codes used for stroke selection.

https://doi.org/10.1371/journal.pone.0007168.t005

Discussion

Main findings

This paper has presented an analysis of the codes for prevalent stroke used by the Office for National Statistics. Our initial approach to the evaluation of strokes in GPRD was to identify subjects with a first-ever recorded code from the ONS set, with at least a period of 24 stroke record free months available before the index diagnosis. This study yielded plausible results consistent with the literature. However, the ONS code set was designed to identify cases with prevalent stroke. In order to identify a possible set of codes for acute stroke, we used a combination of methods. Although the raters disagreed concerning the significance of codes that were not clearly associated with cerebral haemorrhage or infarction, by restricting attention to those codes for which three or four raters agreed that acute stroke was probable, we were able to achieve consensus concerning the selection of codes. Within the set of codes for ‘acute stroke’ there was disagreement concerning the inclusion of subarachnoid haemorrhage but this is compatible with inconsistent definitions that are in clinical use. The Quality and Outcomes Framework (QOF) for the UK General Practice contract does not include subarachnoid haemorrhage [6] and this was reflected in the rating performed by the general practitioner. Read codes eligible for QOF include those for cerebral haemorrhage, cerebral infarction, cerebral embolism as well as stroke and ‘CVA’ (Cerebral Vascular Accident). All QOF eligible codes were included within the set of codes for ‘acute stroke’ in this research, supporting the validity of the latter.

There have evidently been major selective increases in the use of specific codes subsequent to the introduction of the QOF. The use of codes for stroke annual review and stroke monitoring has greatly increased in frequency and peaked shortly after the inclusion in the QOF with a subsequent plateau. These codes were sometimes used as incident stroke codes, with no previous mention of stroke in at least the preceding 24 months. Cases identified in this way were associated with low mortality. If associated with acute stroke events they might represent mild cases possibly explaining the low mortality. Unfortunately, we cannot directly examine if the use of codes might be associated with the severity of the stroke event due to lack of information on stroke severity. However, subjects with stroke may be admitted directly to hospital and their first contact with the general practice may be for review at some later date. The stroke onset date may therefore be imprecisely recorded in primary care, perhaps often being recorded after the true stroke onset date. A potential bias in the recording of stroke dates might also explain the low mortality among patients with those codes as first stroke codes. Additional validation of stroke diagnosis dates through analysis of information on prescribing, utilisation of secondary care services or test results may be important when the precise diagnosis dates are required. The use of codes for monitoring and review may be compatible with the analysis of certain aspects of stroke research in the general practice record since a re-analysis of our earlier research excluding these codes and only considering the 121 codes identified in this paper did not yield different results [3]. Nevertheless, it will be advisable to be cautious in utilising these codes for studies of stroke prognosis and especially for studies of secular trends in stroke outcomes.

Comparison with other studies

Several studies in the General Practice Research Database (GPRD) have evaluated the epidemiology of stroke [2], [7][16]. Analytical studies in GPRD that employed stroke occurrence as an outcome have generally adopted a more restrictive approach to definition. An incident stroke is usually defined as one that is associated with the first-ever recorded stroke code. A minimum period of study time free of recorded stroke codes, usually between one and three years, is often used to precede the first stroke record. Some studies have also excluded subjects ever diagnosed with multiple sclerosis or cancer, as stroke may be diagnosed with less certainty in these subjects [7], [8]. Some studies have also used evidence of relevant health care utilisation including hospital admissions, diagnostic tests and drug prescribing as contributing to the confirmation of stroke diagnoses [7], [8]. These latter approaches are demanding to implement and results may be dependent on subjects gaining access to specialist care, as well as there being adequate recording of relevant measures within the primary care record as well as the specialist record. Studies of stroke epidemiology, requiring the analysis of large numbers of stroke records require approaches that can be more readily implemented.

Strengths and limitations

Our study has the strengths of a very large sample that was drawn from a large number of UK general practices. In common with all studies that use electronic patient records, the data are subject to variation in clinical practice, as well as clinical uncertainty in diagnosis. There will always be a proportion of cases in whom the diagnosis may be uncertain. We utilised four independent raters with differing specialist expertise to evaluate diagnostic codes. We also evaluated different sets of codes for their impact on stroke incidence and stroke case fatality. A limitation of this research is the lack of a reference method to establish stroke diagnoses. This would require evaluation of electronic records against clinical records, with access to specialist records for details of scan results in most cases. In spite of this limitation we believe that the methods adopted in this study may provide a useful approach to the selection of codes for analysis of electronic patient records in future studies.

Conclusions

This study raises several questions concerning the selection of medical codes to provide case definitions in research that utilises electronic patient records. Firstly, utilisation of different medical codes may change over time. Secondly, different medical codes for a single condition may have varying clinical and prognostic significance. Thirdly, researchers with differing clinical or epidemiological experience may have differing interpretations of the relevance of particular codes. Since these issues may sometimes have an impact on the results of a study, there is a need for greater transparency in the selection of sets of codes for different conditions, for the reporting of sensitivity analyses using different sets of codes, as well as sharing of code sets among researchers.

Acknowledgments

This study is based in part on data from the Full Feature General Practice Research Database obtained under licence from the UK Medicines and Healthcare Products Regulatory Agency. However, the interpretation and conclusions contained in this study are those of the authors alone. Access to the GPRD database was facilitated by the Medical Research Council's licence agreement with MHRA.

The eCRT Research Team also includes Brendan Delaney, King's College London; Andy Grieve, King's College London; Peter U. Heuschmann, King's College London; Paul Little, University of Southampton; Judith Redfern, King's College London; Tjeerd van Staa, GPRD Division, MHRA; Charles Wolfe, King's College London; Lucy Yardley, University of Southampton; Lisa McDermott, University of Southampton.

Author Contributions

Conceived and designed the experiments: MCG AMT. Performed the experiments: JC MA AGR AMT. Analyzed the data: MCG JC MA. Wrote the paper: MCG. Contributed to the paper and approved final draft: JC MA AGR AMT.

References

  1. 1. Lawson DH, Sherman V, Hollowell J (1998) The General Practice Research Database. Scientific and Ethical Advisory Group. QJM 91: 445–452.
  2. 2. National Statistics (2000) Key health statistics from general practice 1998. Series MB6 No 2. London: National Statistics.
  3. 3. Toschke AM, Wolfe C, Heuschmann P, Rudd A, Gulliford M (2009) The effect of antihypertensive treatment after stroke. An analysis of the General Practice Research Database (GPRD). Cerebrovascular Diseases (in press).
  4. 4. Hollowell J (1997) The GPRD. Quality of morbidity data. Population Trends 87: 36–40.
  5. 5. Hansell A, Hollowell J, Nichols T, McNiece R, Strachan D (1999) Use of the General Practice Research Database (GPRD) for respiratory epidemiology: a comparison with the 4th Morbidity Survey in General Practice (MSGP4). Thorax 54: 413–419.
  6. 6. Department of Health (2009) New GMS Contract QOF Implementation. Dataset and Business Rules. Stroke And Transient Ischaemic Attacks (TIA). London: Department of Health.
  7. 7. Mulnier HE, Seaman HE, Raleigh VS, Soedamah-Muthu SS, Colhoun HM, et al. (2006) Risk of stroke in people with type 2 diabetes in the UK: a study using the General Practice Research Database. Diabetologia 49: 2859–2865.
  8. 8. Andersohn F, Schade R, Suissa S, Garbe E (2006) Cyclooxygenase-2 selective nonsteroidal anti-inflammatory drugs and the risk of ischemic stroke: a nested case-control study. Stroke 37: 1725–1730.
  9. 9. Becker C, Brobert GP, Almqvist PM, Johansson S, Jick SS, et al. (2007) Migraine and the risk of stroke, TIA, or death in the UK (CME). Headache 47: 1374–1384.
  10. 10. Gallagher AM, Rietbrock S, Plumb J, van Staa TP (2008) Initiation and persistence of warfarin or aspirin in patients with chronic atrial fibrillation in general practice: do the appropriate patients receive stroke prophylaxis? J Thromb Haemost 6: 1500–1506.
  11. 11. Rietbrock S, Heeley E, Plumb J, Staa van (2008) Chronic atrial fibrillation: Incidence, prevalence, and prediction of stroke using the Congestive heart failure, Hypertension, Age>75, Diabetes mellitus, and prior Stroke or transient ischemic attack (CHADS2) risk stratification scheme. Am Heart J 156: 57–64.
  12. 12. Douglas IJ, Smeeth L (2008) Exposure to antipsychotics and risk of stroke: self controlled case series study. BMJ 337: a1227.
  13. 13. Renoux C, Dell'aniello S, Garbe E, Suissa S (2008) Hormone replacement therapy use and the risk of stroke. Maturitas 61: 305–309.
  14. 14. Derby LE, Myers MW, Jick H (1999) Use of dexfenfluramine, fenfluramine and phentermine and the risk of stroke. Br J Clin Pharmacol 47: 565–569.
  15. 15. Hall GC, Brown MM, Mo J, MacRae KD (2004) Triptans in migraine: the risks of stroke, cardiovascular disease, and death in practice. Neurology 62: 563–568.
  16. 16. Cleary P, Shorvon S, Tallis R (2004) Late-onset seizures as a predictor of subsequent stroke. Lancet 363: 1184–1186.