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

🐛 Clinical-Errors endpoint returning multiple records for single donor, some with no errors #1084

Open
joneubank opened this issue Oct 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@joneubank
Copy link
Member

Describe the bug

The api response to the data endpoint clinical-errors can sometimes return multiple objects for the same donor, and in unknown cases the list of errors is returned as empty.

The shape of this response would look like:

{
  "clinicalErrors": [
    {
      "donorId": 1234,
      "submitterDonorId": "ASDF_1234",
      "entityName": "primary_diagnosis",
      "errors": []
    },
    {
      "donorId": 1234,
      "submitterDonorId": "ASDF_1234",
      "entityName": "treatment",
      "errors": [
        {
          "donorId": 1234,
          "entityName": "treatment",
          "errorType": "INVALID_ENUM_VALUE",
          "fieldName": "treatment_setting",
          "index": 0,
          "info": {},
          "message": "The value is not permissible for this field."
        }
    ]
}

Steps To Reproduce

Unclear. Visible in production PACA-CA data.

Expected behaviour

Message response would have a single object for any given donor, and never include a donor with an empty errors list.

{
  "clinicalErrors": [
    {
      "donorId": 1234,
      "submitterDonorId": "ASDF_1234",
      "entityName": "treatment",
      "errors": [
        {
          "donorId": 1234,
          "entityName": "treatment",
          "errorType": "INVALID_ENUM_VALUE",
          "fieldName": "treatment_setting",
          "index": 0,
          "info": {},
          "message": "The value is not permissible for this field."
        }
    ]
}
@joneubank joneubank added the bug Something isn't working label Oct 27, 2023
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

1 participant