Merge pull request #800 from hapifhir/gg-202204-xver
fix problem with non-new data types on xver extensions
This commit is contained in:
commit
f8d869172c
|
@ -146,25 +146,27 @@ public class XVerExtensionManager {
|
||||||
public void populateTypes(JsonObject path, ElementDefinition val, String verSource, String verTarget) {
|
public void populateTypes(JsonObject path, ElementDefinition val, String verSource, String verTarget) {
|
||||||
for (JsonElement i : path.getAsJsonArray("types")) {
|
for (JsonElement i : path.getAsJsonArray("types")) {
|
||||||
String s = i.getAsString();
|
String s = i.getAsString();
|
||||||
if (s.contains("(")) {
|
if (!s.startsWith("!")) {
|
||||||
String t = s.substring(0, s.indexOf("("));
|
if (s.contains("(")) {
|
||||||
TypeRefComponent tr = val.addType().setCode(translateDataType(verTarget, t));
|
String t = s.substring(0, s.indexOf("("));
|
||||||
if (hasTargets(tr.getCode()) ) {
|
TypeRefComponent tr = val.addType().setCode(translateDataType(verTarget, t));
|
||||||
s = s.substring(t.length()+1);
|
if (hasTargets(tr.getCode()) ) {
|
||||||
for (String p : s.substring(0, s.length()-1).split("\\|")) {
|
s = s.substring(t.length()+1);
|
||||||
if ("Any".equals(p)) {
|
for (String p : s.substring(0, s.length()-1).split("\\|")) {
|
||||||
tr.addTargetProfile("http://hl7.org/fhir/StructureDefinition/Resource");
|
if ("Any".equals(p)) {
|
||||||
} else if (p.contains(",")) {
|
tr.addTargetProfile("http://hl7.org/fhir/StructureDefinition/Resource");
|
||||||
for (String pp : p.split("\\,")) {
|
} else if (p.contains(",")) {
|
||||||
tr.addTargetProfile("http://hl7.org/fhir/StructureDefinition/"+pp);
|
for (String pp : p.split("\\,")) {
|
||||||
|
tr.addTargetProfile("http://hl7.org/fhir/StructureDefinition/"+pp);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tr.addTargetProfile("http://hl7.org/fhir/StructureDefinition/"+p);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
tr.addTargetProfile("http://hl7.org/fhir/StructureDefinition/"+p);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
val.addType().setCode(translateDataType(verTarget, s));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
val.addType().setCode(translateDataType(verTarget, s));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue