Skip to content

Commit

Permalink
Merge pull request #1038 from HL7/2025-02-gg-load-order
Browse files Browse the repository at this point in the history
fix issues with revised loading order + add release notes
  • Loading branch information
grahamegrieve authored Feb 9, 2025
2 parents 59ade9b + 092caaf commit d155c0d
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 44 deletions.
14 changes: 14 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
* Loader: Optimize the JSON parsing in NpmPackageIndexBuilder.seeFile (#1898) (faster loading)
* Loader: Fix stack crash when structure definitions are circular
* ResourceFactory: updates for loading generated resources in IG publisher
* SnapshotGenerator: Add "http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version" to snapshot generation
* Validator: Add HL7 CodeSystem display and definition checks
* Validator: Fix error reporting duplicate contained IDs when contained resources are sliced by a profile
* Validator: Allow cardinality changes in obligation profiles (but not recommended)
* Validator: Add underscore to regex to be able to use underscore in Bundle URLs
* Renderer: fix NPE in patient renderer
* QA: Support for Profile Test Cases
* Publication Process: support for current-only IGs
* Publication Process: extra qa around HL7 web site process


Original file line number Diff line number Diff line change
Expand Up @@ -4633,15 +4633,15 @@ private void load() throws Exception {
loadBundles(igf);
loadTranslationSupplements(igf);

loadConformance1();
loadConformance1(true);
for (String s : resourceFactoryDirs) {
FileUtilities.clearDirectory(s);
}
if (!testDataFactories.isEmpty()) {
processFactories(testDataFactories);
}
loadResources2(igf);
loadConformance1();
loadConformance1(false);

int i = 0;
Set<String> resLinks = new HashSet<>();
Expand Down Expand Up @@ -4795,7 +4795,7 @@ private void load() throws Exception {
if (duplicateInputResourcesDetected) {
throw new Error("Unable to continue because duplicate input resources were identified");
}

loadConformance1(false);
for (PageFactory pf : pageFactories) {
pf.execute(rootDir, publishedIg);
}
Expand Down Expand Up @@ -6036,15 +6036,23 @@ private List<String> metadataResourceNames() {
return res;
}

private void loadConformance1() throws Exception {
log("Process Loaded Resources");
for (String s : metadataResourceNames()) {
load(s, !Utilities.existsInList(s, "Evidence", "EvidenceVariable")); // things that have changed in R6 that aren't internally critical
}
log("Generating Snapshots");
generateSnapshots();
private void loadConformance1(boolean first) throws Exception {
boolean any = false;
for (FetchedFile f : fileList) {
f.setLoaded(true);
if (!f.isLoaded()) {
any = true;
}
}
if (any) {
log("Process "+(first ? "": "Additional ")+"Loaded Resources");
for (String s : metadataResourceNames()) {
load(s, !Utilities.existsInList(s, "Evidence", "EvidenceVariable")); // things that have changed in R6 that aren't internally critical
}
log("Generating Snapshots");
generateSnapshots();
for (FetchedFile f : fileList) {
f.setLoaded(true);
}
}
}

Expand Down Expand Up @@ -6199,15 +6207,17 @@ private void checkConformanceResources() throws IOException {
f.getErrors().add(new ValidationMessage(Source.ProfileValidator,IssueType.INVALID, "StructureDefinition", "Unable to validate - Profile not loaded", IssueSeverity.ERROR));
} else {
f.getErrors().addAll(pvalidator.validate(sd, false));
checkJurisdiction(f, (CanonicalResource) r.getResource(), IssueSeverity.ERROR, "must");
}
checkJurisdiction(f, (CanonicalResource) r.getResource(), IssueSeverity.ERROR, "must");
} else if (r.getResource() != null && r.getResource() instanceof CanonicalResource) {
checkJurisdiction(f, (CanonicalResource) r.getResource(), IssueSeverity.WARNING, "should");
}
if (r.fhirType().equals("CodeSystem")) {
logDebugMessage(LogCategory.PROGRESS, "process CodeSystem: "+r.getId());
CodeSystem cs = (CodeSystem) r.getResource();
f.getErrors().addAll(csvalidator.validate(cs, false));
if (cs != null) {
f.getErrors().addAll(csvalidator.validate(cs, false));
}
}
}
} finally {
Expand Down Expand Up @@ -7307,13 +7317,17 @@ private void generateSnapshots() throws Exception {
utils.setNewSlicingProcessing(true);
}

logDebugMessage(LogCategory.PROGRESS, "Generate Snapshots");
boolean first = true;
for (FetchedFile f : fileList) {
if (!f.isLoaded()) {
f.start("generateSnapshots");
try {
for (FetchedResource r : f.getResources()) {
if (r.getResource() instanceof StructureDefinition) {
if (first) {
logDebugMessage(LogCategory.PROGRESS, "Generate Snapshots");
first = false;
}
if (r.getResEntry() != null) {
ToolingExtensions.setStringExtension(r.getResEntry(), ToolingExtensions.EXT_IGP_RESOURCE_INFO, r.fhirType()+":"+IGKnowledgeProvider.getSDType(r));
}
Expand Down
2 changes: 1 addition & 1 deletion test-statistics.csv
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ Version,example.fhir.uv.myig,fhir.base.template.ig,hl7.base.template.ig,hl7.cda.
1.8.7,101825,904,84,125551,436747,564,,,,35358,121018,755838,712253,62360,267215
1.8.8,104989,870,71,142802,1289461,1439,1301064,1102014,689468,116378,146240,785091,662755,69622,290864
1.8.10,108321,853,72,131612,1376884,1454,1320391,1015203,717178,113022,151679,764364,660566,70187,279641
1.8.11,47576,1148,73,120722,663022,618,1403701,,688047,38126,70432,498548,423738,52052,213899
1.8.11,98266,846,82,150646,508646,470,1981416,1028756,714057,97708,139364,826130,696248,68789,286487
65 changes: 36 additions & 29 deletions test-statistics.json
Original file line number Diff line number Diff line change
Expand Up @@ -4735,104 +4735,111 @@
},
"1.8.11" : {
"sync-date" : "2024-06-30",
"date" : "2025-02-04",
"date" : "2025-02-10",
"hl7.fhir.template.ig" : {
"errors" : 0,
"warnings" : 0,
"hints" : 0,
"time" : 618,
"memory" : 10385688
"time" : 470,
"memory" : 10379496
},
"hl7.cda.uv.core" : {
"errors" : 41,
"warnings" : 215,
"hints" : 0,
"time" : 120722,
"memory" : 2635574320
"time" : 150646,
"memory" : 2880915968
},
"hl7.fhir.uv.ipa" : {
"errors" : 24,
"warnings" : 9,
"hints" : 39,
"time" : 70432,
"memory" : 2564136928
"time" : 139364,
"memory" : 1400340288
},
"hl7.fhir.uv.ips" : {
"errors" : 2,
"warnings" : 23,
"hints" : 37,
"time" : 498548,
"memory" : 2100225864
"time" : 826130,
"memory" : 1815435472
},
"ihe.mhd.fhir" : {
"errors" : 0,
"warnings" : 3,
"hints" : 28,
"time" : 213899,
"memory" : 1958155280
"time" : 286487,
"memory" : 1959296888
},
"hl7.fhir.uv.sdc" : {
"errors" : 47,
"warnings" : 86,
"hints" : 416,
"time" : 423738,
"memory" : 878362168
"time" : 696248,
"memory" : 1216785400
},
"hl7.fhir.uv.tools" : {
"errors" : 0,
"warnings" : 4,
"hints" : 0,
"time" : 52052,
"memory" : 2352955224
"time" : 68789,
"memory" : 3101994472
},
"hl7.base.template.ig" : {
"errors" : 0,
"warnings" : 0,
"hints" : 0,
"time" : 73,
"memory" : 2268248
"time" : 82,
"memory" : 2520544
},
"hl7.fhir.uv.howto" : {
"errors" : 5,
"warnings" : 8,
"hints" : 2,
"time" : 38126,
"memory" : 2125320376
"time" : 97708,
"memory" : 2129921816
},
"fhir.base.template.ig" : {
"errors" : 0,
"warnings" : 0,
"hints" : 0,
"time" : 1148,
"memory" : 30391768
"time" : 846,
"memory" : 45363920
},
"hl7.fhir.au.base" : {
"errors" : 21,
"warnings" : 141,
"hints" : 166,
"time" : 663022,
"memory" : 2282821832
"time" : 508646,
"memory" : 2565894736
},
"example.fhir.uv.myig" : {
"errors" : 20,
"warnings" : 19,
"hints" : 7,
"time" : 47576,
"memory" : 1423803424
"time" : 98266,
"memory" : 1376055000
},
"hl7.fhir.us.core" : {
"errors" : 58,
"warnings" : 6,
"hints" : 58,
"time" : 1403701,
"memory" : 7122114248
"time" : 1981416,
"memory" : 7637565312
},
"hl7.fhir.uv.extensions" : {
"errors" : 1080,
"warnings" : 683,
"hints" : 1613,
"time" : 688047,
"memory" : 6264526168
"time" : 714057,
"memory" : 6420070624
},
"hl7.fhir.us.ecr" : {
"errors" : 4608,
"warnings" : 385,
"hints" : 94,
"time" : 1028756,
"memory" : 7018153840
}
}
}

0 comments on commit d155c0d

Please sign in to comment.