@icure/cardinal-sdk 2.8.1 → 2.10.0

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.
@@ -1,5 +1,7 @@
1
1
  import { CodeStub } from '../base/CodeStub.mjs';
2
2
  import { Identifiable } from '../base/Identifiable.mjs';
3
+ import { Base64String } from '../specializations/Base64String.mjs';
4
+ import { Encryptable } from './Encryptable.mjs';
3
5
  /**
4
6
  *
5
7
  * Text node with attribution that can be attached to a medical record. Used by healthcare parties
@@ -7,7 +9,127 @@ import { Identifiable } from '../base/Identifiable.mjs';
7
9
  * for example to flag a faulty thermometer after taking a temperature.
8
10
  * /
9
11
  */
10
- export declare class Annotation implements Identifiable<string> {
12
+ export interface Annotation extends Identifiable<string>, Encryptable {
13
+ /**
14
+ *
15
+ * The identifier of the author of this annotation.
16
+ */
17
+ author: string | undefined;
18
+ /**
19
+ *
20
+ * The timestamp (unix epoch in ms) of creation of this note, filled automatically if missing.
21
+ */
22
+ created: number | undefined;
23
+ /**
24
+ *
25
+ * The timestamp (unix epoch in ms) of the latest modification of this note, filled automatically
26
+ * if missing.
27
+ */
28
+ modified: number | undefined;
29
+ /**
30
+ *
31
+ * Text contained in the note, written as markdown. Deprecated in favor of [markdown].
32
+ */
33
+ text: string | undefined;
34
+ /**
35
+ *
36
+ * Localized text contained in the note, written as markdown. Keys should respect ISO 639-1.
37
+ */
38
+ markdown: {
39
+ [key: string]: string;
40
+ };
41
+ /**
42
+ *
43
+ * Defines to which part of the corresponding information the note is related to.
44
+ */
45
+ location: string | undefined;
46
+ /**
47
+ *
48
+ * Whether this annotation is confidential.
49
+ */
50
+ confidential: boolean | undefined;
51
+ /**
52
+ *
53
+ * Tags associated with this annotation.
54
+ */
55
+ tags: Array<CodeStub>;
56
+ readonly isEncrypted: boolean;
57
+ toJSON(): object;
58
+ }
59
+ /**
60
+ *
61
+ * Text node with attribution that can be attached to a medical record. Used by healthcare parties
62
+ * to add side notes,
63
+ * for example to flag a faulty thermometer after taking a temperature.
64
+ * /
65
+ */
66
+ export declare class DecryptedAnnotation {
67
+ /**
68
+ *
69
+ * The Id of the Annotation. We encourage using either a v4 UUID or a HL7 Id.
70
+ */
71
+ id: string;
72
+ /**
73
+ *
74
+ * The identifier of the author of this annotation.
75
+ */
76
+ author: string | undefined;
77
+ /**
78
+ *
79
+ * The timestamp (unix epoch in ms) of creation of this note, filled automatically if missing.
80
+ */
81
+ created: number | undefined;
82
+ /**
83
+ *
84
+ * The timestamp (unix epoch in ms) of the latest modification of this note, filled automatically
85
+ * if missing.
86
+ */
87
+ modified: number | undefined;
88
+ /**
89
+ *
90
+ * Text contained in the note, written as markdown. Deprecated in favor of [markdown].
91
+ */
92
+ text: string | undefined;
93
+ /**
94
+ *
95
+ * Localized text contained in the note, written as markdown. Keys should respect ISO 639-1.
96
+ */
97
+ markdown: {
98
+ [key: string]: string;
99
+ };
100
+ /**
101
+ *
102
+ * Defines to which part of the corresponding information the note is related to.
103
+ */
104
+ location: string | undefined;
105
+ /**
106
+ *
107
+ * Whether this annotation is confidential.
108
+ */
109
+ confidential: boolean | undefined;
110
+ /**
111
+ *
112
+ * Tags associated with this annotation.
113
+ */
114
+ tags: Array<CodeStub>;
115
+ /**
116
+ *
117
+ * The encrypted content of this annotation.
118
+ */
119
+ encryptedSelf: Base64String | undefined;
120
+ readonly isEncrypted: false;
121
+ constructor(partial: Partial<DecryptedAnnotation>);
122
+ toJSON(): object;
123
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedAnnotation;
124
+ }
125
+ /**
126
+ *
127
+ * Text node with attribution that can be attached to a medical record. Used by healthcare parties
128
+ * to add side notes,
129
+ * for example to flag a faulty thermometer after taking a temperature.
130
+ * /
131
+ */
132
+ export declare class EncryptedAnnotation {
11
133
  /**
12
134
  *
13
135
  * The Id of the Annotation. We encourage using either a v4 UUID or a HL7 Id.
@@ -60,8 +182,9 @@ export declare class Annotation implements Identifiable<string> {
60
182
  *
61
183
  * The encrypted content of this annotation.
62
184
  */
63
- encryptedSelf: string | undefined;
64
- constructor(partial: Partial<Annotation>);
185
+ encryptedSelf: Base64String | undefined;
186
+ readonly isEncrypted: true;
187
+ constructor(partial: Partial<EncryptedAnnotation>);
65
188
  toJSON(): object;
66
- static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Annotation;
189
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedAnnotation;
67
190
  }
@@ -9,7 +9,7 @@ import { CodeStub } from '../base/CodeStub.mjs';
9
9
  * for example to flag a faulty thermometer after taking a temperature.
10
10
  * /
11
11
  */
12
- export class Annotation {
12
+ export class DecryptedAnnotation {
13
13
  constructor(partial) {
14
14
  var _a;
15
15
  /**
@@ -58,6 +58,9 @@ export class Annotation {
58
58
  * The encrypted content of this annotation.
59
59
  */
60
60
  this.encryptedSelf = undefined;
61
+ this.isEncrypted = false;
62
+ if (partial.isEncrypted !== undefined && partial.isEncrypted !== false)
63
+ throw new Error('partial.isEncrypted must be undefined or false');
61
64
  this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
62
65
  if ('author' in partial)
63
66
  this.author = partial.author;
@@ -97,13 +100,16 @@ export class Annotation {
97
100
  res['tags'] = this.tags.map((x0) => x0.toJSON());
98
101
  if (this.encryptedSelf != undefined)
99
102
  res['encryptedSelf'] = this.encryptedSelf;
103
+ res['isEncrypted'] = false;
100
104
  return res;
101
105
  }
102
- static fromJSON(json, ignoreUnknownKeys = false, path = ['Annotation']) {
106
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedAnnotation']) {
103
107
  if (typeof json != 'object')
104
108
  throw new Error(`Expected json object at path ${path.join("")}`);
105
109
  const jCpy = Object.assign({}, json);
106
- const res = new Annotation({
110
+ if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
111
+ throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedAnnotation`);
112
+ const res = new DecryptedAnnotation({
107
113
  id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
108
114
  author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
109
115
  created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
@@ -118,7 +124,134 @@ export class Annotation {
118
124
  if (!ignoreUnknownKeys) {
119
125
  const unused = Object.keys(jCpy);
120
126
  if (unused.length > 0)
121
- throw new Error(`Unexpected key(s) for json object Annotation at path ${path.join("")}: ${unused}`);
127
+ throw new Error(`Unexpected key(s) for json object DecryptedAnnotation at path ${path.join("")}: ${unused}`);
128
+ }
129
+ return res;
130
+ }
131
+ }
132
+ /**
133
+ *
134
+ * Text node with attribution that can be attached to a medical record. Used by healthcare parties
135
+ * to add side notes,
136
+ * for example to flag a faulty thermometer after taking a temperature.
137
+ * /
138
+ */
139
+ export class EncryptedAnnotation {
140
+ constructor(partial) {
141
+ var _a;
142
+ /**
143
+ *
144
+ * The identifier of the author of this annotation.
145
+ */
146
+ this.author = undefined;
147
+ /**
148
+ *
149
+ * The timestamp (unix epoch in ms) of creation of this note, filled automatically if missing.
150
+ */
151
+ this.created = undefined;
152
+ /**
153
+ *
154
+ * The timestamp (unix epoch in ms) of the latest modification of this note, filled automatically
155
+ * if missing.
156
+ */
157
+ this.modified = undefined;
158
+ /**
159
+ *
160
+ * Text contained in the note, written as markdown. Deprecated in favor of [markdown].
161
+ */
162
+ this.text = undefined;
163
+ /**
164
+ *
165
+ * Localized text contained in the note, written as markdown. Keys should respect ISO 639-1.
166
+ */
167
+ this.markdown = {};
168
+ /**
169
+ *
170
+ * Defines to which part of the corresponding information the note is related to.
171
+ */
172
+ this.location = undefined;
173
+ /**
174
+ *
175
+ * Whether this annotation is confidential.
176
+ */
177
+ this.confidential = undefined;
178
+ /**
179
+ *
180
+ * Tags associated with this annotation.
181
+ */
182
+ this.tags = [];
183
+ /**
184
+ *
185
+ * The encrypted content of this annotation.
186
+ */
187
+ this.encryptedSelf = undefined;
188
+ this.isEncrypted = true;
189
+ if (partial.isEncrypted !== undefined && partial.isEncrypted !== true)
190
+ throw new Error('partial.isEncrypted must be undefined or true');
191
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
192
+ if ('author' in partial)
193
+ this.author = partial.author;
194
+ if ('created' in partial)
195
+ this.created = partial.created;
196
+ if ('modified' in partial)
197
+ this.modified = partial.modified;
198
+ if ('text' in partial)
199
+ this.text = partial.text;
200
+ if ('markdown' in partial && partial.markdown !== undefined)
201
+ this.markdown = partial.markdown;
202
+ if ('location' in partial)
203
+ this.location = partial.location;
204
+ if ('confidential' in partial)
205
+ this.confidential = partial.confidential;
206
+ if ('tags' in partial && partial.tags !== undefined)
207
+ this.tags = partial.tags;
208
+ if ('encryptedSelf' in partial)
209
+ this.encryptedSelf = partial.encryptedSelf;
210
+ }
211
+ toJSON() {
212
+ const res = {};
213
+ res['id'] = this.id;
214
+ if (this.author != undefined)
215
+ res['author'] = this.author;
216
+ if (this.created != undefined)
217
+ res['created'] = this.created;
218
+ if (this.modified != undefined)
219
+ res['modified'] = this.modified;
220
+ if (this.text != undefined)
221
+ res['text'] = this.text;
222
+ res['markdown'] = Object.fromEntries(Object.entries(this.markdown).map(([k0, v0]) => [k0, v0]));
223
+ if (this.location != undefined)
224
+ res['location'] = this.location;
225
+ if (this.confidential != undefined)
226
+ res['confidential'] = this.confidential;
227
+ res['tags'] = this.tags.map((x0) => x0.toJSON());
228
+ if (this.encryptedSelf != undefined)
229
+ res['encryptedSelf'] = this.encryptedSelf;
230
+ res['isEncrypted'] = true;
231
+ return res;
232
+ }
233
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedAnnotation']) {
234
+ if (typeof json != 'object')
235
+ throw new Error(`Expected json object at path ${path.join("")}`);
236
+ const jCpy = Object.assign({}, json);
237
+ if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
238
+ throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedAnnotation`);
239
+ const res = new EncryptedAnnotation({
240
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
241
+ author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
242
+ created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
243
+ modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
244
+ text: expectString(extractEntry(jCpy, 'text', false, path), true, [...path, ".text"]),
245
+ markdown: expectMap(extractEntry(jCpy, 'markdown', false, path), false, [...path, ".markdown"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
246
+ location: expectString(extractEntry(jCpy, 'location', false, path), true, [...path, ".location"]),
247
+ confidential: expectBoolean(extractEntry(jCpy, 'confidential', false, path), true, [...path, ".confidential"]),
248
+ tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
249
+ encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
250
+ });
251
+ if (!ignoreUnknownKeys) {
252
+ const unused = Object.keys(jCpy);
253
+ if (unused.length > 0)
254
+ throw new Error(`Unexpected key(s) for json object EncryptedAnnotation at path ${path.join("")}: ${unused}`);
122
255
  }
123
256
  return res;
124
257
  }
@@ -17,22 +17,107 @@ export declare class Medication {
17
17
  * The expiration date of the medication. Format: yyyyMMdd
18
18
  */
19
19
  expirationDate: number | undefined;
20
+ /**
21
+ *
22
+ * The expiration date of the medication. Format: yyyyMMdd
23
+ * /
24
+ */
20
25
  instructionForPatient: string | undefined;
26
+ /**
27
+ *
28
+ * The expiration date of the medication. Format: yyyyMMdd
29
+ * /
30
+ */
21
31
  instructionForReimbursement: string | undefined;
32
+ /**
33
+ *
34
+ * The expiration date of the medication. Format: yyyyMMdd
35
+ * /
36
+ */
22
37
  commentForDelivery: string | undefined;
38
+ /**
39
+ *
40
+ * The expiration date of the medication. Format: yyyyMMdd
41
+ * /
42
+ */
23
43
  drugRoute: string | undefined;
44
+ /**
45
+ *
46
+ * The expiration date of the medication. Format: yyyyMMdd
47
+ * /
48
+ */
24
49
  temporality: string | undefined;
50
+ /**
51
+ *
52
+ * The expiration date of the medication. Format: yyyyMMdd
53
+ * /
54
+ */
25
55
  frequency: CodeStub | undefined;
56
+ /**
57
+ *
58
+ * The expiration date of the medication. Format: yyyyMMdd
59
+ * /
60
+ */
26
61
  reimbursementReason: CodeStub | undefined;
62
+ /**
63
+ *
64
+ * The expiration date of the medication. Format: yyyyMMdd
65
+ * /
66
+ */
27
67
  substitutionAllowed: boolean | undefined;
68
+ /**
69
+ *
70
+ * The expiration date of the medication. Format: yyyyMMdd
71
+ * /
72
+ */
28
73
  beginMoment: number | undefined;
74
+ /**
75
+ *
76
+ * The expiration date of the medication. Format: yyyyMMdd
77
+ * /
78
+ */
29
79
  endMoment: number | undefined;
80
+ /**
81
+ *
82
+ * The expiration date of the medication. Format: yyyyMMdd
83
+ * /
84
+ */
30
85
  deliveryMoment: number | undefined;
86
+ /**
87
+ *
88
+ * The expiration date of the medication. Format: yyyyMMdd
89
+ * /
90
+ */
31
91
  endExecutionMoment: number | undefined;
92
+ /**
93
+ *
94
+ * The expiration date of the medication. Format: yyyyMMdd
95
+ * /
96
+ */
32
97
  duration: Duration | undefined;
98
+ /**
99
+ *
100
+ * The expiration date of the medication. Format: yyyyMMdd
101
+ * /
102
+ */
33
103
  renewal: Renewal | undefined;
104
+ /**
105
+ *
106
+ * The expiration date of the medication. Format: yyyyMMdd
107
+ * /
108
+ */
34
109
  knownUsage: boolean | undefined;
110
+ /**
111
+ *
112
+ * The expiration date of the medication. Format: yyyyMMdd
113
+ * /
114
+ */
35
115
  regimen: Array<RegimenItem> | undefined;
116
+ /**
117
+ *
118
+ * The expiration date of the medication. Format: yyyyMMdd
119
+ * /
120
+ */
36
121
  posology: string | undefined;
37
122
  stockLocation: DecryptedAddress | undefined;
38
123
  constructor(partial: Partial<Medication>);
@@ -20,22 +20,107 @@ export class Medication {
20
20
  * The expiration date of the medication. Format: yyyyMMdd
21
21
  */
22
22
  this.expirationDate = undefined;
23
+ /**
24
+ *
25
+ * The expiration date of the medication. Format: yyyyMMdd
26
+ * /
27
+ */
23
28
  this.instructionForPatient = undefined;
29
+ /**
30
+ *
31
+ * The expiration date of the medication. Format: yyyyMMdd
32
+ * /
33
+ */
24
34
  this.instructionForReimbursement = undefined;
35
+ /**
36
+ *
37
+ * The expiration date of the medication. Format: yyyyMMdd
38
+ * /
39
+ */
25
40
  this.commentForDelivery = undefined;
41
+ /**
42
+ *
43
+ * The expiration date of the medication. Format: yyyyMMdd
44
+ * /
45
+ */
26
46
  this.drugRoute = undefined;
47
+ /**
48
+ *
49
+ * The expiration date of the medication. Format: yyyyMMdd
50
+ * /
51
+ */
27
52
  this.temporality = undefined;
53
+ /**
54
+ *
55
+ * The expiration date of the medication. Format: yyyyMMdd
56
+ * /
57
+ */
28
58
  this.frequency = undefined;
59
+ /**
60
+ *
61
+ * The expiration date of the medication. Format: yyyyMMdd
62
+ * /
63
+ */
29
64
  this.reimbursementReason = undefined;
65
+ /**
66
+ *
67
+ * The expiration date of the medication. Format: yyyyMMdd
68
+ * /
69
+ */
30
70
  this.substitutionAllowed = undefined;
71
+ /**
72
+ *
73
+ * The expiration date of the medication. Format: yyyyMMdd
74
+ * /
75
+ */
31
76
  this.beginMoment = undefined;
77
+ /**
78
+ *
79
+ * The expiration date of the medication. Format: yyyyMMdd
80
+ * /
81
+ */
32
82
  this.endMoment = undefined;
83
+ /**
84
+ *
85
+ * The expiration date of the medication. Format: yyyyMMdd
86
+ * /
87
+ */
33
88
  this.deliveryMoment = undefined;
89
+ /**
90
+ *
91
+ * The expiration date of the medication. Format: yyyyMMdd
92
+ * /
93
+ */
34
94
  this.endExecutionMoment = undefined;
95
+ /**
96
+ *
97
+ * The expiration date of the medication. Format: yyyyMMdd
98
+ * /
99
+ */
35
100
  this.duration = undefined;
101
+ /**
102
+ *
103
+ * The expiration date of the medication. Format: yyyyMMdd
104
+ * /
105
+ */
36
106
  this.renewal = undefined;
107
+ /**
108
+ *
109
+ * The expiration date of the medication. Format: yyyyMMdd
110
+ * /
111
+ */
37
112
  this.knownUsage = undefined;
113
+ /**
114
+ *
115
+ * The expiration date of the medication. Format: yyyyMMdd
116
+ * /
117
+ */
38
118
  this.regimen = undefined;
119
+ /**
120
+ *
121
+ * The expiration date of the medication. Format: yyyyMMdd
122
+ * /
123
+ */
39
124
  this.posology = undefined;
40
125
  this.stockLocation = undefined;
41
126
  if ('compoundPrescription' in partial)
@@ -1,5 +1,5 @@
1
1
  import { CodeStub } from '../base/CodeStub.mjs';
2
- import { Annotation } from './Annotation.mjs';
2
+ import { DecryptedAnnotation } from './Annotation.mjs';
3
3
  import { Range } from './Range.mjs';
4
4
  /**
5
5
  *
@@ -37,7 +37,7 @@ export declare class ReferenceRange {
37
37
  *
38
38
  * Annotations providing additional context.
39
39
  */
40
- notes: Array<Annotation>;
40
+ notes: Array<DecryptedAnnotation>;
41
41
  /**
42
42
  *
43
43
  * The age range to which this reference range applies.
@@ -1,7 +1,7 @@
1
1
  // auto-generated file
2
2
  import { expectArray, expectNumber, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
3
  import { CodeStub } from '../base/CodeStub.mjs';
4
- import { Annotation } from './Annotation.mjs';
4
+ import { DecryptedAnnotation } from './Annotation.mjs';
5
5
  import { Range } from './Range.mjs';
6
6
  /**
7
7
  *
@@ -86,7 +86,7 @@ export class ReferenceRange {
86
86
  stringValue: expectString(extractEntry(jCpy, 'stringValue', false, path), true, [...path, ".stringValue"]),
87
87
  tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
88
88
  codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
89
- notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Annotation.fromJSON)),
89
+ notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAnnotation.fromJSON)),
90
90
  age: expectObject(extractEntry(jCpy, 'age', false, path), true, ignoreUnknownKeys, [...path, ".age"], Range.fromJSON),
91
91
  });
92
92
  if (!ignoreUnknownKeys) {
@@ -1,27 +1,22 @@
1
1
  import { CodeStub } from '../base/CodeStub.mjs';
2
2
  import { HasEndOfLife } from '../base/HasEndOfLife.mjs';
3
+ import { HasIdentifier } from '../base/HasIdentifier.mjs';
3
4
  import { ICureDocument } from '../base/ICureDocument.mjs';
4
5
  import { Identifier } from '../base/Identifier.mjs';
5
6
  import { LinkQualification } from '../base/LinkQualification.mjs';
6
7
  import { Base64String } from '../specializations/Base64String.mjs';
7
- import { Annotation } from './Annotation.mjs';
8
+ import { Annotation, DecryptedAnnotation, EncryptedAnnotation } from './Annotation.mjs';
8
9
  import { Content, DecryptedContent, EncryptedContent } from './Content.mjs';
9
10
  import { Delegation } from './Delegation.mjs';
10
11
  import { Encryptable } from './Encryptable.mjs';
11
12
  import { SecurityMetadata } from './SecurityMetadata.mjs';
12
- export interface Service extends Encryptable, ICureDocument<string>, HasEndOfLife {
13
+ export interface Service extends Encryptable, ICureDocument<string>, HasEndOfLife, HasIdentifier {
13
14
  /**
14
15
  *
15
16
  * The transactionId is used when a single service had to be split into parts for technical
16
17
  * reasons. Several services with the same non null transaction id form one single service
17
18
  */
18
19
  transactionId: string | undefined;
19
- /**
20
- *
21
- * The transactionId is used when a single service had to be split into parts for technical
22
- * reasons. Several services with the same non null transaction id form one single service
23
- */
24
- identifier: Array<Identifier>;
25
20
  /**
26
21
  *
27
22
  * Id of the contact during which the service is provided. Only used when the Service is emitted
@@ -294,7 +289,7 @@ export declare class DecryptedService {
294
289
  *
295
290
  * Comments - Notes recorded by a HCP about this service
296
291
  */
297
- notes: Array<Annotation>;
292
+ notes: Array<DecryptedAnnotation>;
298
293
  /**
299
294
  *
300
295
  * Links towards related services (possibly in other contacts)
@@ -467,7 +462,7 @@ export declare class EncryptedService {
467
462
  *
468
463
  * Comments - Notes recorded by a HCP about this service
469
464
  */
470
- notes: Array<Annotation>;
465
+ notes: Array<EncryptedAnnotation>;
471
466
  /**
472
467
  *
473
468
  * Links towards related services (possibly in other contacts)
@@ -4,7 +4,7 @@ import { randomUuid } from '../../utils/Id.mjs';
4
4
  import { CodeStub } from '../base/CodeStub.mjs';
5
5
  import { Identifier } from '../base/Identifier.mjs';
6
6
  import { LinkQualification } from '../base/LinkQualification.mjs';
7
- import { Annotation } from './Annotation.mjs';
7
+ import { DecryptedAnnotation, EncryptedAnnotation } from './Annotation.mjs';
8
8
  import { DecryptedContent, EncryptedContent } from './Content.mjs';
9
9
  import { Delegation } from './Delegation.mjs';
10
10
  import { SecurityMetadata } from './SecurityMetadata.mjs';
@@ -316,7 +316,7 @@ export class DecryptedService {
316
316
  responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
317
317
  comment: expectString(extractEntry(jCpy, 'comment', false, path), true, [...path, ".comment"]),
318
318
  invoicingCodes: expectArray(extractEntry(jCpy, 'invoicingCodes', false, path), false, [...path, ".invoicingCodes"], (x0, p0) => expectString(x0, false, p0)),
319
- notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Annotation.fromJSON)),
319
+ notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAnnotation.fromJSON)),
320
320
  qualifiedLinks: expectMap(extractEntry(jCpy, 'qualifiedLinks', false, path), false, [...path, ".qualifiedLinks"], (k0, p0) => expectStringEnum(k0, false, p0, LinkQualification, 'LinkQualification'), (v0, p0) => expectMap(v0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectString(v1, false, p1))),
321
321
  codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
322
322
  tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
@@ -639,7 +639,7 @@ export class EncryptedService {
639
639
  responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
640
640
  comment: expectString(extractEntry(jCpy, 'comment', false, path), true, [...path, ".comment"]),
641
641
  invoicingCodes: expectArray(extractEntry(jCpy, 'invoicingCodes', false, path), false, [...path, ".invoicingCodes"], (x0, p0) => expectString(x0, false, p0)),
642
- notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Annotation.fromJSON)),
642
+ notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedAnnotation.fromJSON)),
643
643
  qualifiedLinks: expectMap(extractEntry(jCpy, 'qualifiedLinks', false, path), false, [...path, ".qualifiedLinks"], (k0, p0) => expectStringEnum(k0, false, p0, LinkQualification, 'LinkQualification'), (v0, p0) => expectMap(v0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectString(v1, false, p1))),
644
644
  codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
645
645
  tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
package/model.d.mts CHANGED
@@ -195,6 +195,7 @@ export * from './model/base/HasEndOfLife.mjs';
195
195
  export * from './model/base/HasTags.mjs';
196
196
  export * from './model/base/Identifier.mjs';
197
197
  export * from './model/base/DataOwner.mjs';
198
+ export * from './model/base/HasIdentifier.mjs';
198
199
  export * from './model/base/Person.mjs';
199
200
  export * from './model/base/Named.mjs';
200
201
  export * from './model/base/ParticipantType.mjs';
package/model.mjs CHANGED
@@ -195,6 +195,7 @@ export * from './model/base/HasEndOfLife.mjs';
195
195
  export * from './model/base/HasTags.mjs';
196
196
  export * from './model/base/Identifier.mjs';
197
197
  export * from './model/base/DataOwner.mjs';
198
+ export * from './model/base/HasIdentifier.mjs';
198
199
  export * from './model/base/Person.mjs';
199
200
  export * from './model/base/Named.mjs';
200
201
  export * from './model/base/ParticipantType.mjs';