Skip to content

Commit f212e8f

Browse files
authored
Merge pull request #90 from the-commons-project/shic-missing_data
shic-missing_data
2 parents 65b0cdc + 1806ec8 commit f212e8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/SHX.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@ async function _verifySHX(shx, passcode) {
169169
}
170170
// Check if the 'section' field is missing or empty in each FHIR bundle
171171
statusObj.bundles.forEach(bundle => {
172-
if (!bundle.fhir || !bundle.fhir.entry || !bundle.fhir.entry.some(entry => entry.resource && entry.resource.section)) {
173-
throw new DataMissingError("The provided Smart Health Link does not contain any healthcare data.");
172+
if (!bundle.fhir || !bundle.fhir.entry) {
173+
throw new DataMissingError("The provided Smart Health Link does not contain any data.");
174174
}
175175
});
176+
176177
// build up our organized resources
177178
const labelCounters = { };
178179
for (const i in statusObj.bundles) {

0 commit comments

Comments
 (0)