@icure/api 7.1.13 → 8.0.0-RC.1
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/icc-api/api/IccAccesslogApi.d.ts +23 -1
- package/icc-api/api/IccAccesslogApi.js +154 -84
- package/icc-api/api/IccAccesslogApi.js.map +1 -1
- package/icc-api/api/IccBemikronoApi.d.ts +81 -0
- package/icc-api/api/IccBemikronoApi.js +163 -0
- package/icc-api/api/IccBemikronoApi.js.map +1 -0
- package/icc-api/api/IccCalendarItemApi.d.ts +21 -1
- package/icc-api/api/IccCalendarItemApi.js +183 -117
- package/icc-api/api/IccCalendarItemApi.js.map +1 -1
- package/icc-api/api/IccClassificationApi.d.ts +21 -1
- package/icc-api/api/IccClassificationApi.js +119 -63
- package/icc-api/api/IccClassificationApi.js.map +1 -1
- package/icc-api/api/IccContactApi.d.ts +21 -1
- package/icc-api/api/IccContactApi.js +385 -294
- package/icc-api/api/IccContactApi.js.map +1 -1
- package/icc-api/api/IccDocumentApi.d.ts +32 -25
- package/icc-api/api/IccDocumentApi.js +264 -212
- package/icc-api/api/IccDocumentApi.js.map +1 -1
- package/icc-api/api/IccExchangeDataApi.d.ts +19 -0
- package/icc-api/api/IccExchangeDataApi.js +85 -0
- package/icc-api/api/IccExchangeDataApi.js.map +1 -0
- package/icc-api/api/IccExchangeDataMapApi.d.ts +18 -0
- package/icc-api/api/IccExchangeDataMapApi.js +65 -0
- package/icc-api/api/IccExchangeDataMapApi.js.map +1 -0
- package/icc-api/api/IccFormApi.d.ts +28 -5
- package/icc-api/api/IccFormApi.js +328 -222
- package/icc-api/api/IccFormApi.js.map +1 -1
- package/icc-api/api/IccGroupApi.d.ts +40 -7
- package/icc-api/api/IccGroupApi.js +91 -16
- package/icc-api/api/IccGroupApi.js.map +1 -1
- package/icc-api/api/IccHelementApi.d.ts +21 -1
- package/icc-api/api/IccHelementApi.js +207 -137
- package/icc-api/api/IccHelementApi.js.map +1 -1
- package/icc-api/api/IccInvoiceApi.d.ts +21 -1
- package/icc-api/api/IccInvoiceApi.js +404 -298
- package/icc-api/api/IccInvoiceApi.js.map +1 -1
- package/icc-api/api/IccMaintenanceTaskApi.d.ts +12 -1
- package/icc-api/api/IccMaintenanceTaskApi.js +79 -43
- package/icc-api/api/IccMaintenanceTaskApi.js.map +1 -1
- package/icc-api/api/IccMessageApi.d.ts +12 -1
- package/icc-api/api/IccMessageApi.js +257 -191
- package/icc-api/api/IccMessageApi.js.map +1 -1
- package/icc-api/api/IccPatientApi.d.ts +12 -1
- package/icc-api/api/IccPatientApi.js +447 -351
- package/icc-api/api/IccPatientApi.js.map +1 -1
- package/icc-api/api/IccReceiptApi.d.ts +22 -8
- package/icc-api/api/IccReceiptApi.js +121 -64
- package/icc-api/api/IccReceiptApi.js.map +1 -1
- package/icc-api/api/IccRestApiPath.js +1 -1
- package/icc-api/api/IccRestApiPath.js.map +1 -1
- package/icc-api/api/IccTimeTableApi.d.ts +12 -1
- package/icc-api/api/IccTimeTableApi.js +86 -48
- package/icc-api/api/IccTimeTableApi.js.map +1 -1
- package/icc-api/api/XHR.js +1 -1
- package/icc-api/api/XHR.js.map +1 -1
- package/icc-api/index.d.ts +1 -0
- package/icc-api/index.js +1 -0
- package/icc-api/index.js.map +1 -1
- package/icc-api/model/AccessLog.d.ts +4 -0
- package/icc-api/model/AccessLog.js +1 -0
- package/icc-api/model/AccessLog.js.map +1 -1
- package/icc-api/model/Article.d.ts +4 -0
- package/icc-api/model/Article.js +1 -0
- package/icc-api/model/Article.js.map +1 -1
- package/icc-api/model/CalendarItem.d.ts +6 -1
- package/icc-api/model/CalendarItem.js +1 -0
- package/icc-api/model/CalendarItem.js.map +1 -1
- package/icc-api/model/Classification.d.ts +4 -0
- package/icc-api/model/Classification.js +1 -0
- package/icc-api/model/Classification.js.map +1 -1
- package/icc-api/model/ClassificationTemplate.d.ts +2 -0
- package/icc-api/model/ClassificationTemplate.js.map +1 -1
- package/icc-api/model/Contact.d.ts +4 -0
- package/icc-api/model/Contact.js +1 -0
- package/icc-api/model/Contact.js.map +1 -1
- package/icc-api/model/Device.d.ts +4 -4
- package/icc-api/model/Device.js.map +1 -1
- package/icc-api/model/Document.d.ts +4 -0
- package/icc-api/model/Document.js +1 -0
- package/icc-api/model/Document.js.map +1 -1
- package/icc-api/model/ExchangeData.d.ts +61 -0
- package/icc-api/model/ExchangeData.js +12 -0
- package/icc-api/model/ExchangeData.js.map +1 -0
- package/icc-api/model/ExchangeDataMap.d.ts +21 -0
- package/icc-api/model/ExchangeDataMap.js +10 -0
- package/icc-api/model/ExchangeDataMap.js.map +1 -0
- package/icc-api/model/ExchangeDataMapCreationBatch.d.ts +13 -0
- package/icc-api/model/ExchangeDataMapCreationBatch.js +10 -0
- package/icc-api/model/ExchangeDataMapCreationBatch.js.map +1 -0
- package/icc-api/model/Form.d.ts +4 -0
- package/icc-api/model/Form.js +1 -0
- package/icc-api/model/Form.js.map +1 -1
- package/icc-api/model/FormTemplate.d.ts +2 -1
- package/icc-api/model/FormTemplate.js +2 -1
- package/icc-api/model/FormTemplate.js.map +1 -1
- package/icc-api/model/Group.d.ts +7 -0
- package/icc-api/model/Group.js.map +1 -1
- package/icc-api/model/GroupDatabasesInfo.d.ts +1 -0
- package/icc-api/model/GroupDatabasesInfo.js.map +1 -1
- package/icc-api/model/HealthElement.d.ts +4 -0
- package/icc-api/model/HealthElement.js +1 -0
- package/icc-api/model/HealthElement.js.map +1 -1
- package/icc-api/model/HealthcareParty.d.ts +2 -2
- package/icc-api/model/HealthcareParty.js.map +1 -1
- package/icc-api/model/IcureStub.d.ts +2 -0
- package/icc-api/model/IcureStub.js.map +1 -1
- package/icc-api/model/Invoice.d.ts +4 -0
- package/icc-api/model/Invoice.js +1 -0
- package/icc-api/model/Invoice.js.map +1 -1
- package/icc-api/model/MaintenanceTask.d.ts +4 -0
- package/icc-api/model/MaintenanceTask.js +1 -0
- package/icc-api/model/MaintenanceTask.js.map +1 -1
- package/icc-api/model/Message.d.ts +4 -0
- package/icc-api/model/Message.js +1 -0
- package/icc-api/model/Message.js.map +1 -1
- package/icc-api/model/OperationToken.d.ts +18 -0
- package/icc-api/model/OperationToken.js +21 -0
- package/icc-api/model/OperationToken.js.map +1 -0
- package/icc-api/model/PaginatedListExchangeData.d.ts +9 -0
- package/icc-api/model/PaginatedListExchangeData.js +10 -0
- package/icc-api/model/PaginatedListExchangeData.js.map +1 -0
- package/icc-api/model/Patient.d.ts +6 -2
- package/icc-api/model/Patient.js +1 -0
- package/icc-api/model/Patient.js.map +1 -1
- package/icc-api/model/PatientByHcPartyGenderEducationProfession.d.ts +31 -0
- package/icc-api/model/PatientByHcPartyGenderEducationProfession.js +32 -0
- package/icc-api/model/PatientByHcPartyGenderEducationProfession.js.map +1 -0
- package/icc-api/model/Receipt.d.ts +4 -0
- package/icc-api/model/Receipt.js +1 -0
- package/icc-api/model/Receipt.js.map +1 -1
- package/icc-api/model/SecureDelegation.d.ts +52 -0
- package/icc-api/model/SecureDelegation.js +16 -0
- package/icc-api/model/SecureDelegation.js.map +1 -0
- package/icc-api/model/SecurityMetadata.d.ts +33 -0
- package/icc-api/model/SecurityMetadata.js +13 -0
- package/icc-api/model/SecurityMetadata.js.map +1 -0
- package/icc-api/model/Service.d.ts +2 -0
- package/icc-api/model/Service.js.map +1 -1
- package/icc-api/model/TimeTable.d.ts +4 -0
- package/icc-api/model/TimeTable.js +1 -0
- package/icc-api/model/TimeTable.js.map +1 -1
- package/icc-api/model/models.d.ts +20 -39
- package/icc-api/model/models.js +15 -37
- package/icc-api/model/models.js.map +1 -1
- package/icc-api/model/requests/EntityBulkShareResult.d.ts +28 -0
- package/icc-api/model/requests/EntityBulkShareResult.js +16 -0
- package/icc-api/model/requests/EntityBulkShareResult.js.map +1 -0
- package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.d.ts +10 -0
- package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js +17 -0
- package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js.map +1 -0
- package/icc-api/model/requests/EntityShareRequest.d.ts +110 -0
- package/icc-api/model/requests/EntityShareRequest.js +63 -0
- package/icc-api/model/requests/EntityShareRequest.js.map +1 -0
- package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.d.ts +54 -0
- package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js +24 -0
- package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js.map +1 -0
- package/icc-api/model/requests/MinimalEntityBulkShareResult.d.ts +23 -0
- package/icc-api/model/requests/MinimalEntityBulkShareResult.js +13 -0
- package/icc-api/model/requests/MinimalEntityBulkShareResult.js.map +1 -0
- package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.d.ts +21 -0
- package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js +14 -0
- package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js.map +1 -0
- package/icc-x-api/basexapi/EncryptedEntityXApi.d.ts +3 -2
- package/icc-x-api/basexapi/EncryptedEntityXApi.js.map +1 -1
- package/icc-x-api/crypto/AES.js +1 -1
- package/icc-x-api/crypto/AES.js.map +1 -1
- package/icc-x-api/crypto/AccessControlKeysHeadersProvider.d.ts +16 -0
- package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js +41 -0
- package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js.map +1 -0
- package/icc-x-api/crypto/AccessControlSecretUtils.d.ts +42 -0
- package/icc-x-api/crypto/AccessControlSecretUtils.js +86 -0
- package/icc-x-api/crypto/AccessControlSecretUtils.js.map +1 -0
- package/icc-x-api/crypto/BaseExchangeDataManager.d.ts +146 -0
- package/icc-x-api/crypto/BaseExchangeDataManager.js +342 -0
- package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -0
- package/icc-x-api/crypto/BaseExchangeKeysManager.d.ts +0 -18
- package/icc-x-api/crypto/BaseExchangeKeysManager.js +11 -85
- package/icc-x-api/crypto/BaseExchangeKeysManager.js.map +1 -1
- package/icc-x-api/crypto/ConfidentialEntities.d.ts +26 -16
- package/icc-x-api/crypto/ConfidentialEntities.js +30 -17
- package/icc-x-api/crypto/ConfidentialEntities.js.map +1 -1
- package/icc-x-api/crypto/CryptoStrategies.d.ts +8 -1
- package/icc-x-api/crypto/CryptoStrategies.js.map +1 -1
- package/icc-x-api/crypto/ExchangeDataManager.d.ts +95 -0
- package/icc-x-api/crypto/ExchangeDataManager.js +493 -0
- package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -0
- package/icc-x-api/crypto/ExchangeDataMapManager.d.ts +32 -0
- package/icc-x-api/crypto/ExchangeDataMapManager.js +70 -0
- package/icc-x-api/crypto/ExchangeDataMapManager.js.map +1 -0
- package/icc-x-api/crypto/ExchangeKeysManager.d.ts +4 -16
- package/icc-x-api/crypto/ExchangeKeysManager.js +4 -62
- package/icc-x-api/crypto/ExchangeKeysManager.js.map +1 -1
- package/icc-x-api/crypto/ExtendedApisUtils.d.ts +336 -0
- package/icc-x-api/crypto/ExtendedApisUtils.js +3 -0
- package/icc-x-api/crypto/ExtendedApisUtils.js.map +1 -0
- package/icc-x-api/crypto/ExtendedApisUtilsImpl.d.ts +181 -0
- package/icc-x-api/crypto/ExtendedApisUtilsImpl.js +562 -0
- package/icc-x-api/crypto/ExtendedApisUtilsImpl.js.map +1 -0
- package/icc-x-api/crypto/KeyRecovery.d.ts +5 -2
- package/icc-x-api/crypto/KeyRecovery.js +59 -29
- package/icc-x-api/crypto/KeyRecovery.js.map +1 -1
- package/icc-x-api/crypto/LegacyCryptoStrategies.d.ts +7 -2
- package/icc-x-api/crypto/LegacyCryptoStrategies.js +8 -1
- package/icc-x-api/crypto/LegacyCryptoStrategies.js.map +1 -1
- package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.d.ts +39 -0
- package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js +150 -0
- package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js.map +1 -0
- package/icc-x-api/crypto/RSA.d.ts +34 -8
- package/icc-x-api/crypto/RSA.js +80 -13
- package/icc-x-api/crypto/RSA.js.map +1 -1
- package/icc-x-api/crypto/SecureDelegationsEncryption.d.ts +54 -0
- package/icc-x-api/crypto/SecureDelegationsEncryption.js +178 -0
- package/icc-x-api/crypto/SecureDelegationsEncryption.js.map +1 -0
- package/icc-x-api/crypto/SecureDelegationsManager.d.ts +66 -0
- package/icc-x-api/crypto/SecureDelegationsManager.js +261 -0
- package/icc-x-api/crypto/SecureDelegationsManager.js.map +1 -0
- package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.d.ts +37 -0
- package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js +294 -0
- package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js.map +1 -0
- package/icc-x-api/crypto/SecurityMetadataDecryptor.d.ts +114 -0
- package/icc-x-api/crypto/SecurityMetadataDecryptor.js +98 -0
- package/icc-x-api/crypto/SecurityMetadataDecryptor.js.map +1 -0
- package/icc-x-api/crypto/ShamirKeysManager.d.ts +5 -5
- package/icc-x-api/crypto/ShamirKeysManager.js +6 -9
- package/icc-x-api/crypto/ShamirKeysManager.js.map +1 -1
- package/icc-x-api/crypto/TransferKeysManager.d.ts +8 -6
- package/icc-x-api/crypto/TransferKeysManager.js +75 -52
- package/icc-x-api/crypto/TransferKeysManager.js.map +1 -1
- package/icc-x-api/crypto/{KeyManager.d.ts → UserEncryptionKeysManager.d.ts} +4 -6
- package/icc-x-api/crypto/{KeyManager.js → UserEncryptionKeysManager.js} +43 -23
- package/icc-x-api/crypto/UserEncryptionKeysManager.js.map +1 -0
- package/icc-x-api/crypto/UserSignatureKeysManager.d.ts +26 -0
- package/icc-x-api/crypto/UserSignatureKeysManager.js +74 -0
- package/icc-x-api/crypto/UserSignatureKeysManager.js.map +1 -0
- package/icc-x-api/crypto/utils.d.ts +61 -11
- package/icc-x-api/crypto/utils.js +113 -44
- package/icc-x-api/crypto/utils.js.map +1 -1
- package/icc-x-api/filters/filters.js.map +1 -1
- package/icc-x-api/icc-accesslog-x-api.d.ts +46 -11
- package/icc-x-api/icc-accesslog-x-api.js +75 -42
- package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
- package/icc-x-api/icc-calendar-item-x-api.d.ts +50 -14
- package/icc-x-api/icc-calendar-item-x-api.js +99 -49
- package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
- package/icc-x-api/icc-classification-x-api.d.ts +44 -9
- package/icc-x-api/icc-classification-x-api.js +56 -31
- package/icc-x-api/icc-classification-x-api.js.map +1 -1
- package/icc-x-api/icc-contact-x-api.d.ts +56 -32
- package/icc-x-api/icc-contact-x-api.js +95 -64
- package/icc-x-api/icc-contact-x-api.js.map +1 -1
- package/icc-x-api/icc-crypto-x-api.d.ts +28 -334
- package/icc-x-api/icc-crypto-x-api.js +41 -765
- package/icc-x-api/icc-crypto-x-api.js.map +1 -1
- package/icc-x-api/icc-data-owner-x-api.d.ts +20 -8
- package/icc-x-api/icc-data-owner-x-api.js +31 -10
- package/icc-x-api/icc-data-owner-x-api.js.map +1 -1
- package/icc-x-api/icc-document-x-api.d.ts +48 -11
- package/icc-x-api/icc-document-x-api.js +111 -64
- package/icc-x-api/icc-document-x-api.js.map +1 -1
- package/icc-x-api/icc-form-x-api.d.ts +45 -10
- package/icc-x-api/icc-form-x-api.js +65 -35
- package/icc-x-api/icc-form-x-api.js.map +1 -1
- package/icc-x-api/icc-hcparty-x-api.d.ts +2 -2
- package/icc-x-api/icc-hcparty-x-api.js +3 -3
- package/icc-x-api/icc-hcparty-x-api.js.map +1 -1
- package/icc-x-api/icc-helement-x-api.d.ts +55 -18
- package/icc-x-api/icc-helement-x-api.js +76 -41
- package/icc-x-api/icc-helement-x-api.js.map +1 -1
- package/icc-x-api/icc-icure-maintenance-x-api.d.ts +7 -2
- package/icc-x-api/icc-icure-maintenance-x-api.js +38 -27
- package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
- package/icc-x-api/icc-invoice-x-api.d.ts +50 -15
- package/icc-x-api/icc-invoice-x-api.js +63 -33
- package/icc-x-api/icc-invoice-x-api.js.map +1 -1
- package/icc-x-api/icc-maintenance-task-x-api.d.ts +53 -21
- package/icc-x-api/icc-maintenance-task-x-api.js +72 -35
- package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
- package/icc-x-api/icc-message-x-api.d.ts +53 -15
- package/icc-x-api/icc-message-x-api.js +65 -36
- package/icc-x-api/icc-message-x-api.js.map +1 -1
- package/icc-x-api/icc-patient-x-api.d.ts +84 -29
- package/icc-x-api/icc-patient-x-api.js +313 -378
- package/icc-x-api/icc-patient-x-api.js.map +1 -1
- package/icc-x-api/icc-receipt-x-api.d.ts +44 -12
- package/icc-x-api/icc-receipt-x-api.js +67 -35
- package/icc-x-api/icc-receipt-x-api.js.map +1 -1
- package/icc-x-api/icc-time-table-x-api.d.ts +43 -12
- package/icc-x-api/icc-time-table-x-api.js +56 -26
- package/icc-x-api/icc-time-table-x-api.js.map +1 -1
- package/icc-x-api/icc-user-x-api.d.ts +2 -2
- package/icc-x-api/icc-user-x-api.js +3 -3
- package/icc-x-api/icc-user-x-api.js.map +1 -1
- package/icc-x-api/index.d.ts +4 -2
- package/icc-x-api/index.js +154 -135
- package/icc-x-api/index.js.map +1 -1
- package/icc-x-api/storage/DefaultStorageEntryKeysFactory.d.ts +2 -0
- package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js +9 -2
- package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js.map +1 -1
- package/icc-x-api/storage/IcureStorageFacade.d.ts +23 -2
- package/icc-x-api/storage/IcureStorageFacade.js +36 -2
- package/icc-x-api/storage/IcureStorageFacade.js.map +1 -1
- package/icc-x-api/storage/KeyStorageFacade.d.ts +12 -0
- package/icc-x-api/storage/KeyStorageFacade.js.map +1 -1
- package/icc-x-api/storage/KeyStorageImpl.d.ts +2 -0
- package/icc-x-api/storage/KeyStorageImpl.js +10 -0
- package/icc-x-api/storage/KeyStorageImpl.js.map +1 -1
- package/icc-x-api/storage/StorageEntryKeysFactory.d.ts +14 -1
- package/icc-x-api/storage/StorageEntryKeysFactory.js.map +1 -1
- package/icc-x-api/utils/EntityWithDelegationTypeName.d.ts +32 -0
- package/icc-x-api/utils/EntityWithDelegationTypeName.js +75 -0
- package/icc-x-api/utils/EntityWithDelegationTypeName.js.map +1 -0
- package/icc-x-api/utils/ShareResult.d.ts +74 -0
- package/icc-x-api/utils/ShareResult.js +61 -0
- package/icc-x-api/utils/ShareResult.js.map +1 -0
- package/icc-x-api/utils/binary-utils.d.ts +1 -0
- package/icc-x-api/utils/binary-utils.js +8 -1
- package/icc-x-api/utils/binary-utils.js.map +1 -1
- package/icc-x-api/utils/collection-utils.d.ts +5 -0
- package/icc-x-api/utils/collection-utils.js +26 -1
- package/icc-x-api/utils/collection-utils.js.map +1 -1
- package/icc-x-api/utils/crypto-utils.d.ts +4 -3
- package/icc-x-api/utils/crypto-utils.js +5 -4
- package/icc-x-api/utils/crypto-utils.js.map +1 -1
- package/icc-x-api/utils/lru-temporised-async-cache.d.ts +26 -3
- package/icc-x-api/utils/lru-temporised-async-cache.js +75 -15
- package/icc-x-api/utils/lru-temporised-async-cache.js.map +1 -1
- package/icc-x-api/utils/websocket.d.ts +10 -10
- package/icc-x-api/utils/websocket.js +18 -9
- package/icc-x-api/utils/websocket.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +2 -3
- package/icc-x-api/crypto/EntitiesEncryption.d.ts +0 -275
- package/icc-x-api/crypto/EntitiesEncryption.js +0 -734
- package/icc-x-api/crypto/EntitiesEncryption.js.map +0 -1
- package/icc-x-api/crypto/KeyManager.js.map +0 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.IccFormApi = void 0;
|
|
4
13
|
/**
|
|
@@ -19,15 +28,20 @@ const FormTemplate_1 = require("../model/FormTemplate");
|
|
|
19
28
|
const IcureStub_1 = require("../model/IcureStub");
|
|
20
29
|
const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationProvider");
|
|
21
30
|
const IccRestApiPath_1 = require("./IccRestApiPath");
|
|
31
|
+
const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
|
|
32
|
+
const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
|
|
22
33
|
class IccFormApi {
|
|
34
|
+
get headers() {
|
|
35
|
+
return Promise.resolve(this._headers);
|
|
36
|
+
}
|
|
23
37
|
constructor(host, headers, authenticationProvider, fetchImpl) {
|
|
24
38
|
this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
|
|
25
|
-
this.
|
|
39
|
+
this._headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
|
|
26
40
|
this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new AuthenticationProvider_1.NoAuthenticationProvider();
|
|
27
41
|
this.fetchImpl = fetchImpl;
|
|
28
42
|
}
|
|
29
43
|
setHeaders(h) {
|
|
30
|
-
this.
|
|
44
|
+
this._headers = h;
|
|
31
45
|
}
|
|
32
46
|
handleError(e) {
|
|
33
47
|
throw e;
|
|
@@ -38,14 +52,16 @@ class IccFormApi {
|
|
|
38
52
|
* @param body
|
|
39
53
|
*/
|
|
40
54
|
createForm(body) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
let _body = null;
|
|
57
|
+
_body = body;
|
|
58
|
+
const _url = this.host + `/form` + '?ts=' + new Date().getTime();
|
|
59
|
+
let headers = yield this.headers;
|
|
60
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
61
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
62
|
+
.then((doc) => new Form_1.Form(doc.body))
|
|
63
|
+
.catch((err) => this.handleError(err));
|
|
64
|
+
});
|
|
49
65
|
}
|
|
50
66
|
/**
|
|
51
67
|
* Returns an instance of created form template.
|
|
@@ -53,14 +69,16 @@ class IccFormApi {
|
|
|
53
69
|
* @param body
|
|
54
70
|
*/
|
|
55
71
|
createFormTemplate(body) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
.
|
|
63
|
-
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
let _body = null;
|
|
74
|
+
_body = body;
|
|
75
|
+
const _url = this.host + `/form/template` + '?ts=' + new Date().getTime();
|
|
76
|
+
let headers = yield this.headers;
|
|
77
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
78
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
79
|
+
.then((doc) => new FormTemplate_1.FormTemplate(doc.body))
|
|
80
|
+
.catch((err) => this.handleError(err));
|
|
81
|
+
});
|
|
64
82
|
}
|
|
65
83
|
/**
|
|
66
84
|
* Returns the created forms.
|
|
@@ -68,14 +86,16 @@ class IccFormApi {
|
|
|
68
86
|
* @param body
|
|
69
87
|
*/
|
|
70
88
|
createForms(body) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
let _body = null;
|
|
91
|
+
_body = body;
|
|
92
|
+
const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime();
|
|
93
|
+
let headers = yield this.headers;
|
|
94
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
95
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
96
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
97
|
+
.catch((err) => this.handleError(err));
|
|
98
|
+
});
|
|
79
99
|
}
|
|
80
100
|
/**
|
|
81
101
|
*
|
|
@@ -83,12 +103,14 @@ class IccFormApi {
|
|
|
83
103
|
* @param formTemplateId
|
|
84
104
|
*/
|
|
85
105
|
deleteFormTemplate(formTemplateId) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
let _body = null;
|
|
108
|
+
const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
|
|
109
|
+
let headers = yield this.headers;
|
|
110
|
+
return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
111
|
+
.then((doc) => new DocIdentifier_1.DocIdentifier(doc.body))
|
|
112
|
+
.catch((err) => this.handleError(err));
|
|
113
|
+
});
|
|
92
114
|
}
|
|
93
115
|
/**
|
|
94
116
|
* Response is a set containing the ID's of deleted forms.
|
|
@@ -96,25 +118,35 @@ class IccFormApi {
|
|
|
96
118
|
* @param formIds
|
|
97
119
|
*/
|
|
98
120
|
deleteForms(formIds) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
let _body = null;
|
|
123
|
+
const _url = this.host + `/form/${encodeURIComponent(String(formIds))}` + '?ts=' + new Date().getTime();
|
|
124
|
+
let headers = yield this.headers;
|
|
125
|
+
return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
126
|
+
.then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
|
|
127
|
+
.catch((err) => this.handleError(err));
|
|
128
|
+
});
|
|
105
129
|
}
|
|
106
130
|
/**
|
|
107
131
|
*
|
|
108
132
|
* @summary Gets all form templates for current user
|
|
109
133
|
* @param loadLayout
|
|
134
|
+
* @param raw
|
|
110
135
|
*/
|
|
111
|
-
findFormTemplates(loadLayout) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
136
|
+
findFormTemplates(loadLayout, raw) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
let _body = null;
|
|
139
|
+
const _url = this.host +
|
|
140
|
+
`/form/template` +
|
|
141
|
+
'?ts=' +
|
|
142
|
+
new Date().getTime() +
|
|
143
|
+
(loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
|
|
144
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
145
|
+
let headers = yield this.headers;
|
|
146
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
147
|
+
.then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
|
|
148
|
+
.catch((err) => this.handleError(err));
|
|
149
|
+
});
|
|
118
150
|
}
|
|
119
151
|
/**
|
|
120
152
|
*
|
|
@@ -122,17 +154,20 @@ class IccFormApi {
|
|
|
122
154
|
* @param specialityCode
|
|
123
155
|
* @param loadLayout
|
|
124
156
|
*/
|
|
125
|
-
findFormTemplatesBySpeciality(specialityCode, loadLayout) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
.
|
|
157
|
+
findFormTemplatesBySpeciality(specialityCode, loadLayout, raw) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
let _body = null;
|
|
160
|
+
const _url = this.host +
|
|
161
|
+
`/form/template/bySpecialty/${encodeURIComponent(String(specialityCode))}` +
|
|
162
|
+
'?ts=' +
|
|
163
|
+
new Date().getTime() +
|
|
164
|
+
(loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
|
|
165
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
166
|
+
let headers = yield this.headers;
|
|
167
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
168
|
+
.then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
|
|
169
|
+
.catch((err) => this.handleError(err));
|
|
170
|
+
});
|
|
136
171
|
}
|
|
137
172
|
/**
|
|
138
173
|
* Keys must be delimited by coma
|
|
@@ -144,21 +179,23 @@ class IccFormApi {
|
|
|
144
179
|
* @param body
|
|
145
180
|
*/
|
|
146
181
|
findFormsByHCPartyPatientForeignKeysUsingPost(hcPartyId, healthElementId, planOfActionId, formTemplateId, body) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
let _body = null;
|
|
184
|
+
_body = body;
|
|
185
|
+
const _url = this.host +
|
|
186
|
+
`/form/byHcPartySecretForeignKeys` +
|
|
187
|
+
'?ts=' +
|
|
188
|
+
new Date().getTime() +
|
|
189
|
+
(hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
|
|
190
|
+
(healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
|
|
191
|
+
(planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
|
|
192
|
+
(formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
|
|
193
|
+
let headers = yield this.headers;
|
|
194
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
195
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
196
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
197
|
+
.catch((err) => this.handleError(err));
|
|
198
|
+
});
|
|
162
199
|
}
|
|
163
200
|
/**
|
|
164
201
|
* Keys must be delimited by coma
|
|
@@ -170,20 +207,22 @@ class IccFormApi {
|
|
|
170
207
|
* @param formTemplateId
|
|
171
208
|
*/
|
|
172
209
|
findFormsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys, healthElementId, planOfActionId, formTemplateId) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
let _body = null;
|
|
212
|
+
const _url = this.host +
|
|
213
|
+
`/form/byHcPartySecretForeignKeys` +
|
|
214
|
+
'?ts=' +
|
|
215
|
+
new Date().getTime() +
|
|
216
|
+
(hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
|
|
217
|
+
(secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
|
|
218
|
+
(healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
|
|
219
|
+
(planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
|
|
220
|
+
(formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
|
|
221
|
+
let headers = yield this.headers;
|
|
222
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
223
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
224
|
+
.catch((err) => this.handleError(err));
|
|
225
|
+
});
|
|
187
226
|
}
|
|
188
227
|
/**
|
|
189
228
|
* Keys must be delimited by coma
|
|
@@ -192,18 +231,20 @@ class IccFormApi {
|
|
|
192
231
|
* @param hcPartyId
|
|
193
232
|
*/
|
|
194
233
|
findFormsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId, body) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
let _body = null;
|
|
236
|
+
_body = body;
|
|
237
|
+
const _url = this.host +
|
|
238
|
+
`/form/byHcPartySecretForeignKeys/delegations` +
|
|
239
|
+
'?ts=' +
|
|
240
|
+
new Date().getTime() +
|
|
241
|
+
(hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
|
|
242
|
+
let headers = yield this.headers;
|
|
243
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
244
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
245
|
+
.then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
|
|
246
|
+
.catch((err) => this.handleError(err));
|
|
247
|
+
});
|
|
207
248
|
}
|
|
208
249
|
/**
|
|
209
250
|
*
|
|
@@ -212,17 +253,19 @@ class IccFormApi {
|
|
|
212
253
|
* @param secretFKeys
|
|
213
254
|
*/
|
|
214
255
|
findFormsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
let _body = null;
|
|
258
|
+
const _url = this.host +
|
|
259
|
+
`/form/byHcPartySecretForeignKeys/delegations` +
|
|
260
|
+
'?ts=' +
|
|
261
|
+
new Date().getTime() +
|
|
262
|
+
(hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
|
|
263
|
+
(secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
|
|
264
|
+
let headers = yield this.headers;
|
|
265
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
266
|
+
.then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
|
|
267
|
+
.catch((err) => this.handleError(err));
|
|
268
|
+
});
|
|
226
269
|
}
|
|
227
270
|
/**
|
|
228
271
|
* Keys must be delimited by coma
|
|
@@ -231,12 +274,14 @@ class IccFormApi {
|
|
|
231
274
|
* @param hcPartyId
|
|
232
275
|
*/
|
|
233
276
|
getChildrenForms(formId, hcPartyId) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
let _body = null;
|
|
279
|
+
const _url = this.host + `/form/childrenOf/${encodeURIComponent(String(formId))}/${encodeURIComponent(String(hcPartyId))}` + '?ts=' + new Date().getTime();
|
|
280
|
+
let headers = yield this.headers;
|
|
281
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
282
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
283
|
+
.catch((err) => this.handleError(err));
|
|
284
|
+
});
|
|
240
285
|
}
|
|
241
286
|
/**
|
|
242
287
|
*
|
|
@@ -244,12 +289,14 @@ class IccFormApi {
|
|
|
244
289
|
* @param formId
|
|
245
290
|
*/
|
|
246
291
|
getForm(formId) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
.
|
|
252
|
-
|
|
292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
+
let _body = null;
|
|
294
|
+
const _url = this.host + `/form/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
|
|
295
|
+
let headers = yield this.headers;
|
|
296
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
297
|
+
.then((doc) => new Form_1.Form(doc.body))
|
|
298
|
+
.catch((err) => this.handleError(err));
|
|
299
|
+
});
|
|
253
300
|
}
|
|
254
301
|
/**
|
|
255
302
|
*
|
|
@@ -257,12 +304,14 @@ class IccFormApi {
|
|
|
257
304
|
* @param logicalUuid
|
|
258
305
|
*/
|
|
259
306
|
getFormByLogicalUuid(logicalUuid) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
.
|
|
265
|
-
|
|
307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
let _body = null;
|
|
309
|
+
const _url = this.host + `/form/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
|
|
310
|
+
let headers = yield this.headers;
|
|
311
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
312
|
+
.then((doc) => new Form_1.Form(doc.body))
|
|
313
|
+
.catch((err) => this.handleError(err));
|
|
314
|
+
});
|
|
266
315
|
}
|
|
267
316
|
/**
|
|
268
317
|
*
|
|
@@ -270,42 +319,55 @@ class IccFormApi {
|
|
|
270
319
|
* @param uniqueId
|
|
271
320
|
*/
|
|
272
321
|
getFormByUniqueId(uniqueId) {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
.
|
|
278
|
-
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
let _body = null;
|
|
324
|
+
const _url = this.host + `/form/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
|
|
325
|
+
let headers = yield this.headers;
|
|
326
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
327
|
+
.then((doc) => new Form_1.Form(doc.body))
|
|
328
|
+
.catch((err) => this.handleError(err));
|
|
329
|
+
});
|
|
279
330
|
}
|
|
280
331
|
/**
|
|
281
332
|
*
|
|
282
333
|
* @summary Gets a form template by guid
|
|
283
334
|
* @param formTemplateId
|
|
335
|
+
* @param raw
|
|
284
336
|
*/
|
|
285
|
-
getFormTemplate(formTemplateId) {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
337
|
+
getFormTemplate(formTemplateId, raw) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
let _body = null;
|
|
340
|
+
const _url = this.host +
|
|
341
|
+
`/form/template/${encodeURIComponent(String(formTemplateId))}` +
|
|
342
|
+
'?ts=' +
|
|
343
|
+
new Date().getTime() +
|
|
344
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
345
|
+
let headers = yield this.headers;
|
|
346
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
347
|
+
.then((doc) => new FormTemplate_1.FormTemplate(doc.body))
|
|
348
|
+
.catch((err) => this.handleError(err));
|
|
349
|
+
});
|
|
292
350
|
}
|
|
293
351
|
/**
|
|
294
352
|
*
|
|
295
353
|
* @summary Gets a form template
|
|
296
354
|
* @param formTemplateGuid
|
|
297
355
|
* @param specialityCode
|
|
356
|
+
* @param raw
|
|
298
357
|
*/
|
|
299
|
-
getFormTemplatesByGuid(formTemplateGuid, specialityCode) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
.
|
|
358
|
+
getFormTemplatesByGuid(formTemplateGuid, specialityCode, raw) {
|
|
359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
let _body = null;
|
|
361
|
+
const _url = this.host +
|
|
362
|
+
`/form/template/${encodeURIComponent(String(specialityCode))}/guid/${encodeURIComponent(String(formTemplateGuid))}` +
|
|
363
|
+
'?ts=' +
|
|
364
|
+
new Date().getTime() +
|
|
365
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
366
|
+
let headers = yield this.headers;
|
|
367
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
368
|
+
.then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
|
|
369
|
+
.catch((err) => this.handleError(err));
|
|
370
|
+
});
|
|
309
371
|
}
|
|
310
372
|
/**
|
|
311
373
|
* Keys must be delimited by coma
|
|
@@ -313,14 +375,16 @@ class IccFormApi {
|
|
|
313
375
|
* @param body
|
|
314
376
|
*/
|
|
315
377
|
getForms(body) {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
let _body = null;
|
|
380
|
+
_body = body;
|
|
381
|
+
const _url = this.host + `/form/byIds` + '?ts=' + new Date().getTime();
|
|
382
|
+
let headers = yield this.headers;
|
|
383
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
384
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
385
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
386
|
+
.catch((err) => this.handleError(err));
|
|
387
|
+
});
|
|
324
388
|
}
|
|
325
389
|
/**
|
|
326
390
|
*
|
|
@@ -328,12 +392,14 @@ class IccFormApi {
|
|
|
328
392
|
* @param logicalUuid
|
|
329
393
|
*/
|
|
330
394
|
getFormsByLogicalUuid(logicalUuid) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
395
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
396
|
+
let _body = null;
|
|
397
|
+
const _url = this.host + `/form/all/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
|
|
398
|
+
let headers = yield this.headers;
|
|
399
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
400
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
401
|
+
.catch((err) => this.handleError(err));
|
|
402
|
+
});
|
|
337
403
|
}
|
|
338
404
|
/**
|
|
339
405
|
*
|
|
@@ -341,12 +407,14 @@ class IccFormApi {
|
|
|
341
407
|
* @param uniqueId
|
|
342
408
|
*/
|
|
343
409
|
getFormsByUniqueId(uniqueId) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
410
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
411
|
+
let _body = null;
|
|
412
|
+
const _url = this.host + `/form/all/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
|
|
413
|
+
let headers = yield this.headers;
|
|
414
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
415
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
416
|
+
.catch((err) => this.handleError(err));
|
|
417
|
+
});
|
|
350
418
|
}
|
|
351
419
|
/**
|
|
352
420
|
* Returns the modified form.
|
|
@@ -354,14 +422,16 @@ class IccFormApi {
|
|
|
354
422
|
* @param body
|
|
355
423
|
*/
|
|
356
424
|
modifyForm(body) {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
.
|
|
364
|
-
|
|
425
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
426
|
+
let _body = null;
|
|
427
|
+
_body = body;
|
|
428
|
+
const _url = this.host + `/form` + '?ts=' + new Date().getTime();
|
|
429
|
+
let headers = yield this.headers;
|
|
430
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
431
|
+
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
432
|
+
.then((doc) => new Form_1.Form(doc.body))
|
|
433
|
+
.catch((err) => this.handleError(err));
|
|
434
|
+
});
|
|
365
435
|
}
|
|
366
436
|
/**
|
|
367
437
|
* Returns the modified forms.
|
|
@@ -369,14 +439,16 @@ class IccFormApi {
|
|
|
369
439
|
* @param body
|
|
370
440
|
*/
|
|
371
441
|
modifyForms(body) {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
442
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
443
|
+
let _body = null;
|
|
444
|
+
_body = body;
|
|
445
|
+
const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime();
|
|
446
|
+
let headers = yield this.headers;
|
|
447
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
448
|
+
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
449
|
+
.then((doc) => doc.body.map((it) => new Form_1.Form(it)))
|
|
450
|
+
.catch((err) => this.handleError(err));
|
|
451
|
+
});
|
|
380
452
|
}
|
|
381
453
|
/**
|
|
382
454
|
* It delegates a form to a healthcare party. Returns the form with the new delegations.
|
|
@@ -385,14 +457,16 @@ class IccFormApi {
|
|
|
385
457
|
* @param formId
|
|
386
458
|
*/
|
|
387
459
|
newFormDelegations(formId, body) {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
.
|
|
395
|
-
|
|
460
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
+
let _body = null;
|
|
462
|
+
_body = body;
|
|
463
|
+
const _url = this.host + `/form/delegate/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
|
|
464
|
+
let headers = yield this.headers;
|
|
465
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
466
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
467
|
+
.then((doc) => new Form_1.Form(doc.body))
|
|
468
|
+
.catch((err) => this.handleError(err));
|
|
469
|
+
});
|
|
396
470
|
}
|
|
397
471
|
/**
|
|
398
472
|
* Keys must be delimited by coma
|
|
@@ -400,14 +474,16 @@ class IccFormApi {
|
|
|
400
474
|
* @param body
|
|
401
475
|
*/
|
|
402
476
|
setFormsDelegations(body) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
477
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
478
|
+
let _body = null;
|
|
479
|
+
_body = body;
|
|
480
|
+
const _url = this.host + `/form/delegations` + '?ts=' + new Date().getTime();
|
|
481
|
+
let headers = yield this.headers;
|
|
482
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
483
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
484
|
+
.then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
|
|
485
|
+
.catch((err) => this.handleError(err));
|
|
486
|
+
});
|
|
411
487
|
}
|
|
412
488
|
/**
|
|
413
489
|
*
|
|
@@ -416,19 +492,21 @@ class IccFormApi {
|
|
|
416
492
|
* @param formTemplateId
|
|
417
493
|
*/
|
|
418
494
|
setTemplateAttachmentMulti(attachment, formTemplateId) {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
.
|
|
431
|
-
|
|
495
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
496
|
+
let _body = null;
|
|
497
|
+
if (attachment && !_body) {
|
|
498
|
+
const parts = Array.isArray(attachment) ? attachment : [attachment];
|
|
499
|
+
const _blob = new Blob(parts, { type: 'application/octet-stream' });
|
|
500
|
+
_body = new FormData();
|
|
501
|
+
_body.append('attachment', _blob);
|
|
502
|
+
}
|
|
503
|
+
const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` + '?ts=' + new Date().getTime();
|
|
504
|
+
let headers = yield this.headers;
|
|
505
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'multipart/form-data'));
|
|
506
|
+
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
507
|
+
.then((doc) => JSON.parse(JSON.stringify(doc.body)))
|
|
508
|
+
.catch((err) => this.handleError(err));
|
|
509
|
+
});
|
|
432
510
|
}
|
|
433
511
|
/**
|
|
434
512
|
* Returns an instance of created form template.
|
|
@@ -437,14 +515,42 @@ class IccFormApi {
|
|
|
437
515
|
* @param formTemplateId
|
|
438
516
|
*/
|
|
439
517
|
updateFormTemplate(formTemplateId, body) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
.
|
|
447
|
-
|
|
518
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
519
|
+
let _body = null;
|
|
520
|
+
_body = body;
|
|
521
|
+
const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
|
|
522
|
+
let headers = yield this.headers;
|
|
523
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
524
|
+
return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
525
|
+
.then((doc) => new FormTemplate_1.FormTemplate(doc.body))
|
|
526
|
+
.catch((err) => this.handleError(err));
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* @internal this method is for internal use only and may be changed without notice
|
|
531
|
+
*/
|
|
532
|
+
bulkShareForms(request) {
|
|
533
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
534
|
+
const _url = this.host + '/form/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime();
|
|
535
|
+
let headers = yield this.headers;
|
|
536
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
537
|
+
return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
538
|
+
.then((doc) => doc.body.map((x) => new EntityBulkShareResult_1.EntityBulkShareResult(x, Form_1.Form)))
|
|
539
|
+
.catch((err) => this.handleError(err));
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* @internal this method is for internal use only and may be changed without notice
|
|
544
|
+
*/
|
|
545
|
+
bulkShareFormsMinimal(request) {
|
|
546
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
547
|
+
const _url = this.host + '/form/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime();
|
|
548
|
+
let headers = yield this.headers;
|
|
549
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
550
|
+
return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
551
|
+
.then((doc) => doc.body.map((x) => new MinimalEntityBulkShareResult_1.MinimalEntityBulkShareResult(x)))
|
|
552
|
+
.catch((err) => this.handleError(err));
|
|
553
|
+
});
|
|
448
554
|
}
|
|
449
555
|
}
|
|
450
556
|
exports.IccFormApi = IccFormApi;
|