Date validation for exchanged data

Oct 21, 2012

A question arose in the PCEHR program: is the date 00010101 a valid date in CDA, and if not, what is the valid date range allowed? Well, firstly, as far as the TS data type is concerned, 00010101 is a valid date - the 1/1/01, the nominal year of Jesus’ birth (only he wasn’t born that year). But just because it’s legal according to the type doesn’t mean that it makes sense - especially as the date of onset of a patient’s problem. This caused some discussion about what dates the national program should accept for clinical dates - what should be valid? When I looked around, I discovered remarkably little good information about the general subject of what dates are reasonable to accept in clinical records.

Here’s some suggestions for the kind of date ranges to test clinical programs against:

  • The oldest living Australian was born 1901. There doesn’t appear to be any need to test clinical programs for older date of births than that (other countries go a little further back, but not far)
  • For medicare testing, Medicare has a system limitation - no creation of records for DOB greater than 80 yr old
  • Date of onset of a condition or a diagnosis could conceivably be up to or before date of birth, but not before date of birth for older Australians, so anything to 1901. For these dates, years, and year/month should be acceptable to the system
  • Date of a clinical action - it’s really difficult to imagine records going back prior to 1980 for actual clinical records (date of action, prescription, immunization), but I know of records going back to the late 80s
  • Scheduled dates - up to 10 years in the future

There’s no real reason to accept dates in the future for other than scheduled dates, though now + a few seconds is always a rational thing to allow.

While these seem reasonable limits - anything outside these is quite likely to be a clerical error (I’ve seen appointments for 3013, date of birth of 23-Apr 1048 etc). But should a system reject dates like this? In most cases, a human inspecting the date will be able to infer the likely clerical error if it’s bad enough to fall outside these reasonable ranges (they won’t pick up subtle errors, but neither can these rules). On the other hand, a computer trying to process these rules can only know that the dates are wrong - no inferences there. So I’m not sure when systems should reject dates that fall outside the reasonable dates ranges I put above.

btw, I’m not sure what the pcEHR is going to do, and couldn’t provide formal advice here anyway. Comments are welcome, particularly from clinical application test folks (thanks to one who contributed the information about medicare age restrictions, btw).