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

Conditional delete operation outcome has nulls in issue details #2365

Closed
JohnTimm opened this issue May 14, 2021 · 1 comment
Closed

Conditional delete operation outcome has nulls in issue details #2365

JohnTimm opened this issue May 14, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@JohnTimm
Copy link
Collaborator

I recently created 3 Patient resources each using a standard create interaction (POST) all with the same Patient.identifier element. I then did a search:

GET <base>/fhir-server/api/v4/Patient?identifier=12345

and I get a Bundle resource containing 3 patients. Then I tried using the "conditional delete" interaction:

DELETE <base>/fhir-server/api/v4/Patient?identifier=12345

and I got the following response:

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "information",
            "code": "informational",
            "details": {
                "text": "Deleted 3 Patient resource(s) with the following id(s): null,null,null"
            }
        }
    ]
}

Then I confirmed that the resource(s) have been deleted by performing another search:

GET <base>/fhir-server/api/v4/Patient?identifier=12345

{
    "resourceType": "Bundle",
    "id": "4196a09f-c220-4ca2-91c4-9d8e3bbcdd60",
    "type": "searchset",
    "total": 0,
    "link": [
        {
            "relation": "self",
            "url": "https://localhost:9443/fhir-server/api/v4/Patient?_count=10&identifier=12345&_page=1"
        }
    ]
}

The "conditional delete" behavior works as advertised but there should be actual resource ids in the operation outcome instead of nulls.

@JohnTimm JohnTimm added the bug Something isn't working label May 14, 2021
@lmsurpre lmsurpre changed the title Conditional delete operation outcome has nulls in error message Conditional delete operation outcome has nulls in issue details May 14, 2021
@tbieste tbieste self-assigned this May 14, 2021
@tbieste tbieste added this to the Sprint 2021-07 milestone May 14, 2021
tbieste added a commit that referenced this issue May 14, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 14, 2021
Issue #2365 - Show resource ids in conditional delete operation outcome
@JohnTimm
Copy link
Collaborator Author

After this was merged, I ran a the following test to verify it:

DELETE <base>/fhir-server/api/v4/Patient?identifier=12345

and this was the result:

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "information",
            "code": "informational",
            "details": {
                "text": "Deleted 1 Patient resource(s) with the following id(s): 12345"
            }
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants