FHIR Toolkit test setup errors when using relative URLs in Document Recipient's ITI-65 responses

39 views
Skip to first unread message

Andreas Schnabl

unread,
Mar 21, 2024, 5:04:11 AM3/21/24
to IHE MHD Implementors
Hi,

I am currently developing an MHD Document Recipient/Responder, and tried running a set of the FHIR Toolkit's tests (MHDv410_comprehensive, version 4.2.0 of the toolkit) against it. The first of these tests  ("Prerequisite Single Document with Binary") posts a Bundle (List, DocumentReference, Binary) to our system using an ITI-65 request, and the reads back and checks some of the posted resources.

A number of negative followup tests (e.g. "Bad Patient Link") then seem to use the response to the first test's ITI-65 request to determine the base URL of the Document Responder actor. However, if my server uses relative URLs (note: my Document Recipient and Document Responder use the same base URL) in the body of its ITI-65 response, as follows:

{"resourceType":"Bundle","type":"transaction-response","entry":[{"response":{"status":"201 Created","location":"DocumentReference/131"}},{"response":{"status":"201 Created","location":"List/submissionset-131"}},{"response":{"status":"201 Created","location":"Binary/3302007"}}]}

then the negative followup tests (such as "Bad Patient Link") fail in their setup phase. Specifically, in the setup step "Verify resource location value has an indexOf 'DocumentReference' is greater than -1.", I get the following error result:

Eval expression: ‘DocumentReference/131’.indexOf(’/DocumentReference/’) Expected -1 Operator is greaterThan Found -1

If I change my server to use absolute URLs instead (like http://localhost:11971/fhir/r4/DocumentReference/139), the FHIR Toolkit gets through these setup phases just fine.
From my understanding of FHIR transactions, relative location URLs in transaction responses should be fine ([1] says "The Location MAY be an absolute or relative URL.", and according to [2], the location response field in transactions contains the locations that would be returned by the singular operations), and I didn't find anything to the contrary in MHD's ITI-65 definition [3]. Even the initial "Prerequisite Single Document with Binary" test case in the FHIR Toolkit seems to account for relative URLs in the ITI-65 response.

Is there any way to use the negative test cases of the DocumentRecipient test suite if the Document Recipient uses relative URLs for its ITI-65 responses' location fields?

sunil.k....@nist.gov

unread,
Mar 25, 2024, 3:53:51 PM3/25/24
to IHE MHD Implementors
Thanks for taking your time to report this issue. I opened a new bug fix ticket along with a temporary fix suggestion here: https://github.com/usnistgov/asbestos/issues/226.

Regards,
Sunil

Andreas Schnabl

unread,
Mar 28, 2024, 5:32:56 AM3/28/24
to IHE MHD Implementors
Thanks for the quick fix!
I just applied it in my local setup, and it looks good there.

Regards, Andreas
Reply all
Reply to author
Forward
0 new messages