diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e69de29bb..0de57870f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -0,0 +1,24 @@ +* Loader: Reduce memory utilization (clean up before Jekyll) +* Loader: Fix NPE on descriptions on spreadsheets +* Loader: Fix committee URLs +* Terminology Sub-system: Improve expansion error messages +* Terminology Sub-system: Fix expansion language - don't set for displayName parameter +* Validator: Fix validator not allowing canonical resource extensions in canonical resources in bundles +* Validator: Fix bundle validation error on intneral link checking +* Validator: Check parameter type for FHIRPath where() and all() +* Validator: Validate that composite search parameters have components +* Renderer: Adjust value set rendering for fragment code systems +* Renderer: Fix NPE rendering some resources +* Renderer: Fix rendering of TriggerDefinition +* Renderer: Add support for rendering union and intersections of profiles in profile comparison +* Renderer: Fix for broken markdown re-processing +* Renderer: Improve identifier rendering +* Renderer: fix bad link on VSAC code systems +* Renderer: clean up dependency presentation +* Renderer: Add IPS Comparison +* Renderer: HL7 trademark related fixes +* Renderer: do NOT force white background in ToC +* Renderer: Fix missing examples when using versioned canonical URLs +* Renderer: fix broken markdown processing generating IP statements fragment +* Generator: add Jekyll/windows note + diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/CqlSubSystem.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/CqlSubSystem.java index 56b7f9270..f42d9db49 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/CqlSubSystem.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/CqlSubSystem.java @@ -43,8 +43,7 @@ import org.hl7.elm_modelinfo.r1.ModelInfo; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRFormatError; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.r5.model.DataRequirement; import org.hl7.fhir.r5.model.Enumerations; import org.hl7.fhir.r5.model.Library; @@ -163,7 +162,7 @@ public ModelInfo load(ModelIdentifier modelIdentifier) { } } } catch (IOException e) { - logger.logDebugMessage(IWorkerContext.ILoggingService.LogCategory.PROGRESS, String.format("Exceptions occurred attempting to load npm library for model %s", modelIdentifier.toString())); + logger.logDebugMessage(ILoggingService.LogCategory.PROGRESS, String.format("Exceptions occurred attempting to load npm library for model %s", modelIdentifier.toString())); } } diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FSHRunner.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FSHRunner.java index 345e08f5f..1c85219c4 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FSHRunner.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FSHRunner.java @@ -19,7 +19,7 @@ import org.apache.commons.exec.PumpStreamHandler; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.SystemUtils; -import org.hl7.fhir.r5.context.IWorkerContext; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.utilities.IniFile; import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.settings.FhirSettings; @@ -28,13 +28,13 @@ public class FSHRunner { - private final IWorkerContext.ILoggingService logger; + private final ILoggingService logger; private static final long FSH_TIMEOUT = 60000 * 5; // 5 minutes.... private long fshTimeout = FSH_TIMEOUT; - public FSHRunner(IWorkerContext.ILoggingService logger) { + public FSHRunner(ILoggingService logger) { this.logger = logger; } diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTMLInspector.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTMLInspector.java index 460c60419..cccba41e7 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTMLInspector.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTMLInspector.java @@ -40,9 +40,10 @@ import org.hl7.fhir.exceptions.FHIRFormatError; import org.hl7.fhir.igtools.publisher.SpecMapManager.SpecialPackageType; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService.LogCategory; +import org.hl7.fhir.r5.context.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService.LogCategory; import org.hl7.fhir.utilities.CommaSeparatedStringBuilder; +import org.hl7.fhir.utilities.PathBuilder; import org.hl7.fhir.utilities.TextFile; import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager; @@ -718,7 +719,8 @@ private boolean checkResolveLink(String filename, Location loc, String path, Str } else { try { String folder = Utilities.getDirectoryForFile(filename); - page = Utilities.path(folder == null ? (altRootFolder != null && filename.startsWith(altRootFolder) ? altRootFolder : rootFolder) : folder, page.replace("/", File.separator)); + String f = folder == null ? (altRootFolder != null && filename.startsWith(altRootFolder) ? altRootFolder : rootFolder) : folder; + page = PathBuilder.getPathBuilder().withRequiredTarget(rootFolder).buildPath(f, page.replace("/", File.separator)); } catch (java.nio.file.InvalidPathException e) { page = null; } diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/IFetchFile.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/IFetchFile.java index df7072997..05bb7323c 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/IFetchFile.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/IFetchFile.java @@ -27,8 +27,8 @@ import java.util.List; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; import org.hl7.fhir.r5.model.DataType; public interface IFetchFile { diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java index a960c6b91..4f063ad2c 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java @@ -95,6 +95,7 @@ import org.hl7.fhir.igtools.publisher.FetchedFile.FetchedBundleType; import org.hl7.fhir.igtools.publisher.IFetchFile.FetchState; import org.hl7.fhir.igtools.publisher.comparators.IpaComparator; +import org.hl7.fhir.igtools.publisher.comparators.IpsComparator; import org.hl7.fhir.igtools.publisher.comparators.PreviousVersionComparator; import org.hl7.fhir.igtools.publisher.loaders.AdjunctFileLoader; import org.hl7.fhir.igtools.publisher.loaders.LibraryLoader; @@ -146,8 +147,7 @@ import org.hl7.fhir.r5.conformance.profile.ProfileUtilities; import org.hl7.fhir.r5.context.ContextUtilities; import org.hl7.fhir.r5.context.IContextResourceLoader; -import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.r5.context.SimpleWorkerContext; import org.hl7.fhir.r5.elementmodel.Element; import org.hl7.fhir.r5.elementmodel.FmlParser; @@ -404,7 +404,7 @@ * @author Grahame Grieve */ -public class Publisher implements IWorkerContext.ILoggingService, IReferenceResolver, IValidationProfileUsageTracker { +public class Publisher implements ILoggingService, IReferenceResolver, IValidationProfileUsageTracker { private static final String PACKAGE_CACHE_FOLDER_PARAM = "-package-cache-folder"; @@ -852,6 +852,7 @@ public enum GenerationTool { private RealmBusinessRules realmRules; private PreviousVersionComparator previousVersionComparator; private IpaComparator ipaComparator; + private IpsComparator ipsComparator; private IGPublisherLiquidTemplateServices templateProvider; @@ -893,6 +894,7 @@ public void setNoSushi(boolean noSushi) { private List comparisonVersions; private List ipaComparisons; + private List ipsComparisons; private String versionToAnnotate; private TimeTracker tt; @@ -1144,8 +1146,8 @@ public void createIg() throws Exception, IOException, EOperationOutcome, FHIRExc clean(); dependentIgFinder.finish(outputDir, sourceIg.present()); ValidationPresenter val = new ValidationPresenter(version, workingVersion(), igpkp, childPublisher == null? null : childPublisher.getIgpkp(), rootDir, npmName, childPublisher == null? null : childPublisher.npmName, - IGVersionUtil.getVersion(), fetchCurrentIGPubVersion(), realmRules, previousVersionComparator, ipaComparator, - new DependencyRenderer(pcm, outputDir, npmName, templateManager, dependencyList, context, markdownEngine).render(publishedIg, true, false), new HTAAnalysisRenderer(context, outputDir, markdownEngine).render(publishedIg.getPackageId(), fileList, publishedIg.present()), + IGVersionUtil.getVersion(), fetchCurrentIGPubVersion(), realmRules, previousVersionComparator, ipaComparator, ipsComparator, + new DependencyRenderer(pcm, outputDir, npmName, templateManager, dependencyList, context, markdownEngine).render(publishedIg, true, false, false), new HTAAnalysisRenderer(context, outputDir, markdownEngine).render(publishedIg.getPackageId(), fileList, publishedIg.present()), new PublicationChecker(repoRoot, historyPage, markdownEngine).check(), renderGlobals(), copyrightYear, context, scanForR5Extensions(), modifierExtensions, generateDraftDependencies(), noNarrativeResources, noValidateResources, validationOff, generationOff, dependentIgFinder); @@ -2397,6 +2399,7 @@ public void initialize() throws Exception { realmRules = makeRealmBusinessRules(); previousVersionComparator = makePreviousVersionComparator(); ipaComparator = makeIpaComparator(); + ipsComparator = makeIpsComparator(); if (context != null) { r4tor4b.setContext(context); } @@ -2819,6 +2822,14 @@ private void initializeFromIg(IniFile ini) throws Exception { ipaComparisons.add(p.getValue()); } break; + case "ips-comparison": + if (ipsComparisons == null) { + ipsComparisons = new ArrayList<>(); + } + if (!"n/a".equals(p.getValue())) { + ipsComparisons.add(p.getValue()); + } + break; case "validation": if (p.getValue().equals("check-must-support")) hintAboutNonMustSupport = true; @@ -5545,8 +5556,9 @@ private boolean loadSpreadsheet(String name, boolean needToBuild, FetchedFile ig res.setGroupingId(pck.getId()); if (!res.hasName()) res.setName(r.getTitle()); - if (!res.hasDescription()) + if (!res.hasDescription() && ((CanonicalResource)r.getResource()).hasDescription()) { res.setDescription(((CanonicalResource)r.getResource()).getDescription().trim()); + } res.setReference(new Reference().setReference(r.fhirType()+"/"+r.getId())); } res.setUserData("loaded.resource", r); @@ -5643,6 +5655,8 @@ private void loadConformance() throws Exception { generateSnapshots(); log("Check R4 / R4B"); checkR4R4B(); + log("Assign Comparison Ids"); + assignComparisonIds(); if (isPropagateStatus) { log("Propagating status"); propagateStatus(); @@ -5667,6 +5681,25 @@ private void loadConformance() throws Exception { scanForUsageStats(); } + private void assignComparisonIds() { + int i = 0; + for (FetchedFile f : fileList) { + for (FetchedResource r : f.getResources()) { + if (r.getResource() instanceof StructureDefinition) { + StructureDefinition sd = (StructureDefinition) r.getResource(); + for (Extension ext : sd.getExtensionsByUrl(ToolingExtensions.EXT_SD_IMPOSE_PROFILE)) { + StructureDefinition sdi = context.fetchResource(StructureDefinition.class, ext.getValue().primitiveValue()); + if (sdi != null && !sdi.hasUserData("imposes.compare.id")) { + String cid = "c"+Integer.toString(i); + sdi.setUserData("imposes.compare.id", cid); + } + } + } + } + } + } + + private void loadPaths() { for (FetchedFile f : fileList) { for (FetchedResource r : f.getResources()) { @@ -5799,6 +5832,9 @@ private void checkConformanceResources() throws IOException { if (ipaComparator != null) { ipaComparator.startChecks(publishedIg); } + if (ipsComparator != null) { + ipsComparator.startChecks(publishedIg); + } for (FetchedFile f : fileList) { f.start("checkConformanceResources3"); try { @@ -5808,6 +5844,9 @@ private void checkConformanceResources() throws IOException { if (ipaComparator != null) { ipaComparator.check((CanonicalResource) r.getResource()); } + if (ipsComparator != null) { + ipsComparator.check((CanonicalResource) r.getResource()); + } } } @@ -5819,6 +5858,9 @@ private void checkConformanceResources() throws IOException { if (ipaComparator != null) { ipaComparator.finishChecks(); } + if (ipsComparator != null) { + ipsComparator.finishChecks(); + } tts.end(); } @@ -5852,6 +5894,16 @@ private IpaComparator makeIpaComparator() throws IOException { return new IpaComparator(context, rootDir, tempDir, igpkp, logger, ipaComparisons); } + private IpsComparator makeIpsComparator() throws IOException { + if (isTemplate()) { + return null; + } + if (ipsComparisons == null) { + return null; + } + return new IpsComparator(context, rootDir, tempDir, igpkp, logger, ipsComparisons); + } + private void checkJurisdiction(FetchedFile f, CanonicalResource resource, IssueSeverity error, String verb) { if (expectedJurisdiction != null) { boolean ok = false; @@ -6995,7 +7047,7 @@ private void validate() throws Exception { for (FetchedResource r : f.getResources()) { if (!r.isValidated()) { logDebugMessage(LogCategory.PROGRESS, " validating "+r.getTitle()); - log(" validating "+r.getTitle()); +// log(" validating "+r.getTitle()); validate(f, r); } } @@ -7164,8 +7216,8 @@ public void validateSD(FetchedFile f, FetchedResource r) { StructureDefinition sd = (StructureDefinition) r.getResource(); if (!sd.getAbstract() && !isClosing(sd)) { if (sd.getKind() == StructureDefinitionKind.RESOURCE) { - int cE = countStatedExamples(sd.getUrl()); - int cI = countFoundExamples(sd.getUrl()); + int cE = countStatedExamples(sd.getUrl(), sd.getVersionedUrl()); + int cI = countFoundExamples(sd.getUrl(), sd.getVersionedUrl()); if (cE + cI == 0) { f.getErrors().add(new ValidationMessage(Source.Publisher, IssueType.BUSINESSRULE, "StructureDefinition.where(url = '"+sd.getUrl()+"')", "The Implementation Guide contains no examples for this profile", IssueSeverity.WARNING)); r.getErrors().add(new ValidationMessage(Source.Publisher, IssueType.BUSINESSRULE, "StructureDefinition.where(url = '"+sd.getUrl()+"')", "The Implementation Guide contains no examples for this profile", IssueSeverity.WARNING)); @@ -7182,7 +7234,7 @@ public void validateSD(FetchedFile f, FetchedResource r) { r.getErrors().add(new ValidationMessage(Source.Publisher, IssueType.BUSINESSRULE, "StructureDefinition.where(url = '"+sd.getUrl()+"')", "The Implementation Guide contains no examples for this extension", IssueSeverity.WARNING)); } } else { - int cI = countFoundExamples(sd.getUrl()); + int cI = countFoundExamples(sd.getUrl(), sd.getVersionedUrl()); if (cI == 0) { f.getErrors().add(new ValidationMessage(Source.Publisher, IssueType.BUSINESSRULE, "StructureDefinition.where(url = '"+sd.getUrl()+"')", "The Implementation Guide contains no examples for this data type profile", IssueSeverity.WARNING)); r.getErrors().add(new ValidationMessage(Source.Publisher, IssueType.BUSINESSRULE, "StructureDefinition.where(url = '"+sd.getUrl()+"')", "The Implementation Guide contains no examples for this data type profile", IssueSeverity.WARNING)); @@ -7241,12 +7293,12 @@ private String getFixedUrl(StructureDefinition sd) { - private int countStatedExamples(String url) { + private int countStatedExamples(String url, String vurl) { int res = 0; for (FetchedFile f : fileList) { for (FetchedResource r : f.getResources()) { for (String p : r.getStatedProfiles()) { - if (url.equals(p)) { + if (url.equals(p) || vurl.equals(p)) { res++; } } @@ -7255,12 +7307,12 @@ private int countStatedExamples(String url) { return res; } - private int countFoundExamples(String url) { + private int countFoundExamples(String url, String vurl) { int res = 0; for (FetchedFile f : fileList) { for (FetchedResource r : f.getResources()) { for (String p : r.getFoundProfiles()) { - if (url.equals(p)) { + if (url.equals(p) || vurl.equals(p)) { res++; } } @@ -7437,14 +7489,18 @@ private void generate() throws Exception { if (ipaComparator != null) { ipaComparator.addOtherFiles(otherFilesRun, outputDir); } + if (ipsComparator != null) { + ipsComparator.addOtherFiles(otherFilesRun, outputDir); + } otherFilesRun.add(Utilities.path(tempDir, "usage-stats.json")); printMemUsage(); - System.out.println("Reclaiming memory..."); + log("Reclaiming memory..."); cleanOutput(tempDir); for (FetchedFile f : fileList) { f.trim(); } + context.unload(); System.gc(); printMemUsage(); @@ -7535,11 +7591,11 @@ private void generate() throws Exception { log("Checking Output HTML"); String statusMessage; if (mode == IGBuildMode.AUTOBUILD) { - statusMessage = Utilities.escapeXml(sourceIg.present())+", published by "+Utilities.escapeXml(sourceIg.getPublisher())+". This is not an authorized publication; it is the continuous build for version "+workingVersion()+". This version is based on the current content of "+gh()+" and changes regularly. See the Directory of published versions"; + statusMessage = Utilities.escapeXml(sourceIg.present())+", published by "+Utilities.escapeXml(sourceIg.getPublisher())+". This guide is not an authorized publication; it is the continuous build for version "+workingVersion()+" built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of "+gh()+" and changes regularly. See the Directory of published versions"; } else if (mode == IGBuildMode.PUBLICATION) { statusMessage = "Publication Build: This will be filled in by the publication tooling"; } else { - statusMessage = Utilities.escapeXml(sourceIg.present())+" - Local Development build (v"+workingVersion()+"). See the Directory of published versions"; + statusMessage = Utilities.escapeXml(sourceIg.present())+" - Local Development build (v"+workingVersion()+") built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions"; } realmRules.addOtherFiles(inspector.getExceptions(), outputDir); @@ -7547,6 +7603,10 @@ private void generate() throws Exception { if (ipaComparator != null) { ipaComparator.addOtherFiles(inspector.getExceptions(), outputDir); } + if (ipsComparator != null) { + ipsComparator.addOtherFiles(inspector.getExceptions(), outputDir); + } + List linkmsgs = generationOff ? new ArrayList() : inspector.check(statusMessage); int bl = 0; int lf = 0; @@ -7664,11 +7724,12 @@ private void fixSearchForm() throws IOException { private void printMemUsage() { int mb = 1024*1024; Runtime runtime = Runtime.getRuntime(); - System.out.print("## Memory (MB): "); - System.out.print("Use = " + (runtime.totalMemory() - runtime.freeMemory()) / mb); - System.out.print(", Free = " + runtime.freeMemory() / mb); - System.out.print(", Total = " + runtime.totalMemory() / mb); - System.out.println(", Max = " + runtime.maxMemory() / mb); + String s = "## Memory (MB): " + + "Use = " + (runtime.totalMemory() - runtime.freeMemory()) / mb+ + ", Free = " + runtime.freeMemory() / mb+ + ", Total = " + runtime.totalMemory() / mb+ + ", Max = " + runtime.maxMemory() / mb; + log(s); } private void generatePackageVersion(String filename, String ver) throws IOException { @@ -8302,6 +8363,18 @@ private boolean runJekyll() throws IOException, InterruptedException { try { log("Run jekyll: "+jekyllCommand+" build --destination \""+outputDir+"\" (in folder "+tempDir+")"); + if (SystemUtils.IS_OS_WINDOWS) { + log("Due to a known issue, Jekyll errors are lost between Java and Ruby. If the build process hangs at this point,"); + log("you have to go to a command prompt, and then run these two commands:"); + log(""); + log("cd "+tempDir); + log(jekyllCommand+" build --destination \""+outputDir+"\""); + log(""); + log("and then investigate why Jekyll has failed"); + } + log("Note: usual cases for Jekyll to fail are:"); + log("* A failure to produce a fragment that is already logged in the output above"); + log("* A reference to a mnually edited fiel that hasn't been provided"); if (SystemUtils.IS_OS_WINDOWS) { final String enclosedOutputDir = "\"" + outputDir + "\""; final CommandLine commandLine = new CommandLine("cmd") @@ -8450,8 +8523,8 @@ private void generateSummaryOutputs(DBBuilder db) throws Exception { fragment("cross-version-analysis-inline", r4tor4b.generate(npmName, true), otherFilesRun); } DependencyRenderer depr = new DependencyRenderer(pcm, tempDir, npmName, templateManager, makeDependencies(), context, markdownEngine); - trackedFragment("3", "dependency-table", depr.render(publishedIg, false, true), otherFilesRun); - trackedFragment("3", "dependency-table-short", depr.render(publishedIg, false, false), otherFilesRun); + trackedFragment("3", "dependency-table", depr.render(publishedIg, false, true, true), otherFilesRun); + trackedFragment("3", "dependency-table-short", depr.render(publishedIg, false, false, false), otherFilesRun); trackedFragment("4", "globals-table", depr.renderGlobals(), otherFilesRun); // now, list the profiles - all the profiles @@ -9783,6 +9856,13 @@ private void generateDataFile(DBBuilder db) throws IOException, FHIRException, S diff.add("current", Utilities.encodeUri(targetUrl())); diff.add("previous", Utilities.encodeUri(ipaComparator.getLastUrl())); } + if (ipsComparator != null && ipsComparator.hasLast() && !targetUrl().startsWith("file:")) { + JsonObject diff = new JsonObject(); + data.add("iga-diff", diff); + diff.add("name", Utilities.encodeUri(ipsComparator.getLastName())); + diff.add("current", Utilities.encodeUri(targetUrl())); + diff.add("previous", Utilities.encodeUri(ipsComparator.getLastUrl())); + } if (publishedIg.hasContact()) { JsonArray jc = new JsonArray(); @@ -11541,6 +11621,14 @@ private void generateOutputsStructureDefinition(FetchedFile f, FetchedResource r } pu.addToCSV(allProfilesCsv, sd); } + + for (Extension ext : sd.getExtensionsByUrl(ToolingExtensions.EXT_SD_IMPOSE_PROFILE)) { + StructureDefinition sdi = context.fetchResource(StructureDefinition.class, ext.getValue().primitiveValue()); + if (sdi != null) { + String cid = sdi.getUserString("imposes.compare.id"); + fragment("StructureDefinition-imposes-"+prefixForContainer+sd.getId()+"-"+cid, sdr.compareImposes(sdi), f.getOutputNames(), r, vars, null); + } + } if (igpkp.wantGen(r, "java")) { ConstraintJavaGenerator jg = new ConstraintJavaGenerator(context, version, tempDir, sourceIg.getUrl()); diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SimpleFetcher.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SimpleFetcher.java index 85fa96a1c..d10481216 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SimpleFetcher.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SimpleFetcher.java @@ -33,9 +33,9 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.igtools.publisher.SimpleFetcher.FetchedFileSorter; +import org.hl7.fhir.r5.context.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService.LogCategory; import org.hl7.fhir.r5.context.IWorkerContext; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService.LogCategory; import org.hl7.fhir.r5.elementmodel.FmlParser; import org.hl7.fhir.r5.elementmodel.ValidatedFragment; import org.hl7.fhir.r5.formats.FormatUtilities; diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SpecMapManager.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SpecMapManager.java index e16a41e4a..4dae3ea74 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SpecMapManager.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/SpecMapManager.java @@ -208,6 +208,8 @@ public String getPath(String url, String def, String rt, String id) throws FHIRE } case Vsac: if (url.contains("cts.nlm.nih.gov")) { return url.replace("http://cts.nlm.nih.gov/fhir/ValueSet/", "https://vsac.nlm.nih.gov/valueset/")+"/expansion"; + } else { + return url; } case Examples: return str(spec, "webUrl")+"/"+rt.toLowerCase()+"-"+id.toLowerCase()+".html"; diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/ImposesComparator.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/ImposesComparator.java new file mode 100644 index 000000000..789a62383 --- /dev/null +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/ImposesComparator.java @@ -0,0 +1,359 @@ +package org.hl7.fhir.igtools.publisher.comparators; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50; +import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_50; +import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.igtools.publisher.IGKnowledgeProvider; +import org.hl7.fhir.igtools.publisher.PastProcessHackerUtilities; +import org.hl7.fhir.igtools.publisher.SpecMapManager; +import org.hl7.fhir.igtools.publisher.loaders.PublisherLoader; +import org.hl7.fhir.r5.comparison.ComparisonRenderer; +import org.hl7.fhir.r5.comparison.ComparisonSession; +import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider; +import org.hl7.fhir.r5.context.ILoggingService; +import org.hl7.fhir.r5.context.SimpleWorkerContext; +import org.hl7.fhir.r5.model.CanonicalResource; +import org.hl7.fhir.r5.model.CapabilityStatement; +import org.hl7.fhir.r5.model.ImplementationGuide; +import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.model.StructureDefinition; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.VersionUtilities; +import org.hl7.fhir.utilities.npm.BasePackageCacheManager; +import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager; +import org.hl7.fhir.utilities.npm.NpmPackage; +import org.hl7.fhir.utilities.npm.PackageList; +import org.hl7.fhir.utilities.npm.PackageList.PackageListEntry; + + +public class ImposesComparator { + + public class ComparisonPair { + CanonicalResource left; + CanonicalResource right; + + public ComparisonPair(CanonicalResource left, CanonicalResource right) { + super(); + this.left = left; + this.right = right; + } + + public CanonicalResource getLeft() { + return left; + } + + public CanonicalResource getRight() { + return right; + } + + public String getUrl() { + return left != null ? left.getUrl() : right.getUrl(); + } + } + + private class VersionInstance { + private String version; + private SimpleWorkerContext context; + private List resources = new ArrayList<>(); + private String errMsg; + private ProfileKnowledgeProvider pkp; + + public VersionInstance(String version) { + super(); + this.version = version; + } + } + + private SimpleWorkerContext context; + private String dstDir; + private List comparisons = new ArrayList<>(); + private ProfileKnowledgeProvider newpkp; + private String errMsg; + private String pid; + private List versionList = new ArrayList<>(); + private ILoggingService logger; + private List resources; + private String lastName; + private String lastUrl; + + public ImposesComparator(SimpleWorkerContext context, String rootDir, String dstDir, ProfileKnowledgeProvider pkp, ILoggingService logger, List versions) { + super(); + + this.context = context; + this.dstDir = dstDir; + this.newpkp = pkp; + this.logger = logger; + try { + processVersions(versions, rootDir); + } catch (Exception e) { + errMsg = "Unable to find version history at http://hl7.org/fhir/uv/ipa/ ("+e.getMessage()+")"; + } + } + + private void processVersions(List versions, String rootDir) throws IOException { + String canonical = "http://hl7.org/fhir/uv/ipa"; + List publishedVersions = null; + for (String v : versions) { + if (publishedVersions == null) { + publishedVersions = fetchVersionHistory(canonical); + } + if (Utilities.existsInList(v, "{last}", "{current}")) { + String last = null; + String major = null; + for (PackageListEntry o : publishedVersions) { + if (last == null) { + last = o.version(); + lastUrl = o.path(); + lastName = o.version(); + } + if (o.current()) { + major = o.version(); + lastUrl = o.path(); + lastName = o.sequence(); + } + } + if ("{last}".equals(v)) { + if (last == null) { + throw new FHIRException("no {last} version found in package-list.json"); + } else { + versionList.add(new VersionInstance(last)); + } + } + if ("{current}".equals(v)) { + if(last == null) { + throw new FHIRException("no {current} version found in package-list.json"); + } else { + versionList.add(new VersionInstance(major)); + } + } + } else { + versionList.add(new VersionInstance(v)); + } + } + } + + private List fetchVersionHistory(String canonical) { + try { + canonical = PastProcessHackerUtilities.actualUrl(canonical); // hack for old publishing process problems + String ppl = Utilities.pathURL(canonical, "package-list.json"); + logger.logMessage("Fetch "+ppl+" for version check"); + PackageList pl = PackageList.fromUrl(ppl); + if (!canonical.equals(pl.canonical())) { + throw new FHIRException("Mismatch canonical URL"); + } else if (!pl.hasPid()) { + throw new FHIRException("Package ID not specified in package-list.json"); + } else { + pid = pl.pid(); + return pl.versions(); + } + } catch (Exception e) { + throw new FHIRException("Problem #1 with package-list.json at "+canonical+": "+e.getMessage(), e); + } + } + + + public void startChecks(ImplementationGuide ig) { + if (errMsg == null && pid != null) { + resources = new ArrayList<>(); + for (VersionInstance vi : versionList) { + String filename = ""; + try { + vi.resources = new ArrayList<>(); + BasePackageCacheManager pcm = new FilesystemPackageCacheManager(org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.FilesystemPackageCacheMode.USER); + NpmPackage current = pcm.loadPackage(pid, vi.version); + for (String id : current.listResources("StructureDefinition", "ValueSet", "CodeSystem", "CapabilityStatement")) { + filename = id; + CanonicalResource curr = (CanonicalResource) loadResourceFromPackage(current, id, current.fhirVersion()); + curr.setWebPath(Utilities.pathURL(current.getWebLocation(), curr.fhirType()+"-"+curr.getId()+".html")); // to do - actually refactor to use the correct algorithm + if (curr != null) { + vi.resources.add(curr); + } + } + NpmPackage core = pcm.loadPackage(VersionUtilities.packageForVersion(current.fhirVersion()), VersionUtilities.getCurrentVersion(current.fhirVersion())); + vi.context = new SimpleWorkerContext.SimpleWorkerContextBuilder().withTerminologyCachePath(Utilities.path(context.getTxCache().getFolder(), vi.version)).fromPackage(core, new PublisherLoader(core, SpecMapManager.fromPackage(core), core.getWebLocation(), null).makeLoader(), true); + //vi.context.initTS(); + vi.context.connectToTSServer(context.getTxClient(), null); + vi.context.setExpansionProfile(context.getExpansionParameters()); + vi.context.setUcumService(context.getUcumService()); + vi.context.setLocale(context.getLocale()); + vi.context.setLogger(context.getLogger()); + vi.context.loadFromPackageAndDependencies(current, new PublisherLoader(current, SpecMapManager.fromPackage(current), current.getWebLocation(), null).makeLoader(), pcm); + vi.pkp = new IGKnowledgeProvider(vi.context, current.getWebLocation(), current.canonical(), null, null, false, null, null, null, null); + } catch (Exception e) { + vi.errMsg = "Unable to find load package "+pid+"#"+vi.version+" ("+e.getMessage()+" on file "+filename+")"; + e.printStackTrace(); + } + } + } + } + + private Resource loadResourceFromPackage(NpmPackage uscore, String filename, String version) throws FHIRException, IOException { + InputStream s = uscore.loadResource(filename); + if (VersionUtilities.isR3Ver(version)) { + return VersionConvertorFactory_30_50.convertResource(new org.hl7.fhir.dstu3.formats.JsonParser().parse(s), new BaseAdvisor_30_50(false)); + } else if (VersionUtilities.isR4Ver(version)) { + return VersionConvertorFactory_40_50.convertResource(new org.hl7.fhir.r4.formats.JsonParser().parse(s)); + } else if (VersionUtilities.isR5Plus(version)) { + return new org.hl7.fhir.r5.formats.JsonParser().parse(s); + } else { + return null; + } + } + + public void finishChecks() throws IOException { + if (errMsg == null && pid != null) { + for (VersionInstance vi : versionList) { + Set set = new HashSet<>(); + for (CanonicalResource rr : resources) { + CanonicalResource rl = findByType(rr, vi.resources); + if (rl != null) { + comparisons.add(new ComparisonPair(rl, rr)); + } + } + + try { + ComparisonSession session = new ComparisonSession(vi.context, context, "Comparison of v"+vi.version+" with this version", vi.pkp, newpkp); + // session.setDebug(true); + for (ComparisonPair c : comparisons) { +// System.out.println("Version Comparison: compare "+vi.version+" to current for "+c.getUrl()); + session.compare(c.left, c.right); + } + Utilities.createDirectory(Utilities.path(dstDir, "ipa-comparison-v"+vi.version)); + ComparisonRenderer cr = new ComparisonRenderer(vi.context, context, Utilities.path(dstDir, "ipa-comparison-v"+vi.version), session); + cr.getTemplates().put("CodeSystem", new String(context.getBinaryForKey("template-comparison-CodeSystem.html"))); + cr.getTemplates().put("ValueSet", new String(context.getBinaryForKey("template-comparison-ValueSet.html"))); + cr.getTemplates().put("Profile", new String(context.getBinaryForKey("template-comparison-Profile.html"))); + cr.getTemplates().put("Profile-Union", new String(context.getBinaryForKey("template-comparison-Profile-Union.html"))); + cr.getTemplates().put("Profile-Intersection", new String(context.getBinaryForKey("template-comparison-Profile-Intersection.html"))); + cr.getTemplates().put("CapabilityStatement", new String(context.getBinaryForKey("template-comparison-CapabilityStatement.html"))); + cr.getTemplates().put("Index", new String(context.getBinaryForKey("template-comparison-index.html"))); + cr.render("Version "+vi.version, "Current Build"); + } catch (Throwable e) { + errMsg = "Current Version Comparison failed: "+e.getMessage(); + e.printStackTrace(); + } + } + } + } + +// +// private void buildindexPage(String path) throws IOException { +// StringBuilder b = new StringBuilder(); +// b.append(""); +// processResources("CodeSystem", b); +// processResources("ValueSet", b); +// processResources("StructureDefinition", b); +// b.append("
\r\n"); +// TextFile.stringToFile(b.toString(), path); +// } +// +// +// private void processResources(String rt, StringBuilder b) { +// List urls = new ArrayList<>(); +// for (CanonicalResource cr : vi.resources) { +// if (cr.fhirType().equals(rt)) { +// urls.add(cr.getUrl()); +// } +// } +// for (CanonicalResource cr : resources) { +// if (cr.fhirType().equals(rt)) { +// if (!urls.contains(cr.getUrl())) { +// urls.add(cr.getUrl()); +// } +// } +// } +// Collections.sort(urls); +// if (!urls.isEmpty()) { +// b.append(""+Utilities.pluralize(rt, urls.size())+"\r\n"); +// for (String url : urls) { +// CanonicalResource crL = findByUrl(url, vi.resources); +// CanonicalResource crR = findByUrl(url, resources); +// b.append(""); +// b.append(""+url+""); +// if (crL == null) { +// b.append("Added"); +// } else if (crR == null) { +// b.append("Removed"); +// } else { +// b.append("Changed"); +// } +// b.append(""); +// } +// } +// } + + + private CanonicalResource findByType(CanonicalResource rr, List list) { + if (rr instanceof StructureDefinition) { + String t = ((StructureDefinition) rr).getType(); + for (CanonicalResource r : list) { + if (r instanceof StructureDefinition) { + String tr = ((StructureDefinition) r).getType(); + if (tr.equals(t)) { + return r; + } + } + } + } + if (rr instanceof CapabilityStatement) { + String t = ((CapabilityStatement) rr).getRestFirstRep().getModeElement().asStringValue(); + for (CanonicalResource r : list) { + if (r instanceof CapabilityStatement) { + String tr = ((CapabilityStatement) r).getRestFirstRep().getModeElement().asStringValue(); + if (tr.equals(t)) { + return r; + } + } + } + } + return null; + } + + + public void addOtherFiles(Set otherFilesRun, String outputDir) throws IOException { + for (VersionInstance vi : versionList) { + otherFilesRun.add(Utilities.path(outputDir, "ipa-comparison-v"+vi.version)); + } + } + + public String checkHtml() { + if (errMsg != null) { + return "Unable to compare with previous version: "+errMsg; + } else { + StringBuilder b = new StringBuilder(); + boolean first = true; + for (VersionInstance vi : versionList) { + if(first) first = false; else b.append("
"); + b.append("Comparison with version "+vi.version+""); + } + return b.toString(); + } + } + + public void check(CanonicalResource resource) { + if (errMsg == null && pid != null) { + resources.add(resource); + } + } + + public boolean hasLast() { + return lastUrl != null; + } + + public String getLastName() { + return lastName; + } + + public String getLastUrl() { + return lastUrl; + } + +} diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/IpaComparator.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/IpaComparator.java index ed4a8cc4c..3c2acb2f4 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/IpaComparator.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/IpaComparator.java @@ -18,7 +18,7 @@ import org.hl7.fhir.r5.comparison.ComparisonRenderer; import org.hl7.fhir.r5.comparison.ComparisonSession; import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.r5.context.SimpleWorkerContext; import org.hl7.fhir.r5.model.CanonicalResource; import org.hl7.fhir.r5.model.CapabilityStatement; @@ -231,6 +231,8 @@ public void finishChecks() throws IOException { cr.getTemplates().put("CodeSystem", new String(context.getBinaryForKey("template-comparison-CodeSystem.html"))); cr.getTemplates().put("ValueSet", new String(context.getBinaryForKey("template-comparison-ValueSet.html"))); cr.getTemplates().put("Profile", new String(context.getBinaryForKey("template-comparison-Profile.html"))); + cr.getTemplates().put("Profile-Union", new String(context.getBinaryForKey("template-comparison-Profile-Union.html"))); + cr.getTemplates().put("Profile-Intersection", new String(context.getBinaryForKey("template-comparison-Profile-Intersection.html"))); cr.getTemplates().put("CapabilityStatement", new String(context.getBinaryForKey("template-comparison-CapabilityStatement.html"))); cr.getTemplates().put("Index", new String(context.getBinaryForKey("template-comparison-index.html"))); cr.render("Version "+vi.version, "Current Build"); diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/IpsComparator.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/IpsComparator.java new file mode 100644 index 000000000..0732c5048 --- /dev/null +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/IpsComparator.java @@ -0,0 +1,359 @@ +package org.hl7.fhir.igtools.publisher.comparators; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50; +import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_50; +import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.igtools.publisher.IGKnowledgeProvider; +import org.hl7.fhir.igtools.publisher.PastProcessHackerUtilities; +import org.hl7.fhir.igtools.publisher.SpecMapManager; +import org.hl7.fhir.igtools.publisher.loaders.PublisherLoader; +import org.hl7.fhir.r5.comparison.ComparisonRenderer; +import org.hl7.fhir.r5.comparison.ComparisonSession; +import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider; +import org.hl7.fhir.r5.context.ILoggingService; +import org.hl7.fhir.r5.context.SimpleWorkerContext; +import org.hl7.fhir.r5.model.CanonicalResource; +import org.hl7.fhir.r5.model.CapabilityStatement; +import org.hl7.fhir.r5.model.ImplementationGuide; +import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.model.StructureDefinition; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.VersionUtilities; +import org.hl7.fhir.utilities.npm.BasePackageCacheManager; +import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager; +import org.hl7.fhir.utilities.npm.NpmPackage; +import org.hl7.fhir.utilities.npm.PackageList; +import org.hl7.fhir.utilities.npm.PackageList.PackageListEntry; + + +public class IpsComparator { + + public class ComparisonPair { + CanonicalResource left; + CanonicalResource right; + + public ComparisonPair(CanonicalResource left, CanonicalResource right) { + super(); + this.left = left; + this.right = right; + } + + public CanonicalResource getLeft() { + return left; + } + + public CanonicalResource getRight() { + return right; + } + + public String getUrl() { + return left != null ? left.getUrl() : right.getUrl(); + } + } + + private class VersionInstance { + private String version; + private SimpleWorkerContext context; + private List resources = new ArrayList<>(); + private String errMsg; + private ProfileKnowledgeProvider pkp; + + public VersionInstance(String version) { + super(); + this.version = version; + } + } + + private SimpleWorkerContext context; + private String dstDir; + private List comparisons = new ArrayList<>(); + private ProfileKnowledgeProvider newpkp; + private String errMsg; + private String pid; + private List versionList = new ArrayList<>(); + private ILoggingService logger; + private List resources; + private String lastName; + private String lastUrl; + + public IpsComparator(SimpleWorkerContext context, String rootDir, String dstDir, ProfileKnowledgeProvider pkp, ILoggingService logger, List versions) { + super(); + + this.context = context; + this.dstDir = dstDir; + this.newpkp = pkp; + this.logger = logger; + try { + processVersions(versions, rootDir); + } catch (Exception e) { + errMsg = "Unable to find version history at http://hl7.org/fhir/uv/ips/ ("+e.getMessage()+")"; + } + } + + private void processVersions(List versions, String rootDir) throws IOException { + String canonical = "http://hl7.org/fhir/uv/ips"; + List publishedVersions = null; + for (String v : versions) { + if (publishedVersions == null) { + publishedVersions = fetchVersionHistory(canonical); + } + if (Utilities.existsInList(v, "{last}", "{current}")) { + String last = null; + String major = null; + for (PackageListEntry o : publishedVersions) { + if (last == null) { + last = o.version(); + lastUrl = o.path(); + lastName = o.version(); + } + if (o.current()) { + major = o.version(); + lastUrl = o.path(); + lastName = o.sequence(); + } + } + if ("{last}".equals(v)) { + if (last == null) { + throw new FHIRException("no {last} version found in package-list.json"); + } else { + versionList.add(new VersionInstance(last)); + } + } + if ("{current}".equals(v)) { + if(last == null) { + throw new FHIRException("no {current} version found in package-list.json"); + } else { + versionList.add(new VersionInstance(major)); + } + } + } else { + versionList.add(new VersionInstance(v)); + } + } + } + + private List fetchVersionHistory(String canonical) { + try { + canonical = PastProcessHackerUtilities.actualUrl(canonical); // hack for old publishing process problems + String ppl = Utilities.pathURL(canonical, "package-list.json"); + logger.logMessage("Fetch "+ppl+" for version check"); + PackageList pl = PackageList.fromUrl(ppl); + if (!canonical.equals(pl.canonical())) { + throw new FHIRException("Mismatch canonical URL"); + } else if (!pl.hasPid()) { + throw new FHIRException("Package ID not specified in package-list.json"); + } else { + pid = pl.pid(); + return pl.versions(); + } + } catch (Exception e) { + throw new FHIRException("Problem #1 with package-list.json at "+canonical+": "+e.getMessage(), e); + } + } + + + public void startChecks(ImplementationGuide ig) { + if (errMsg == null && pid != null) { + resources = new ArrayList<>(); + for (VersionInstance vi : versionList) { + String filename = ""; + try { + vi.resources = new ArrayList<>(); + BasePackageCacheManager pcm = new FilesystemPackageCacheManager(org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.FilesystemPackageCacheMode.USER); + NpmPackage current = pcm.loadPackage(pid, vi.version); + for (String id : current.listResources("StructureDefinition", "ValueSet", "CodeSystem", "CapabilityStatement")) { + filename = id; + CanonicalResource curr = (CanonicalResource) loadResourceFromPackage(current, id, current.fhirVersion()); + curr.setWebPath(Utilities.pathURL(current.getWebLocation(), curr.fhirType()+"-"+curr.getId()+".html")); // to do - actually refactor to use the correct algorithm + if (curr != null) { + vi.resources.add(curr); + } + } + NpmPackage core = pcm.loadPackage(VersionUtilities.packageForVersion(current.fhirVersion()), VersionUtilities.getCurrentVersion(current.fhirVersion())); + vi.context = new SimpleWorkerContext.SimpleWorkerContextBuilder().withTerminologyCachePath(Utilities.path(context.getTxCache().getFolder(), vi.version)).fromPackage(core, new PublisherLoader(core, SpecMapManager.fromPackage(core), core.getWebLocation(), null).makeLoader(), true); + //vi.context.initTS(); + vi.context.connectToTSServer(context.getTxClient(), null); + vi.context.setExpansionProfile(context.getExpansionParameters()); + vi.context.setUcumService(context.getUcumService()); + vi.context.setLocale(context.getLocale()); + vi.context.setLogger(context.getLogger()); + vi.context.loadFromPackageAndDependencies(current, new PublisherLoader(current, SpecMapManager.fromPackage(current), current.getWebLocation(), null).makeLoader(), pcm); + vi.pkp = new IGKnowledgeProvider(vi.context, current.getWebLocation(), current.canonical(), null, null, false, null, null, null, null); + } catch (Exception e) { + vi.errMsg = "Unable to find load package "+pid+"#"+vi.version+" ("+e.getMessage()+" on file "+filename+")"; + e.printStackTrace(); + } + } + } + } + + private Resource loadResourceFromPackage(NpmPackage uscore, String filename, String version) throws FHIRException, IOException { + InputStream s = uscore.loadResource(filename); + if (VersionUtilities.isR3Ver(version)) { + return VersionConvertorFactory_30_50.convertResource(new org.hl7.fhir.dstu3.formats.JsonParser().parse(s), new BaseAdvisor_30_50(false)); + } else if (VersionUtilities.isR4Ver(version)) { + return VersionConvertorFactory_40_50.convertResource(new org.hl7.fhir.r4.formats.JsonParser().parse(s)); + } else if (VersionUtilities.isR5Plus(version)) { + return new org.hl7.fhir.r5.formats.JsonParser().parse(s); + } else { + return null; + } + } + + public void finishChecks() throws IOException { + if (errMsg == null && pid != null) { + for (VersionInstance vi : versionList) { + Set set = new HashSet<>(); + for (CanonicalResource rr : resources) { + CanonicalResource rl = findByType(rr, vi.resources); + if (rl != null) { + comparisons.add(new ComparisonPair(rl, rr)); + } + } + + try { + ComparisonSession session = new ComparisonSession(vi.context, context, "Comparison of v"+vi.version+" with this version", vi.pkp, newpkp); + // session.setDebug(true); + for (ComparisonPair c : comparisons) { +// System.out.println("Version Comparison: compare "+vi.version+" to current for "+c.getUrl()); + session.compare(c.left, c.right); + } + Utilities.createDirectory(Utilities.path(dstDir, "ips-comparison-v"+vi.version)); + ComparisonRenderer cr = new ComparisonRenderer(vi.context, context, Utilities.path(dstDir, "ips-comparison-v"+vi.version), session); + cr.getTemplates().put("CodeSystem", new String(context.getBinaryForKey("template-comparison-CodeSystem.html"))); + cr.getTemplates().put("ValueSet", new String(context.getBinaryForKey("template-comparison-ValueSet.html"))); + cr.getTemplates().put("Profile", new String(context.getBinaryForKey("template-comparison-Profile.html"))); + cr.getTemplates().put("Profile-Union", new String(context.getBinaryForKey("template-comparison-Profile-Union.html"))); + cr.getTemplates().put("Profile-Intersection", new String(context.getBinaryForKey("template-comparison-Profile-Intersection.html"))); + cr.getTemplates().put("CapabilityStatement", new String(context.getBinaryForKey("template-comparison-CapabilityStatement.html"))); + cr.getTemplates().put("Index", new String(context.getBinaryForKey("template-comparison-index.html"))); + cr.render("Version "+vi.version, "Current Build"); + } catch (Throwable e) { + errMsg = "Current Version Comparison failed: "+e.getMessage(); + e.printStackTrace(); + } + } + } + } + +// +// private void buildindexPage(String path) throws IOException { +// StringBuilder b = new StringBuilder(); +// b.append(""); +// processResources("CodeSystem", b); +// processResources("ValueSet", b); +// processResources("StructureDefinition", b); +// b.append("
\r\n"); +// TextFile.stringToFile(b.toString(), path); +// } +// +// +// private void processResources(String rt, StringBuilder b) { +// List urls = new ArrayList<>(); +// for (CanonicalResource cr : vi.resources) { +// if (cr.fhirType().equals(rt)) { +// urls.add(cr.getUrl()); +// } +// } +// for (CanonicalResource cr : resources) { +// if (cr.fhirType().equals(rt)) { +// if (!urls.contains(cr.getUrl())) { +// urls.add(cr.getUrl()); +// } +// } +// } +// Collections.sort(urls); +// if (!urls.isEmpty()) { +// b.append(""+Utilities.pluralize(rt, urls.size())+"\r\n"); +// for (String url : urls) { +// CanonicalResource crL = findByUrl(url, vi.resources); +// CanonicalResource crR = findByUrl(url, resources); +// b.append(""); +// b.append(""+url+""); +// if (crL == null) { +// b.append("Added"); +// } else if (crR == null) { +// b.append("Removed"); +// } else { +// b.append("Changed"); +// } +// b.append(""); +// } +// } +// } + + + private CanonicalResource findByType(CanonicalResource rr, List list) { + if (rr instanceof StructureDefinition) { + String t = ((StructureDefinition) rr).getType(); + for (CanonicalResource r : list) { + if (r instanceof StructureDefinition) { + String tr = ((StructureDefinition) r).getType(); + if (tr.equals(t)) { + return r; + } + } + } + } + if (rr instanceof CapabilityStatement) { + String t = ((CapabilityStatement) rr).getRestFirstRep().getModeElement().asStringValue(); + for (CanonicalResource r : list) { + if (r instanceof CapabilityStatement) { + String tr = ((CapabilityStatement) r).getRestFirstRep().getModeElement().asStringValue(); + if (tr.equals(t)) { + return r; + } + } + } + } + return null; + } + + + public void addOtherFiles(Set otherFilesRun, String outputDir) throws IOException { + for (VersionInstance vi : versionList) { + otherFilesRun.add(Utilities.path(outputDir, "ips-comparison-v"+vi.version)); + } + } + + public String checkHtml() { + if (errMsg != null) { + return "Unable to compare with previous version: "+errMsg; + } else { + StringBuilder b = new StringBuilder(); + boolean first = true; + for (VersionInstance vi : versionList) { + if(first) first = false; else b.append("
"); + b.append("Comparison with version "+vi.version+""); + } + return b.toString(); + } + } + + public void check(CanonicalResource resource) { + if (errMsg == null && pid != null) { + resources.add(resource); + } + } + + public boolean hasLast() { + return lastUrl != null; + } + + public String getLastName() { + return lastName; + } + + public String getLastUrl() { + return lastUrl; + } + +} diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/PreviousVersionComparator.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/PreviousVersionComparator.java index de9d04986..57cb09c1c 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/PreviousVersionComparator.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/comparators/PreviousVersionComparator.java @@ -20,7 +20,7 @@ import org.hl7.fhir.r5.comparison.ComparisonRenderer; import org.hl7.fhir.r5.comparison.ComparisonSession; import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.r5.context.SimpleWorkerContext; import org.hl7.fhir.r5.model.CanonicalResource; import org.hl7.fhir.r5.model.ImplementationGuide; @@ -261,6 +261,8 @@ public void finishChecks() throws IOException { cr.getTemplates().put("CodeSystem", new String(context.getBinaryForKey("template-comparison-CodeSystem.html"))); cr.getTemplates().put("ValueSet", new String(context.getBinaryForKey("template-comparison-ValueSet.html"))); cr.getTemplates().put("Profile", new String(context.getBinaryForKey("template-comparison-Profile.html"))); + cr.getTemplates().put("Profile-Union", new String(context.getBinaryForKey("template-comparison-Profile-Union.html"))); + cr.getTemplates().put("Profile-Intersection", new String(context.getBinaryForKey("template-comparison-Profile-Intersection.html"))); cr.getTemplates().put("Index", new String(context.getBinaryForKey("template-comparison-index.html"))); cr.getTemplates().put("CapabilityStatement", new String(context.getBinaryForKey("template-comparison-CapabilityStatement.html"))); cr.render("Version "+vi.version, "Current Build"); diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/realm/USRealmBusinessRules.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/realm/USRealmBusinessRules.java index d9d796899..61205409c 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/realm/USRealmBusinessRules.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/realm/USRealmBusinessRules.java @@ -235,6 +235,8 @@ public void finishChecks() throws DefinitionException, FHIRFormatError, IOExcept cr.getTemplates().put("CodeSystem", new String(context.getBinaryForKey("template-comparison-CodeSystem.html"))); cr.getTemplates().put("ValueSet", new String(context.getBinaryForKey("template-comparison-ValueSet.html"))); cr.getTemplates().put("Profile", new String(context.getBinaryForKey("template-comparison-Profile.html"))); + cr.getTemplates().put("Profile-Union", new String(context.getBinaryForKey("template-comparison-Profile-Union.html"))); + cr.getTemplates().put("Profile-Intersection", new String(context.getBinaryForKey("template-comparison-Profile-Intersection.html"))); cr.getTemplates().put("CapabilityStatement", new String(context.getBinaryForKey("template-comparison-CapabilityStatement.html"))); cr.getTemplates().put("Index", new String(context.getBinaryForKey("template-comparison-index.html"))); cr.setPreamble(renderProblems()); diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/DependencyRenderer.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/DependencyRenderer.java index 11f95dd42..2cf969ef2 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/DependencyRenderer.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/DependencyRenderer.java @@ -121,7 +121,7 @@ public DependencyRenderer(BasePackageCacheManager pcm, String dstFolder, String this.mdEngine = mdEngine; } - public String render(ImplementationGuide ig, boolean QA, boolean details) throws FHIRException, IOException { + public String render(ImplementationGuide ig, boolean QA, boolean details, boolean first) throws FHIRException, IOException { boolean hasDesc = false; for (ImplementationGuideDependsOnComponent d : ig.getDependsOn()) { hasDesc = hasDesc || d.hasExtension(ToolingExtensions.EXT_IGDEP_COMMENT); @@ -148,7 +148,7 @@ public String render(ImplementationGuide ig, boolean QA, boolean details) throws } if (QA) { - } else { + } else if (first) { checkGlobals(ig, null); } // create the table diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/IPStatementsRenderer.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/IPStatementsRenderer.java index 156aac332..bb448a109 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/IPStatementsRenderer.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/IPStatementsRenderer.java @@ -1,5 +1,6 @@ package org.hl7.fhir.igtools.renderers; +import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -25,6 +26,9 @@ import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent; import org.hl7.fhir.utilities.MarkDownProcessor; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.xhtml.XhtmlComposer; +import org.hl7.fhir.utilities.xhtml.XhtmlNode; +import org.hl7.fhir.utilities.xhtml.XhtmlParser; public class IPStatementsRenderer { @@ -74,7 +78,7 @@ private void seeSystem(String url, FetchedResource source) { } - public String genIpStatements(FetchedResource r, boolean example) throws FHIRException { + public String genIpStatements(FetchedResource r, boolean example) throws FHIRException, IOException { listAllCodeSystems(r, r.getElement()); if (r.getResource() != null) { listAllCodeSystems(r, r.getResource()); @@ -101,7 +105,7 @@ private String describeResource(Element element) { } } - public String genIpStatements(List files) throws FHIRException { + public String genIpStatements(List files) throws FHIRException, IOException { for (FetchedFile f : files) { for (FetchedResource r : f.getResources()) { listAllCodeSystems(r, r.getElement()); @@ -114,7 +118,7 @@ public String genIpStatements(List files) throws FHIRException { return render("publication"); } - private String render(String title) { + private String render(String title) throws IOException { for (SystemUsage su : systems.values()) { String stmt = getCopyRightStatement(su); if (stmt != null) { @@ -205,7 +209,7 @@ private boolean isHL7Ig() { return packageId.startsWith("hl7."); } - private String getCopyRightStatement(SystemUsage system) { + private String getCopyRightStatement(SystemUsage system) throws IOException { if ("http://snomed.info/sct".equals(system.system)) { system.desc = "SNOMED Clinical Terms® (SNOMED CT®)"; return "This material contains content that is copyright of SNOMED International. Implementers of these specifications must have the appropriate SNOMED CT Affiliate license - "+ @@ -219,7 +223,12 @@ private String getCopyRightStatement(SystemUsage system) { if (system.cs != null) { system.desc = system.cs.present(); if (system.cs.hasCopyright()) { - return Utilities.stripPara(markdownEngine.process(system.cs.getCopyright(), "Copyright")); + List xl = new XhtmlParser().parseMDFragmentStripParas(markdownEngine.process(system.cs.getCopyright(), "Copyright")); + if (xl.size() == 0) { + return "?"; + } else { + return new XhtmlComposer(false, true).setAutoLinks(true).compose(xl); + } } } return null; diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/StructureDefinitionRenderer.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/StructureDefinitionRenderer.java index 26684da73..53abd2898 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/StructureDefinitionRenderer.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/StructureDefinitionRenderer.java @@ -2313,8 +2313,6 @@ private void genElement(HierarchicalTableGenerator gen, List rows, PEDefini } } } - - } } @@ -2351,4 +2349,8 @@ private String tail(String path) { else return path; } + + public String compareImposes(StructureDefinition sdi) { + return "todo"; + } } diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/ValidationPresenter.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/ValidationPresenter.java index cbbe7da1e..9332626ba 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/ValidationPresenter.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/ValidationPresenter.java @@ -43,6 +43,7 @@ import org.hl7.fhir.igtools.publisher.SuppressedMessageInformation; import org.hl7.fhir.igtools.publisher.SuppressedMessageInformation.SuppressedMessage; import org.hl7.fhir.igtools.publisher.comparators.IpaComparator; +import org.hl7.fhir.igtools.publisher.comparators.IpsComparator; import org.hl7.fhir.igtools.publisher.comparators.PreviousVersionComparator; import org.hl7.fhir.igtools.publisher.realm.RealmBusinessRules; import org.hl7.fhir.r5.context.IWorkerContext; @@ -280,12 +281,13 @@ public ValidationMessage getVm() { private String dependencies; private DependentIGFinder dependentIgs; private IpaComparator ipaComparator; + private IpsComparator ipsComparator; private List modifierExtensions; private String globalCheck; private String draftDependencies; public ValidationPresenter(String statedVersion, String igVersion, IGKnowledgeProvider provider, IGKnowledgeProvider altProvider, String root, String packageId, String altPackageId, - String toolsVersion, String currentToolsVersion, RealmBusinessRules realm, PreviousVersionComparator previousVersionComparator, IpaComparator ipaComparator, + String toolsVersion, String currentToolsVersion, RealmBusinessRules realm, PreviousVersionComparator previousVersionComparator, IpaComparator ipaComparator, IpsComparator ipsComparator, String dependencies, String csAnalysis, String pubReqCheck, String globalCheck, String copyrightYear, IWorkerContext context, Set r5Extensions, List modifierExtensions, String draftDependencies, List noNarratives, List noValidation, boolean noValidate, boolean noGenerate, DependentIGFinder dependentIgs) { @@ -302,6 +304,7 @@ public ValidationPresenter(String statedVersion, String igVersion, IGKnowledgePr this.currentToolsVersion = currentToolsVersion; this.previousVersionComparator = previousVersionComparator; this.ipaComparator = ipaComparator; + this.ipsComparator = ipsComparator; this.dependencies = dependencies; this.dependentIgs = dependentIgs; this.csAnalysis = csAnalysis; @@ -702,6 +705,7 @@ public static List filterMessages(List mes " Modifier Extensions:$modifiers$\r\n"+ " Previous Version Comparison: $previousVersion$\r\n"+ " IPA Comparison: $ipaComparison$\r\n"+ + " IPS Comparison: $ipsComparison$\r\n"+ "$noNarrative$"+ "$noValidation$"+ " Summary: errors = $err$, warn = $warn$, info = $info$, broken links = $links$\r\n"+ @@ -834,6 +838,7 @@ private String genHeader(String title, int err, int warn, int info, int links, i t.add("otherFilePath", allIssues ? "qa.min.html" : "qa.html"); t.add("previousVersion", previousVersionComparator.checkHtml()); t.add("ipaComparison", ipaComparator == null ? "n/a" : ipaComparator.checkHtml()); + t.add("ipsComparison", ipsComparator == null ? "n/a" : ipsComparator.checkHtml()); t.add("noNarrative", genResourceList(noNarratives, "Narratives Suppressed")); t.add("noValidation", genResourceList(noValidation, "Validation Suppressed")); if (noGenerate || noValidate) { @@ -924,6 +929,7 @@ private String genHeaderTxt(String title, int err, int warn, int info) { t.add("csAnalysis", csAnalysis); t.add("previousVersion", previousVersionComparator.checkHtml()); t.add("ipaComparison", ipaComparator == null ? "n/a" : ipaComparator.checkHtml()); + t.add("ipsComparison", ipsComparator == null ? "n/a" : ipsComparator.checkHtml()); if (noGenerate || noValidate) { if (noGenerate && noValidate) { t.add("warning", "Warning: This IG was generated with both validation and HTML generation off. Many kinds of errors will not be reported.\r\n"); diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/templates/TemplateManager.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/templates/TemplateManager.java index e9f080603..d178b7d1f 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/templates/TemplateManager.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/templates/TemplateManager.java @@ -33,7 +33,7 @@ import java.util.Set; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.utilities.TextFile; import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.json.model.JsonArray; diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/ui/IGPublisherFrame.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/ui/IGPublisherFrame.java index 74afd2223..72a84c709 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/ui/IGPublisherFrame.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/ui/IGPublisherFrame.java @@ -50,7 +50,7 @@ import org.hl7.fhir.igtools.publisher.Publisher; import org.hl7.fhir.igtools.publisher.Publisher.CacheOption; -import org.hl7.fhir.r5.context.IWorkerContext.ILoggingService; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.utilities.IniFile; import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.settings.FhirSettings; diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/IGReleaseUpdater.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/IGReleaseUpdater.java index 22232ef2e..998b961ff 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/IGReleaseUpdater.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/IGReleaseUpdater.java @@ -529,7 +529,7 @@ private void checkFileExists(String vf, String name) throws IOException { private String genFragment(JsonObject ig, JsonObject version, JsonObject root, String canonical, boolean currentPublication, boolean isCore) { String p1 = ig.asString("title")+" (v"+version.asString("version")+": "+state(ig, version)+")"; if (!isCore) { - p1 = p1 + (version.has("fhirversion") ? " based on FHIR "+fhirRef(version.asString("fhirversion"))+"" : "")+". "; + p1 = p1 + (version.has("fhirversion") ? " based on FHIR (HL7® FHIR® Standard) "+fhirRef(version.asString("fhirversion"))+"" : "")+". "; } else { p1 = p1 + ". "; } diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/PublishBoxStatementGenerator.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/PublishBoxStatementGenerator.java index 344350ab7..964404d11 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/PublishBoxStatementGenerator.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/PublishBoxStatementGenerator.java @@ -21,7 +21,7 @@ public class PublishBoxStatementGenerator { public static String genFragment(PackageList ig, PackageListEntry version, PackageListEntry root, String canonical, boolean currentPublication, boolean isCore) { String p1 = ig.title()+" (v"+version.version()+": "+state(ig, version)+")"; if (!isCore) { - p1 = p1 + (version.fhirVersion() != null ? " based on FHIR "+fhirRef(version.fhirVersion())+"" : "")+". "; + p1 = p1 + (version.fhirVersion() != null ? " based on FHIR (HL7® FHIR® Standard) "+fhirRef(version.fhirVersion())+"" : "")+". "; } else { p1 = p1 + ". "; } diff --git a/org.hl7.fhir.publisher.core/src/test/java/org/hl7/fhir/igtools/publisher/FSHRunnerTests.java b/org.hl7.fhir.publisher.core/src/test/java/org/hl7/fhir/igtools/publisher/FSHRunnerTests.java index a0b1f2c4c..00599b242 100644 --- a/org.hl7.fhir.publisher.core/src/test/java/org/hl7/fhir/igtools/publisher/FSHRunnerTests.java +++ b/org.hl7.fhir.publisher.core/src/test/java/org/hl7/fhir/igtools/publisher/FSHRunnerTests.java @@ -7,7 +7,7 @@ import java.util.stream.Stream; import org.apache.commons.exec.CommandLine; -import org.hl7.fhir.r5.context.IWorkerContext; +import org.hl7.fhir.r5.context.ILoggingService; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -33,7 +33,7 @@ public static Stream defaultExecStringParams () { @ParameterizedTest @MethodSource("defaultExecStringParams") public void testDefaultExecString(Publisher.IGBuildMode mode, String fshVersion, String expectedExecString) { - FSHRunner fshRunner = new FSHRunner(Mockito.mock(IWorkerContext.ILoggingService.class)); + FSHRunner fshRunner = new FSHRunner(Mockito.mock(ILoggingService.class)); final CommandLine actualCommandLine = fshRunner.getDefaultCommandLine(fshVersion, mode); assertIsEqual(CommandLine.parse(expectedExecString), actualCommandLine); } @@ -53,7 +53,7 @@ public static Stream sushiCommandParams () { @ParameterizedTest @MethodSource("sushiCommandParams") public void testGetSushiCommand(Publisher.IGBuildMode mode, String fshVersion, String expectedSushiCommand) { - FSHRunner fshRunner = new FSHRunner(Mockito.mock(IWorkerContext.ILoggingService.class)); + FSHRunner fshRunner = new FSHRunner(Mockito.mock(ILoggingService.class)); assertEquals(expectedSushiCommand, fshRunner.getSushiCommandString(fshVersion,mode)); } @@ -76,7 +76,7 @@ public static Stream windowsExecStringParams () { @ParameterizedTest @MethodSource("windowsExecStringParams") public void testWindowsExecString(Publisher.IGBuildMode mode, String fshVersion, String expectedExecString) { - FSHRunner fshRunner = new FSHRunner(Mockito.mock(IWorkerContext.ILoggingService.class)); + FSHRunner fshRunner = new FSHRunner(Mockito.mock(ILoggingService.class)); final CommandLine actualCommandLine = fshRunner.getWindowsCommandLine(fshVersion, mode); assertIsEqual(CommandLine.parse(expectedExecString), actualCommandLine); } @@ -95,7 +95,7 @@ public static Stream npmPathExecStringParams () { @ParameterizedTest @MethodSource("npmPathExecStringParams") public void testNpmPathExecString(Publisher.IGBuildMode mode, String fshVersion, String expectedExecString) { - FSHRunner fshRunner = new FSHRunner(Mockito.mock(IWorkerContext.ILoggingService.class)); + FSHRunner fshRunner = new FSHRunner(Mockito.mock(ILoggingService.class)); final CommandLine actualCommandLine = fshRunner.getNpmPathCommandLine(fshVersion, mode); assertIsEqual(CommandLine.parse(expectedExecString), actualCommandLine); } diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/clear.bat b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/clear.bat deleted file mode 100644 index 0e7b3eb47..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/clear.bat +++ /dev/null @@ -1,5 +0,0 @@ -del output\*.* /s /q -del qa\*.* /s /q -del temp\*.* /s /q - -pause diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/ig.ini b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/ig.ini deleted file mode 100644 index f7a8975c1..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/ig.ini +++ /dev/null @@ -1,4 +0,0 @@ -[IG] -ig = resources/ig-new.json -template = C:\work\org.hl7.fhir\org.hl7.fhir.template.test - diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/codesystems.html b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/codesystems.html deleted file mode 100644 index 0a978a139..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/codesystems.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -# jekyll header ---- -{% include header.html %} - -

