Given the Test Description: "The system under test MUST find a previously created resource when searched using the parameter and return it in the search results (SEARCH)."
Given the Preconditions: - The DocumentReference-Read test case must have been executed successfully beforehand.
When Get FHIR resource at "http://fhirserver/metadata" with content type "json"
And CapabilityStatement contains interaction "search-type" for resource "DocumentReference"
And CapabilityStatement contains definition of search parameter "{searchParamValue}" of type "{searchParamType}" for resource "DocumentReference"
When Get FHIR resource at "http://fhirserver/DocumentReference/?_id=${data.documentreference-read-id}" with content type "xml"
And response bundle contains resource with ID "${data.documentreference-read-id}" with error message "The requested DocumentReference ${data.documentreference-read-id} is not contained in the response bundle"
When Get FHIR resource at "http://fhirserver/DocumentReference/?_count=1" with content type "xml"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0 and entry.resource.count() {= 1' with error message 'The _count parameter was not applied as expected'
When Get FHIR resource at "http://fhirserver/DocumentReference/?patient=Patient/${data.documentreference-read-patient-id}" with content type "xml"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And element "subject" in all bundle resources references resource with ID "${data.documentreference-read-patient-id}"
When Get FHIR resource at "http://fhirserver/DocumentReference/?_tag=${data.tag-system}%7C${data.tag-value}&patient=Patient/${data.documentreference-read-patient-id}" with content type "xml"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And FHIR current response body evaluates the FHIRPath "entry.resource.all(meta.tag.where(code='${data.tag-value}').exists())" with error message 'There are search results, but they do not fully match the search criteria'
When Get FHIR resource at "http://fhirserver/DocumentReference/?status=current&patient=Patient/${data.documentreference-read-patient-id}" with content type "json"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And FHIR current response body evaluates the FHIRPath "entry.resource.all(status = 'current')" with error message 'There are search results, but they do not fully match the search criteria.'
When Get FHIR resource at "http://fhirserver/DocumentReference/?identifier=${data.documentreference-search-identifier-value}&patient=Patient/${data.documentreference-read-patient-id}" with content type "json"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And FHIR current response body evaluates the FHIRPath "entry.resource.all(identifier.where(value = '${data.documentreference-search-identifier-value}').exists())" with error message 'There are search results, but they do not fully match the search criteria.'
Then Get FHIR resource at "http://fhirserver/DocumentReference/?patient.identifier=${data.documentreference-search-patient-identifier-system}%7C${data.documentreference-search-patient-identifier-value}&patient=Patient/${data.documentreference-read-patient-id}" with content type "json"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found.'
When Get FHIR resource at "http://fhirserver/DocumentReference/?type=${data.documentreference-search-type-code}&patient=Patient/${data.documentreference-read-patient-id}" with content type "json"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And FHIR current response body evaluates the FHIRPath "entry.resource.all(type.coding.where(code = '${data.documentreference-search-type-code}').exists())" with error message 'There are search results, but they do not fully match the search criteria.'
When Get FHIR resource at "http://fhirserver/DocumentReference/?category=${data.documentreference-search-class-code}&patient=Patient/${data.documentreference-read-patient-id}" with content type "xml"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And FHIR current response body evaluates the FHIRPath "entry.resource.all(category.coding.where(code = '${data.documentreference-search-class-code}').exists())" with error message 'There are search results, but they do not fully match the search criteria.'
When Get FHIR resource at "http://fhirserver/DocumentReference/?encounter=Encounter/${data.documentreference-read-encounter-id}&patient=Patient/${data.documentreference-read-patient-id}" with content type "json"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And FHIR current response body evaluates the FHIRPath "entry.resource.all(context.encounter.where(reference.replaceMatches('/_history/.+','').matches('\b${data.documentreference-read-encounter-id}$')).exists())" with error message 'The requested DocumentReference ${data.documentreference-read-id} is not contained in the response bundle'
When Get FHIR resource at "http://fhirserver/DocumentReference/?creation=2026-01-31&patient=Patient/${data.documentreference-read-patient-id}" with content type "xml"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'
And FHIR current response body evaluates the FHIRPath "entry.resource.all(content.attachment.where(creation.toString().contains('2026-01-31')).exists())" with error message 'There are search results, but they do not fully match the search criteria.'
| Number of Scenarios | 14 | Total Duration | 20s |
| Total Number of Test Cases | 23 | Fastest Test | 283ms |
| Number of Manual Test Cases | 0 | Slowest Test | 5s |
| Tests Started | Sep 01, 2026 06:58:19 | Average Execution Time | 878ms |
| Tests Finished | Sep 01, 2026 06:58:39 |
Cumulative Test Time
(sum of all individual test durations) |
20s |
| feature | Scenario | Context | Steps | Started | Total Duration | Result |
|---|---|---|---|---|---|---|
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Precondition | 2 | 06:58:19 | 424ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Read and Validation of the CapabilityStatement | 2 | 06:58:19 | 4s 112ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) |
Validation of the search parameter definitions in the CapabilityStatement
10 passing test cases |
1 | 06:58:23 | 3s 153ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference metadata by ID | 2 | 06:58:26 | 5s 609ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference by Count | 2 | 06:58:32 | 540ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for DocumentReference that belong to a Patient | 3 | 06:58:32 | 833ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Optional Search for the DocumentReference that belong to a Patient, by Tag | 3 | 06:58:33 | 722ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference that belong to a Patient, by Document Status | 3 | 06:58:34 | 715ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference that belong to a Patient, by Document Identifier | 3 | 06:58:35 | 705ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for DocumentReference that belong to a Patient, knowing their identifier | 2 | 06:58:35 | 527ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference that belong to a Patient, by Type | 3 | 06:58:36 | 756ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference that belong to a Patient, by Category | 3 | 06:58:37 | 738ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference that belong to a Patient, by Encounter | 3 | 06:58:38 | 725ms | ||
| Testing search parameters against a resource of type DocumentReference (@DocumentReference-Search) | Search for the DocumentReference that belong to a Patient, by Creation Date | 3 | 06:58:38 | 722ms |
| Scenario | Title | Details |
|---|---|---|
| Precondition | RBellog 0 | Download Evidence |
| Read and Validation of the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and interaction.where(code = 'search-type').exists()).exists() | Details |
| Read and Validation of the CapabilityStatement | RBellog 0 | Download Evidence |
| Read and Validation of the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = '_id' and type = 'token').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 1 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = '_count' and type = 'number').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 2 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = 'patient' and type = 'reference').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 3 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = 'status' and type = 'token').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 4 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = 'identifier' and type = 'token').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 5 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = 'type' and type = 'token').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 6 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = 'category' and type = 'token').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 7 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = 'creation' and type = 'date').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 8 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = 'encounter' and type = 'reference').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 9 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'DocumentReference' and searchParam.where(name = '_tag' and type = 'token').exists()).exists() | Details |
| Validation of the search parameter definitions in the CapabilityStatement | RBellog 10 | Download Evidence |
| Validation of the search parameter definitions in the CapabilityStatement | Evidence Report | Download Evidence |
| Search for the DocumentReference metadata by ID | INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bDocumentReference-Read-Example$')).count() = 1 | Details |
| Search for the DocumentReference metadata by ID | RBellog 0 | Download Evidence |
| Search for the DocumentReference metadata by ID | Evidence Report | Download Evidence |
| Search for the DocumentReference by Count | INFO - entry.resource.count() > 0 and entry.resource.count() <= 1 | Details |
| Search for the DocumentReference by Count | RBellog 0 | Download Evidence |
| Search for the DocumentReference by Count | Evidence Report | Download Evidence |
| Search for DocumentReference that belong to a Patient | INFO - entry.resource.count() > 0 | Details |
| Search for DocumentReference that belong to a Patient | INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient-Read-Example$')) | Details |
| Search for DocumentReference that belong to a Patient | RBellog 0 | Download Evidence |
| Search for DocumentReference that belong to a Patient | Evidence Report | Download Evidence |
| Optional Search for the DocumentReference that belong to a Patient, by Tag | INFO - entry.resource.count() > 0 | Details |
| Optional Search for the DocumentReference that belong to a Patient, by Tag | INFO - entry.resource.all(meta.tag.where(code='external').exists()) | Details |
| Optional Search for the DocumentReference that belong to a Patient, by Tag | RBellog 0 | Download Evidence |
| Optional Search for the DocumentReference that belong to a Patient, by Tag | Evidence Report | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Document Status | INFO - entry.resource.count() > 0 | Details |
| Search for the DocumentReference that belong to a Patient, by Document Status | INFO - entry.resource.all(status = 'current') | Details |
| Search for the DocumentReference that belong to a Patient, by Document Status | RBellog 0 | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Document Status | Evidence Report | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Document Identifier | INFO - entry.resource.count() > 0 | Details |
| Search for the DocumentReference that belong to a Patient, by Document Identifier | INFO - entry.resource.all(identifier.where(value = '129.6.58.42.33726').exists()) | Details |
| Search for the DocumentReference that belong to a Patient, by Document Identifier | RBellog 0 | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Document Identifier | Evidence Report | Download Evidence |
| Search for DocumentReference that belong to a Patient, knowing their identifier | INFO - entry.resource.count() > 0 | Details |
| Search for DocumentReference that belong to a Patient, knowing their identifier | RBellog 0 | Download Evidence |
| Search for DocumentReference that belong to a Patient, knowing their identifier | Evidence Report | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Type | INFO - entry.resource.count() > 0 | Details |
| Search for the DocumentReference that belong to a Patient, by Type | INFO - entry.resource.all(type.coding.where(code = 'VL160105').exists()) | Details |
| Search for the DocumentReference that belong to a Patient, by Type | RBellog 0 | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Type | Evidence Report | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Category | INFO - entry.resource.count() > 0 | Details |
| Search for the DocumentReference that belong to a Patient, by Category | INFO - entry.resource.all(category.coding.where(code = 'DUR').exists()) | Details |
| Search for the DocumentReference that belong to a Patient, by Category | RBellog 0 | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Category | Evidence Report | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Encounter | INFO - entry.resource.count() > 0 | Details |
| Search for the DocumentReference that belong to a Patient, by Encounter | INFO - entry.resource.all(context.encounter.where(reference.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-Finished-Example$')).exists()) | Details |
| Search for the DocumentReference that belong to a Patient, by Encounter | RBellog 0 | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Encounter | Evidence Report | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Creation Date | INFO - entry.resource.count() > 0 | Details |
| Search for the DocumentReference that belong to a Patient, by Creation Date | INFO - entry.resource.all(content.attachment.where(creation.toString().contains('2026-01-31')).exists()) | Details |
| Search for the DocumentReference that belong to a Patient, by Creation Date | RBellog 0 | Download Evidence |
| Search for the DocumentReference that belong to a Patient, by Creation Date | Evidence Report | Download Evidence |