Interval (IVL)
A set of continuous values belonging to the same base data type.
High-level Interval Types
CHI defines nine interval specialization types:
- IVL<TS.DATE>
- IVL<TS.DATETIME>
- IVL<TS.FULLDATE>
- IVL<TS.FULLDATETIME>
- IVL.LOW<TS.DATE>
- IVL.LOW<TS.FULLDATE>
- IVL.HIGH<TS.FULLDATE>
- IVL.WIDTH<TS.FULLDATE>
- IVL<PQ.x>
Specialization Types
Below are the basic rules for each of the interval specification types:
| low | high | width | Notes | Example | |
|---|---|---|---|---|---|
| IVL<TS.DATE> Partial Date Range |
required | required | required | Exactly 2 of low, high, width are populated. They can be nullFlavor but not PINF or NINF |
Example: "from March 01, 2000 to July 2000" would be specified as:
<effectiveTime xsi:type="IVL_TS">
<low xsi:type="TS" specializationType="TS.DATE" value="20000301"/>
<high xsi:type="TS" specializationType="TS.DATE" value="200007"/>
</effectiveTime>
Example: "Beginning March, 2000, not yet ended" would be specified as:
<effectiveTime xsi:type="IVL_TS">
<low xsi:type="TS" specializationType="TS.DATE" value="200003"/>
<high xsi:type="TS" specializationType="TS.DATE" nullFlavor="NA"/>
</effectiveTime>
|
| IVL<TS.DATETIME> Partial Date + Time Range |
required | required | required | Exactly 2 of low, high, width are populated. They can be nullFlavor but not PINF or NINF | Example: "from March 01, 2000 @ 3:00 PM to July 15, 2000 @ 4:00 AM (Alberta time)" would be specified as:<effectiveTime xsi:type="IVL_TS">
<low xsi:type="TS" specializationType="TS.DATETIME" value="200003011500-0700"/>
<high xsi:type="TS" specializationType="TS.DATETIME" value="200007150400-0700"/>
</effectiveTime> |
| IVL<TS.FULLDATE> Precise Date Range |
populated | populated | required | Example: "from March 01, 2000 to July 15, 2000" would be specified as:<effectiveTime xsi:type="IVL_TS">
<low xsi:type="TS" specializationType="TS.FULLDATE" value="20000301"/>
<high xsi:type="TS" specializationType="TS.FULLDATE" value="20000715"/>
</effectiveTime> |
|
| IVL<TS.FULLDATETIME> Precise Date-Time Range |
populated | populated | not allowed | Example: "from March 01, 2000 @ 3:30:00 PM to July 15, 2000 @ 4:30:00 AM, Ontario time" would be specified as:<effectiveTime xsi:type="IVL_TS">
<low xsi:type="TS" specializationType="TS.FULLDATETIME" value="20000301153000-0500"/>
<high xsi:type="TS" specializationType="TS.FULLDATETIME" value="20000715043000-0500"/>
</effectiveTime> |
|
| IVL.LOW<TS.DATE> Partial Start Date |
mandatory | not allowed | not allowed | Example: "Began July, 2005" would be specified as:<effectiveTime xsi:type="IVL_TS">
<low xsi:type="TS" specializationType="TS.DATE" value="200507"/>
</effectiveTime> |
|
| IVL.LOW<TS.FULLDATE> Precise Start Date |
mandatory | not allowed | not allowed | Example: "Begin July 6, 2005, BC time" would be specified as:<effectiveTime xsi:type="IVL_TS">
<low xsi:type="TS" specializationType="TS.FULLDATE" value="20050706-0800"/>
</effectiveTime> |
|
| IVL.HIGH<TS.FULLDATE> Precise End Date |
not allowed | mandatory | not allowed | Error in spec: should be PQ.TIME and not TS.FULLDATE | Example: "End, September 15, 2003, Newfoundland time" would be specified as:<effectiveTime xsi:type="IVL_TS">
<high xsi:type="TS" specializationType="TS.FULLDATE" value="20030915-0430"/>
</effectiveTime> |
| IVL.WIDTH<TS.FULLDATE> Duration |
not allowed | not allowed | mandatory | At least one of low/high music be non-null | Example: "23 days" would be specified as:<effectiveTime xsi:type="IVL_TS">
<width xsi:type="PQ" specializationType="PQ.TIME" value="23" unit="d"/>
</effectiveTime> |
| IVL<PQ.x> Quantity Range |
populated | populated | not allowed | At least one of low/high music be non-null | Example: Take if temperature goes "above 103 Fahrenheit" would be specified as:
<value xsi:type="IVL_PQ">
<low xsi:type="PQ" specializationType="PQ.BASIC" value="40" unit="[degC]"/>
<high xsi:type="PQ" nullFlavor="PINF"/>
</value> |
Note: The low-closed, center, and high-closed attributes are all not allowed