Code System Page

- -

Test Code System

- -{% include CodeSystem-test-ig-cs-summary.xhtml %} - -

Content

- -{% include CodeSystem-test-ig-cs-content.xhtml %} - -

Usage

- -{% include CodeSystem-test-ig-cs-xref.xhtml %} - -{% include footer.html %} diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/index.html b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/index.html deleted file mode 100644 index f79f2ca97..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/index.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -# jekyll header ---- -{% include header.html %} - -

Test Implementation Guide

- -

-In this test implementation guide: -

- - -

-Text for Brett -

- -

Everything

- -{% include list-codesystems.xhtml %} -{% include list-valuesets.xhtml %} -{% include list-profiles.xhtml %} -{% include list-extensions.xhtml %} - - -{% include footer.html %} diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd-o.html b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd-o.html deleted file mode 100644 index c74443b19..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd-o.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -# jekyll header ---- -{% include header.html %} - -

Test Profile #1

- -
- -

Summary

- -{% include StructureDefinition-test-organization-header.xhtml %} - -{% include StructureDefinition-test-organization-summary.xhtml %} - -

Differential

- -{% include StructureDefinition-test-organization-diff.xhtml %} - -

Snapshot

- -{% include StructureDefinition-test-organization-snapshot.xhtml %} - -

