From 5a707c8ac3de97b9ff0072d0d9777b492595d5a5 Mon Sep 17 00:00:00 2001 From: chinlinlee Date: Sun, 8 Oct 2023 19:32:39 +0800 Subject: [PATCH] fix: variable not defined - It is this --- utils/fhir-ref-checker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/fhir-ref-checker.js b/utils/fhir-ref-checker.js index 42879cb9..fbc5d6c1 100644 --- a/utils/fhir-ref-checker.js +++ b/utils/fhir-ref-checker.js @@ -3,6 +3,7 @@ const FHIR = require("fhir").Fhir; const { isDocExist } = require("@root/api/apiService"); const jp = require("jsonpath"); const uuid = require("uuid"); +const { handleError } = require("@root/models/FHIR/httpMessage"); class FhirReferenceChecker { constructor(resource) { @@ -20,7 +21,7 @@ class FhirReferenceChecker { if (/^(http|https):\/\//g.test(referenceValue)) { await this.checkAbsoluteUrlRef( key, - referenceValue, + referenceValue ); } else if (referenceValueSplit.length === 2) { // Check base reference value {resourceType}/{id} @@ -150,7 +151,7 @@ class FhirReferenceChecker { getOperationOutcomeError(checkReferenceRes) { if (!checkReferenceRes.status) { - let notExistReferenceList = fhirReferenceChecker.getNotExistReferenceList(checkReferenceRes); + let notExistReferenceList = this.getNotExistReferenceList(checkReferenceRes); let operationOutcomeError = handleError.processing( `The reference not found : ${_.map( notExistReferenceList,