Header updates

This commit is contained in:
James Agnew 2019-07-14 09:27:45 -04:00
parent 0acb99744b
commit e265477c6e
14 changed files with 1731 additions and 1463 deletions

View File

@ -1,80 +1,101 @@
package org.hl7.fhir.convertors.misc; package org.hl7.fhir.convertors.misc;
import java.io.File; /*-
import java.io.IOException; * #%L
import java.util.ArrayList; * org.hl7.fhir.convertors
import java.util.List; * %%
* Copyright (C) 2014 - 2019 Health Level 7
import org.hl7.fhir.utilities.TextFile; * %%
import org.hl7.fhir.utilities.Utilities; * Licensed under the Apache License, Version 2.0 (the "License");
import org.hl7.fhir.utilities.json.JsonTrackingParser; * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
import com.google.gson.Gson; *
import com.google.gson.GsonBuilder; * http://www.apache.org/licenses/LICENSE-2.0
import com.google.gson.JsonObject; *
* Unless required by applicable law or agreed to in writing, software
public class PackageMaintainer { * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
private static final String PATH = "C:\\work\\org.hl7.fhir\\packages\\core"; * limitations under the License.
* #L%
public static void main(String[] args) throws IOException { */
new PackageMaintainer().check("r4");
new PackageMaintainer().check("r2");
new PackageMaintainer().check("r3"); import java.io.File;
new PackageMaintainer().check("r2b"); import java.io.IOException;
} import java.util.ArrayList;
import java.util.List;
private void check(String ver) throws IOException {
System.out.println("Check "+ver); import org.hl7.fhir.utilities.TextFile;
List<String> allIds = listResources(Utilities.path(PATH, "hl7.fhir."+ver+".examples", "package")); import org.hl7.fhir.utilities.Utilities;
List<String> coreIds = listResources(Utilities.path(PATH, "hl7.fhir."+ver+".core", "package")); import org.hl7.fhir.utilities.json.JsonTrackingParser;
for (String s : coreIds) {
if (!allIds.contains(s)) { import com.google.gson.Gson;
System.out.println("Core contains "+s+" but allIds doesn't"); import com.google.gson.GsonBuilder;
} import com.google.gson.JsonObject;
}
for (String s : allIds) { public class PackageMaintainer {
if (!coreIds.contains(s)) {
String c = s.substring(0, s.indexOf("-"));
if (Utilities.existsInList(c, "CodeSystem", "ValueSet", "ConceptMap", "StructureDefinition", "StructureMap", "NamingSystem", "SearchParameter", "OperationDefinition", "CapabilityStatement", "Conformance")) private static final String PATH = "C:\\work\\org.hl7.fhir\\packages\\core";
System.out.println("Examples contains "+s+" but core doesn't");
} public static void main(String[] args) throws IOException {
} new PackageMaintainer().check("r4");
strip(new File(Utilities.path(PATH, "hl7.fhir."+ver+".core", "package"))); new PackageMaintainer().check("r2");
strip(new File(Utilities.path(PATH, "hl7.fhir."+ver+".expansions", "package"))); new PackageMaintainer().check("r3");
if (!ver.equals("r2b")) new PackageMaintainer().check("r2b");
strip(new File(Utilities.path(PATH, "hl7.fhir."+ver+".elements", "package"))); }
}
private void check(String ver) throws IOException {
System.out.println("Check "+ver);
private List<String> listResources(String dir) { List<String> allIds = listResources(Utilities.path(PATH, "hl7.fhir."+ver+".examples", "package"));
File folder = new File(dir); List<String> coreIds = listResources(Utilities.path(PATH, "hl7.fhir."+ver+".core", "package"));
List<String> res = new ArrayList<>(); for (String s : coreIds) {
for (String fn : folder.list()) { if (!allIds.contains(s)) {
if (fn.endsWith(".json") && fn.contains("-")) { System.out.println("Core contains "+s+" but allIds doesn't");
String s = fn; }
s = s.substring(0, s.indexOf(".")); }
res.add(s); for (String s : allIds) {
} if (!coreIds.contains(s)) {
} String c = s.substring(0, s.indexOf("-"));
return res; if (Utilities.existsInList(c, "CodeSystem", "ValueSet", "ConceptMap", "StructureDefinition", "StructureMap", "NamingSystem", "SearchParameter", "OperationDefinition", "CapabilityStatement", "Conformance"))
} System.out.println("Examples contains "+s+" but core doesn't");
}
private void strip(File folder) throws IOException { }
for (File f : folder.listFiles()) { strip(new File(Utilities.path(PATH, "hl7.fhir."+ver+".core", "package")));
if (f.isDirectory()) strip(new File(Utilities.path(PATH, "hl7.fhir."+ver+".expansions", "package")));
strip(f); if (!ver.equals("r2b"))
else if (f.getName().endsWith(".json")) { strip(new File(Utilities.path(PATH, "hl7.fhir."+ver+".elements", "package")));
JsonObject json = JsonTrackingParser.parseJson(f); }
if (json.has("resourceType") && json.has("text")) {
json.remove("text");
Gson gson = new GsonBuilder().create(); private List<String> listResources(String dir) {
String src = gson.toJson(json); File folder = new File(dir);
TextFile.stringToFile(src, f.getAbsolutePath()); List<String> res = new ArrayList<>();
} for (String fn : folder.list()) {
} if (fn.endsWith(".json") && fn.contains("-")) {
} String s = fn;
} s = s.substring(0, s.indexOf("."));
res.add(s);
} }
}
return res;
}
private void strip(File folder) throws IOException {
for (File f : folder.listFiles()) {
if (f.isDirectory())
strip(f);
else if (f.getName().endsWith(".json")) {
JsonObject json = JsonTrackingParser.parseJson(f);
if (json.has("resourceType") && json.has("text")) {
json.remove("text");
Gson gson = new GsonBuilder().create();
String src = gson.toJson(json);
TextFile.stringToFile(src, f.getAbsolutePath());
}
}
}
}
}