UML

- -{% include StructureDefinition-test-organization-uml.xhtml %} - -

XML template

- -{% include StructureDefinition-test-organization-pseudo-xml.xhtml %} - -

JSON template

- -{% include StructureDefinition-test-organization-pseudo-json.xhtml %} - -

Turtle Template

- -{% include StructureDefinition-test-organization-pseudo-ttl.xhtml %} - -

Terminology Bindings

- -{% include StructureDefinition-test-organization-tx.xhtml %} - -

Invariants

- -{% include StructureDefinition-test-organization-inv.xhtml %} - - -

Other stuff

- -{% include StructureDefinition-test-organization-sch.xhtml %} -{% include StructureDefinition-test-organization-sd-xref.xhtml %} -{% include StructureDefinition-test-organization-shex.xhtml %} -{% include StructureDefinition-test-organization-json-schema.xhtml %} - -

Definitions

- -{% include StructureDefinition-test-organization-dict.xhtml %} - -

Mappings

- -{% include StructureDefinition-test-organization-maps.xhtml %} - -
- -{% include StructureDefinition-test-organization-xml-html.xhtml %} -{% include StructureDefinition-test-organization-json-html.xhtml %} -{% include StructureDefinition-test-organization-ttl-html.xhtml %} - -
- -{% include footer.html %} diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd-p.html b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd-p.html deleted file mode 100644 index 19a81ab82..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd-p.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -# jekyll header ---- -{% include header.html %} - -

