Stream: hapi
Topic: saving bundle
David Hay (Jun 06 2019 at 00:35):
I'm having an issue saving bundles to the hapi R3 server. (POST http://hapi.fhir.org/baseDstu3/Bundle)
The bundle below is saved, but the Patient resource is empty. Other resources seem to be saved OK (I deleted all the others to find out what was happening). The patient resource itself saves OK (POST http://hapi.fhir.org/baseDstu3/Patient)
Here's what I get back:
... <entry> <fullUrl value="urn:uuid:180f219f-97a8-486d-99d9-ed631fe4fc99"/> </entry> ...
Here's the bundle
<?xml version="1.0" encoding="UTF-8"?> <Bundle xmlns="http://hl7.org/fhir"> <type value="collection"/> <entry> <fullUrl value="urn:uuid:180f219f-97a8-486d-99d9-ed631fe4fc99"/> <Patient xmlns="http://hl7.org/fhir"> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"> <p> <h2>Patient: Adam Everyman, M, 1987-02-17</h2> Nat.id 1020304050, AlphaId 622883245 </p> </div> </text> <id value='dhay'></id> <name> <family value="Everyman"/> <given value="Adam"/> <prefix value="Mr."/> </name> </Patient> </entry> </Bundle>
James Agnew (Jun 06 2019 at 01:37):
You're missing the <resource>
tag around Patient the resource itself. :)
James Agnew (Jun 06 2019 at 01:38):
I.e. it should look like this: http://hapi.fhir.org/baseDstu3/Bundle/1953572?_format=html/xml
David Hay (Jun 06 2019 at 02:32):
How embarrassing... <blush/>
Last updated: Apr 12 2022 at 19:14 UTC