diff --git a/hapi-fhir-base/src/assembly/hapi-fhir-all.xml b/hapi-fhir-base/src/assembly/hapi-fhir-all.xml index 55bdb67b3c5..f47dfeb810e 100644 --- a/hapi-fhir-base/src/assembly/hapi-fhir-all.xml +++ b/hapi-fhir-base/src/assembly/hapi-fhir-all.xml @@ -1,5 +1,5 @@ - + all diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index e55941992b1..c9524f141a5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -241,10 +241,6 @@ public class FhirContext { myNarrativeGenerator = theNarrativeGenerator; } - public void setRestfulClientFactory(IRestfulClientFactory theRestfulClientFactory) { - myRestfulClientFactory = theRestfulClientFactory; - } - private RuntimeResourceDefinition scanResourceType(Class theResourceType) { ArrayList> resourceTypes = new ArrayList>(); resourceTypes.add(theResourceType); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java index cd98809d817..8984644dc2d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java @@ -656,7 +656,7 @@ public class XmlParser extends BaseParser implements IParser { } else { if (StringUtils.isBlank(se.getName().getPrefix())) { theEventWriter.writeStartElement(se.getName().getLocalPart()); - theEventWriter.writeDefaultNamespace(se.getName().getNamespaceURI()); +// theEventWriter.writeDefaultNamespace(se.getName().getNamespaceURI()); } else { theEventWriter.writeStartElement(se.getName().getNamespaceURI(), se.getName().getLocalPart()); } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java index ac11679c3a9..8f0154da513 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java @@ -391,7 +391,8 @@ public class GenericClient extends BaseClient implements IGenericClient { public ForInternal(Class theResourceType) { myResourceType = theResourceType; - myResourceName = myContext.getResourceDefinition(theResourceType).getName(); + RuntimeResourceDefinition definition = myContext.getResourceDefinition(theResourceType); + myResourceName = definition.getName(); } public ForInternal(String theResourceName) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java index 80dfdc92716..7b970aed7d6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java @@ -66,4 +66,13 @@ public interface IRestfulClientFactory { */ IGenericClient newGenericClient(String theServerBase); + + void setSocketTimeout(int theSocketTimeout); + + + void setConnectTimeout(int theConnectTimeout); + + + void setConnectionRequestTimeout(int theConnectionRequestTimeout); + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java index 4002d79d4ea..2c10195c8c1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java @@ -155,11 +155,13 @@ public class RestfulClientFactory implements IRestfulClientFactory { return new GenericClient(myContext, getHttpClient(), theServerBase); } + @Override public synchronized void setConnectionRequestTimeout(int theConnectionRequestTimeout) { myConnectionRequestTimeout = theConnectionRequestTimeout; myHttpClient=null; } + @Override public synchronized void setConnectTimeout(int theConnectTimeout) { myConnectTimeout = theConnectTimeout; myHttpClient=null; @@ -177,6 +179,7 @@ public class RestfulClientFactory implements IRestfulClientFactory { myHttpClient = theHttpClient; } + @Override public synchronized void setSocketTimeout(int theSocketTimeout) { mySocketTimeout = theSocketTimeout; myHttpClient=null; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java index c117e479ce5..99a6527f2d3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java @@ -121,7 +121,7 @@ public class RestfulServer extends HttpServlet { *

*/ public void addHeadersToResponse(HttpServletResponse theHttpResponse) { - theHttpResponse.addHeader("X-PoweredBy", "HAPI FHIR " + VersionUtil.getVersion() + " RESTful Server"); + theHttpResponse.addHeader("X-Powered-By", "HAPI FHIR " + VersionUtil.getVersion() + " RESTful Server"); } private void assertProviderIsValid(Object theNext) throws ConfigurationException { diff --git a/hapi-fhir-base/src/site/site.xml b/hapi-fhir-base/src/site/site.xml index d2a51a81dd4..50a9795740a 100644 --- a/hapi-fhir-base/src/site/site.xml +++ b/hapi-fhir-base/src/site/site.xml @@ -1,6 +1,6 @@ - - + + HAPI images/hapi_fhir_banner.png @@ -21,6 +21,23 @@ + + + + + + + + + + + + + + @@ -57,24 +74,6 @@ - - - - - - - - - - - - - - - @@ -91,3 +90,4 @@ + diff --git a/hapi-fhir-base/src/site/xdoc/index.xml b/hapi-fhir-base/src/site/xdoc/index.xml index 51643ff9f22..1f6d7b8adc0 100644 --- a/hapi-fhir-base/src/site/xdoc/index.xml +++ b/hapi-fhir-base/src/site/xdoc/index.xml @@ -33,7 +33,7 @@ to the Maven repos and the Sourceforge download system. This release corrects a large number of bugs and includes fixes which were implemented in the recent FHIR Connectathon.
-    &emdash; James Agnew + James Agnew

diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java index 54fd21ebbdb..a67f82e72ce 100644 --- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java @@ -74,7 +74,7 @@ public class XmlParserTest { patient.getGender().setValueAsEnum(AdministrativeGenderCodesEnum.M); - String val = new FhirContext().newXmlParser().encodeResourceToString(patient); + String val = ourCtx.newXmlParser().encodeResourceToString(patient); ourLog.info(val); } @@ -149,7 +149,7 @@ public class XmlParserTest { parameter.setUrl("http://foo").setValue(new StringDt("bar")); - String val = new FhirContext().newXmlParser().encodeResourceToString(q); + String val = ourCtx.newXmlParser().encodeResourceToString(q); ourLog.info(val); assertEquals("", val); @@ -214,7 +214,7 @@ public class XmlParserTest { ""; //@formatter:on - String encoded = new FhirContext().newXmlParser().encodeTagListToString(tagList); + String encoded = ourCtx.newXmlParser().encodeTagListToString(tagList); assertEquals(expected,encoded); } @@ -235,13 +235,13 @@ public class XmlParserTest { ""; //@formatter:off - Bundle bundleR = new FhirContext().newXmlParser().parseBundle(bundle); + Bundle bundleR = ourCtx.newXmlParser().parseBundle(bundle); assertEquals(15, bundleR.getTotalResults().getValue().intValue()); } @Test public void testEncodeExtensionWithResourceContent() { - IParser parser = new FhirContext().newXmlParser(); + IParser parser = ourCtx.newXmlParser(); Patient patient = new Patient(); patient.addAddress().setUse(AddressUseEnum.HOME); @@ -262,7 +262,7 @@ public class XmlParserTest { @Test public void testEncodeDeclaredExtensionWithResourceContent() { - IParser parser = new FhirContext().newXmlParser(); + IParser parser = ourCtx.newXmlParser(); MyPatientWithOneDeclaredExtension patient = new MyPatientWithOneDeclaredExtension(); patient.addAddress().setUse(AddressUseEnum.HOME); @@ -281,7 +281,7 @@ public class XmlParserTest { @Test public void testEncodeDeclaredExtensionWithAddressContent() { - IParser parser = new FhirContext().newXmlParser(); + IParser parser = ourCtx.newXmlParser(); MyPatientWithOneDeclaredAddressExtension patient = new MyPatientWithOneDeclaredAddressExtension(); patient.addAddress().setUse(AddressUseEnum.HOME); @@ -300,7 +300,7 @@ public class XmlParserTest { @Test public void testEncodeUndeclaredExtensionWithAddressContent() { - IParser parser = new FhirContext().newXmlParser(); + IParser parser = ourCtx.newXmlParser(); Patient patient = new Patient(); patient.addAddress().setUse(AddressUseEnum.HOME); @@ -323,7 +323,7 @@ public class XmlParserTest { Bundle b = new Bundle(); b.getTotalResults().setValue(123); - String val = new FhirContext().newXmlParser().setPrettyPrint(true).encodeBundleToString(b); + String val = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(b); ourLog.info(val); assertThat(val, StringContains.containsString("123")); @@ -338,12 +338,12 @@ public class XmlParserTest { e.setResource(new Patient()); e.addCategory().setLabel("label").setTerm("term").setScheme("scheme"); - String val = new FhirContext().newXmlParser().setPrettyPrint(true).encodeBundleToString(b); + String val = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(b); ourLog.info(val); assertThat(val, StringContains.containsString("")); - b = new FhirContext().newXmlParser().parseBundle(val); + b = ourCtx.newXmlParser().parseBundle(val); assertEquals(1, b.getEntries().size()); assertEquals(1, b.getEntries().get(0).getCategories().size()); assertEquals("term", b.getEntries().get(0).getCategories().get(0).getTerm()); @@ -398,7 +398,7 @@ public class XmlParserTest { spm.getText().setDiv("AAA"); rpt.addSpecimen().setResource(spm); - IParser p = new FhirContext(DiagnosticReport.class).newXmlParser().setPrettyPrint(true); + IParser p = ourCtx.newXmlParser().setPrettyPrint(true); String str = p.encodeResourceToString(rpt); ourLog.info(str); @@ -418,7 +418,7 @@ public class XmlParserTest { Observation obs = new Observation(); obs.setValue(new DecimalDt(112.22)); - IParser p = new FhirContext(Observation.class).newJsonParser(); + IParser p = ourCtx.newJsonParser(); try { p.encodeResourceToString(obs); @@ -435,7 +435,7 @@ public class XmlParserTest { patient.addName().addFamily("Family").addGiven("Given"); //@formatter:off - String encoded = new FhirContext().newXmlParser().setPrettyPrint(false).encodeResourceToString(patient); + String encoded = ourCtx.newXmlParser().setPrettyPrint(false).encodeResourceToString(patient); ourLog.info(encoded); /* * Note at least one space is placed where any whitespace was, as @@ -447,7 +447,7 @@ public class XmlParserTest { + " "; assertEquals(expected, encoded); - encoded = new FhirContext().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); ourLog.info(encoded); expected = "\n" + " \n" @@ -476,7 +476,7 @@ public class XmlParserTest { Patient patient = new Patient(); patient.setManagingOrganization(new ResourceReferenceDt()); - IParser p = new FhirContext().newXmlParser(); + IParser p = ourCtx.newXmlParser(); String str = p.encodeResourceToString(patient); assertThat(str, IsNot.not(StringContains.containsString("managingOrganization"))); @@ -502,7 +502,7 @@ public class XmlParserTest { patient.addName().addFamily("Smith"); - IParser p = new FhirContext().newXmlParser(); + IParser p = ourCtx.newXmlParser(); String str = p.encodeResourceToString(patient); ourLog.info(str); @@ -745,7 +745,7 @@ public class XmlParserTest { NarrativeDt nar = new NarrativeDt(xhtmlDt, NarrativeStatusEnum.GENERATED); when(gen.generateNarrative(eq("http://hl7.org/fhir/profiles/Patient"), eq(patient))).thenReturn(nar); - FhirContext context = new FhirContext(); + FhirContext context = ourCtx; context.setNarrativeGenerator(gen); IParser p = context.newXmlParser(); String str = p.encodeResourceToString(patient); @@ -946,6 +946,26 @@ public class XmlParserTest { assertEquals("_id", res.getSearchParam().get(1).getName().getValue()); } + @Test + public void testParseEncodeNarrative() { + + String input = "
Donald null DUCK
Identifier7000135
Address10 Duxon Street
VICTORIA BC Can
Date of birth01 June 1980
"; + IResource res = ourCtx.newXmlParser().parseResource(input); + + String output = ourCtx.newXmlParser().encodeResourceToString(res); + + // Should occur exactly twice (once for the resource, once for the DIV + assertThat(output, (StringContainsInOrder.stringContainsInOrder(Arrays.asList("Patient xmlns", "div xmlns")))); + assertThat(output, not(StringContainsInOrder.stringContainsInOrder(Arrays.asList("b xmlns")))); + + output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(res); + + // Should occur exactly twice (once for the resource, once for the DIV + assertThat(output, (StringContainsInOrder.stringContainsInOrder(Arrays.asList("Patient xmlns", "div xmlns")))); + assertThat(output, not(StringContainsInOrder.stringContainsInOrder(Arrays.asList("b xmlns")))); + + } + @BeforeClass public static void beforeClass() { XMLUnit.setIgnoreAttributeOrder(true); @@ -989,10 +1009,10 @@ public class XmlParserTest { parent.addUndeclaredExtension(child2); // END SNIPPET: subExtension - String output = new FhirContext().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); ourLog.info(output); - String enc = new FhirContext().newXmlParser().encodeResourceToString(patient); + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); assertThat(enc, containsString("")); assertThat(enc, containsString("")); assertThat(enc, containsString("")); @@ -1008,13 +1028,13 @@ public class XmlParserTest { HumanNameDt given = name.addGiven("Joe"); ExtensionDt ext2 = new ExtensionDt(false, "http://examples.com#givenext", new StringDt("Hello")); given.addUndeclaredExtension(ext2); - String output = new FhirContext().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); ourLog.info(output); - String enc = new FhirContext().newXmlParser().encodeResourceToString(patient); + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); assertThat(enc, containsString("")); - Patient parsed = new FhirContext().newXmlParser().parseResource(Patient.class, new StringReader(enc)); + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, new StringReader(enc)); assertEquals(1, parsed.getNameFirstRep().getUndeclaredExtensionsByUrl("http://examples.com#givenext").size()); ExtensionDt ext = parsed.getNameFirstRep().getUndeclaredExtensionsByUrl("http://examples.com#givenext").get(0); assertEquals("Hello", ext.getValueAsPrimitive().getValue()); @@ -1032,13 +1052,13 @@ public class XmlParserTest { ExtensionDt ext2 = new ExtensionDt(false, "http://examples.com#givenext", new StringDt("Hello")); family.addUndeclaredExtension(ext2); - String output = new FhirContext().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); + String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient); ourLog.info(output); - String enc = new FhirContext().newXmlParser().encodeResourceToString(patient); + String enc = ourCtx.newXmlParser().encodeResourceToString(patient); assertThat(enc, containsString("")); - Patient parsed = new FhirContext().newXmlParser().parseResource(Patient.class, new StringReader(enc)); + Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, new StringReader(enc)); assertEquals(1, parsed.getNameFirstRep().getFamilyFirstRep().getUndeclaredExtensionsByUrl("http://examples.com#givenext").size()); ExtensionDt ext = parsed.getNameFirstRep().getFamilyFirstRep().getUndeclaredExtensionsByUrl("http://examples.com#givenext").get(0); assertEquals("Hello", ext.getValueAsPrimitive().getValue()); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java index 636718dace8..341f92c2547 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java @@ -374,7 +374,10 @@ public class FhirResourceDao extends BaseFhirDao implements throw new IllegalArgumentException("Invalid token type: " + params.getClass()); } - Predicate singleCode = builder.equal(from.get("myValueNormalized"), normalizeString(string)); + String likeExpression = normalizeString(string); + likeExpression = likeExpression.replace("%", "[%]") + "%"; + + Predicate singleCode = builder.like(from.get("myValueNormalized").as(String.class), likeExpression); if (params instanceof StringParam && ((StringParam) params).isExact()) { Predicate exactCode = builder.equal(from.get("myValueExact"), string); singleCode = builder.and(singleCode, exactCode); @@ -772,6 +775,10 @@ public class FhirResourceDao extends BaseFhirDao implements } private void loadResourcesByPid(Collection theIncludePids, List theResourceListToPopulate) { + if (theIncludePids.isEmpty()) { + return; + } + CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); CriteriaQuery cq = builder.createQuery(ResourceTable.class); Root from = cq.from(ResourceTable.class); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java index c4e7e2ceade..1781e4d0e2d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java @@ -16,6 +16,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; @@ -37,6 +38,7 @@ import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException; import ca.uhn.fhir.rest.param.DateRangeParam; import ca.uhn.fhir.rest.param.QualifiedDateParam; import ca.uhn.fhir.rest.param.ReferenceParam; @@ -58,7 +60,50 @@ public class FhirResourceDaoTest { private static Date ourTestStarted; private static IFhirResourceDao ourEncounterDao; + private static FhirContext ourFhirCtx; + @Test + public void testOrganizationName() { + + //@formatter:off + String inputStr = "{\"resourceType\":\"Organization\",\n" + + " \"extension\":[\n" + + " {\n" + + " \"url\":\"http://fhir.connectinggta.ca/Profile/organization#providerIdPool\",\n" + + " \"valueUri\":\"urn:oid:2.16.840.1.113883.3.239.23.21.1\"\n" + + " }\n" + + " ],\n" + + " \"text\":{\n" + + " \"status\":\"empty\",\n" + + " \"div\":\"
No narrative template available for resource profile: http://fhir.connectinggta.ca/Profile/organization
\"\n" + + " },\n" + + " \"identifier\":[\n" + + " {\n" + + " \"use\":\"official\",\n" + + " \"label\":\"HSP 2.16.840.1.113883.3.239.23.21\",\n" + + " \"system\":\"urn:cgta:hsp_ids\",\n" + + " \"value\":\"urn:oid:2.16.840.1.113883.3.239.23.21\"\n" + + " }\n" + + " ],\n" + + " \"name\":\"Peterborough Regional Health Centre\"\n" + + " }\n" + + " }"; + //@formatter:on + + Set val = ourOrganizationDao.searchForIds("name", new StringParam("P")); + int initial = val.size(); + + Organization org = ourFhirCtx.newJsonParser().parseResource(Organization.class,inputStr); + ourOrganizationDao.create(org); + + val = ourOrganizationDao.searchForIds("name", new StringParam("P")); + assertEquals(initial+1, val.size()); + + } + + + + @Test public void testStoreUnversionedResources() { Organization o1 = new Organization(); @@ -206,6 +251,23 @@ public class FhirResourceDaoTest { } + @Test + public void testSearchWithNoResults() { + IBundleProvider value = ourObservationDao.search(new SearchParameterMap()); + + /* + * This may fail at some point, which means another test has probably added a device + * resource. This test depends on there being none, so if that happens this test + * should be refactored to use another resource type + */ + assertEquals(0, value.size()); + + List res = value.getResources(0, 0); + assertTrue(res.isEmpty()); + + } + + @Test public void testPersistSearchParamQuantity() { Observation obs = new Observation(); @@ -222,6 +284,8 @@ public class FhirResourceDaoTest { } + + @Test public void testPersistSearchParams() { Patient patient = new Patient(); @@ -878,6 +942,7 @@ public class FhirResourceDaoTest { ourOrganizationDao = ourCtx.getBean("myOrganizationDao", IFhirResourceDao.class); ourLocationDao = ourCtx.getBean("myLocationDao", IFhirResourceDao.class); ourEncounterDao = ourCtx.getBean("myEncounterDao", IFhirResourceDao.class); + ourFhirCtx = new FhirContext(); } } diff --git a/hapi-fhir-jpaserver-test/.settings/org.eclipse.core.resources.prefs b/hapi-fhir-jpaserver-test/.settings/org.eclipse.core.resources.prefs index 49da3845e5b..62804f2210d 100644 --- a/hapi-fhir-jpaserver-test/.settings/org.eclipse.core.resources.prefs +++ b/hapi-fhir-jpaserver-test/.settings/org.eclipse.core.resources.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 encoding//src/main/resources=UTF-8 encoding//src/test/java=UTF-8 encoding//src/test/java/ca/uhn/fhir/jpa/test/Upload.java=UTF-8 diff --git a/hapi-fhir-jpaserver-test/src/main/java/.keep b/hapi-fhir-jpaserver-test/src/main/java/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/hapi-fhir-jpaserver-test/src/test/java/ca/uhn/fhir/jpa/test/CompleteResourceProviderTest.java b/hapi-fhir-jpaserver-test/src/test/java/ca/uhn/fhir/jpa/test/CompleteResourceProviderTest.java index 5782a5a3d9d..af2d8eabe07 100644 --- a/hapi-fhir-jpaserver-test/src/test/java/ca/uhn/fhir/jpa/test/CompleteResourceProviderTest.java +++ b/hapi-fhir-jpaserver-test/src/test/java/ca/uhn/fhir/jpa/test/CompleteResourceProviderTest.java @@ -32,7 +32,6 @@ public class CompleteResourceProviderTest { private static ClassPathXmlApplicationContext ourAppCtx; private static FhirContext ourCtx; - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(CompleteResourceProviderTest.class); private static Server ourServer; private static IFhirResourceDao patientDao; diff --git a/hapi-fhir-jpaserver-test/src/test/resources/.keep b/hapi-fhir-jpaserver-test/src/test/resources/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/hapi-fhir-jpaserver-uhnfhirtest/.classpath b/hapi-fhir-jpaserver-uhnfhirtest/.classpath index 7f746073bd4..c998deb489c 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/.classpath +++ b/hapi-fhir-jpaserver-uhnfhirtest/.classpath @@ -23,16 +23,16 @@ - - - - - + + + + + diff --git a/hapi-fhir-jpaserver-uhnfhirtest/.project b/hapi-fhir-jpaserver-uhnfhirtest/.project index 2a9e8a7e783..ec591debe6f 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/.project +++ b/hapi-fhir-jpaserver-uhnfhirtest/.project @@ -21,12 +21,12 @@ - org.eclipse.m2e.core.maven2Builder + org.eclipse.wst.validation.validationbuilder - org.eclipse.wst.validation.validationbuilder + org.eclipse.m2e.core.maven2Builder diff --git a/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.jdt.core.prefs b/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.jdt.core.prefs index e3d8562dd6a..6b5aebc4b56 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.jdt.core.prefs +++ b/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.debug.lineNumber=generate @@ -10,4 +10,4 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.component b/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.component index 6d0a6b16cdc..80e4d9af87c 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.component +++ b/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.component @@ -1,18 +1,18 @@ - - + + uses uses - + consumes diff --git a/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.project.facet.core.xml b/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.project.facet.core.xml index 5a887262619..45fbdef1fd7 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,7 +1,7 @@ - - + + diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index cff878db2c7..985efbb2952 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -144,8 +144,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/templates/tmpl-home-welcome.html b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/templates/tmpl-home-welcome.html new file mode 100644 index 00000000000..55cd95bf386 --- /dev/null +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/templates/tmpl-home-welcome.html @@ -0,0 +1,35 @@ + + +
+

+ This is the home for the FHIR test server operated by + University Health Network. +

+

+ This is not a production server! + Do not store any information here that contains personal health information + or otherwise confidential information. This server will be regularly purged + and reloaded with fixed test data. +

+

+ Here are some things you might wish to try: +

+
    +
  • + View a + list of patients + on this server. +
  • +
  • + Construct a + search query + on this server. +
  • +
  • + Access a + different server + (use the Server menu at the top of the page to see a list of public FHIR servers) +
  • +
+
+ diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/xsd/javaee_6.xsd b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/xsd/javaee_6.xsd index c34f199542b..b1ee0b83831 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/xsd/javaee_6.xsd +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/webapp/WEB-INF/xsd/javaee_6.xsd @@ -127,7 +127,6 @@ type="javaee:ejb-local-refType" minOccurs="0" maxOccurs="unbounded"/> - -
-
- This is a RESTful server tester, which can be used to send - requests to, and receive responses from the server at the - following URL: -
+
@@ -179,8 +174,6 @@ - - diff --git a/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/templates/result.html b/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/templates/result.html index 6d63d454c93..8ef154b0ab6 100644 --- a/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/templates/result.html +++ b/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/templates/result.html @@ -100,7 +100,7 @@ controls for viewing/editing/etc results -->
-
+

diff --git a/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/templates/tmpl-home-welcome.html b/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/templates/tmpl-home-welcome.html new file mode 100644 index 00000000000..d4862ea4080 --- /dev/null +++ b/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/templates/tmpl-home-welcome.html @@ -0,0 +1,8 @@ + + +
+
+ This is a RESTful server tester, which can be used to send + requests to, and receive responses from the server. +
+ diff --git a/hapi-fhir-testpage-overlay/src/test/resources/.keep b/hapi-fhir-testpage-overlay/src/test/resources/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index afde8f031e6..465e0f2764d 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -133,6 +133,41 @@ mojo-descriptor descriptor --> + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + + + maven-plugin-plugin + + + [3.2,) + + + descriptor + + + + + + + + + + + + diff --git a/hapi-tinder-test/.classpath b/hapi-tinder-test/.classpath index 0b07f0f6d72..f6f879ee90e 100644 --- a/hapi-tinder-test/.classpath +++ b/hapi-tinder-test/.classpath @@ -1,12 +1,16 @@ - - + + + + + + + - @@ -43,5 +47,21 @@ + + + + + + + + + + + + + + + + diff --git a/hapi-tinder-test/.settings/org.eclipse.core.resources.prefs b/hapi-tinder-test/.settings/org.eclipse.core.resources.prefs index 99f26c0203a..f02244085c1 100644 --- a/hapi-tinder-test/.settings/org.eclipse.core.resources.prefs +++ b/hapi-tinder-test/.settings/org.eclipse.core.resources.prefs @@ -1,2 +1,4 @@ eclipse.preferences.version=1 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 encoding/=UTF-8 diff --git a/hapi-tinder-test/.settings/org.eclipse.jdt.core.prefs b/hapi-tinder-test/.settings/org.eclipse.jdt.core.prefs index 76192a5a178..60105c1b951 100644 --- a/hapi-tinder-test/.settings/org.eclipse.jdt.core.prefs +++ b/hapi-tinder-test/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ -#Mon Mar 03 17:20:36 EST 2014 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.source=1.7 -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6