Test Profile #1

- -
- -

Summary

- -{% include StructureDefinition-test-patient-header.xhtml %} - -{% include StructureDefinition-test-patient-summary.xhtml %} - -

Differential

- -{% include StructureDefinition-test-patient-diff.xhtml %} - -

Snapshot

- -{% include StructureDefinition-test-patient-snapshot.xhtml %} - -

UML

- -{% include StructureDefinition-test-patient-uml.xhtml %} - -

XML template

- -{% include StructureDefinition-test-patient-pseudo-xml.xhtml %} - -

JSON template

- -{% include StructureDefinition-test-patient-pseudo-json.xhtml %} - -

Turtle Template

- -{% include StructureDefinition-test-patient-pseudo-ttl.xhtml %} - -

Terminology Bindings

- -{% include StructureDefinition-test-patient-tx.xhtml %} - -

Invariants

- -{% include StructureDefinition-test-patient-inv.xhtml %} - - -

Other stuff

- -{% include StructureDefinition-test-patient-sch.xhtml %} -{% include StructureDefinition-test-patient-sd-xref.xhtml %} -{% include StructureDefinition-test-patient-shex.xhtml %} -{% include StructureDefinition-test-patient-json-schema.xhtml %} - -

Definitions

- -{% include StructureDefinition-test-patient-dict.xhtml %} - -

