use of org.hl7.fhir.r4b.utils.IntegrityChecker.SearchParameterNode in project org.hl7.fhir.core by hapifhir.
the class IntegrityChecker method checkSP.
private void checkSP() throws IOException {
List<SearchParameter> list = new ArrayList<>();
for (String sdn : npm.listResources("SearchParameter")) {
InputStream s = npm.load(sdn);
SearchParameter sp = (SearchParameter) new JsonParser().parse(s);
list.add(sp);
}
msg("Loaded " + list.size() + " resources");
Map<String, SearchParameterNode> map = new HashMap<>();
for (SearchParameter sp : list) {
for (CodeType c : sp.getBase()) {
String s = c.primitiveValue();
if (!map.containsKey(s)) {
map.put(s, new SearchParameterNode(s));
}
addNode(sp, sp.getBase().size() == 1, map.get(s));
}
}
for (SearchParameterNode node : sort(map.values())) {
dump(node);
}
}
use of org.hl7.fhir.r4b.utils.IntegrityChecker.SearchParameterNode in project org.hl7.fhir.core by hapifhir.
the class IntegrityChecker method sort.
private List<SearchParameterNode> sort(Collection<SearchParameterNode> values) {
List<SearchParameterNode> res = new ArrayList<>();
res.addAll(values);
Collections.sort(res, new SearchParameterNodeSorter());
return res;
}
use of org.hl7.fhir.r4b.utils.IntegrityChecker.SearchParameterNode in project org.hl7.fhir.core by hapifhir.
the class IntegrityChecker method checkSP.
private void checkSP() throws IOException {
List<SearchParameter> list = new ArrayList<>();
for (String sdn : npm.listResources("SearchParameter")) {
InputStream s = npm.load(sdn);
SearchParameter sp = (SearchParameter) new JsonParser().parse(s);
list.add(sp);
}
msg("Loaded " + list.size() + " resources");
Map<String, SearchParameterNode> map = new HashMap<>();
for (SearchParameter sp : list) {
for (CodeType c : sp.getBase()) {
String s = c.primitiveValue();
if (!map.containsKey(s)) {
map.put(s, new SearchParameterNode(s));
}
addNode(sp, sp.getBase().size() == 1, map.get(s));
}
}
for (SearchParameterNode node : sort(map.values())) {
dump(node);
}
}
use of org.hl7.fhir.r4b.utils.IntegrityChecker.SearchParameterNode in project org.hl7.fhir.core by hapifhir.
the class IntegrityChecker method sort.
private List<SearchParameterNode> sort(Collection<SearchParameterNode> values) {
List<SearchParameterNode> res = new ArrayList<>();
res.addAll(values);
Collections.sort(res, new SearchParameterNodeSorter());
return res;
}
Aggregations