Skip to content

Commit

Permalink
fix exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen authored and Amy Chen committed Dec 30, 2024
1 parent 9bb3d41 commit 2d425be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Landing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default class Landing extends Component {
() => {
this.initEvents();
this.clearProcessInterval();
this.savePDMPSummaryData();
//this.savePDMPSummaryData();
this.handleSetActiveTab(0);
}
);
Expand Down
8 changes: 7 additions & 1 deletion src/utils/executeELM.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,14 @@ async function executeELM(collector, paramResourceTypes) {
const shouldLoadSurveyResources =
FHIR_RELEASE_VERSION_4 && INSTRUMENT_LIST;
const surveyResources = shouldLoadSurveyResources
? SURVEY_FHIR_RESOURCES
? [...SURVEY_FHIR_RESOURCES, "Report"]
: [];
const requests = [
...extractResourcesFromELM(library),
...surveyResources,
].map((name) => {
resourceTypes[name] = false;
if (name === "Report") return true;
if (name === "Patient") {
resourceTypes[name] = true;
return [pt];
Expand Down Expand Up @@ -218,6 +219,7 @@ async function executeELM(collector, paramResourceTypes) {
patientBundle
).then(results => {
Promise.allSettled(results).then((results) => {
resourceTypes["Report"] = true;
if (!results) {
resolve(evalResults);
return;
Expand All @@ -243,9 +245,13 @@ async function executeELM(collector, paramResourceTypes) {
"final evaluated CQL results including surveys ",
evaluatedSurveyResults
);
resourceTypes["Report"] = true;
resolve(evalResults);
});
}).catch((e) => {
resourceTypes["Report"] = {
error: e
}
console.log("Error processing instrument ELM: ", e);
reject("error processing instrument ELM. See console for details.");
});
Expand Down

0 comments on commit 2d425be

Please sign in to comment.