Mappings

- -{% include StructureDefinition-test-patient-maps.xhtml %} - -
- -{% include StructureDefinition-test-patient-xml-html.xhtml %} -{% include StructureDefinition-test-patient-json-html.xhtml %} -{% include StructureDefinition-test-patient-ttl-html.xhtml %} - -
- -{% include footer.html %} diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd.html b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd.html deleted file mode 100644 index 1914f273b..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/profile-sd.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -# jekyll header ---- -{% include header.html %} - -

Test Profile #1

- -
- -

Summary

- -{% include StructureDefinition-test-ig-sd-header.xhtml %} - -{% include StructureDefinition-test-ig-sd-summary.xhtml %} - -

Differential

- -{% include StructureDefinition-test-ig-sd-diff.xhtml %} - -

Snapshot

- -{% include StructureDefinition-test-ig-sd-snapshot.xhtml %} - -

UML

- -{% include StructureDefinition-test-ig-sd-uml.xhtml %} - -

XML template

- -{% include StructureDefinition-test-ig-sd-pseudo-xml.xhtml %} - -

JSON template

- -{% include StructureDefinition-test-ig-sd-pseudo-json.xhtml %} - -

Turtle Template

- -{% include StructureDefinition-test-ig-sd-pseudo-ttl.xhtml %} - -

