Open draakhan opened 8 years ago
@draakhan according to FHIR documentation: "For a failed transaction, the server returns a single OperationOutcome instead of a Bundle" http://hl7-fhir.github.io/http.html#transaction-response appropriate test here https://github.com/fhirbase/fhirbase-plv8/blob/0eef311f107ca8f32061e5df40ff5538b6716cad/test/integration/issues/124_spec.coffee#L8 if not, feel free to reopen
@danil It looks that single OperationOutcome is contrary to: http://hl7-fhir.github.io/bundle.html#transaction-response
Here is my next example for transaction with more than one operation:
fhirbase=# select fhir_transaction('{
fhirbase'# "resourceType": "Bundle",
fhirbase'# "type": "transaction",
fhirbase'# "entry": [
fhirbase'# {
fhirbase'# "resource": {
fhirbase'# "resourceType": "UnknownResource",
fhirbase'# "active": true,
fhirbase'# "name": [
fhirbase'# {
fhirbase'# "use": "official",
fhirbase'# "family": [
fhirbase'# "Snow"
fhirbase'# ],
fhirbase'# "given": [
fhirbase'# "John"
fhirbase'# ]
fhirbase'# }
fhirbase'# ],
fhirbase'# "gender": "male",
fhirbase'# "birthDate": "2001-01-01"
fhirbase'# },
fhirbase'# "request": {
fhirbase'# "method": "POST",
fhirbase'# "url": "UnknownResource"
fhirbase'# }
fhirbase'# },
fhirbase'# {
fhirbase'# "resource": {
fhirbase'# "resourceType": "Patient",
fhirbase'# "active": true,
fhirbase'# "name": [
fhirbase'# {
fhirbase'# "use": "official",
fhirbase'# "family": [
fhirbase'# "Snow"
fhirbase'# ],
fhirbase'# "given": [
fhirbase'# "John"
fhirbase'# ]
fhirbase'# }
fhirbase'# ],
fhirbase'# "gender": "male",
fhirbase'# "birthDate": "2001-01-01"
fhirbase'# },
fhirbase'# "request": {
fhirbase'# "method": "POST",
fhirbase'# "url": "Patient"
fhirbase'# }
fhirbase'# }
fhirbase'# ]
fhirbase'# }');
-[ RECORD 1 ]----+-------------------------------------------------------------------------------------------------------------------------------------------------
fhir_transaction | {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"not-supported","diagnostics":"Storage for UnknownResource not exists"}]}
It could be more useful for developing and supporting transaction when in case of error we'll have response for every operation in transaction.
@draakhan do you suggest to ignore http://hl7-fhir.github.io/http.html#transaction-response ?
Yes, I think about ignoring it and conforming only to http://hl7-fhir.github.io/bundle.html#transaction-response . On the other hand, a diagnostic message from OperationOutcome, if it is added to Bundle.entry.response for failed operations, it will be useful too.
@draakhan
Yes, I think about ignoring it and conforming only to http://hl7-fhir.github.io/bundle.html#transaction-response .
i should first consult with team about this
Hi!
Issue connected with #119, but my case is related to errors during transaction:
Trying to create resource of non-existing type:
a response
The response doesn't conform specification at: https://www.hl7.org/fhir/bundle-response.json.html
Tested on v.1.3.0.15