fix bug raising error when processing bundles
This commit is contained in:
parent
6e4bbe60fe
commit
2c22d8fa23
|
@ -75,15 +75,15 @@ public class Element extends Base {
|
|||
CONTAINED, BUNDLE_ENTRY, BUNDLE_OUTCOME, PARAMETER;
|
||||
|
||||
public static SpecialElement fromProperty(Property property) {
|
||||
if (property.getStructure().getIdElement().getIdPart().equals("Parameters"))
|
||||
if (property.getStructure().getType().equals("Parameters"))
|
||||
return PARAMETER;
|
||||
if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("resource"))
|
||||
if (property.getStructure().getType().equals("Bundle") && property.getName().equals("resource"))
|
||||
return BUNDLE_ENTRY;
|
||||
if (property.getStructure().getIdElement().getIdPart().equals("Bundle") && property.getName().equals("outcome"))
|
||||
if (property.getStructure().getType().equals("Bundle") && property.getName().equals("outcome"))
|
||||
return BUNDLE_OUTCOME;
|
||||
if (property.getName().equals("contained"))
|
||||
return CONTAINED;
|
||||
throw new Error("Unknown resource containing a native resource: "+property.getDefinition().getId());
|
||||
throw new FHIRException("Unknown resource containing a native resource: "+property.getDefinition().getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue