@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,3 +1,8 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectBoolean, expectMap, expectNumber, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { ContractChangeType } from './ContractChangeType.mjs';
|
|
4
|
+
import { MhcSignatureType } from './MhcSignatureType.mjs';
|
|
5
|
+
import { SuspensionReason } from './SuspensionReason.mjs';
|
|
1
6
|
export class DecryptedMedicalHouseContract {
|
|
2
7
|
constructor(partial) {
|
|
3
8
|
this.contractId = undefined;
|
|
@@ -103,6 +108,115 @@ export class DecryptedMedicalHouseContract {
|
|
|
103
108
|
if ('encryptedSelf' in partial)
|
|
104
109
|
this.encryptedSelf = partial.encryptedSelf;
|
|
105
110
|
}
|
|
111
|
+
toJSON() {
|
|
112
|
+
const res = {};
|
|
113
|
+
if (this.contractId != undefined)
|
|
114
|
+
res['contractId'] = this.contractId;
|
|
115
|
+
if (this.validFrom != undefined)
|
|
116
|
+
res['validFrom'] = this.validFrom;
|
|
117
|
+
if (this.validTo != undefined)
|
|
118
|
+
res['validTo'] = this.validTo;
|
|
119
|
+
if (this.mmNihii != undefined)
|
|
120
|
+
res['mmNihii'] = this.mmNihii;
|
|
121
|
+
if (this.hcpId != undefined)
|
|
122
|
+
res['hcpId'] = this.hcpId;
|
|
123
|
+
if (this.changeType != undefined)
|
|
124
|
+
res['changeType'] = this.changeType;
|
|
125
|
+
if (this.parentContractId != undefined)
|
|
126
|
+
res['parentContractId'] = this.parentContractId;
|
|
127
|
+
if (this.changedBy != undefined)
|
|
128
|
+
res['changedBy'] = this.changedBy;
|
|
129
|
+
if (this.startOfContract != undefined)
|
|
130
|
+
res['startOfContract'] = this.startOfContract;
|
|
131
|
+
if (this.startOfCoverage != undefined)
|
|
132
|
+
res['startOfCoverage'] = this.startOfCoverage;
|
|
133
|
+
if (this.endOfContract != undefined)
|
|
134
|
+
res['endOfContract'] = this.endOfContract;
|
|
135
|
+
if (this.endOfCoverage != undefined)
|
|
136
|
+
res['endOfCoverage'] = this.endOfCoverage;
|
|
137
|
+
res['kine'] = this.kine;
|
|
138
|
+
res['gp'] = this.gp;
|
|
139
|
+
res['ptd'] = this.ptd;
|
|
140
|
+
res['nurse'] = this.nurse;
|
|
141
|
+
res['noKine'] = this.noKine;
|
|
142
|
+
res['noGp'] = this.noGp;
|
|
143
|
+
res['noNurse'] = this.noNurse;
|
|
144
|
+
if (this.unsubscriptionReasonId != undefined)
|
|
145
|
+
res['unsubscriptionReasonId'] = this.unsubscriptionReasonId;
|
|
146
|
+
if (this.ptdStart != undefined)
|
|
147
|
+
res['ptdStart'] = this.ptdStart;
|
|
148
|
+
if (this.ptdEnd != undefined)
|
|
149
|
+
res['ptdEnd'] = this.ptdEnd;
|
|
150
|
+
if (this.ptdLastInvoiced != undefined)
|
|
151
|
+
res['ptdLastInvoiced'] = this.ptdLastInvoiced;
|
|
152
|
+
if (this.startOfSuspension != undefined)
|
|
153
|
+
res['startOfSuspension'] = this.startOfSuspension;
|
|
154
|
+
if (this.endOfSuspension != undefined)
|
|
155
|
+
res['endOfSuspension'] = this.endOfSuspension;
|
|
156
|
+
if (this.suspensionReason != undefined)
|
|
157
|
+
res['suspensionReason'] = this.suspensionReason;
|
|
158
|
+
if (this.suspensionSource != undefined)
|
|
159
|
+
res['suspensionSource'] = this.suspensionSource;
|
|
160
|
+
res['forcedSuspension'] = this.forcedSuspension;
|
|
161
|
+
if (this.signatureType != undefined)
|
|
162
|
+
res['signatureType'] = this.signatureType;
|
|
163
|
+
if (this.status != undefined)
|
|
164
|
+
res['status'] = this.status;
|
|
165
|
+
res['options'] = Object.fromEntries(Object.entries(this.options).map(([k0, v0]) => [k0, v0]));
|
|
166
|
+
res['receipts'] = Object.fromEntries(Object.entries(this.receipts).map(([k0, v0]) => [k0, v0]));
|
|
167
|
+
if (this.encryptedSelf != undefined)
|
|
168
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
169
|
+
res['isEncrypted'] = false;
|
|
170
|
+
return res;
|
|
171
|
+
}
|
|
172
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedMedicalHouseContract']) {
|
|
173
|
+
if (typeof json != 'object')
|
|
174
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
175
|
+
const jCpy = Object.assign({}, json);
|
|
176
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
|
|
177
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedMedicalHouseContract`);
|
|
178
|
+
const res = new DecryptedMedicalHouseContract({
|
|
179
|
+
contractId: expectString(extractEntry(jCpy, 'contractId', false, path), true, [...path, ".contractId"]),
|
|
180
|
+
validFrom: expectNumber(extractEntry(jCpy, 'validFrom', false, path), true, true, [...path, ".validFrom"]),
|
|
181
|
+
validTo: expectNumber(extractEntry(jCpy, 'validTo', false, path), true, true, [...path, ".validTo"]),
|
|
182
|
+
mmNihii: expectString(extractEntry(jCpy, 'mmNihii', false, path), true, [...path, ".mmNihii"]),
|
|
183
|
+
hcpId: expectString(extractEntry(jCpy, 'hcpId', false, path), true, [...path, ".hcpId"]),
|
|
184
|
+
changeType: expectStringEnum(extractEntry(jCpy, 'changeType', false, path), true, [...path, ".changeType"], ContractChangeType, 'ContractChangeType'),
|
|
185
|
+
parentContractId: expectString(extractEntry(jCpy, 'parentContractId', false, path), true, [...path, ".parentContractId"]),
|
|
186
|
+
changedBy: expectString(extractEntry(jCpy, 'changedBy', false, path), true, [...path, ".changedBy"]),
|
|
187
|
+
startOfContract: expectNumber(extractEntry(jCpy, 'startOfContract', false, path), true, true, [...path, ".startOfContract"]),
|
|
188
|
+
startOfCoverage: expectNumber(extractEntry(jCpy, 'startOfCoverage', false, path), true, true, [...path, ".startOfCoverage"]),
|
|
189
|
+
endOfContract: expectNumber(extractEntry(jCpy, 'endOfContract', false, path), true, true, [...path, ".endOfContract"]),
|
|
190
|
+
endOfCoverage: expectNumber(extractEntry(jCpy, 'endOfCoverage', false, path), true, true, [...path, ".endOfCoverage"]),
|
|
191
|
+
kine: expectBoolean(extractEntry(jCpy, 'kine', false, path), false, [...path, ".kine"]),
|
|
192
|
+
gp: expectBoolean(extractEntry(jCpy, 'gp', false, path), false, [...path, ".gp"]),
|
|
193
|
+
ptd: expectBoolean(extractEntry(jCpy, 'ptd', false, path), false, [...path, ".ptd"]),
|
|
194
|
+
nurse: expectBoolean(extractEntry(jCpy, 'nurse', false, path), false, [...path, ".nurse"]),
|
|
195
|
+
noKine: expectBoolean(extractEntry(jCpy, 'noKine', false, path), false, [...path, ".noKine"]),
|
|
196
|
+
noGp: expectBoolean(extractEntry(jCpy, 'noGp', false, path), false, [...path, ".noGp"]),
|
|
197
|
+
noNurse: expectBoolean(extractEntry(jCpy, 'noNurse', false, path), false, [...path, ".noNurse"]),
|
|
198
|
+
unsubscriptionReasonId: expectNumber(extractEntry(jCpy, 'unsubscriptionReasonId', false, path), true, true, [...path, ".unsubscriptionReasonId"]),
|
|
199
|
+
ptdStart: expectNumber(extractEntry(jCpy, 'ptdStart', false, path), true, true, [...path, ".ptdStart"]),
|
|
200
|
+
ptdEnd: expectNumber(extractEntry(jCpy, 'ptdEnd', false, path), true, true, [...path, ".ptdEnd"]),
|
|
201
|
+
ptdLastInvoiced: expectNumber(extractEntry(jCpy, 'ptdLastInvoiced', false, path), true, true, [...path, ".ptdLastInvoiced"]),
|
|
202
|
+
startOfSuspension: expectNumber(extractEntry(jCpy, 'startOfSuspension', false, path), true, true, [...path, ".startOfSuspension"]),
|
|
203
|
+
endOfSuspension: expectNumber(extractEntry(jCpy, 'endOfSuspension', false, path), true, true, [...path, ".endOfSuspension"]),
|
|
204
|
+
suspensionReason: expectStringEnum(extractEntry(jCpy, 'suspensionReason', false, path), true, [...path, ".suspensionReason"], SuspensionReason, 'SuspensionReason'),
|
|
205
|
+
suspensionSource: expectString(extractEntry(jCpy, 'suspensionSource', false, path), true, [...path, ".suspensionSource"]),
|
|
206
|
+
forcedSuspension: expectBoolean(extractEntry(jCpy, 'forcedSuspension', false, path), false, [...path, ".forcedSuspension"]),
|
|
207
|
+
signatureType: expectStringEnum(extractEntry(jCpy, 'signatureType', false, path), true, [...path, ".signatureType"], MhcSignatureType, 'MhcSignatureType'),
|
|
208
|
+
status: expectNumber(extractEntry(jCpy, 'status', false, path), true, true, [...path, ".status"]),
|
|
209
|
+
options: expectMap(extractEntry(jCpy, 'options', false, path), false, [...path, ".options"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
210
|
+
receipts: expectMap(extractEntry(jCpy, 'receipts', false, path), false, [...path, ".receipts"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
211
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
212
|
+
});
|
|
213
|
+
if (!ignoreUnknownKeys) {
|
|
214
|
+
const unused = Object.keys(jCpy);
|
|
215
|
+
if (unused.length > 0)
|
|
216
|
+
throw new Error(`Unexpected key(s) for json object DecryptedMedicalHouseContract at path ${path.join("")}: ${unused}`);
|
|
217
|
+
}
|
|
218
|
+
return res;
|
|
219
|
+
}
|
|
106
220
|
}
|
|
107
221
|
export class EncryptedMedicalHouseContract {
|
|
108
222
|
constructor(partial) {
|
|
@@ -209,4 +323,113 @@ export class EncryptedMedicalHouseContract {
|
|
|
209
323
|
if ('encryptedSelf' in partial)
|
|
210
324
|
this.encryptedSelf = partial.encryptedSelf;
|
|
211
325
|
}
|
|
326
|
+
toJSON() {
|
|
327
|
+
const res = {};
|
|
328
|
+
if (this.contractId != undefined)
|
|
329
|
+
res['contractId'] = this.contractId;
|
|
330
|
+
if (this.validFrom != undefined)
|
|
331
|
+
res['validFrom'] = this.validFrom;
|
|
332
|
+
if (this.validTo != undefined)
|
|
333
|
+
res['validTo'] = this.validTo;
|
|
334
|
+
if (this.mmNihii != undefined)
|
|
335
|
+
res['mmNihii'] = this.mmNihii;
|
|
336
|
+
if (this.hcpId != undefined)
|
|
337
|
+
res['hcpId'] = this.hcpId;
|
|
338
|
+
if (this.changeType != undefined)
|
|
339
|
+
res['changeType'] = this.changeType;
|
|
340
|
+
if (this.parentContractId != undefined)
|
|
341
|
+
res['parentContractId'] = this.parentContractId;
|
|
342
|
+
if (this.changedBy != undefined)
|
|
343
|
+
res['changedBy'] = this.changedBy;
|
|
344
|
+
if (this.startOfContract != undefined)
|
|
345
|
+
res['startOfContract'] = this.startOfContract;
|
|
346
|
+
if (this.startOfCoverage != undefined)
|
|
347
|
+
res['startOfCoverage'] = this.startOfCoverage;
|
|
348
|
+
if (this.endOfContract != undefined)
|
|
349
|
+
res['endOfContract'] = this.endOfContract;
|
|
350
|
+
if (this.endOfCoverage != undefined)
|
|
351
|
+
res['endOfCoverage'] = this.endOfCoverage;
|
|
352
|
+
res['kine'] = this.kine;
|
|
353
|
+
res['gp'] = this.gp;
|
|
354
|
+
res['ptd'] = this.ptd;
|
|
355
|
+
res['nurse'] = this.nurse;
|
|
356
|
+
res['noKine'] = this.noKine;
|
|
357
|
+
res['noGp'] = this.noGp;
|
|
358
|
+
res['noNurse'] = this.noNurse;
|
|
359
|
+
if (this.unsubscriptionReasonId != undefined)
|
|
360
|
+
res['unsubscriptionReasonId'] = this.unsubscriptionReasonId;
|
|
361
|
+
if (this.ptdStart != undefined)
|
|
362
|
+
res['ptdStart'] = this.ptdStart;
|
|
363
|
+
if (this.ptdEnd != undefined)
|
|
364
|
+
res['ptdEnd'] = this.ptdEnd;
|
|
365
|
+
if (this.ptdLastInvoiced != undefined)
|
|
366
|
+
res['ptdLastInvoiced'] = this.ptdLastInvoiced;
|
|
367
|
+
if (this.startOfSuspension != undefined)
|
|
368
|
+
res['startOfSuspension'] = this.startOfSuspension;
|
|
369
|
+
if (this.endOfSuspension != undefined)
|
|
370
|
+
res['endOfSuspension'] = this.endOfSuspension;
|
|
371
|
+
if (this.suspensionReason != undefined)
|
|
372
|
+
res['suspensionReason'] = this.suspensionReason;
|
|
373
|
+
if (this.suspensionSource != undefined)
|
|
374
|
+
res['suspensionSource'] = this.suspensionSource;
|
|
375
|
+
res['forcedSuspension'] = this.forcedSuspension;
|
|
376
|
+
if (this.signatureType != undefined)
|
|
377
|
+
res['signatureType'] = this.signatureType;
|
|
378
|
+
if (this.status != undefined)
|
|
379
|
+
res['status'] = this.status;
|
|
380
|
+
res['options'] = Object.fromEntries(Object.entries(this.options).map(([k0, v0]) => [k0, v0]));
|
|
381
|
+
res['receipts'] = Object.fromEntries(Object.entries(this.receipts).map(([k0, v0]) => [k0, v0]));
|
|
382
|
+
if (this.encryptedSelf != undefined)
|
|
383
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
384
|
+
res['isEncrypted'] = true;
|
|
385
|
+
return res;
|
|
386
|
+
}
|
|
387
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedMedicalHouseContract']) {
|
|
388
|
+
if (typeof json != 'object')
|
|
389
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
390
|
+
const jCpy = Object.assign({}, json);
|
|
391
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
|
|
392
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedMedicalHouseContract`);
|
|
393
|
+
const res = new EncryptedMedicalHouseContract({
|
|
394
|
+
contractId: expectString(extractEntry(jCpy, 'contractId', false, path), true, [...path, ".contractId"]),
|
|
395
|
+
validFrom: expectNumber(extractEntry(jCpy, 'validFrom', false, path), true, true, [...path, ".validFrom"]),
|
|
396
|
+
validTo: expectNumber(extractEntry(jCpy, 'validTo', false, path), true, true, [...path, ".validTo"]),
|
|
397
|
+
mmNihii: expectString(extractEntry(jCpy, 'mmNihii', false, path), true, [...path, ".mmNihii"]),
|
|
398
|
+
hcpId: expectString(extractEntry(jCpy, 'hcpId', false, path), true, [...path, ".hcpId"]),
|
|
399
|
+
changeType: expectStringEnum(extractEntry(jCpy, 'changeType', false, path), true, [...path, ".changeType"], ContractChangeType, 'ContractChangeType'),
|
|
400
|
+
parentContractId: expectString(extractEntry(jCpy, 'parentContractId', false, path), true, [...path, ".parentContractId"]),
|
|
401
|
+
changedBy: expectString(extractEntry(jCpy, 'changedBy', false, path), true, [...path, ".changedBy"]),
|
|
402
|
+
startOfContract: expectNumber(extractEntry(jCpy, 'startOfContract', false, path), true, true, [...path, ".startOfContract"]),
|
|
403
|
+
startOfCoverage: expectNumber(extractEntry(jCpy, 'startOfCoverage', false, path), true, true, [...path, ".startOfCoverage"]),
|
|
404
|
+
endOfContract: expectNumber(extractEntry(jCpy, 'endOfContract', false, path), true, true, [...path, ".endOfContract"]),
|
|
405
|
+
endOfCoverage: expectNumber(extractEntry(jCpy, 'endOfCoverage', false, path), true, true, [...path, ".endOfCoverage"]),
|
|
406
|
+
kine: expectBoolean(extractEntry(jCpy, 'kine', false, path), false, [...path, ".kine"]),
|
|
407
|
+
gp: expectBoolean(extractEntry(jCpy, 'gp', false, path), false, [...path, ".gp"]),
|
|
408
|
+
ptd: expectBoolean(extractEntry(jCpy, 'ptd', false, path), false, [...path, ".ptd"]),
|
|
409
|
+
nurse: expectBoolean(extractEntry(jCpy, 'nurse', false, path), false, [...path, ".nurse"]),
|
|
410
|
+
noKine: expectBoolean(extractEntry(jCpy, 'noKine', false, path), false, [...path, ".noKine"]),
|
|
411
|
+
noGp: expectBoolean(extractEntry(jCpy, 'noGp', false, path), false, [...path, ".noGp"]),
|
|
412
|
+
noNurse: expectBoolean(extractEntry(jCpy, 'noNurse', false, path), false, [...path, ".noNurse"]),
|
|
413
|
+
unsubscriptionReasonId: expectNumber(extractEntry(jCpy, 'unsubscriptionReasonId', false, path), true, true, [...path, ".unsubscriptionReasonId"]),
|
|
414
|
+
ptdStart: expectNumber(extractEntry(jCpy, 'ptdStart', false, path), true, true, [...path, ".ptdStart"]),
|
|
415
|
+
ptdEnd: expectNumber(extractEntry(jCpy, 'ptdEnd', false, path), true, true, [...path, ".ptdEnd"]),
|
|
416
|
+
ptdLastInvoiced: expectNumber(extractEntry(jCpy, 'ptdLastInvoiced', false, path), true, true, [...path, ".ptdLastInvoiced"]),
|
|
417
|
+
startOfSuspension: expectNumber(extractEntry(jCpy, 'startOfSuspension', false, path), true, true, [...path, ".startOfSuspension"]),
|
|
418
|
+
endOfSuspension: expectNumber(extractEntry(jCpy, 'endOfSuspension', false, path), true, true, [...path, ".endOfSuspension"]),
|
|
419
|
+
suspensionReason: expectStringEnum(extractEntry(jCpy, 'suspensionReason', false, path), true, [...path, ".suspensionReason"], SuspensionReason, 'SuspensionReason'),
|
|
420
|
+
suspensionSource: expectString(extractEntry(jCpy, 'suspensionSource', false, path), true, [...path, ".suspensionSource"]),
|
|
421
|
+
forcedSuspension: expectBoolean(extractEntry(jCpy, 'forcedSuspension', false, path), false, [...path, ".forcedSuspension"]),
|
|
422
|
+
signatureType: expectStringEnum(extractEntry(jCpy, 'signatureType', false, path), true, [...path, ".signatureType"], MhcSignatureType, 'MhcSignatureType'),
|
|
423
|
+
status: expectNumber(extractEntry(jCpy, 'status', false, path), true, true, [...path, ".status"]),
|
|
424
|
+
options: expectMap(extractEntry(jCpy, 'options', false, path), false, [...path, ".options"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
425
|
+
receipts: expectMap(extractEntry(jCpy, 'receipts', false, path), false, [...path, ".receipts"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
426
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
427
|
+
});
|
|
428
|
+
if (!ignoreUnknownKeys) {
|
|
429
|
+
const unused = Object.keys(jCpy);
|
|
430
|
+
if (unused.length > 0)
|
|
431
|
+
throw new Error(`Unexpected key(s) for json object EncryptedMedicalHouseContract at path ${path.join("")}: ${unused}`);
|
|
432
|
+
}
|
|
433
|
+
return res;
|
|
434
|
+
}
|
|
212
435
|
}
|
|
@@ -54,4 +54,6 @@ export declare class Medication {
|
|
|
54
54
|
status: number | undefined;
|
|
55
55
|
stockLocation: DecryptedAddress | undefined;
|
|
56
56
|
constructor(partial: Partial<Medication>);
|
|
57
|
+
toJSON(): object;
|
|
58
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Medication;
|
|
57
59
|
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { CodeStub } from '../base/CodeStub.mjs';
|
|
4
|
+
import { DecryptedAddress } from './Address.mjs';
|
|
5
|
+
import { Duration } from './Duration.mjs';
|
|
6
|
+
import { Medicinalproduct } from './Medicinalproduct.mjs';
|
|
7
|
+
import { ParagraphAgreement } from './ParagraphAgreement.mjs';
|
|
8
|
+
import { RegimenItem } from './RegimenItem.mjs';
|
|
9
|
+
import { Renewal } from './Renewal.mjs';
|
|
10
|
+
import { Substanceproduct } from './Substanceproduct.mjs';
|
|
11
|
+
import { Suspension } from './Suspension.mjs';
|
|
1
12
|
export class Medication {
|
|
2
13
|
constructor(partial) {
|
|
3
14
|
this.compoundPrescription = undefined;
|
|
@@ -130,4 +141,150 @@ export class Medication {
|
|
|
130
141
|
if ('stockLocation' in partial)
|
|
131
142
|
this.stockLocation = partial.stockLocation;
|
|
132
143
|
}
|
|
144
|
+
toJSON() {
|
|
145
|
+
const res = {};
|
|
146
|
+
if (this.compoundPrescription != undefined)
|
|
147
|
+
res['compoundPrescription'] = this.compoundPrescription;
|
|
148
|
+
if (this.substanceProduct != undefined)
|
|
149
|
+
res['substanceProduct'] = this.substanceProduct.toJSON();
|
|
150
|
+
if (this.medicinalProduct != undefined)
|
|
151
|
+
res['medicinalProduct'] = this.medicinalProduct.toJSON();
|
|
152
|
+
if (this.numberOfPackages != undefined)
|
|
153
|
+
res['numberOfPackages'] = this.numberOfPackages;
|
|
154
|
+
if (this.batch != undefined)
|
|
155
|
+
res['batch'] = this.batch;
|
|
156
|
+
if (this.expirationDate != undefined)
|
|
157
|
+
res['expirationDate'] = this.expirationDate;
|
|
158
|
+
if (this.instructionForPatient != undefined)
|
|
159
|
+
res['instructionForPatient'] = this.instructionForPatient;
|
|
160
|
+
if (this.instructionForReimbursement != undefined)
|
|
161
|
+
res['instructionForReimbursement'] = this.instructionForReimbursement;
|
|
162
|
+
if (this.commentForDelivery != undefined)
|
|
163
|
+
res['commentForDelivery'] = this.commentForDelivery;
|
|
164
|
+
if (this.drugRoute != undefined)
|
|
165
|
+
res['drugRoute'] = this.drugRoute;
|
|
166
|
+
if (this.temporality != undefined)
|
|
167
|
+
res['temporality'] = this.temporality;
|
|
168
|
+
if (this.frequency != undefined)
|
|
169
|
+
res['frequency'] = this.frequency.toJSON();
|
|
170
|
+
if (this.reimbursementReason != undefined)
|
|
171
|
+
res['reimbursementReason'] = this.reimbursementReason.toJSON();
|
|
172
|
+
if (this.substitutionAllowed != undefined)
|
|
173
|
+
res['substitutionAllowed'] = this.substitutionAllowed;
|
|
174
|
+
if (this.beginMoment != undefined)
|
|
175
|
+
res['beginMoment'] = this.beginMoment;
|
|
176
|
+
if (this.endMoment != undefined)
|
|
177
|
+
res['endMoment'] = this.endMoment;
|
|
178
|
+
if (this.deliveryMoment != undefined)
|
|
179
|
+
res['deliveryMoment'] = this.deliveryMoment;
|
|
180
|
+
if (this.endExecutionMoment != undefined)
|
|
181
|
+
res['endExecutionMoment'] = this.endExecutionMoment;
|
|
182
|
+
if (this.duration != undefined)
|
|
183
|
+
res['duration'] = this.duration.toJSON();
|
|
184
|
+
if (this.renewal != undefined)
|
|
185
|
+
res['renewal'] = this.renewal.toJSON();
|
|
186
|
+
if (this.knownUsage != undefined)
|
|
187
|
+
res['knownUsage'] = this.knownUsage;
|
|
188
|
+
if (this.regimen != undefined)
|
|
189
|
+
res['regimen'] = this.regimen.map((x0) => x0.toJSON());
|
|
190
|
+
if (this.posology != undefined)
|
|
191
|
+
res['posology'] = this.posology;
|
|
192
|
+
if (this.agreements != undefined)
|
|
193
|
+
res['agreements'] = Object.fromEntries(Object.entries(this.agreements).map(([k0, v0]) => [k0, v0.toJSON()]));
|
|
194
|
+
if (this.medicationSchemeIdOnSafe != undefined)
|
|
195
|
+
res['medicationSchemeIdOnSafe'] = this.medicationSchemeIdOnSafe;
|
|
196
|
+
if (this.medicationSchemeSafeVersion != undefined)
|
|
197
|
+
res['medicationSchemeSafeVersion'] = this.medicationSchemeSafeVersion;
|
|
198
|
+
if (this.medicationSchemeTimeStampOnSafe != undefined)
|
|
199
|
+
res['medicationSchemeTimeStampOnSafe'] = this.medicationSchemeTimeStampOnSafe;
|
|
200
|
+
if (this.medicationSchemeDocumentId != undefined)
|
|
201
|
+
res['medicationSchemeDocumentId'] = this.medicationSchemeDocumentId;
|
|
202
|
+
if (this.safeIdName != undefined)
|
|
203
|
+
res['safeIdName'] = this.safeIdName;
|
|
204
|
+
if (this.idOnSafes != undefined)
|
|
205
|
+
res['idOnSafes'] = this.idOnSafes;
|
|
206
|
+
if (this.timestampOnSafe != undefined)
|
|
207
|
+
res['timestampOnSafe'] = this.timestampOnSafe;
|
|
208
|
+
if (this.changeValidated != undefined)
|
|
209
|
+
res['changeValidated'] = this.changeValidated;
|
|
210
|
+
if (this.newSafeMedication != undefined)
|
|
211
|
+
res['newSafeMedication'] = this.newSafeMedication;
|
|
212
|
+
if (this.medicationUse != undefined)
|
|
213
|
+
res['medicationUse'] = this.medicationUse;
|
|
214
|
+
if (this.beginCondition != undefined)
|
|
215
|
+
res['beginCondition'] = this.beginCondition;
|
|
216
|
+
if (this.endCondition != undefined)
|
|
217
|
+
res['endCondition'] = this.endCondition;
|
|
218
|
+
if (this.origin != undefined)
|
|
219
|
+
res['origin'] = this.origin;
|
|
220
|
+
if (this.medicationChanged != undefined)
|
|
221
|
+
res['medicationChanged'] = this.medicationChanged;
|
|
222
|
+
if (this.posologyChanged != undefined)
|
|
223
|
+
res['posologyChanged'] = this.posologyChanged;
|
|
224
|
+
if (this.suspension != undefined)
|
|
225
|
+
res['suspension'] = this.suspension.map((x0) => x0.toJSON());
|
|
226
|
+
if (this.prescriptionRID != undefined)
|
|
227
|
+
res['prescriptionRID'] = this.prescriptionRID;
|
|
228
|
+
if (this.status != undefined)
|
|
229
|
+
res['status'] = this.status;
|
|
230
|
+
if (this.stockLocation != undefined)
|
|
231
|
+
res['stockLocation'] = this.stockLocation.toJSON();
|
|
232
|
+
return res;
|
|
233
|
+
}
|
|
234
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Medication']) {
|
|
235
|
+
if (typeof json != 'object')
|
|
236
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
237
|
+
const jCpy = Object.assign({}, json);
|
|
238
|
+
const res = new Medication({
|
|
239
|
+
compoundPrescription: expectString(extractEntry(jCpy, 'compoundPrescription', false, path), true, [...path, ".compoundPrescription"]),
|
|
240
|
+
substanceProduct: expectObject(extractEntry(jCpy, 'substanceProduct', false, path), true, ignoreUnknownKeys, [...path, ".substanceProduct"], Substanceproduct.fromJSON),
|
|
241
|
+
medicinalProduct: expectObject(extractEntry(jCpy, 'medicinalProduct', false, path), true, ignoreUnknownKeys, [...path, ".medicinalProduct"], Medicinalproduct.fromJSON),
|
|
242
|
+
numberOfPackages: expectNumber(extractEntry(jCpy, 'numberOfPackages', false, path), true, true, [...path, ".numberOfPackages"]),
|
|
243
|
+
batch: expectString(extractEntry(jCpy, 'batch', false, path), true, [...path, ".batch"]),
|
|
244
|
+
expirationDate: expectNumber(extractEntry(jCpy, 'expirationDate', false, path), true, true, [...path, ".expirationDate"]),
|
|
245
|
+
instructionForPatient: expectString(extractEntry(jCpy, 'instructionForPatient', false, path), true, [...path, ".instructionForPatient"]),
|
|
246
|
+
instructionForReimbursement: expectString(extractEntry(jCpy, 'instructionForReimbursement', false, path), true, [...path, ".instructionForReimbursement"]),
|
|
247
|
+
commentForDelivery: expectString(extractEntry(jCpy, 'commentForDelivery', false, path), true, [...path, ".commentForDelivery"]),
|
|
248
|
+
drugRoute: expectString(extractEntry(jCpy, 'drugRoute', false, path), true, [...path, ".drugRoute"]),
|
|
249
|
+
temporality: expectString(extractEntry(jCpy, 'temporality', false, path), true, [...path, ".temporality"]),
|
|
250
|
+
frequency: expectObject(extractEntry(jCpy, 'frequency', false, path), true, ignoreUnknownKeys, [...path, ".frequency"], CodeStub.fromJSON),
|
|
251
|
+
reimbursementReason: expectObject(extractEntry(jCpy, 'reimbursementReason', false, path), true, ignoreUnknownKeys, [...path, ".reimbursementReason"], CodeStub.fromJSON),
|
|
252
|
+
substitutionAllowed: expectBoolean(extractEntry(jCpy, 'substitutionAllowed', false, path), true, [...path, ".substitutionAllowed"]),
|
|
253
|
+
beginMoment: expectNumber(extractEntry(jCpy, 'beginMoment', false, path), true, true, [...path, ".beginMoment"]),
|
|
254
|
+
endMoment: expectNumber(extractEntry(jCpy, 'endMoment', false, path), true, true, [...path, ".endMoment"]),
|
|
255
|
+
deliveryMoment: expectNumber(extractEntry(jCpy, 'deliveryMoment', false, path), true, true, [...path, ".deliveryMoment"]),
|
|
256
|
+
endExecutionMoment: expectNumber(extractEntry(jCpy, 'endExecutionMoment', false, path), true, true, [...path, ".endExecutionMoment"]),
|
|
257
|
+
duration: expectObject(extractEntry(jCpy, 'duration', false, path), true, ignoreUnknownKeys, [...path, ".duration"], Duration.fromJSON),
|
|
258
|
+
renewal: expectObject(extractEntry(jCpy, 'renewal', false, path), true, ignoreUnknownKeys, [...path, ".renewal"], Renewal.fromJSON),
|
|
259
|
+
knownUsage: expectBoolean(extractEntry(jCpy, 'knownUsage', false, path), true, [...path, ".knownUsage"]),
|
|
260
|
+
regimen: expectArray(extractEntry(jCpy, 'regimen', false, path), true, [...path, ".regimen"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, RegimenItem.fromJSON)),
|
|
261
|
+
posology: expectString(extractEntry(jCpy, 'posology', false, path), true, [...path, ".posology"]),
|
|
262
|
+
agreements: expectMap(extractEntry(jCpy, 'agreements', false, path), true, [...path, ".agreements"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectObject(v0, false, ignoreUnknownKeys, p0, ParagraphAgreement.fromJSON)),
|
|
263
|
+
medicationSchemeIdOnSafe: expectString(extractEntry(jCpy, 'medicationSchemeIdOnSafe', false, path), true, [...path, ".medicationSchemeIdOnSafe"]),
|
|
264
|
+
medicationSchemeSafeVersion: expectNumber(extractEntry(jCpy, 'medicationSchemeSafeVersion', false, path), true, true, [...path, ".medicationSchemeSafeVersion"]),
|
|
265
|
+
medicationSchemeTimeStampOnSafe: expectNumber(extractEntry(jCpy, 'medicationSchemeTimeStampOnSafe', false, path), true, true, [...path, ".medicationSchemeTimeStampOnSafe"]),
|
|
266
|
+
medicationSchemeDocumentId: expectString(extractEntry(jCpy, 'medicationSchemeDocumentId', false, path), true, [...path, ".medicationSchemeDocumentId"]),
|
|
267
|
+
safeIdName: expectString(extractEntry(jCpy, 'safeIdName', false, path), true, [...path, ".safeIdName"]),
|
|
268
|
+
idOnSafes: expectString(extractEntry(jCpy, 'idOnSafes', false, path), true, [...path, ".idOnSafes"]),
|
|
269
|
+
timestampOnSafe: expectNumber(extractEntry(jCpy, 'timestampOnSafe', false, path), true, true, [...path, ".timestampOnSafe"]),
|
|
270
|
+
changeValidated: expectBoolean(extractEntry(jCpy, 'changeValidated', false, path), true, [...path, ".changeValidated"]),
|
|
271
|
+
newSafeMedication: expectBoolean(extractEntry(jCpy, 'newSafeMedication', false, path), true, [...path, ".newSafeMedication"]),
|
|
272
|
+
medicationUse: expectString(extractEntry(jCpy, 'medicationUse', false, path), true, [...path, ".medicationUse"]),
|
|
273
|
+
beginCondition: expectString(extractEntry(jCpy, 'beginCondition', false, path), true, [...path, ".beginCondition"]),
|
|
274
|
+
endCondition: expectString(extractEntry(jCpy, 'endCondition', false, path), true, [...path, ".endCondition"]),
|
|
275
|
+
origin: expectString(extractEntry(jCpy, 'origin', false, path), true, [...path, ".origin"]),
|
|
276
|
+
medicationChanged: expectBoolean(extractEntry(jCpy, 'medicationChanged', false, path), true, [...path, ".medicationChanged"]),
|
|
277
|
+
posologyChanged: expectBoolean(extractEntry(jCpy, 'posologyChanged', false, path), true, [...path, ".posologyChanged"]),
|
|
278
|
+
suspension: expectArray(extractEntry(jCpy, 'suspension', false, path), true, [...path, ".suspension"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Suspension.fromJSON)),
|
|
279
|
+
prescriptionRID: expectString(extractEntry(jCpy, 'prescriptionRID', false, path), true, [...path, ".prescriptionRID"]),
|
|
280
|
+
status: expectNumber(extractEntry(jCpy, 'status', false, path), true, true, [...path, ".status"]),
|
|
281
|
+
stockLocation: expectObject(extractEntry(jCpy, 'stockLocation', false, path), true, ignoreUnknownKeys, [...path, ".stockLocation"], DecryptedAddress.fromJSON),
|
|
282
|
+
});
|
|
283
|
+
if (!ignoreUnknownKeys) {
|
|
284
|
+
const unused = Object.keys(jCpy);
|
|
285
|
+
if (unused.length > 0)
|
|
286
|
+
throw new Error(`Unexpected key(s) for json object Medication at path ${path.join("")}: ${unused}`);
|
|
287
|
+
}
|
|
288
|
+
return res;
|
|
289
|
+
}
|
|
133
290
|
}
|
|
@@ -6,4 +6,6 @@ export declare class Medicinalproduct {
|
|
|
6
6
|
deliveredname: string | undefined;
|
|
7
7
|
productId: string | undefined;
|
|
8
8
|
constructor(partial: Partial<Medicinalproduct>);
|
|
9
|
+
toJSON(): object;
|
|
10
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Medicinalproduct;
|
|
9
11
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectArray, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { CodeStub } from '../base/CodeStub.mjs';
|
|
1
4
|
export class Medicinalproduct {
|
|
2
5
|
constructor(partial) {
|
|
3
6
|
this.intendedcds = [];
|
|
@@ -16,4 +19,34 @@ export class Medicinalproduct {
|
|
|
16
19
|
if ('productId' in partial)
|
|
17
20
|
this.productId = partial.productId;
|
|
18
21
|
}
|
|
22
|
+
toJSON() {
|
|
23
|
+
const res = {};
|
|
24
|
+
res['intendedcds'] = this.intendedcds.map((x0) => x0.toJSON());
|
|
25
|
+
res['deliveredcds'] = this.deliveredcds.map((x0) => x0.toJSON());
|
|
26
|
+
if (this.intendedname != undefined)
|
|
27
|
+
res['intendedname'] = this.intendedname;
|
|
28
|
+
if (this.deliveredname != undefined)
|
|
29
|
+
res['deliveredname'] = this.deliveredname;
|
|
30
|
+
if (this.productId != undefined)
|
|
31
|
+
res['productId'] = this.productId;
|
|
32
|
+
return res;
|
|
33
|
+
}
|
|
34
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Medicinalproduct']) {
|
|
35
|
+
if (typeof json != 'object')
|
|
36
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
37
|
+
const jCpy = Object.assign({}, json);
|
|
38
|
+
const res = new Medicinalproduct({
|
|
39
|
+
intendedcds: expectArray(extractEntry(jCpy, 'intendedcds', false, path), false, [...path, ".intendedcds"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
40
|
+
deliveredcds: expectArray(extractEntry(jCpy, 'deliveredcds', false, path), false, [...path, ".deliveredcds"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
41
|
+
intendedname: expectString(extractEntry(jCpy, 'intendedname', false, path), true, [...path, ".intendedname"]),
|
|
42
|
+
deliveredname: expectString(extractEntry(jCpy, 'deliveredname', false, path), true, [...path, ".deliveredname"]),
|
|
43
|
+
productId: expectString(extractEntry(jCpy, 'productId', false, path), true, [...path, ".productId"]),
|
|
44
|
+
});
|
|
45
|
+
if (!ignoreUnknownKeys) {
|
|
46
|
+
const unused = Object.keys(jCpy);
|
|
47
|
+
if (unused.length > 0)
|
|
48
|
+
throw new Error(`Unexpected key(s) for json object Medicinalproduct at path ${path.join("")}: ${unused}`);
|
|
49
|
+
}
|
|
50
|
+
return res;
|
|
51
|
+
}
|
|
19
52
|
}
|
|
@@ -3,4 +3,6 @@ export declare class MessageAttachment {
|
|
|
3
3
|
type: DocumentLocation | undefined;
|
|
4
4
|
ids: Array<string>;
|
|
5
5
|
constructor(partial: Partial<MessageAttachment>);
|
|
6
|
+
toJSON(): object;
|
|
7
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): MessageAttachment;
|
|
6
8
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectArray, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { DocumentLocation } from './DocumentLocation.mjs';
|
|
1
4
|
export class MessageAttachment {
|
|
2
5
|
constructor(partial) {
|
|
3
6
|
this.type = undefined;
|
|
@@ -7,4 +10,26 @@ export class MessageAttachment {
|
|
|
7
10
|
if ('ids' in partial && partial.ids !== undefined)
|
|
8
11
|
this.ids = partial.ids;
|
|
9
12
|
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
const res = {};
|
|
15
|
+
if (this.type != undefined)
|
|
16
|
+
res['type'] = this.type;
|
|
17
|
+
res['ids'] = this.ids.map((x0) => x0);
|
|
18
|
+
return res;
|
|
19
|
+
}
|
|
20
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['MessageAttachment']) {
|
|
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 MessageAttachment({
|
|
25
|
+
type: expectStringEnum(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"], DocumentLocation, 'DocumentLocation'),
|
|
26
|
+
ids: expectArray(extractEntry(jCpy, 'ids', false, path), false, [...path, ".ids"], (x0, p0) => expectString(x0, false, p0)),
|
|
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 MessageAttachment at path ${path.join("")}: ${unused}`);
|
|
32
|
+
}
|
|
33
|
+
return res;
|
|
34
|
+
}
|
|
10
35
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectBoolean, expectNumber, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class MessageReadStatus {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.time = undefined;
|
|
@@ -8,4 +9,26 @@ export class MessageReadStatus {
|
|
|
8
9
|
if ('read' in partial && partial.read !== undefined)
|
|
9
10
|
this.read = partial.read;
|
|
10
11
|
}
|
|
12
|
+
toJSON() {
|
|
13
|
+
const res = {};
|
|
14
|
+
if (this.time != undefined)
|
|
15
|
+
res['time'] = this.time;
|
|
16
|
+
res['read'] = this.read;
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['MessageReadStatus']) {
|
|
20
|
+
if (typeof json != 'object')
|
|
21
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
22
|
+
const jCpy = Object.assign({}, json);
|
|
23
|
+
const res = new MessageReadStatus({
|
|
24
|
+
time: expectNumber(extractEntry(jCpy, 'time', false, path), true, true, [...path, ".time"]),
|
|
25
|
+
read: expectBoolean(extractEntry(jCpy, 'read', false, path), false, [...path, ".read"]),
|
|
26
|
+
});
|
|
27
|
+
if (!ignoreUnknownKeys) {
|
|
28
|
+
const unused = Object.keys(jCpy);
|
|
29
|
+
if (unused.length > 0)
|
|
30
|
+
throw new Error(`Unexpected key(s) for json object MessageReadStatus at path ${path.join("")}: ${unused}`);
|
|
31
|
+
}
|
|
32
|
+
return res;
|
|
33
|
+
}
|
|
11
34
|
}
|
|
@@ -25,4 +25,6 @@ export declare class ParagraphAgreement {
|
|
|
25
25
|
agreementAppendices: Array<AgreementAppendix> | undefined;
|
|
26
26
|
documentId: string | undefined;
|
|
27
27
|
constructor(partial: Partial<ParagraphAgreement>);
|
|
28
|
+
toJSON(): object;
|
|
29
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ParagraphAgreement;
|
|
28
30
|
}
|