Does ETag in composition response header really need quotes?

It’s all in the title but I note that the compositionUID comes back within quotes e.g. "". What’s the reason behind the quotes as this obviously puts another step into converting this into a variable for further use.

Hmm, good catch @johnmeredith .
Actually I just realize it now, our specification is wrong, ETag should have quotes (sorry!). See I will make a correction for v1.1.0 release.

Where do you saw it with quotes? Was it in a response of a specific implementation?



I thought the question was about openehr-specification. I was not sure if @johnmeredith found it somewhere in our (openEHR) or in an implementation specification. The example is obviously from EHRbase :slight_smile:
In any case my response was related to changes that needs to be done to openehr specs.

By including the quotes in the code block I thought it was obvious that the quotes are presetn in the ETag :wink:

So ETag with quotes is to spec?

Yes, there is a change request proposed to add missing quotes. That has to go through SEC workflow and eventually will be published.

It is slightly annoying as this is the kind of data that it is nice to pull back easily in the response - perhaps also make ehr_id/value part of the minimal return (without the “”)!


What do you mean - can you give an example?

Hi Ian,

ETags are part of HTTP. We cannot remove the double quotes without breaking HTTP rules.

1 Like

Sure - I got that. I was suggesting that the ehr_id might be a part of the representation=minimal response itself, not the headers.

TBH I did find it quite confusing that successful response can return a no content 204 message after a succesful template upload- one place where returning te templateId in the response is useful - I use returned ehrIds, composition Is and templateIds quite a bit when using Postman in trainig/ demos./ testing etc.

Not a major issue, just feels we have lost a little helpfulness!!

This will strip out the extras as a test in postman:

pm.test("CompositionId in header is present", function () {"ETag");
var originalETag = postman.getResponseHeader("ETag");
var newETag = originalETag.replace(/\"/g,"");
postman.setEnvironmentVariable("versioned_object_uid",newETag.split("::", 1));
1 Like