From f24d295df99cf29c7db96b62bceaa5c9c1228c83 Mon Sep 17 00:00:00 2001 From: Greg Akins Date: Thu, 12 Dec 2024 09:17:36 -0500 Subject: [PATCH] MAT-8012: Updating error handling on CQLLibrary Save to show error for FHIRHelpers alias correction --- src/components/editCqlLibrary/EditCqlLibrary.tsx | 5 +++++ src/types/madie-madie-editor.d.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/src/components/editCqlLibrary/EditCqlLibrary.tsx b/src/components/editCqlLibrary/EditCqlLibrary.tsx index b37bd9a..eb087ee 100644 --- a/src/components/editCqlLibrary/EditCqlLibrary.tsx +++ b/src/components/editCqlLibrary/EditCqlLibrary.tsx @@ -261,6 +261,11 @@ const EditCqlLibrary = () => { "Library statement was incorrect. MADiE has overwritten it." ); } + if (updatedContent.isFhirHelpersAliasChanged) { + secondaryMessages.push( + "FHIRHelpers was incorrectly aliased. MADiE has overwritten the alias with 'FHIRHelpers'." + ); + } if (updatedContent.isUsingStatementChanged) { secondaryMessages.push( "Incorrect using statement(s) detected. MADiE has corrected it." diff --git a/src/types/madie-madie-editor.d.ts b/src/types/madie-madie-editor.d.ts index 654bae9..14be2f3 100644 --- a/src/types/madie-madie-editor.d.ts +++ b/src/types/madie-madie-editor.d.ts @@ -68,6 +68,7 @@ declare module "@madie/madie-editor" { isLibraryStatementChanged?: boolean; isUsingStatementChanged?: boolean; isValueSetChanged?: boolean; + isFhirHelpersAliasChanged?: boolean; } export const parseContent: (content: string) => CqlError[];