diff --git a/src/calculation/HTMLBuilder.ts b/src/calculation/HTMLBuilder.ts index 1fde3110..ef1a81c7 100644 --- a/src/calculation/HTMLBuilder.ts +++ b/src/calculation/HTMLBuilder.ts @@ -18,28 +18,31 @@ export const cqlLogicClauseTrueStyle = { 'background-color': '#ccebe0', color: '#20744c', 'border-bottom-color': '#20744c', - 'border-bottom-style': 'solid' + 'border-bottom-style': 'solid', + 'border-bottom-width': '0.35em' }; export const cqlLogicClauseFalseStyle = { 'background-color': '#edd8d0', color: '#a63b12', 'border-bottom-color': '#a63b12', - 'border-bottom-style': 'double' + 'border-bottom-style': 'double', + 'border-bottom-width': '0.35em' }; export const cqlLogicClauseCoveredStyle = { 'background-color': '#daeaf5', - color: '#004e82', - 'border-bottom-color': '#006cb4', - 'border-bottom-style': 'dashed' + color: '#004e82' }; export const cqlLogicUncoveredClauseStyle = { 'background-color': 'white', - color: 'black', - 'border-bottom-color': 'white', - 'border-bottom-style': 'solid' + color: 'black' +}; + +export const cqlLogicUncoveredUncoverageClauseStyle = { + 'background-color': '#edd8d0', + color: '#a63b12' }; /** @@ -102,7 +105,7 @@ Handlebars.registerHelper('highlightUncoverage', (localId, context) => { ) ) { // Mark with red styling if clause is found in uncoverage list - return objToCSS(cqlLogicClauseFalseStyle); + return objToCSS(cqlLogicUncoveredUncoverageClauseStyle); } else if ( (context.data.root.coveredClauses as ClauseResult[]).some( result => result.libraryName === libraryName && result.localId === localId @@ -211,7 +214,8 @@ export function generateHTML( libraryName: s.libraryName, statementName: s.statementName, clauseResults: clauseResults, - ...matchingExpression.annotation[0].s + ...matchingExpression.annotation[0].s, + highlightLogic: true }); overallHTML += statementHTML; if (options?.buildStatementLevelHTML) { diff --git a/src/templates/main.ts b/src/templates/main.ts index 2c4fd850..d6227963 100644 --- a/src/templates/main.ts +++ b/src/templates/main.ts @@ -1,4 +1,4 @@ -export default `
{{> clause}}
diff --git a/test/unit/fixtures/html/simpleCoverageAnnotation.html b/test/unit/fixtures/html/simpleCoverageAnnotation.html
index bc5d40af..8b46bd65 100644
--- a/test/unit/fixtures/html/simpleCoverageAnnotation.html
+++ b/test/unit/fixtures/html/simpleCoverageAnnotation.html
@@ -1,25 +1,25 @@
test Clause Coverage: 100%
-
+
define "Denominator":
-
-
-
+
+
+
"Encounter with Atrial Ablation Procedure"
union
-
+
"History of Atrial FibrillationFlutter"
union
-
+
"Current Diagnosis Atrial FibrillationFlutter"
diff --git a/test/unit/fixtures/html/simpleCoverageAnnotation2.html b/test/unit/fixtures/html/simpleCoverageAnnotation2.html
index 5dcb2e47..7d4f528c 100644
--- a/test/unit/fixtures/html/simpleCoverageAnnotation2.html
+++ b/test/unit/fixtures/html/simpleCoverageAnnotation2.html
@@ -1,25 +1,25 @@
test2 Clause Coverage: 100%
-
+
define "Denominator":
-
-
-
+
+
+
"Encounter with Atrial Ablation Procedure"
union
-
+
"History of Atrial FibrillationFlutter"
union
-
+
"Current Diagnosis Atrial FibrillationFlutter"
diff --git a/test/unit/fixtures/html/simpleFalseAnnotation.html b/test/unit/fixtures/html/simpleFalseAnnotation.html
index fbf3f95b..cf1d4bb5 100644
--- a/test/unit/fixtures/html/simpleFalseAnnotation.html
+++ b/test/unit/fixtures/html/simpleFalseAnnotation.html
@@ -1,12 +1,12 @@
Population Group: test
-
+
define "Denominator":
diff --git a/test/unit/fixtures/html/simpleTrueAnnotation.html b/test/unit/fixtures/html/simpleTrueAnnotation.html
index 1ce90fdd..f1b616eb 100644
--- a/test/unit/fixtures/html/simpleTrueAnnotation.html
+++ b/test/unit/fixtures/html/simpleTrueAnnotation.html
@@ -1,12 +1,12 @@
Population Group: test
-
+
define "Denominator":