View File

@ -1,297 +1,318 @@
package org.hl7.fhir.convertors.misc; package org.hl7.fhir.convertors.misc;
import java.io.FileInputStream; /*-
import java.io.FileNotFoundException; * #%L
import java.io.FileOutputStream; * org.hl7.fhir.convertors
import java.io.IOException; * %%
import java.io.UnsupportedEncodingException; * Copyright (C) 2014 - 2019 Health Level 7
import java.util.ArrayList; * %%
import java.util.Collection; * Licensed under the Apache License, Version 2.0 (the "License");
import java.util.Collections; * you may not use this file except in compliance with the License.
import java.util.Date; * You may obtain a copy of the License at
import java.util.List; *
* http://www.apache.org/licenses/LICENSE-2.0
import org.hl7.fhir.convertors.misc.SearchParameterProcessor.SPRelationship; *
import org.hl7.fhir.exceptions.FHIRException; * Unless required by applicable law or agreed to in writing, software
import org.hl7.fhir.exceptions.FHIRFormatError; * distributed under the License is distributed on an "AS IS" BASIS,
import org.hl7.fhir.r5.formats.IParser.OutputStyle; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import org.hl7.fhir.r5.formats.JsonParser; * See the License for the specific language governing permissions and
import org.hl7.fhir.r5.model.ConceptMap; * limitations under the License.
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent; * #L%
import org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent; */
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
import org.hl7.fhir.utilities.CSVReader; import java.io.FileInputStream;
import org.hl7.fhir.utilities.TextFile; import java.io.FileNotFoundException;
import org.hl7.fhir.utilities.Utilities; import java.io.FileOutputStream;
import java.io.IOException;
public class SearchParameterProcessor { import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
public class SPRelationship { import java.util.Collection;
private String r4; import java.util.Collections;
private String r3; import java.util.Date;
private String r2b; import java.util.List;
private String r2;
public SPRelationship(String r4, String r3, String r2b, String r2) { import org.hl7.fhir.convertors.misc.SearchParameterProcessor.SPRelationship;
super(); import org.hl7.fhir.exceptions.FHIRException;
this.r4 = r4; import org.hl7.fhir.exceptions.FHIRFormatError;
this.r3 = r3; import org.hl7.fhir.r5.formats.IParser.OutputStyle;
this.r2b = r2b; import org.hl7.fhir.r5.formats.JsonParser;
this.r2 = r2; import org.hl7.fhir.r5.model.ConceptMap;
} import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent;
public String getR4() { import org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent;
return r4; import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
} import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
public String getR3() { import org.hl7.fhir.utilities.CSVReader;
return r3; import org.hl7.fhir.utilities.TextFile;
} import org.hl7.fhir.utilities.Utilities;
public String getR2b() {
return r2b; public class SearchParameterProcessor {
}
public String getR2() { public class SPRelationship {
return r2; private String r4;
} private String r3;
public String getByCode(String code) { private String r2b;
if ("R4".equals(code)) private String r2;
return r4; public SPRelationship(String r4, String r3, String r2b, String r2) {
if ("R3".equals(code)) super();
return r3; this.r4 = r4;
if ("R2b".equals(code)) this.r3 = r3;
return r2b; this.r2b = r2b;
if ("R2".equals(code)) this.r2 = r2;
return r2; }
return null; public String getR4() {
} return r4;
}
} public String getR3() {
return r3;
private static final String ROOT = "C:\\work\\org.hl7.fhir\\org.fhir.interversion\\package"; }
public String getR2b() {
private List<SPRelationship> list = new ArrayList<>(); return r2b;
}
private List<String> list4 = new ArrayList<>(); public String getR2() {
private List<String> list3 = new ArrayList<>(); return r2;
private List<String> list2 = new ArrayList<>(); }
private List<String> list2b = new ArrayList<>(); public String getByCode(String code) {
if ("R4".equals(code))
private void load() throws FileNotFoundException, IOException, FHIRException { return r4;
load4(); if ("R3".equals(code))
load3(); return r3;
load2b(); if ("R2b".equals(code))
load2(); return r2b;
loadCsv(); if ("R2".equals(code))
return r2;
check4(); return null;
check3(); }
check2b();
check2(); }
generate("R3", "R4", "STU3", "R4"); private static final String ROOT = "C:\\work\\org.hl7.fhir\\org.fhir.interversion\\package";
generate("R4", "R3", "R4", "STU3");
generate("R2", "R4", "DSTU2", "R4"); private List<SPRelationship> list = new ArrayList<>();
generate("R4", "R2", "R4", "DSTU2");
generate("R2", "R3", "DSTU2", "STU3"); private List<String> list4 = new ArrayList<>();
generate("R3", "R2", "STU3", "DSTU2"); private List<String> list3 = new ArrayList<>();
} private List<String> list2 = new ArrayList<>();
private List<String> list2b = new ArrayList<>();
private void generate(String src, String dst, String srcURL, String tgtURL) throws FileNotFoundException, IOException {
ConceptMap map = new ConceptMap(); private void load() throws FileNotFoundException, IOException, FHIRException {
map.setId("search-parameters-"+src+"-to-"+dst); load4();
map.setUrl("http://hl7.org/fhir/interversion/ConceptMap/"+map.getId()); load3();
map.setName("SearchParameterMap"+src+dst); load2b();
map.setTitle("Search Parameter Map - "+src+" to "+dst); load2();
map.setStatus(PublicationStatus.DRAFT); loadCsv();
map.setDate(new Date());
map.setExperimental(false); check4();
map.setPublisher("HL7"); check3();
ConceptMapGroupComponent group = map.addGroup(); check2b();
group.setSource("http://hl7.org/fhir/"+srcURL); check2();
group.setTarget("http://hl7.org/fhir/"+tgtURL);
for (SPRelationship sp : list) { generate("R3", "R4", "STU3", "R4");
String s = sp.getByCode(src); generate("R4", "R3", "R4", "STU3");
String d = sp.getByCode(dst); generate("R2", "R4", "DSTU2", "R4");
if (!Utilities.noString(s) && !Utilities.noString(d)) { generate("R4", "R2", "R4", "DSTU2");
SourceElementComponent e = makeElement(s, group); generate("R2", "R3", "DSTU2", "STU3");
e.addTarget().setCode(d).setEquivalence(ConceptMapEquivalence.RELATEDTO); generate("R3", "R2", "STU3", "DSTU2");
} }
}
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(ROOT, "ConceptMap-"+map.getId()+".json")), map); private void generate(String src, String dst, String srcURL, String tgtURL) throws FileNotFoundException, IOException {
} ConceptMap map = new ConceptMap();
map.setId("search-parameters-"+src+"-to-"+dst);
private SourceElementComponent makeElement(String code, ConceptMapGroupComponent group) { map.setUrl("http://hl7.org/fhir/interversion/ConceptMap/"+map.getId());
for (SourceElementComponent e : group.getElement()) { map.setName("SearchParameterMap"+src+dst);
if (e.getCode().equals(code)) map.setTitle("Search Parameter Map - "+src+" to "+dst);
return e; map.setStatus(PublicationStatus.DRAFT);
} map.setDate(new Date());
return group.addElement().setCode(code); map.setExperimental(false);
} map.setPublisher("HL7");
ConceptMapGroupComponent group = map.addGroup();
private void check4() { group.setSource("http://hl7.org/fhir/"+srcURL);
for (String s : list4) { group.setTarget("http://hl7.org/fhir/"+tgtURL);
boolean ok = false; for (SPRelationship sp : list) {
for (SPRelationship t : list) { String s = sp.getByCode(src);
if (s.equals(t.r4)) String d = sp.getByCode(dst);
ok = true; if (!Utilities.noString(s) && !Utilities.noString(d)) {
} SourceElementComponent e = makeElement(s, group);
if (!ok) e.addTarget().setCode(d).setEquivalence(ConceptMapEquivalence.RELATEDTO);
System.out.println("R4 missing : "+s); }
} }
for (SPRelationship sp : list) { new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(ROOT, "ConceptMap-"+map.getId()+".json")), map);
if (!Utilities.noString(sp.r4)) { }
boolean ok = list4.contains(sp.r4);
if (!ok) private SourceElementComponent makeElement(String code, ConceptMapGroupComponent group) {
System.out.println("R4 extra : "+sp.r4); for (SourceElementComponent e : group.getElement()) {
} if (e.getCode().equals(code))
} return e;
} }
return group.addElement().setCode(code);
private void check3() { }
for (String s : list3) {
boolean ok = false; private void check4() {
for (SPRelationship t : list) { for (String s : list4) {
if (s.equals(t.r3)) boolean ok = false;
ok = true; for (SPRelationship t : list) {
} if (s.equals(t.r4))
if (!ok) ok = true;
System.out.println("R3 : "+s); }
} if (!ok)
for (SPRelationship sp : list) { System.out.println("R4 missing : "+s);
if (!Utilities.noString(sp.r3)) { }
boolean ok = list3.contains(sp.r3); for (SPRelationship sp : list) {
if (!ok) if (!Utilities.noString(sp.r4)) {
System.out.println("R3 extra : "+sp.r3); boolean ok = list4.contains(sp.r4);
} if (!ok)
} System.out.println("R4 extra : "+sp.r4);
} }
}
private void check2b() { }
for (String s : list2b) {
boolean ok = false; private void check3() {
for (SPRelationship t : list) { for (String s : list3) {
if (s.equals(t.r2b)) boolean ok = false;
ok = true; for (SPRelationship t : list) {
} if (s.equals(t.r3))
if (!ok) ok = true;
System.out.println("R2b : "+s); }
} if (!ok)
for (SPRelationship sp : list) { System.out.println("R3 : "+s);
if (!Utilities.noString(sp.r2b)) { }
boolean ok = list2b.contains(sp.r2b); for (SPRelationship sp : list) {
if (!ok) if (!Utilities.noString(sp.r3)) {
System.out.println("R2b extra : "+sp.r2b); boolean ok = list3.contains(sp.r3);
} if (!ok)
} System.out.println("R3 extra : "+sp.r3);
} }
}
private void check2() { }
for (String s : list2) {
boolean ok = false; private void check2b() {
for (SPRelationship t : list) { for (String s : list2b) {
if (s.equals(t.r2)) boolean ok = false;
ok = true; for (SPRelationship t : list) {
} if (s.equals(t.r2b))
if (!ok) ok = true;
System.out.println("R2 : "+s); }
} if (!ok)
for (SPRelationship sp : list) { System.out.println("R2b : "+s);
if (!Utilities.noString(sp.r2)) { }
boolean ok = list2.contains(sp.r2); for (SPRelationship sp : list) {
if (!ok) if (!Utilities.noString(sp.r2b)) {
System.out.println("R2 extra : "+sp.r2); boolean ok = list2b.contains(sp.r2b);
} if (!ok)
} System.out.println("R2b extra : "+sp.r2b);
} }
}
private void load4() throws FHIRFormatError, FileNotFoundException, IOException { }
org.hl7.fhir.r4.model.Bundle bundle = (org.hl7.fhir.r4.model.Bundle) new org.hl7.fhir.r4.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp4.json"));
for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent be : bundle.getEntry()) { private void check2() {
org.hl7.fhir.r4.model.SearchParameter sp = (org.hl7.fhir.r4.model.SearchParameter) be.getResource(); for (String s : list2) {
for (org.hl7.fhir.r4.model.CodeType br : sp.getBase()) { boolean ok = false;
if (!Utilities.existsInList(br.asStringValue(), "DomainResource", "Resource")) for (SPRelationship t : list) {
list4.add(br.asStringValue()+"."+sp.getCode());//+", "+sp.getType().toCode()); if (s.equals(t.r2))
} ok = true;
} }
Collections.sort(list4); if (!ok)
System.out.println("R4 loaded - "+list4.size()+" parameters"); System.out.println("R2 : "+s);
} }
for (SPRelationship sp : list) {
private void load3() throws FHIRFormatError, FileNotFoundException, IOException { if (!Utilities.noString(sp.r2)) {
org.hl7.fhir.dstu3.model.Bundle bundle = (org.hl7.fhir.dstu3.model.Bundle) new org.hl7.fhir.dstu3.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp3.json")); boolean ok = list2.contains(sp.r2);
for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent be : bundle.getEntry()) { if (!ok)
org.hl7.fhir.dstu3.model.SearchParameter sp = (org.hl7.fhir.dstu3.model.SearchParameter) be.getResource(); System.out.println("R2 extra : "+sp.r2);
for (org.hl7.fhir.dstu3.model.CodeType br : sp.getBase()) { }
if (!Utilities.existsInList(br.asStringValue(), "DomainResource", "Resource")) }
list3.add(br.asStringValue()+"."+sp.getCode());//+", "+sp.getType().toCode()); }
}
} private void load4() throws FHIRFormatError, FileNotFoundException, IOException {
Collections.sort(list3); org.hl7.fhir.r4.model.Bundle bundle = (org.hl7.fhir.r4.model.Bundle) new org.hl7.fhir.r4.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp4.json"));
System.out.println("R3 loaded - "+list3.size()+" parameters"); for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent be : bundle.getEntry()) {
} org.hl7.fhir.r4.model.SearchParameter sp = (org.hl7.fhir.r4.model.SearchParameter) be.getResource();
for (org.hl7.fhir.r4.model.CodeType br : sp.getBase()) {
private void load2() throws FHIRFormatError, FileNotFoundException, IOException { if (!Utilities.existsInList(br.asStringValue(), "DomainResource", "Resource"))
org.hl7.fhir.dstu2.model.Bundle bundle = (org.hl7.fhir.dstu2.model.Bundle) new org.hl7.fhir.dstu2.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp2.json")); list4.add(br.asStringValue()+"."+sp.getCode());//+", "+sp.getType().toCode());
for (org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent be : bundle.getEntry()) { }
org.hl7.fhir.dstu2.model.SearchParameter sp = (org.hl7.fhir.dstu2.model.SearchParameter) be.getResource(); }
String br = sp.getBase(); Collections.sort(list4);
if (!Utilities.existsInList(br, "DomainResource", "Resource")) System.out.println("R4 loaded - "+list4.size()+" parameters");
list2.add(br+"."+sp.getCode());//+", "+sp.getType().toCode()); }
}
Collections.sort(list2); private void load3() throws FHIRFormatError, FileNotFoundException, IOException {
System.out.println("R2 loaded - "+list2.size()+" parameters"); org.hl7.fhir.dstu3.model.Bundle bundle = (org.hl7.fhir.dstu3.model.Bundle) new org.hl7.fhir.dstu3.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp3.json"));
} for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent be : bundle.getEntry()) {
org.hl7.fhir.dstu3.model.SearchParameter sp = (org.hl7.fhir.dstu3.model.SearchParameter) be.getResource();
private void load2b() throws FHIRFormatError, FileNotFoundException, IOException { for (org.hl7.fhir.dstu3.model.CodeType br : sp.getBase()) {
org.hl7.fhir.dstu2016may.model.Bundle bundle = (org.hl7.fhir.dstu2016may.model.Bundle) new org.hl7.fhir.dstu2016may.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp2b.json")); if (!Utilities.existsInList(br.asStringValue(), "DomainResource", "Resource"))
for (org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent be : bundle.getEntry()) { list3.add(br.asStringValue()+"."+sp.getCode());//+", "+sp.getType().toCode());
org.hl7.fhir.dstu2016may.model.SearchParameter sp = (org.hl7.fhir.dstu2016may.model.SearchParameter) be.getResource(); }
String br = sp.getBase(); }
if (!Utilities.existsInList(br, "DomainResource", "Resource")) Collections.sort(list3);
list2b.add(br+"."+sp.getCode());//+", "+sp.getType().toCode()); System.out.println("R3 loaded - "+list3.size()+" parameters");
} }
Collections.sort(list2b);
System.out.println("R2b loaded - "+list2b.size()+" parameters"); private void load2() throws FHIRFormatError, FileNotFoundException, IOException {
} org.hl7.fhir.dstu2.model.Bundle bundle = (org.hl7.fhir.dstu2.model.Bundle) new org.hl7.fhir.dstu2.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp2.json"));
for (org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent be : bundle.getEntry()) {
private void loadCsv() throws IOException, FHIRException { org.hl7.fhir.dstu2.model.SearchParameter sp = (org.hl7.fhir.dstu2.model.SearchParameter) be.getResource();
CSVReader csv = new CSVReader(new FileInputStream("C:\\work\\org.hl7.fhir\\org.fhir.interversion\\work\\search-params.csv")); String br = sp.getBase();
csv.readHeaders(); if (!Utilities.existsInList(br, "DomainResource", "Resource"))
while (csv.line()) { list2.add(br+"."+sp.getCode());//+", "+sp.getType().toCode());
String r4 = csv.cell("R4"); }
String r3 = csv.cell("R3"); Collections.sort(list2);
String r2b = csv.cell("R2b"); System.out.println("R2 loaded - "+list2.size()+" parameters");
String r2 = csv.cell("R2"); }
if (!Utilities.noString(r4) || !Utilities.noString(r3) || !Utilities.noString(r2b) || !Utilities.noString(r2)) {
boolean ok = (!Utilities.noString(r4) && r4.contains(".")) || private void load2b() throws FHIRFormatError, FileNotFoundException, IOException {
(!Utilities.noString(r3) && r3.contains(".")) || org.hl7.fhir.dstu2016may.model.Bundle bundle = (org.hl7.fhir.dstu2016may.model.Bundle) new org.hl7.fhir.dstu2016may.formats.JsonParser().parse(new FileInputStream("c:\\temp\\sp2b.json"));
(!Utilities.noString(r2b) && r2b.contains(".")) || for (org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent be : bundle.getEntry()) {
(!Utilities.noString(r2) && r2.contains(".")); org.hl7.fhir.dstu2016may.model.SearchParameter sp = (org.hl7.fhir.dstu2016may.model.SearchParameter) be.getResource();
if (ok) { String br = sp.getBase();
list.add(new SPRelationship(r4, r3, r2b, r2)); if (!Utilities.existsInList(br, "DomainResource", "Resource"))
} list2b.add(br+"."+sp.getCode());//+", "+sp.getType().toCode());
} }
} Collections.sort(list2b);
System.out.println("Map loaded - "+list.size()+" entries"); System.out.println("R2b loaded - "+list2b.size()+" parameters");
} }
// private void generate(String name) throws IOException { private void loadCsv() throws IOException, FHIRException {
// StringBuilder b = new StringBuilder(); CSVReader csv = new CSVReader(new FileInputStream("C:\\work\\org.hl7.fhir\\org.fhir.interversion\\work\\search-params.csv"));
// csv.readHeaders();
// String rn = ""; while (csv.line()) {
// Collections.sort(list); String r4 = csv.cell("R4");
// for (String s : list) { String r3 = csv.cell("R3");
// String rnn = s.substring(0, s.indexOf(".")); String r2b = csv.cell("R2b");
// if (!rnn.equals(rn)) { String r2 = csv.cell("R2");
// rn = rnn; if (!Utilities.noString(r4) || !Utilities.noString(r3) || !Utilities.noString(r2b) || !Utilities.noString(r2)) {
// b.append(rn+"\r\n"); boolean ok = (!Utilities.noString(r4) && r4.contains(".")) ||
// } (!Utilities.noString(r3) && r3.contains(".")) ||
// b.append(s+"\r\n"); (!Utilities.noString(r2b) && r2b.contains(".")) ||
// } (!Utilities.noString(r2) && r2.contains("."));
// TextFile.stringToFile(b.toString(), name); if (ok) {
// } list.add(new SPRelationship(r4, r3, r2b, r2));
// }
public static void main(String[] args) throws FileNotFoundException, IOException, FHIRException { }
new SearchParameterProcessor().load(); }
} System.out.println("Map loaded - "+list.size()+" entries");
}
} // private void generate(String name) throws IOException {
// StringBuilder b = new StringBuilder();
//
// String rn = "";
// Collections.sort(list);
// for (String s : list) {
// String rnn = s.substring(0, s.indexOf("."));
// if (!rnn.equals(rn)) {
// rn = rnn;
// b.append(rn+"\r\n");
// }
// b.append(s+"\r\n");
// }
// TextFile.stringToFile(b.toString(), name);
// }
//
public static void main(String[] args) throws FileNotFoundException, IOException, FHIRException {
new SearchParameterProcessor().load();
}
}

