@@ -16,8 +16,7 @@ export type Code = string;
1616 * Represents an event concept. It allows either a date or a datetime, but not a mix of both. One of the start
1717 * properties is required, but the end properties are optional.
1818 */
19- export type Event = Event1 & Event2 ;
20- export type Event2 = Date | DateTime ;
19+ export type Event = Date | DateTime ;
2120/**
2221 * Represents a process tracking concept.
2322 */
@@ -84,40 +83,38 @@ export interface Coding {
8483 */
8584 code_system : string ;
8685}
87- export interface Event1 {
86+ /**
87+ * This schema is used when the event starts with a date (`start_date`), and optionally, an end date (`end_date`) can be
88+ * specified. Mixing a start date with a datetime is not allowed.
89+ */
90+ export interface Date {
8891 /**
8992 * The start date of the event in RFC 3339 format (e.g., `2024-12-01`).
9093 */
91- start_date ?: string ;
92- /**
93- * The start datetime of the event in RFC 3339 format (e.g., `2024-12-01T10:00:00.0000000Z`). Only UTC time is
94- * allowed.
95- */
96- start_datetime ?: string ;
94+ start_date : string ;
95+ start_datetime ?: never ;
9796 /**
9897 * The end date of the event in RFC 3339 format (e.g., `2024-12-01`). This is optional if `start_date` is used.
9998 */
10099 end_date ?: string ;
101- /**
102- * The end datetime of the event in RFC 3339 format (e.g., `2024-12-01T10:00:00.0000000Z`). Only UTC time is allowed.
103- * This is optional if `start_datetime` is used.
104- */
105- end_datetime ?: string ;
106- }
107- /**
108- * This schema is used when the event starts with a date (`start_date`), and optionally, an end date (`end_date`) can
109- * be specified. Mixing a start date with a datetime is not allowed.
110- */
111- export interface Date {
112- start_date : string ;
113- end_date ?: string ;
100+ end_datetime ?: never ;
114101}
115102/**
116103 * This schema is used when the event starts with a datetime (`start_datetime`), and optionally, an end datetime
117104 * (`end_datetime`) can be specified. Mixing a start datetime with a date is not allowed.
118105 */
119106export interface DateTime {
107+ start_date ?: never ;
108+ /**
109+ * The start datetime of the event in RFC 3339 format (e.g., `2024-12-01T10:00:00.0000000Z`). Only UTC time is
110+ * allowed.
111+ */
120112 start_datetime : string ;
113+ end_date ?: never ;
114+ /**
115+ * The end datetime of the event in RFC 3339 format (e.g., `2024-12-01T10:00:00.0000000Z`). Only UTC time is allowed.
116+ * This is optional if `start_datetime` is used.
117+ */
121118 end_datetime ?: string ;
122119}
123120/**
0 commit comments