@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
package/model/Invoice.mjs
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
import { randomUuid } from '../utils/Id.mjs';
|
|
4
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
5
|
+
import { Identifier } from './base/Identifier.mjs';
|
|
6
|
+
import { Delegation } from './embed/Delegation.mjs';
|
|
7
|
+
import { IdentityDocumentReader } from './embed/IdentityDocumentReader.mjs';
|
|
8
|
+
import { InvoiceInterventionType } from './embed/InvoiceInterventionType.mjs';
|
|
9
|
+
import { InvoiceType } from './embed/InvoiceType.mjs';
|
|
10
|
+
import { DecryptedInvoicingCode, EncryptedInvoicingCode } from './embed/InvoicingCode.mjs';
|
|
11
|
+
import { MediumType } from './embed/MediumType.mjs';
|
|
12
|
+
import { Payment } from './embed/Payment.mjs';
|
|
13
|
+
import { PaymentType } from './embed/PaymentType.mjs';
|
|
14
|
+
import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
|
|
3
15
|
export class DecryptedInvoice {
|
|
4
16
|
constructor(partial) {
|
|
5
17
|
var _a;
|
|
@@ -224,6 +236,234 @@ export class DecryptedInvoice {
|
|
|
224
236
|
if ('securityMetadata' in partial)
|
|
225
237
|
this.securityMetadata = partial.securityMetadata;
|
|
226
238
|
}
|
|
239
|
+
toJSON() {
|
|
240
|
+
const res = {};
|
|
241
|
+
res['id'] = this.id;
|
|
242
|
+
if (this.rev != undefined)
|
|
243
|
+
res['rev'] = this.rev;
|
|
244
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
245
|
+
if (this.created != undefined)
|
|
246
|
+
res['created'] = this.created;
|
|
247
|
+
if (this.modified != undefined)
|
|
248
|
+
res['modified'] = this.modified;
|
|
249
|
+
if (this.author != undefined)
|
|
250
|
+
res['author'] = this.author;
|
|
251
|
+
if (this.responsible != undefined)
|
|
252
|
+
res['responsible'] = this.responsible;
|
|
253
|
+
if (this.medicalLocationId != undefined)
|
|
254
|
+
res['medicalLocationId'] = this.medicalLocationId;
|
|
255
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
256
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
257
|
+
if (this.endOfLife != undefined)
|
|
258
|
+
res['endOfLife'] = this.endOfLife;
|
|
259
|
+
if (this.deletionDate != undefined)
|
|
260
|
+
res['deletionDate'] = this.deletionDate;
|
|
261
|
+
if (this.invoiceDate != undefined)
|
|
262
|
+
res['invoiceDate'] = this.invoiceDate;
|
|
263
|
+
if (this.sentDate != undefined)
|
|
264
|
+
res['sentDate'] = this.sentDate;
|
|
265
|
+
if (this.printedDate != undefined)
|
|
266
|
+
res['printedDate'] = this.printedDate;
|
|
267
|
+
res['invoicingCodes'] = this.invoicingCodes.map((x0) => x0.toJSON());
|
|
268
|
+
res['receipts'] = Object.fromEntries(Object.entries(this.receipts).map(([k0, v0]) => [k0, v0]));
|
|
269
|
+
if (this.recipientType != undefined)
|
|
270
|
+
res['recipientType'] = this.recipientType;
|
|
271
|
+
if (this.recipientId != undefined)
|
|
272
|
+
res['recipientId'] = this.recipientId;
|
|
273
|
+
if (this.invoiceReference != undefined)
|
|
274
|
+
res['invoiceReference'] = this.invoiceReference;
|
|
275
|
+
if (this.decisionReference != undefined)
|
|
276
|
+
res['decisionReference'] = this.decisionReference;
|
|
277
|
+
if (this.thirdPartyReference != undefined)
|
|
278
|
+
res['thirdPartyReference'] = this.thirdPartyReference;
|
|
279
|
+
if (this.thirdPartyPaymentJustification != undefined)
|
|
280
|
+
res['thirdPartyPaymentJustification'] = this.thirdPartyPaymentJustification;
|
|
281
|
+
if (this.thirdPartyPaymentReason != undefined)
|
|
282
|
+
res['thirdPartyPaymentReason'] = this.thirdPartyPaymentReason;
|
|
283
|
+
if (this.reason != undefined)
|
|
284
|
+
res['reason'] = this.reason;
|
|
285
|
+
if (this.invoiceType != undefined)
|
|
286
|
+
res['invoiceType'] = this.invoiceType;
|
|
287
|
+
if (this.sentMediumType != undefined)
|
|
288
|
+
res['sentMediumType'] = this.sentMediumType;
|
|
289
|
+
if (this.interventionType != undefined)
|
|
290
|
+
res['interventionType'] = this.interventionType;
|
|
291
|
+
if (this.groupId != undefined)
|
|
292
|
+
res['groupId'] = this.groupId;
|
|
293
|
+
if (this.paymentType != undefined)
|
|
294
|
+
res['paymentType'] = this.paymentType;
|
|
295
|
+
if (this.paid != undefined)
|
|
296
|
+
res['paid'] = this.paid;
|
|
297
|
+
if (this.payments != undefined)
|
|
298
|
+
res['payments'] = this.payments.map((x0) => x0.toJSON());
|
|
299
|
+
if (this.gnotionNihii != undefined)
|
|
300
|
+
res['gnotionNihii'] = this.gnotionNihii;
|
|
301
|
+
if (this.gnotionSsin != undefined)
|
|
302
|
+
res['gnotionSsin'] = this.gnotionSsin;
|
|
303
|
+
if (this.gnotionLastName != undefined)
|
|
304
|
+
res['gnotionLastName'] = this.gnotionLastName;
|
|
305
|
+
if (this.gnotionFirstName != undefined)
|
|
306
|
+
res['gnotionFirstName'] = this.gnotionFirstName;
|
|
307
|
+
if (this.gnotionCdHcParty != undefined)
|
|
308
|
+
res['gnotionCdHcParty'] = this.gnotionCdHcParty;
|
|
309
|
+
if (this.invoicePeriod != undefined)
|
|
310
|
+
res['invoicePeriod'] = this.invoicePeriod;
|
|
311
|
+
if (this.careProviderType != undefined)
|
|
312
|
+
res['careProviderType'] = this.careProviderType;
|
|
313
|
+
if (this.internshipNihii != undefined)
|
|
314
|
+
res['internshipNihii'] = this.internshipNihii;
|
|
315
|
+
if (this.internshipSsin != undefined)
|
|
316
|
+
res['internshipSsin'] = this.internshipSsin;
|
|
317
|
+
if (this.internshipLastName != undefined)
|
|
318
|
+
res['internshipLastName'] = this.internshipLastName;
|
|
319
|
+
if (this.internshipFirstName != undefined)
|
|
320
|
+
res['internshipFirstName'] = this.internshipFirstName;
|
|
321
|
+
if (this.internshipCdHcParty != undefined)
|
|
322
|
+
res['internshipCdHcParty'] = this.internshipCdHcParty;
|
|
323
|
+
if (this.internshipCbe != undefined)
|
|
324
|
+
res['internshipCbe'] = this.internshipCbe;
|
|
325
|
+
if (this.supervisorNihii != undefined)
|
|
326
|
+
res['supervisorNihii'] = this.supervisorNihii;
|
|
327
|
+
if (this.supervisorSsin != undefined)
|
|
328
|
+
res['supervisorSsin'] = this.supervisorSsin;
|
|
329
|
+
if (this.supervisorLastName != undefined)
|
|
330
|
+
res['supervisorLastName'] = this.supervisorLastName;
|
|
331
|
+
if (this.supervisorFirstName != undefined)
|
|
332
|
+
res['supervisorFirstName'] = this.supervisorFirstName;
|
|
333
|
+
if (this.supervisorCdHcParty != undefined)
|
|
334
|
+
res['supervisorCdHcParty'] = this.supervisorCdHcParty;
|
|
335
|
+
if (this.supervisorCbe != undefined)
|
|
336
|
+
res['supervisorCbe'] = this.supervisorCbe;
|
|
337
|
+
if (this.error != undefined)
|
|
338
|
+
res['error'] = this.error;
|
|
339
|
+
if (this.encounterLocationName != undefined)
|
|
340
|
+
res['encounterLocationName'] = this.encounterLocationName;
|
|
341
|
+
if (this.encounterLocationNihii != undefined)
|
|
342
|
+
res['encounterLocationNihii'] = this.encounterLocationNihii;
|
|
343
|
+
if (this.encounterLocationNorm != undefined)
|
|
344
|
+
res['encounterLocationNorm'] = this.encounterLocationNorm;
|
|
345
|
+
if (this.longDelayJustification != undefined)
|
|
346
|
+
res['longDelayJustification'] = this.longDelayJustification;
|
|
347
|
+
if (this.correctiveInvoiceId != undefined)
|
|
348
|
+
res['correctiveInvoiceId'] = this.correctiveInvoiceId;
|
|
349
|
+
if (this.correctedInvoiceId != undefined)
|
|
350
|
+
res['correctedInvoiceId'] = this.correctedInvoiceId;
|
|
351
|
+
if (this.creditNote != undefined)
|
|
352
|
+
res['creditNote'] = this.creditNote;
|
|
353
|
+
if (this.creditNoteRelatedInvoiceId != undefined)
|
|
354
|
+
res['creditNoteRelatedInvoiceId'] = this.creditNoteRelatedInvoiceId;
|
|
355
|
+
if (this.idDocument != undefined)
|
|
356
|
+
res['idDocument'] = this.idDocument.toJSON();
|
|
357
|
+
if (this.admissionDate != undefined)
|
|
358
|
+
res['admissionDate'] = this.admissionDate;
|
|
359
|
+
if (this.locationNihii != undefined)
|
|
360
|
+
res['locationNihii'] = this.locationNihii;
|
|
361
|
+
if (this.locationService != undefined)
|
|
362
|
+
res['locationService'] = this.locationService;
|
|
363
|
+
if (this.cancelReason != undefined)
|
|
364
|
+
res['cancelReason'] = this.cancelReason;
|
|
365
|
+
if (this.cancelDate != undefined)
|
|
366
|
+
res['cancelDate'] = this.cancelDate;
|
|
367
|
+
res['options'] = Object.fromEntries(Object.entries(this.options).map(([k0, v0]) => [k0, v0]));
|
|
368
|
+
res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
|
|
369
|
+
res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
370
|
+
res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
371
|
+
res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
372
|
+
if (this.encryptedSelf != undefined)
|
|
373
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
374
|
+
if (this.securityMetadata != undefined)
|
|
375
|
+
res['securityMetadata'] = this.securityMetadata.toJSON();
|
|
376
|
+
res['isEncrypted'] = false;
|
|
377
|
+
return res;
|
|
378
|
+
}
|
|
379
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedInvoice']) {
|
|
380
|
+
if (typeof json != 'object')
|
|
381
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
382
|
+
const jCpy = Object.assign({}, json);
|
|
383
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
|
|
384
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedInvoice`);
|
|
385
|
+
const res = new DecryptedInvoice({
|
|
386
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
387
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
388
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
389
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
390
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
391
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
392
|
+
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
393
|
+
medicalLocationId: expectString(extractEntry(jCpy, 'medicalLocationId', false, path), true, [...path, ".medicalLocationId"]),
|
|
394
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
395
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
396
|
+
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
397
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
398
|
+
invoiceDate: expectNumber(extractEntry(jCpy, 'invoiceDate', false, path), true, true, [...path, ".invoiceDate"]),
|
|
399
|
+
sentDate: expectNumber(extractEntry(jCpy, 'sentDate', false, path), true, true, [...path, ".sentDate"]),
|
|
400
|
+
printedDate: expectNumber(extractEntry(jCpy, 'printedDate', false, path), true, true, [...path, ".printedDate"]),
|
|
401
|
+
invoicingCodes: expectArray(extractEntry(jCpy, 'invoicingCodes', false, path), false, [...path, ".invoicingCodes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedInvoicingCode.fromJSON)),
|
|
402
|
+
receipts: expectMap(extractEntry(jCpy, 'receipts', false, path), false, [...path, ".receipts"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
403
|
+
recipientType: expectString(extractEntry(jCpy, 'recipientType', false, path), true, [...path, ".recipientType"]),
|
|
404
|
+
recipientId: expectString(extractEntry(jCpy, 'recipientId', false, path), true, [...path, ".recipientId"]),
|
|
405
|
+
invoiceReference: expectString(extractEntry(jCpy, 'invoiceReference', false, path), true, [...path, ".invoiceReference"]),
|
|
406
|
+
decisionReference: expectString(extractEntry(jCpy, 'decisionReference', false, path), true, [...path, ".decisionReference"]),
|
|
407
|
+
thirdPartyReference: expectString(extractEntry(jCpy, 'thirdPartyReference', false, path), true, [...path, ".thirdPartyReference"]),
|
|
408
|
+
thirdPartyPaymentJustification: expectString(extractEntry(jCpy, 'thirdPartyPaymentJustification', false, path), true, [...path, ".thirdPartyPaymentJustification"]),
|
|
409
|
+
thirdPartyPaymentReason: expectString(extractEntry(jCpy, 'thirdPartyPaymentReason', false, path), true, [...path, ".thirdPartyPaymentReason"]),
|
|
410
|
+
reason: expectString(extractEntry(jCpy, 'reason', false, path), true, [...path, ".reason"]),
|
|
411
|
+
invoiceType: expectStringEnum(extractEntry(jCpy, 'invoiceType', false, path), true, [...path, ".invoiceType"], InvoiceType, 'InvoiceType'),
|
|
412
|
+
sentMediumType: expectStringEnum(extractEntry(jCpy, 'sentMediumType', false, path), true, [...path, ".sentMediumType"], MediumType, 'MediumType'),
|
|
413
|
+
interventionType: expectStringEnum(extractEntry(jCpy, 'interventionType', false, path), true, [...path, ".interventionType"], InvoiceInterventionType, 'InvoiceInterventionType'),
|
|
414
|
+
groupId: expectString(extractEntry(jCpy, 'groupId', false, path), true, [...path, ".groupId"]),
|
|
415
|
+
paymentType: expectStringEnum(extractEntry(jCpy, 'paymentType', false, path), true, [...path, ".paymentType"], PaymentType, 'PaymentType'),
|
|
416
|
+
paid: expectNumber(extractEntry(jCpy, 'paid', false, path), true, false, [...path, ".paid"]),
|
|
417
|
+
payments: expectArray(extractEntry(jCpy, 'payments', false, path), true, [...path, ".payments"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Payment.fromJSON)),
|
|
418
|
+
gnotionNihii: expectString(extractEntry(jCpy, 'gnotionNihii', false, path), true, [...path, ".gnotionNihii"]),
|
|
419
|
+
gnotionSsin: expectString(extractEntry(jCpy, 'gnotionSsin', false, path), true, [...path, ".gnotionSsin"]),
|
|
420
|
+
gnotionLastName: expectString(extractEntry(jCpy, 'gnotionLastName', false, path), true, [...path, ".gnotionLastName"]),
|
|
421
|
+
gnotionFirstName: expectString(extractEntry(jCpy, 'gnotionFirstName', false, path), true, [...path, ".gnotionFirstName"]),
|
|
422
|
+
gnotionCdHcParty: expectString(extractEntry(jCpy, 'gnotionCdHcParty', false, path), true, [...path, ".gnotionCdHcParty"]),
|
|
423
|
+
invoicePeriod: expectNumber(extractEntry(jCpy, 'invoicePeriod', false, path), true, true, [...path, ".invoicePeriod"]),
|
|
424
|
+
careProviderType: expectString(extractEntry(jCpy, 'careProviderType', false, path), true, [...path, ".careProviderType"]),
|
|
425
|
+
internshipNihii: expectString(extractEntry(jCpy, 'internshipNihii', false, path), true, [...path, ".internshipNihii"]),
|
|
426
|
+
internshipSsin: expectString(extractEntry(jCpy, 'internshipSsin', false, path), true, [...path, ".internshipSsin"]),
|
|
427
|
+
internshipLastName: expectString(extractEntry(jCpy, 'internshipLastName', false, path), true, [...path, ".internshipLastName"]),
|
|
428
|
+
internshipFirstName: expectString(extractEntry(jCpy, 'internshipFirstName', false, path), true, [...path, ".internshipFirstName"]),
|
|
429
|
+
internshipCdHcParty: expectString(extractEntry(jCpy, 'internshipCdHcParty', false, path), true, [...path, ".internshipCdHcParty"]),
|
|
430
|
+
internshipCbe: expectString(extractEntry(jCpy, 'internshipCbe', false, path), true, [...path, ".internshipCbe"]),
|
|
431
|
+
supervisorNihii: expectString(extractEntry(jCpy, 'supervisorNihii', false, path), true, [...path, ".supervisorNihii"]),
|
|
432
|
+
supervisorSsin: expectString(extractEntry(jCpy, 'supervisorSsin', false, path), true, [...path, ".supervisorSsin"]),
|
|
433
|
+
supervisorLastName: expectString(extractEntry(jCpy, 'supervisorLastName', false, path), true, [...path, ".supervisorLastName"]),
|
|
434
|
+
supervisorFirstName: expectString(extractEntry(jCpy, 'supervisorFirstName', false, path), true, [...path, ".supervisorFirstName"]),
|
|
435
|
+
supervisorCdHcParty: expectString(extractEntry(jCpy, 'supervisorCdHcParty', false, path), true, [...path, ".supervisorCdHcParty"]),
|
|
436
|
+
supervisorCbe: expectString(extractEntry(jCpy, 'supervisorCbe', false, path), true, [...path, ".supervisorCbe"]),
|
|
437
|
+
error: expectString(extractEntry(jCpy, 'error', false, path), true, [...path, ".error"]),
|
|
438
|
+
encounterLocationName: expectString(extractEntry(jCpy, 'encounterLocationName', false, path), true, [...path, ".encounterLocationName"]),
|
|
439
|
+
encounterLocationNihii: expectString(extractEntry(jCpy, 'encounterLocationNihii', false, path), true, [...path, ".encounterLocationNihii"]),
|
|
440
|
+
encounterLocationNorm: expectNumber(extractEntry(jCpy, 'encounterLocationNorm', false, path), true, true, [...path, ".encounterLocationNorm"]),
|
|
441
|
+
longDelayJustification: expectNumber(extractEntry(jCpy, 'longDelayJustification', false, path), true, true, [...path, ".longDelayJustification"]),
|
|
442
|
+
correctiveInvoiceId: expectString(extractEntry(jCpy, 'correctiveInvoiceId', false, path), true, [...path, ".correctiveInvoiceId"]),
|
|
443
|
+
correctedInvoiceId: expectString(extractEntry(jCpy, 'correctedInvoiceId', false, path), true, [...path, ".correctedInvoiceId"]),
|
|
444
|
+
creditNote: expectBoolean(extractEntry(jCpy, 'creditNote', false, path), true, [...path, ".creditNote"]),
|
|
445
|
+
creditNoteRelatedInvoiceId: expectString(extractEntry(jCpy, 'creditNoteRelatedInvoiceId', false, path), true, [...path, ".creditNoteRelatedInvoiceId"]),
|
|
446
|
+
idDocument: expectObject(extractEntry(jCpy, 'idDocument', false, path), true, ignoreUnknownKeys, [...path, ".idDocument"], IdentityDocumentReader.fromJSON),
|
|
447
|
+
admissionDate: expectNumber(extractEntry(jCpy, 'admissionDate', false, path), true, true, [...path, ".admissionDate"]),
|
|
448
|
+
locationNihii: expectString(extractEntry(jCpy, 'locationNihii', false, path), true, [...path, ".locationNihii"]),
|
|
449
|
+
locationService: expectNumber(extractEntry(jCpy, 'locationService', false, path), true, true, [...path, ".locationService"]),
|
|
450
|
+
cancelReason: expectString(extractEntry(jCpy, 'cancelReason', false, path), true, [...path, ".cancelReason"]),
|
|
451
|
+
cancelDate: expectNumber(extractEntry(jCpy, 'cancelDate', false, path), true, true, [...path, ".cancelDate"]),
|
|
452
|
+
options: expectMap(extractEntry(jCpy, 'options', false, path), false, [...path, ".options"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
453
|
+
secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
|
|
454
|
+
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))),
|
|
455
|
+
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))),
|
|
456
|
+
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))),
|
|
457
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
458
|
+
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
459
|
+
});
|
|
460
|
+
if (!ignoreUnknownKeys) {
|
|
461
|
+
const unused = Object.keys(jCpy);
|
|
462
|
+
if (unused.length > 0)
|
|
463
|
+
throw new Error(`Unexpected key(s) for json object DecryptedInvoice at path ${path.join("")}: ${unused}`);
|
|
464
|
+
}
|
|
465
|
+
return res;
|
|
466
|
+
}
|
|
227
467
|
}
|
|
228
468
|
export class EncryptedInvoice {
|
|
229
469
|
constructor(partial) {
|
|
@@ -449,4 +689,232 @@ export class EncryptedInvoice {
|
|
|
449
689
|
if ('securityMetadata' in partial)
|
|
450
690
|
this.securityMetadata = partial.securityMetadata;
|
|
451
691
|
}
|
|
692
|
+
toJSON() {
|
|
693
|
+
const res = {};
|
|
694
|
+
res['id'] = this.id;
|
|
695
|
+
if (this.rev != undefined)
|
|
696
|
+
res['rev'] = this.rev;
|
|
697
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
698
|
+
if (this.created != undefined)
|
|
699
|
+
res['created'] = this.created;
|
|
700
|
+
if (this.modified != undefined)
|
|
701
|
+
res['modified'] = this.modified;
|
|
702
|
+
if (this.author != undefined)
|
|
703
|
+
res['author'] = this.author;
|
|
704
|
+
if (this.responsible != undefined)
|
|
705
|
+
res['responsible'] = this.responsible;
|
|
706
|
+
if (this.medicalLocationId != undefined)
|
|
707
|
+
res['medicalLocationId'] = this.medicalLocationId;
|
|
708
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
709
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
710
|
+
if (this.endOfLife != undefined)
|
|
711
|
+
res['endOfLife'] = this.endOfLife;
|
|
712
|
+
if (this.deletionDate != undefined)
|
|
713
|
+
res['deletionDate'] = this.deletionDate;
|
|
714
|
+
if (this.invoiceDate != undefined)
|
|
715
|
+
res['invoiceDate'] = this.invoiceDate;
|
|
716
|
+
if (this.sentDate != undefined)
|
|
717
|
+
res['sentDate'] = this.sentDate;
|
|
718
|
+
if (this.printedDate != undefined)
|
|
719
|
+
res['printedDate'] = this.printedDate;
|
|
720
|
+
res['invoicingCodes'] = this.invoicingCodes.map((x0) => x0.toJSON());
|
|
721
|
+
res['receipts'] = Object.fromEntries(Object.entries(this.receipts).map(([k0, v0]) => [k0, v0]));
|
|
722
|
+
if (this.recipientType != undefined)
|
|
723
|
+
res['recipientType'] = this.recipientType;
|
|
724
|
+
if (this.recipientId != undefined)
|
|
725
|
+
res['recipientId'] = this.recipientId;
|
|
726
|
+
if (this.invoiceReference != undefined)
|
|
727
|
+
res['invoiceReference'] = this.invoiceReference;
|
|
728
|
+
if (this.decisionReference != undefined)
|
|
729
|
+
res['decisionReference'] = this.decisionReference;
|
|
730
|
+
if (this.thirdPartyReference != undefined)
|
|
731
|
+
res['thirdPartyReference'] = this.thirdPartyReference;
|
|
732
|
+
if (this.thirdPartyPaymentJustification != undefined)
|
|
733
|
+
res['thirdPartyPaymentJustification'] = this.thirdPartyPaymentJustification;
|
|
734
|
+
if (this.thirdPartyPaymentReason != undefined)
|
|
735
|
+
res['thirdPartyPaymentReason'] = this.thirdPartyPaymentReason;
|
|
736
|
+
if (this.reason != undefined)
|
|
737
|
+
res['reason'] = this.reason;
|
|
738
|
+
if (this.invoiceType != undefined)
|
|
739
|
+
res['invoiceType'] = this.invoiceType;
|
|
740
|
+
if (this.sentMediumType != undefined)
|
|
741
|
+
res['sentMediumType'] = this.sentMediumType;
|
|
742
|
+
if (this.interventionType != undefined)
|
|
743
|
+
res['interventionType'] = this.interventionType;
|
|
744
|
+
if (this.groupId != undefined)
|
|
745
|
+
res['groupId'] = this.groupId;
|
|
746
|
+
if (this.paymentType != undefined)
|
|
747
|
+
res['paymentType'] = this.paymentType;
|
|
748
|
+
if (this.paid != undefined)
|
|
749
|
+
res['paid'] = this.paid;
|
|
750
|
+
if (this.payments != undefined)
|
|
751
|
+
res['payments'] = this.payments.map((x0) => x0.toJSON());
|
|
752
|
+
if (this.gnotionNihii != undefined)
|
|
753
|
+
res['gnotionNihii'] = this.gnotionNihii;
|
|
754
|
+
if (this.gnotionSsin != undefined)
|
|
755
|
+
res['gnotionSsin'] = this.gnotionSsin;
|
|
756
|
+
if (this.gnotionLastName != undefined)
|
|
757
|
+
res['gnotionLastName'] = this.gnotionLastName;
|
|
758
|
+
if (this.gnotionFirstName != undefined)
|
|
759
|
+
res['gnotionFirstName'] = this.gnotionFirstName;
|
|
760
|
+
if (this.gnotionCdHcParty != undefined)
|
|
761
|
+
res['gnotionCdHcParty'] = this.gnotionCdHcParty;
|
|
762
|
+
if (this.invoicePeriod != undefined)
|
|
763
|
+
res['invoicePeriod'] = this.invoicePeriod;
|
|
764
|
+
if (this.careProviderType != undefined)
|
|
765
|
+
res['careProviderType'] = this.careProviderType;
|
|
766
|
+
if (this.internshipNihii != undefined)
|
|
767
|
+
res['internshipNihii'] = this.internshipNihii;
|
|
768
|
+
if (this.internshipSsin != undefined)
|
|
769
|
+
res['internshipSsin'] = this.internshipSsin;
|
|
770
|
+
if (this.internshipLastName != undefined)
|
|
771
|
+
res['internshipLastName'] = this.internshipLastName;
|
|
772
|
+
if (this.internshipFirstName != undefined)
|
|
773
|
+
res['internshipFirstName'] = this.internshipFirstName;
|
|
774
|
+
if (this.internshipCdHcParty != undefined)
|
|
775
|
+
res['internshipCdHcParty'] = this.internshipCdHcParty;
|
|
776
|
+
if (this.internshipCbe != undefined)
|
|
777
|
+
res['internshipCbe'] = this.internshipCbe;
|
|
778
|
+
if (this.supervisorNihii != undefined)
|
|
779
|
+
res['supervisorNihii'] = this.supervisorNihii;
|
|
780
|
+
if (this.supervisorSsin != undefined)
|
|
781
|
+
res['supervisorSsin'] = this.supervisorSsin;
|
|
782
|
+
if (this.supervisorLastName != undefined)
|
|
783
|
+
res['supervisorLastName'] = this.supervisorLastName;
|
|
784
|
+
if (this.supervisorFirstName != undefined)
|
|
785
|
+
res['supervisorFirstName'] = this.supervisorFirstName;
|
|
786
|
+
if (this.supervisorCdHcParty != undefined)
|
|
787
|
+
res['supervisorCdHcParty'] = this.supervisorCdHcParty;
|
|
788
|
+
if (this.supervisorCbe != undefined)
|
|
789
|
+
res['supervisorCbe'] = this.supervisorCbe;
|
|
790
|
+
if (this.error != undefined)
|
|
791
|
+
res['error'] = this.error;
|
|
792
|
+
if (this.encounterLocationName != undefined)
|
|
793
|
+
res['encounterLocationName'] = this.encounterLocationName;
|
|
794
|
+
if (this.encounterLocationNihii != undefined)
|
|
795
|
+
res['encounterLocationNihii'] = this.encounterLocationNihii;
|
|
796
|
+
if (this.encounterLocationNorm != undefined)
|
|
797
|
+
res['encounterLocationNorm'] = this.encounterLocationNorm;
|
|
798
|
+
if (this.longDelayJustification != undefined)
|
|
799
|
+
res['longDelayJustification'] = this.longDelayJustification;
|
|
800
|
+
if (this.correctiveInvoiceId != undefined)
|
|
801
|
+
res['correctiveInvoiceId'] = this.correctiveInvoiceId;
|
|
802
|
+
if (this.correctedInvoiceId != undefined)
|
|
803
|
+
res['correctedInvoiceId'] = this.correctedInvoiceId;
|
|
804
|
+
if (this.creditNote != undefined)
|
|
805
|
+
res['creditNote'] = this.creditNote;
|
|
806
|
+
if (this.creditNoteRelatedInvoiceId != undefined)
|
|
807
|
+
res['creditNoteRelatedInvoiceId'] = this.creditNoteRelatedInvoiceId;
|
|
808
|
+
if (this.idDocument != undefined)
|
|
809
|
+
res['idDocument'] = this.idDocument.toJSON();
|
|
810
|
+
if (this.admissionDate != undefined)
|
|
811
|
+
res['admissionDate'] = this.admissionDate;
|
|
812
|
+
if (this.locationNihii != undefined)
|
|
813
|
+
res['locationNihii'] = this.locationNihii;
|
|
814
|
+
if (this.locationService != undefined)
|
|
815
|
+
res['locationService'] = this.locationService;
|
|
816
|
+
if (this.cancelReason != undefined)
|
|
817
|
+
res['cancelReason'] = this.cancelReason;
|
|
818
|
+
if (this.cancelDate != undefined)
|
|
819
|
+
res['cancelDate'] = this.cancelDate;
|
|
820
|
+
res['options'] = Object.fromEntries(Object.entries(this.options).map(([k0, v0]) => [k0, v0]));
|
|
821
|
+
res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
|
|
822
|
+
res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
823
|
+
res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
824
|
+
res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
825
|
+
if (this.encryptedSelf != undefined)
|
|
826
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
827
|
+
if (this.securityMetadata != undefined)
|
|
828
|
+
res['securityMetadata'] = this.securityMetadata.toJSON();
|
|
829
|
+
res['isEncrypted'] = true;
|
|
830
|
+
return res;
|
|
831
|
+
}
|
|
832
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedInvoice']) {
|
|
833
|
+
if (typeof json != 'object')
|
|
834
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
835
|
+
const jCpy = Object.assign({}, json);
|
|
836
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
|
|
837
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedInvoice`);
|
|
838
|
+
const res = new EncryptedInvoice({
|
|
839
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
840
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
841
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
842
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
843
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
844
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
845
|
+
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
846
|
+
medicalLocationId: expectString(extractEntry(jCpy, 'medicalLocationId', false, path), true, [...path, ".medicalLocationId"]),
|
|
847
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
848
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
849
|
+
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
850
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
851
|
+
invoiceDate: expectNumber(extractEntry(jCpy, 'invoiceDate', false, path), true, true, [...path, ".invoiceDate"]),
|
|
852
|
+
sentDate: expectNumber(extractEntry(jCpy, 'sentDate', false, path), true, true, [...path, ".sentDate"]),
|
|
853
|
+
printedDate: expectNumber(extractEntry(jCpy, 'printedDate', false, path), true, true, [...path, ".printedDate"]),
|
|
854
|
+
invoicingCodes: expectArray(extractEntry(jCpy, 'invoicingCodes', false, path), false, [...path, ".invoicingCodes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedInvoicingCode.fromJSON)),
|
|
855
|
+
receipts: expectMap(extractEntry(jCpy, 'receipts', false, path), false, [...path, ".receipts"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
856
|
+
recipientType: expectString(extractEntry(jCpy, 'recipientType', false, path), true, [...path, ".recipientType"]),
|
|
857
|
+
recipientId: expectString(extractEntry(jCpy, 'recipientId', false, path), true, [...path, ".recipientId"]),
|
|
858
|
+
invoiceReference: expectString(extractEntry(jCpy, 'invoiceReference', false, path), true, [...path, ".invoiceReference"]),
|
|
859
|
+
decisionReference: expectString(extractEntry(jCpy, 'decisionReference', false, path), true, [...path, ".decisionReference"]),
|
|
860
|
+
thirdPartyReference: expectString(extractEntry(jCpy, 'thirdPartyReference', false, path), true, [...path, ".thirdPartyReference"]),
|
|
861
|
+
thirdPartyPaymentJustification: expectString(extractEntry(jCpy, 'thirdPartyPaymentJustification', false, path), true, [...path, ".thirdPartyPaymentJustification"]),
|
|
862
|
+
thirdPartyPaymentReason: expectString(extractEntry(jCpy, 'thirdPartyPaymentReason', false, path), true, [...path, ".thirdPartyPaymentReason"]),
|
|
863
|
+
reason: expectString(extractEntry(jCpy, 'reason', false, path), true, [...path, ".reason"]),
|
|
864
|
+
invoiceType: expectStringEnum(extractEntry(jCpy, 'invoiceType', false, path), true, [...path, ".invoiceType"], InvoiceType, 'InvoiceType'),
|
|
865
|
+
sentMediumType: expectStringEnum(extractEntry(jCpy, 'sentMediumType', false, path), true, [...path, ".sentMediumType"], MediumType, 'MediumType'),
|
|
866
|
+
interventionType: expectStringEnum(extractEntry(jCpy, 'interventionType', false, path), true, [...path, ".interventionType"], InvoiceInterventionType, 'InvoiceInterventionType'),
|
|
867
|
+
groupId: expectString(extractEntry(jCpy, 'groupId', false, path), true, [...path, ".groupId"]),
|
|
868
|
+
paymentType: expectStringEnum(extractEntry(jCpy, 'paymentType', false, path), true, [...path, ".paymentType"], PaymentType, 'PaymentType'),
|
|
869
|
+
paid: expectNumber(extractEntry(jCpy, 'paid', false, path), true, false, [...path, ".paid"]),
|
|
870
|
+
payments: expectArray(extractEntry(jCpy, 'payments', false, path), true, [...path, ".payments"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Payment.fromJSON)),
|
|
871
|
+
gnotionNihii: expectString(extractEntry(jCpy, 'gnotionNihii', false, path), true, [...path, ".gnotionNihii"]),
|
|
872
|
+
gnotionSsin: expectString(extractEntry(jCpy, 'gnotionSsin', false, path), true, [...path, ".gnotionSsin"]),
|
|
873
|
+
gnotionLastName: expectString(extractEntry(jCpy, 'gnotionLastName', false, path), true, [...path, ".gnotionLastName"]),
|
|
874
|
+
gnotionFirstName: expectString(extractEntry(jCpy, 'gnotionFirstName', false, path), true, [...path, ".gnotionFirstName"]),
|
|
875
|
+
gnotionCdHcParty: expectString(extractEntry(jCpy, 'gnotionCdHcParty', false, path), true, [...path, ".gnotionCdHcParty"]),
|
|
876
|
+
invoicePeriod: expectNumber(extractEntry(jCpy, 'invoicePeriod', false, path), true, true, [...path, ".invoicePeriod"]),
|
|
877
|
+
careProviderType: expectString(extractEntry(jCpy, 'careProviderType', false, path), true, [...path, ".careProviderType"]),
|
|
878
|
+
internshipNihii: expectString(extractEntry(jCpy, 'internshipNihii', false, path), true, [...path, ".internshipNihii"]),
|
|
879
|
+
internshipSsin: expectString(extractEntry(jCpy, 'internshipSsin', false, path), true, [...path, ".internshipSsin"]),
|
|
880
|
+
internshipLastName: expectString(extractEntry(jCpy, 'internshipLastName', false, path), true, [...path, ".internshipLastName"]),
|
|
881
|
+
internshipFirstName: expectString(extractEntry(jCpy, 'internshipFirstName', false, path), true, [...path, ".internshipFirstName"]),
|
|
882
|
+
internshipCdHcParty: expectString(extractEntry(jCpy, 'internshipCdHcParty', false, path), true, [...path, ".internshipCdHcParty"]),
|
|
883
|
+
internshipCbe: expectString(extractEntry(jCpy, 'internshipCbe', false, path), true, [...path, ".internshipCbe"]),
|
|
884
|
+
supervisorNihii: expectString(extractEntry(jCpy, 'supervisorNihii', false, path), true, [...path, ".supervisorNihii"]),
|
|
885
|
+
supervisorSsin: expectString(extractEntry(jCpy, 'supervisorSsin', false, path), true, [...path, ".supervisorSsin"]),
|
|
886
|
+
supervisorLastName: expectString(extractEntry(jCpy, 'supervisorLastName', false, path), true, [...path, ".supervisorLastName"]),
|
|
887
|
+
supervisorFirstName: expectString(extractEntry(jCpy, 'supervisorFirstName', false, path), true, [...path, ".supervisorFirstName"]),
|
|
888
|
+
supervisorCdHcParty: expectString(extractEntry(jCpy, 'supervisorCdHcParty', false, path), true, [...path, ".supervisorCdHcParty"]),
|
|
889
|
+
supervisorCbe: expectString(extractEntry(jCpy, 'supervisorCbe', false, path), true, [...path, ".supervisorCbe"]),
|
|
890
|
+
error: expectString(extractEntry(jCpy, 'error', false, path), true, [...path, ".error"]),
|
|
891
|
+
encounterLocationName: expectString(extractEntry(jCpy, 'encounterLocationName', false, path), true, [...path, ".encounterLocationName"]),
|
|
892
|
+
encounterLocationNihii: expectString(extractEntry(jCpy, 'encounterLocationNihii', false, path), true, [...path, ".encounterLocationNihii"]),
|
|
893
|
+
encounterLocationNorm: expectNumber(extractEntry(jCpy, 'encounterLocationNorm', false, path), true, true, [...path, ".encounterLocationNorm"]),
|
|
894
|
+
longDelayJustification: expectNumber(extractEntry(jCpy, 'longDelayJustification', false, path), true, true, [...path, ".longDelayJustification"]),
|
|
895
|
+
correctiveInvoiceId: expectString(extractEntry(jCpy, 'correctiveInvoiceId', false, path), true, [...path, ".correctiveInvoiceId"]),
|
|
896
|
+
correctedInvoiceId: expectString(extractEntry(jCpy, 'correctedInvoiceId', false, path), true, [...path, ".correctedInvoiceId"]),
|
|
897
|
+
creditNote: expectBoolean(extractEntry(jCpy, 'creditNote', false, path), true, [...path, ".creditNote"]),
|
|
898
|
+
creditNoteRelatedInvoiceId: expectString(extractEntry(jCpy, 'creditNoteRelatedInvoiceId', false, path), true, [...path, ".creditNoteRelatedInvoiceId"]),
|
|
899
|
+
idDocument: expectObject(extractEntry(jCpy, 'idDocument', false, path), true, ignoreUnknownKeys, [...path, ".idDocument"], IdentityDocumentReader.fromJSON),
|
|
900
|
+
admissionDate: expectNumber(extractEntry(jCpy, 'admissionDate', false, path), true, true, [...path, ".admissionDate"]),
|
|
901
|
+
locationNihii: expectString(extractEntry(jCpy, 'locationNihii', false, path), true, [...path, ".locationNihii"]),
|
|
902
|
+
locationService: expectNumber(extractEntry(jCpy, 'locationService', false, path), true, true, [...path, ".locationService"]),
|
|
903
|
+
cancelReason: expectString(extractEntry(jCpy, 'cancelReason', false, path), true, [...path, ".cancelReason"]),
|
|
904
|
+
cancelDate: expectNumber(extractEntry(jCpy, 'cancelDate', false, path), true, true, [...path, ".cancelDate"]),
|
|
905
|
+
options: expectMap(extractEntry(jCpy, 'options', false, path), false, [...path, ".options"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
906
|
+
secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
|
|
907
|
+
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))),
|
|
908
|
+
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))),
|
|
909
|
+
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))),
|
|
910
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
911
|
+
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
912
|
+
});
|
|
913
|
+
if (!ignoreUnknownKeys) {
|
|
914
|
+
const unused = Object.keys(jCpy);
|
|
915
|
+
if (unused.length > 0)
|
|
916
|
+
throw new Error(`Unexpected key(s) for json object EncryptedInvoice at path ${path.join("")}: ${unused}`);
|
|
917
|
+
}
|
|
918
|
+
return res;
|
|
919
|
+
}
|
|
452
920
|
}
|
package/model/Keyword.d.mts
CHANGED
|
@@ -18,4 +18,6 @@ export declare class Keyword implements StoredDocument, ICureDocument<string> {
|
|
|
18
18
|
subWords: Array<KeywordSubword>;
|
|
19
19
|
userId: string | undefined;
|
|
20
20
|
constructor(partial: Partial<Keyword>);
|
|
21
|
+
toJSON(): object;
|
|
22
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Keyword;
|
|
21
23
|
}
|
package/model/Keyword.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectArray, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
import { randomUuid } from '../utils/Id.mjs';
|
|
4
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
5
|
+
import { KeywordSubword } from './embed/KeywordSubword.mjs';
|
|
3
6
|
export class Keyword {
|
|
4
7
|
constructor(partial) {
|
|
5
8
|
var _a;
|
|
@@ -44,4 +47,59 @@ export class Keyword {
|
|
|
44
47
|
if ('userId' in partial)
|
|
45
48
|
this.userId = partial.userId;
|
|
46
49
|
}
|
|
50
|
+
toJSON() {
|
|
51
|
+
const res = {};
|
|
52
|
+
res['id'] = this.id;
|
|
53
|
+
if (this.rev != undefined)
|
|
54
|
+
res['rev'] = this.rev;
|
|
55
|
+
if (this.created != undefined)
|
|
56
|
+
res['created'] = this.created;
|
|
57
|
+
if (this.modified != undefined)
|
|
58
|
+
res['modified'] = this.modified;
|
|
59
|
+
if (this.author != undefined)
|
|
60
|
+
res['author'] = this.author;
|
|
61
|
+
if (this.responsible != undefined)
|
|
62
|
+
res['responsible'] = this.responsible;
|
|
63
|
+
if (this.medicalLocationId != undefined)
|
|
64
|
+
res['medicalLocationId'] = this.medicalLocationId;
|
|
65
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
66
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
67
|
+
if (this.endOfLife != undefined)
|
|
68
|
+
res['endOfLife'] = this.endOfLife;
|
|
69
|
+
if (this.deletionDate != undefined)
|
|
70
|
+
res['deletionDate'] = this.deletionDate;
|
|
71
|
+
if (this.value != undefined)
|
|
72
|
+
res['value'] = this.value;
|
|
73
|
+
res['subWords'] = this.subWords.map((x0) => x0.toJSON());
|
|
74
|
+
if (this.userId != undefined)
|
|
75
|
+
res['userId'] = this.userId;
|
|
76
|
+
return res;
|
|
77
|
+
}
|
|
78
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Keyword']) {
|
|
79
|
+
if (typeof json != 'object')
|
|
80
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
81
|
+
const jCpy = Object.assign({}, json);
|
|
82
|
+
const res = new Keyword({
|
|
83
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
84
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
85
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
86
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
87
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
88
|
+
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
89
|
+
medicalLocationId: expectString(extractEntry(jCpy, 'medicalLocationId', false, path), true, [...path, ".medicalLocationId"]),
|
|
90
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
91
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
92
|
+
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
93
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
94
|
+
value: expectString(extractEntry(jCpy, 'value', false, path), true, [...path, ".value"]),
|
|
95
|
+
subWords: expectArray(extractEntry(jCpy, 'subWords', false, path), false, [...path, ".subWords"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, KeywordSubword.fromJSON)),
|
|
96
|
+
userId: expectString(extractEntry(jCpy, 'userId', false, path), true, [...path, ".userId"]),
|
|
97
|
+
});
|
|
98
|
+
if (!ignoreUnknownKeys) {
|
|
99
|
+
const unused = Object.keys(jCpy);
|
|
100
|
+
if (unused.length > 0)
|
|
101
|
+
throw new Error(`Unexpected key(s) for json object Keyword at path ${path.join("")}: ${unused}`);
|
|
102
|
+
}
|
|
103
|
+
return res;
|
|
104
|
+
}
|
|
47
105
|
}
|
package/model/ListOfIds.d.mts
CHANGED
package/model/ListOfIds.mjs
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectArray, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class ListOfIds {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.ids = [];
|
|
5
6
|
if ('ids' in partial && partial.ids !== undefined)
|
|
6
7
|
this.ids = partial.ids;
|
|
7
8
|
}
|
|
9
|
+
toJSON() {
|
|
10
|
+
const res = {};
|
|
11
|
+
res['ids'] = this.ids.map((x0) => x0);
|
|
12
|
+
return res;
|
|
13
|
+
}
|
|
14
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['ListOfIds']) {
|
|
15
|
+
if (typeof json != 'object')
|
|
16
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
17
|
+
const jCpy = Object.assign({}, json);
|
|
18
|
+
const res = new ListOfIds({
|
|
19
|
+
ids: expectArray(extractEntry(jCpy, 'ids', false, path), false, [...path, ".ids"], (x0, p0) => expectString(x0, false, p0)),
|
|
20
|
+
});
|
|
21
|
+
if (!ignoreUnknownKeys) {
|
|
22
|
+
const unused = Object.keys(jCpy);
|
|
23
|
+
if (unused.length > 0)
|
|
24
|
+
throw new Error(`Unexpected key(s) for json object ListOfIds at path ${path.join("")}: ${unused}`);
|
|
25
|
+
}
|
|
26
|
+
return res;
|
|
27
|
+
}
|
|
8
28
|
}
|
|
@@ -2,4 +2,6 @@ import { DecryptedPropertyStub } from './PropertyStub.mjs';
|
|
|
2
2
|
export declare class ListOfProperties {
|
|
3
3
|
properties: Array<DecryptedPropertyStub>;
|
|
4
4
|
constructor(partial: Partial<ListOfProperties>);
|
|
5
|
+
toJSON(): object;
|
|
6
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ListOfProperties;
|
|
5
7
|
}
|