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}}`)