View File

@ -1,45 +1,66 @@
package org.hl7.fhir.dstu2.utils; package org.hl7.fhir.dstu2.utils;
import java.io.FileInputStream; /*-
import java.io.FileNotFoundException; * #%L
import java.io.FileOutputStream; * org.hl7.fhir.dstu2
import java.io.IOException; * %%
* Copyright (C) 2014 - 2019 Health Level 7
import org.hl7.fhir.exceptions.FHIRFormatError; * %%
import org.apache.commons.lang3.StringUtils; * Licensed under the Apache License, Version 2.0 (the "License");
import org.hl7.fhir.dstu2.formats.JsonParser; * you may not use this file except in compliance with the License.
import org.hl7.fhir.dstu2.model.Bundle; * You may obtain a copy of the License at
import org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent; *
import org.hl7.fhir.dstu2.model.Resource; * http://www.apache.org/licenses/LICENSE-2.0
import org.hl7.fhir.dstu2.model.ValueSet; *
import org.hl7.fhir.utilities.Utilities; * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
public class Unbundler { * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
public static void main(String[] args) throws Exception { * limitations under the License.
unbundle(args[0]); * #L%
} */
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException {
String folder = Utilities.getDirectoryForFile(src); import java.io.FileInputStream;
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src)); import java.io.FileNotFoundException;
for (BundleEntryComponent be : bnd.getEntry()) { import java.io.FileOutputStream;
Resource r = be.getResource(); import java.io.IOException;
if (r != null) {
if (StringUtils.isBlank(r.getId())) { import org.hl7.fhir.exceptions.FHIRFormatError;
if (r instanceof ValueSet) import org.apache.commons.lang3.StringUtils;
r.setId(tail((ValueSet) r)); import org.hl7.fhir.dstu2.formats.JsonParser;
} import org.hl7.fhir.dstu2.model.Bundle;
if (!StringUtils.isBlank(r.getId())) { import org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent;
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json"); import org.hl7.fhir.dstu2.model.Resource;
new JsonParser().compose(new FileOutputStream(tgt), r); import org.hl7.fhir.dstu2.model.ValueSet;
} import org.hl7.fhir.utilities.Utilities;
}
} public class Unbundler {
}
public static void main(String[] args) throws Exception {
private static String tail(ValueSet r) { unbundle(args[0]);
return r.getUrl().contains("/") ? r.getUrl().substring(r.getUrl().lastIndexOf("/")+1) : null; }
}
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException {
} String folder = Utilities.getDirectoryForFile(src);
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src));
for (BundleEntryComponent be : bnd.getEntry()) {
Resource r = be.getResource();
if (r != null) {
if (StringUtils.isBlank(r.getId())) {
if (r instanceof ValueSet)
r.setId(tail((ValueSet) r));
}
if (!StringUtils.isBlank(r.getId())) {
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json");
new JsonParser().compose(new FileOutputStream(tgt), r);
}
}
}
}
private static String tail(ValueSet r) {
return r.getUrl().contains("/") ? r.getUrl().substring(r.getUrl().lastIndexOf("/")+1) : null;
}
}

