Description
Parse YYYY, YYYY-MM, or real YYYY-MM-DD in years 0001-9999.
Clinical data distinguishes precise instants, partial dates, fixed durations, and calendar quantities. Missing precision or a calendar month cannot be silently replaced by an arbitrary timestamp or fixed duration.
Parse YYYY, YYYY-MM, or real YYYY-MM-DD in years 0001-9999.
When to use this tool
Use FHIR Date Partial Precision Envelope when you need one explicit clinical date, time, or duration representation component.
How to use the tool and how it works
- Enter date. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read earliest, latest, precision. Use the output convention below.
Parse YYYY, YYYY-MM, or real YYYY-MM-DD in years 0001-9999. Return earliest and latest Gregorian dates in the represented year, month, or day, together with precision.1
FHIR date values may retain year-only or month-level precision. The returned envelope preserves that limitation rather than silently choosing a day.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| date | Gregorian date in the exact accepted precision and grammar. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| earliest | First Gregorian day represented by the supplied partial precision. | Required. Text; maximum UTF-16 length 8192. |
| latest | Last Gregorian day represented by the supplied partial precision. | Required. Text; maximum UTF-16 length 8192. |
| precision | Precision | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"date": "2024-02"
},
"output": {
"earliest": "2024-02-01",
"latest": "2024-02-29",
"precision": "month"
}
} Limitations and assumptions
- The envelope preserves partial precision without inventing a single date or probability distribution; it does not represent a clinical validity period or timezone-aware instant.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Retain precision and offset metadata and validate the complete record against its standard and intended clinical context.
References
-
Calculation and input contract: health-informatics/fhir-date-partial-precision-envelope — tool.io
-
FHIR R4: Data Types — Health Level Seven International
Similar or alternative tools
- FHIR Timing Repeat Period Unit Pair
Convert fixed units to seconds, or months/years to calendarMonths with seconds zero and fixedDuration false.
- Personal Health Export Date Precision Mask
Parse a real Gregorian date and select year, month, or day precision.