This commit is contained in:
parent
812e513854
commit
d9e21a7192
|
@ -32,6 +32,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ca.uhn.fhir.model.api.ICompositeDatatype;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
|
@ -364,6 +365,11 @@ public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefini
|
|||
if (nextChild.getChildType() != null && IPrimitiveDatatype.class.isAssignableFrom(nextChild.getChildType())) {
|
||||
RuntimePrimitiveDatatypeDefinition pdef = (RuntimePrimitiveDatatypeDefinition) nextChild.getSingleChildOrThrow();
|
||||
defn.getDefinition().addType().setCode(DataTypeEnum.VALUESET_BINDER.fromCodeString(pdef.getName()));
|
||||
}
|
||||
else if (nextChild.getChildType() != null && ICompositeDatatype.class.isAssignableFrom(nextChild.getChildType())) {
|
||||
RuntimeCompositeDatatypeDefinition pdef = (RuntimeCompositeDatatypeDefinition) nextChild.getSingleChildOrThrow();
|
||||
defn.getDefinition().addType().setCode(DataTypeEnum.VALUESET_BINDER.fromCodeString(pdef.getName()));
|
||||
|
||||
} else {
|
||||
RuntimeResourceBlockDefinition pdef = (RuntimeResourceBlockDefinition) nextChild.getSingleChildOrThrow();
|
||||
scanForExtensions(theProfile, pdef);
|
||||
|
|
|
@ -79,7 +79,8 @@ public class RuntimeResourceDefinitionTest {
|
|||
assertEquals("ResourceWithExtensionsA.extension", element.get(2).getPath().getValue());
|
||||
assertEquals("ResourceWithExtensionsA.extension", element.get(3).getPath().getValue());
|
||||
assertEquals("ResourceWithExtensionsA.extension", element.get(4).getPath().getValue());
|
||||
assertEquals("ResourceWithExtensionsA.modifierExtension", element.get(5).getPath().getValue());
|
||||
assertEquals("ResourceWithExtensionsA.extension", element.get(5).getPath().getValue());
|
||||
assertEquals("ResourceWithExtensionsA.modifierExtension", element.get(6).getPath().getValue());
|
||||
|
||||
assertEquals(DataTypeEnum.EXTENSION, element.get(1).getDefinition().getType().get(0).getCode().getValueAsEnum());
|
||||
assertEquals("url", element.get(1).getSlicing().getDiscriminator().getValue());
|
||||
|
@ -87,7 +88,7 @@ public class RuntimeResourceDefinitionTest {
|
|||
assertEquals(DataTypeEnum.EXTENSION, element.get(2).getDefinition().getType().get(0).getCode().getValueAsEnum());
|
||||
assertEquals("#f1", element.get(2).getDefinition().getType().get(0).getProfile().getValueAsString());
|
||||
|
||||
assertEquals("ResourceWithExtensionsA.identifier", element.get(12).getPath().getValue());
|
||||
assertEquals("ResourceWithExtensionsA.identifier", element.get(13).getPath().getValue());
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue