My opinion is that text should be changed, since to retrieve linked objects for an EHR in full is not practical for the number of potential objects that could be linked to an EHR. I believe whoever redacted that was thinking more of providing an example than a hard rule. If you look at the get EHR by id endpoint, the response doesn’t have linked objects.
This is what’s expected (last version):
{
"system_id": {
"value": "d60e2348-b083-48ce-93b9-916cef1d3a5a"
},
"ehr_id": {
"value": "7d44b88c-4199-4bad-97dc-d78268e01398"
},
"ehr_status": {
"id": {
"_type": "OBJECT_VERSION_ID",
"value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
},
"namespace": "local",
"type": "EHR_STATUS"
},
"ehr_access": {
"id": {
"_type": "OBJECT_VERSION_ID",
"value": "59a8d0ac-140e-4feb-b2d6-af99f8e68af8::openEHRSys.example.com::1"
},
"namespace": "local",
"type": "EHR_ACCESS"
},
"time_created": {
"value": "2015-01-20T19:30:22.765+01:00"
}
}
This is what was expected from version 1.0.0 (I think this was from 2017 when we released the first spec):
{
"system_id": {},
"ehr_id": {},
"ehr_status": {},
"time_created", "...",
... // to be defined, possibly counts of compositions, contributions, etc.
}
Found: OpenEHR REST EHR API
Some key aspects:
- ehr_status is linked directly in its last version, no OBJECT_REF there by default
- same with the access
- no compositions
- no folders
If that’s is what’s expected, then that’s not RM, and I think the wording on the paragraph you shared is what’s inconsistent, not the response payload.
Again, what we lack, beside this part says this and that part says that, is a formal spec of the objects managed in the API, requests and responses, not only responses, and that’s the role of the SM, which most don’t even consider when implementing and testing openEHR and I find it a very rich place to specify formal APIs, which also allows conformance testing.
One small thing to note: in previous versions of the REST API spec, the endpoint wasn’t called “get EHR by id”, it was called “get EHR summary by id”, still the response payload is the same. I find the “summary” part has special meaning here since it’s explicitly saying “this is not the full EHR”. EHR API
PS: I do like to link specs 