Skip to content

Make document and message encryptable#184

Merged
trema96 merged 2 commits intorelease/v8from
feature/encryptable-document-message
Jun 5, 2025
Merged

Make document and message encryptable#184
trema96 merged 2 commits intorelease/v8from
feature/encryptable-document-message

Conversation

@trema96
Copy link
Copy Markdown
Contributor

@trema96 trema96 commented Jun 3, 2025

Add encryption to Document and Message apis. For all methods with Document/Message inputs or outputs:

  • the base api implementation is overriden in the x api with a method that throws an exception (returns never)
  • a new xWithUser method that encrypts inputs and decrypts outputs is added. The methods take as input a user to align with the existing implementations, but this user can be undefined as it is not actually used.

Other changes:

  • Changes to existing decrypt method on Document
    • Removed unused parameter hcpartyId
    • Changed return type
    • Embedded attachment (encryptedAttachment / decryptedAttachment) is not handled automatically anymore. If needed we can add a decryptEmbeddedAttachment
  • Removed message-in-topic methods
  • Removed encrypted / decrypted message methods not following the xWithUser convention (replaced by the corresponding xWithUser method)
  • Removed DocumentXApi.findByMessage (replaced by findIdsByMessage)
  • Fixes and changes to PatientXApi.export method:
    • Remove using post parameter
    • Stop using deprecated get by patient id method, replaced by get ids by patient ids + batch retrieve
    • Fix return type
    • Return coherent entities: everything is decrypted if possible, stop using stubs.

@trema96 trema96 marked this pull request as ready for review June 5, 2025 09:09
@trema96 trema96 merged commit 59653bd into release/v8 Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant