Stream: hapi
Topic: Remove contained from resource
Kevin Mayfield (Mar 16 2017 at 12:25):
Using Dstu2 latest HAPI. I'm working with an API call which returns a number of contained resources and I want to turn this into a Bundle with the contained resources moved from the ReferralRequest resource into the bundle (alongside the Binary resources which I also retrieve). This bit woks ok but I can't remove the original contained resources in the ReferralRequest. Have tried referral.getContained().getContainedResources().clear();
Kevin Mayfield (Mar 16 2017 at 12:26):
referral.getContained().getContainedResources().remove(c)
Kevin Mayfield (Mar 16 2017 at 12:27):
Any others? I'm tempted to turn the resource into json and delete them that way
Kevin Mayfield (Mar 16 2017 at 13:33):
The answer was to alter the resource id's.
Last updated: Apr 12 2022 at 19:14 UTC