@icure/cardinal-sdk 2.12.1 → 2.13.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.
@@ -235,6 +235,11 @@ initMetadataForClass(BufferedChannelIterator, 'BufferedChannelIterator', VOID, V
235
235
  initMetadataForCoroutine($sendCOROUTINE$, CoroutineImpl);
236
236
  initMetadataForCoroutine($receiveCOROUTINE$, CoroutineImpl);
237
237
  initMetadataForCoroutine($receiveCatchingCOROUTINE$, CoroutineImpl);
238
+ function close$default(cause, $super) {
239
+ cause = cause === VOID ? null : cause;
240
+ return $super === VOID ? this.s1d(cause) : $super.s1d.call(this, cause);
241
+ }
242
+ initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
238
243
  function cancel$default_0(cause, $super) {
239
244
  cause = cause === VOID ? null : cause;
240
245
  var tmp;
@@ -247,12 +252,7 @@ function cancel$default_0(cause, $super) {
247
252
  return tmp;
248
253
  }
249
254
  initMetadataForInterface(ReceiveChannel, 'ReceiveChannel', VOID, VOID, VOID, [0]);
250
- function close$default(cause, $super) {
251
- cause = cause === VOID ? null : cause;
252
- return $super === VOID ? this.s1d(cause) : $super.s1d.call(this, cause);
253
- }
254
- initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
255
- initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [ReceiveChannel, SendChannel], [1, 4, 0, 3]);
255
+ initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [SendChannel, ReceiveChannel], [1, 4, 0, 3]);
256
256
  initMetadataForClass(WaiterEB, 'WaiterEB');
257
257
  initMetadataForClass(ReceiveCatching, 'ReceiveCatching', VOID, VOID, [Waiter]);
258
258
  initMetadataForObject(Factory, 'Factory');
@@ -262,7 +262,7 @@ initMetadataForCompanion(Companion);
262
262
  initMetadataForClass(ChannelResult, 'ChannelResult');
263
263
  initMetadataForClass(ClosedReceiveChannelException, 'ClosedReceiveChannelException', VOID, NoSuchElementException);
264
264
  initMetadataForClass(ClosedSendChannelException, 'ClosedSendChannelException', VOID, IllegalStateException);
265
- initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [ReceiveChannel, SendChannel], [1, 0]);
265
+ initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [SendChannel, ReceiveChannel], [1, 0]);
266
266
  initMetadataForClass(ConflatedBufferedChannel, 'ConflatedBufferedChannel', VOID, BufferedChannel, VOID, [1, 0]);
267
267
  initMetadataForInterface(ProducerScope, 'ProducerScope', VOID, VOID, [CoroutineScope, SendChannel], [1]);
268
268
  initMetadataForClass(ProducerCoroutine, 'ProducerCoroutine', VOID, ChannelCoroutine, [ProducerScope], [1, 0]);
@@ -35,7 +35,7 @@ export declare class CryptoActorStub implements Versionable<string>, CryptoActor
35
35
  parentId: string | undefined;
36
36
  cryptoActorProperties: Array<DecryptedPropertyStub> | undefined;
37
37
  readonly $ktClass: 'com.icure.cardinal.sdk.model.CryptoActorStub';
38
- constructor(partial: Partial<CryptoActorStub> & Pick<CryptoActorStub, "rev" | "publicKeysForOaepWithSha256">);
38
+ constructor(partial: Partial<CryptoActorStub> & Pick<CryptoActorStub, "rev">);
39
39
  toJSON(): object;
40
40
  static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): CryptoActorStub;
41
41
  }
