4.2.1.2. EHR Endpoint¶
Warning
WIP
The DefaultRestClient
includes a DefaultRestEhrEndpoint
with the following functionalities.
4.2.1.2.1. Create an EHR¶
The creation of a new EHR is as simple as calling:
UUID ehr = openEhrClient.ehrEndpoint().createEhr();
Note
The option to add a custom EHR Status object at this step is already on the road map.
4.2.1.2.2. Get the EHR status¶
Retrieval of the EHR Status of a given EHR is done with a call like:
Optional<EhrStatus> ehrStatus = openEhrClient.ehrEndpoint().getEhrStatus(ehrId);
4.2.1.2.3. Update the EHR status¶
Updating works in the same way and might be used like in the following:
// Retrieval and modification of the Status
...
// Followed by updating it
openEhrClient.ehrEndpoint().updateEhrStatus(ehrId, ehrStatus);