Closed Andrzej-Pietrzak closed 8 years ago
As we can do the transaction on client level we still need this to return proper result even when failure occurs
@Andrzej-Pietrzak @bartek-sarul fixed in v1.3.0.15 https://github.com/fhirbase/fhirbase-plv8/blob/v1.3.0.15/test/integration_spec.coffee#L828 if not, feel free to reopen
SELECT fhir_create_resource('{"allowId": true, "resource": {"id": "id1", "resourceType": "Patient","name": [{"given": ["Jim"]}], "identifier": [{"use": "official", "value": "0987", "system": "test"}]}}');
-- delete the existing patient, post a new one and then a failing create with update (supplied with different order) SELECT fhir_transaction('{"resourceType":"Bundle","id":"bundle-transaction","type":"transaction","entry":[{"resource":{"resourceType":"Patient","name":[{"use":"official","family":["Chalmers"],"given":["Peter","James"]}],"gender":"male","birthDate":"1974-12-25","active":true},"request":{"method":"POST","url":"/Patient"}},{"resource":{"name":[{"use":"official","family":["Martin"],"given":["Bob"]}],"gender":"male","birthDate":"1955-05-05","active":true},"request":{"method":"PUT","url":"/Patient/1234"}},{"request":{"method":"DELETE","url":"/Patient/id1"}}]}'); SELECT fhir_read_resource('{"resourceType": "Patient", "id": "id1"}'); -- nok, delete was commited