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

$bulkdata-status needs to indicate when no data was exported #2676

Closed
kmbarton423 opened this issue Aug 10, 2021 · 2 comments
Closed

$bulkdata-status needs to indicate when no data was exported #2676

kmbarton423 opened this issue Aug 10, 2021 · 2 comments
Assignees
Labels
bulk-data P3 Priority 3 - Nice To Have

Comments

@kmbarton423
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Ran an $export using _type and _typeFilter that I did not match any data so nothing was exported.
Ran $bulkdata-status to for the associated jobId.

{ "transactionTime": "2021-08-10T21:14:53.311Z", "request": "https://localhost:9443/fhir-server/api/v4/Patient/$export?_type=Encounter&_typeFilter=Encounter?status=active", "requiresAccessToken": false }

The status above left me guessing.

Describe the solution you'd like
I would like to see some indication returned by $bulkdata-status that the job finished successfully and no data was exported.

Describe alternatives you've considered
Maybe a return code would be better but I don't see this as a failure.

@lmsurpre
Copy link
Member

Options:
A. empty array
B. a separate field with an OperationOutcome to explain that everything worked but there was nothing to export

The response body is defined at https://hl7.org/fhir/uv/bulkdata/export/index.html#response---complete-status
Proposal: include an empty array and an extension that has an OperationOutcome with the detaiils

@lmsurpre lmsurpre added the P3 Priority 3 - Nice To Have label Aug 16, 2021
prb112 added a commit that referenced this issue Aug 17, 2021
Example output:

{
    "transactionTime": "2021-08-17T14:52:04.044Z",
    "request":
"https://localhost:9443/fhir-server/api/v4/$export?_outputFormat=application/fhir%2Bndjson&_type=Coverage",
    "requiresAccessToken": false,
    "output": [
    ],
    "extension": {
        "outcome": {
            "resourceType": "OperationOutcome",
            "issue": [
                {
                    "severity": "information",
                    "code": "informational",
                    "details": {
                        "text": "No Data Exported"
                    }
                }
            ]
        }
    }
}

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
@prb112 prb112 self-assigned this Aug 17, 2021
@prb112 prb112 added this to the Sprint 2021-11 milestone Aug 17, 2021
prb112 added a commit that referenced this issue Aug 17, 2021
$bulkdata-status needs to indicate when no data was exported #2676
@kmbarton423
Copy link
Contributor Author

Confirmed empty array and extension now returned:

{ "transactionTime": "2021-08-24T15:13:02.866Z", "request": "https://localhost:9443/fhir-server/api/v4/Patient/$export?_type=Encounter&_typeFilter=Encounter?status=active", "requiresAccessToken": false, "output": [], "extension": { "outcome": { "resourceType": "OperationOutcome", "issue": [ { "severity": "information", "code": "informational", "details": { "text": "No Data Exported" } } ] } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bulk-data P3 Priority 3 - Nice To Have
Projects
None yet
Development

No branches or pull requests

3 participants