Closed jimduff-usds closed 2 years ago
Note: this has nothing to do with async processing -- the data was submitted with the 'sync' processing.
Here's another example of the impact:
Onboarding MPX Customer has send data to RS and is anxious to know if it worked. They sent an email stating:
I see these responses below:
StatusCode: 201, ReasonPhrase: 'Created' with:
· "reportId" : "d4479e6d-70d2-45d3-8703-822bc5057207", for LOINC:100383-9
· "reportId" : "4b8536bb-0aff-4433-afe5-b2eb7c871b22", for LOINC: 100434-0
So I query to find out if it worked:
prime-router % curl -H "authentication-type: okta" -H "Authorization: Bearer $TOK" "https://staging.prime.cdc.gov/api/waters/org/sonic/submissions"
And I confusingly get back four results instead of the two he mentioned:
[ {
"submissionId" : 3155169,
"timestamp" : "2022-07-27T22:22:08.540Z",
"id" : "265579cb-6353-4094-bb53-5382867a21e5",
"topic" : "monkeypox",
"reportItemCount" : null,
"sender" : "sonic",
"httpStatus" : 201
}, {
"submissionId" : 3155169,
"timestamp" : "2022-07-27T22:22:08.540Z",
"id" : "4b8536bb-0aff-4433-afe5-b2eb7c871b22",
"topic" : "monkeypox",
"reportItemCount" : null,
"sender" : "sonic",
"httpStatus" : 201
}, {
"submissionId" : 3155168,
"timestamp" : "2022-07-27T22:22:06.306Z",
"id" : "b8975951-3bd7-417d-8e41-c4b55fd621dc",
"topic" : "monkeypox",
"reportItemCount" : null,
"sender" : "sonic",
"httpStatus" : 201
}, {
"submissionId" : 3155168,
"timestamp" : "2022-07-27T22:22:06.306Z",
"id" : "d4479e6d-70d2-45d3-8703-822bc5057207",
"topic" : "monkeypox",
"reportItemCount" : null,
"sender" : "sonic",
"httpStatus" : 201
}, {
If the customer were to query this, they would also be confused.
Thanks.
Describe the bug I submitted a single HL7 file in staging, then ran the submissions API query. It returned two reports, instead of one.
Impact Anyone using the UI to view lists of submissions will see confusing extra reports. Anyone using the API to retrieve lists of submissions will also see confusing extra reports.
To Reproduce After submitting the one HL7 file, here's the API call I ran:
It should return one result, but it returned two (see below). The API is returning both the original submitted report (
928…
), and the child “internal CSV format” report that was created from it (77f….
). You can see this by looking at the lineage in Staging metabase. The77f...
is erroneous and is a bug. Note that they have the same timestamp. I'm pretty sure this used to work fine a couple months back.Expected behavior Calls to the submissions API only return submissions, never any child reports.
Screenshots
Logs
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context