Skip to main content

FindBlob

Find all blobs that satisfy the specified constraints.

Parameters​

  • [optional] blobs: indicates whether the blobs will be returned as part of the response (Default: false).

  • [optional] urls: indicates whether URLs of the matched blobs will be returned as part of the response (Default: false).

  • [optional] with_url: Provide a valid URL to match as a constraint

Details​

At least one of results, _ref, or blobs = true must be specified. If neither is specified, the command is render useless, and will return an error.

An object pointed to by the url can be modified outside of the scope of the server. It might also be subject to a retention policy as determined by the storage target policies. When accessing this object through a Find* command, appropriate error will be returned if the object is no longer accessible.

The properties that will be retrieved for the found objects can be specified using results.

If only one ref parameter is used in the is_connected_to array, the resulting objects obtained after traversing the given connection can be associated with their source objects by specifying the parameter group_by_source as true. The parameter is ignored if is_connected_to is absent. It is set to false by default.

Examples​

Find all blob objects where its “start_year” property is on or after 1990, and retrieve certain properties of the object:

[{
"FindBlob": {
"constraints": ["$start_year", ">=", 1990],
"results": {
"list": ["start_year", "end_year", "billing_id"]
},
"blobs": true
}
}]

Successful response:

[{
"FindBlob": {
"blobs_start": 0,
"entities": [{
"_blob_index": 0,
"billing_id": 125376,
"end_year": 2002,
"start_year": 1998
}, {
"_blob_index": 1,
"billing_id": 9987342,
"end_year": 2021,
"start_year": 2018
}],
"returned": 2,
"status": 0
}
}]

The response also includes an array containing both entities’ binary data.

Find all blob objects where its “start_year” property is on or after 1990 that are associated with a “Patient” with a “unique_id” equal to 4325, and retrieve other properties of the visit. The first command uses unique to require at most one match and _ref to reuse it without returning properties. The second command sets blobs to false to return metadata without binary data.

[{
"FindEntity": {
"with_class": "Patient",
"_ref": 1,
"unique": true,
"constraints": ["$id", "==", 4325]
}
}, {
"FindBlob": {
"constraints": ["$start_year", ">=", 1990],
"is_connected_to": {
"ref": 1,
"direction": "in",
"connection_class": "patient_has_study"
},
"blobs": false,
"results": {
"list": ["start_year", "end_year", "billing_id"]
}
}
}]

Successful response:

[{
"FindEntity": {
"returned": 0,
"status": 0
}
}, {
"FindBlob": {
"entities": [{
"billing_id": 756354,
"end_year": 2012,
"start_year": 2011
}],
"returned": 1,
"status": 0
}
}]