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
  • Constructor Details

    • OpenehrContributionController

      @Autowired public OpenehrContributionController(ContributionService contributionService)
  • 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:
      createContribution in interface ContributionApiSpecification
    • 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:
      getContribution in interface ContributionApiSpecification