Find out what resources were exported during the $export operation
This guide explains how to find out what resources certain Bulk client had access to
Last updated
Was this helpful?
This guide explains how to find out what resources certain Bulk client had access to
Last updated
Was this helpful?
operation is used to export huge amounts of patient data directly to S3 buckets. Sometimes it is important to clarify what resources certain Bulk client had access to.
To clarify when our client exported the data:
Open the kibana
UI
Enter the search request like w_cid:inferno-my-clinic-bulk-client and w_m:get and w_url like /bulk-api/Group//$export
w_cid
is the id of out client
Define the dates range
Press the Refresh
button
When the request list appears, collect if of the exported groups and timestamps.
Extract group id from the w_url
property /tenant/my-clinic/bulk-api/Group/test-group-1/$export
-> test-group-1
Extract timestamp from the ts
property -> Dec 5, 2022 @ 16:34:30.417
To get list of affected by the $export patient records:
Open the REST Console
in Aidbox
Perform the GET /Group/test-group-1/_history
request for each group collected on the previous step
Search for the version being active during the export (ts
property). The matching version has lastUpdated
less than ts
. If there are several versions, the closes to ts
should be taken
List of patient are held in the members
section
List of resources types are defined with the scope
attribute.
Open the REST Console
in Aidbox
Perform the GET /Client/inferno-my-clinic-bulk-client/_history
request
Search for the version being active during the export (ts
property). The matching version has lastUpdated
less than ts
. If there are several versions, the closes to ts
should be taken
List of resources the client had access to is defined by the scope
property
Convert scopes to the resource types
system/Observation.read
-> Observation
resource type
To build the list of patient compartment resources:
Open the REST Console
in Aidbox
Get the list of the resources. For example,
GET /fhir/Observation?subject=test-pt-1&_elements=id
Collect all the ids related to the patient and a resource type.
The output could be a table like this.
test-pt-1
Observation
test-obs-1
test-pt-1
Observation
test-obs-2
Location
loc-1
test-pt-1
Patient
test-pt-1
To get the exported resources you should repeat those steps changing the resource type
Open the REST Console
in Aidbox
Perform the GET /fhir/{resource_type}/{resource_id}/_history
request. For example, GET /fhir/Observation/test-obs-1/_history
Search for the version being active during the export (ts
property). The matching version has lastUpdated
less than ts
. If there are several versions, the closes to ts
should be taken
See how system/*.read
Clarify how to search for the patient's resources (see )