Class OpenehrEhrController

java.lang.Object
org.ehrbase.rest.BaseController
org.ehrbase.rest.openehr.OpenehrEhrController
All Implemented Interfaces:
EhrApiSpecification

@ConditionalOnMissingBean(name="primaryopenehrehrcontroller") @RestController @RequestMapping(path="${openehr-api.context-path:/rest/openehr}/v1/ehr", produces={"application/json","application/xml"}) public class OpenehrEhrController extends BaseController implements EhrApiSpecification
Controller for /ehr resource of openEHR REST API
  • Constructor Details

    • OpenehrEhrController

      @Autowired public OpenehrEhrController(EhrService ehrService, SystemService systemService)
  • Method Details

    • createEhr

      @PostMapping @ResponseStatus(CREATED) public org.springframework.http.ResponseEntity createEhr(@RequestHeader(value="openEHR-VERSION",required=false) String openehrVersion, @RequestHeader(value="openEHR-AUDIT_DETAILS",required=false) String openehrAuditDetails, @RequestHeader(value="Content-Type",required=false) String contentType, @RequestHeader(value="Accept",required=false) String accept, @RequestHeader(value="Prefer",required=false,defaultValue="return=minimal") String prefer, @RequestBody(required=false) com.nedap.archie.rm.ehr.EhrStatus ehrStatus)
      Specified by:
      createEhr in interface EhrApiSpecification
    • createEhrWithId

      @PutMapping(path="/{ehr_id}") @ResponseStatus(CREATED) public org.springframework.http.ResponseEntity<org.ehrbase.openehr.sdk.response.dto.EhrResponseData> createEhrWithId(@RequestHeader(value="openEHR-VERSION",required=false) String openehrVersion, @RequestHeader(value="openEHR-AUDIT_DETAILS",required=false) String openehrAuditDetails, @RequestHeader(value="Accept",required=false) String accept, @RequestHeader(value="Prefer",required=false) String prefer, @PathVariable("ehr_id") String ehrIdString, @RequestBody(required=false) com.nedap.archie.rm.ehr.EhrStatus ehrStatus)
      Specified by:
      createEhrWithId in interface EhrApiSpecification
    • retrieveEhrById

      @GetMapping(path="/{ehr_id}") public org.springframework.http.ResponseEntity<org.ehrbase.openehr.sdk.response.dto.EhrResponseData> retrieveEhrById(@RequestHeader(value="Accept",required=false) String accept, @PathVariable("ehr_id") String ehrIdString)
      Returns EHR by ID
      Specified by:
      retrieveEhrById in interface EhrApiSpecification
    • retrieveEhrBySubject

      @GetMapping(params={"subject_id","subject_namespace"}) public org.springframework.http.ResponseEntity<org.ehrbase.openehr.sdk.response.dto.EhrResponseData> retrieveEhrBySubject(@RequestHeader(value="Accept",required=false) String accept, @RequestParam("subject_id") String subjectId, @RequestParam("subject_namespace") String subjectNamespace)
      Returns EHR by subject (id and namespace)
      Specified by:
      retrieveEhrBySubject in interface EhrApiSpecification