Details
-
Technical Correction
-
Resolution: Persuasive
-
Medium
-
US Core (FHIR)
-
6.1.0
-
Cross-Group Projects
-
US Core Laboratory Result Observation Profile
US Core Observation Clinical Result Profile
US Core Observation Screening Assessment Profile -
-
Correction
Description
The regex used to validate that Observation.effectiveDateTime satisfies constraint us-core-1 ("Datetime must be at least to day.") rejects many values that are valid FHIR dateTimes precise to the day or better.
Relevant excerpt from StructureDefinition-us-core-observation-clinical-result.json:
// ... "constraint": [ // ... { "key": "us-core-1", "severity": "error", "human": "Datetime must be at least to day.", "expression": "$this is DateTime implies $this.toString().length() >= 10", "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)" } ], // ...
The regex ...
\d\{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)
... doesn't match any of the examples of valid dateTimes from the core FHIR spec for dateTime that are precise to at least a day:
1905-08-23 2015-02-07T13:28:17-05:00 2017-01-01T00:00:00.000Z