Release new version 4.2.18
This commit is contained in:
parent
957a71dc41
commit
175d5fa0b7
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -292,6 +292,8 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
private List<ProfileComparison> comparisons = new ArrayList<ProfileComparison>();
|
private List<ProfileComparison> comparisons = new ArrayList<ProfileComparison>();
|
||||||
private String id;
|
private String id;
|
||||||
private String title;
|
private String title;
|
||||||
|
private String leftPrefix;
|
||||||
|
private String rightPrefix;
|
||||||
private String leftLink;
|
private String leftLink;
|
||||||
private String leftName;
|
private String leftName;
|
||||||
private String rightLink;
|
private String rightLink;
|
||||||
|
@ -774,22 +776,33 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
try {
|
try {
|
||||||
le = context.expandVS(lvs, true, false);
|
le = context.expandVS(lvs, true, false);
|
||||||
re = context.expandVS(rvs, true, false);
|
re = context.expandVS(rvs, true, false);
|
||||||
if (!closed(le.getValueset()) || !closed(re.getValueset()))
|
if (le.getError() != null) {
|
||||||
throw new DefinitionException("unclosed value sets are not handled yet");
|
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "The value set "+lvs.getUrl()+" could not be expanded", ValidationMessage.IssueSeverity.ERROR));
|
||||||
cvs = intersectByExpansion(path, le.getValueset(), re.getValueset());
|
} else if (re.getError() != null) {
|
||||||
if (!cvs.getCompose().hasInclude()) {
|
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "The value set "+rvs.getUrl()+" could not be expanded", ValidationMessage.IssueSeverity.ERROR));
|
||||||
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "The value sets "+lvs.getUrl()+" and "+rvs.getUrl()+" do not intersect", ValidationMessage.IssueSeverity.ERROR));
|
} else if (!closed(le.getValueset())) {
|
||||||
status(subset, ProfileUtilities.STATUS_ERROR);
|
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "The value set "+lvs.getUrl()+" is not closed, so can't be compased", ValidationMessage.IssueSeverity.ERROR));
|
||||||
return false;
|
} else if (!closed(re.getValueset())) {
|
||||||
|
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "The value set "+rvs.getUrl()+" is not closed, so can't be compased", ValidationMessage.IssueSeverity.ERROR));
|
||||||
|
} else {
|
||||||
|
cvs = intersectByExpansion(path, le.getValueset(), re.getValueset());
|
||||||
|
if (!cvs.getCompose().hasInclude()) {
|
||||||
|
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "The value sets "+lvs.getUrl()+" and "+rvs.getUrl()+" do not intersect", ValidationMessage.IssueSeverity.ERROR));
|
||||||
|
status(subset, ProfileUtilities.STATUS_ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "Unable to expand or process value sets "+lvs.getUrl()+" and "+rvs.getUrl()+": "+e.getMessage(), ValidationMessage.IssueSeverity.ERROR));
|
outcome.messages.add(new ValidationMessage(Source.ProfileComparer, ValidationMessage.IssueType.STRUCTURE, path, "Unable to expand or process value sets "+lvs.getUrl()+" and "+rvs.getUrl()+": "+e.getMessage(), ValidationMessage.IssueSeverity.ERROR));
|
||||||
status(subset, ProfileUtilities.STATUS_ERROR);
|
status(subset, ProfileUtilities.STATUS_ERROR);
|
||||||
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
subBinding.setValueSet("#"+addValueSet(cvs));
|
if (cvs != null) {
|
||||||
superBinding.setValueSet("#"+addValueSet(unite(superset, outcome, path, lvs, rvs)));
|
subBinding.setValueSet("#"+addValueSet(cvs));
|
||||||
|
superBinding.setValueSet("#"+addValueSet(unite(superset, outcome, path, lvs, rvs)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1335,11 +1348,30 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
this.rightName = rightName;
|
this.rightName = rightName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String genPCLink(String leftName, String leftLink) {
|
public String getLeftPrefix() {
|
||||||
if (leftLink == null)
|
return leftPrefix;
|
||||||
return leftName;
|
}
|
||||||
else
|
|
||||||
return "<a href=\""+leftLink+"\">"+Utilities.escapeXml(leftName)+"</a>";
|
public void setLeftPrefix(String leftPrefix) {
|
||||||
|
this.leftPrefix = leftPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightPrefix() {
|
||||||
|
return rightPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightPrefix(String rightPrefix) {
|
||||||
|
this.rightPrefix = rightPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String genPCLink(String name, String link, String prefix) {
|
||||||
|
if (link == null) {
|
||||||
|
return name;
|
||||||
|
} else if (!Utilities.isAbsoluteUrl(link) && !Utilities.noString(prefix)) {
|
||||||
|
return "<a href=\""+Utilities.pathURL(prefix, link)+"\">"+Utilities.escapeXml(name)+"</a>";
|
||||||
|
} else {
|
||||||
|
return "<a href=\""+link+"\">"+Utilities.escapeXml(name)+"</a>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String genValueSets(String base) throws IOException {
|
private String genValueSets(String base) throws IOException {
|
||||||
|
@ -1390,8 +1422,8 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
|
|
||||||
for (ProfileComparison cmp : getComparisons()) {
|
for (ProfileComparison cmp : getComparisons()) {
|
||||||
b.append("<tr>");
|
b.append("<tr>");
|
||||||
b.append(" <td><a href=\""+cmp.getLeft().getUserString("path")+"\">"+Utilities.escapeXml(cmp.getLeft().getName())+"</a></td>");
|
b.append(" <td><a href=\""+fixLink(cmp.getLeft().getUserString("path"), leftPrefix)+"\">"+Utilities.escapeXml(cmp.getLeft().getName())+"</a></td>");
|
||||||
b.append(" <td><a href=\""+cmp.getRight().getUserString("path")+"\">"+Utilities.escapeXml(cmp.getRight().getName())+"</a></td>");
|
b.append(" <td><a href=\""+fixLink(cmp.getRight().getUserString("path"), rightPrefix)+"\">"+Utilities.escapeXml(cmp.getRight().getName())+"</a></td>");
|
||||||
b.append(" <td><a href=\""+getId()+"."+cmp.getId()+".html\">Click Here</a></td>");
|
b.append(" <td><a href=\""+getId()+"."+cmp.getId()+".html\">Click Here</a></td>");
|
||||||
b.append(" <td>"+cmp.getErrorCount()+"</td>");
|
b.append(" <td>"+cmp.getErrorCount()+"</td>");
|
||||||
b.append(" <td>"+cmp.getWarningCount()+"</td>");
|
b.append(" <td>"+cmp.getWarningCount()+"</td>");
|
||||||
|
@ -1404,6 +1436,10 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String fixLink(String path, String pfx) {
|
||||||
|
return (pfx == null || Utilities.isAbsoluteUrl(path)) ? path : Utilities.pathURL(pfx, path);
|
||||||
|
}
|
||||||
|
|
||||||
private String genCmpMessages(ProfileComparison cmp) {
|
private String genCmpMessages(ProfileComparison cmp) {
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
b.append("<table class=\"grid\">\r\n");
|
b.append("<table class=\"grid\">\r\n");
|
||||||
|
@ -1443,7 +1479,7 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
private String genCompModel(StructureDefinition sd, String name, String base, String prefix, String dest) throws FHIRException, IOException {
|
private String genCompModel(StructureDefinition sd, String name, String base, String prefix, String dest) throws FHIRException, IOException {
|
||||||
if (sd == null)
|
if (sd == null)
|
||||||
return "<p style=\"color: maroon\">No "+name+" could be generated</p>\r\n";
|
return "<p style=\"color: maroon\">No "+name+" could be generated</p>\r\n";
|
||||||
return new XhtmlComposer(XhtmlComposer.HTML).compose(new ProfileUtilities(context, null, this).generateTable("??", sd, false, dest, false, base, true, prefix, prefix, false, false, null, true));
|
return new XhtmlComposer(XhtmlComposer.HTML).compose(new ProfileUtilities(context, null, this).generateTable("?gen-cm?", sd, false, dest, false, base, true, prefix, prefix, false, false, null, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1455,8 +1491,8 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
// first page we produce is simply the index
|
// first page we produce is simply the index
|
||||||
Map<String, String> vars = new HashMap<String, String>();
|
Map<String, String> vars = new HashMap<String, String>();
|
||||||
vars.put("title", getTitle());
|
vars.put("title", getTitle());
|
||||||
vars.put("left", genPCLink(getLeftName(), getLeftLink()));
|
vars.put("left", genPCLink(getLeftName(), getLeftLink(), getLeftPrefix()));
|
||||||
vars.put("right", genPCLink(getRightName(), getRightLink()));
|
vars.put("right", genPCLink(getRightName(), getRightLink(), getRightPrefix()));
|
||||||
vars.put("table", genPCTable());
|
vars.put("table", genPCTable());
|
||||||
vars.put("valuesets", genValueSets(folder+"/"+getId()+"-vs"));
|
vars.put("valuesets", genValueSets(folder+"/"+getId()+"-vs"));
|
||||||
producePage(summaryTemplate(), Utilities.path(folder, getId()+".html"), vars);
|
producePage(summaryTemplate(), Utilities.path(folder, getId()+".html"), vars);
|
||||||
|
@ -1465,8 +1501,8 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
for (ProfileComparison cmp : getComparisons()) {
|
for (ProfileComparison cmp : getComparisons()) {
|
||||||
vars.clear();
|
vars.clear();
|
||||||
vars.put("title", getTitle());
|
vars.put("title", getTitle());
|
||||||
vars.put("left", genPCLink(getLeftName(), getLeftLink()));
|
vars.put("left", genPCLink(getLeftName(), getLeftLink(), getLeftPrefix()));
|
||||||
vars.put("right", genPCLink(getRightName(), getRightLink()));
|
vars.put("right", genPCLink(getRightName(), getRightLink(), getRightPrefix()));
|
||||||
vars.put("messages", genCmpMessages(cmp));
|
vars.put("messages", genCmpMessages(cmp));
|
||||||
vars.put("subset", genCompModel(cmp.getSubset(), "intersection", getId()+"."+cmp.getId(), "", folder));
|
vars.put("subset", genCompModel(cmp.getSubset(), "intersection", getId()+"."+cmp.getId(), "", folder));
|
||||||
vars.put("superset", genCompModel(cmp.getSuperset(), "union", getId()+"."+cmp.getId(), "", folder));
|
vars.put("superset", genCompModel(cmp.getSuperset(), "union", getId()+"."+cmp.getId(), "", folder));
|
||||||
|
@ -1488,7 +1524,7 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
String s1 = src.substring(0, i1);
|
String s1 = src.substring(0, i1);
|
||||||
String s2 = src.substring(i1 + 2, i2).trim();
|
String s2 = src.substring(i1 + 2, i2).trim();
|
||||||
String s3 = src.substring(i2+2);
|
String s3 = src.substring(i2+2);
|
||||||
String v = vars.containsKey(s2) ? vars.get(s2) : "???";
|
String v = vars.containsKey(s2) ? vars.get(s2) : "?pp??";
|
||||||
src = s1+v+s3;
|
src = s1+v+s3;
|
||||||
}
|
}
|
||||||
TextFile.stringToFile(src, path);
|
TextFile.stringToFile(src, path);
|
||||||
|
@ -1572,7 +1608,7 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
||||||
@Override
|
@Override
|
||||||
public String getLinkForProfile(StructureDefinition profile, String url) {
|
public String getLinkForProfile(StructureDefinition profile, String url) {
|
||||||
StructureDefinition sd = context.fetchResource(StructureDefinition.class, url);
|
StructureDefinition sd = context.fetchResource(StructureDefinition.class, url);
|
||||||
return sd == null ? null : sd.getUserString("path");
|
return sd == null ? null : sd.getUserString("path")+"|"+sd.present();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
||||||
each other. It is fine to bump the point version of this POM without affecting
|
each other. It is fine to bump the point version of this POM without affecting
|
||||||
HAPI FHIR.
|
HAPI FHIR.
|
||||||
-->
|
-->
|
||||||
<version>4.2.17-SNAPSHOT</version>
|
<version>4.2.18-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<hapi_fhir_version>4.2.0</hapi_fhir_version>
|
<hapi_fhir_version>4.2.0</hapi_fhir_version>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set oldver=4.2.16
|
set oldver=4.2.17
|
||||||
set newver=4.2.17
|
set newver=4.2.18
|
||||||
|
|
||||||
echo ..
|
echo ..
|
||||||
echo =========================================================================
|
echo =========================================================================
|
||||||
|
|
Loading…
Reference in New Issue