Package org.ehrbase.rest.openehr
Class OpenehrVersionedCompositionController
java.lang.Object
org.ehrbase.rest.BaseController
org.ehrbase.rest.openehr.OpenehrVersionedCompositionController
- All Implemented Interfaces:
VersionedCompositionApiSpecification
@RestController
@RequestMapping(path="${openehr-api.context-path:/rest/openehr}/v1/ehr/{ehr_id}/versioned_composition",
produces={"application/json","application/xml"})
public class OpenehrVersionedCompositionController
extends BaseController
implements VersionedCompositionApiSpecification
Controller for /ehr/{ehrId}/versioned_composition resource of openEHR REST API
-
Field Summary
Fields inherited from class org.ehrbase.rest.BaseController
ACCEPT, API_CONTEXT_PATH_WITH_VERSION, apiContextPathWithVersion, COMPOSITION, CONTENT_TYPE, CONTRIBUTION, DEFINITION, DIRECTORY, EHR, EHR_STATUS, ETAG, IF_MATCH, IF_NONE_MATCH, LAST_MODIFIED, LOCATION, OPENEHR_AUDIT_DETAILS, OPENEHR_VERSION, PREFER, QUERY, REQ_ACCEPT, REQ_CONTENT_TYPE, REQ_CONTENT_TYPE_BODY, REQ_OPENEHR_AUDIT, REQ_OPENEHR_VERSION, REQ_PREFER, RESP_CONTENT_TYPE_DESC, RESP_ETAG_DESC, RESP_LAST_MODIFIED_DESC, RESP_LOCATION_DESC, RESP_NOT_ACCEPTABLE_DESC, RESP_UNSUPPORTED_MEDIA_DESC, REST_OPERATION, RETURN_MINIMAL, RETURN_REPRESENTATION, TEMPLATE -
Constructor Summary
ConstructorsConstructorDescriptionOpenehrVersionedCompositionController(EhrService ehrService, CompositionService compositionService, ContributionService contributionService) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.ehrbase.response.openehr.VersionedObjectResponseData<com.nedap.archie.rm.composition.Composition>>retrieveVersionedCompositionByVersionedObjectUid(String accept, String ehrIdString, String versionedObjectUid) org.springframework.http.ResponseEntity<org.ehrbase.response.openehr.RevisionHistoryResponseData>retrieveVersionedCompositionRevisionHistoryByEhr(String accept, String ehrIdString, String versionedObjectUid) org.springframework.http.ResponseEntity<org.ehrbase.response.openehr.OriginalVersionResponseData<com.nedap.archie.rm.composition.Composition>>retrieveVersionOfCompositionByTime(String accept, String ehrIdString, String versionedObjectUid, LocalDateTime versionAtTime) org.springframework.http.ResponseEntity<org.ehrbase.response.openehr.OriginalVersionResponseData<com.nedap.archie.rm.composition.Composition>>retrieveVersionOfCompositionByVersionUid(String accept, String ehrIdString, String versionedObjectUid, String versionUid) Methods inherited from class org.ehrbase.rest.BaseController
add2MetaMap, createLocationUri, decodeVersionAtTime, encodePath, enrichRequestAttribute, extractCompositionFormat, extractVersionedObjectUidFromVersionUid, extractVersionFromVersionUid, getCompositionVersionedObjectUidString, getContextPath, getContributionVersionedObjectUidString, getEhrUuid, resolveContentType, resolveContentType
-
Constructor Details
-
OpenehrVersionedCompositionController
@Autowired public OpenehrVersionedCompositionController(EhrService ehrService, CompositionService compositionService, ContributionService contributionService)
-
-
Method Details
-
retrieveVersionedCompositionByVersionedObjectUid
@GetMapping(path="/{versioned_object_uid}") public org.springframework.http.ResponseEntity<org.ehrbase.response.openehr.VersionedObjectResponseData<com.nedap.archie.rm.composition.Composition>> retrieveVersionedCompositionByVersionedObjectUid(@RequestHeader(value="Accept",required=false) String accept, @PathVariable("ehr_id") String ehrIdString, @PathVariable("versioned_object_uid") String versionedObjectUid) - Specified by:
retrieveVersionedCompositionByVersionedObjectUidin interfaceVersionedCompositionApiSpecification
-
retrieveVersionedCompositionRevisionHistoryByEhr
@GetMapping(path="/{versioned_object_uid}/revision_history") public org.springframework.http.ResponseEntity<org.ehrbase.response.openehr.RevisionHistoryResponseData> retrieveVersionedCompositionRevisionHistoryByEhr(@RequestHeader(value="Accept",required=false) String accept, @PathVariable("ehr_id") String ehrIdString, @PathVariable("versioned_object_uid") String versionedObjectUid) - Specified by:
retrieveVersionedCompositionRevisionHistoryByEhrin interfaceVersionedCompositionApiSpecification
-
retrieveVersionOfCompositionByVersionUid
@GetMapping(path="/{versioned_object_uid}/version/{version_uid}") @PostAuthorize("checkAbacPost(@openehrVersionedCompositionController.COMPOSITION, @ehrService.getSubjectExtRef(#ehrIdString), returnObject, #accept)") public org.springframework.http.ResponseEntity<org.ehrbase.response.openehr.OriginalVersionResponseData<com.nedap.archie.rm.composition.Composition>> retrieveVersionOfCompositionByVersionUid(@RequestHeader(value="Accept",required=false) String accept, @PathVariable("ehr_id") String ehrIdString, @PathVariable("versioned_object_uid") String versionedObjectUid, @PathVariable("version_uid") String versionUid) - Specified by:
retrieveVersionOfCompositionByVersionUidin interfaceVersionedCompositionApiSpecification
-
retrieveVersionOfCompositionByTime
@GetMapping(path="/{versioned_object_uid}/version") @PostAuthorize("checkAbacPost(@openehrVersionedCompositionController.COMPOSITION, @ehrService.getSubjectExtRef(#ehrIdString), returnObject, #accept)") public org.springframework.http.ResponseEntity<org.ehrbase.response.openehr.OriginalVersionResponseData<com.nedap.archie.rm.composition.Composition>> retrieveVersionOfCompositionByTime(@RequestHeader(value="Accept",required=false) String accept, @PathVariable("ehr_id") String ehrIdString, @PathVariable("versioned_object_uid") String versionedObjectUid, @RequestParam(value="version_at_time",required=false) @DateTimeFormat(iso=DATE_TIME) LocalDateTime versionAtTime) - Specified by:
retrieveVersionOfCompositionByTimein interfaceVersionedCompositionApiSpecification
-