Point in Time (TS)
Timestamps provide a means of marking a specific point in time. For example: a person's birthday, or the time a prescription dispense was recorded, etc.
High-level Timestamp Types
CHI defines four timestamp specialization types:
- TS.DATE
- TS.DATETIME
- TS.FULLDATE
- TS.FULLDATETIME
Specialization Types
Below are the basic rules for using each of the timestamp specification types:
| TS.DATE | TS.DATETIME | TS.FULLDATE | TS.FULLDATETIME | |
|---|---|---|---|---|
| Date | allows partial | allows partial | mandatory | mandatory |
| Time | not allowed | allows partial | not allowed | mandatory |
| Timezone | not allowed | mandatory (if time provided) |
not allowed | mandatory |
| Grammar | YYYY[MM[DD]] (4-8 characters) |
YYYY[MM[DD[HH[MM[SS[.SSSS]]]]]][+/-ZZZZ] (24 characters) |
YYYYMMDD (8 characters) |
YYYYMMDDHHMMSS[.SSSS] +/-ZZZZ (24 characters) |
| Example | <effectiveTime value="200508"/>August, 2005 |
<effectiveTime value="200508021730-0800"/>August 2, 2005, 5:30pm (Pacific Time) |
<effectiveTime value="20050802"/>August 2, 2005 |
<effectiveTime value="20050802173021.1212-0800"/>August 2, 2005, 5:30pm and 21.1212 seconds (Pacific Time) |