View File

@ -1,45 +1,66 @@
package org.hl7.fhir.dstu2016may.utils; package org.hl7.fhir.dstu2016may.utils;
import java.io.FileInputStream; /*-
import java.io.FileNotFoundException; * #%L
import java.io.FileOutputStream; * org.hl7.fhir.dstu2016may
import java.io.IOException; * %%
* Copyright (C) 2014 - 2019 Health Level 7
import org.hl7.fhir.exceptions.FHIRFormatError; * %%
import org.apache.commons.lang3.StringUtils; * Licensed under the Apache License, Version 2.0 (the "License");
import org.hl7.fhir.dstu2016may.model.ValueSet; * you may not use this file except in compliance with the License.
import org.hl7.fhir.dstu2016may.formats.JsonParser; * You may obtain a copy of the License at
import org.hl7.fhir.dstu2016may.model.Bundle; *
import org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent; * http://www.apache.org/licenses/LICENSE-2.0
import org.hl7.fhir.dstu2016may.model.Resource; *
import org.hl7.fhir.utilities.Utilities; * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
public class Unbundler { * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
public static void main(String[] args) throws Exception { * limitations under the License.
unbundle(args[0]); * #L%
} */
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException {
String folder = Utilities.getDirectoryForFile(src); import java.io.FileInputStream;
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src)); import java.io.FileNotFoundException;
for (BundleEntryComponent be : bnd.getEntry()) { import java.io.FileOutputStream;
Resource r = be.getResource(); import java.io.IOException;
if (r != null) {
if (StringUtils.isBlank(r.getId())) { import org.hl7.fhir.exceptions.FHIRFormatError;
if (r instanceof ValueSet) import org.apache.commons.lang3.StringUtils;
r.setId(tail((ValueSet) r)); import org.hl7.fhir.dstu2016may.model.ValueSet;
} import org.hl7.fhir.dstu2016may.formats.JsonParser;
if (!StringUtils.isBlank(r.getId())) { import org.hl7.fhir.dstu2016may.model.Bundle;
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json"); import org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent;
new JsonParser().compose(new FileOutputStream(tgt), r); import org.hl7.fhir.dstu2016may.model.Resource;
} import org.hl7.fhir.utilities.Utilities;
}
} public class Unbundler {
}
public static void main(String[] args) throws Exception {
private static String tail(ValueSet r) { unbundle(args[0]);
return r.getUrl().contains("/") ? r.getUrl().substring(r.getUrl().lastIndexOf("/")+1) : null; }
}
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException {
} String folder = Utilities.getDirectoryForFile(src);
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src));
for (BundleEntryComponent be : bnd.getEntry()) {
Resource r = be.getResource();
if (r != null) {
if (StringUtils.isBlank(r.getId())) {
if (r instanceof ValueSet)
r.setId(tail((ValueSet) r));
}
if (!StringUtils.isBlank(r.getId())) {
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json");
new JsonParser().compose(new FileOutputStream(tgt), r);
}
}
}
}
private static String tail(ValueSet r) {
return r.getUrl().contains("/") ? r.getUrl().substring(r.getUrl().lastIndexOf("/")+1) : null;
}
}