Terminology Bindings

- -{% include StructureDefinition-test-ig-sd-tx.xhtml %} - -

Invariants

- -{% include StructureDefinition-test-ig-sd-inv.xhtml %} - - -

Other stuff

- -{% include StructureDefinition-test-ig-sd-sch.xhtml %} -{% include StructureDefinition-test-ig-sd-sd-xref.xhtml %} -{% include StructureDefinition-test-ig-sd-shex.xhtml %} -{% include StructureDefinition-test-ig-sd-json-schema.xhtml %} - -

Definitions

- -{% include StructureDefinition-test-ig-sd-dict.xhtml %} - -

Mappings

- -{% include StructureDefinition-test-ig-sd-maps.xhtml %} - -
- -{% include StructureDefinition-test-ig-sd-xml-html.xhtml %} -{% include StructureDefinition-test-ig-sd-json-html.xhtml %} -{% include StructureDefinition-test-ig-sd-ttl-html.xhtml %} - -
- -{% include footer.html %} diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/valuesets.html b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/valuesets.html deleted file mode 100644 index 1d0e5561c..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/pages/valuesets.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -# jekyll header ---- -{% include header.html %} - -

Value Set Page

- -

Test Value Set - simple

- -{% include ValueSet-test-ig-vs-summary.xhtml %} -{% include ValueSet-test-ig-vs-cld.xhtml %} -{% include ValueSet-test-ig-vs-xref.xhtml %} - -

