fix for bug loading Measures from packages

This commit is contained in:
Grahame Grieve 2020-08-06 22:35:14 +10:00
parent 9b0ce65f08
commit f93f47ee24
2 changed files with 10 additions and 10 deletions

View File

@ -386,7 +386,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
return new String[] {"CodeSystem", "ValueSet", "ConceptMap", "NamingSystem",
"StructureDefinition", "StructureMap",
"SearchParameter", "OperationDefinition", "CapabilityStatement", "Conformance",
"Questionnaire", "ImplementationGuide" };
"Questionnaire", "ImplementationGuide", "Measure" };
}
@Override
@ -441,7 +441,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
}
} else {
if (types.length == 0) {
types = new String[] { "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire", "ConceptMap", "StructureMap", "NamingSystem" };
types = new String[] { "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire", "ConceptMap", "StructureMap", "NamingSystem", "Measures" };
}
for (PackageResourceInformation pri : pi.listIndexedResources(types)) {
try {

View File

@ -336,8 +336,7 @@ public class NpmPackage {
throw new IOException("Error parsing "+ij.getAbsolutePath()+": "+e.getMessage(), e);
}
}
loadSubFolders(rootPath, f);
loadSubFolders(rootPath, f);
}
}
}
@ -536,13 +535,14 @@ public class NpmPackage {
public List<PackageResourceInformation> listIndexedResources(String... types) throws IOException {
List<PackageResourceInformation> res = new ArrayList<PackageResourceInformation>();
NpmPackageFolder folder = folders.get("package");
for (JsonElement e : folder.index.getAsJsonArray("files")) {
JsonObject fi = e.getAsJsonObject();
if (Utilities.existsInList(JSONUtil.str(fi, "resourceType"), types)) {
res.add(new PackageResourceInformation(folder.folder.getAbsolutePath(), fi));
for (NpmPackageFolder folder : folders.values()) {
for (JsonElement e : folder.index.getAsJsonArray("files")) {
JsonObject fi = e.getAsJsonObject();
if (Utilities.existsInList(JSONUtil.str(fi, "resourceType"), types)) {
res.add(new PackageResourceInformation(folder.folder.getAbsolutePath(), fi));
}
}
}
}
// Collections.sort(res, new PackageResourceInformationSorter());
return res;
}