View File

@ -1,33 +1,54 @@
package org.hl7.fhir.dstu3.utils; package org.hl7.fhir.dstu3.utils;
import java.io.FileInputStream; /*-
import java.io.FileNotFoundException; * #%L
import java.io.FileOutputStream; * org.hl7.fhir.dstu3
import java.io.IOException; * %%
* Copyright (C) 2014 - 2019 Health Level 7
import org.hl7.fhir.exceptions.FHIRFormatError; * %%
import org.hl7.fhir.dstu3.formats.JsonParser; * Licensed under the Apache License, Version 2.0 (the "License");
import org.hl7.fhir.dstu3.model.Bundle; * you may not use this file except in compliance with the License.
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; * You may obtain a copy of the License at
import org.hl7.fhir.dstu3.model.Resource; *
import org.hl7.fhir.utilities.Utilities; * http://www.apache.org/licenses/LICENSE-2.0
*
public class Unbundler { * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
public static void main(String[] args) throws Exception { * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
unbundle(args[0]); * See the License for the specific language governing permissions and
} * limitations under the License.
* #L%
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException { */
String folder = Utilities.getDirectoryForFile(src);
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src));
for (BundleEntryComponent be : bnd.getEntry()) { import java.io.FileInputStream;
Resource r = be.getResource(); import java.io.FileNotFoundException;
if (r != null) { import java.io.FileOutputStream;
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json"); import java.io.IOException;
new JsonParser().compose(new FileOutputStream(tgt), r);
} import org.hl7.fhir.exceptions.FHIRFormatError;
} import org.hl7.fhir.dstu3.formats.JsonParser;
} import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
} import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.utilities.Utilities;
public class Unbundler {
public static void main(String[] args) throws Exception {
unbundle(args[0]);
}
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException {
String folder = Utilities.getDirectoryForFile(src);
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src));
for (BundleEntryComponent be : bnd.getEntry()) {
Resource r = be.getResource();
if (r != null) {
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json");
new JsonParser().compose(new FileOutputStream(tgt), r);
}
}
}
}

