From c50be0a2769999ab3d6a9e998a3a1d6166d6f5de Mon Sep 17 00:00:00 2001 From: Sean Nolan Date: Mon, 26 Aug 2024 10:06:56 -0700 Subject: [PATCH] IPS with only fullUrl in entry array item --- src/lib/resources.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/resources.js b/src/lib/resources.js index 87ab952..615cb7f 100644 --- a/src/lib/resources.js +++ b/src/lib/resources.js @@ -60,10 +60,15 @@ export function organizeResources(bundle, labelCounters) { if (bundle.contentOK() && bundle.fhir.entry) { for (const i in bundle.fhir.entry) { - + const e = bundle.fhir.entry[i]; - const r = e.resource; + if (!e.resource) { + console.error("Malformed bundle entry: " + JSON.stringify(e, null, 2)); + continue; + } + + const r = e.resource; organized.all.push(r); organized.byId[e.fullUrl] = r;