work around issue where constraint.source is not populated properly in base packages
This commit is contained in:
parent
1da57be1c0
commit
bdad4d9a6b
|
@ -589,7 +589,18 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
for (ElementDefinition ed : derived.getSnapshot().getElement()) {
|
for (ElementDefinition ed : derived.getSnapshot().getElement()) {
|
||||||
for (ElementDefinitionMappingComponent mm : ed.getMapping()) {
|
for (ElementDefinitionMappingComponent mm : ed.getMapping()) {
|
||||||
mm.setMap(mm.getMap().trim());
|
mm.setMap(mm.getMap().trim());
|
||||||
|
}
|
||||||
|
for (ElementDefinitionConstraintComponent s : ed.getConstraint()) {
|
||||||
|
if (s.hasSource()) {
|
||||||
|
String ref = s.getSource();
|
||||||
|
if (!Utilities.isAbsoluteUrl(ref)) {
|
||||||
|
if (ref.contains(".")) {
|
||||||
|
s.setSource("http://hl7.org/fhir/StructureDefinition/"+ref.substring(0, ref.indexOf("."))+"#"+ref);
|
||||||
|
} else {
|
||||||
|
s.setSource("http://hl7.org/fhir/StructureDefinition/"+ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (derived.getDerivation() == TypeDerivationRule.SPECIALIZATION) {
|
if (derived.getDerivation() == TypeDerivationRule.SPECIALIZATION) {
|
||||||
|
|
Loading…
Reference in New Issue