View File

@ -1,48 +1,69 @@
package org.hl7.fhir.r4.utils; package org.hl7.fhir.r4.utils;
import java.io.File; /*-
import java.io.FileInputStream; * #%L
import java.io.FileNotFoundException; * org.hl7.fhir.r4
import java.io.FileOutputStream; * %%
import java.io.IOException; * Copyright (C) 2014 - 2019 Health Level 7
* %%
import org.apache.commons.lang3.StringUtils; * Licensed under the Apache License, Version 2.0 (the "License");
import org.hl7.fhir.r4.model.ValueSet; * you may not use this file except in compliance with the License.
import org.hl7.fhir.exceptions.FHIRFormatError; * You may obtain a copy of the License at
import org.hl7.fhir.r4.formats.JsonParser; *
import org.hl7.fhir.r4.model.Bundle; * http://www.apache.org/licenses/LICENSE-2.0
import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; *
import org.hl7.fhir.r4.model.MetadataResource; * Unless required by applicable law or agreed to in writing, software
import org.hl7.fhir.r4.model.Resource; * distributed under the License is distributed on an "AS IS" BASIS,
import org.hl7.fhir.utilities.Utilities; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
public class Unbundler { * limitations under the License.
* #L%
public static void main(String[] args) throws Exception { */
unbundle(args[0]);
}
import java.io.File;
import java.io.FileInputStream;
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException { import java.io.FileNotFoundException;
String folder = Utilities.getDirectoryForFile(src); import java.io.FileOutputStream;
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src)); import java.io.IOException;
for (BundleEntryComponent be : bnd.getEntry()) {
Resource r = be.getResource(); import org.apache.commons.lang3.StringUtils;
if (r != null) { import org.hl7.fhir.r4.model.ValueSet;
if (StringUtils.isBlank(r.getId())) { import org.hl7.fhir.exceptions.FHIRFormatError;
if (r instanceof MetadataResource) import org.hl7.fhir.r4.formats.JsonParser;
r.setId(tail((MetadataResource) r)); import org.hl7.fhir.r4.model.Bundle;
} import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent;
if (!StringUtils.isBlank(r.getId())) { import org.hl7.fhir.r4.model.MetadataResource;
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json"); import org.hl7.fhir.r4.model.Resource;
if (!new File(tgt).exists()) import org.hl7.fhir.utilities.Utilities;
new JsonParser().compose(new FileOutputStream(tgt), r);
} public class Unbundler {
}
} public static void main(String[] args) throws Exception {
} unbundle(args[0]);
}
private static String tail(MetadataResource r) {
return r.getUrl().contains("/") ? r.getUrl().substring(r.getUrl().lastIndexOf("/")+1) : null;
} private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException {
} String folder = Utilities.getDirectoryForFile(src);
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src));
for (BundleEntryComponent be : bnd.getEntry()) {
Resource r = be.getResource();
if (r != null) {
if (StringUtils.isBlank(r.getId())) {
if (r instanceof MetadataResource)
r.setId(tail((MetadataResource) r));
}
if (!StringUtils.isBlank(r.getId())) {
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json");
if (!new File(tgt).exists())
new JsonParser().compose(new FileOutputStream(tgt), r);
}
}
}
}
private static String tail(MetadataResource r) {
return r.getUrl().contains("/") ? r.getUrl().substring(r.getUrl().lastIndexOf("/")+1) : null;
}
}

