From 8f0c58d32c44e523fd912386602e688568051318 Mon Sep 17 00:00:00 2001 From: Elsa Date: Wed, 25 Oct 2023 13:25:36 -0400 Subject: [PATCH] Check if resourceType does not have searh params --- src/helpers/DataRequirementHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/DataRequirementHelpers.ts b/src/helpers/DataRequirementHelpers.ts index a612d579..73514272 100644 --- a/src/helpers/DataRequirementHelpers.ts +++ b/src/helpers/DataRequirementHelpers.ts @@ -284,7 +284,7 @@ export function addFhirQueryPatternToDataRequirements(dataRequirement: fhir4.Dat } // Create an extension for each way that exists for referencing the patient - (PatientParameters)[dataRequirement.type].forEach((patientContext: string) => { + (PatientParameters)[dataRequirement.type]?.forEach((patientContext: string) => { const fhirPathExtension: Extension = { url: FHIR_QUERY_PATTERN_URL, valueString: queryString.concat(`${patientContext}=Patient/{{context.patientId}}`)