Replaced hard-coded extension reference with constant value
This commit is contained in:
parent
4c82c9c738
commit
335800c932
|
@ -249,8 +249,8 @@ public class Analyser {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getTypename(TypeRefComponent type) throws Exception {
|
protected String getTypename(TypeRefComponent type) throws Exception {
|
||||||
if (type.hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type")) {
|
if (type.hasExtension(ToolingExtensions.EXT_FHIR_TYPE)) {
|
||||||
return type.getExtensionString("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type");
|
return type.getExtensionString(ToolingExtensions.EXT_FHIR_TYPE);
|
||||||
} else {
|
} else {
|
||||||
return getTypeName(type.getCode());
|
return getTypeName(type.getCode());
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,8 +172,8 @@ public class JavaBaseGenerator extends OutputStreamWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getTypename(TypeRefComponent type) throws Exception {
|
protected String getTypename(TypeRefComponent type) throws Exception {
|
||||||
if (type.hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type")) {
|
if (type.hasExtension(ToolingExtensions.EXT_FHIR_TYPE)) {
|
||||||
return type.getExtensionString("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type");
|
return type.getExtensionString(ToolingExtensions.EXT_FHIR_TYPE);
|
||||||
} else {
|
} else {
|
||||||
return getTypeName(type.getCode());
|
return getTypeName(type.getCode());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1871,7 +1871,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
for (StructureDefinitionContextComponent ctxt : list) {
|
for (StructureDefinitionContextComponent ctxt : list) {
|
||||||
res.add(ctxt.copy());
|
res.add(ctxt.copy());
|
||||||
}
|
}
|
||||||
if ("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type".equals(extUrl)) {
|
if (ToolingExtensions.EXT_FHIR_TYPE.equals(extUrl)) {
|
||||||
list.get(0).setExpression("ElementDefinition.type");
|
list.get(0).setExpression("ElementDefinition.type");
|
||||||
}
|
}
|
||||||
// the history of this is a mess - see https://jira.hl7.org/browse/FHIR-13328
|
// the history of this is a mess - see https://jira.hl7.org/browse/FHIR-13328
|
||||||
|
|
|
@ -133,8 +133,8 @@ public class StructureDefinitionValidator extends BaseValidator {
|
||||||
typeMustSupport = true;
|
typeMustSupport = true;
|
||||||
}
|
}
|
||||||
String tc = type.getChildValue("code");
|
String tc = type.getChildValue("code");
|
||||||
if (type.hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type")) {
|
if (type.hasExtension(ToolingExtensions.EXT_FHIR_TYPE)) {
|
||||||
tc = type.getExtensionValue("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type").primitiveValue();
|
tc = type.getExtensionValue(ToolingExtensions.EXT_FHIR_TYPE).primitiveValue();
|
||||||
}
|
}
|
||||||
if (Utilities.noString(tc) && type.hasChild("code")) {
|
if (Utilities.noString(tc) && type.hasChild("code")) {
|
||||||
if (type.getNamedChild("code").hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type")) {
|
if (type.getNamedChild("code").hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type")) {
|
||||||
|
|
Loading…
Reference in New Issue