Skip to content

Commit

Permalink
343 - Fixed the ValueSets Code: ">" for Markdown Table (#3204)
Browse files Browse the repository at this point in the history
* 343 - Fixed the ValueSets Code: ">" for Markdown Table

Code: ">" in common.valuesets table hl70078 is the blockquote
markdown control character. We need to user ">" (html code
symbol for ">" instead.

* Added Unit Test case for checking the > (special character for >)
  • Loading branch information
oslynn authored Dec 9, 2021
1 parent c69a983 commit b22bf3e
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/covid-19-gaen.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/covid-19-redox.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/fl-fl-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/gu-gu-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/la-la-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/mt-mt-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/nd-nd-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/nm-nm-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/oh-oh-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/tx-tx-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
2 changes: 1 addition & 1 deletion prime-router/docs/schema_documentation/vt-vt-covid-19.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code | Display
---- | -------
A|Abnormal (applies to non-numeric results)
>|Above absolute high-off instrument scale
>|Above absolute high-off instrument scale
H|Above high normal
HH|Above upper panic limits
AC|Anti-complementary substances present
Expand Down
3 changes: 2 additions & 1 deletion prime-router/src/main/kotlin/DocumentationFactory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ ${element.documentation}
appendable.appendLine("---- | -------")

values.forEach { vs ->
appendable.appendLine("${vs.code}|${vs.display}")
val code = if (vs.code == ">") ">" else vs.code // This to solve the markdown blockquote '>'
appendable.appendLine("$code|${vs.display}")
}
appendable.appendLine("")
}
Expand Down
31 changes: 31 additions & 0 deletions prime-router/src/test/kotlin/DocumentationTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,35 @@ $documentation
val actual = DocumentationFactory.getElementDocumentation(elemWithDocumentation)
assertThat(actual).isEqualTo(expected)
}

@Test
fun `test documentation for element with type CODE and valueSet table with special char`() {

val valueSetA = ValueSet(
"a",
ValueSet.SetSystem.HL7,
values = listOf(ValueSet.Value(">", "Above absolute high-off instrument scale"))
)

val elemWithTypeCode = Element(name = "a", type = Element.Type.CODE, valueSetRef = valueSetA)
val expected = """
**Name**: a

**Type**: CODE

**PII**: No

**Cardinality**: [0..1]

**Value Sets**

Code | Display
---- | -------
>|Above absolute high-off instrument scale

---
"""
val actual = DocumentationFactory.getElementDocumentation(elemWithTypeCode)
assertThat(actual).isEqualTo(expected)
}
}

0 comments on commit b22bf3e

Please sign in to comment.