From 061243b5c703b2080e4c2a5e28db8fb6847a381f Mon Sep 17 00:00:00 2001 From: James Agnew Date: Sun, 8 May 2016 13:11:55 -0400 Subject: [PATCH] Allow delete bundle to contain multiple deletes for the same resource --- .../jpa/dao/dstu3/FhirSystemDaoDstu3.java | 14 +- .../dstu3/SystemProviderDstu3Test.java | 175 +++++++-- .../test/resources/brian_reinhold_bundle.json | 77 ++++ .../resources/brian_reinhold_bundle2.json | 334 ++++++++++++++++++ pom.xml | 46 +-- src/changes/changes.xml | 4 + 6 files changed, 571 insertions(+), 79 deletions(-) create mode 100644 hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle.json create mode 100644 hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle2.json diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java index 8e00bafe664..dcb63c72a0c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.HashMap; +import java.util.HashSet; import java.util.IdentityHashMap; import java.util.Iterator; import java.util.LinkedHashSet; @@ -326,7 +327,7 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao { } Collections.sort(theRequest.getEntry(), new TransactionSorter()); - List deletedResources = new ArrayList(); + Set deletedResources = new HashSet(); List deleteConflicts = new ArrayList(); /* @@ -400,14 +401,17 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao { ca.uhn.fhir.jpa.dao.IFhirResourceDao dao = toDao(parts, verb.toCode(), url); int status = Constants.STATUS_HTTP_204_NO_CONTENT; if (parts.getResourceId() != null) { - ResourceTable deleted = dao.delete(new IdType(parts.getResourceType(), parts.getResourceId()), deleteConflicts, theRequestDetails); - if (deleted != null) { - deletedResources.add(deleted.getIdDt().toUnqualifiedVersionless()); + IdType deleteId = new IdType(parts.getResourceType(), parts.getResourceId()); + if (!deletedResources.contains(deleteId.getValueAsString())) { + ResourceTable deleted = dao.delete(deleteId, deleteConflicts, theRequestDetails); + if (deleted != null) { + deletedResources.add(deleteId.getValueAsString()); + } } } else { List allDeleted = dao.deleteByUrl(parts.getResourceType() + '?' + parts.getParams(), deleteConflicts, theRequestDetails); for (ResourceTable deleted : allDeleted) { - deletedResources.add(deleted.getIdDt().toUnqualifiedVersionless()); + deletedResources.add(deleted.getIdDt().toUnqualifiedVersionless().getValueAsString()); } if (allDeleted.isEmpty()) { status = Constants.STATUS_HTTP_404_NOT_FOUND; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderDstu3Test.java index 77ff3e151b0..66a3ff7675a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/SystemProviderDstu3Test.java @@ -9,11 +9,13 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import java.io.IOException; import java.io.InputStream; import java.util.concurrent.TimeUnit; import org.apache.commons.io.IOUtils; import org.apache.http.Header; +import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; @@ -35,6 +37,7 @@ import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.Observation; import org.hl7.fhir.dstu3.model.OperationDefinition; import org.hl7.fhir.dstu3.model.OperationOutcome; +import org.hl7.fhir.dstu3.model.Organization; import org.hl7.fhir.dstu3.model.Parameters; import org.hl7.fhir.dstu3.model.Patient; import org.hl7.fhir.dstu3.model.StringType; @@ -48,6 +51,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.jpa.dao.DaoMethodOutcome; import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test; import ca.uhn.fhir.jpa.provider.SystemProviderDstu2Test; import ca.uhn.fhir.jpa.rp.dstu3.ObservationResourceProvider; @@ -60,6 +64,7 @@ import ca.uhn.fhir.rest.server.EncodingEnum; import ca.uhn.fhir.rest.server.FifoMemoryPagingProvider; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; import ca.uhn.fhir.util.TestUtil; @@ -75,7 +80,109 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { private static Server ourServer; private static String ourServerBase; + @Test + public void testTransactionWithInlineConditionalUrl() throws Exception { + myDaoConfig.setAllowInlineMatchUrlReferences(true); + + Patient p = new Patient(); + p.addName().addFamily("van de Heuvelcx85ioqWJbI").addGiven("Pietercx85ioqWJbI"); + myPatientDao.create(p, mySrd); + + Organization o = new Organization(); + o.addIdentifier().setSystem("urn:oid:2.16.840.1.113883.2.4.6.1").setValue("07-8975469"); + myOrganizationDao.create(o, mySrd); + + //@formatter:off + String input = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + //@formatter:off + + HttpPost req = new HttpPost(ourServerBase); + req.setEntity(new StringEntity(input, ContentType.parse(Constants.CT_FHIR_XML + "; charset=utf-8"))); + + CloseableHttpResponse resp = ourHttpClient.execute(req); + try { + String encoded = IOUtils.toString(resp.getEntity().getContent()); + ourLog.info(encoded); + assertThat(encoded, containsString("transaction-response")); + } finally { + IOUtils.closeQuietly(resp.getEntity().getContent()); + } + + } + + + @Test + public void testTransactionDeleteWithDuplicateDeletes() throws Exception { + myDaoConfig.setAllowInlineMatchUrlReferences(true); + + Patient p = new Patient(); + p.addName().addFamily("van de Heuvelcx85ioqWJbI").addGiven("Pietercx85ioqWJbI"); + IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualifiedVersionless(); + + ourClient.read().resource(Patient.class).withId(id); + + Bundle inputBundle = new Bundle(); + inputBundle.setType(BundleType.TRANSACTION); + inputBundle.addEntry().getRequest().setMethod(HTTPVerb.DELETE).setUrl(id.getValue()); + inputBundle.addEntry().getRequest().setMethod(HTTPVerb.DELETE).setUrl(id.getValue()); + inputBundle.addEntry().getRequest().setMethod(HTTPVerb.DELETE).setUrl("Patient?name=Pietercx85ioqWJbI"); + String input = myFhirCtx.newXmlParser().encodeResourceToString(inputBundle); + + HttpPost req = new HttpPost(ourServerBase + "?_pretty=true"); + req.setEntity(new StringEntity(input, ContentType.parse(Constants.CT_FHIR_XML + "; charset=utf-8"))); + + CloseableHttpResponse resp = ourHttpClient.execute(req); + try { + String encoded = IOUtils.toString(resp.getEntity().getContent()); + ourLog.info(encoded); + + assertThat(encoded, containsString("transaction-response")); + + Bundle response = myFhirCtx.newXmlParser().parseResource(Bundle.class, encoded); + assertEquals(3, response.getEntry().size()); + + } finally { + IOUtils.closeQuietly(resp.getEntity().getContent()); + } + + try { + ourClient.read().resource(Patient.class).withId(id).execute(); + fail(); + } catch (ResourceGoneException e) { + // good + } + + } + + @Before public void beforeStartServer() throws Exception { if (myRestServer == null) { @@ -167,25 +274,25 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { req.setEntity(new StringEntity(bundleStr, ContentType.parse(Constants.CT_FHIR_XML + "; charset=utf-8"))); CloseableHttpResponse resp = ourHttpClient.execute(req); + try { + String encoded = IOUtils.toString(resp.getEntity().getContent()); + ourLog.info(encoded); - String encoded = IOUtils.toString(resp.getEntity().getContent()); - IOUtils.closeQuietly(resp.getEntity().getContent()); - ourLog.info(encoded); - - //@formatter:off - assertThat(encoded, containsString("Questionnaire/54127-6/_history/")); - //@formatter:on + //@formatter:off + assertThat(encoded, containsString("Questionnaire/54127-6/_history/")); + //@formatter:on - for (Header next : resp.getHeaders(RequestValidatingInterceptor.DEFAULT_RESPONSE_HEADER_NAME)) { - ourLog.info(next.toString()); + for (Header next : resp.getHeaders(RequestValidatingInterceptor.DEFAULT_RESPONSE_HEADER_NAME)) { + ourLog.info(next.toString()); + } + } finally { + IOUtils.closeQuietly(resp.getEntity().getContent()); } - } finally { myRestServer.unregisterInterceptor(interceptor); } } - - + @Test public void testEverythingReturnsCorrectFormatInPagingLink() throws Exception { myRestServer.setDefaultResponseEncoding(EncodingEnum.JSON); @@ -202,7 +309,7 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { HttpGet get = new HttpGet(ourServerBase + "/Patient/$everything"); get.addHeader("Accept", "application/xml, text/html"); CloseableHttpResponse http = ourHttpClient.execute(get); - + try { String response = IOUtils.toString(http.getEntity().getContent()); ourLog.info(response); @@ -236,10 +343,10 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { ourLog.info(response); assertThat(response, not(containsString("_format"))); assertEquals(200, http.getStatusLine().getStatusCode()); - + Bundle responseBundle = ourCtx.newXmlParser().parseResource(Bundle.class, response); assertEquals(BundleType.SEARCHSET, responseBundle.getTypeElement().getValue()); - + } finally { http.close(); } @@ -258,10 +365,10 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { } } - @Transactional(propagation=Propagation.NEVER) + @Transactional(propagation = Propagation.NEVER) @Test public void testSuggestKeywords() throws Exception { - + Patient patient = new Patient(); patient.addName().addFamily("testSuggest"); IIdType ptId = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); @@ -276,21 +383,21 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { obs.getSubject().setReferenceElement(ptId); obs.getCode().setText("ZXCVBNM ASDFGHJKL QWERTYUIOPASDFGHJKL"); myObservationDao.update(obs, mySrd); - + HttpGet get = new HttpGet(ourServerBase + "/$suggest-keywords?context=Patient/" + ptId.getIdPart() + "/$everything&searchParam=_content&text=zxc&_pretty=true&_format=xml"); CloseableHttpResponse http = ourHttpClient.execute(get); try { assertEquals(200, http.getStatusLine().getStatusCode()); String output = IOUtils.toString(http.getEntity().getContent()); ourLog.info(output); - + Parameters parameters = ourCtx.newXmlParser().parseResource(Parameters.class, output); assertEquals(2, parameters.getParameter().size()); assertEquals("keyword", parameters.getParameter().get(0).getPart().get(0).getName()); - assertEquals(("ZXCVBNM"), ((StringType)parameters.getParameter().get(0).getPart().get(0).getValue()).getValueAsString()); + assertEquals(("ZXCVBNM"), ((StringType) parameters.getParameter().get(0).getPart().get(0).getValue()).getValueAsString()); assertEquals("score", parameters.getParameter().get(0).getPart().get(1).getName()); - assertEquals(("1.0"), ((DecimalType)parameters.getParameter().get(0).getPart().get(1).getValue()).getValueAsString()); - + assertEquals(("1.0"), ((DecimalType) parameters.getParameter().get(0).getPart().get(1).getValue()).getValueAsString()); + } finally { http.close(); } @@ -306,7 +413,7 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { obs.getSubject().setReferenceElement(ptId); obs.getCode().setText("ZXCVBNM ASDFGHJKL QWERTYUIOPASDFGHJKL"); myObservationDao.create(obs, mySrd); - + HttpGet get = new HttpGet(ourServerBase + "/$suggest-keywords"); CloseableHttpResponse http = ourHttpClient.execute(get); try { @@ -317,7 +424,7 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { } finally { http.close(); } - + get = new HttpGet(ourServerBase + "/$suggest-keywords?context=Patient/" + ptId.getIdPart() + "/$everything"); http = ourHttpClient.execute(get); try { @@ -360,11 +467,11 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { public void testTransactionWithIncompleteBundle() throws Exception { Patient patient = new Patient(); patient.setGender(AdministrativeGender.MALE); - + Bundle bundle = new Bundle(); bundle.setType(BundleType.TRANSACTION); bundle.addEntry().setResource(patient); - + try { ourClient.transaction().withBundle(bundle).prettyPrint().execute(); fail(); @@ -467,20 +574,20 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { @Test public void testTransactionSearch() throws Exception { - for (int i = 0; i < 20; i ++) { + for (int i = 0; i < 20; i++) { Patient p = new Patient(); p.addName().addFamily("PATIENT_" + i); myPatientDao.create(p, mySrd); } - + Bundle req = new Bundle(); req.setType(BundleType.TRANSACTION); req.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl("Patient?"); Bundle resp = ourClient.transaction().withBundle(req).execute(); ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); - + assertEquals(1, resp.getEntry().size()); - Bundle respSub = (Bundle)resp.getEntry().get(0).getResource(); + Bundle respSub = (Bundle) resp.getEntry().get(0).getResource(); assertEquals("self", respSub.getLink().get(0).getRelation()); assertEquals(ourServerBase + "/Patient", respSub.getLink().get(0).getUrl()); assertEquals("next", respSub.getLink().get(1).getRelation()); @@ -491,20 +598,20 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test { @Test public void testTransactionCount() throws Exception { - for (int i = 0; i < 20; i ++) { + for (int i = 0; i < 20; i++) { Patient p = new Patient(); p.addName().addFamily("PATIENT_" + i); myPatientDao.create(p, mySrd); } - + Bundle req = new Bundle(); req.setType(BundleType.TRANSACTION); req.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl("Patient?_summary=count"); Bundle resp = ourClient.transaction().withBundle(req).execute(); ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); - + assertEquals(1, resp.getEntry().size()); - Bundle respSub = (Bundle)resp.getEntry().get(0).getResource(); + Bundle respSub = (Bundle) resp.getEntry().get(0).getResource(); assertEquals(20, respSub.getTotal()); assertEquals(0, respSub.getEntry().size()); } diff --git a/hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle.json b/hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle.json new file mode 100644 index 00000000000..465f166f9e7 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle.json @@ -0,0 +1,77 @@ +{ + "resourceType":"Bundle", + "id":"2016-05-08T09:12:18-04:00", + "type":"transaction", + "entry":[ + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/Observation/OBR_1:1.0.0.2", + "resource":{ + "resourceType":"Observation", + "id":"OBR_1:1.0.0.2", + "status":"final", + "code":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"149530", + "display":"MDC_PULS_OXIM_PULS_RATE" + }, + { + "system":"http://hl7.org/fhir/data-types", + "code":"Quantity", + "display":"Value is a Numeric Data Type integer" + } + ] + }, + "subject":{ + "reference":"Patient/sisansarahId" + }, + "effectiveDateTime":"2016-05-08T09:12:04.441-04:00", + "performer":[ + { + "reference":"Patient/sisansarahId" + } + ], + "valueQuantity":{ + "value":61, + "unit":"bpm", + "system":"urn:iso:std:iso:11073:10101", + "code":"264864" + }, + "device":{ + "reference":"Device/001c050100651437" + }, + "component":[ + { + "code":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"68193", + "display":"MDC_ATTR_SUPPLEMENTAL_TYPES" + }, + { + "code":"code", + "display":"Value is an MDC code" + } + ] + }, + "valueCodeableConcept":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"150588", + "display":"MDC_MODALITY_SPOT" + } + ] + } + } + ] + }, + "request":{ + "method":"POST", + "url":"Observation/1-OBR_1:1.0.0.2" + } + } + ] +} \ No newline at end of file diff --git a/hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle2.json b/hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle2.json new file mode 100644 index 00000000000..c04333e4ebf --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/test/resources/brian_reinhold_bundle2.json @@ -0,0 +1,334 @@ +{ + "resourceType":"Bundle", + "id":"2016-05-08T09:12:18-04:00", + "type":"transaction", + "entry":[ + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/Patient/sisansarahId", + "resource":{ + "resourceType":"Patient", + "id":"sisansarahId", + "identifier":[ + { + "type":{ + "coding":[ + { + "system":"http://hl7.org/fhir/v2/0203", + "code":"MR" + } + ] + }, + "system":"urn:oid:1.2.3.4.5.6.7.8.10", + "value":"sisansarahId" + } + ], + "name":[ + { + "family":[ + "Sisansarah Lorianthah" + ], + "given":[ + "Piggy" + ] + } + ] + }, + "request":{ + "method":"PUT", + "url":"Patient/1-sisansarahId" + } + }, + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/Device/ecde3d4e58532d31", + "resource":{ + "resourceType":"Device", + "id":"ecde3d4e58532d31", + "identifier":[ + { + "system":"urn:iso:std:iso:11073:10101", + "value":"ecde3d4e58532d31" + } + ], + "type":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"531981", + "display":"MDC_MOC_VMS_MDS_AHD" + } + ] + } + }, + "request":{ + "method":"PUT", + "url":"Device/1-ecde3d4e58532d31" + } + }, + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/DeviceComponent/AHD-ecde3d4e58532d31", + "resource":{ + "resourceType":"DeviceComponent", + "id":"AHD-ecde3d4e58532d31", + "type":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"531981", + "display":"MDC_MOC_VMS_MDS_AHD" + } + ] + }, + "identifier":{ + "system":"urn:iso:std:iso:11073:10101", + "value":"ecde3d4e58532d31" + }, + "lastSystemChange":"2016-05-08T09:12:18-04:00", + "source":{ + "reference":"Device/ecde3d4e58532d31" + } + }, + "request":{ + "method":"PUT", + "url":"DeviceComponent/1-AHD-ecde3d4e58532d31" + } + }, + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/Device/001c050100651437", + "resource":{ + "resourceType":"Device", + "id":"001c050100651437", + "identifier":[ + { + "use":"official", + "system":"urn:iso:std:iso:11073:10101", + "value":"001c050100651437", + "assigner":{ + "reference":"IEEE" + } + }, + { + "use":"official", + "system":"urn:iso:std:iso:11073:10101", + "value":"00:1C:05:65:14:37", + "assigner":{ + "reference":"Bluetooth SIG" + } + } + ], + "type":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"528388", + "display":"MDC_DEV_SPEC_PROFILE_PULS_OXIM" + } + ] + }, + "manufacturer":"Nonin Medical, Inc.", + "model":"Model 9560" + }, + "request":{ + "method":"PUT", + "url":"Device/1-001c050100651437" + } + }, + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/DeviceComponent/Agent-001c050100651437", + "resource":{ + "resourceType":"DeviceComponent", + "id":"Agent-001c050100651437", + "type":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"65573", + "display":"MDC_MOC_VMS_MDS_SIMP" + } + ] + }, + "identifier":{ + "use":"official", + "system":"urn:iso:std:iso:11073:10101", + "value":"001c050100651437", + "assigner":{ + "reference":"IEEE" + } + }, + "lastSystemChange":"2016-05-08T09:12:18-04:00", + "source":{ + "reference":"Device/001c050100651437" + }, + "productionSpecification":[ + { + "specType":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"531972", + "display":"MDC_ID_PROD_SPEC_SERIAL" + } + ] + }, + "productionSpec":"0100651437" + }, + { + "specType":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"531976", + "display":"MDC_ID_PROD_SPEC_FW" + } + ] + }, + "productionSpec":"0.99" + } + ] + }, + "request":{ + "method":"PUT", + "url":"DeviceComponent/1-Agent-001c050100651437" + } + }, + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/Observation/OBR_1:1.0.0.1", + "resource":{ + "resourceType":"Observation", + "id":"OBR_1:1.0.0.1", + "status":"final", + "code":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"150456", + "display":"MDC_PULS_OXIM_SAT_O2" + }, + { + "system":"http://hl7.org/fhir/data-types", + "code":"Quantity", + "display":"Value is a Numeric Data Type integer" + } + ] + }, + "subject":{ + "reference":"Patient/sisansarahId" + }, + "effectiveDateTime":"2016-05-08T09:12:04.441-04:00", + "performer":[ + { + "reference":"Patient/sisansarahId" + } + ], + "valueQuantity":{ + "value":98, + "unit":"%25", + "system":"urn:iso:std:iso:11073:10101", + "code":"262688" + }, + "device":{ + "reference":"Device/001c050100651437" + }, + "component":[ + { + "code":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"68193", + "display":"MDC_ATTR_SUPPLEMENTAL_TYPES" + }, + { + "code":"code", + "display":"Value is an MDC code" + } + ] + }, + "valueCodeableConcept":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"150588", + "display":"MDC_MODALITY_SPOT" + } + ] + } + } + ] + }, + "request":{ + "method":"POST", + "url":"Observation/1-OBR_1:1.0.0.1" + } + }, + { + "fullUrl":"http://vha.edmondsci.com:8080/hapi15/baseDstu3/Observation/OBR_1:1.0.0.2", + "resource":{ + "resourceType":"Observation", + "id":"OBR_1:1.0.0.2", + "status":"final", + "code":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"149530", + "display":"MDC_PULS_OXIM_PULS_RATE" + }, + { + "system":"http://hl7.org/fhir/data-types", + "code":"Quantity", + "display":"Value is a Numeric Data Type integer" + } + ] + }, + "subject":{ + "reference":"Patient/sisansarahId" + }, + "effectiveDateTime":"2016-05-08T09:12:04.441-04:00", + "performer":[ + { + "reference":"Patient/sisansarahId" + } + ], + "valueQuantity":{ + "value":61, + "unit":"bpm", + "system":"urn:iso:std:iso:11073:10101", + "code":"264864" + }, + "device":{ + "reference":"Device/001c050100651437" + }, + "component":[ + { + "code":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"68193", + "display":"MDC_ATTR_SUPPLEMENTAL_TYPES" + }, + { + "code":"code", + "display":"Value is an MDC code" + } + ] + }, + "valueCodeableConcept":{ + "coding":[ + { + "system":"urn:iso:std:iso:11073:10101", + "code":"150588", + "display":"MDC_MODALITY_SPOT" + } + ] + } + } + ] + }, + "request":{ + "method":"POST", + "url":"Observation/1-OBR_1:1.0.0.2" + } + } + ] +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index e0d53c3bde9..d940784236a 100644 --- a/pom.xml +++ b/pom.xml @@ -261,7 +261,6 @@ 2.5.3 1.8 2.4 - 1.1.8 2.7.1 4.4.4 4.2.5.RELEASE @@ -830,13 +829,8 @@ org.apache.maven.plugins maven-site-plugin - + 3.4 false @@ -861,12 +855,7 @@ org.apache.maven.scm maven-scm-api - + org.apache.maven.doxia doxia-module-markdown @@ -1299,13 +1288,7 @@ maven-scm-api 1.9.4 - + org.apache.maven.doxia doxia-module-markdown @@ -1345,25 +1328,8 @@ - + diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 1e5e4a4cd30..9f3b5ff000b 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -150,6 +150,10 @@ was escaped (%24execute instead of $execute). Thanks to Michael Lawley for reporting! + + JPA server transactions containing a bundle that has multiple entries + trying to delete the same resource caused a 500 internal error +