Healthcare — medical-device fleet
The problem. A hospital runs thousands of connected devices — infusion pumps, ventilators, monitors — and two things must never slip: a critical device must be available when a clinician reaches for it, and when a recall or fault pattern hits a device model, every affected unit must be found and pulled today, before it reaches a patient. Tracking that across wards by spreadsheet is how units get missed.
What we solve here is device availability and fast, complete recall tracing.
Set up demo data
New workspace? Run this once (Python) to create three pumps of the same model in a ward — so the recall walk in step 2 returns the full pull list. Safe to re-run.
import datahub_sdk
client = datahub_sdk.DataHubClient.from_env()
nodes = [datahub_sdk.Resource(external_id="model_acme_x200", name="Acme X200 infusion pump", labels=["PumpModel"]),
datahub_sdk.Resource(external_id="ward_icu", name="Intensive care", labels=["Ward"])]
edges = []
for u in ["3391", "3392", "3401"]:
nodes.append(datahub_sdk.Resource(external_id=f"pump_icu_{u}", name=f"Infusion pump {u}", labels=["Pump"]))
edges += [datahub_sdk.RelForm.by_external_ids(f"pump_icu_{u}", "ward_icu", "located_in"),
datahub_sdk.RelForm.by_external_ids(f"pump_icu_{u}", "model_acme_x200", "is_model")]
client.resources.create(nodes, edges)
1. Model the fleet and watch availability
A hospital contains wards, a ward contains devices, and each device is a model.
Device status is a series; a unit that faults or drops offline raises a device_down
event for biomedical engineering.
- Java
- Python
- Rust
ResourceForm pump = new ResourceForm();
pump.setExternalId("pump_icu_3391");
pump.setName("Infusion pump 3391");
pump.setLabels(List.of("Pump"));
RelForm inWard = new RelForm();
inWard.setName("located_in");
inWard.setFromExternalId("pump_icu_3391");
inWard.setToExternalId("ward_icu");
RelForm isModel = new RelForm();
isModel.setName("is_model");
isModel.setFromExternalId("pump_icu_3391");
isModel.setToExternalId("model_acme_x200");
client.resources().create(List.of(pump), List.of(inWard, isModel));
import datahub_sdk
client.resources.create(
[datahub_sdk.Resource(external_id="pump_icu_3391", name="Infusion pump 3391", labels=["Pump"])],
[datahub_sdk.RelForm.by_external_ids("pump_icu_3391", "ward_icu", "located_in"),
datahub_sdk.RelForm.by_external_ids("pump_icu_3391", "model_acme_x200", "is_model")])
use dataplatform_rust_sdk::resources::Resource;
use dataplatform_rust_sdk::relations::RelForm;
let mut pump = Resource::new();
pump.external_id = "pump_icu_3391".into();
pump.name = "Infusion pump 3391".into();
pump.labels = Some(vec!["Pump".into()]);
api.resources.create(
vec![pump],
vec![
RelForm::by_external_ids("pump_icu_3391", "ward_icu", "located_in"),
RelForm::by_external_ids("pump_icu_3391", "model_acme_x200", "is_model"),
],
).await?;
2. A recall lands — find every affected unit
When model_acme_x200 is recalled, walk the graph out from the model node: every device
that is_model of it, and the ward each sits in, is the exact pull list. This is the
blast-radius traversal — the same shape as an aerospace part
recall, applied to hospital equipment.
- Java
- Python
- Rust
ResourceNetwork affected = client.resources().fetchRelated("model_acme_x200", 3);
affected.nodes().stream()
.filter(n -> n.getExternalId().startsWith("pump_"))
.forEach(d -> System.out.println("pull from service: " + d.getExternalId()));
affected = client.resources.fetch_related(external_id="model_acme_x200", depth=3)
for node in affected.nodes:
if node.external_id.startswith("pump_"):
print("pull from service:", node.external_id)
use dataplatform_rust_sdk::resources::RelatedResourcesForm;
let affected = api.resources.fetch_related(
&RelatedResourcesForm::from_external_id("model_acme_x200").with_depth(3)).await?;
for node in affected.nodes() {
if node.external_id.starts_with("pump_") {
println!("pull from service: {}", node.external_id);
}
}
3. Predict failures before they strand a clinician
Pump and battery health are series; rolling them up surfaces units trending toward failure for planned swap-out — and the XGBoost failure predictor does it properly.
See the result
The recall walk returns every unit of the model to pull:
pull from service: pump_icu_3391
pull from service: pump_icu_3392
pull from service: pump_icu_3401
See also
- Model assets as a graph — the hospital/ward/device hierarchy.
- Correlate alarms with the graph — recall blast-radius tracing.
- Aerospace fleet — the same recall pattern.