Expansion

- -{% include ValueSet-test-ig-vs-expansion.xhtml %} - -

Test Value Set - Derived from a FHIR Value set

- -{% include ValueSet-test-ig-vsint-summary.xhtml %} -{% include ValueSet-test-ig-vsint-cld.xhtml %} -{% include ValueSet-test-ig-vsint-xref.xhtml %} - -

Expansion

- -{% include ValueSet-test-ig-vsint-expansion.xhtml %} - -

Test Value Set - Derived from a Bundle

- -{% include ValueSet-test-ig-bnd1-summary.xhtml %} -{% include ValueSet-test-ig-bnd1-cld.xhtml %} -{% include ValueSet-test-ig-bnd1-xref.xhtml %} - -

Expansion

- -{% include ValueSet-test-ig-bnd1-expansion.xhtml %} - -

Test Value Set - Derived from a Bundle #2

- -{% include ValueSet-test-ig-bnd2-summary.xhtml %} -{% include ValueSet-test-ig-bnd2-cld.xhtml %} -{% include ValueSet-test-ig-bnd2-xref.xhtml %} - -

Expansion

- -{% include ValueSet-test-ig-bnd2-expansion.xhtml %} - -

Test Value Set - Derived from SNOMED CT

- -{% include ValueSet-test-ig-vsext-summary.xhtml %} -{% include ValueSet-test-ig-vsext-cld.xhtml %} -{% include ValueSet-test-ig-vsext-xref.xhtml %} - -

Expansion

- -{% include ValueSet-test-ig-vsext-expansion.xhtml %} - - -{% include footer.html %} diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/readme.txt b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/readme.txt deleted file mode 100644 index b2067fa70..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/readme.txt +++ /dev/null @@ -1,26 +0,0 @@ -Test IG - -This exists to test out the capabilities of the IG publisher - -How to build this IG - - where [jpath] is the location of the IG pubisher (from the current build - see downloads), and path is the folder for your local copy of the repository - -#1: Use the IG publisher - java - jar [jpath]org.hl7.fhir.igpublisher.jar -ig [path]resources\rcpa.json -tool jekyll -out [path] -spec http://build.fhir.org/ -watch - -#2: Use Jekyll to buidl the output - go to [path]\html and run jekyll serve - -#3 the final output will be in [path]\html\_site - -note: you need to install Jekyll. for windows users, see http://jekyll-windows.juthilo.com/ - - - - - - - - - diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-expansion-parameters.json b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-expansion-parameters.json deleted file mode 100644 index 3b03cb9dd..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-expansion-parameters.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceType":"ImplementationGuide","id":"test-ig","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/igpublisher-folder-resource","valueString":"C:\\work\\org.hl7.fhir\\fhir-ig-publisher\\org.hl7.fhir.igtools.core\\src\\test\\resources\\test-igs\\old\\ig\\resources"},{"url":"http://hl7.org/fhir/StructureDefinition/igpublisher-folder-pages","valueString":"C:\\work\\org.hl7.fhir\\fhir-ig-publisher\\org.hl7.fhir.igtools.core\\src\\test\\resources\\test-igs\\old\\ig\\pages"}],"url":"http://hl7.org/fhir/test/ImplementationGuide/test-ig","name":"Test Implementation Guide","status":"draft","experimental":true,"publisher":"FHIR Project","jurisdiction":[{"coding":[{"system":"urn:iso:std:iso:3166","code":"US"}]},{"coding":[{"system":"http://unstats.un.org/unsd/methods/m49/m49.htm","code":"013"}]}],"packageId":"hl7.fhir.test.ig40","license":"CC0-1.0","fhirVersion":["4.0.0"],"definition":{"resource":[{"reference":{"reference":"CodeSystem/test-ig-cs"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-vs"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-vsint"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-vsext"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-bnd1"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-bnd2"},"exampleBoolean":false},{"reference":{"reference":"StructureDefinition/test-ig-sd"},"exampleBoolean":false}],"page":{"nameUrl":"index.html","title":"Home Page"},"parameter":[{"code":"apply","value":"jurisdiction"},{"code":"generate-json","value":"true"},{"code":"generate-xml","value":"true"},{"code":"generate-turtle","value":"true"}]}} \ No newline at end of file diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-new.json b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-new.json deleted file mode 100644 index c79db9ff1..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-new.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "resourceType" : "ImplementationGuide", - "id" : "test-ig", - "extension" : [{ - "url" : "http://hl7.org/fhir/StructureDefinition/igpublisher-bundle", - "valueString" : "test-ig-bnd" - },{ - "url" : "http://hl7.org/fhir/StructureDefinition/igpublisher-spreadsheet", - "valueString" : "test-ig-spreadsheet.xml" - },{ - "url" : "http://hl7.org/fhir/StructureDefinition/igpublisher-spreadsheet", - "valueString" : "test-ig-lee.xml" - }], - "url" : "http://hl7.org/fhir/test/ImplementationGuide/test-ig", - "name" : "Test Implementation Guide", - "status" : "draft", - "experimental" : true, - "publisher" : "FHIR Project", - "jurisdiction" : [{ - "coding" : [{ - "system" : "urn:iso:std:iso:3166", - "code" : "US" - }] - }, - { - "coding" : [{ - "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm", - "code" : "013" - }] - }], - "packageId" : "hl7.fhir.test.ig40", - "license" : "CC0-1.0", - "fhirVersion" : ["4.0.1"], - "definition" : { - "resource" : [{ - "reference" : { - "reference" : "CodeSystem/test-ig-cs" - }, - "exampleBoolean" : false - }, - { - "reference" : { - "reference" : "ValueSet/test-ig-vs" - }, - "exampleBoolean" : false - }, - { - "reference" : { - "reference" : "ValueSet/test-ig-vsint" - }, - "exampleBoolean" : false - }, - { - "reference" : { - "reference" : "ValueSet/test-ig-vsext" - }, - "exampleBoolean" : false - }, - { - "reference" : { - "reference" : "ValueSet/test-ig-bnd1" - }, - "exampleBoolean" : false - }, - { - "reference" : { - "reference" : "ValueSet/test-ig-bnd2" - }, - "exampleBoolean" : false - }, - { - "reference" : { - "reference" : "StructureDefinition/test-ig-sd" - }, - "exampleBoolean" : false - }], - "page" : { - "nameUrl" : "index.html", - "title" : "Home Page" - }, - "parameter" : [{ - "code" : "apply", - "value" : "jurisdiction" - }, - { - "code" : "apply", - "value" : "version" - }] - } -} \ No newline at end of file diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-validation-parameters.json b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-validation-parameters.json deleted file mode 100644 index 3b03cb9dd..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/ig-validation-parameters.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceType":"ImplementationGuide","id":"test-ig","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/igpublisher-folder-resource","valueString":"C:\\work\\org.hl7.fhir\\fhir-ig-publisher\\org.hl7.fhir.igtools.core\\src\\test\\resources\\test-igs\\old\\ig\\resources"},{"url":"http://hl7.org/fhir/StructureDefinition/igpublisher-folder-pages","valueString":"C:\\work\\org.hl7.fhir\\fhir-ig-publisher\\org.hl7.fhir.igtools.core\\src\\test\\resources\\test-igs\\old\\ig\\pages"}],"url":"http://hl7.org/fhir/test/ImplementationGuide/test-ig","name":"Test Implementation Guide","status":"draft","experimental":true,"publisher":"FHIR Project","jurisdiction":[{"coding":[{"system":"urn:iso:std:iso:3166","code":"US"}]},{"coding":[{"system":"http://unstats.un.org/unsd/methods/m49/m49.htm","code":"013"}]}],"packageId":"hl7.fhir.test.ig40","license":"CC0-1.0","fhirVersion":["4.0.0"],"definition":{"resource":[{"reference":{"reference":"CodeSystem/test-ig-cs"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-vs"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-vsint"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-vsext"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-bnd1"},"exampleBoolean":false},{"reference":{"reference":"ValueSet/test-ig-bnd2"},"exampleBoolean":false},{"reference":{"reference":"StructureDefinition/test-ig-sd"},"exampleBoolean":false}],"page":{"nameUrl":"index.html","title":"Home Page"},"parameter":[{"code":"apply","value":"jurisdiction"},{"code":"generate-json","value":"true"},{"code":"generate-xml","value":"true"},{"code":"generate-turtle","value":"true"}]}} \ No newline at end of file diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-bnd.xml b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-bnd.xml deleted file mode 100644 index 6938e9bcf..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-bnd.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-cs.xml b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-cs.xml deleted file mode 100644 index 2daf5ee32..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-cs.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-lee.xml b/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-lee.xml deleted file mode 100644 index 88c72169a..000000000 --- a/org.hl7.fhir.publisher.core/src/test/resources/test-igs/new/ig-dir/resources/test-ig-lee.xml +++ /dev/null @@ -1,2425 +0,0 @@ - - - - - Grahame - Microsoft Office User - 2012-03-19T11:12:07Z - 2017-03-06T23:37:32Z - 16.00 - - - - - - 13710 - 28800 - 0 - 0 - 2 - - False - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FHIR Profile-authoring Spreadsheet - - - This spreadsheet is used to support the definition of profiles containing structures, extension definitions and or search criteria definitions. A complete set of instructions on the various tabs, columns and rules associated with populating this spreadsheet can be found here: - - - http://wiki.hl7.org?title=FHIR_Spreadsheet_Authoring - - - As well, additional guidance on profile-creation can be found here: - - - http://wiki.hl7.org?title=FHIR_Spreadsheet_Profile_Authoring - -
- - -
-