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

When using the _elements parameter mandatory fields aren't returned #1256

Closed
LTA-Thinking opened this issue Sep 10, 2020 · 5 comments
Closed
Assignees
Labels
Area-Search Area related to search. Bug Bug bug bug. Specification An issue referring or related to the FHIR Specification VSTS-Planned Planned for an upcoming sprint
Milestone

Comments

@LTA-Thinking
Copy link
Collaborator

Describe the bug
When a search is performed with the _elements parameter mandatory fields are not returned unless specified.

To Reproduce
Steps to reproduce the behavior:

  1. Run the search /Observation?_elements=id
  2. Only ids are returned, but code and status are mandatory fields of Observation

Expected behavior
According to the spec "Clients SHOULD list all mandatory and modifier elements in a resource as part of the list of elements." spec

Actual behavior
Only fields that are specified in the _elements parameter are returned.

@brendankowitz
Copy link
Member

And also Servers SHOULD mark the resources with the tag SUBSETTED to ensure that the incomplete resource is not actually used to overwrite a complete resource.

@brendankowitz brendankowitz added Specification An issue referring or related to the FHIR Specification Area-Search Area related to search. Bug Bug bug bug. labels Sep 11, 2020
@valeneiko
Copy link
Contributor

  1. This is (probably) a bug in https://github.com/FirelyTeam/fhir-net-api
    FHIR Server only calls the API: FhirJsonOutputFormatter.cs#L133

    _fhirJsonSerializer.Serialize(resource, jsonWriter, context.HttpContext.GetSummaryType(_logger), elementsSearchParameter);
  2. And also Servers SHOULD mark the resources with the tag SUBSETTED to ensure that the incomplete resource is not actually used to overwrite a complete resource.

    This is already done when the meta is present, but you need to have _elements=meta so that it is not excluded from the result (i.e. should be resolved when 1 is fixed).

@CaitlinV39 CaitlinV39 added Review Tag for PM/Dev Review Feedback-Pending acceptance Item is pending acceptance or more feedback from the submitter and removed Review Tag for PM/Dev Review labels Sep 22, 2020
@CaitlinV39 CaitlinV39 self-assigned this Sep 24, 2020
@CaitlinV39
Copy link
Contributor

I'm going to open a bug on the Firely side and then track from there.

@Ivanidzo4ka
Copy link
Contributor

FirelyTeam/firely-net-sdk#1653
It doesn't count as a bug.

I've created PR to add required fields to resource (and meta field)

@CaitlinV39 CaitlinV39 reopened this Apr 5, 2021
@CaitlinV39 CaitlinV39 added VSTS-Pending Prioritization We would like to add this to the backlog and removed Feedback-Pending acceptance Item is pending acceptance or more feedback from the submitter labels Apr 5, 2021
@CaitlinV39 CaitlinV39 added this to the S60 milestone Apr 5, 2021
@CaitlinV39
Copy link
Contributor

CaitlinV39 commented Apr 12, 2021

AB#81256

@CaitlinV39 CaitlinV39 added VSTS-Planned Planned for an upcoming sprint and removed VSTS-Pending Prioritization We would like to add this to the backlog labels Apr 12, 2021
@CaitlinV39 CaitlinV39 modified the milestones: S60, S61 Apr 23, 2021
@CaitlinV39 CaitlinV39 modified the milestones: S61, S62 May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Search Area related to search. Bug Bug bug bug. Specification An issue referring or related to the FHIR Specification VSTS-Planned Planned for an upcoming sprint
Projects
None yet
Development

No branches or pull requests

5 participants