Skip to content

Main content

FHIR Date Partial Precision Envelope Tool

Inclusive Gregorian calendar-day envelope for a valid year, year-month or full FHIR date, with no timezone or estimated day inserted.

Loading tool…

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

  1. Enter date. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
dateGregorian date in the exact accepted precision and grammar.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
earliestFirst Gregorian day represented by the supplied partial precision.Required. Text; maximum UTF-16 length 8192.
latestLast Gregorian day represented by the supplied partial precision.Required. Text; maximum UTF-16 length 8192.
precisionPrecisionRequired. Text; maximum UTF-16 length 8192.
json
{
  "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

  1. Calculation and input contract: health-informatics/fhir-date-partial-precision-envelope — tool.io

  2. FHIR R4: Data Types — Health Level Seven International

Similar or alternative tools