Hi Travis,
I am still having troubles to get it work. I wonder if you can take a look.
When I sent a bundle with just one Observation resource, using api.transaction({data: aBundle}), the server returned an error:
Cannot cast object '5852b7460cf2878b2b12f9b1' with class 'java.lang.String' to class 'org.hl7.fhir.instance.model.api.IIdType'
The the sample data is listed below:
{
"resourceType":"Bundle",
"type":"transaction",
"id":"a_bundle_id",
"entry":[
{
"resource":{
"resourceType":"Observation",
"status":"final",
"code":{
"coding":[
{
"code":"2710-2"
}
],
"text":"SaO2 % BldC Oximetry"
},
"valueQuantity":{
"value":"5",
"unit":"%",
"code":"%"
},
"subject":{
"reference":"Patient/hca-pat-32",
"display":"Brittany Newman"
}
},
"request":{
"method":"POST",
"url":"Observation"
}
}
]
}
I tried to changing some data in the above sample, like adding/removing "id"/subject/fullUrl and etc. It didn't make a difference.
However it works fine when I send the same resource in the "entry" to be created directly using api.create({resource: aResource}).
Thank you.
Ye