Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocumentManifest searches return 0 results when using FHIR R4 'patient' parameter #522

Closed
JeremiahSanders opened this issue Nov 11, 2022 · 0 comments · Fixed by #571
Closed

Comments

@JeremiahSanders
Copy link

Describe the bug
When searching DocumentManifest resources using the patient parameter, searches return 0 results. Using the subject parameter, with the same Patient reference, returns the expected resources.

To Reproduce

Steps to reproduce the behavior:

var fhirClient = new Hl7.Fhir.Rest.FhirClient("https://spark.incendi.no/fhir/");
var patient = await fhirClient.CreateAsync(new Patient
{
	Name = new List<Hl7.Fhir.Model.HumanName> {
        HumanName.ForFamily("SampleFamily").WithGiven("SampleGiven").WithGiven("ExtraGiven")
    }
});
var patientRelativeUrl = $"{patient.TypeName}/{patient.Id}";
var documentManifest = await fhirClient.CreateAsync(new DocumentManifest
{
	Subject = new ResourceReference(patientRelativeUrl),
	Content = new List<ResourceReference>{
		new ResourceReference("DocumentReference/not-real")
	},
	Status = DocumentReferenceStatus.Current
});

// This finds the resource
var bySubject = await fhirClient.SearchUsingPostAsync<DocumentManifest>(new SearchParams("subject", patientRelativeUrl));
// These don't find the resource
var byPatient = await fhirClient.SearchUsingPostAsync<DocumentManifest>(new SearchParams("patient", patientRelativeUrl));
var byPatientId = await fhirClient.SearchUsingPostAsync<DocumentManifest>(new SearchParams("patient", patient.Id));

Expected behavior

The API is expected to return a Bundle with the same DocumentManifest resources obtained when searching by subject for the same Patient.

Related FHIR search parameters: http://www.hl7.org/fhir/documentmanifest.html#search

Spark version

  • Version: 1.5.14

Operating system + Database

Validated against reference implementation at https://spark.incendi.no/fhir/.

Additionally, validated locally in Windows 11 + Docker-hosted MongoDB.

Container service / Cloud infrastructure:

Validated against reference implementation at https://spark.incendi.no/fhir/.

Additionally, validated locally in Windows 11 + local Docker Desktop-hosted MongoDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant