FHIR Chat · Conformance errors on touchstone with multiple testruns · implementers

Stream: implementers

Topic: Conformance errors on touchstone with multiple testruns


view this post on Zulip Florian Apolloner (Mar 15 2019 at 16:52):

So I am trying to get a few tests running on https://touchstone.aegis.net/ -- so far so good. What I have noted is that if I select any of the basic XML tests (for instance /FHIR3-0-1-Basic/I-O/Organization/Client Assigned Id/Organization-client-id-xml ) and then later run the same JSON tests against my server (without emptying the database) I get the following errors (during Step4-ResourceHistoryInstance): b18a7528-c317-4e17-9d6c-2927c28cc674.png

This somewhat makes sense since touchstone reuses the same Ids between the JSON & XML runs. So while the first run is fine (there are no deletions in the history yet) the next one will fail because the history contains a deleted element for which I have a resource with only an ID.

Now I am wondering if this is an oversight in touchstone or if my implementation misses something crucial. Any pointers would be appreciated :)

view this post on Zulip Lloyd McKenzie (Mar 15 2019 at 17:10):

@Richard Ettema ?

view this post on Zulip Richard Ettema (Mar 18 2019 at 14:41):

@Florian Apolloner, I have reviewed your test results for the Organization history interaction in the /FHIR3-0-1-Basic/I-O/Organization/Client Assigned Id/Organization-client-id-xml execution. The validation assert is correctly evaluating your history Bundle.

Touchstone incorporates the FHIR validation engine from the FHIR specification Java code. The validation of a Bundle invokes validation for each contained Bundle.entry.resource. So, in this case each individual Organization resource is validated for conformance to the FHIR specification. The validation errors in this test execution from this assert:

Validation of response body against profile 'http://hl7.org/fhir/StructureDefinition/Bundle' by FHIR specification's Validation Engine produced the following results:

1. ERROR: The organization SHALL at least have a name or an id, and possibly more than one [(identifier.count() + name.count()) > 0]. Location: Bundle.entry[3].resource (line 1, col3978).
2. ERROR: The organization SHALL at least have a name or an id, and possibly more than one [(identifier.count() + name.count()) > 0]. Location: Bundle.entry[4].resource (line 1, col4469).

are both produced via the Organization 'org-1' constraint - please see: http://hl7.org/fhir/STU3/organization.html#invs

view this post on Zulip Richard Ettema (Mar 18 2019 at 14:48):

The history interaction states in the specification, http://hl7.org/fhir/STU3/http.html#history, the following (snipped):

If the entry.request.method is a PUT or a POST, the entry SHALL contain a resource

The DELETE method is expected to follow the delete interaction definition, http://hl7.org/fhir/STU3/http.html#delete, where it states (snipped):

For servers that maintain a version history, the delete interaction does not remove a resource's version history. From a version history respect, deleting a resource is the equivalent of creating a special kind of history entry that has no content and is marked as deleted. Note that there is no support for deleting past versions - see notes on the history interaction.

Since the deleted resource has no content, the history Bundle.entry.resource for a deleted resource version is expected to not be present.

view this post on Zulip Richard Ettema (Mar 18 2019 at 14:50):

For future reference, you may post Touchstone specific questions, comments, issues in the #Touchstone stream. You may also send any support issues to our Touchstone Support Team at Touchstone_Support@aegis.net.

view this post on Zulip Florian Apolloner (Mar 18 2019 at 22:10):

@Richard Ettema Thanks, I've also found this out after a discussion in https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Search.20by.20_lastUpdated.20for.20deleted.20resources.3F -- apparently at least hapi and Google cloud keep an "empty" resource with just an ID even for deleted entries. This led me to believe that this is how the specification should be read, apologies for the mistake.

view this post on Zulip Florian Apolloner (Mar 19 2019 at 08:24):

On a second thought, does this also mean that a history bundle cannot include fullUrl for deleted entries due to the 'bdl-7' constraint? (bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (expression : entry.where(fullUrl).select(fullUrl&resource.meta.versionId).isDistinct()))

view this post on Zulip Lloyd McKenzie (Mar 19 2019 at 15:16):

That's a really good question. It would primarily be an issue where an item had been deleted twice. @Grahame Grieve @Ewout Kramer ?

view this post on Zulip Grahame Grieve (Mar 19 2019 at 19:33):

we revoked that in R4 for this reason (amongst others)


Last updated: Apr 12 2022 at 19:14 UTC