@icure/cardinal-sdk 2.7.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../
2
2
  import { CalendarItemShareOptions } from '../crypto/entities/CalendarItemShareOptions.mjs';
3
3
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
4
4
  import { CalendarItem, DecryptedCalendarItem, EncryptedCalendarItem } from '../model/CalendarItem.mjs';
5
+ import { CalendarItemOccupancy } from '../model/CalendarItemOccupancy.mjs';
5
6
  import { EntityReferenceInGroup } from '../model/EntityReferenceInGroup.mjs';
6
7
  import { Patient } from '../model/Patient.mjs';
7
8
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
@@ -153,6 +154,41 @@ export interface CalendarItemApi {
153
154
  * @return a list of calendarItem ids
154
155
  */
155
156
  matchCalendarItemsBySorted(filter: SortableFilterOptions<CalendarItem>): Promise<Array<string>>;
157
+ /**
158
+ *
159
+ * Computes the concurrent-occupancy histogram of the calendar items for the current data owner over the
160
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
161
+ *
162
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the
163
+ * range is exactly [startDate]..[endDate], so items starting before [startDate] or ending after [endDate]
164
+ * are ignored. Pass [extensionInDays] to widen the range by that many days on each side, which lets items
165
+ * that start shortly before [startDate] (contributing to the occupancy baseline) or end shortly after
166
+ * [endDate] be taken into account. Items reaching beyond the extended range are still ignored.
167
+ */
168
+ getCalendarItemsOccupancyByPeriodForSelf(startDate: number, endDate: number, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
169
+ /**
170
+ *
171
+ * Computes the concurrent-occupancy histogram of the calendar items of [hcPartyId] over the
172
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
173
+ *
174
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the
175
+ * range is exactly [startDate]..[endDate], so items starting before [startDate] or ending after [endDate]
176
+ * are ignored. Pass [extensionInDays] to widen the range by that many days on each side, which lets items
177
+ * that start shortly before [startDate] (contributing to the occupancy baseline) or end shortly after
178
+ * [endDate] be taken into account. Items reaching beyond the extended range are still ignored.
179
+ */
180
+ getCalendarItemsOccupancyByPeriodForHealthcareParty(startDate: number, endDate: number, hcPartyId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
181
+ /**
182
+ *
183
+ * Computes the concurrent-occupancy histogram of the calendar items of the agenda [agendaId] over the
184
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
185
+ *
186
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the range
187
+ * is exactly [startDate]..[endDate], you can pass a non-null [extensionInDays] to widen it by that many days on each side (e.g.
188
+ * to include items that start before [startDate] but are still open during the period). Items reaching beyond
189
+ * the extended range are ignored.
190
+ */
191
+ getCalendarItemsOccupancyByPeriodAndAgendaId(startDate: number, endDate: number, agendaId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
156
192
  /**
157
193
  *
158
194
  * Deletes a calendarItem. If you don't have write access to the calendarItem the method will fail.
@@ -1,5 +1,6 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, FilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
2
  import { CalendarItem, EncryptedCalendarItem } from '../model/CalendarItem.mjs';
3
+ import { CalendarItemOccupancy } from '../model/CalendarItemOccupancy.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
4
5
  import { EntitySubscription } from '../subscription/EntitySubscription.mjs';
5
6
  import { EntitySubscriptionConfiguration } from '../subscription/EntitySubscriptionConfiguration.mjs';
@@ -57,6 +58,41 @@ export interface CalendarItemBasicApi {
57
58
  * @return an iterator that iterates over all calendarItems matching the provided filter.
58
59
  */
59
60
  filterCalendarItemsBySorted(filter: BaseSortableFilterOptions<CalendarItem>): Promise<PaginatedListIterator<EncryptedCalendarItem>>;
61
+ /**
62
+ *
63
+ * Computes the concurrent-occupancy histogram of the calendar items for the current data owner over the
64
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
65
+ *
66
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the
67
+ * range is exactly [startDate]..[endDate], so items starting before [startDate] or ending after [endDate]
68
+ * are ignored. Pass [extensionInDays] to widen the range by that many days on each side, which lets items
69
+ * that start shortly before [startDate] (contributing to the occupancy baseline) or end shortly after
70
+ * [endDate] be taken into account. Items reaching beyond the extended range are still ignored.
71
+ */
72
+ getCalendarItemsOccupancyByPeriodForSelf(startDate: number, endDate: number, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
73
+ /**
74
+ *
75
+ * Computes the concurrent-occupancy histogram of the calendar items of [hcPartyId] over the
76
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
77
+ *
78
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the
79
+ * range is exactly [startDate]..[endDate], so items starting before [startDate] or ending after [endDate]
80
+ * are ignored. Pass [extensionInDays] to widen the range by that many days on each side, which lets items
81
+ * that start shortly before [startDate] (contributing to the occupancy baseline) or end shortly after
82
+ * [endDate] be taken into account. Items reaching beyond the extended range are still ignored.
83
+ */
84
+ getCalendarItemsOccupancyByPeriodForHealthcareParty(startDate: number, endDate: number, hcPartyId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
85
+ /**
86
+ *
87
+ * Computes the concurrent-occupancy histogram of the calendar items of the agenda [agendaId] over the
88
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
89
+ *
90
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the range
91
+ * is exactly [startDate]..[endDate], you can pass a non-null [extensionInDays] to widen it by that many days on each side (e.g.
92
+ * to include items that start before [startDate] but are still open during the period). Items reaching beyond
93
+ * the extended range are ignored.
94
+ */
95
+ getCalendarItemsOccupancyByPeriodAndAgendaId(startDate: number, endDate: number, agendaId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
60
96
  /**
61
97
  *
62
98
  * Deletes a calendarItem. If you don't have write access to the calendarItem the method will fail.
@@ -1,5 +1,6 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
2
  import { CalendarItem, EncryptedCalendarItem } from '../model/CalendarItem.mjs';
3
+ import { CalendarItemOccupancy } from '../model/CalendarItemOccupancy.mjs';
3
4
  import { GroupScoped } from '../model/GroupScoped.mjs';
4
5
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
5
6
  export interface CalendarItemBasicInGroupApi {
@@ -23,6 +24,21 @@ export interface CalendarItemBasicInGroupApi {
23
24
  * In-group version of [CalendarItemBasicApi.filterCalendarItemsBySorted]
24
25
  */
25
26
  filterCalendarItemsBySorted(groupId: string, filter: BaseSortableFilterOptions<CalendarItem>): Promise<PaginatedListIterator<GroupScoped<EncryptedCalendarItem>>>;
27
+ /**
28
+ *
29
+ * In-group version of [getCalendarItemsOccupancyByPeriodForSelf].
30
+ */
31
+ getCalendarItemsOccupancyByPeriodForSelf(groupId: string, startDate: number, endDate: number, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
32
+ /**
33
+ *
34
+ * In-group version of [getCalendarItemsOccupancyByPeriodForHealthcareParty].
35
+ */
36
+ getCalendarItemsOccupancyByPeriodForHealthcareParty(groupId: string, startDate: number, endDate: number, hcPartyId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
37
+ /**
38
+ *
39
+ * In-group version of [getCalendarItemsOccupancyByPeriodAndAgendaId].
40
+ */
41
+ getCalendarItemsOccupancyByPeriodAndAgendaId(groupId: string, startDate: number, endDate: number, agendaId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
26
42
  /**
27
43
  *
28
44
  * In-group version of [CalendarItemBasicFlavourlessApi.deleteCalendarItemById]
@@ -2,6 +2,7 @@ import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../
2
2
  import { CalendarItemShareOptions } from '../crypto/entities/CalendarItemShareOptions.mjs';
3
3
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
4
4
  import { CalendarItem, DecryptedCalendarItem, EncryptedCalendarItem } from '../model/CalendarItem.mjs';
5
+ import { CalendarItemOccupancy } from '../model/CalendarItemOccupancy.mjs';
5
6
  import { EntityReferenceInGroup } from '../model/EntityReferenceInGroup.mjs';
6
7
  import { GroupScoped } from '../model/GroupScoped.mjs';
7
8
  import { Patient } from '../model/Patient.mjs';
@@ -72,6 +73,21 @@ export interface CalendarItemInGroupApi {
72
73
  * In-group version of [CalendarItemApi.matchCalendarItemsBySorted]
73
74
  */
74
75
  matchCalendarItemsBySorted(groupId: string, filter: SortableFilterOptions<CalendarItem>): Promise<Array<string>>;
76
+ /**
77
+ *
78
+ * In-group version of [CalendarItemApi.getCalendarItemsOccupancyByPeriodForSelf].
79
+ */
80
+ getCalendarItemsOccupancyByPeriodForSelf(groupId: string, startDate: number, endDate: number, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
81
+ /**
82
+ *
83
+ * In-group version of [CalendarItemApi.getCalendarItemsOccupancyByPeriodForHealthcareParty].
84
+ */
85
+ getCalendarItemsOccupancyByPeriodForHealthcareParty(groupId: string, startDate: number, endDate: number, hcPartyId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
86
+ /**
87
+ *
88
+ * In-group version of [CalendarItemApi.getCalendarItemsOccupancyByPeriodAndAgendaId].
89
+ */
90
+ getCalendarItemsOccupancyByPeriodAndAgendaId(groupId: string, startDate: number, endDate: number, agendaId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
75
91
  /**
76
92
  *
77
93
  * In-group version of [CalendarItemBasicFlavourlessApi.deleteCalendarItemById]