View File

@ -1,5 +1,25 @@
package org.hl7.fhir.r5.openapi; package org.hl7.fhir.r5.openapi;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;

View File

@ -1,5 +1,25 @@
package org.hl7.fhir.r5.utils; package org.hl7.fhir.r5.utils;
/*-
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;

View File

@ -1,33 +1,54 @@
package org.hl7.fhir.r5.utils; package org.hl7.fhir.r5.utils;
import java.io.FileInputStream; /*-
import java.io.FileNotFoundException; * #%L
import java.io.FileOutputStream; * org.hl7.fhir.r5
import java.io.IOException; * %%
* Copyright (C) 2014 - 2019 Health Level 7
import org.hl7.fhir.exceptions.FHIRFormatError; * %%
import org.hl7.fhir.r5.formats.JsonParser; * Licensed under the Apache License, Version 2.0 (the "License");
import org.hl7.fhir.r5.model.Bundle; * you may not use this file except in compliance with the License.
import org.hl7.fhir.r5.model.Bundle.BundleEntryComponent; * You may obtain a copy of the License at
import org.hl7.fhir.r5.model.Resource; *
import org.hl7.fhir.utilities.Utilities; * http://www.apache.org/licenses/LICENSE-2.0
*
public class Unbundler { * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
public static void main(String[] args) throws Exception { * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
unbundle(args[0]); * See the License for the specific language governing permissions and
} * limitations under the License.
* #L%
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException { */
String folder = Utilities.getDirectoryForFile(src);
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src));
for (BundleEntryComponent be : bnd.getEntry()) { import java.io.FileInputStream;
Resource r = be.getResource(); import java.io.FileNotFoundException;
if (r != null) { import java.io.FileOutputStream;
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json"); import java.io.IOException;
new JsonParser().compose(new FileOutputStream(tgt), r);
} import org.hl7.fhir.exceptions.FHIRFormatError;
} import org.hl7.fhir.r5.formats.JsonParser;
} import org.hl7.fhir.r5.model.Bundle;
import org.hl7.fhir.r5.model.Bundle.BundleEntryComponent;
} import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.utilities.Utilities;
public class Unbundler {
public static void main(String[] args) throws Exception {
unbundle(args[0]);
}
private static void unbundle(String src) throws FHIRFormatError, FileNotFoundException, IOException {
String folder = Utilities.getDirectoryForFile(src);
Bundle bnd = (Bundle) new JsonParser().parse(new FileInputStream(src));
for (BundleEntryComponent be : bnd.getEntry()) {
Resource r = be.getResource();
if (r != null) {
String tgt = Utilities.path(folder, r.fhirType()+"-"+r.getId()+".json");
new JsonParser().compose(new FileOutputStream(tgt), r);
}
}
}
}

View File

@ -1,5 +1,25 @@
package org.hl7.fhir.utilities; package org.hl7.fhir.utilities;
/*-
* #%L
* org.hl7.fhir.utilities
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem; import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.SourceDataLine;

View File

@ -1,5 +1,25 @@
package org.hl7.fhir.utilities; package org.hl7.fhir.utilities;
/*-
* #%L
* org.hl7.fhir.utilities
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import net.sf.saxon.TransformerFactoryImpl; import net.sf.saxon.TransformerFactoryImpl;
import javax.xml.transform.Transformer; import javax.xml.transform.Transformer;

View File

@ -1,5 +1,25 @@
package org.hl7.fhir.r5.validation; package org.hl7.fhir.r5.validation;
/*-
* #%L
* org.hl7.fhir.validation
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.*; import java.util.*;
import java.util.stream.*; import java.util.stream.*;

View File

@ -9,9 +9,9 @@ package org.hl7.fhir.r5.validation;
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.