@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.
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
- package/api/InsuranceApi.d.mts +5 -0
- package/api/InsuranceInGroupApi.d.mts +5 -0
- package/cardinal-sdk-ts.d.mts +19 -0
- package/cardinal-sdk-ts.mjs +40347 -39592
- package/cardinal-sdk.mjs +102471 -99681
- package/filters/InsuranceFilters.d.mts +54 -0
- package/filters/InsuranceFilters.mjs +8 -0
- package/filters.d.mts +1 -0
- package/filters.mjs +1 -0
- package/model/Contact.d.mts +5 -9
- package/model/Contact.mjs +3 -3
- package/model/HealthElement.d.mts +3 -3
- package/model/HealthElement.mjs +3 -3
- package/model/HealthcareParty.d.mts +2 -1
- package/model/Insurance.d.mts +15 -10
- package/model/Insurance.mjs +24 -22
- package/model/Invoice.d.mts +2 -6
- package/model/MaintenanceTask.d.mts +2 -6
- package/model/Patient.d.mts +5 -9
- package/model/Patient.mjs +3 -3
- package/model/User.d.mts +2 -1
- package/model/base/HasIdentifier.d.mts +10 -0
- package/model/base/HasIdentifier.mjs +1 -0
- package/model/embed/Address.d.mts +5 -5
- package/model/embed/Address.mjs +3 -3
- package/model/embed/Annotation.d.mts +127 -4
- package/model/embed/Annotation.mjs +137 -4
- package/model/embed/Medication.d.mts +85 -0
- package/model/embed/Medication.mjs +85 -0
- package/model/embed/ReferenceRange.d.mts +2 -2
- package/model/embed/ReferenceRange.mjs +2 -2
- package/model/embed/Service.d.mts +5 -10
- package/model/embed/Service.mjs +3 -3
- package/model.d.mts +1 -0
- package/model.mjs +1 -0
- package/options/SdkOptions.d.mts +18 -12
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BaseFilterOptions, BaseSortableFilterOptions } from '../cardinal-sdk-ts.mjs';
|
|
2
|
+
import { Insurance } from '../model/Insurance.mjs';
|
|
3
|
+
import { Identifier } from '../model/base/Identifier.mjs';
|
|
4
|
+
interface InsuranceFiltersFactory {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* Filter options to match all insurances.
|
|
8
|
+
* These options are not sortable.
|
|
9
|
+
*/
|
|
10
|
+
all(): BaseFilterOptions<Insurance>;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* Options for insurance filtering which match all the insurances that have at least
|
|
14
|
+
* an identifier that has the same exact [Identifier.system] and [Identifier.value] as one of the provided
|
|
15
|
+
* [identifiers]. Other properties of the provided identifiers are ignored.
|
|
16
|
+
*
|
|
17
|
+
* These options are sortable. When sorting using these options the insurances will be in the same order as
|
|
18
|
+
* the input identifiers. In case an entity has multiple identifiers only the first matching identifier is considered
|
|
19
|
+
* for the sorting.
|
|
20
|
+
*
|
|
21
|
+
* @param identifiers a list of identifiers
|
|
22
|
+
*/
|
|
23
|
+
byIdentifiers(identifiers: Array<Identifier>): BaseFilterOptions<Insurance>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* Options for insurance filtering which match all insurances shared directly (i.e. ignoring hierarchies) ƒthat have a certain code.
|
|
27
|
+
* If you specify only the [codeType] you will get all entities that have at least a code of that type.
|
|
28
|
+
*
|
|
29
|
+
* These options are sortable. When sorting using these options the insurances will be sorted by [codeCode]
|
|
30
|
+
*
|
|
31
|
+
* @param codeType a code type
|
|
32
|
+
* @param codeCode a code for the provided code type, or null if you want the filter to accept any entity
|
|
33
|
+
* with a code of the provided type.
|
|
34
|
+
*/
|
|
35
|
+
byCode(codeType: string, options?: {
|
|
36
|
+
codeCode?: string | undefined;
|
|
37
|
+
}): BaseSortableFilterOptions<Insurance>;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* Options for insurance filtering which match all insurances shared directly (i.e. ignoring hierarchies) that have a certain tag.
|
|
41
|
+
* If you specify only the [tagType] you will get all entities that have at least a tag of that type.
|
|
42
|
+
*
|
|
43
|
+
* These options are sortable. When sorting using these options the insurances will be sorted by [tagCode]
|
|
44
|
+
*
|
|
45
|
+
* @param tagType a tag type
|
|
46
|
+
* @param tagCode a code for the provided tag type, or null if you want the filter to accept any entity
|
|
47
|
+
* with a tag of the provided type.
|
|
48
|
+
*/
|
|
49
|
+
byTag(tagType: string, options?: {
|
|
50
|
+
tagCode?: string | undefined;
|
|
51
|
+
}): BaseSortableFilterOptions<Insurance>;
|
|
52
|
+
}
|
|
53
|
+
export declare const InsuranceFilters: InsuranceFiltersFactory;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { InternalInsuranceFiltersObj } from '../cardinal-sdk-ts.mjs';
|
|
3
|
+
export const InsuranceFilters = {
|
|
4
|
+
all: () => InternalInsuranceFiltersObj.getInstance().all(),
|
|
5
|
+
byIdentifiers: (identifiers) => InternalInsuranceFiltersObj.getInstance().byIdentifiers(identifiers),
|
|
6
|
+
byCode: (codeType, options) => InternalInsuranceFiltersObj.getInstance().byCode(codeType, options),
|
|
7
|
+
byTag: (tagType, options) => InternalInsuranceFiltersObj.getInstance().byTag(tagType, options)
|
|
8
|
+
};
|
package/filters.d.mts
CHANGED
package/filters.mjs
CHANGED
package/model/Contact.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CodeStub } from './base/CodeStub.mjs';
|
|
2
2
|
import { HasEncryptionMetadata } from './base/HasEncryptionMetadata.mjs';
|
|
3
3
|
import { HasEndOfLife } from './base/HasEndOfLife.mjs';
|
|
4
|
+
import { HasIdentifier } from './base/HasIdentifier.mjs';
|
|
4
5
|
import { ICureDocument } from './base/ICureDocument.mjs';
|
|
5
6
|
import { Identifier } from './base/Identifier.mjs';
|
|
6
7
|
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
7
8
|
import { Address, DecryptedAddress, EncryptedAddress } from './embed/Address.mjs';
|
|
8
|
-
import { Annotation } from './embed/Annotation.mjs';
|
|
9
|
+
import { Annotation, DecryptedAnnotation, EncryptedAnnotation } from './embed/Annotation.mjs';
|
|
9
10
|
import { ContactParticipant } from './embed/ContactParticipant.mjs';
|
|
10
11
|
import { Delegation } from './embed/Delegation.mjs';
|
|
11
12
|
import { Encryptable } from './embed/Encryptable.mjs';
|
|
@@ -34,12 +35,7 @@ import { Base64String } from './specializations/Base64String.mjs';
|
|
|
34
35
|
* absence of a patient.
|
|
35
36
|
* /
|
|
36
37
|
*/
|
|
37
|
-
export interface Contact extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable, HasEndOfLife {
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* The identifiers of the Contact.
|
|
41
|
-
*/
|
|
42
|
-
identifier: Array<Identifier>;
|
|
38
|
+
export interface Contact extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable, HasEndOfLife, HasIdentifier {
|
|
43
39
|
/**
|
|
44
40
|
*
|
|
45
41
|
* Separate contacts can be merged in one logical contact if they share the same groupId. When a
|
|
@@ -276,7 +272,7 @@ export declare class DecryptedContact {
|
|
|
276
272
|
*
|
|
277
273
|
* Comments and notes recorded by a healthcare party about this contact.
|
|
278
274
|
*/
|
|
279
|
-
notes: Array<
|
|
275
|
+
notes: Array<DecryptedAnnotation>;
|
|
280
276
|
readonly isEncrypted: false;
|
|
281
277
|
constructor(partial: Partial<DecryptedContact>);
|
|
282
278
|
toJSON(): object;
|
|
@@ -457,7 +453,7 @@ export declare class EncryptedContact {
|
|
|
457
453
|
*
|
|
458
454
|
* Comments and notes recorded by a healthcare party about this contact.
|
|
459
455
|
*/
|
|
460
|
-
notes: Array<
|
|
456
|
+
notes: Array<EncryptedAnnotation>;
|
|
461
457
|
readonly isEncrypted: true;
|
|
462
458
|
constructor(partial: Partial<EncryptedContact>);
|
|
463
459
|
toJSON(): object;
|
package/model/Contact.mjs
CHANGED
|
@@ -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 { DecryptedAddress, EncryptedAddress } from './embed/Address.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { DecryptedAnnotation, EncryptedAnnotation } from './embed/Annotation.mjs';
|
|
8
8
|
import { ContactParticipant } from './embed/ContactParticipant.mjs';
|
|
9
9
|
import { Delegation } from './embed/Delegation.mjs';
|
|
10
10
|
import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
|
|
@@ -319,7 +319,7 @@ export class DecryptedContact {
|
|
|
319
319
|
encryptionKeys: expectMap(extractEntry(jCpy, 'encryptionKeys', false, path), false, [...path, ".encryptionKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
320
320
|
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
321
321
|
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
322
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
322
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAnnotation.fromJSON)),
|
|
323
323
|
});
|
|
324
324
|
if (!ignoreUnknownKeys) {
|
|
325
325
|
const unused = Object.keys(jCpy);
|
|
@@ -638,7 +638,7 @@ export class EncryptedContact {
|
|
|
638
638
|
encryptionKeys: expectMap(extractEntry(jCpy, 'encryptionKeys', false, path), false, [...path, ".encryptionKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
639
639
|
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
640
640
|
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
641
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
641
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedAnnotation.fromJSON)),
|
|
642
642
|
});
|
|
643
643
|
if (!ignoreUnknownKeys) {
|
|
644
644
|
const unused = Object.keys(jCpy);
|
|
@@ -4,7 +4,7 @@ import { HasEndOfLife } from './base/HasEndOfLife.mjs';
|
|
|
4
4
|
import { ICureDocument } from './base/ICureDocument.mjs';
|
|
5
5
|
import { Identifier } from './base/Identifier.mjs';
|
|
6
6
|
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
7
|
-
import { Annotation } from './embed/Annotation.mjs';
|
|
7
|
+
import { Annotation, DecryptedAnnotation, EncryptedAnnotation } from './embed/Annotation.mjs';
|
|
8
8
|
import { CareTeamMember, DecryptedCareTeamMember, EncryptedCareTeamMember } from './embed/CareTeamMember.mjs';
|
|
9
9
|
import { Delegation } from './embed/Delegation.mjs';
|
|
10
10
|
import { Encryptable } from './embed/Encryptable.mjs';
|
|
@@ -210,7 +210,7 @@ export declare class DecryptedHealthElement {
|
|
|
210
210
|
*
|
|
211
211
|
* Localized text annotations for the healthcare element.
|
|
212
212
|
*/
|
|
213
|
-
notes: Array<
|
|
213
|
+
notes: Array<DecryptedAnnotation>;
|
|
214
214
|
/**
|
|
215
215
|
*
|
|
216
216
|
* Whether the healthcare element is relevant or not.
|
|
@@ -394,7 +394,7 @@ export declare class EncryptedHealthElement {
|
|
|
394
394
|
*
|
|
395
395
|
* Localized text annotations for the healthcare element.
|
|
396
396
|
*/
|
|
397
|
-
notes: Array<
|
|
397
|
+
notes: Array<EncryptedAnnotation>;
|
|
398
398
|
/**
|
|
399
399
|
*
|
|
400
400
|
* Whether the healthcare element is relevant or not.
|
package/model/HealthElement.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expe
|
|
|
3
3
|
import { randomUuid } from '../utils/Id.mjs';
|
|
4
4
|
import { CodeStub } from './base/CodeStub.mjs';
|
|
5
5
|
import { Identifier } from './base/Identifier.mjs';
|
|
6
|
-
import {
|
|
6
|
+
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';
|
|
@@ -327,7 +327,7 @@ export class DecryptedHealthElement {
|
|
|
327
327
|
closingDate: expectNumber(extractEntry(jCpy, 'closingDate', false, path), true, true, [...path, ".closingDate"]),
|
|
328
328
|
descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
|
|
329
329
|
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
330
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
330
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAnnotation.fromJSON)),
|
|
331
331
|
relevant: expectBoolean(extractEntry(jCpy, 'relevant', false, path), false, [...path, ".relevant"]),
|
|
332
332
|
idOpeningContact: expectString(extractEntry(jCpy, 'idOpeningContact', false, path), true, [...path, ".idOpeningContact"]),
|
|
333
333
|
idClosingContact: expectString(extractEntry(jCpy, 'idClosingContact', false, path), true, [...path, ".idClosingContact"]),
|
|
@@ -668,7 +668,7 @@ export class EncryptedHealthElement {
|
|
|
668
668
|
closingDate: expectNumber(extractEntry(jCpy, 'closingDate', false, path), true, true, [...path, ".closingDate"]),
|
|
669
669
|
descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
|
|
670
670
|
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
671
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
671
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedAnnotation.fromJSON)),
|
|
672
672
|
relevant: expectBoolean(extractEntry(jCpy, 'relevant', false, path), false, [...path, ".relevant"]),
|
|
673
673
|
idOpeningContact: expectString(extractEntry(jCpy, 'idOpeningContact', false, path), true, [...path, ".idOpeningContact"]),
|
|
674
674
|
idClosingContact: expectString(extractEntry(jCpy, 'idClosingContact', false, path), true, [...path, ".idClosingContact"]),
|
|
@@ -3,6 +3,7 @@ import { CodeStub } from './base/CodeStub.mjs';
|
|
|
3
3
|
import { CryptoActor } from './base/CryptoActor.mjs';
|
|
4
4
|
import { DataOwner } from './base/DataOwner.mjs';
|
|
5
5
|
import { HasCodes } from './base/HasCodes.mjs';
|
|
6
|
+
import { HasIdentifier } from './base/HasIdentifier.mjs';
|
|
6
7
|
import { HasTags } from './base/HasTags.mjs';
|
|
7
8
|
import { Identifier } from './base/Identifier.mjs';
|
|
8
9
|
import { Named } from './base/Named.mjs';
|
|
@@ -23,7 +24,7 @@ import { SpkiHexString } from './specializations/SpkiHexString.mjs';
|
|
|
23
24
|
* icure-healthdata CouchDB database.
|
|
24
25
|
* /
|
|
25
26
|
*/
|
|
26
|
-
export declare class HealthcareParty implements StoredDocument, Named, Person, CryptoActor, DataOwner, HasCodes, HasTags {
|
|
27
|
+
export declare class HealthcareParty implements StoredDocument, Named, Person, CryptoActor, DataOwner, HasCodes, HasTags, HasIdentifier {
|
|
27
28
|
/**
|
|
28
29
|
*
|
|
29
30
|
* The Id of the healthcare party. We encourage using either a v4 UUID or a HL7 Id.
|
package/model/Insurance.d.mts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
2
|
+
import { HasCodes } from './base/HasCodes.mjs';
|
|
3
|
+
import { HasIdentifier } from './base/HasIdentifier.mjs';
|
|
4
|
+
import { HasTags } from './base/HasTags.mjs';
|
|
5
|
+
import { Identifier } from './base/Identifier.mjs';
|
|
1
6
|
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
2
7
|
import { DecryptedAddress } from './embed/Address.mjs';
|
|
3
8
|
/**
|
|
4
9
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
10
|
+
*
|
|
11
|
+
* Represents an insurance entity. An insurance can be a mutual fund, a private insurance company,
|
|
12
|
+
* or any other type of insurance organization that covers healthcare costs.
|
|
8
13
|
*/
|
|
9
|
-
export declare class Insurance implements StoredDocument {
|
|
14
|
+
export declare class Insurance implements StoredDocument, HasTags, HasCodes, HasIdentifier {
|
|
10
15
|
/**
|
|
11
16
|
*
|
|
12
17
|
* The unique identifier of the insurance.
|
|
@@ -32,19 +37,19 @@ export declare class Insurance implements StoredDocument {
|
|
|
32
37
|
};
|
|
33
38
|
/**
|
|
34
39
|
*
|
|
35
|
-
*
|
|
40
|
+
* The identifiers of the insurance.
|
|
36
41
|
*/
|
|
37
|
-
|
|
42
|
+
identifier: Array<Identifier>;
|
|
38
43
|
/**
|
|
39
44
|
*
|
|
40
|
-
*
|
|
45
|
+
* Tags that qualify the insurance as being member of a certain class.
|
|
41
46
|
*/
|
|
42
|
-
|
|
47
|
+
tags: Array<CodeStub>;
|
|
43
48
|
/**
|
|
44
49
|
*
|
|
45
|
-
*
|
|
50
|
+
* Codes that identify or qualify this particular insurance.
|
|
46
51
|
*/
|
|
47
|
-
|
|
52
|
+
codes: Array<CodeStub>;
|
|
48
53
|
/**
|
|
49
54
|
*
|
|
50
55
|
* The insurance code.
|
package/model/Insurance.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
-
import {
|
|
2
|
+
import { expectArray, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
3
3
|
import { randomUuid } from '../utils/Id.mjs';
|
|
4
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
5
|
+
import { Identifier } from './base/Identifier.mjs';
|
|
4
6
|
import { DecryptedAddress } from './embed/Address.mjs';
|
|
5
7
|
/**
|
|
6
8
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
|
+
* Represents an insurance entity. An insurance can be a mutual fund, a private insurance company,
|
|
11
|
+
* or any other type of insurance organization that covers healthcare costs.
|
|
10
12
|
*/
|
|
11
13
|
export class Insurance {
|
|
12
14
|
constructor(partial) {
|
|
@@ -29,19 +31,19 @@ export class Insurance {
|
|
|
29
31
|
this.name = {};
|
|
30
32
|
/**
|
|
31
33
|
*
|
|
32
|
-
*
|
|
34
|
+
* The identifiers of the insurance.
|
|
33
35
|
*/
|
|
34
|
-
this.
|
|
36
|
+
this.identifier = [];
|
|
35
37
|
/**
|
|
36
38
|
*
|
|
37
|
-
*
|
|
39
|
+
* Tags that qualify the insurance as being member of a certain class.
|
|
38
40
|
*/
|
|
39
|
-
this.
|
|
41
|
+
this.tags = [];
|
|
40
42
|
/**
|
|
41
43
|
*
|
|
42
|
-
*
|
|
44
|
+
* Codes that identify or qualify this particular insurance.
|
|
43
45
|
*/
|
|
44
|
-
this.
|
|
46
|
+
this.codes = [];
|
|
45
47
|
/**
|
|
46
48
|
*
|
|
47
49
|
* The insurance code.
|
|
@@ -64,12 +66,12 @@ export class Insurance {
|
|
|
64
66
|
this.deletionDate = partial.deletionDate;
|
|
65
67
|
if ('name' in partial && partial.name !== undefined)
|
|
66
68
|
this.name = partial.name;
|
|
67
|
-
if ('
|
|
68
|
-
this.
|
|
69
|
-
if ('
|
|
70
|
-
this.
|
|
71
|
-
if ('
|
|
72
|
-
this.
|
|
69
|
+
if ('identifier' in partial && partial.identifier !== undefined)
|
|
70
|
+
this.identifier = partial.identifier;
|
|
71
|
+
if ('tags' in partial && partial.tags !== undefined)
|
|
72
|
+
this.tags = partial.tags;
|
|
73
|
+
if ('codes' in partial && partial.codes !== undefined)
|
|
74
|
+
this.codes = partial.codes;
|
|
73
75
|
if ('code' in partial)
|
|
74
76
|
this.code = partial.code;
|
|
75
77
|
if ('agreementNumber' in partial)
|
|
@@ -86,9 +88,9 @@ export class Insurance {
|
|
|
86
88
|
if (this.deletionDate != undefined)
|
|
87
89
|
res['deletionDate'] = this.deletionDate;
|
|
88
90
|
res['name'] = Object.fromEntries(Object.entries(this.name).map(([k0, v0]) => [k0, v0]));
|
|
89
|
-
res['
|
|
90
|
-
res['
|
|
91
|
-
res['
|
|
91
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
92
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
93
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
92
94
|
if (this.code != undefined)
|
|
93
95
|
res['code'] = this.code;
|
|
94
96
|
if (this.agreementNumber != undefined)
|
|
@@ -107,9 +109,9 @@ export class Insurance {
|
|
|
107
109
|
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
108
110
|
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
109
111
|
name: expectMap(extractEntry(jCpy, 'name', false, path), false, [...path, ".name"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
113
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
114
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
113
115
|
code: expectString(extractEntry(jCpy, 'code', false, path), true, [...path, ".code"]),
|
|
114
116
|
agreementNumber: expectString(extractEntry(jCpy, 'agreementNumber', false, path), true, [...path, ".agreementNumber"]),
|
|
115
117
|
parent: expectString(extractEntry(jCpy, 'parent', false, path), true, [...path, ".parent"]),
|
package/model/Invoice.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CodeStub } from './base/CodeStub.mjs';
|
|
2
2
|
import { HasEncryptionMetadata } from './base/HasEncryptionMetadata.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 { StoredDocument } from './base/StoredDocument.mjs';
|
|
@@ -18,12 +19,7 @@ import { Base64String } from './specializations/Base64String.mjs';
|
|
|
18
19
|
* services rendered. It is serialized in JSON and saved in the underlying iCure CouchDB database.
|
|
19
20
|
* /
|
|
20
21
|
*/
|
|
21
|
-
export interface Invoice extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* The identifiers of the invoice.
|
|
25
|
-
*/
|
|
26
|
-
identifier: Array<Identifier>;
|
|
22
|
+
export interface Invoice extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable, HasIdentifier {
|
|
27
23
|
/**
|
|
28
24
|
*
|
|
29
25
|
* The timestamp (unix epoch in ms) when the invoice was drafted.
|
|
@@ -2,6 +2,7 @@ import { DecryptedPropertyStub, EncryptedPropertyStub, PropertyStub } from './Pr
|
|
|
2
2
|
import { CodeStub } from './base/CodeStub.mjs';
|
|
3
3
|
import { HasEncryptionMetadata } from './base/HasEncryptionMetadata.mjs';
|
|
4
4
|
import { HasEndOfLife } from './base/HasEndOfLife.mjs';
|
|
5
|
+
import { HasIdentifier } from './base/HasIdentifier.mjs';
|
|
5
6
|
import { ICureDocument } from './base/ICureDocument.mjs';
|
|
6
7
|
import { Identifier } from './base/Identifier.mjs';
|
|
7
8
|
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
@@ -18,12 +19,7 @@ import { Base64String } from './specializations/Base64String.mjs';
|
|
|
18
19
|
* asynchronous processing.
|
|
19
20
|
* /
|
|
20
21
|
*/
|
|
21
|
-
export interface MaintenanceTask extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable, HasEndOfLife {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* The identifiers of the maintenance task.
|
|
25
|
-
*/
|
|
26
|
-
identifier: Array<Identifier>;
|
|
22
|
+
export interface MaintenanceTask extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable, HasEndOfLife, HasIdentifier {
|
|
27
23
|
/**
|
|
28
24
|
*
|
|
29
25
|
* The type of the maintenance task.
|
package/model/Patient.d.mts
CHANGED
|
@@ -2,12 +2,13 @@ import { DecryptedPropertyStub, EncryptedPropertyStub, PropertyStub } from './Pr
|
|
|
2
2
|
import { CodeStub } from './base/CodeStub.mjs';
|
|
3
3
|
import { CryptoActor } from './base/CryptoActor.mjs';
|
|
4
4
|
import { HasEncryptionMetadata } from './base/HasEncryptionMetadata.mjs';
|
|
5
|
+
import { HasIdentifier } from './base/HasIdentifier.mjs';
|
|
5
6
|
import { ICureDocument } from './base/ICureDocument.mjs';
|
|
6
7
|
import { Identifier } from './base/Identifier.mjs';
|
|
7
8
|
import { Person } from './base/Person.mjs';
|
|
8
9
|
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
9
10
|
import { DecryptedAddress, EncryptedAddress } from './embed/Address.mjs';
|
|
10
|
-
import { Annotation } from './embed/Annotation.mjs';
|
|
11
|
+
import { Annotation, DecryptedAnnotation, EncryptedAnnotation } from './embed/Annotation.mjs';
|
|
11
12
|
import { Delegation } from './embed/Delegation.mjs';
|
|
12
13
|
import { Encryptable } from './embed/Encryptable.mjs';
|
|
13
14
|
import { DecryptedFinancialInstitutionInformation, EncryptedFinancialInstitutionInformation, FinancialInstitutionInformation } from './embed/FinancialInstitutionInformation.mjs';
|
|
@@ -31,12 +32,7 @@ import { SpkiHexString } from './specializations/SpkiHexString.mjs';
|
|
|
31
32
|
* end-to-end encryption of sensitive data.
|
|
32
33
|
* /
|
|
33
34
|
*/
|
|
34
|
-
export interface Patient extends StoredDocument, ICureDocument<string>, Person, HasEncryptionMetadata, Encryptable, CryptoActor {
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* The patient's identifiers, used by the client to uniquely identify the patient.
|
|
38
|
-
*/
|
|
39
|
-
identifier: Array<Identifier>;
|
|
35
|
+
export interface Patient extends StoredDocument, ICureDocument<string>, Person, HasEncryptionMetadata, Encryptable, HasIdentifier, CryptoActor {
|
|
40
36
|
/**
|
|
41
37
|
*
|
|
42
38
|
* The birth sex of the patient.
|
|
@@ -426,7 +422,7 @@ export declare class DecryptedPatient {
|
|
|
426
422
|
*
|
|
427
423
|
* Localized text notes (can be confidential).
|
|
428
424
|
*/
|
|
429
|
-
notes: Array<
|
|
425
|
+
notes: Array<DecryptedAnnotation>;
|
|
430
426
|
/**
|
|
431
427
|
*
|
|
432
428
|
* A text note (can be confidential, encrypted by default).
|
|
@@ -794,7 +790,7 @@ export declare class EncryptedPatient {
|
|
|
794
790
|
*
|
|
795
791
|
* Localized text notes (can be confidential).
|
|
796
792
|
*/
|
|
797
|
-
notes: Array<
|
|
793
|
+
notes: Array<EncryptedAnnotation>;
|
|
798
794
|
/**
|
|
799
795
|
*
|
|
800
796
|
* A text note (can be confidential, encrypted by default).
|
package/model/Patient.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { DecryptedPropertyStub, EncryptedPropertyStub } from './PropertyStub.mjs
|
|
|
5
5
|
import { CodeStub } from './base/CodeStub.mjs';
|
|
6
6
|
import { Identifier } from './base/Identifier.mjs';
|
|
7
7
|
import { DecryptedAddress, EncryptedAddress } from './embed/Address.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { DecryptedAnnotation, EncryptedAnnotation } from './embed/Annotation.mjs';
|
|
9
9
|
import { Delegation } from './embed/Delegation.mjs';
|
|
10
10
|
import { DecryptedFinancialInstitutionInformation, EncryptedFinancialInstitutionInformation } from './embed/FinancialInstitutionInformation.mjs';
|
|
11
11
|
import { Gender } from './embed/Gender.mjs';
|
|
@@ -645,7 +645,7 @@ export class DecryptedPatient {
|
|
|
645
645
|
deceased: expectBoolean(extractEntry(jCpy, 'deceased', false, path), true, [...path, ".deceased"]),
|
|
646
646
|
education: expectString(extractEntry(jCpy, 'education', false, path), true, [...path, ".education"]),
|
|
647
647
|
profession: expectString(extractEntry(jCpy, 'profession', false, path), true, [...path, ".profession"]),
|
|
648
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
648
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAnnotation.fromJSON)),
|
|
649
649
|
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
650
650
|
administrativeNote: expectString(extractEntry(jCpy, 'administrativeNote', false, path), true, [...path, ".administrativeNote"]),
|
|
651
651
|
nationality: expectString(extractEntry(jCpy, 'nationality', false, path), true, [...path, ".nationality"]),
|
|
@@ -1311,7 +1311,7 @@ export class EncryptedPatient {
|
|
|
1311
1311
|
deceased: expectBoolean(extractEntry(jCpy, 'deceased', false, path), true, [...path, ".deceased"]),
|
|
1312
1312
|
education: expectString(extractEntry(jCpy, 'education', false, path), true, [...path, ".education"]),
|
|
1313
1313
|
profession: expectString(extractEntry(jCpy, 'profession', false, path), true, [...path, ".profession"]),
|
|
1314
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
1314
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedAnnotation.fromJSON)),
|
|
1315
1315
|
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
1316
1316
|
administrativeNote: expectString(extractEntry(jCpy, 'administrativeNote', false, path), true, [...path, ".administrativeNote"]),
|
|
1317
1317
|
nationality: expectString(extractEntry(jCpy, 'nationality', false, path), true, [...path, ".nationality"]),
|
package/model/User.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DecryptedPropertyStub } from './PropertyStub.mjs';
|
|
2
|
+
import { HasIdentifier } from './base/HasIdentifier.mjs';
|
|
2
3
|
import { Identifier } from './base/Identifier.mjs';
|
|
3
4
|
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
4
5
|
import { DelegationTag } from './embed/DelegationTag.mjs';
|
|
@@ -13,7 +14,7 @@ import { Permission } from './security/Permission.mjs';
|
|
|
13
14
|
* party,
|
|
14
15
|
* a patient, or a device, and holds authentication credentials, roles, and permissions.
|
|
15
16
|
*/
|
|
16
|
-
export declare class User implements StoredDocument {
|
|
17
|
+
export declare class User implements StoredDocument, HasIdentifier {
|
|
17
18
|
/**
|
|
18
19
|
*
|
|
19
20
|
* The Id of the user. We encourage using either a v4 UUID or a HL7 Id.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CodeStub } from '../base/CodeStub.mjs';
|
|
2
2
|
import { HasCodes } from '../base/HasCodes.mjs';
|
|
3
|
+
import { HasIdentifier } from '../base/HasIdentifier.mjs';
|
|
3
4
|
import { HasTags } from '../base/HasTags.mjs';
|
|
4
5
|
import { Identifier } from '../base/Identifier.mjs';
|
|
5
6
|
import { Base64String } from '../specializations/Base64String.mjs';
|
|
6
7
|
import { AddressType } from './AddressType.mjs';
|
|
7
|
-
import { Annotation } from './Annotation.mjs';
|
|
8
|
+
import { Annotation, DecryptedAnnotation, EncryptedAnnotation } from './Annotation.mjs';
|
|
8
9
|
import { Encryptable } from './Encryptable.mjs';
|
|
9
10
|
import { DecryptedTelecom, EncryptedTelecom, Telecom } from './Telecom.mjs';
|
|
10
|
-
export interface Address extends Encryptable, HasTags, HasCodes {
|
|
11
|
-
identifier: Array<Identifier>;
|
|
11
|
+
export interface Address extends Encryptable, HasTags, HasCodes, HasIdentifier {
|
|
12
12
|
addressType: AddressType | undefined;
|
|
13
13
|
descr: string | undefined;
|
|
14
14
|
street: string | undefined;
|
|
@@ -38,7 +38,7 @@ export declare class DecryptedAddress {
|
|
|
38
38
|
state: string | undefined;
|
|
39
39
|
country: string | undefined;
|
|
40
40
|
note: string | undefined;
|
|
41
|
-
notes: Array<
|
|
41
|
+
notes: Array<DecryptedAnnotation>;
|
|
42
42
|
telecoms: Array<DecryptedTelecom>;
|
|
43
43
|
encryptedSelf: Base64String | undefined;
|
|
44
44
|
readonly isEncrypted: false;
|
|
@@ -60,7 +60,7 @@ export declare class EncryptedAddress {
|
|
|
60
60
|
state: string | undefined;
|
|
61
61
|
country: string | undefined;
|
|
62
62
|
note: string | undefined;
|
|
63
|
-
notes: Array<
|
|
63
|
+
notes: Array<EncryptedAnnotation>;
|
|
64
64
|
telecoms: Array<EncryptedTelecom>;
|
|
65
65
|
encryptedSelf: Base64String | undefined;
|
|
66
66
|
readonly isEncrypted: true;
|
package/model/embed/Address.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { expectArray, expectObject, expectString, expectStringEnum, extractEntry
|
|
|
3
3
|
import { CodeStub } from '../base/CodeStub.mjs';
|
|
4
4
|
import { Identifier } from '../base/Identifier.mjs';
|
|
5
5
|
import { AddressType } from './AddressType.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { DecryptedAnnotation, EncryptedAnnotation } from './Annotation.mjs';
|
|
7
7
|
import { DecryptedTelecom, EncryptedTelecom } from './Telecom.mjs';
|
|
8
8
|
export class DecryptedAddress {
|
|
9
9
|
constructor(partial) {
|
|
@@ -111,7 +111,7 @@ export class DecryptedAddress {
|
|
|
111
111
|
state: expectString(extractEntry(jCpy, 'state', false, path), true, [...path, ".state"]),
|
|
112
112
|
country: expectString(extractEntry(jCpy, 'country', false, path), true, [...path, ".country"]),
|
|
113
113
|
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
114
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
114
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAnnotation.fromJSON)),
|
|
115
115
|
telecoms: expectArray(extractEntry(jCpy, 'telecoms', false, path), false, [...path, ".telecoms"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedTelecom.fromJSON)),
|
|
116
116
|
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
117
117
|
});
|
|
@@ -229,7 +229,7 @@ export class EncryptedAddress {
|
|
|
229
229
|
state: expectString(extractEntry(jCpy, 'state', false, path), true, [...path, ".state"]),
|
|
230
230
|
country: expectString(extractEntry(jCpy, 'country', false, path), true, [...path, ".country"]),
|
|
231
231
|
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
232
|
-
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0,
|
|
232
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedAnnotation.fromJSON)),
|
|
233
233
|
telecoms: expectArray(extractEntry(jCpy, 'telecoms', false, path), false, [...path, ".telecoms"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedTelecom.fromJSON)),
|
|
234
234
|
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
235
235
|
});
|