Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

343 - Fixed the ValueSets Code: ">" for Markdown Table #3204

Merged
merged 7 commits into from
Dec 9, 2021
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)
}
}