Package org.ehrbase.rest.openehr
Class OpenehrContributionController
java.lang.Object
org.ehrbase.rest.BaseController
org.ehrbase.rest.openehr.OpenehrContributionController
- All Implemented Interfaces:
ContributionApiSpecification
@RestController
@RequestMapping(path="${openehr-api.context-path:/rest/openehr}/v1/ehr",
produces={"application/json","application/xml"})
public class OpenehrContributionController
extends BaseController
implements ContributionApiSpecification
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntitycreateContribution(String openehrVersion, String openehrAuditDetails, String contentType, String accept, String prefer, String ehrIdString, String contribution) org.springframework.http.ResponseEntitygetContribution(String openehrVersion, String openehrAuditDetails, String accept, String ehrIdString, String contributionUidString) Methods inherited from class org.ehrbase.rest.BaseController
add2MetaMap, createLocationUri, decodeVersionAtTime, encodePath, enrichRequestAttribute, extractCompositionFormat, extractVersionedObjectUidFromVersionUid, extractVersionFromVersionUid, getCompositionVersionedObjectUidString, getContextPath, getContributionVersionedObjectUidString, getEhrUuid, resolveContentType, resolveContentType
-
Constructor Details
-
OpenehrContributionController
-
-
Method Details
-
createContribution
@PostMapping(value="/{ehr_id}/contribution", consumes={"application/xml","application/json"}) @PreAuthorize("checkAbacPre(@openehrContributionController.CONTRIBUTION, @ehrService.getSubjectExtRef(#ehrIdString), #contribution, #contentType)") @ResponseStatus(CREATED) public org.springframework.http.ResponseEntity createContribution(@RequestHeader(value="openEHR-VERSION",required=false) String openehrVersion, @RequestHeader(value="openEHR-AUDIT_DETAILS",required=false) String openehrAuditDetails, @RequestHeader("Content-Type") String contentType, @RequestHeader(value="Accept",required=false) String accept, @RequestHeader(value="Prefer",required=false) String prefer, @PathVariable("ehr_id") String ehrIdString, @RequestBody String contribution) - Specified by:
createContributionin interfaceContributionApiSpecification
-
getContribution
@GetMapping("/{ehr_id}/contribution/{contribution_uid}") public org.springframework.http.ResponseEntity getContribution(@RequestHeader(value="openEHR-VERSION",required=false) String openehrVersion, @RequestHeader(value="openEHR-AUDIT_DETAILS",required=false) String openehrAuditDetails, @RequestHeader(value="Accept",required=false) String accept, @PathVariable("ehr_id") String ehrIdString, @PathVariable("contribution_uid") String contributionUidString) - Specified by:
getContributionin interfaceContributionApiSpecification
-