id | "); + bs.append("published | "); + bs.append("ballot | "); + bs.append("current | "); + bs.append("
"+dep.pid+" | "); + bs.append(""+present(dep.pid, dep.published, true)+" | "); + bs.append(""+present(dep.pid, dep.ballot, true)+" | "); + bs.append(""+present(dep.pid, dep.cibuild, false)+" | "); + bs.append("
no references
"; + details1 = "(no details)
"; + details2 = "(no details)
"; + } else { + countDesc = ""+c+" "+Utilities.pluralize("guide", c); + summary = bs.toString(); + details1 = bd1.toString(); + details2 = bd2.toString(); + } + } + + private void generate(StringBuilder bd2, List"+Utilities.escapeXml(t.text)+" | \r\n"); + bd2.append("\r\n"); + int c = 0; + for (DepInfo dep : deplist) { + if (isFound(dep.cibuild)) { + c = processDep(bd2, s, dep, dep.cibuild, c); + } else if (isFound(dep.ballot)) { + c = processDep(bd2, s, dep, dep.ballot, c); + } else if (isFound(dep.published)) { + c = processDep(bd2, s, dep, dep.published, c); + } + } + if (c == 0) { + bd2.append("(not used)"); + } + bd2.append(" | \r\n"); + bd2.append("
"+head+"
\r\n"+Utilities.escapeXml(t.text)+" | \r\n"); + bd1.append("\r\n");
+ boolean first = true;
+ for (Triple p : list.get(n)) {
+ if (first) { first = false; } else { bd1.append(" "); } + bd1.append(" "+Utilities.escapeXml(p.text)+"\r\n"); + } + bd1.append(" | \r\n");
+ bd1.append("
Generated $time$ for $packageId$
\r\n"+ + "\r\n"+ + "$errors$\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"; + + ST t = template(page); + t.add("title", title); + t.add("time", new Date().toString()); + t.add("packageId", id); + t.add("summary", summary); + t.add("details1", details1); + t.add("details2", details2); + t.add("errors", String.join("\r\n", errors)); + + TextFile.stringToFile(t.render(), Utilities.path(path, "qa-dep.html")); + } + + public void addCodeSystem(String url, String title, String link) { + codeSystems.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public void addValueSet(String url, String title, String link) { + valueSets.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public void addProfile(String url, String title, String link) { + profiles.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public void addExtension(String url, String title, String link) { + extensions.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public void addLogical(String url, String title, String link) { + logicals.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public void addSearchParam(String url, String title, String link) { + searchParams.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public void addCapabilityStatement(String url, String title, String link) { + capabilityStatements.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public void addExample(String url, String title, String link) { + examples.add(url); + triples.put(url, new Triple(url, title, link)); + } + + public String getCountDesc() { + return countDesc; + } + + +} diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTLMLInspector.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTLMLInspector.java index d5d0e3dd5..e3f082da3 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTLMLInspector.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTLMLInspector.java @@ -619,10 +619,18 @@ private boolean checkResolveLink(String filename, Location loc, String path, Str "http://hl7.org/fhir-issues", "http://hl7.org/registry") || matchesTarget(ref, "http://hl7.org", "http://hl7.org/fhir/DSTU2", "http://hl7.org/fhir/STU3", "http://hl7.org/fhir/R4", "http://hl7.org/fhir/smart-app-launch", "http://hl7.org/fhir/validator"); + // a local file may have bee created by some poorly tracked process, so we'll consider that as a possible + if (!resolved && !Utilities.isAbsoluteUrl(rref) && !rref.contains("..")) { // .. is security check. Maybe there's some ways it could be valid, but we're not interested for now + String fname = Utilities.path(new File(filename).getParent(), rref); + if (new File(fname).exists()) { + resolved = true; + } + } + // external terminology resources - if (!resolved) { - resolved = Utilities.startsWithInList(ref, "http://cts.nlm.nih.gov/fhir"); - } + if (!resolved) { + resolved = Utilities.startsWithInList(ref, "http://cts.nlm.nih.gov/fhir"); + } if (!resolved) { if (rref.startsWith("http://") || rref.startsWith("https://") || rref.startsWith("ftp://") || rref.startsWith("tel:")) { @@ -753,7 +761,7 @@ private boolean checkResolveImageLink(String filename, Location loc, String path if (resolved) return false; else { - messages.add(new ValidationMessage(Source.Publisher, IssueType.NOTFOUND, filename+(path == null ? "" : "#"+path+(loc == null ? "" : " at "+loc.toString())), "The image source '"+ref+"' cannot be resolved"+tgtList, IssueSeverity.ERROR).setLocationLink(uuid == null ? null : filename+"#"+uuid)); + messages.add(new ValidationMessage(Source.LinkChecker, IssueType.NOTFOUND, filename+(path == null ? "" : "#"+path+(loc == null ? "" : " at "+loc.toString())), "The image source '"+ref+"' cannot be resolved"+tgtList, IssueSeverity.ERROR).setLocationLink(uuid == null ? null : filename+"#"+uuid)); return true; } } diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/PreviousVersionComparator.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/PreviousVersionComparator.java index 54fa1c2dc..901c71b13 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/PreviousVersionComparator.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/PreviousVersionComparator.java @@ -105,10 +105,10 @@ public PreviousVersionComparator(SimpleWorkerContext context, String version, St private void processVersions(String canonical, List
Profile Name | "); if (hasCat) b.append("Category | "); - if (hasLoinc) b.append("Loinc | "); - if (hasSnomed) b.append("Snomed | "); if (hasCode) b.append("Code | "); - b.append("Profile Name | "); if (hasEffective) b.append("Time Types | "); if (hasTypes) b.append("Value Types | "); + if (hasDAR) b.append("Data Absent Reason | "); if (hasBodySite) b.append("Body Site | "); if (hasMethod) b.append("Method | "); b.append("
"+op.source.present()+" | "); - renderTypeCell(b, hasEffective, op.effectiveTypes); - renderTypeCell(b, hasTypes, op.types); - renderCodingCell(b, hasBodySite, op.bodySite, null, null); - renderCodingCell(b, hasMethod, op.method, null, null); - + b.append(""+op.source.getId()+" | "); + renderCodingCell(b, hasCat, op.category, op.catVS); + renderCodingCell(b, hasCode, op.code, op.codeVS); + renderTypeCell(b, hasEffective, op.effectiveTypes, baseEffectiveTypes); + renderTypeCell(b, hasTypes, op.types, baseTypes); + renderBoolean(b, hasDAR, op.dataAbsentReason); + renderCodingCell(b, hasBodySite, op.bodySite, null); + renderCodingCell(b, hasMethod, op.method, null); b.append("|||||||||
"+op2.name+" | "); + b.append(""); + renderCodingCell(b, hasCode, op2.code, op2.codeVS); + renderTypeCell(b, hasEffective, op2.effectiveTypes, baseEffectiveTypes); + renderTypeCell(b, hasTypes, op2.types, baseTypes); + renderBoolean(b, hasDAR, op2.dataAbsentReason); + renderCodingCell(b, hasBodySite, op2.bodySite, null); + renderCodingCell(b, hasMethod, op2.method, null); + b.append(" |