@icure/cardinal-sdk 2.0.0-PREVIEW-18.1 → 2.0.0-PREVIEW-21
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/Kermit-kermit-core.mjs +45 -40
- package/Kermit-kermit.mjs +6 -6
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1577 -1577
- package/api/HealthcarePartyApi.d.mts +2 -0
- package/api/HealthcarePartyApiInGroup.d.mts +5 -0
- package/api/HealthcarePartyApiInGroup.mjs +1 -0
- package/api/RecoveryApi.d.mts +5 -1
- package/api.d.mts +1 -0
- package/api.mjs +1 -0
- package/bitops-library-bits.mjs +197 -0
- package/bitops-library-endian.mjs +117 -0
- package/cardinal-sdk-ts.d.mts +2 -2
- package/cardinal-sdk-ts.mjs +57007 -56794
- package/cardinal-sdk.mjs +120895 -120501
- package/core-library-digest.mjs +186 -0
- package/crypto/CryptoService.d.mts +17 -7
- package/error-library-error.mjs +42 -0
- package/hash-library-sha2.mjs +183 -0
- package/internal/BytesEncoding.d.mts +3 -0
- package/internal/BytesEncoding.mjs +99 -0
- package/internal/JsonDecodeUtils.d.mts +20 -0
- package/internal/JsonDecodeUtils.mjs +99 -0
- package/kerberus.mjs +557 -389
- package/kotlin-kotlin-stdlib.mjs +2445 -2713
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-coroutines-core.mjs +2455 -2450
- package/kotlinx-io-kotlinx-io-bytestring.mjs +36 -36
- package/kotlinx-io-kotlinx-io-core.mjs +459 -459
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2029 -2029
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1952 -1952
- package/kryptom-lib.mjs +3263 -1967
- package/ktor-ktor-client-content-negotiation.mjs +184 -184
- package/ktor-ktor-client-core.mjs +2713 -2713
- package/ktor-ktor-events.mjs +6 -6
- package/ktor-ktor-http-cio.mjs +481 -481
- package/ktor-ktor-http.mjs +693 -693
- package/ktor-ktor-io.mjs +963 -963
- package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
- package/ktor-ktor-serialization-kotlinx.mjs +238 -238
- package/ktor-ktor-serialization.mjs +109 -109
- package/ktor-ktor-utils.mjs +557 -557
- package/ktor-ktor-websockets.mjs +673 -673
- package/model/AccessLog.d.mts +5 -0
- package/model/AccessLog.mjs +168 -0
- package/model/Agenda.d.mts +2 -0
- package/model/Agenda.mjs +82 -0
- package/model/ApplicationSettings.d.mts +5 -0
- package/model/ApplicationSettings.mjs +140 -0
- package/model/BooleanResponse.d.mts +2 -0
- package/model/BooleanResponse.mjs +20 -0
- package/model/CalendarItem.d.mts +5 -0
- package/model/CalendarItem.mjs +290 -0
- package/model/CalendarItemType.d.mts +7 -0
- package/model/CalendarItemType.mjs +117 -0
- package/model/Classification.d.mts +5 -0
- package/model/Classification.mjs +148 -0
- package/model/Code.d.mts +2 -0
- package/model/Code.mjs +69 -0
- package/model/Contact.d.mts +5 -0
- package/model/Contact.mjs +218 -0
- package/model/CryptoActorStub.d.mts +2 -0
- package/model/CryptoActorStub.mjs +45 -0
- package/model/CryptoActorStubWithType.d.mts +2 -0
- package/model/CryptoActorStubWithType.mjs +25 -0
- package/model/DataOwnerRegistrationSuccess.d.mts +2 -0
- package/model/DataOwnerRegistrationSuccess.mjs +24 -0
- package/model/DataOwnerWithType.d.mts +7 -0
- package/model/DataOwnerWithType.mjs +80 -0
- package/model/DatabaseInitialisation.d.mts +2 -0
- package/model/DatabaseInitialisation.mjs +34 -0
- package/model/Device.d.mts +2 -0
- package/model/Device.mjs +99 -0
- package/model/Document.d.mts +5 -0
- package/model/Document.mjs +246 -0
- package/model/DocumentTemplate.d.mts +2 -0
- package/model/DocumentTemplate.mjs +91 -0
- package/model/EntityReference.d.mts +2 -0
- package/model/EntityReference.mjs +29 -0
- package/model/EntityReferenceInGroup.d.mts +2 -0
- package/model/EntityReferenceInGroup.mjs +23 -0
- package/model/EntityTemplate.d.mts +2 -0
- package/model/EntityTemplate.mjs +46 -0
- package/model/Form.d.mts +5 -0
- package/model/Form.mjs +204 -0
- package/model/FormTemplate.d.mts +2 -0
- package/model/FormTemplate.mjs +82 -0
- package/model/FrontEndMigration.d.mts +2 -0
- package/model/FrontEndMigration.mjs +57 -0
- package/model/Group.d.mts +2 -0
- package/model/Group.mjs +68 -0
- package/model/GroupDeletionReport.d.mts +2 -0
- package/model/GroupDeletionReport.mjs +24 -0
- package/model/HealthElement.d.mts +5 -0
- package/model/HealthElement.mjs +226 -0
- package/model/HealthcareParty.d.mts +2 -0
- package/model/HealthcareParty.mjs +182 -0
- package/model/IdWithRev.d.mts +2 -0
- package/model/IdWithRev.mjs +23 -0
- package/model/IndexingInfo.d.mts +2 -0
- package/model/IndexingInfo.mjs +21 -0
- package/model/Insurance.d.mts +2 -0
- package/model/Insurance.mjs +46 -0
- package/model/Invoice.d.mts +5 -0
- package/model/Invoice.mjs +468 -0
- package/model/Keyword.d.mts +2 -0
- package/model/Keyword.mjs +58 -0
- package/model/ListOfIds.d.mts +2 -0
- package/model/ListOfIds.mjs +20 -0
- package/model/ListOfProperties.d.mts +2 -0
- package/model/ListOfProperties.mjs +22 -0
- package/model/MaintenanceTask.d.mts +5 -0
- package/model/MaintenanceTask.mjs +152 -0
- package/model/MedicalLocation.d.mts +2 -0
- package/model/MedicalLocation.mjs +63 -0
- package/model/Message.d.mts +5 -0
- package/model/Message.mjs +248 -0
- package/model/PaginatedDocumentKeyIdPair.d.mts +2 -0
- package/model/PaginatedDocumentKeyIdPair.mjs +24 -0
- package/model/Patient.d.mts +5 -0
- package/model/Patient.mjs +491 -0
- package/model/Place.d.mts +2 -0
- package/model/Place.mjs +33 -0
- package/model/PropertyStub.d.mts +5 -0
- package/model/PropertyStub.mjs +74 -0
- package/model/PropertyTypeStub.d.mts +2 -0
- package/model/PropertyTypeStub.mjs +26 -0
- package/model/PublicAgendasAndCalendarItemTypes.d.mts +2 -0
- package/model/PublicAgendasAndCalendarItemTypes.mjs +25 -0
- package/model/PublicKey.d.mts +2 -0
- package/model/PublicKey.mjs +24 -0
- package/model/Receipt.d.mts +5 -0
- package/model/Receipt.mjs +159 -0
- package/model/RegistrationInformation.d.mts +2 -0
- package/model/RegistrationInformation.mjs +43 -0
- package/model/RegistrationSuccess.d.mts +2 -0
- package/model/RegistrationSuccess.mjs +24 -0
- package/model/Replication.d.mts +2 -0
- package/model/Replication.mjs +35 -0
- package/model/ReplicationInfo.d.mts +2 -0
- package/model/ReplicationInfo.mjs +28 -0
- package/model/Role.d.mts +2 -0
- package/model/Role.mjs +34 -0
- package/model/StoredDocumentIdentifier.d.mts +2 -0
- package/model/StoredDocumentIdentifier.mjs +22 -0
- package/model/Tarification.d.mts +2 -0
- package/model/Tarification.mjs +92 -0
- package/model/TimeTable.d.mts +2 -0
- package/model/TimeTable.mjs +64 -0
- package/model/Topic.d.mts +5 -0
- package/model/Topic.mjs +163 -0
- package/model/User.d.mts +4 -0
- package/model/User.mjs +118 -0
- package/model/UserGroup.d.mts +2 -0
- package/model/UserGroup.mjs +55 -0
- package/model/base/CodeStub.d.mts +2 -0
- package/model/base/CodeStub.mjs +40 -0
- package/model/base/CryptoActor.d.mts +3 -0
- package/model/base/CryptoActor.mjs +19 -1
- package/model/base/Identifier.d.mts +2 -0
- package/model/base/Identifier.mjs +44 -0
- package/model/couchdb/Basic.d.mts +2 -0
- package/model/couchdb/Basic.mjs +22 -0
- package/model/couchdb/DatabaseInfo.d.mts +2 -0
- package/model/couchdb/DatabaseInfo.mjs +47 -0
- package/model/couchdb/DesignDocument.d.mts +2 -0
- package/model/couchdb/DesignDocument.mjs +40 -0
- package/model/couchdb/DocIdentifier.d.mts +2 -0
- package/model/couchdb/DocIdentifier.mjs +24 -0
- package/model/couchdb/GroupDatabasesInfo.d.mts +2 -0
- package/model/couchdb/GroupDatabasesInfo.mjs +26 -0
- package/model/couchdb/Remote.d.mts +2 -0
- package/model/couchdb/Remote.mjs +25 -0
- package/model/couchdb/RemoteAuthentication.d.mts +2 -0
- package/model/couchdb/RemoteAuthentication.mjs +23 -0
- package/model/couchdb/ReplicationStats.d.mts +2 -0
- package/model/couchdb/ReplicationStats.mjs +45 -0
- package/model/couchdb/ReplicatorDocument.d.mts +2 -0
- package/model/couchdb/ReplicatorDocument.mjs +61 -0
- package/model/couchdb/View.d.mts +2 -0
- package/model/couchdb/View.mjs +23 -0
- package/model/data/LabelledOccurence.d.mts +2 -0
- package/model/data/LabelledOccurence.mjs +22 -0
- package/model/embed/Address.d.mts +5 -0
- package/model/embed/Address.mjs +133 -0
- package/model/embed/AdministrationQuantity.d.mts +2 -0
- package/model/embed/AdministrationQuantity.mjs +29 -0
- package/model/embed/AgendaSlottingAlgorithm.d.mts +3 -0
- package/model/embed/AgendaSlottingAlgorithm.mjs +30 -0
- package/model/embed/AgreementAppendix.d.mts +2 -0
- package/model/embed/AgreementAppendix.mjs +30 -0
- package/model/embed/Annotation.d.mts +2 -0
- package/model/embed/Annotation.mjs +46 -0
- package/model/embed/CalendarItemTag.d.mts +5 -0
- package/model/embed/CalendarItemTag.mjs +72 -0
- package/model/embed/CareTeamMember.d.mts +5 -0
- package/model/embed/CareTeamMember.mjs +71 -0
- package/model/embed/CareTeamMembership.d.mts +5 -0
- package/model/embed/CareTeamMembership.mjs +73 -0
- package/model/embed/Content.d.mts +5 -0
- package/model/embed/Content.mjs +125 -0
- package/model/embed/DataAttachment.d.mts +2 -0
- package/model/embed/DataAttachment.mjs +26 -0
- package/model/embed/DatabaseSynchronization.d.mts +2 -0
- package/model/embed/DatabaseSynchronization.mjs +30 -0
- package/model/embed/Delegation.d.mts +2 -0
- package/model/embed/Delegation.mjs +30 -0
- package/model/embed/DeletedAttachment.d.mts +2 -0
- package/model/embed/DeletedAttachment.mjs +30 -0
- package/model/embed/DocumentGroup.d.mts +2 -0
- package/model/embed/DocumentGroup.mjs +24 -0
- package/model/embed/Duration.d.mts +2 -0
- package/model/embed/Duration.mjs +26 -0
- package/model/embed/EmbeddedTimeTableHour.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableHour.mjs +22 -0
- package/model/embed/EmbeddedTimeTableItem.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableItem.mjs +41 -0
- package/model/embed/Employer.d.mts +2 -0
- package/model/embed/Employer.mjs +26 -0
- package/model/embed/EmploymentInfo.d.mts +5 -0
- package/model/embed/EmploymentInfo.mjs +74 -0
- package/model/embed/Episode.d.mts +5 -0
- package/model/embed/Episode.mjs +75 -0
- package/model/embed/FinancialInstitutionInformation.d.mts +5 -0
- package/model/embed/FinancialInstitutionInformation.mjs +88 -0
- package/model/embed/FlatRateTarification.d.mts +5 -0
- package/model/embed/FlatRateTarification.mjs +72 -0
- package/model/embed/FlowItem.d.mts +2 -0
- package/model/embed/FlowItem.mjs +117 -0
- package/model/embed/HealthcarePartyHistoryStatus.d.mts +2 -0
- package/model/embed/HealthcarePartyHistoryStatus.mjs +28 -0
- package/model/embed/IdentityDocumentReader.d.mts +2 -0
- package/model/embed/IdentityDocumentReader.mjs +33 -0
- package/model/embed/Insurability.d.mts +5 -0
- package/model/embed/Insurability.mjs +100 -0
- package/model/embed/InvoicingCode.d.mts +5 -0
- package/model/embed/InvoicingCode.mjs +377 -0
- package/model/embed/KeywordSubword.d.mts +2 -0
- package/model/embed/KeywordSubword.mjs +25 -0
- package/model/embed/LetterValue.d.mts +2 -0
- package/model/embed/LetterValue.mjs +30 -0
- package/model/embed/Measure.d.mts +2 -0
- package/model/embed/Measure.mjs +57 -0
- package/model/embed/MedicalHouseContract.d.mts +5 -0
- package/model/embed/MedicalHouseContract.mjs +223 -0
- package/model/embed/Medication.d.mts +2 -0
- package/model/embed/Medication.mjs +157 -0
- package/model/embed/Medicinalproduct.d.mts +2 -0
- package/model/embed/Medicinalproduct.mjs +33 -0
- package/model/embed/MessageAttachment.d.mts +2 -0
- package/model/embed/MessageAttachment.mjs +25 -0
- package/model/embed/MessageReadStatus.d.mts +2 -0
- package/model/embed/MessageReadStatus.mjs +23 -0
- package/model/embed/ParagraphAgreement.d.mts +2 -0
- package/model/embed/ParagraphAgreement.mjs +86 -0
- package/model/embed/Partnership.d.mts +2 -0
- package/model/embed/Partnership.mjs +36 -0
- package/model/embed/PatientHealthCareParty.d.mts +9 -0
- package/model/embed/PatientHealthCareParty.mjs +88 -0
- package/model/embed/Payment.d.mts +2 -0
- package/model/embed/Payment.mjs +28 -0
- package/model/embed/Periodicity.d.mts +2 -0
- package/model/embed/Periodicity.mjs +26 -0
- package/model/embed/PersonName.d.mts +2 -0
- package/model/embed/PersonName.mjs +41 -0
- package/model/embed/PlanOfAction.d.mts +8 -3
- package/model/embed/PlanOfAction.mjs +179 -0
- package/model/embed/Range.d.mts +2 -0
- package/model/embed/Range.mjs +24 -0
- package/model/embed/ReferenceRange.d.mts +2 -0
- package/model/embed/ReferenceRange.mjs +40 -0
- package/model/embed/ReferralPeriod.d.mts +2 -0
- package/model/embed/ReferralPeriod.mjs +27 -0
- package/model/embed/RegimenItem.d.mts +2 -0
- package/model/embed/RegimenItem.mjs +40 -0
- package/model/embed/Renewal.d.mts +2 -0
- package/model/embed/Renewal.mjs +26 -0
- package/model/embed/ResourceGroupAllocationSchedule.d.mts +2 -0
- package/model/embed/ResourceGroupAllocationSchedule.mjs +39 -0
- package/model/embed/Right.d.mts +2 -0
- package/model/embed/Right.mjs +27 -0
- package/model/embed/RoleConfiguration.d.mts +2 -0
- package/model/embed/RoleConfiguration.mjs +22 -0
- package/model/embed/SchoolingInfo.d.mts +5 -0
- package/model/embed/SchoolingInfo.mjs +73 -0
- package/model/embed/SecureDelegation.d.mts +2 -0
- package/model/embed/SecureDelegation.mjs +39 -0
- package/model/embed/SecurityMetadata.d.mts +2 -0
- package/model/embed/SecurityMetadata.mjs +22 -0
- package/model/embed/Service.d.mts +5 -0
- package/model/embed/Service.mjs +240 -0
- package/model/embed/ServiceLink.d.mts +2 -0
- package/model/embed/ServiceLink.mjs +21 -0
- package/model/embed/SubContact.d.mts +5 -0
- package/model/embed/SubContact.mjs +146 -0
- package/model/embed/Substanceproduct.d.mts +2 -0
- package/model/embed/Substanceproduct.mjs +33 -0
- package/model/embed/Suspension.d.mts +2 -0
- package/model/embed/Suspension.mjs +30 -0
- package/model/embed/Telecom.d.mts +5 -0
- package/model/embed/Telecom.mjs +67 -0
- package/model/embed/TimeSeries.d.mts +2 -0
- package/model/embed/TimeSeries.mjs +32 -0
- package/model/embed/TimeTableHour.d.mts +2 -0
- package/model/embed/TimeTableHour.mjs +24 -0
- package/model/embed/TimeTableItem.d.mts +2 -0
- package/model/embed/TimeTableItem.mjs +57 -0
- package/model/embed/TypedValue.d.mts +5 -0
- package/model/embed/TypedValue.mjs +85 -0
- package/model/embed/Valorisation.d.mts +5 -0
- package/model/embed/Valorisation.mjs +108 -0
- package/model/embed/ValueWithPrecision.d.mts +2 -0
- package/model/embed/ValueWithPrecision.mjs +22 -0
- package/model/embed/Weekday.d.mts +2 -0
- package/model/embed/Weekday.mjs +26 -0
- package/model/embed/form/template/Action.d.mts +2 -0
- package/model/embed/form/template/Action.mjs +30 -0
- package/model/embed/form/template/CheckBox.d.mts +2 -0
- package/model/embed/form/template/CheckBox.mjs +71 -0
- package/model/embed/form/template/DatePicker.d.mts +2 -0
- package/model/embed/form/template/DatePicker.mjs +71 -0
- package/model/embed/form/template/DateTimePicker.d.mts +2 -0
- package/model/embed/form/template/DateTimePicker.mjs +71 -0
- package/model/embed/form/template/DropdownField.d.mts +2 -0
- package/model/embed/form/template/DropdownField.mjs +71 -0
- package/model/embed/form/template/FieldsGroup.d.mts +2 -0
- package/model/embed/form/template/FieldsGroup.mjs +28 -0
- package/model/embed/form/template/FormTemplateLayout.d.mts +2 -0
- package/model/embed/form/template/FormTemplateLayout.mjs +33 -0
- package/model/embed/form/template/Launcher.d.mts +2 -0
- package/model/embed/form/template/Launcher.mjs +26 -0
- package/model/embed/form/template/MeasureField.d.mts +2 -0
- package/model/embed/form/template/MeasureField.mjs +71 -0
- package/model/embed/form/template/MultipleChoice.d.mts +2 -0
- package/model/embed/form/template/MultipleChoice.mjs +71 -0
- package/model/embed/form/template/NumberField.d.mts +2 -0
- package/model/embed/form/template/NumberField.mjs +71 -0
- package/model/embed/form/template/RadioButton.d.mts +2 -0
- package/model/embed/form/template/RadioButton.mjs +71 -0
- package/model/embed/form/template/Section.d.mts +2 -0
- package/model/embed/form/template/Section.mjs +30 -0
- package/model/embed/form/template/State.d.mts +2 -0
- package/model/embed/form/template/State.mjs +26 -0
- package/model/embed/form/template/StructureElement.d.mts +3 -0
- package/model/embed/form/template/StructureElement.mjs +32 -1
- package/model/embed/form/template/TextField.d.mts +2 -0
- package/model/embed/form/template/TextField.mjs +71 -0
- package/model/embed/form/template/TimePicker.d.mts +2 -0
- package/model/embed/form/template/TimePicker.mjs +71 -0
- package/model/filter/predicate/AlwaysPredicate.d.mts +2 -0
- package/model/filter/predicate/AlwaysPredicate.mjs +20 -0
- package/model/filter/predicate/AndPredicate.d.mts +2 -0
- package/model/filter/predicate/AndPredicate.mjs +25 -0
- package/model/filter/predicate/KeyValuePredicate.d.mts +2 -0
- package/model/filter/predicate/KeyValuePredicate.mjs +32 -0
- package/model/filter/predicate/NotPredicate.d.mts +2 -0
- package/model/filter/predicate/NotPredicate.mjs +25 -0
- package/model/filter/predicate/OrPredicate.d.mts +2 -0
- package/model/filter/predicate/OrPredicate.mjs +25 -0
- package/model/filter/predicate/Predicate.d.mts +3 -0
- package/model/filter/predicate/Predicate.mjs +20 -1
- package/model/security/AlwaysPermissionItem.d.mts +2 -0
- package/model/security/AlwaysPermissionItem.mjs +25 -0
- package/model/security/AuthenticationToken.d.mts +2 -0
- package/model/security/AuthenticationToken.mjs +28 -0
- package/model/security/Enable2faRequest.d.mts +2 -0
- package/model/security/Enable2faRequest.mjs +22 -0
- package/model/security/ExternalJwtConfig.d.mts +18 -0
- package/model/security/ExternalJwtConfig.mjs +199 -0
- package/model/security/LoginIdentifier.d.mts +2 -0
- package/model/security/LoginIdentifier.mjs +22 -0
- package/model/security/OperationToken.d.mts +2 -0
- package/model/security/OperationToken.mjs +31 -0
- package/model/security/Permission.d.mts +2 -0
- package/model/security/Permission.mjs +24 -0
- package/model/security/PermissionItem.d.mts +3 -0
- package/model/security/PermissionItem.mjs +12 -1
- package/model/security/TokenWithGroup.d.mts +2 -0
- package/model/security/TokenWithGroup.mjs +25 -0
- package/options/SdkOptions.d.mts +3 -23
- package/package.json +1 -1
- package/utils/Id.d.mts +5 -0
- package/utils/Id.mjs +19 -10
- package/KotlinBigInteger-bignum.mjs +0 -5902
- /package/{KotlinBigInteger-bignum-serialization-kotlinx.mjs → core-library-core.mjs} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class PaginatedDocumentKeyIdPair {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.startKey = undefined;
|
|
@@ -8,4 +9,27 @@ export class PaginatedDocumentKeyIdPair {
|
|
|
8
9
|
if ('startKeyDocId' in partial)
|
|
9
10
|
this.startKeyDocId = partial.startKeyDocId;
|
|
10
11
|
}
|
|
12
|
+
toJSON() {
|
|
13
|
+
const res = {};
|
|
14
|
+
if (this.startKey != undefined)
|
|
15
|
+
res['startKey'] = this.startKey;
|
|
16
|
+
if (this.startKeyDocId != undefined)
|
|
17
|
+
res['startKeyDocId'] = this.startKeyDocId;
|
|
18
|
+
return res;
|
|
19
|
+
}
|
|
20
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['PaginatedDocumentKeyIdPair']) {
|
|
21
|
+
if (typeof json != 'object')
|
|
22
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
23
|
+
const jCpy = Object.assign({}, json);
|
|
24
|
+
const res = new PaginatedDocumentKeyIdPair({
|
|
25
|
+
startKey: extractEntry(jCpy, 'startKey', false, path),
|
|
26
|
+
startKeyDocId: expectString(extractEntry(jCpy, 'startKeyDocId', false, path), true, [...path, ".startKeyDocId"]),
|
|
27
|
+
});
|
|
28
|
+
if (!ignoreUnknownKeys) {
|
|
29
|
+
const unused = Object.keys(jCpy);
|
|
30
|
+
if (unused.length > 0)
|
|
31
|
+
throw new Error(`Unexpected key(s) for json object PaginatedDocumentKeyIdPair at path ${path.join("")}: ${unused}`);
|
|
32
|
+
}
|
|
33
|
+
return res;
|
|
34
|
+
}
|
|
11
35
|
}
|
package/model/Patient.d.mts
CHANGED
|
@@ -78,6 +78,7 @@ export interface Patient extends StoredDocument, ICureDocument<string>, Person,
|
|
|
78
78
|
employementInfos: Array<EmploymentInfo>;
|
|
79
79
|
parentId: undefined;
|
|
80
80
|
readonly isEncrypted: boolean;
|
|
81
|
+
toJSON(): object;
|
|
81
82
|
}
|
|
82
83
|
export declare class DecryptedPatient {
|
|
83
84
|
id: string;
|
|
@@ -187,6 +188,8 @@ export declare class DecryptedPatient {
|
|
|
187
188
|
readonly isEncrypted: false;
|
|
188
189
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.DecryptedPatient';
|
|
189
190
|
constructor(partial: Partial<DecryptedPatient>);
|
|
191
|
+
toJSON(): object;
|
|
192
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedPatient;
|
|
190
193
|
}
|
|
191
194
|
export declare class EncryptedPatient {
|
|
192
195
|
id: string;
|
|
@@ -296,4 +299,6 @@ export declare class EncryptedPatient {
|
|
|
296
299
|
readonly isEncrypted: true;
|
|
297
300
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.EncryptedPatient';
|
|
298
301
|
constructor(partial: Partial<EncryptedPatient>);
|
|
302
|
+
toJSON(): object;
|
|
303
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedPatient;
|
|
299
304
|
}
|
package/model/Patient.mjs
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { decodeBase64, encodeBase64 } from '../internal/BytesEncoding.mjs';
|
|
3
|
+
import { expectArray, expectBoolean, expectMap, expectNullish, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
4
|
import { randomUuid } from '../utils/Id.mjs';
|
|
5
|
+
import { DecryptedPropertyStub, EncryptedPropertyStub } from './PropertyStub.mjs';
|
|
6
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
7
|
+
import { Identifier } from './base/Identifier.mjs';
|
|
8
|
+
import { DecryptedAddress, EncryptedAddress } from './embed/Address.mjs';
|
|
9
|
+
import { Annotation } from './embed/Annotation.mjs';
|
|
10
|
+
import { Delegation } from './embed/Delegation.mjs';
|
|
11
|
+
import { DecryptedEmploymentInfo, EncryptedEmploymentInfo } from './embed/EmploymentInfo.mjs';
|
|
12
|
+
import { DecryptedFinancialInstitutionInformation, EncryptedFinancialInstitutionInformation } from './embed/FinancialInstitutionInformation.mjs';
|
|
3
13
|
import { Gender } from './embed/Gender.mjs';
|
|
14
|
+
import { DecryptedInsurability, EncryptedInsurability } from './embed/Insurability.mjs';
|
|
15
|
+
import { DecryptedMedicalHouseContract, EncryptedMedicalHouseContract } from './embed/MedicalHouseContract.mjs';
|
|
16
|
+
import { Partnership } from './embed/Partnership.mjs';
|
|
17
|
+
import { DecryptedPatientHealthCareParty, EncryptedPatientHealthCareParty } from './embed/PatientHealthCareParty.mjs';
|
|
18
|
+
import { PersonName } from './embed/PersonName.mjs';
|
|
4
19
|
import { PersonalStatus } from './embed/PersonalStatus.mjs';
|
|
20
|
+
import { DecryptedSchoolingInfo, EncryptedSchoolingInfo } from './embed/SchoolingInfo.mjs';
|
|
21
|
+
import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
|
|
5
22
|
export class DecryptedPatient {
|
|
6
23
|
constructor(partial) {
|
|
7
24
|
var _a;
|
|
@@ -254,6 +271,243 @@ export class DecryptedPatient {
|
|
|
254
271
|
if ('parentId' in partial)
|
|
255
272
|
this.parentId = partial.parentId;
|
|
256
273
|
}
|
|
274
|
+
toJSON() {
|
|
275
|
+
const res = {};
|
|
276
|
+
res['id'] = this.id;
|
|
277
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
278
|
+
if (this.rev != undefined)
|
|
279
|
+
res['rev'] = this.rev;
|
|
280
|
+
if (this.created != undefined)
|
|
281
|
+
res['created'] = this.created;
|
|
282
|
+
if (this.modified != undefined)
|
|
283
|
+
res['modified'] = this.modified;
|
|
284
|
+
if (this.author != undefined)
|
|
285
|
+
res['author'] = this.author;
|
|
286
|
+
if (this.responsible != undefined)
|
|
287
|
+
res['responsible'] = this.responsible;
|
|
288
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
289
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
290
|
+
if (this.endOfLife != undefined)
|
|
291
|
+
res['endOfLife'] = this.endOfLife;
|
|
292
|
+
if (this.deletionDate != undefined)
|
|
293
|
+
res['deletionDate'] = this.deletionDate;
|
|
294
|
+
if (this.firstName != undefined)
|
|
295
|
+
res['firstName'] = this.firstName;
|
|
296
|
+
if (this.lastName != undefined)
|
|
297
|
+
res['lastName'] = this.lastName;
|
|
298
|
+
res['names'] = this.names.map((x0) => x0.toJSON());
|
|
299
|
+
if (this.companyName != undefined)
|
|
300
|
+
res['companyName'] = this.companyName;
|
|
301
|
+
res['languages'] = this.languages.map((x0) => x0);
|
|
302
|
+
res['addresses'] = this.addresses.map((x0) => x0.toJSON());
|
|
303
|
+
if (this.civility != undefined)
|
|
304
|
+
res['civility'] = this.civility;
|
|
305
|
+
if (this.gender != undefined)
|
|
306
|
+
res['gender'] = this.gender;
|
|
307
|
+
if (this.birthSex != undefined)
|
|
308
|
+
res['birthSex'] = this.birthSex;
|
|
309
|
+
if (this.mergeToPatientId != undefined)
|
|
310
|
+
res['mergeToPatientId'] = this.mergeToPatientId;
|
|
311
|
+
res['mergedIds'] = this.mergedIds.map((x0) => x0);
|
|
312
|
+
if (this.alias != undefined)
|
|
313
|
+
res['alias'] = this.alias;
|
|
314
|
+
res['active'] = this.active;
|
|
315
|
+
res['deactivationReason'] = this.deactivationReason;
|
|
316
|
+
if (this.deactivationDate != undefined)
|
|
317
|
+
res['deactivationDate'] = this.deactivationDate;
|
|
318
|
+
if (this.ssin != undefined)
|
|
319
|
+
res['ssin'] = this.ssin;
|
|
320
|
+
if (this.maidenName != undefined)
|
|
321
|
+
res['maidenName'] = this.maidenName;
|
|
322
|
+
if (this.spouseName != undefined)
|
|
323
|
+
res['spouseName'] = this.spouseName;
|
|
324
|
+
if (this.partnerName != undefined)
|
|
325
|
+
res['partnerName'] = this.partnerName;
|
|
326
|
+
if (this.personalStatus != undefined)
|
|
327
|
+
res['personalStatus'] = this.personalStatus;
|
|
328
|
+
if (this.dateOfBirth != undefined)
|
|
329
|
+
res['dateOfBirth'] = this.dateOfBirth;
|
|
330
|
+
if (this.dateOfDeath != undefined)
|
|
331
|
+
res['dateOfDeath'] = this.dateOfDeath;
|
|
332
|
+
if (this.timestampOfLatestEidReading != undefined)
|
|
333
|
+
res['timestampOfLatestEidReading'] = this.timestampOfLatestEidReading;
|
|
334
|
+
if (this.placeOfBirth != undefined)
|
|
335
|
+
res['placeOfBirth'] = this.placeOfBirth;
|
|
336
|
+
if (this.placeOfDeath != undefined)
|
|
337
|
+
res['placeOfDeath'] = this.placeOfDeath;
|
|
338
|
+
if (this.deceased != undefined)
|
|
339
|
+
res['deceased'] = this.deceased;
|
|
340
|
+
if (this.education != undefined)
|
|
341
|
+
res['education'] = this.education;
|
|
342
|
+
if (this.profession != undefined)
|
|
343
|
+
res['profession'] = this.profession;
|
|
344
|
+
res['notes'] = this.notes.map((x0) => x0.toJSON());
|
|
345
|
+
if (this.note != undefined)
|
|
346
|
+
res['note'] = this.note;
|
|
347
|
+
if (this.administrativeNote != undefined)
|
|
348
|
+
res['administrativeNote'] = this.administrativeNote;
|
|
349
|
+
if (this.nationality != undefined)
|
|
350
|
+
res['nationality'] = this.nationality;
|
|
351
|
+
if (this.race != undefined)
|
|
352
|
+
res['race'] = this.race;
|
|
353
|
+
if (this.ethnicity != undefined)
|
|
354
|
+
res['ethnicity'] = this.ethnicity;
|
|
355
|
+
if (this.preferredUserId != undefined)
|
|
356
|
+
res['preferredUserId'] = this.preferredUserId;
|
|
357
|
+
if (this.picture != undefined)
|
|
358
|
+
res['picture'] = encodeBase64(this.picture);
|
|
359
|
+
if (this.externalId != undefined)
|
|
360
|
+
res['externalId'] = this.externalId;
|
|
361
|
+
res['insurabilities'] = this.insurabilities.map((x0) => x0.toJSON());
|
|
362
|
+
res['partnerships'] = this.partnerships.map((x0) => x0.toJSON());
|
|
363
|
+
res['patientHealthCareParties'] = this.patientHealthCareParties.map((x0) => x0.toJSON());
|
|
364
|
+
res['financialInstitutionInformation'] = this.financialInstitutionInformation.map((x0) => x0.toJSON());
|
|
365
|
+
res['medicalHouseContracts'] = this.medicalHouseContracts.map((x0) => x0.toJSON());
|
|
366
|
+
res['patientProfessions'] = this.patientProfessions.map((x0) => x0.toJSON());
|
|
367
|
+
res['parameters'] = Object.fromEntries(Object.entries(this.parameters).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
|
|
368
|
+
res['properties'] = this.properties.map((x0) => x0.toJSON());
|
|
369
|
+
res['hcPartyKeys'] = Object.fromEntries(Object.entries(this.hcPartyKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
|
|
370
|
+
res['aesExchangeKeys'] = Object.fromEntries(Object.entries(this.aesExchangeKeys).map(([k0, v0]) => [k0, Object.fromEntries(Object.entries(v0).map(([k1, v1]) => [k1, Object.fromEntries(Object.entries(v1).map(([k2, v2]) => [k2, v2]))]))]));
|
|
371
|
+
res['transferKeys'] = Object.fromEntries(Object.entries(this.transferKeys).map(([k0, v0]) => [k0, Object.fromEntries(Object.entries(v0).map(([k1, v1]) => [k1, v1]))]));
|
|
372
|
+
res['privateKeyShamirPartitions'] = Object.fromEntries(Object.entries(this.privateKeyShamirPartitions).map(([k0, v0]) => [k0, v0]));
|
|
373
|
+
if (this.publicKey != undefined)
|
|
374
|
+
res['publicKey'] = this.publicKey;
|
|
375
|
+
res['publicKeysForOaepWithSha256'] = this.publicKeysForOaepWithSha256.map((x0) => x0);
|
|
376
|
+
res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
|
|
377
|
+
res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
378
|
+
res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
379
|
+
res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
380
|
+
if (this.encryptedSelf != undefined)
|
|
381
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
382
|
+
if (this.securityMetadata != undefined)
|
|
383
|
+
res['securityMetadata'] = this.securityMetadata.toJSON();
|
|
384
|
+
if (this.cryptoActorProperties != undefined)
|
|
385
|
+
res['cryptoActorProperties'] = this.cryptoActorProperties.map((x0) => x0.toJSON());
|
|
386
|
+
if (this.medicalLocationId != undefined)
|
|
387
|
+
res['medicalLocationId'] = this.medicalLocationId;
|
|
388
|
+
res['nonDuplicateIds'] = this.nonDuplicateIds.map((x0) => x0);
|
|
389
|
+
res['encryptedAdministrativesDocuments'] = this.encryptedAdministrativesDocuments.map((x0) => x0);
|
|
390
|
+
if (this.comment != undefined)
|
|
391
|
+
res['comment'] = this.comment;
|
|
392
|
+
if (this.warning != undefined)
|
|
393
|
+
res['warning'] = this.warning;
|
|
394
|
+
if (this.fatherBirthCountry != undefined)
|
|
395
|
+
res['fatherBirthCountry'] = this.fatherBirthCountry.toJSON();
|
|
396
|
+
if (this.birthCountry != undefined)
|
|
397
|
+
res['birthCountry'] = this.birthCountry.toJSON();
|
|
398
|
+
if (this.nativeCountry != undefined)
|
|
399
|
+
res['nativeCountry'] = this.nativeCountry.toJSON();
|
|
400
|
+
if (this.socialStatus != undefined)
|
|
401
|
+
res['socialStatus'] = this.socialStatus.toJSON();
|
|
402
|
+
if (this.mainSourceOfIncome != undefined)
|
|
403
|
+
res['mainSourceOfIncome'] = this.mainSourceOfIncome.toJSON();
|
|
404
|
+
res['schoolingInfos'] = this.schoolingInfos.map((x0) => x0.toJSON());
|
|
405
|
+
res['employementInfos'] = this.employementInfos.map((x0) => x0.toJSON());
|
|
406
|
+
if (this.parentId != undefined)
|
|
407
|
+
throw new Error('Unexpected nullish value for parentId');
|
|
408
|
+
res['isEncrypted'] = false;
|
|
409
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.DecryptedPatient';
|
|
410
|
+
return res;
|
|
411
|
+
}
|
|
412
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedPatient']) {
|
|
413
|
+
if (typeof json != 'object')
|
|
414
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
415
|
+
const jCpy = Object.assign({}, json);
|
|
416
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
|
|
417
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedPatient`);
|
|
418
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.DecryptedPatient')
|
|
419
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.DecryptedPatient". The provided json doesn't represent a DecryptedPatient`);
|
|
420
|
+
const res = new DecryptedPatient({
|
|
421
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
422
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
423
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
424
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
425
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
426
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
427
|
+
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
428
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
429
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
430
|
+
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
431
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
432
|
+
firstName: expectString(extractEntry(jCpy, 'firstName', false, path), true, [...path, ".firstName"]),
|
|
433
|
+
lastName: expectString(extractEntry(jCpy, 'lastName', false, path), true, [...path, ".lastName"]),
|
|
434
|
+
names: expectArray(extractEntry(jCpy, 'names', false, path), false, [...path, ".names"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, PersonName.fromJSON)),
|
|
435
|
+
companyName: expectString(extractEntry(jCpy, 'companyName', false, path), true, [...path, ".companyName"]),
|
|
436
|
+
languages: expectArray(extractEntry(jCpy, 'languages', false, path), false, [...path, ".languages"], (x0, p0) => expectString(x0, false, p0)),
|
|
437
|
+
addresses: expectArray(extractEntry(jCpy, 'addresses', false, path), false, [...path, ".addresses"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAddress.fromJSON)),
|
|
438
|
+
civility: expectString(extractEntry(jCpy, 'civility', false, path), true, [...path, ".civility"]),
|
|
439
|
+
gender: expectStringEnum(extractEntry(jCpy, 'gender', false, path), true, [...path, ".gender"], Gender, 'Gender'),
|
|
440
|
+
birthSex: expectStringEnum(extractEntry(jCpy, 'birthSex', false, path), true, [...path, ".birthSex"], Gender, 'Gender'),
|
|
441
|
+
mergeToPatientId: expectString(extractEntry(jCpy, 'mergeToPatientId', false, path), true, [...path, ".mergeToPatientId"]),
|
|
442
|
+
mergedIds: expectArray(extractEntry(jCpy, 'mergedIds', false, path), false, [...path, ".mergedIds"], (x0, p0) => expectString(x0, false, p0)),
|
|
443
|
+
alias: expectString(extractEntry(jCpy, 'alias', false, path), true, [...path, ".alias"]),
|
|
444
|
+
active: expectBoolean(extractEntry(jCpy, 'active', false, path), false, [...path, ".active"]),
|
|
445
|
+
deactivationReason: expectString(extractEntry(jCpy, 'deactivationReason', false, path), false, [...path, ".deactivationReason"]),
|
|
446
|
+
deactivationDate: expectNumber(extractEntry(jCpy, 'deactivationDate', false, path), true, true, [...path, ".deactivationDate"]),
|
|
447
|
+
ssin: expectString(extractEntry(jCpy, 'ssin', false, path), true, [...path, ".ssin"]),
|
|
448
|
+
maidenName: expectString(extractEntry(jCpy, 'maidenName', false, path), true, [...path, ".maidenName"]),
|
|
449
|
+
spouseName: expectString(extractEntry(jCpy, 'spouseName', false, path), true, [...path, ".spouseName"]),
|
|
450
|
+
partnerName: expectString(extractEntry(jCpy, 'partnerName', false, path), true, [...path, ".partnerName"]),
|
|
451
|
+
personalStatus: expectStringEnum(extractEntry(jCpy, 'personalStatus', false, path), true, [...path, ".personalStatus"], PersonalStatus, 'PersonalStatus'),
|
|
452
|
+
dateOfBirth: expectNumber(extractEntry(jCpy, 'dateOfBirth', false, path), true, true, [...path, ".dateOfBirth"]),
|
|
453
|
+
dateOfDeath: expectNumber(extractEntry(jCpy, 'dateOfDeath', false, path), true, true, [...path, ".dateOfDeath"]),
|
|
454
|
+
timestampOfLatestEidReading: expectNumber(extractEntry(jCpy, 'timestampOfLatestEidReading', false, path), true, true, [...path, ".timestampOfLatestEidReading"]),
|
|
455
|
+
placeOfBirth: expectString(extractEntry(jCpy, 'placeOfBirth', false, path), true, [...path, ".placeOfBirth"]),
|
|
456
|
+
placeOfDeath: expectString(extractEntry(jCpy, 'placeOfDeath', false, path), true, [...path, ".placeOfDeath"]),
|
|
457
|
+
deceased: expectBoolean(extractEntry(jCpy, 'deceased', false, path), true, [...path, ".deceased"]),
|
|
458
|
+
education: expectString(extractEntry(jCpy, 'education', false, path), true, [...path, ".education"]),
|
|
459
|
+
profession: expectString(extractEntry(jCpy, 'profession', false, path), true, [...path, ".profession"]),
|
|
460
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Annotation.fromJSON)),
|
|
461
|
+
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
462
|
+
administrativeNote: expectString(extractEntry(jCpy, 'administrativeNote', false, path), true, [...path, ".administrativeNote"]),
|
|
463
|
+
nationality: expectString(extractEntry(jCpy, 'nationality', false, path), true, [...path, ".nationality"]),
|
|
464
|
+
race: expectString(extractEntry(jCpy, 'race', false, path), true, [...path, ".race"]),
|
|
465
|
+
ethnicity: expectString(extractEntry(jCpy, 'ethnicity', false, path), true, [...path, ".ethnicity"]),
|
|
466
|
+
preferredUserId: expectString(extractEntry(jCpy, 'preferredUserId', false, path), true, [...path, ".preferredUserId"]),
|
|
467
|
+
picture: decodeBase64(expectString(extractEntry(jCpy, 'picture', false, path), true, [...path, ".picture"]), [...path, ".picture"]),
|
|
468
|
+
externalId: expectString(extractEntry(jCpy, 'externalId', false, path), true, [...path, ".externalId"]),
|
|
469
|
+
insurabilities: expectArray(extractEntry(jCpy, 'insurabilities', false, path), false, [...path, ".insurabilities"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedInsurability.fromJSON)),
|
|
470
|
+
partnerships: expectArray(extractEntry(jCpy, 'partnerships', false, path), false, [...path, ".partnerships"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Partnership.fromJSON)),
|
|
471
|
+
patientHealthCareParties: expectArray(extractEntry(jCpy, 'patientHealthCareParties', false, path), false, [...path, ".patientHealthCareParties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPatientHealthCareParty.fromJSON)),
|
|
472
|
+
financialInstitutionInformation: expectArray(extractEntry(jCpy, 'financialInstitutionInformation', false, path), false, [...path, ".financialInstitutionInformation"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedFinancialInstitutionInformation.fromJSON)),
|
|
473
|
+
medicalHouseContracts: expectArray(extractEntry(jCpy, 'medicalHouseContracts', false, path), false, [...path, ".medicalHouseContracts"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedMedicalHouseContract.fromJSON)),
|
|
474
|
+
patientProfessions: expectArray(extractEntry(jCpy, 'patientProfessions', false, path), false, [...path, ".patientProfessions"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
475
|
+
parameters: expectMap(extractEntry(jCpy, 'parameters', false, path), false, [...path, ".parameters"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
|
|
476
|
+
properties: expectArray(extractEntry(jCpy, 'properties', false, path), false, [...path, ".properties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
|
|
477
|
+
hcPartyKeys: expectMap(extractEntry(jCpy, 'hcPartyKeys', false, path), false, [...path, ".hcPartyKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
|
|
478
|
+
aesExchangeKeys: expectMap(extractEntry(jCpy, 'aesExchangeKeys', false, path), false, [...path, ".aesExchangeKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectMap(v0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectMap(v1, false, p1, (k2, p2) => expectString(k2, false, p2), (v2, p2) => expectString(v2, false, p2)))),
|
|
479
|
+
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))),
|
|
480
|
+
privateKeyShamirPartitions: expectMap(extractEntry(jCpy, 'privateKeyShamirPartitions', false, path), false, [...path, ".privateKeyShamirPartitions"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
481
|
+
publicKey: expectString(extractEntry(jCpy, 'publicKey', false, path), true, [...path, ".publicKey"]),
|
|
482
|
+
publicKeysForOaepWithSha256: expectArray(extractEntry(jCpy, 'publicKeysForOaepWithSha256', false, path), false, [...path, ".publicKeysForOaepWithSha256"], (x0, p0) => expectString(x0, false, p0)),
|
|
483
|
+
secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
|
|
484
|
+
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))),
|
|
485
|
+
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))),
|
|
486
|
+
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))),
|
|
487
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
488
|
+
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
489
|
+
cryptoActorProperties: expectArray(extractEntry(jCpy, 'cryptoActorProperties', false, path), true, [...path, ".cryptoActorProperties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
|
|
490
|
+
medicalLocationId: expectString(extractEntry(jCpy, 'medicalLocationId', false, path), true, [...path, ".medicalLocationId"]),
|
|
491
|
+
nonDuplicateIds: expectArray(extractEntry(jCpy, 'nonDuplicateIds', false, path), false, [...path, ".nonDuplicateIds"], (x0, p0) => expectString(x0, false, p0)),
|
|
492
|
+
encryptedAdministrativesDocuments: expectArray(extractEntry(jCpy, 'encryptedAdministrativesDocuments', false, path), false, [...path, ".encryptedAdministrativesDocuments"], (x0, p0) => expectString(x0, false, p0)),
|
|
493
|
+
comment: expectString(extractEntry(jCpy, 'comment', false, path), true, [...path, ".comment"]),
|
|
494
|
+
warning: expectString(extractEntry(jCpy, 'warning', false, path), true, [...path, ".warning"]),
|
|
495
|
+
fatherBirthCountry: expectObject(extractEntry(jCpy, 'fatherBirthCountry', false, path), true, ignoreUnknownKeys, [...path, ".fatherBirthCountry"], CodeStub.fromJSON),
|
|
496
|
+
birthCountry: expectObject(extractEntry(jCpy, 'birthCountry', false, path), true, ignoreUnknownKeys, [...path, ".birthCountry"], CodeStub.fromJSON),
|
|
497
|
+
nativeCountry: expectObject(extractEntry(jCpy, 'nativeCountry', false, path), true, ignoreUnknownKeys, [...path, ".nativeCountry"], CodeStub.fromJSON),
|
|
498
|
+
socialStatus: expectObject(extractEntry(jCpy, 'socialStatus', false, path), true, ignoreUnknownKeys, [...path, ".socialStatus"], CodeStub.fromJSON),
|
|
499
|
+
mainSourceOfIncome: expectObject(extractEntry(jCpy, 'mainSourceOfIncome', false, path), true, ignoreUnknownKeys, [...path, ".mainSourceOfIncome"], CodeStub.fromJSON),
|
|
500
|
+
schoolingInfos: expectArray(extractEntry(jCpy, 'schoolingInfos', false, path), false, [...path, ".schoolingInfos"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedSchoolingInfo.fromJSON)),
|
|
501
|
+
employementInfos: expectArray(extractEntry(jCpy, 'employementInfos', false, path), false, [...path, ".employementInfos"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedEmploymentInfo.fromJSON)),
|
|
502
|
+
parentId: expectNullish(extractEntry(jCpy, 'parentId', false, path), [...path, ".parentId"]),
|
|
503
|
+
});
|
|
504
|
+
if (!ignoreUnknownKeys) {
|
|
505
|
+
const unused = Object.keys(jCpy);
|
|
506
|
+
if (unused.length > 0)
|
|
507
|
+
throw new Error(`Unexpected key(s) for json object DecryptedPatient at path ${path.join("")}: ${unused}`);
|
|
508
|
+
}
|
|
509
|
+
return res;
|
|
510
|
+
}
|
|
257
511
|
}
|
|
258
512
|
export class EncryptedPatient {
|
|
259
513
|
constructor(partial) {
|
|
@@ -507,4 +761,241 @@ export class EncryptedPatient {
|
|
|
507
761
|
if ('parentId' in partial)
|
|
508
762
|
this.parentId = partial.parentId;
|
|
509
763
|
}
|
|
764
|
+
toJSON() {
|
|
765
|
+
const res = {};
|
|
766
|
+
res['id'] = this.id;
|
|
767
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
768
|
+
if (this.rev != undefined)
|
|
769
|
+
res['rev'] = this.rev;
|
|
770
|
+
if (this.created != undefined)
|
|
771
|
+
res['created'] = this.created;
|
|
772
|
+
if (this.modified != undefined)
|
|
773
|
+
res['modified'] = this.modified;
|
|
774
|
+
if (this.author != undefined)
|
|
775
|
+
res['author'] = this.author;
|
|
776
|
+
if (this.responsible != undefined)
|
|
777
|
+
res['responsible'] = this.responsible;
|
|
778
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
779
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
780
|
+
if (this.endOfLife != undefined)
|
|
781
|
+
res['endOfLife'] = this.endOfLife;
|
|
782
|
+
if (this.deletionDate != undefined)
|
|
783
|
+
res['deletionDate'] = this.deletionDate;
|
|
784
|
+
if (this.firstName != undefined)
|
|
785
|
+
res['firstName'] = this.firstName;
|
|
786
|
+
if (this.lastName != undefined)
|
|
787
|
+
res['lastName'] = this.lastName;
|
|
788
|
+
res['names'] = this.names.map((x0) => x0.toJSON());
|
|
789
|
+
if (this.companyName != undefined)
|
|
790
|
+
res['companyName'] = this.companyName;
|
|
791
|
+
res['languages'] = this.languages.map((x0) => x0);
|
|
792
|
+
res['addresses'] = this.addresses.map((x0) => x0.toJSON());
|
|
793
|
+
if (this.civility != undefined)
|
|
794
|
+
res['civility'] = this.civility;
|
|
795
|
+
if (this.gender != undefined)
|
|
796
|
+
res['gender'] = this.gender;
|
|
797
|
+
if (this.birthSex != undefined)
|
|
798
|
+
res['birthSex'] = this.birthSex;
|
|
799
|
+
if (this.mergeToPatientId != undefined)
|
|
800
|
+
res['mergeToPatientId'] = this.mergeToPatientId;
|
|
801
|
+
res['mergedIds'] = this.mergedIds.map((x0) => x0);
|
|
802
|
+
if (this.alias != undefined)
|
|
803
|
+
res['alias'] = this.alias;
|
|
804
|
+
res['active'] = this.active;
|
|
805
|
+
res['deactivationReason'] = this.deactivationReason;
|
|
806
|
+
if (this.deactivationDate != undefined)
|
|
807
|
+
res['deactivationDate'] = this.deactivationDate;
|
|
808
|
+
if (this.ssin != undefined)
|
|
809
|
+
res['ssin'] = this.ssin;
|
|
810
|
+
if (this.maidenName != undefined)
|
|
811
|
+
res['maidenName'] = this.maidenName;
|
|
812
|
+
if (this.spouseName != undefined)
|
|
813
|
+
res['spouseName'] = this.spouseName;
|
|
814
|
+
if (this.partnerName != undefined)
|
|
815
|
+
res['partnerName'] = this.partnerName;
|
|
816
|
+
if (this.personalStatus != undefined)
|
|
817
|
+
res['personalStatus'] = this.personalStatus;
|
|
818
|
+
if (this.dateOfBirth != undefined)
|
|
819
|
+
res['dateOfBirth'] = this.dateOfBirth;
|
|
820
|
+
if (this.dateOfDeath != undefined)
|
|
821
|
+
res['dateOfDeath'] = this.dateOfDeath;
|
|
822
|
+
if (this.timestampOfLatestEidReading != undefined)
|
|
823
|
+
res['timestampOfLatestEidReading'] = this.timestampOfLatestEidReading;
|
|
824
|
+
if (this.placeOfBirth != undefined)
|
|
825
|
+
res['placeOfBirth'] = this.placeOfBirth;
|
|
826
|
+
if (this.placeOfDeath != undefined)
|
|
827
|
+
res['placeOfDeath'] = this.placeOfDeath;
|
|
828
|
+
if (this.deceased != undefined)
|
|
829
|
+
res['deceased'] = this.deceased;
|
|
830
|
+
if (this.education != undefined)
|
|
831
|
+
res['education'] = this.education;
|
|
832
|
+
if (this.profession != undefined)
|
|
833
|
+
res['profession'] = this.profession;
|
|
834
|
+
res['notes'] = this.notes.map((x0) => x0.toJSON());
|
|
835
|
+
if (this.note != undefined)
|
|
836
|
+
res['note'] = this.note;
|
|
837
|
+
if (this.administrativeNote != undefined)
|
|
838
|
+
res['administrativeNote'] = this.administrativeNote;
|
|
839
|
+
if (this.nationality != undefined)
|
|
840
|
+
res['nationality'] = this.nationality;
|
|
841
|
+
if (this.race != undefined)
|
|
842
|
+
res['race'] = this.race;
|
|
843
|
+
if (this.ethnicity != undefined)
|
|
844
|
+
res['ethnicity'] = this.ethnicity;
|
|
845
|
+
if (this.preferredUserId != undefined)
|
|
846
|
+
res['preferredUserId'] = this.preferredUserId;
|
|
847
|
+
if (this.picture != undefined)
|
|
848
|
+
res['picture'] = encodeBase64(this.picture);
|
|
849
|
+
if (this.externalId != undefined)
|
|
850
|
+
res['externalId'] = this.externalId;
|
|
851
|
+
res['insurabilities'] = this.insurabilities.map((x0) => x0.toJSON());
|
|
852
|
+
res['partnerships'] = this.partnerships.map((x0) => x0.toJSON());
|
|
853
|
+
res['patientHealthCareParties'] = this.patientHealthCareParties.map((x0) => x0.toJSON());
|
|
854
|
+
res['financialInstitutionInformation'] = this.financialInstitutionInformation.map((x0) => x0.toJSON());
|
|
855
|
+
res['medicalHouseContracts'] = this.medicalHouseContracts.map((x0) => x0.toJSON());
|
|
856
|
+
res['patientProfessions'] = this.patientProfessions.map((x0) => x0.toJSON());
|
|
857
|
+
res['parameters'] = Object.fromEntries(Object.entries(this.parameters).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
|
|
858
|
+
res['properties'] = this.properties.map((x0) => x0.toJSON());
|
|
859
|
+
res['hcPartyKeys'] = Object.fromEntries(Object.entries(this.hcPartyKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
|
|
860
|
+
res['aesExchangeKeys'] = Object.fromEntries(Object.entries(this.aesExchangeKeys).map(([k0, v0]) => [k0, Object.fromEntries(Object.entries(v0).map(([k1, v1]) => [k1, Object.fromEntries(Object.entries(v1).map(([k2, v2]) => [k2, v2]))]))]));
|
|
861
|
+
res['transferKeys'] = Object.fromEntries(Object.entries(this.transferKeys).map(([k0, v0]) => [k0, Object.fromEntries(Object.entries(v0).map(([k1, v1]) => [k1, v1]))]));
|
|
862
|
+
res['privateKeyShamirPartitions'] = Object.fromEntries(Object.entries(this.privateKeyShamirPartitions).map(([k0, v0]) => [k0, v0]));
|
|
863
|
+
if (this.publicKey != undefined)
|
|
864
|
+
res['publicKey'] = this.publicKey;
|
|
865
|
+
res['publicKeysForOaepWithSha256'] = this.publicKeysForOaepWithSha256.map((x0) => x0);
|
|
866
|
+
res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
|
|
867
|
+
res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
868
|
+
res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
869
|
+
res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
870
|
+
if (this.encryptedSelf != undefined)
|
|
871
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
872
|
+
if (this.securityMetadata != undefined)
|
|
873
|
+
res['securityMetadata'] = this.securityMetadata.toJSON();
|
|
874
|
+
if (this.cryptoActorProperties != undefined)
|
|
875
|
+
res['cryptoActorProperties'] = this.cryptoActorProperties.map((x0) => x0.toJSON());
|
|
876
|
+
if (this.medicalLocationId != undefined)
|
|
877
|
+
res['medicalLocationId'] = this.medicalLocationId;
|
|
878
|
+
res['nonDuplicateIds'] = this.nonDuplicateIds.map((x0) => x0);
|
|
879
|
+
res['encryptedAdministrativesDocuments'] = this.encryptedAdministrativesDocuments.map((x0) => x0);
|
|
880
|
+
if (this.comment != undefined)
|
|
881
|
+
res['comment'] = this.comment;
|
|
882
|
+
if (this.warning != undefined)
|
|
883
|
+
res['warning'] = this.warning;
|
|
884
|
+
if (this.fatherBirthCountry != undefined)
|
|
885
|
+
res['fatherBirthCountry'] = this.fatherBirthCountry.toJSON();
|
|
886
|
+
if (this.birthCountry != undefined)
|
|
887
|
+
res['birthCountry'] = this.birthCountry.toJSON();
|
|
888
|
+
if (this.nativeCountry != undefined)
|
|
889
|
+
res['nativeCountry'] = this.nativeCountry.toJSON();
|
|
890
|
+
if (this.socialStatus != undefined)
|
|
891
|
+
res['socialStatus'] = this.socialStatus.toJSON();
|
|
892
|
+
if (this.mainSourceOfIncome != undefined)
|
|
893
|
+
res['mainSourceOfIncome'] = this.mainSourceOfIncome.toJSON();
|
|
894
|
+
res['schoolingInfos'] = this.schoolingInfos.map((x0) => x0.toJSON());
|
|
895
|
+
res['employementInfos'] = this.employementInfos.map((x0) => x0.toJSON());
|
|
896
|
+
if (this.parentId != undefined)
|
|
897
|
+
throw new Error('Unexpected nullish value for parentId');
|
|
898
|
+
res['isEncrypted'] = true;
|
|
899
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.EncryptedPatient';
|
|
900
|
+
return res;
|
|
901
|
+
}
|
|
902
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedPatient']) {
|
|
903
|
+
if (typeof json != 'object')
|
|
904
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
905
|
+
const jCpy = Object.assign({}, json);
|
|
906
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
|
|
907
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedPatient`);
|
|
908
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.EncryptedPatient')
|
|
909
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.EncryptedPatient". The provided json doesn't represent a EncryptedPatient`);
|
|
910
|
+
const res = new EncryptedPatient({
|
|
911
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
912
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
913
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
914
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
915
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
916
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
917
|
+
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
918
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
919
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
920
|
+
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
921
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
922
|
+
firstName: expectString(extractEntry(jCpy, 'firstName', false, path), true, [...path, ".firstName"]),
|
|
923
|
+
lastName: expectString(extractEntry(jCpy, 'lastName', false, path), true, [...path, ".lastName"]),
|
|
924
|
+
names: expectArray(extractEntry(jCpy, 'names', false, path), false, [...path, ".names"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, PersonName.fromJSON)),
|
|
925
|
+
companyName: expectString(extractEntry(jCpy, 'companyName', false, path), true, [...path, ".companyName"]),
|
|
926
|
+
languages: expectArray(extractEntry(jCpy, 'languages', false, path), false, [...path, ".languages"], (x0, p0) => expectString(x0, false, p0)),
|
|
927
|
+
addresses: expectArray(extractEntry(jCpy, 'addresses', false, path), false, [...path, ".addresses"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedAddress.fromJSON)),
|
|
928
|
+
civility: expectString(extractEntry(jCpy, 'civility', false, path), true, [...path, ".civility"]),
|
|
929
|
+
gender: expectStringEnum(extractEntry(jCpy, 'gender', false, path), true, [...path, ".gender"], Gender, 'Gender'),
|
|
930
|
+
birthSex: expectStringEnum(extractEntry(jCpy, 'birthSex', false, path), true, [...path, ".birthSex"], Gender, 'Gender'),
|
|
931
|
+
mergeToPatientId: expectString(extractEntry(jCpy, 'mergeToPatientId', false, path), true, [...path, ".mergeToPatientId"]),
|
|
932
|
+
mergedIds: expectArray(extractEntry(jCpy, 'mergedIds', false, path), false, [...path, ".mergedIds"], (x0, p0) => expectString(x0, false, p0)),
|
|
933
|
+
alias: expectString(extractEntry(jCpy, 'alias', false, path), true, [...path, ".alias"]),
|
|
934
|
+
active: expectBoolean(extractEntry(jCpy, 'active', false, path), false, [...path, ".active"]),
|
|
935
|
+
deactivationReason: expectString(extractEntry(jCpy, 'deactivationReason', false, path), false, [...path, ".deactivationReason"]),
|
|
936
|
+
deactivationDate: expectNumber(extractEntry(jCpy, 'deactivationDate', false, path), true, true, [...path, ".deactivationDate"]),
|
|
937
|
+
ssin: expectString(extractEntry(jCpy, 'ssin', false, path), true, [...path, ".ssin"]),
|
|
938
|
+
maidenName: expectString(extractEntry(jCpy, 'maidenName', false, path), true, [...path, ".maidenName"]),
|
|
939
|
+
spouseName: expectString(extractEntry(jCpy, 'spouseName', false, path), true, [...path, ".spouseName"]),
|
|
940
|
+
partnerName: expectString(extractEntry(jCpy, 'partnerName', false, path), true, [...path, ".partnerName"]),
|
|
941
|
+
personalStatus: expectStringEnum(extractEntry(jCpy, 'personalStatus', false, path), true, [...path, ".personalStatus"], PersonalStatus, 'PersonalStatus'),
|
|
942
|
+
dateOfBirth: expectNumber(extractEntry(jCpy, 'dateOfBirth', false, path), true, true, [...path, ".dateOfBirth"]),
|
|
943
|
+
dateOfDeath: expectNumber(extractEntry(jCpy, 'dateOfDeath', false, path), true, true, [...path, ".dateOfDeath"]),
|
|
944
|
+
timestampOfLatestEidReading: expectNumber(extractEntry(jCpy, 'timestampOfLatestEidReading', false, path), true, true, [...path, ".timestampOfLatestEidReading"]),
|
|
945
|
+
placeOfBirth: expectString(extractEntry(jCpy, 'placeOfBirth', false, path), true, [...path, ".placeOfBirth"]),
|
|
946
|
+
placeOfDeath: expectString(extractEntry(jCpy, 'placeOfDeath', false, path), true, [...path, ".placeOfDeath"]),
|
|
947
|
+
deceased: expectBoolean(extractEntry(jCpy, 'deceased', false, path), true, [...path, ".deceased"]),
|
|
948
|
+
education: expectString(extractEntry(jCpy, 'education', false, path), true, [...path, ".education"]),
|
|
949
|
+
profession: expectString(extractEntry(jCpy, 'profession', false, path), true, [...path, ".profession"]),
|
|
950
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Annotation.fromJSON)),
|
|
951
|
+
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
952
|
+
administrativeNote: expectString(extractEntry(jCpy, 'administrativeNote', false, path), true, [...path, ".administrativeNote"]),
|
|
953
|
+
nationality: expectString(extractEntry(jCpy, 'nationality', false, path), true, [...path, ".nationality"]),
|
|
954
|
+
race: expectString(extractEntry(jCpy, 'race', false, path), true, [...path, ".race"]),
|
|
955
|
+
ethnicity: expectString(extractEntry(jCpy, 'ethnicity', false, path), true, [...path, ".ethnicity"]),
|
|
956
|
+
preferredUserId: expectString(extractEntry(jCpy, 'preferredUserId', false, path), true, [...path, ".preferredUserId"]),
|
|
957
|
+
picture: decodeBase64(expectString(extractEntry(jCpy, 'picture', false, path), true, [...path, ".picture"]), [...path, ".picture"]),
|
|
958
|
+
externalId: expectString(extractEntry(jCpy, 'externalId', false, path), true, [...path, ".externalId"]),
|
|
959
|
+
insurabilities: expectArray(extractEntry(jCpy, 'insurabilities', false, path), false, [...path, ".insurabilities"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedInsurability.fromJSON)),
|
|
960
|
+
partnerships: expectArray(extractEntry(jCpy, 'partnerships', false, path), false, [...path, ".partnerships"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Partnership.fromJSON)),
|
|
961
|
+
patientHealthCareParties: expectArray(extractEntry(jCpy, 'patientHealthCareParties', false, path), false, [...path, ".patientHealthCareParties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedPatientHealthCareParty.fromJSON)),
|
|
962
|
+
financialInstitutionInformation: expectArray(extractEntry(jCpy, 'financialInstitutionInformation', false, path), false, [...path, ".financialInstitutionInformation"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedFinancialInstitutionInformation.fromJSON)),
|
|
963
|
+
medicalHouseContracts: expectArray(extractEntry(jCpy, 'medicalHouseContracts', false, path), false, [...path, ".medicalHouseContracts"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedMedicalHouseContract.fromJSON)),
|
|
964
|
+
patientProfessions: expectArray(extractEntry(jCpy, 'patientProfessions', false, path), false, [...path, ".patientProfessions"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
965
|
+
parameters: expectMap(extractEntry(jCpy, 'parameters', false, path), false, [...path, ".parameters"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
|
|
966
|
+
properties: expectArray(extractEntry(jCpy, 'properties', false, path), false, [...path, ".properties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedPropertyStub.fromJSON)),
|
|
967
|
+
hcPartyKeys: expectMap(extractEntry(jCpy, 'hcPartyKeys', false, path), false, [...path, ".hcPartyKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
|
|
968
|
+
aesExchangeKeys: expectMap(extractEntry(jCpy, 'aesExchangeKeys', false, path), false, [...path, ".aesExchangeKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectMap(v0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectMap(v1, false, p1, (k2, p2) => expectString(k2, false, p2), (v2, p2) => expectString(v2, false, p2)))),
|
|
969
|
+
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))),
|
|
970
|
+
privateKeyShamirPartitions: expectMap(extractEntry(jCpy, 'privateKeyShamirPartitions', false, path), false, [...path, ".privateKeyShamirPartitions"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
971
|
+
publicKey: expectString(extractEntry(jCpy, 'publicKey', false, path), true, [...path, ".publicKey"]),
|
|
972
|
+
publicKeysForOaepWithSha256: expectArray(extractEntry(jCpy, 'publicKeysForOaepWithSha256', false, path), false, [...path, ".publicKeysForOaepWithSha256"], (x0, p0) => expectString(x0, false, p0)),
|
|
973
|
+
secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
|
|
974
|
+
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))),
|
|
975
|
+
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))),
|
|
976
|
+
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))),
|
|
977
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
978
|
+
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
979
|
+
cryptoActorProperties: expectArray(extractEntry(jCpy, 'cryptoActorProperties', false, path), true, [...path, ".cryptoActorProperties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
|
|
980
|
+
medicalLocationId: expectString(extractEntry(jCpy, 'medicalLocationId', false, path), true, [...path, ".medicalLocationId"]),
|
|
981
|
+
nonDuplicateIds: expectArray(extractEntry(jCpy, 'nonDuplicateIds', false, path), false, [...path, ".nonDuplicateIds"], (x0, p0) => expectString(x0, false, p0)),
|
|
982
|
+
encryptedAdministrativesDocuments: expectArray(extractEntry(jCpy, 'encryptedAdministrativesDocuments', false, path), false, [...path, ".encryptedAdministrativesDocuments"], (x0, p0) => expectString(x0, false, p0)),
|
|
983
|
+
comment: expectString(extractEntry(jCpy, 'comment', false, path), true, [...path, ".comment"]),
|
|
984
|
+
warning: expectString(extractEntry(jCpy, 'warning', false, path), true, [...path, ".warning"]),
|
|
985
|
+
fatherBirthCountry: expectObject(extractEntry(jCpy, 'fatherBirthCountry', false, path), true, ignoreUnknownKeys, [...path, ".fatherBirthCountry"], CodeStub.fromJSON),
|
|
986
|
+
birthCountry: expectObject(extractEntry(jCpy, 'birthCountry', false, path), true, ignoreUnknownKeys, [...path, ".birthCountry"], CodeStub.fromJSON),
|
|
987
|
+
nativeCountry: expectObject(extractEntry(jCpy, 'nativeCountry', false, path), true, ignoreUnknownKeys, [...path, ".nativeCountry"], CodeStub.fromJSON),
|
|
988
|
+
socialStatus: expectObject(extractEntry(jCpy, 'socialStatus', false, path), true, ignoreUnknownKeys, [...path, ".socialStatus"], CodeStub.fromJSON),
|
|
989
|
+
mainSourceOfIncome: expectObject(extractEntry(jCpy, 'mainSourceOfIncome', false, path), true, ignoreUnknownKeys, [...path, ".mainSourceOfIncome"], CodeStub.fromJSON),
|
|
990
|
+
schoolingInfos: expectArray(extractEntry(jCpy, 'schoolingInfos', false, path), false, [...path, ".schoolingInfos"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedSchoolingInfo.fromJSON)),
|
|
991
|
+
employementInfos: expectArray(extractEntry(jCpy, 'employementInfos', false, path), false, [...path, ".employementInfos"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedEmploymentInfo.fromJSON)),
|
|
992
|
+
parentId: expectNullish(extractEntry(jCpy, 'parentId', false, path), [...path, ".parentId"]),
|
|
993
|
+
});
|
|
994
|
+
if (!ignoreUnknownKeys) {
|
|
995
|
+
const unused = Object.keys(jCpy);
|
|
996
|
+
if (unused.length > 0)
|
|
997
|
+
throw new Error(`Unexpected key(s) for json object EncryptedPatient at path ${path.join("")}: ${unused}`);
|
|
998
|
+
}
|
|
999
|
+
return res;
|
|
1000
|
+
}
|
|
510
1001
|
}
|
package/model/Place.d.mts
CHANGED
|
@@ -8,4 +8,6 @@ export declare class Place implements StoredDocument, Named {
|
|
|
8
8
|
name: string | undefined;
|
|
9
9
|
address: DecryptedAddress | undefined;
|
|
10
10
|
constructor(partial: Partial<Place>);
|
|
11
|
+
toJSON(): object;
|
|
12
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Place;
|
|
11
13
|
}
|