@@ -16,6 +16,7 @@ export class CryptoActorStub {
16
16
  this.transferKeys = {};
17
17
  this.privateKeyShamirPartitions = {};
18
18
  this.publicKey = undefined;
19
+ this.publicKeysForOaepWithSha256 = [];
19
20
  this.parentId = undefined;
20
21
  this.cryptoActorProperties = undefined;
21
22
  this.$ktClass = 'com.icure.cardinal.sdk.model.CryptoActorStub';
@@ -31,7 +32,8 @@ export class CryptoActorStub {
31
32
  this.privateKeyShamirPartitions = partial.privateKeyShamirPartitions;
32
33
  if ('publicKey' in partial)
33
34
  this.publicKey = partial.publicKey;
34
- this.publicKeysForOaepWithSha256 = partial.publicKeysForOaepWithSha256;
35
+ if ('publicKeysForOaepWithSha256' in partial && partial.publicKeysForOaepWithSha256 !== undefined)
36
+ this.publicKeysForOaepWithSha256 = partial.publicKeysForOaepWithSha256;
35
37
  if ('parentId' in partial)
36
38
  this.parentId = partial.parentId;
37
39
  if ('cryptoActorProperties' in partial)
@@ -69,7 +71,7 @@ export class CryptoActorStub {
69
71
  transferKeys: expectMap(extractEntry(jCpy, 'transferKeys', false, path), false, [...path, ".transferKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectMap(v0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectString(v1, false, p1))),
70
72
  privateKeyShamirPartitions: expectMap(extractEntry(jCpy, 'privateKeyShamirPartitions', false, path), false, [...path, ".privateKeyShamirPartitions"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
71
73
  publicKey: expectString(extractEntry(jCpy, 'publicKey', false, path), true, [...path, ".publicKey"]),
72
- publicKeysForOaepWithSha256: expectArray(extractEntry(jCpy, 'publicKeysForOaepWithSha256', true, path), false, [...path, ".publicKeysForOaepWithSha256"], (x0, p0) => expectString(x0, false, p0)),
74
+ publicKeysForOaepWithSha256: expectArray(extractEntry(jCpy, 'publicKeysForOaepWithSha256', false, path), false, [...path, ".publicKeysForOaepWithSha256"], (x0, p0) => expectString(x0, false, p0)),
73
75
  parentId: expectString(extractEntry(jCpy, 'parentId', false, path), true, [...path, ".parentId"]),
74
76
  cryptoActorProperties: expectArray(extractEntry(jCpy, 'cryptoActorProperties', false, path), true, [...path, ".cryptoActorProperties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
75
77
  });
@@ -85,10 +85,6 @@ export interface Document extends StoredDocument, ICureDocument<string>, HasMedi
85
85
  * Extra Uniform Type Identifiers for the main attachment.
86
86
  */
87
87
  mainAttachmentStoredDataSize: number | undefined;
88
- /**
89
- *
90
- * Extra Uniform Type Identifiers for the main attachment.
91
- */
92
88
  extraMainAttachmentInfo: Document.ExtraMainAttachmentInfo | undefined;
93
89
  /**
94
90
  *
@@ -223,10 +219,6 @@ export declare class DecryptedDocument {
223
219
  * Extra Uniform Type Identifiers for the main attachment.
224
220
  */
225
221
  mainAttachmentStoredDataSize: number | undefined;
226
- /**
227
- *
228
- * Extra Uniform Type Identifiers for the main attachment.
229
- */
230
222
  extraMainAttachmentInfo: Document_.ExtraMainAttachmentInfo | undefined;
231
223
  /**
232
224
  *
@@ -399,10 +391,6 @@ export declare class EncryptedDocument {
399
391
  * Extra Uniform Type Identifiers for the main attachment.
400
392
  */
401
393
  mainAttachmentStoredDataSize: number | undefined;
402
- /**
403
- *
404
- * Extra Uniform Type Identifiers for the main attachment.
405
- */
406
394
  extraMainAttachmentInfo: Document_.ExtraMainAttachmentInfo | undefined;
407
395
  /**
408
396
  *
@@ -124,10 +124,6 @@ export class DecryptedDocument {
124
124
  * Extra Uniform Type Identifiers for the main attachment.
125
125
  */
126
126
  this.mainAttachmentStoredDataSize = undefined;
127
- /**
128
- *
129
- * Extra Uniform Type Identifiers for the main attachment.
130
- */
131
127
  this.extraMainAttachmentInfo = undefined;
132
128
  /**
133
129
  *
@@ -453,10 +449,6 @@ export class EncryptedDocument {
453
449
  * Extra Uniform Type Identifiers for the main attachment.
454
450
  */
455
451
  this.mainAttachmentStoredDataSize = undefined;
456
- /**
457
- *
458
- * Extra Uniform Type Identifiers for the main attachment.
459
- */
460
452
  this.extraMainAttachmentInfo = undefined;
461
453
  /**
462
454
  *
@@ -10,6 +10,8 @@ import { CareTeamMember, DecryptedCareTeamMember, EncryptedCareTeamMember } from
10
10
  import { Delegation } from './embed/Delegation.mjs';
11
11
  import { Encryptable } from './embed/Encryptable.mjs';
12
12
  import { DecryptedEpisode, EncryptedEpisode, Episode } from './embed/Episode.mjs';
13
+ import { HealthElementAsserter } from './embed/HealthElementAsserter.mjs';
14
+ import { HealthElementQualifiedLink } from './embed/HealthElementQualifiedLink.mjs';
13
15
  import { Laterality } from './embed/Laterality.mjs';
14
16
  import { DecryptedPlanOfAction, EncryptedPlanOfAction, PlanOfAction } from './embed/PlanOfAction.mjs';
15
17
  import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
@@ -106,6 +108,18 @@ export interface HealthElement extends StoredDocument, ICureDocument<string>, Ha
106
108
  * List of care team members assigned for the healthcare element.
107
109
  */
108
110
  careTeam: Array<CareTeamMember>;
111
+ /**
112
+ *
113
+ * Directed links towards related healthcare elements. Links should be created in a single
114
+ * direction: the reverse link can be found through a view. This field is not encrypted.
115
+ */
116
+ qualifiedLinks: Array<HealthElementQualifiedLink>;
117
+ /**
118
+ *
119
+ * The parties asserting that the patient has this healthcare element, i.e. on whose word the
120
+ * healthcare element is held to be true. This field is encrypted.
121
+ */
122
+ asserters: Array<HealthElementAsserter>;
109
123
  readonly isEncrypted: boolean;
110
124
  toJSON(): object;
111
125
  }
@@ -252,6 +266,18 @@ export declare class DecryptedHealthElement {
252
266
  * List of care team members assigned for the healthcare element.
253
267
  */
254
268
  careTeam: Array<DecryptedCareTeamMember>;
269
+ /**
270
+ *
271
+ * Directed links towards related healthcare elements. Links should be created in a single
272
+ * direction: the reverse link can be found through a view. This field is not encrypted.
273
+ */
274
+ qualifiedLinks: Array<HealthElementQualifiedLink>;
275
+ /**
276
+ *
277
+ * The parties asserting that the patient has this healthcare element, i.e. on whose word the
278
+ * healthcare element is held to be true. This field is encrypted.
279
+ */
280
+ asserters: Array<HealthElementAsserter>;
255
281
  /**
256
282
  *
257
283
  * The secret patient key, encrypted in the patient's own AES key.
@@ -436,6 +462,18 @@ export declare class EncryptedHealthElement {
436
462
  * List of care team members assigned for the healthcare element.
437
463
  */
438
464
  careTeam: Array<EncryptedCareTeamMember>;
465
+ /**
466
+ *
467
+ * Directed links towards related healthcare elements. Links should be created in a single
468
+ * direction: the reverse link can be found through a view. This field is not encrypted.
469
+ */
470
+ qualifiedLinks: Array<HealthElementQualifiedLink>;
471
+ /**
472
+ *
473
+ * The parties asserting that the patient has this healthcare element, i.e. on whose word the
474
+ * healthcare element is held to be true. This field is encrypted.
475
+ */
476
+ asserters: Array<HealthElementAsserter>;
439
477
  /**
440
478
  *
441
479
  * The secret patient key, encrypted in the patient's own AES key.
@@ -7,6 +7,8 @@ import { DecryptedAnnotation, EncryptedAnnotation } from './embed/Annotation.mjs
7
7
  import { DecryptedCareTeamMember, EncryptedCareTeamMember } from './embed/CareTeamMember.mjs';
8
8
  import { Delegation } from './embed/Delegation.mjs';
9
9
  import { DecryptedEpisode, EncryptedEpisode } from './embed/Episode.mjs';
10
+ import { HealthElementAsserter } from './embed/HealthElementAsserter.mjs';
11
+ import { HealthElementQualifiedLink } from './embed/HealthElementQualifiedLink.mjs';
10
12
  import { Laterality } from './embed/Laterality.mjs';
11
13
  import { DecryptedPlanOfAction, EncryptedPlanOfAction } from './embed/PlanOfAction.mjs';
12
14
  import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
@@ -150,6 +152,18 @@ export class DecryptedHealthElement {
150
152
  * List of care team members assigned for the healthcare element.
151
153
  */
152
154
  this.careTeam = [];
155
+ /**
156
+ *
157
+ * Directed links towards related healthcare elements. Links should be created in a single
158
+ * direction: the reverse link can be found through a view. This field is not encrypted.
159
+ */
160
+ this.qualifiedLinks = [];
161
+ /**
162
+ *
163
+ * The parties asserting that the patient has this healthcare element, i.e. on whose word the
164
+ * healthcare element is held to be true. This field is encrypted.
165
+ */
166
+ this.asserters = [];
153
167
  /**
154
168
  *
155
169
  * The secret patient key, encrypted in the patient's own AES key.
@@ -234,6 +248,10 @@ export class DecryptedHealthElement {
234
248
  this.episodes = partial.episodes;
235
249
  if ('careTeam' in partial && partial.careTeam !== undefined)
236
250
  this.careTeam = partial.careTeam;
251
+ if ('qualifiedLinks' in partial && partial.qualifiedLinks !== undefined)
252
+ this.qualifiedLinks = partial.qualifiedLinks;
253
+ if ('asserters' in partial && partial.asserters !== undefined)
254
+ this.asserters = partial.asserters;
237
255
  if ('secretForeignKeys' in partial && partial.secretForeignKeys !== undefined)
238
256
  this.secretForeignKeys = partial.secretForeignKeys;
239
257
  if ('cryptedForeignKeys' in partial && partial.cryptedForeignKeys !== undefined)
@@ -292,6 +310,8 @@ export class DecryptedHealthElement {
292
310
  res['plansOfAction'] = this.plansOfAction.map((x0) => x0.toJSON());
293
311
  res['episodes'] = this.episodes.map((x0) => x0.toJSON());
294
312
  res['careTeam'] = this.careTeam.map((x0) => x0.toJSON());
313
+ res['qualifiedLinks'] = this.qualifiedLinks.map((x0) => x0.toJSON());
314
+ res['asserters'] = this.asserters.map((x0) => x0.toJSON());
295
315
  res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
296
316
  res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
297
317
  res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
@@ -336,6 +356,8 @@ export class DecryptedHealthElement {
336
356
  plansOfAction: expectArray(extractEntry(jCpy, 'plansOfAction', false, path), false, [...path, ".plansOfAction"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPlanOfAction.fromJSON)),
337
357
  episodes: expectArray(extractEntry(jCpy, 'episodes', false, path), false, [...path, ".episodes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedEpisode.fromJSON)),
338
358
  careTeam: expectArray(extractEntry(jCpy, 'careTeam', false, path), false, [...path, ".careTeam"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedCareTeamMember.fromJSON)),
359
+ qualifiedLinks: expectArray(extractEntry(jCpy, 'qualifiedLinks', false, path), false, [...path, ".qualifiedLinks"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, HealthElementQualifiedLink.fromJSON)),
360
+ asserters: expectArray(extractEntry(jCpy, 'asserters', false, path), false, [...path, ".asserters"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, HealthElementAsserter.fromJSON)),
339
361
  secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
340
362
  cryptedForeignKeys: expectMap(extractEntry(jCpy, 'cryptedForeignKeys', false, path), false, [...path, ".cryptedForeignKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
341
363
  delegations: expectMap(extractEntry(jCpy, 'delegations', false, path), false, [...path, ".delegations"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
@@ -491,6 +513,18 @@ export class EncryptedHealthElement {
491
513
  * List of care team members assigned for the healthcare element.
492
514
  */
493
515
  this.careTeam = [];
516
+ /**
517
+ *
518
+ * Directed links towards related healthcare elements. Links should be created in a single
519
+ * direction: the reverse link can be found through a view. This field is not encrypted.
520
+ */
521
+ this.qualifiedLinks = [];
522
+ /**
523
+ *
524
+ * The parties asserting that the patient has this healthcare element, i.e. on whose word the
525
+ * healthcare element is held to be true. This field is encrypted.
526
+ */
527
+ this.asserters = [];
494
528
  /**
495
529
  *
496
530
  * The secret patient key, encrypted in the patient's own AES key.
@@ -575,6 +609,10 @@ export class EncryptedHealthElement {
575
609
  this.episodes = partial.episodes;
576
610
  if ('careTeam' in partial && partial.careTeam !== undefined)
577
611
  this.careTeam = partial.careTeam;
612
+ if ('qualifiedLinks' in partial && partial.qualifiedLinks !== undefined)
613
+ this.qualifiedLinks = partial.qualifiedLinks;
614
+ if ('asserters' in partial && partial.asserters !== undefined)
615
+ this.asserters = partial.asserters;
578
616
  if ('secretForeignKeys' in partial && partial.secretForeignKeys !== undefined)
579
617
  this.secretForeignKeys = partial.secretForeignKeys;
580
618
  if ('cryptedForeignKeys' in partial && partial.cryptedForeignKeys !== undefined)
@@ -633,6 +671,8 @@ export class EncryptedHealthElement {
633
671
  res['plansOfAction'] = this.plansOfAction.map((x0) => x0.toJSON());
634
672
  res['episodes'] = this.episodes.map((x0) => x0.toJSON());
635
673
  res['careTeam'] = this.careTeam.map((x0) => x0.toJSON());
674
+ res['qualifiedLinks'] = this.qualifiedLinks.map((x0) => x0.toJSON());
675
+ res['asserters'] = this.asserters.map((x0) => x0.toJSON());
636
676
  res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
637
677
  res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
638
678
  res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
@@ -677,6 +717,8 @@ export class EncryptedHealthElement {
677
717
  plansOfAction: expectArray(extractEntry(jCpy, 'plansOfAction', false, path), false, [...path, ".plansOfAction"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedPlanOfAction.fromJSON)),
678
718
  episodes: expectArray(extractEntry(jCpy, 'episodes', false, path), false, [...path, ".episodes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedEpisode.fromJSON)),
679
719
  careTeam: expectArray(extractEntry(jCpy, 'careTeam', false, path), false, [...path, ".careTeam"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedCareTeamMember.fromJSON)),
720
+ qualifiedLinks: expectArray(extractEntry(jCpy, 'qualifiedLinks', false, path), false, [...path, ".qualifiedLinks"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, HealthElementQualifiedLink.fromJSON)),
721
+ asserters: expectArray(extractEntry(jCpy, 'asserters', false, path), false, [...path, ".asserters"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, HealthElementAsserter.fromJSON)),
680
722
  secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
681
723
  cryptedForeignKeys: expectMap(extractEntry(jCpy, 'cryptedForeignKeys', false, path), false, [...path, ".cryptedForeignKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
682
724
  delegations: expectMap(extractEntry(jCpy, 'delegations', false, path), false, [...path, ".delegations"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
@@ -7,11 +7,11 @@ export var CryptoActor;
7
7
  (function (CryptoActor) {
8
8
  function fromJSON(json, ignoreUnknownKeys = false, path = ['CryptoActor']) {
9
9
  switch (json.$ktClass) {
10
- case 'com.icure.cardinal.sdk.model.CryptoActorStub': return CryptoActorStub.fromJSON(json, ignoreUnknownKeys);
10
+ case 'com.icure.cardinal.sdk.model.HealthcareParty': return HealthcareParty.fromJSON(json, ignoreUnknownKeys);
11
+ case 'com.icure.cardinal.sdk.model.Device': return Device.fromJSON(json, ignoreUnknownKeys);
11
12
  case 'com.icure.cardinal.sdk.model.EncryptedPatient': return EncryptedPatient.fromJSON(json, ignoreUnknownKeys);
12
13
  case 'com.icure.cardinal.sdk.model.DecryptedPatient': return DecryptedPatient.fromJSON(json, ignoreUnknownKeys);
13
- case 'com.icure.cardinal.sdk.model.Device': return Device.fromJSON(json, ignoreUnknownKeys);
14
- case 'com.icure.cardinal.sdk.model.HealthcareParty': return HealthcareParty.fromJSON(json, ignoreUnknownKeys);
14
+ case 'com.icure.cardinal.sdk.model.CryptoActorStub': return CryptoActorStub.fromJSON(json, ignoreUnknownKeys);
15
15
  default: throw new Error('Unexpected discriminator for CryptoActor: ' + json.$ktClass);
16
16
  }
17
17
  }
@@ -0,0 +1,24 @@
1
+ /**
2
+ *
3
+ *
4
+ * The kind of entity a health element asserter's asserterId refers to.
5
+ *
6
+ * This is the *entity-kind* axis, not the role axis: it says what sort of record the id points at,
7
+ * not what part the
8
+ * party played in the assertion. Do not confuse it with ParticipantTypeDto.
9
+ *
10
+ * The entries deliberately mirror [PartnerTypeDto], which answers the same question for a
11
+ * partnership's partnerId. The
12
+ * two enums are kept separate on purpose: partnership vocabulary and asserter vocabulary are free
13
+ * to diverge, and
14
+ * neither should widen because the other did.
15
+ *
16
+ * Note that an organisation (hospital, practice, care home, ...) is not a distinct entry:
17
+ * organisations are stored as
18
+ * healthcare party records, so they use [healthcareParty].
19
+ */
20
+ export declare enum AsserterType {
21
+ Patient = "Patient",
22
+ HealthcareParty = "HealthcareParty",
23
+ RelatedPerson = "RelatedPerson"
24
+ }
@@ -0,0 +1,26 @@
1
+ // auto-generated file
2
+ /**
3
+ *
4
+ *
5
+ * The kind of entity a health element asserter's asserterId refers to.
6
+ *
7
+ * This is the *entity-kind* axis, not the role axis: it says what sort of record the id points at,
8
+ * not what part the
9
+ * party played in the assertion. Do not confuse it with ParticipantTypeDto.
10
+ *
11
+ * The entries deliberately mirror [PartnerTypeDto], which answers the same question for a
12
+ * partnership's partnerId. The
13
+ * two enums are kept separate on purpose: partnership vocabulary and asserter vocabulary are free
14
+ * to diverge, and
15
+ * neither should widen because the other did.
16
+ *
17
+ * Note that an organisation (hospital, practice, care home, ...) is not a distinct entry:
18
+ * organisations are stored as
19
+ * healthcare party records, so they use [healthcareParty].
20
+ */
21
+ export var AsserterType;
22
+ (function (AsserterType) {
23
+ AsserterType["Patient"] = "Patient";
24
+ AsserterType["HealthcareParty"] = "HealthcareParty";
25
+ AsserterType["RelatedPerson"] = "RelatedPerson";
26
+ })(AsserterType || (AsserterType = {}));
@@ -0,0 +1,49 @@
1
+ import { AsserterType } from './AsserterType.mjs';
2
+ /**
3
+ *
4
+ *
5
+ * The party asserting that the patient has the healthcare element this asserter is attached to.
6
+ *
7
+ * This is the FHIR-style *asserter* concept: it does not say who recorded or authored the
8
+ * healthcare element, it says
9
+ * on whose word the healthcare element is held to be true. A patient may self-report an allergy, a
10
+ * family member may
11
+ * report a condition on behalf of the patient, and a physician may assert a diagnosis: all three
12
+ * are asserters, and the
13
+ * same healthcare element may carry more than one of them.
14
+ *
15
+ * The two fields must agree: [asserterType] declares which kind of entity [asserterId] points at.
16
+ * [AsserterTypeDto]
17
+ * bounds the vocabulary, but nothing enforces the *pairing* - the field is encrypted, so the
18
+ * server never sees the
19
+ * values and cannot validate or repair them; that invariant is owned by the SDK.
20
+ *
21
+ * Note on organisations: an organisation (hospital, practice, care home, ...) is not a distinct
22
+ * asserter type.
23
+ * Organisations are stored as healthcare party records, distinguished from individual
24
+ * practitioners by tags set by the
25
+ * client, so an organisation asserter is an entry with `asserterType =
26
+ * AsserterTypeDto.healthcareParty` whose
27
+ * [asserterId] points to such a record. The association between a practitioner and the
28
+ * organisation they were acting
29
+ * for at the time of the assertion is deliberately NOT modelled here.
30
+ */
31
+ export declare class HealthElementAsserter {
32
+ /**
33
+ *
34
+ * The id of the entity making the assertion. Which entity it refers to is given by [asserterType].
35
+ *
36
+ */
37
+ asserterId: string;
38
+ /**
39
+ *
40
+ *
41
+ * The kind of entity [asserterId] refers to. This is the kind of entity, not the role the party
42
+ * played - do not
43
+ * confuse it with ParticipantTypeDto.
44
+ */
45
+ asserterType: AsserterType;
46
+ constructor(partial: Partial<HealthElementAsserter> & Pick<HealthElementAsserter, "asserterId" | "asserterType">);
47
+ toJSON(): object;
48
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): HealthElementAsserter;
49
+ }
@@ -0,0 +1,59 @@
1
+ // auto-generated file
2
+ import { expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { AsserterType } from './AsserterType.mjs';
4
+ /**
5
+ *
6
+ *
7
+ * The party asserting that the patient has the healthcare element this asserter is attached to.
8
+ *
9
+ * This is the FHIR-style *asserter* concept: it does not say who recorded or authored the
10
+ * healthcare element, it says
11
+ * on whose word the healthcare element is held to be true. A patient may self-report an allergy, a
12
+ * family member may
13
+ * report a condition on behalf of the patient, and a physician may assert a diagnosis: all three
14
+ * are asserters, and the
15
+ * same healthcare element may carry more than one of them.
16
+ *
17
+ * The two fields must agree: [asserterType] declares which kind of entity [asserterId] points at.
18
+ * [AsserterTypeDto]
19
+ * bounds the vocabulary, but nothing enforces the *pairing* - the field is encrypted, so the
20
+ * server never sees the
21
+ * values and cannot validate or repair them; that invariant is owned by the SDK.
22
+ *
23
+ * Note on organisations: an organisation (hospital, practice, care home, ...) is not a distinct
24
+ * asserter type.
25
+ * Organisations are stored as healthcare party records, distinguished from individual
26
+ * practitioners by tags set by the
27
+ * client, so an organisation asserter is an entry with `asserterType =
28
+ * AsserterTypeDto.healthcareParty` whose
29
+ * [asserterId] points to such a record. The association between a practitioner and the
30
+ * organisation they were acting
31
+ * for at the time of the assertion is deliberately NOT modelled here.
32
+ */
33
+ export class HealthElementAsserter {
34
+ constructor(partial) {
35
+ this.asserterId = partial.asserterId;
36
+ this.asserterType = partial.asserterType;
37
+ }
38
+ toJSON() {
39
+ const res = {};
40
+ res['asserterId'] = this.asserterId;
41
+ res['asserterType'] = this.asserterType;
42
+ return res;
43
+ }
44
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['HealthElementAsserter']) {
45
+ if (typeof json != 'object')
46
+ throw new Error(`Expected json object at path ${path.join("")}`);
47
+ const jCpy = Object.assign({}, json);
48
+ const res = new HealthElementAsserter({
49
+ asserterId: expectString(extractEntry(jCpy, 'asserterId', true, path), false, [...path, ".asserterId"]),
50
+ asserterType: expectStringEnum(extractEntry(jCpy, 'asserterType', true, path), false, [...path, ".asserterType"], AsserterType, 'AsserterType'),
51
+ });
52
+ if (!ignoreUnknownKeys) {
53
+ const unused = Object.keys(jCpy);
54
+ if (unused.length > 0)
55
+ throw new Error(`Unexpected key(s) for json object HealthElementAsserter at path ${path.join("")}: ${unused}`);
56
+ }
57
+ return res;
58
+ }
59
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ *
3
+ * A directed, qualified link from one healthcare element to another. Links should be created in a
4
+ * single direction:
5
+ * the reverse link can be found through a view.
6
+ * /
7
+ */
8
+ export declare class HealthElementQualifiedLink {
9
+ /**
10
+ *
11
+ * The qualification of the link. Free string; using the names of LinkQualification entries is
12
+ * encouraged but not enforced.
13
+ */
14
+ type: string;
15
+ /**
16
+ *
17
+ * A caller-chosen correlation id that groups related links across entities.
18
+ */
19
+ associationId: string | undefined;
20
+ /**
21
+ *
22
+ * The id of the linked healthcare element.
23
+ */
24
+ healthElementId: string;
25
+ constructor(partial: Partial<HealthElementQualifiedLink> & Pick<HealthElementQualifiedLink, "type" | "healthElementId">);
26
+ toJSON(): object;
27
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): HealthElementQualifiedLink;
28
+ }
@@ -0,0 +1,46 @@
1
+ // auto-generated file
2
+ import { expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ /**
4
+ *
5
+ * A directed, qualified link from one healthcare element to another. Links should be created in a
6
+ * single direction:
7
+ * the reverse link can be found through a view.
8
+ * /
9
+ */
10
+ export class HealthElementQualifiedLink {
11
+ constructor(partial) {
12
+ /**
13
+ *
14
+ * A caller-chosen correlation id that groups related links across entities.
15
+ */
16
+ this.associationId = undefined;
17
+ this.type = partial.type;
18
+ if ('associationId' in partial)
19
+ this.associationId = partial.associationId;
20
+ this.healthElementId = partial.healthElementId;
21
+ }
22
+ toJSON() {
23
+ const res = {};
24
+ res['type'] = this.type;
25
+ if (this.associationId != undefined)
26
+ res['associationId'] = this.associationId;
27
+ res['healthElementId'] = this.healthElementId;
28
+ return res;
29
+ }
30
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['HealthElementQualifiedLink']) {
31
+ if (typeof json != 'object')
32
+ throw new Error(`Expected json object at path ${path.join("")}`);
33
+ const jCpy = Object.assign({}, json);
34
+ const res = new HealthElementQualifiedLink({
35
+ type: expectString(extractEntry(jCpy, 'type', true, path), false, [...path, ".type"]),
36
+ associationId: expectString(extractEntry(jCpy, 'associationId', false, path), true, [...path, ".associationId"]),
37
+ healthElementId: expectString(extractEntry(jCpy, 'healthElementId', true, path), false, [...path, ".healthElementId"]),
38
+ });
39
+ if (!ignoreUnknownKeys) {
40
+ const unused = Object.keys(jCpy);
41
+ if (unused.length > 0)
42
+ throw new Error(`Unexpected key(s) for json object HealthElementQualifiedLink at path ${path.join("")}: ${unused}`);
43
+ }
44
+ return res;
45
+ }
46
+ }
@@ -17,4 +17,4 @@ import { TimePicker } from './TimePicker.mjs';
17
17
  * validation rules, and optional codification and tagging.
18
18
  * /
19
19
  */
20
- export type Field = DropdownField | RadioButton | DatePicker | TimePicker | DateTimePicker | NumberField | TextField | CheckBox | MultipleChoice | MeasureField;
20
+ export type Field = DropdownField | TimePicker | RadioButton | DatePicker | MeasureField | TextField | DateTimePicker | MultipleChoice | CheckBox | NumberField;
@@ -15,15 +15,15 @@ export var StructureElement;
15
15
  function fromJSON(json, ignoreUnknownKeys = false, path = ['StructureElement']) {
16
16
  switch (json.$ktClass) {
17
17
  case 'com.icure.cardinal.sdk.model.embed.form.template.DropdownField': return DropdownField.fromJSON(json, ignoreUnknownKeys);
18
+ case 'com.icure.cardinal.sdk.model.embed.form.template.TimePicker': return TimePicker.fromJSON(json, ignoreUnknownKeys);
18
19
  case 'com.icure.cardinal.sdk.model.embed.form.template.RadioButton': return RadioButton.fromJSON(json, ignoreUnknownKeys);
19
20
  case 'com.icure.cardinal.sdk.model.embed.form.template.DatePicker': return DatePicker.fromJSON(json, ignoreUnknownKeys);
20
- case 'com.icure.cardinal.sdk.model.embed.form.template.TimePicker': return TimePicker.fromJSON(json, ignoreUnknownKeys);
21
- case 'com.icure.cardinal.sdk.model.embed.form.template.DateTimePicker': return DateTimePicker.fromJSON(json, ignoreUnknownKeys);
22
- case 'com.icure.cardinal.sdk.model.embed.form.template.NumberField': return NumberField.fromJSON(json, ignoreUnknownKeys);
21
+ case 'com.icure.cardinal.sdk.model.embed.form.template.MeasureField': return MeasureField.fromJSON(json, ignoreUnknownKeys);
23
22
  case 'com.icure.cardinal.sdk.model.embed.form.template.TextField': return TextField.fromJSON(json, ignoreUnknownKeys);
24
- case 'com.icure.cardinal.sdk.model.embed.form.template.CheckBox': return CheckBox.fromJSON(json, ignoreUnknownKeys);
23
+ case 'com.icure.cardinal.sdk.model.embed.form.template.DateTimePicker': return DateTimePicker.fromJSON(json, ignoreUnknownKeys);
25
24
  case 'com.icure.cardinal.sdk.model.embed.form.template.MultipleChoice': return MultipleChoice.fromJSON(json, ignoreUnknownKeys);
26
- case 'com.icure.cardinal.sdk.model.embed.form.template.MeasureField': return MeasureField.fromJSON(json, ignoreUnknownKeys);
25
+ case 'com.icure.cardinal.sdk.model.embed.form.template.CheckBox': return CheckBox.fromJSON(json, ignoreUnknownKeys);
26
+ case 'com.icure.cardinal.sdk.model.embed.form.template.NumberField': return NumberField.fromJSON(json, ignoreUnknownKeys);
27
27
  case 'com.icure.cardinal.sdk.model.embed.form.template.FieldsGroup': return FieldsGroup.fromJSON(json, ignoreUnknownKeys);
28
28
  default: throw new Error('Unexpected discriminator for StructureElement: ' + json.$ktClass);
29
29
  }
@@ -9,7 +9,7 @@ import { OrPredicate } from './OrPredicate.mjs';
9
9
  * chain.
10
10
  * /
11
11
  */
12
- export type Predicate = NotPredicate | AndPredicate | AlwaysPredicate | OrPredicate | KeyValuePredicate;
12
+ export type Predicate = KeyValuePredicate | AlwaysPredicate | NotPredicate | AndPredicate | OrPredicate;
13
13
  export declare namespace Predicate {
14
14
  function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Predicate;
15
15
  }
@@ -8,11 +8,11 @@ export var Predicate;
8
8
  (function (Predicate) {
9
9
  function fromJSON(json, ignoreUnknownKeys = false, path = ['Predicate']) {
10
10
  switch (json.$ktClass) {
11
+ case 'com.icure.cardinal.sdk.model.filter.predicate.KeyValuePredicate': return KeyValuePredicate.fromJSON(json, ignoreUnknownKeys);
12
+ case 'com.icure.cardinal.sdk.model.filter.predicate.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
11
13
  case 'com.icure.cardinal.sdk.model.filter.predicate.NotPredicate': return NotPredicate.fromJSON(json, ignoreUnknownKeys);
12
14
  case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.fromJSON(json, ignoreUnknownKeys);
13
- case 'com.icure.cardinal.sdk.model.filter.predicate.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
14
15
  case 'com.icure.cardinal.sdk.model.filter.predicate.OrPredicate': return OrPredicate.fromJSON(json, ignoreUnknownKeys);
15
- case 'com.icure.cardinal.sdk.model.filter.predicate.KeyValuePredicate': return KeyValuePredicate.fromJSON(json, ignoreUnknownKeys);
16
16
  default: throw new Error('Unexpected discriminator for Predicate: ' + json.$ktClass);
17
17
  }
18
18
  }
package/model.d.mts CHANGED
@@ -78,6 +78,7 @@ export * from './model/embed/UserAccessLevel.mjs';
78
78
  export * from './model/embed/AdministrationQuantity.mjs';
79
79
  export * from './model/embed/SecurityMetadata.mjs';
80
80
  export * from './model/embed/EmbeddedTimeTableItem.mjs';
81
+ export * from './model/embed/HealthElementAsserter.mjs';
81
82
  export * from './model/embed/SuspensionReason.mjs';
82
83
  export * from './model/embed/Episode.mjs';
83
84
  export * from './model/embed/Telecom.mjs';
@@ -96,6 +97,7 @@ export * from './model/embed/MessageReadStatus.mjs';
96
97
  export * from './model/embed/SubContact.mjs';
97
98
  export * from './model/embed/DatabaseSynchronization.mjs';
98
99
  export * from './model/embed/TimeSeries.mjs';
100
+ export * from './model/embed/HealthElementQualifiedLink.mjs';
99
101
  export * from './model/embed/FrontEndMigrationStatus.mjs';
100
102
  export * from './model/embed/ValueWithPrecision.mjs';
101
103
  export * from './model/embed/MedicalHouseContract.mjs';
@@ -112,6 +114,7 @@ export * from './model/embed/PersonalStatus.mjs';
112
114
  export * from './model/embed/RegimenItem.mjs';
113
115
  export * from './model/embed/DocumentGroup.mjs';
114
116
  export * from './model/embed/ContactParticipant.mjs';
117
+ export * from './model/embed/AsserterType.mjs';
115
118
  export * from './model/embed/DataAttachment.mjs';
116
119
  export * from './model/embed/DeletedAttachment.mjs';
117
120
  export * from './model/embed/Weekday.mjs';