Package org.ehrbase.api.service
Interface ContributionService
public interface ContributionService
Interface for contribution service roughly based on openEHR SM "I_EHR_CONTRIBUTION Interface",
see: https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_contribution_interface
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidadminDelete(UUID ehrId, UUID contributionId) Admin method to delete a Contribution from the DB.commitContribution(UUID ehrId, String content) Commit a CONTRIBUTION containing any number of serialized VERSIONobjects. org.ehrbase.openehr.sdk.response.dto.ehrscape.ContributionDtogetContribution(UUID ehrId, UUID contributionId) Return the Contribution with given id in given EHR.
-
Method Details
-
getContribution
@Nonnull org.ehrbase.openehr.sdk.response.dto.ehrscape.ContributionDto getContribution(UUID ehrId, UUID contributionId) Return the Contribution with given id in given EHR.- Parameters:
ehrId- ID of EHRcontributionId- ID of contribution
-
commitContribution
Commit a CONTRIBUTION containing any number of serialized VERSIONobjects. - Parameters:
ehrId- ID of EHRcontent- serialized content, containing version objects and audit object in given format- Returns:
- ID of successfully committed contribution
- Throws:
IllegalArgumentException- when input can't be processedInternalServerException- when DB is inconsistent
-
adminDelete
Admin method to delete a Contribution from the DB. See EHRbase Admin API specification for details.- Parameters:
ehrId-contributionId- Contribution to delete
-