Merge pull request #160 from rhausam/multiple-expansion-version-notice
Support listing multiple "Expansion based on" versions.
This commit is contained in:
commit
afb0453e7b
|
@ -2727,15 +2727,15 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
@SuppressWarnings("rawtypes")
|
||||
private void generateVersionNotice(XhtmlNode x, ValueSetExpansionComponent expansion) {
|
||||
Map<String, String> versions = new HashMap<String, String>();
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (ValueSetExpansionParameterComponent p : expansion.getParameter()) {
|
||||
if (p.getName().equals("version")) {
|
||||
String[] parts = ((PrimitiveType) p.getValue()).asStringValue().split("\\|");
|
||||
if (b.length() > 0)
|
||||
b.append("<br>");
|
||||
if (parts.length == 2)
|
||||
versions.put(parts[0], parts[1]);
|
||||
}
|
||||
}
|
||||
if (!versions.isEmpty()) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append("Expansion based on ");
|
||||
boolean first = true;
|
||||
for (String s : versions.keySet()) {
|
||||
|
@ -2746,7 +2746,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
if (!s.equals("http://snomed.info/sct"))
|
||||
b.append(describeSystem(s)+" version "+versions.get(s));
|
||||
else {
|
||||
String[] parts = versions.get(s).split("\\/");
|
||||
parts = versions.get(s).split("\\/");
|
||||
if (parts.length >= 5) {
|
||||
String m = describeModule(parts[4]);
|
||||
if (parts.length == 7)
|
||||
|
@ -2757,10 +2757,12 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
b.append(describeSystem(s)+" version "+versions.get(s));
|
||||
}
|
||||
}
|
||||
|
||||
x.para().setAttribute("style", "border: black 1px dotted; background-color: #EEEEEE; padding: 8px").addText(b.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (b.length() > 0)
|
||||
x.para().setAttribute("style", "border: black 1px dotted; background-color: #EEEEEE; padding: 8px").addText(b.toString());
|
||||
}
|
||||
|
||||
private String formatSCTDate(String ds) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
||||
|
|
|
@ -2882,15 +2882,15 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
@SuppressWarnings("rawtypes")
|
||||
private void generateVersionNotice(XhtmlNode x, ValueSetExpansionComponent expansion) {
|
||||
Map<String, String> versions = new HashMap<String, String>();
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (ValueSetExpansionParameterComponent p : expansion.getParameter()) {
|
||||
if (p.getName().equals("version")) {
|
||||
String[] parts = ((PrimitiveType) p.getValue()).asStringValue().split("\\|");
|
||||
if (b.length() > 0)
|
||||
b.append("<br>");
|
||||
if (parts.length == 2)
|
||||
versions.put(parts[0], parts[1]);
|
||||
}
|
||||
}
|
||||
if (!versions.isEmpty()) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append("Expansion based on ");
|
||||
boolean first = true;
|
||||
for (String s : versions.keySet()) {
|
||||
|
@ -2901,7 +2901,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
if (!s.equals("http://snomed.info/sct"))
|
||||
b.append(describeSystem(s)+" version "+versions.get(s));
|
||||
else {
|
||||
String[] parts = versions.get(s).split("\\/");
|
||||
parts = versions.get(s).split("\\/");
|
||||
if (parts.length >= 5) {
|
||||
String m = describeModule(parts[4]);
|
||||
if (parts.length == 7)
|
||||
|
@ -2912,10 +2912,12 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
b.append(describeSystem(s)+" version "+versions.get(s));
|
||||
}
|
||||
}
|
||||
|
||||
x.para().setAttribute("style", "border: black 1px dotted; background-color: #EEEEEE; padding: 8px").addText(b.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (b.length() > 0)
|
||||
x.para().setAttribute("style", "border: black 1px dotted; background-color: #EEEEEE; padding: 8px").addText(b.toString());
|
||||
}
|
||||
|
||||
private String formatSCTDate(String ds) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
||||
|
|
|
@ -3213,15 +3213,15 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
@SuppressWarnings("rawtypes")
|
||||
private void generateVersionNotice(XhtmlNode x, ValueSetExpansionComponent expansion) {
|
||||
Map<String, String> versions = new HashMap<String, String>();
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (ValueSetExpansionParameterComponent p : expansion.getParameter()) {
|
||||
if (p.getName().equals("version")) {
|
||||
String[] parts = ((PrimitiveType) p.getValue()).asStringValue().split("\\|");
|
||||
if (b.length() > 0)
|
||||
b.append("<br>");
|
||||
if (parts.length == 2)
|
||||
versions.put(parts[0], parts[1]);
|
||||
}
|
||||
}
|
||||
if (!versions.isEmpty()) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append("Expansion based on ");
|
||||
boolean first = true;
|
||||
for (String s : versions.keySet()) {
|
||||
|
@ -3232,7 +3232,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
if (!s.equals("http://snomed.info/sct"))
|
||||
b.append(describeSystem(s)+" version "+versions.get(s));
|
||||
else {
|
||||
String[] parts = versions.get(s).split("\\/");
|
||||
parts = versions.get(s).split("\\/");
|
||||
if (parts.length >= 5) {
|
||||
String m = describeModule(parts[4]);
|
||||
if (parts.length == 7)
|
||||
|
@ -3243,10 +3243,12 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
b.append(describeSystem(s)+" version "+versions.get(s));
|
||||
}
|
||||
}
|
||||
|
||||
x.para().setAttribute("style", "border: black 1px dotted; background-color: #EEEEEE; padding: 8px").addText(b.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (b.length() > 0)
|
||||
x.para().setAttribute("style", "border: black 1px dotted; background-color: #EEEEEE; padding: 8px").addText(b.toString());
|
||||
}
|
||||
|
||||
private String formatSCTDate(String ds) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
||||
|
|
Loading…
Reference in New Issue