Skip to main content

Date Time

Question with a date and time answer (valueDateTime).

It uses the FHIR dateTime data type, which accepts YYYY, YYYY-MM, YYYY-MM-DD or YYYY-MM-DDThh:mm:ss+zz:zz as inputs, e.g. 2018, 1973-06, 1905-08-23, 2015-02-07T13:28:17-05:00 or 2017-01-01T00:00:00.000Z.

Basic usage

Questionnaire-only

With Response

note

The AM/PM time field automatically adjusts itself if a 24-hour time is entered.

Advanced usage

Calculations

tip

The date and dateTime component has built in validation based on the FHIR date and dateTime data types respectively https://hl7.org/fhir/R4/datatypes.html#date.

SDC Supported extensions

CodeUsage
variablehttp://hl7.org/fhir/StructureDefinition/variable
initialExpressionhttp://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression
- InitialExpression should evaluate to a date or dateTime value.
calculatedExpressionhttp://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression
- CalculatedExpression should evaluate to a date string of YYYY, YYYY-MM, YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ.
enableWhenExpressionhttp://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression
rendering-stylehttp://hl7.org/fhir/extensions/StructureDefinition-rendering-style.html
rendering-markdownhttp://hl7.org/fhir/extensions/StructureDefinition-rendering-markdown.html
rendering-xhtmlhttp://hl7.org/fhir/StructureDefinition/rendering-xhtml
hiddenhttp://hl7.org/fhir/StructureDefinition/questionnaire-hidden
entryFormathttp://hl7.org/fhir/StructureDefinition/entryFormat
- At the moment, entryFormat only works on the date part. It is discouraged to use entryFormat on a DateTime item currently.
requireditem.required
repeatsitem.repeats
readOnlyitem.readOnly
minValuehttp://hl7.org/fhir/StructureDefinition/minValue
maxValuehttp://hl7.org/fhir/StructureDefinition/maxValue
initialitem.initial
enableWhenitem.enableWhen
enableBehavioritem.enableBehavior
textitem.text