Merge branch 'master' of github.com:jamesagnew/hapi-fhir

This commit is contained in:
jamesagnew 2015-02-07 12:28:07 -05:00
commit 1f958221a7
527 changed files with 156622 additions and 98882 deletions

BIN
.swp

Binary file not shown.

View File

@ -91,7 +91,7 @@ public abstract class BaseRuntimeElementCompositeDefinition<T extends IBase> ext
}
for (String nextName : next.getValidChildNames()) {
if (myNameToChild.containsKey(nextName)) {
throw new ConfigurationException("Duplicate child name: " + nextName);
throw new ConfigurationException("Duplicate child name[" + nextName + "] in Element[" + getName() + "]");
} else {
myNameToChild.put(nextName, next);
}

View File

@ -114,6 +114,8 @@ public class FhirContext {
myVersion = theVersion.getVersionImplementation();
} else if (FhirVersionEnum.DSTU1.isPresentOnClasspath()) {
myVersion = FhirVersionEnum.DSTU1.getVersionImplementation();
} else if (FhirVersionEnum.DSTU2.isPresentOnClasspath()) {
myVersion = FhirVersionEnum.DSTU2.getVersionImplementation();
} else if (FhirVersionEnum.DEV.isPresentOnClasspath()) {
myVersion = FhirVersionEnum.DEV.getVersionImplementation();
} else {
@ -445,10 +447,10 @@ public class FhirContext {
}
/**
* Creates and returns a new FhirContext with version {@link FhirVersionEnum#DEV}
* Creates and returns a new FhirContext with version {@link FhirVersionEnum#DSTU2}
*/
public static FhirContext forDstu2() {
return new FhirContext(FhirVersionEnum.DEV);
return new FhirContext(FhirVersionEnum.DSTU2);
}
}

View File

@ -36,9 +36,9 @@ public enum FhirVersionEnum {
DSTU1("ca.uhn.fhir.model.dstu.FhirDstu1", null),
DSTU2("ca.uhn.fhir.model.dev.FhirDev", null),
DSTU2("ca.uhn.fhir.model.dstu2.FhirDstu2", null),
DEV("ca.uhn.fhir.model.dev.FhirDev", DSTU2);
DEV("ca.uhn.fhir.model.dev.FhirDev", null);
private final String myVersionClass;

View File

@ -84,24 +84,36 @@ public class RuntimeChildResourceDefinition extends BaseRuntimeDeclaredChildDefi
myValidChildNames = new HashSet<String>();
myValidChildNames.add(getElementName());
/*
* [elementName]Resource is not actually valid FHIR but we've encountered it in the wild
* so we'll accept it just to be nice
*/
myValidChildNames.add(getElementName() + "Resource");
for (Class<? extends IBaseResource> next : myResourceTypes) {
if (next == IResource.class) {
for (Entry<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> nextEntry : theClassToElementDefinitions.entrySet()) {
if (IResource.class.isAssignableFrom(nextEntry.getKey())) {
RuntimeResourceDefinition nextDef = (RuntimeResourceDefinition) nextEntry.getValue();
myValidChildNames.add(getElementName() + nextDef.getName());
}
}
} else {
RuntimeResourceDefinition nextDef = (RuntimeResourceDefinition) theClassToElementDefinitions.get(next);
if (nextDef == null) {
throw new ConfigurationException("Can't find child of type: " + next.getCanonicalName() + " in " + getField().getDeclaringClass());
}
myValidChildNames.add(getElementName() + nextDef.getName());
}
}
/*
* Below has been disabled- We used to allow field names to contain the name of the resource
* that they accepted. This wasn't valid but we accepted it just to be flexible because there
* were some bad examples containing this. This causes conflicts with actual field names in
* recent definitions though, so it has been disabled as of HAPI 0.9
*/
// for (Class<? extends IBaseResource> next : myResourceTypes) {
// if (next == IResource.class) {
// for (Entry<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> nextEntry : theClassToElementDefinitions.entrySet()) {
// if (IResource.class.isAssignableFrom(nextEntry.getKey())) {
// RuntimeResourceDefinition nextDef = (RuntimeResourceDefinition) nextEntry.getValue();
// myValidChildNames.add(getElementName() + nextDef.getName());
// }
// }
// }
// else {
// RuntimeResourceDefinition nextDef = (RuntimeResourceDefinition) theClassToElementDefinitions.get(next);
// if (nextDef == null) {
// throw new ConfigurationException("Can't find child of type: " + next.getCanonicalName() + " in " + getField().getDeclaringClass());
// }
// myValidChildNames.add(getElementName() + nextDef.getName());
// }
// }
myResourceTypes = Collections.unmodifiableList(myResourceTypes);
myValidChildNames = Collections.unmodifiableSet(myValidChildNames);

View File

@ -913,8 +913,12 @@ class ParserState<T> {
push(new PrimitiveState(getPreResourceState(), myEntry.getDeletedResourceType()));
} else if ("id".equals(theLocalPart)) {
push(new PrimitiveState(getPreResourceState(), myEntry.getDeletedResourceId()));
} else if ("resourceId".equals(theLocalPart)) {
push(new PrimitiveState(getPreResourceState(), myEntry.getDeletedResourceId()));
} else if ("version".equals(theLocalPart)) {
push(new PrimitiveState(getPreResourceState(), myEntry.getDeletedResourceVersion()));
} else if ("versionId".equals(theLocalPart)) {
push(new PrimitiveState(getPreResourceState(), myEntry.getDeletedResourceVersion()));
} else if ("instant".equals(theLocalPart)) {
push(new PrimitiveState(getPreResourceState(), myEntry.getDeletedAt()));
} else {

View File

@ -6,7 +6,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" path="target/generated-sources/tinder"/>
<classpathentry excluding="**/*.java" including="**/*.java" kind="src" path="src/test/resources"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
@ -15,6 +14,12 @@
</attributes>
</classpathentry>
<classpathentry excluding="**/*.java" including="**/*.java" kind="src" path="src/main/resources"/>
<classpathentry including="**/*.java" kind="src" path="target/generated-sources/tinder"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="target/generated-resources/tinder">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/hapi-fhir-base"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
@ -27,10 +32,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="target/generated-resources/tinder">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -3,4 +3,6 @@ encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding//target/generated-resources/tinder=UTF-8
encoding//target/generated-sources/tinder=UTF-8
encoding/<project>=UTF-8

View File

@ -46,7 +46,7 @@
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dev</artifactId>
<artifactId>hapi-fhir-structures-dstu2</artifactId>
<version>0.9-SNAPSHOT</version>
</dependency>
@ -68,6 +68,12 @@
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>${thymeleaf-version}</version>
<scope>test</scope>
</dependency>
<!-- For UCUM -->
<dependency>
@ -235,6 +241,46 @@
<artifactId>guava</artifactId>
<version>${guava_version}</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -340,14 +386,14 @@
</configuration>
</execution>
<execution>
<id>build_dev</id>
<id>build_dstu2</id>
<goals>
<goal>generate-jparest-server</goal>
</goals>
<configuration>
<version>dev</version>
<packageBase>ca.uhn.fhir.jpa.rp.dev</packageBase>
<targetResourceSpringBeansFile>hapi-fhir-server-resourceproviders-dev.xml</targetResourceSpringBeansFile>
<version>dstu2</version>
<packageBase>ca.uhn.fhir.jpa.rp.dstu2</packageBase>
<targetResourceSpringBeansFile>hapi-fhir-server-resourceproviders-dstu2.xml</targetResourceSpringBeansFile>
<baseResourceNames></baseResourceNames>
</configuration>
</execution>
@ -360,7 +406,7 @@
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dev</artifactId>
<artifactId>hapi-fhir-structures-dstu2</artifactId>
<version>0.9-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import java.io.UnsupportedEncodingException;
@ -705,12 +725,14 @@ public abstract class BaseFhirDao implements IDao {
public void setContext(FhirContext theContext) {
myContext = theContext;
switch (myContext.getVersion().getVersion()) {
case DEV:
mySearchParamExtractor = new SearchParamExtractorDev(theContext);
case DSTU2:
mySearchParamExtractor = new SearchParamExtractorDstu2(theContext);
break;
case DSTU1:
mySearchParamExtractor = new SearchParamExtractorDstu1(theContext);
break;
case DEV:
throw new IllegalStateException("Don't know how to handle version: " + myContext.getVersion().getVersion());
}
}

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import ca.uhn.fhir.jpa.entity.ResourceEncodingEnum;
public class DaoConfig {

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
class HistoryTuple implements Comparable<HistoryTuple> {

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
public interface IDao {
void registerDaoListener(IDaoListener theListener);

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
public interface IDaoListener {
void writeCompleted();

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.Map;
import java.util.Set;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;
import java.util.Map;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.ArrayList;
import java.util.List;
@ -23,4 +43,4 @@ interface ISearchParamExtractor {
public abstract List<BaseResourceIndexedSearchParam> extractSearchParamTokens(ResourceTable theEntity, IResource theResource);
}
}

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
public @interface IndexedParam {
String path();

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import java.math.BigDecimal;

View File

@ -1,6 +1,27 @@
package ca.uhn.fhir.jpa.dao;
import static org.apache.commons.lang3.StringUtils.*;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.math.BigDecimal;
import java.util.ArrayList;
@ -29,27 +50,27 @@ import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.base.composite.BaseHumanNameDt;
import ca.uhn.fhir.model.dev.composite.AddressDt;
import ca.uhn.fhir.model.dev.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dev.composite.CodingDt;
import ca.uhn.fhir.model.dev.composite.ContactPointDt;
import ca.uhn.fhir.model.dev.composite.DurationDt;
import ca.uhn.fhir.model.dev.composite.HumanNameDt;
import ca.uhn.fhir.model.dev.composite.IdentifierDt;
import ca.uhn.fhir.model.dev.composite.PeriodDt;
import ca.uhn.fhir.model.dev.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum;
import ca.uhn.fhir.model.dstu2.composite.AddressDt;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
import ca.uhn.fhir.model.dstu2.composite.DurationDt;
import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
import ca.uhn.fhir.model.primitive.BaseDateTimeDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.util.FhirTerser;
class SearchParamExtractorDev implements ISearchParamExtractor {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchParamExtractorDev.class);
class SearchParamExtractorDstu2 implements ISearchParamExtractor {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchParamExtractorDstu2.class);
private FhirContext myContext;
public SearchParamExtractorDev(FhirContext theContext) {
public SearchParamExtractorDstu2(FhirContext theContext) {
myContext = theContext;
}

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.dao;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Collection;
import java.util.Date;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
import javax.persistence.Column;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
import javax.persistence.Column;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class FhirPersister {

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.parser.IParser;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
import javax.persistence.Column;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import javax.persistence.Column;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.math.BigDecimal;
import javax.persistence.Column;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.math.BigDecimal;
import javax.persistence.Column;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
import javax.persistence.Column;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import java.io.Serializable;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
import java.util.Collection;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.provider;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Enumeration;
import java.util.Set;
import java.util.TreeSet;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.provider;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import java.util.Map;

View File

@ -1,34 +1,54 @@
package ca.uhn.fhir.jpa.provider;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.context.RuntimeSearchParam;
import ca.uhn.fhir.jpa.dao.IFhirSystemDao;
import ca.uhn.fhir.model.dev.resource.Conformance;
import ca.uhn.fhir.model.dev.resource.Conformance.Rest;
import ca.uhn.fhir.model.dev.resource.Conformance.RestResource;
import ca.uhn.fhir.model.dev.resource.Conformance.RestResourceSearchParam;
import ca.uhn.fhir.model.dev.valueset.ResourceTypeEnum;
import ca.uhn.fhir.model.dev.valueset.SearchParamTypeEnum;
import ca.uhn.fhir.model.dstu2.resource.Conformance;
import ca.uhn.fhir.model.dstu2.resource.Conformance.Rest;
import ca.uhn.fhir.model.dstu2.resource.Conformance.RestResource;
import ca.uhn.fhir.model.dstu2.resource.Conformance.RestResourceSearchParam;
import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.provider.dev.ServerConformanceProvider;
import ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider;
import ca.uhn.fhir.util.ExtensionConstants;
import javax.servlet.http.HttpServletRequest;
public class JpaConformanceProviderDev extends ServerConformanceProvider {
public class JpaConformanceProviderDstu2 extends ServerConformanceProvider {
private String myImplementationDescription;
private IFhirSystemDao mySystemDao;
private volatile Conformance myCachedValue;
private RestfulServer myRestfulServer;
public JpaConformanceProviderDev(RestfulServer theRestfulServer, IFhirSystemDao theSystemDao) {
public JpaConformanceProviderDstu2(RestfulServer theRestfulServer, IFhirSystemDao theSystemDao) {
super(theRestfulServer);
myRestfulServer = theRestfulServer;
mySystemDao = theSystemDao;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.provider;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import javax.servlet.http.HttpServletRequest;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.provider;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.Date;
import java.util.List;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.util;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hibernate.cfg.ImprovedNamingStrategy;
public class CustomNamingStrategy extends ImprovedNamingStrategy {
@ -42,4 +62,4 @@ public class CustomNamingStrategy extends ImprovedNamingStrategy {
//
// }
}
}

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.jpa.util;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
public class StopWatch {

View File

@ -1,7 +1,17 @@
package ca.uhn.fhir.jpa.dao;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.greaterThan;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Date;
@ -24,21 +34,21 @@ import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.dev.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dev.composite.IdentifierDt;
import ca.uhn.fhir.model.dev.composite.PeriodDt;
import ca.uhn.fhir.model.dev.composite.QuantityDt;
import ca.uhn.fhir.model.dev.resource.Device;
import ca.uhn.fhir.model.dev.resource.DiagnosticReport;
import ca.uhn.fhir.model.dev.resource.Encounter;
import ca.uhn.fhir.model.dev.resource.Location;
import ca.uhn.fhir.model.dev.resource.Observation;
import ca.uhn.fhir.model.dev.resource.Organization;
import ca.uhn.fhir.model.dev.resource.Patient;
import ca.uhn.fhir.model.dev.valueset.AdministrativeGenderEnum;
import ca.uhn.fhir.model.dev.valueset.QuantityComparatorEnum;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
import ca.uhn.fhir.model.dstu2.resource.Device;
import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
import ca.uhn.fhir.model.dstu2.resource.Encounter;
import ca.uhn.fhir.model.dstu2.resource.Location;
import ca.uhn.fhir.model.dstu2.resource.Observation;
import ca.uhn.fhir.model.dstu2.resource.Organization;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IdDt;

View File

@ -30,15 +30,15 @@ import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.dev.composite.IdentifierDt;
import ca.uhn.fhir.model.dev.composite.QuantityDt;
import ca.uhn.fhir.model.dev.resource.Device;
import ca.uhn.fhir.model.dev.resource.DiagnosticReport;
import ca.uhn.fhir.model.dev.resource.Location;
import ca.uhn.fhir.model.dev.resource.Observation;
import ca.uhn.fhir.model.dev.resource.Organization;
import ca.uhn.fhir.model.dev.resource.Patient;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
import ca.uhn.fhir.model.dstu2.resource.Device;
import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
import ca.uhn.fhir.model.dstu2.resource.Location;
import ca.uhn.fhir.model.dstu2.resource.Observation;
import ca.uhn.fhir.model.dstu2.resource.Organization;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.rest.param.TokenParam;

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.test;
package ca.uhn.fhir.jpa.provider;
import ca.uhn.fhir.jpa.provider.JpaResourceProvider;
import ca.uhn.fhir.model.api.IResource;

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.test;
package ca.uhn.fhir.jpa.provider;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
@ -52,12 +52,12 @@ import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
public class CompleteResourceProviderTestDstu1 {
public class ResourceProviderDstu1Test {
private static ClassPathXmlApplicationContext ourAppCtx;
private static IGenericClient ourClient;
private static FhirContext ourFhirCtx;
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(CompleteResourceProviderTestDstu1.class);
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderDstu1Test.class);
// private static IFhirResourceDao<Observation> ourObservationDao;
// private static IFhirResourceDao<Patient> ourPatientDao;
// private static IFhirResourceDao<Questionnaire> ourQuestionnaireDao;
@ -118,8 +118,8 @@ public class CompleteResourceProviderTestDstu1 {
assertEquals(null, found.getEntries().get(0).getStatus().getValueAsEnum());
assertEquals(null, found.getEntries().get(0).getResource().getResourceMetadata().get(ResourceMetadataKeyEnum.ENTRY_STATUS));
assertEquals(Organization.class, found.getEntries().get(1).getResource().getClass());
assertEquals(BundleEntryStatusEnum.INCLUDE, found.getEntries().get(1).getStatus().getValueAsEnum());
assertEquals(BundleEntryStatusEnum.INCLUDE, found.getEntries().get(1).getResource().getResourceMetadata().get(ResourceMetadataKeyEnum.ENTRY_STATUS));
assertEquals(null, found.getEntries().get(1).getStatus().getValueAsEnum());
assertEquals(null, found.getEntries().get(1).getResource().getResourceMetadata().get(ResourceMetadataKeyEnum.ENTRY_STATUS));
}
@ -128,7 +128,7 @@ public class CompleteResourceProviderTestDstu1 {
// NB this does not get used- The paging provider has its own limits built in
ourDaoConfig.setHardSearchLimit(100);
List<IResource> resources = new ArrayList<>();
List<IResource> resources = new ArrayList<IResource>();
for (int i = 0; i < 100; i++) {
Organization org = new Organization();
org.setName("testCountParam_01");
@ -155,7 +155,7 @@ public class CompleteResourceProviderTestDstu1 {
int initialSize = client.search().forResource(ImagingStudy.class).execute().size();
String resBody = IOUtils.toString(CompleteResourceProviderTestDstu1.class.getResource("/imagingstudy.json"));
String resBody = IOUtils.toString(ResourceProviderDstu1Test.class.getResource("/imagingstudy.json"));
client.create().resource(resBody).execute();
int newSize = client.search().forResource(ImagingStudy.class).execute().size();
@ -173,7 +173,7 @@ public class CompleteResourceProviderTestDstu1 {
int initialSize = client.search().forResource(DocumentManifest.class).execute().size();
String resBody = IOUtils.toString(CompleteResourceProviderTestDstu1.class.getResource("/documentmanifest.json"));
String resBody = IOUtils.toString(ResourceProviderDstu1Test.class.getResource("/documentmanifest.json"));
client.create().resource(resBody).execute();
int newSize = client.search().forResource(DocumentManifest.class).execute().size();
@ -191,7 +191,7 @@ public class CompleteResourceProviderTestDstu1 {
int initialSize = client.search().forResource(DocumentReference.class).execute().size();
String resBody = IOUtils.toString(CompleteResourceProviderTestDstu1.class.getResource("/documentreference.json"));
String resBody = IOUtils.toString(ResourceProviderDstu1Test.class.getResource("/documentreference.json"));
client.create().resource(resBody).execute();
int newSize = client.search().forResource(DocumentReference.class).execute().size();
@ -501,18 +501,18 @@ public class CompleteResourceProviderTestDstu1 {
String serverBase = "http://localhost:" + port + "/fhir/context";
ourAppCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dev.xml", "fhir-spring-test-config.xml");
ourAppCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml");
ourDaoConfig = (DaoConfig) ourAppCtx.getBean(DaoConfig.class);
ourOrganizationDao = (IFhirResourceDao<Organization>) ourAppCtx.getBean("myOrganizationDaoDev", IFhirResourceDao.class);
ourOrganizationDao = (IFhirResourceDao<Organization>) ourAppCtx.getBean("myOrganizationDaoDstu1", IFhirResourceDao.class);
List<IResourceProvider> rpsDev = (List<IResourceProvider>) ourAppCtx.getBean("myResourceProvidersDev", List.class);
List<IResourceProvider> rpsDev = (List<IResourceProvider>) ourAppCtx.getBean("myResourceProvidersDstu1", List.class);
restServer.setResourceProviders(rpsDev);
restServer.getFhirContext().setNarrativeGenerator(new DefaultThymeleafNarrativeGenerator());
IFhirSystemDao systemDao = (IFhirSystemDao) ourAppCtx.getBean("mySystemDaoDev", IFhirSystemDao.class);
IFhirSystemDao systemDao = (IFhirSystemDao) ourAppCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class);
JpaSystemProvider systemProv = new JpaSystemProvider(systemDao);
restServer.setPlainProviders(systemProv);

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.test;
package ca.uhn.fhir.jpa.provider;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
@ -25,18 +25,18 @@ import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider;
import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
import ca.uhn.fhir.model.dev.composite.PeriodDt;
import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dev.resource.DiagnosticOrder;
import ca.uhn.fhir.model.dev.resource.DocumentManifest;
import ca.uhn.fhir.model.dev.resource.DocumentReference;
import ca.uhn.fhir.model.dev.resource.Encounter;
import ca.uhn.fhir.model.dev.resource.ImagingStudy;
import ca.uhn.fhir.model.dev.resource.Location;
import ca.uhn.fhir.model.dev.resource.Organization;
import ca.uhn.fhir.model.dev.resource.Patient;
import ca.uhn.fhir.model.dev.valueset.EncounterClassEnum;
import ca.uhn.fhir.model.dev.valueset.EncounterStateEnum;
import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
import ca.uhn.fhir.model.dstu2.resource.DocumentManifest;
import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
import ca.uhn.fhir.model.dstu2.resource.Encounter;
import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
import ca.uhn.fhir.model.dstu2.resource.Location;
import ca.uhn.fhir.model.dstu2.resource.Organization;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
import ca.uhn.fhir.model.dstu.valueset.NarrativeStatusEnum;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.valueset.BundleEntryStatusEnum;
@ -53,12 +53,12 @@ import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
public class CompleteResourceProviderTest {
public class ResourceProviderDstu2Test {
private static ClassPathXmlApplicationContext ourAppCtx;
private static IGenericClient ourClient;
private static FhirContext ourFhirCtx;
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(CompleteResourceProviderTest.class);
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderDstu2Test.class);
// private static IFhirResourceDao<Observation> ourObservationDao;
// private static IFhirResourceDao<Patient> ourPatientDao;
// private static IFhirResourceDao<Questionnaire> ourQuestionnaireDao;
@ -124,11 +124,11 @@ public class CompleteResourceProviderTest {
@Test
public void testSearchWithInclude() throws Exception {
Organization org = new Organization();
org.addIdentifier().setSystem("urn:system").setValue( "testSearchWithInclude01");
org.addIdentifier().setSystem("urn:system:rpdstu2").setValue( "testSearchWithInclude01");
IdDt orgId = ourClient.create().resource(org).prettyPrint().encodedXml().execute().getId();
Patient pat = new Patient();
pat.addIdentifier().setSystem("urn:system").setValue("testSearchWithInclude02");
pat.addIdentifier().setSystem("urn:system:rpdstu2").setValue("testSearchWithInclude02");
pat.getManagingOrganization().setReference(orgId);
ourClient.create().resource(pat).prettyPrint().encodedXml().execute().getId();
@ -136,7 +136,7 @@ public class CompleteResourceProviderTest {
Bundle found = ourClient
.search()
.forResource(Patient.class)
.where(Patient.IDENTIFIER.exactly().systemAndIdentifier("urn:system","testSearchWithInclude02"))
.where(Patient.IDENTIFIER.exactly().systemAndIdentifier("urn:system:rpdstu2","testSearchWithInclude02"))
.include(Patient.INCLUDE_MANAGINGORGANIZATION)
.execute();
//@formatter:on
@ -156,19 +156,19 @@ public class CompleteResourceProviderTest {
// NB this does not get used- The paging provider has its own limits built in
ourDaoConfig.setHardSearchLimit(100);
List<IResource> resources = new ArrayList<>();
List<IResource> resources = new ArrayList<IResource>();
for (int i = 0; i < 100; i++) {
Organization org = new Organization();
org.setName("testCountParam_01");
org.setName("rpdstu2_testCountParam_01");
resources.add(org);
}
ourClient.transaction().withResources(resources).prettyPrint().encodedXml().execute();
Bundle found = ourClient.search().forResource(Organization.class).where(Organization.NAME.matches().value("testCountParam_01")).limitTo(10).execute();
Bundle found = ourClient.search().forResource(Organization.class).where(Organization.NAME.matches().value("rpdstu2_testCountParam_01")).limitTo(10).execute();
assertEquals(100, found.getTotalResults().getValue().intValue());
assertEquals(10, found.getEntries().size());
found = ourClient.search().forResource(Organization.class).where(Organization.NAME.matches().value("testCountParam_01")).limitTo(999).execute();
found = ourClient.search().forResource(Organization.class).where(Organization.NAME.matches().value("rpdstu2_testCountParam_01")).limitTo(999).execute();
assertEquals(100, found.getTotalResults().getValue().intValue());
assertEquals(50, found.getEntries().size());
@ -183,7 +183,7 @@ public class CompleteResourceProviderTest {
int initialSize = client.search().forResource(ImagingStudy.class).execute().size();
String resBody = IOUtils.toString(CompleteResourceProviderTest.class.getResource("/imagingstudy.json"));
String resBody = IOUtils.toString(ResourceProviderDstu2Test.class.getResource("/imagingstudy.json"));
client.create().resource(resBody).execute();
int newSize = client.search().forResource(ImagingStudy.class).execute().size();
@ -201,7 +201,7 @@ public class CompleteResourceProviderTest {
int initialSize = client.search().forResource(DocumentManifest.class).execute().size();
String resBody = IOUtils.toString(CompleteResourceProviderTest.class.getResource("/documentmanifest.json"));
String resBody = IOUtils.toString(ResourceProviderDstu2Test.class.getResource("/documentmanifest.json"));
client.create().resource(resBody).execute();
int newSize = client.search().forResource(DocumentManifest.class).execute().size();
@ -219,7 +219,7 @@ public class CompleteResourceProviderTest {
int initialSize = client.search().forResource(DocumentReference.class).execute().size();
String resBody = IOUtils.toString(CompleteResourceProviderTest.class.getResource("/documentreference.json"));
String resBody = IOUtils.toString(ResourceProviderDstu2Test.class.getResource("/documentreference.json"));
client.create().resource(resBody).execute();
int newSize = client.search().forResource(DocumentReference.class).execute().size();
@ -266,15 +266,15 @@ public class CompleteResourceProviderTest {
@Test
public void testCreateWithClientSuppliedId() {
deleteToken("Patient", Patient.SP_IDENTIFIER, "urn:system", "testCreateWithId01");
deleteToken("Patient", Patient.SP_IDENTIFIER, "urn:system:rpdstu2", "testCreateWithId01");
Patient p1 = new Patient();
p1.addIdentifier().setSystem("urn:system").setValue("testCreateWithId01");
IdDt p1Id = ourClient.create().resource(p1).withId("testCreateWithId").execute().getId();
p1.addIdentifier().setSystem("urn:system:rpdstu2").setValue("testCreateWithId01");
IdDt p1Id = ourClient.create().resource(p1).withId("testCreateWithIdRpDstu2").execute().getId();
assertThat(p1Id.getValue(), containsString("Patient/testCreateWithId/_history"));
assertThat(p1Id.getValue(), containsString("Patient/testCreateWithIdRpDstu2/_history"));
Bundle actual = ourClient.search().forResource(Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system", "testCreateWithId01")).encodedJson().prettyPrint().execute();
Bundle actual = ourClient.search().forResource(Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system:rpdstu2", "testCreateWithId01")).encodedJson().prettyPrint().execute();
assertEquals(1, actual.size());
assertEquals(p1Id.getIdPart(), actual.getEntries().get(0).getResource().getId().getIdPart());
@ -282,7 +282,7 @@ public class CompleteResourceProviderTest {
* ensure that trying to create the same ID again fails appropriately
*/
try {
ourClient.create().resource(p1).withId("testCreateWithId").execute().getId();
ourClient.create().resource(p1).withId("testCreateWithIdRpDstu2").execute().getId();
fail();
} catch (UnprocessableEntityException e) {
// good
@ -313,7 +313,7 @@ public class CompleteResourceProviderTest {
e1.addIdentifier().setSystem("urn:foo").setValue("testDeepChainingE1");
e1.getStatusElement().setValueAsEnum(EncounterStateEnum.IN_PROGRESS);
e1.getClassElementElement().setValueAsEnum(EncounterClassEnum.HOME);
ca.uhn.fhir.model.dev.resource.Encounter.Location location = e1.addLocation();
ca.uhn.fhir.model.dstu2.resource.Encounter.Location location = e1.addLocation();
location.getLocation().setReference(l2id.toUnqualifiedVersionless());
location.setPeriod(new PeriodDt().setStartWithSecondsPrecision(new Date()).setEndWithSecondsPrecision(new Date()));
IdDt e1id = ourClient.create().resource(e1).execute().getId();
@ -351,10 +351,10 @@ public class CompleteResourceProviderTest {
@Test
public void testSaveAndRetrieveWithContained() {
Patient p1 = new Patient();
p1.addIdentifier().setSystem("urn:system").setValue("testSaveAndRetrieveWithContained01");
p1.addIdentifier().setSystem("urn:system:rpdstu2").setValue("testSaveAndRetrieveWithContained01");
Organization o1 = new Organization();
o1.addIdentifier().setSystem("urn:system").setValue("testSaveAndRetrieveWithContained02");
o1.addIdentifier().setSystem("urn:system:rpdstu2").setValue("testSaveAndRetrieveWithContained02");
p1.getManagingOrganization().setResource(o1);
@ -364,7 +364,7 @@ public class CompleteResourceProviderTest {
assertEquals(1, actual.getContained().getContainedResources().size());
assertThat(actual.getText().getDiv().getValueAsString(), containsString("<td>Identifier</td><td>testSaveAndRetrieveWithContained01</td>"));
Bundle b = ourClient.search().forResource("Patient").where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system", "testSaveAndRetrieveWithContained01")).execute();
Bundle b = ourClient.search().forResource("Patient").where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system:rpdstu2", "testSaveAndRetrieveWithContained01")).execute();
assertEquals(1, b.size());
}
@ -497,17 +497,17 @@ public class CompleteResourceProviderTest {
@Test
public void testUpdateWithClientSuppliedIdWhichDoesntExist() {
deleteToken("Patient", Patient.SP_IDENTIFIER, "urn:system", "testUpdateWithClientSuppliedIdWhichDoesntExist");
deleteToken("Patient", Patient.SP_IDENTIFIER, "urn:system", "testUpdateWithClientSuppliedIdWhichDoesntExistRpDstu2");
Patient p1 = new Patient();
p1.addIdentifier().setSystem("urn:system").setValue("testUpdateWithClientSuppliedIdWhichDoesntExist");
MethodOutcome outcome = ourClient.update().resource(p1).withId("testUpdateWithClientSuppliedIdWhichDoesntExist").execute();
p1.addIdentifier().setSystem("urn:system").setValue("testUpdateWithClientSuppliedIdWhichDoesntExistRpDstu2");
MethodOutcome outcome = ourClient.update().resource(p1).withId("testUpdateWithClientSuppliedIdWhichDoesntExistRpDstu2").execute();
assertEquals(true, outcome.getCreated().booleanValue());
IdDt p1Id = outcome.getId();
assertThat(p1Id.getValue(), containsString("Patient/testUpdateWithClientSuppliedIdWhichDoesntExist/_history"));
assertThat(p1Id.getValue(), containsString("Patient/testUpdateWithClientSuppliedIdWhichDoesntExistRpDstu2/_history"));
Bundle actual = ourClient.search().forResource(Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system", "testUpdateWithClientSuppliedIdWhichDoesntExist")).encodedJson().prettyPrint().execute();
Bundle actual = ourClient.search().forResource(Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:system", "testUpdateWithClientSuppliedIdWhichDoesntExistRpDstu2")).encodedJson().prettyPrint().execute();
assertEquals(1, actual.size());
assertEquals(p1Id.getIdPart(), actual.getEntries().get(0).getResource().getId().getIdPart());
@ -525,23 +525,23 @@ public class CompleteResourceProviderTest {
int port = RandomServerPortProvider.findFreePort();
RestfulServer restServer = new RestfulServer();
ourFhirCtx = FhirContext.forDev();
ourFhirCtx = FhirContext.forDstu2();
restServer.setFhirContext(ourFhirCtx);
String serverBase = "http://localhost:" + port + "/fhir/context";
ourAppCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dev.xml", "fhir-spring-test-config.xml");
ourAppCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml");
ourDaoConfig = (DaoConfig) ourAppCtx.getBean(DaoConfig.class);
ourOrganizationDao = (IFhirResourceDao<Organization>) ourAppCtx.getBean("myOrganizationDaoDev", IFhirResourceDao.class);
ourOrganizationDao = (IFhirResourceDao<Organization>) ourAppCtx.getBean("myOrganizationDaoDstu2", IFhirResourceDao.class);
List<IResourceProvider> rpsDev = (List<IResourceProvider>) ourAppCtx.getBean("myResourceProvidersDev", List.class);
List<IResourceProvider> rpsDev = (List<IResourceProvider>) ourAppCtx.getBean("myResourceProvidersDstu2", List.class);
restServer.setResourceProviders(rpsDev);
restServer.getFhirContext().setNarrativeGenerator(new DefaultThymeleafNarrativeGenerator());
IFhirSystemDao systemDao = (IFhirSystemDao) ourAppCtx.getBean("mySystemDaoDev", IFhirSystemDao.class);
IFhirSystemDao systemDao = (IFhirSystemDao) ourAppCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class);
JpaSystemProvider systemProv = new JpaSystemProvider(systemDao);
restServer.setPlainProviders(systemProv);

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.test;
package ca.uhn.fhir.jpa.provider;
import static org.junit.Assert.*;
@ -16,8 +16,8 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.provider.JpaSystemProvider;
import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider;
import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.dev.resource.SupportingDocumentation;
import ca.uhn.fhir.model.dev.valueset.AdministrativeGenderEnum;
import ca.uhn.fhir.model.dstu2.resource.SupportingDocumentation;
import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.primitive.IdDt;
@ -27,10 +27,10 @@ import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.RestfulServer;
public class MultiFhirVersionTest {
public class ResourceProviderMultiVersionTest {
private static ClassPathXmlApplicationContext ourAppCtx;
private static IGenericClient ourClientDev;
private static IGenericClient ourClientDstu2;
private static Server ourServer;
private static IGenericClient ourClientDstu1;
@ -55,64 +55,64 @@ public class MultiFhirVersionTest {
assertEquals("M", patDstu1.getGender().getCodingFirstRep().getCode().getValue());
// Read back as DEV
ca.uhn.fhir.model.dev.resource.Patient patDev;
patDev = ourClientDev.read(ca.uhn.fhir.model.dev.resource.Patient.class, id);
ca.uhn.fhir.model.dstu2.resource.Patient patDstu2;
patDstu2 = ourClientDstu2.read(ca.uhn.fhir.model.dstu2.resource.Patient.class, id);
assertEquals("testSubmitPatient01", p.getIdentifierFirstRep().getValue().getValue());
assertEquals(1, patDev.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals(null, patDev.getGender());
assertEquals(1, patDstu2.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals(null, patDstu2.getGender());
// Search using new bundle format
Bundle bundle = ourClientDev.search().forResource(ca.uhn.fhir.model.dev.resource.Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:MultiFhirVersionTest", "testSubmitPatient01")).encodedJson().execute();
patDev = (ca.uhn.fhir.model.dev.resource.Patient) bundle.getEntries().get(0).getResource();
Bundle bundle = ourClientDstu2.search().forResource(ca.uhn.fhir.model.dstu2.resource.Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:MultiFhirVersionTest", "testSubmitPatient01")).encodedJson().execute();
patDstu2 = (ca.uhn.fhir.model.dstu2.resource.Patient) bundle.getEntries().get(0).getResource();
assertEquals("testSubmitPatient01", p.getIdentifierFirstRep().getValue().getValue());
assertEquals(1, patDev.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals(null, patDev.getGender());
assertEquals(1, patDstu2.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals(null, patDstu2.getGender());
}
@Test
public void testSubmitPatientDev() {
ca.uhn.fhir.model.dev.resource.Patient p = new ca.uhn.fhir.model.dev.resource.Patient();
p.addIdentifier().setSystem("urn:MultiFhirVersionTest").setValue("testSubmitPatientDev01");
public void testSubmitPatientDstu2() {
ca.uhn.fhir.model.dstu2.resource.Patient p = new ca.uhn.fhir.model.dstu2.resource.Patient();
p.addIdentifier().setSystem("urn:MultiFhirVersionTest").setValue("testSubmitPatientDstu201");
p.addUndeclaredExtension(false, "http://foo#ext1", new StringDt("The value"));
p.setGender(AdministrativeGenderEnum.MALE);
IdDt id = ourClientDev.create().resource(p).execute().getId();
IdDt id = ourClientDstu2.create().resource(p).execute().getId();
// Read back as DSTU1
Patient patDstu1 = ourClientDstu1.read(Patient.class, id);
assertEquals("testSubmitPatientDev01", p.getIdentifierFirstRep().getValue());
assertEquals("testSubmitPatientDstu201", p.getIdentifierFirstRep().getValue());
assertEquals(1, patDstu1.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals(null, patDstu1.getGender().getCodingFirstRep().getCode().getValue());
// Read back as DEV
ca.uhn.fhir.model.dev.resource.Patient patDev;
patDev = ourClientDev.read(ca.uhn.fhir.model.dev.resource.Patient.class, id);
assertEquals("testSubmitPatientDev01", p.getIdentifierFirstRep().getValue());
assertEquals(1, patDev.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals("male", patDev.getGender());
ca.uhn.fhir.model.dstu2.resource.Patient patDstu2;
patDstu2 = ourClientDstu2.read(ca.uhn.fhir.model.dstu2.resource.Patient.class, id);
assertEquals("testSubmitPatientDstu201", p.getIdentifierFirstRep().getValue());
assertEquals(1, patDstu2.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals("male", patDstu2.getGender());
// Search using new bundle format
Bundle bundle = ourClientDev.search().forResource(ca.uhn.fhir.model.dev.resource.Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:MultiFhirVersionTest", "testSubmitPatientDev01")).encodedJson().execute();
patDev = (ca.uhn.fhir.model.dev.resource.Patient) bundle.getEntries().get(0).getResource();
assertEquals("testSubmitPatientDev01", p.getIdentifierFirstRep().getValue());
assertEquals(1, patDev.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals("male", patDev.getGender());
Bundle bundle = ourClientDstu2.search().forResource(ca.uhn.fhir.model.dstu2.resource.Patient.class).where(Patient.IDENTIFIER.exactly().systemAndCode("urn:MultiFhirVersionTest", "testSubmitPatientDstu201")).encodedJson().execute();
patDstu2 = (ca.uhn.fhir.model.dstu2.resource.Patient) bundle.getEntries().get(0).getResource();
assertEquals("testSubmitPatientDstu201", p.getIdentifierFirstRep().getValue());
assertEquals(1, patDstu2.getUndeclaredExtensionsByUrl("http://foo#ext1").size());
assertEquals("male", patDstu2.getGender());
}
@Test
public void testUnknownResourceType() {
ca.uhn.fhir.model.dev.resource.Patient p = new ca.uhn.fhir.model.dev.resource.Patient();
ca.uhn.fhir.model.dstu2.resource.Patient p = new ca.uhn.fhir.model.dstu2.resource.Patient();
p.addIdentifier().setSystem("urn:MultiFhirVersionTest").setValue("testUnknownResourceType01");
IdDt id = ourClientDev.create().resource(p).execute().getId();
IdDt id = ourClientDstu2.create().resource(p).execute().getId();
SupportingDocumentation s = new SupportingDocumentation();
s.addIdentifier().setSystem("urn:MultiFhirVersionTest").setValue("testUnknownResourceType02");
id = ourClientDev.create().resource(s).execute().getId();
id = ourClientDstu2.create().resource(s).execute().getId();
Bundle history = ourClientDev.history(null, id, null, null);
Bundle history = ourClientDstu2.history(null, id, null, null);
assertEquals(SupportingDocumentation.class, history.getEntries().get(0).getResource().getClass());
assertEquals(ca.uhn.fhir.model.dev.resource.Patient.class, history.getEntries().get(1).getResource().getClass());
assertEquals(ca.uhn.fhir.model.dstu2.resource.Patient.class, history.getEntries().get(1).getResource().getClass());
history = ourClientDstu1.history(null, id, null, null);
assertEquals(ca.uhn.fhir.model.dstu.resource.Patient.class, history.getEntries().get(0).getResource().getClass());
@ -122,7 +122,13 @@ public class MultiFhirVersionTest {
@SuppressWarnings("unchecked")
@BeforeClass
public static void beforeClass() throws Exception {
ourAppCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dev.xml", "hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-spring-test-config.xml");
//@formatter:off
ourAppCtx = new ClassPathXmlApplicationContext(
"hapi-fhir-server-resourceproviders-dstu1.xml",
"hapi-fhir-server-resourceproviders-dstu2.xml",
"fhir-jpabase-spring-test-config.xml"
);
//@formatter:on
int port = RandomServerPortProvider.findFreePort();
ServletContextHandler proxyHandler = new ServletContextHandler();
@ -134,17 +140,17 @@ public class MultiFhirVersionTest {
* DEV resources
*/
RestfulServer restServerDev = new RestfulServer();
restServerDev.setFhirContext(ourAppCtx.getBean("myFhirContextDev", FhirContext.class));
List<IResourceProvider> rpsDev = (List<IResourceProvider>) ourAppCtx.getBean("myResourceProvidersDev", List.class);
restServerDev.setResourceProviders(rpsDev);
RestfulServer restServerDstu2 = new RestfulServer();
restServerDstu2.setFhirContext(ourAppCtx.getBean("myFhirContextDstu2", FhirContext.class));
List<IResourceProvider> rpsDstu2 = (List<IResourceProvider>) ourAppCtx.getBean("myResourceProvidersDstu2", List.class);
restServerDstu2.setResourceProviders(rpsDstu2);
JpaSystemProvider systemProvDev = (JpaSystemProvider) ourAppCtx.getBean("mySystemProviderDev", JpaSystemProvider.class);
restServerDev.setPlainProviders(systemProvDev);
JpaSystemProvider systemProvDstu2 = (JpaSystemProvider) ourAppCtx.getBean("mySystemProviderDstu2", JpaSystemProvider.class);
restServerDstu2.setPlainProviders(systemProvDstu2);
ServletHolder servletHolder = new ServletHolder();
servletHolder.setServlet(restServerDev);
proxyHandler.addServlet(servletHolder, "/fhir/contextDev/*");
servletHolder.setServlet(restServerDstu2);
proxyHandler.addServlet(servletHolder, "/fhir/contextDstu2/*");
/*
* DSTU resources
@ -171,11 +177,11 @@ public class MultiFhirVersionTest {
/*
* DEV Client
*/
String serverBaseDev = "http://localhost:" + port + "/fhir/contextDev";
FhirContext ctxDev = ourAppCtx.getBean("myFhirContextDev", FhirContext.class);
ctxDev.getRestfulClientFactory().setSocketTimeout(600 * 1000);
ourClientDev = ctxDev.newRestfulGenericClient(serverBaseDev);
ourClientDev.registerInterceptor(new LoggingInterceptor(true));
String serverBaseDstu2 = "http://localhost:" + port + "/fhir/contextDstu2";
FhirContext ctxDstu2 = ourAppCtx.getBean("myFhirContextDstu2", FhirContext.class);
ctxDstu2.getRestfulClientFactory().setSocketTimeout(600 * 1000);
ourClientDstu2 = ctxDstu2.newRestfulGenericClient(serverBaseDstu2);
ourClientDstu2.registerInterceptor(new LoggingInterceptor(true));
/*
* DSTU1 Client

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.test;
package ca.uhn.fhir.jpa.provider;
import java.io.InputStream;
import java.io.InputStreamReader;
@ -19,6 +19,7 @@ import ca.uhn.fhir.jpa.provider.JpaSystemProvider;
import ca.uhn.fhir.jpa.rp.dstu.ObservationResourceProvider;
import ca.uhn.fhir.jpa.rp.dstu.OrganizationResourceProvider;
import ca.uhn.fhir.jpa.rp.dstu.PatientResourceProvider;
import ca.uhn.fhir.jpa.provider.QuestionnaireResourceProvider;
import ca.uhn.fhir.jpa.testutil.RandomServerPortProvider;
import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IResource;
@ -29,7 +30,7 @@ import ca.uhn.fhir.model.dstu.resource.Questionnaire;
import ca.uhn.fhir.rest.client.IGenericClient;
import ca.uhn.fhir.rest.server.RestfulServer;
public class SystemTest {
public class SystemProviderTest {
private static Server ourServer;
@ -40,11 +41,11 @@ public class SystemTest {
@Test
public void testTransactionFromBundle() throws Exception {
InputStream bundleRes = SystemTest.class.getResourceAsStream("/test-server-seed-bundle.json");
InputStream bundleRes = SystemProviderTest.class.getResourceAsStream("/test-server-seed-bundle.json");
Bundle bundle = new FhirContext().newJsonParser().parseBundle(new InputStreamReader(bundleRes));
List<IResource> res = bundle.toListOfResources();
ourClient.transaction(res);
ourClient.transaction().withResources(res).execute();
}
@ -58,7 +59,7 @@ public class SystemTest {
@SuppressWarnings("unchecked")
@BeforeClass
public static void beforeClass() throws Exception {
ourAppCtx = new ClassPathXmlApplicationContext("fhir-spring-test-config.xml", "hapi-fhir-server-resourceproviders-dstu1.xml");
ourAppCtx = new ClassPathXmlApplicationContext("fhir-jpabase-spring-test-config.xml", "hapi-fhir-server-resourceproviders-dstu1.xml");
IFhirResourceDao<Patient> patientDao = (IFhirResourceDao<Patient>) ourAppCtx.getBean("myPatientDaoDstu1", IFhirResourceDao.class);
PatientResourceProvider patientRp = new PatientResourceProvider();

View File

@ -23,35 +23,35 @@
</bean>
<bean id="myDiagnosticReportDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.DiagnosticReport"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.DiagnosticReport"/>
<property name="context" ref="myFhirContext"/>
</bean>
<bean id="myDeviceDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.Device"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.Device"/>
<property name="context" ref="myFhirContext"/>
</bean>
<bean id="myPatientDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.Patient"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.Patient"/>
<property name="context" ref="myFhirContext"/>
</bean>
<bean id="myObservationDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.Observation"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.Observation"/>
<property name="context" ref="myFhirContext"/>
</bean>
<bean id="myOrganizationDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.Organization"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.Organization"/>
<property name="context" ref="myFhirContext"/>
</bean>
<bean id="myLocationDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.Location"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.Location"/>
<property name="context" ref="myFhirContext"/>
</bean>
<bean id="myQuestionnaireDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.Questionnaire"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.Questionnaire"/>
<property name="context" ref="myFhirContext"/>
</bean>
<bean id="myEncounterDao" class="ca.uhn.fhir.jpa.dao.FhirResourceDao">
<property name="resourceType" value="ca.uhn.fhir.model.dev.resource.Encounter"/>
<property name="resourceType" value="ca.uhn.fhir.model.dstu2.resource.Encounter"/>
<property name="context" ref="myFhirContext"/>
</bean>

View File

@ -1,166 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="src" path="target/generated-sources/tinder"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/json/javax.json-api/1.0/javax.json-api-1.0.jar" sourcepath="M2_REPO/javax/json/javax.json-api/1.0/javax.json-api-1.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/mail/javax.mail-api/1.5.0/javax.mail-api-1.5.0.jar" sourcepath="M2_REPO/javax/mail/javax.mail-api/1.5.0/javax.mail-api-1.5.0-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/javax/mail/javax.mail-api/1.5.0/javax.mail-api-1.5.0-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" sourcepath="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" sourcepath="M2_REPO/javax/transaction/jta/1.1/jta-1.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar" sourcepath="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
<classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/fasterxml/classmate/1.0.0/classmate-1.0.0.jar" sourcepath="M2_REPO/com/fasterxml/classmate/1.0.0/classmate-1.0.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar" sourcepath="M2_REPO/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4.jar" sourcepath="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1.jar" sourcepath="M2_REPO/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar" sourcepath="M2_REPO/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.10.2.0/derby-10.10.2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/guava/guava/17.0/guava-17.0.jar" sourcepath="M2_REPO/com/google/guava/guava/17.0/guava-17.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="/hapi-fhir-base"/>
<classpathentry kind="src" path="/hapi-fhir-jpaserver-base"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/common/hibernate-commons-annotations/4.0.4.Final/hibernate-commons-annotations-4.0.4.Final.jar" sourcepath="M2_REPO/org/hibernate/common/hibernate-commons-annotations/4.0.4.Final/hibernate-commons-annotations-4.0.4.Final-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.jar" sourcepath="M2_REPO/org/hibernate/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-ehcache/4.3.5.Final/hibernate-ehcache-4.3.5.Final.jar" sourcepath="M2_REPO/org/hibernate/hibernate-ehcache/4.3.5.Final/hibernate-ehcache-4.3.5.Final-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/4.3.5.Final/hibernate-entitymanager-4.3.5.Final.jar" sourcepath="M2_REPO/org/hibernate/hibernate-entitymanager/4.3.5.Final/hibernate-entitymanager-4.3.5.Final-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar" sourcepath="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/5.1.0.Final/hibernate-validator-5.1.0.Final.jar" sourcepath="M2_REPO/org/hibernate/hibernate-validator/5.1.0.Final/hibernate-validator-5.1.0.Final-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/jandex/1.1.0.Final/jandex-1.1.0.Final.jar" sourcepath="M2_REPO/org/jboss/jandex/1.1.0.Final/jandex-1.1.0.Final-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar" sourcepath="M2_REPO/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar" sourcepath="M2_REPO/org/glassfish/javax.json/1.0.4/javax.json-1.0.4-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.0.Final/jboss-transaction-api_1.2_spec-1.0.0.Final.jar" sourcepath="M2_REPO/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.0.Final/jboss-transaction-api_1.2_spec-1.0.0.Final-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.0.Final/jboss-transaction-api_1.2_spec-1.0.0.Final-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-continuation/9.1.1.v20140108/jetty-continuation-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-continuation/9.1.1.v20140108/jetty-continuation-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-http/9.1.1.v20140108/jetty-http-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-http/9.1.1.v20140108/jetty-http-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-io/9.1.1.v20140108/jetty-io-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-io/9.1.1.v20140108/jetty-io-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-security/9.1.1.v20140108/jetty-security-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-security/9.1.1.v20140108/jetty-security-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-server/9.1.1.v20140108/jetty-server-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-server/9.1.1.v20140108/jetty-server-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-servlet/9.1.1.v20140108/jetty-servlet-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-servlet/9.1.1.v20140108/jetty-servlet-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-servlets/9.1.1.v20140108/jetty-servlets-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-servlets/9.1.1.v20140108/jetty-servlets-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-util/9.1.1.v20140108/jetty-util-9.1.1.v20140108.jar" sourcepath="M2_REPO/org/eclipse/jetty/jetty-util/9.1.1.v20140108/jetty-util-9.1.1.v20140108-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar" sourcepath="M2_REPO/junit/junit/4.11/junit-4.11-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/junit/junit/4.11/junit-4.11-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-aop/4.0.1.RELEASE/spring-aop-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-aop/4.0.1.RELEASE/spring-aop-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-aop/4.0.1.RELEASE/spring-aop-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/4.0.1.RELEASE/spring-beans-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-beans/4.0.1.RELEASE/spring-beans-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-beans/4.0.1.RELEASE/spring-beans-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/4.0.1.RELEASE/spring-context-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-context/4.0.1.RELEASE/spring-context-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-context/4.0.1.RELEASE/spring-context-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-context-support/4.0.1.RELEASE/spring-context-support-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-context-support/4.0.1.RELEASE/spring-context-support-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-context-support/4.0.1.RELEASE/spring-context-support-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/4.0.1.RELEASE/spring-core-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-core/4.0.1.RELEASE/spring-core-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-core/4.0.1.RELEASE/spring-core-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-expression/4.0.1.RELEASE/spring-expression-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-expression/4.0.1.RELEASE/spring-expression-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-expression/4.0.1.RELEASE/spring-expression-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-jdbc/4.0.1.RELEASE/spring-jdbc-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-jdbc/4.0.1.RELEASE/spring-jdbc-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-jdbc/4.0.1.RELEASE/spring-jdbc-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-orm/4.0.1.RELEASE/spring-orm-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-orm/4.0.1.RELEASE/spring-orm-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-orm/4.0.1.RELEASE/spring-orm-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-tx/4.0.1.RELEASE/spring-tx-4.0.1.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-tx/4.0.1.RELEASE/spring-tx-4.0.1.RELEASE-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/springframework/spring-tx/4.0.1.RELEASE/spring-tx-4.0.1.RELEASE-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar" sourcepath="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.2.0/woodstox-core-asl-4.2.0.jar" sourcepath="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.2.0/woodstox-core-asl-4.2.0-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/james/.m2/repository/org/codehaus/woodstox/woodstox-core-asl/4.2.0/woodstox-core-asl-4.2.0-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,4 +0,0 @@
myUnitTestDB/
target/
/bin
/target/

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>hapi-fhir-jpaserver-test</name>
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects>
<project>hapi-fhir-base</project>
<project>hapi-fhir-jpaserver-base</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,16 +0,0 @@
<projectDescription>
<name>hapi-fhir-jpaserver-test</name>
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects>
<project>hapi-fhir-base</project>
<project>hapi-fhir-jpaserver-base</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,7 +0,0 @@
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
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -1,5 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

View File

@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -1,142 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hapi-fhir-jpaserver-test</artifactId>
<packaging>jar</packaging>
<name>HAPI FHIR JPA Server - Test Project</name>
<dependencies>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-base</artifactId>
<version>0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dev</artifactId>
<version>0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>${thymeleaf-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback_version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava_version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty_version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty_version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty_version}</version>
</dependency>
</dependencies>
<properties>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-tinder-plugin</artifactId>
<versionRange>[0.4-SNAPSHOT,)</versionRange>
<goals>
<goal>generate-jparest-server</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,98 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>0.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-test</artifactId>
<packaging>jar</packaging>
<name>HAPI FHIR JPA Server - Tester</name>
<dependencies>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-base</artifactId>
<version>0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>17.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<junit_version>4.11</junit_version>
<jetty_version>9.1.1.v20140108</jetty_version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:task="http://www.springframework.org/schema/task" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
"
default-autowire="no" default-lazy-init="false">
<context:annotation-config />
<context:mbean-server />
<bean id="myDaoConfig" class="ca.uhn.fhir.jpa.dao.DaoConfig">
</bean>
<bean id="myPersistenceDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
<property name="url" value="jdbc:derby:memory:myUnitTestDB;create=true" />
<!-- <property name="url" value="jdbc:derby:directory:myUnitTestDB;create=true" /> -->
</bean>
<bean id="myEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="myPersistenceDataSource" />
<property name="persistenceXmlLocation" value="classpath:fhir_jpatest_persistence.xml" />
<property name="persistenceUnitName" value="FHIR_UT" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="false" />
<property name="generateDdl" value="true" />
<property name="databasePlatform" value="org.hibernate.dialect.DerbyTenSevenDialect" />
</bean>
</property>
</bean>
<bean id="myTxManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="myEntityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="myTxManager" />
</beans>

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="FHIR_UT" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>ca.uhn.fhir.jpa.entity.ForcedId</class>
<class>ca.uhn.fhir.jpa.entity.ResourceHistoryTable</class>
<class>ca.uhn.fhir.jpa.entity.ResourceHistoryTag</class>
<class>ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamDate</class>
<class>ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamNumber</class>
<class>ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamQuantity</class>
<class>ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamString</class>
<class>ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamToken</class>
<class>ca.uhn.fhir.jpa.entity.ResourceLink</class>
<class>ca.uhn.fhir.jpa.entity.ResourceTable</class>
<class>ca.uhn.fhir.jpa.entity.ResourceTag</class>
<class>ca.uhn.fhir.jpa.entity.TagDefinition</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="hibernate.connection.url" value="jdbc:hsqldb:mem:unit-testing-jpa" />
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
<property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.connection.username" value="sa" />
<property name="hibernate.connection.password" value="" />
<property name="hibernate.jdbc.batch_size" value="0" />
<property name="hibernate.cache.use_minimal_puts" value="false" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.cache.use_query_cache" value="false" />
<property name="hibernate.cache.use_second_level_cache" value="false" />
<property name="hibernate.cache.use_structured_entries" value="false" />
<!--
<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory" />
-->
</properties>
</persistence-unit>
</persistence>

View File

@ -1,16 +0,0 @@
<configuration scan="true" scanPeriod="30 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} [%file:%line] %msg%n</pattern>
</encoder>
</appender>
<root>
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Patient Donald DUCK @ Acme Healthcare, Inc. MR = 654321</p>
</div>
</text>
<identifier>
<use value="usual"/>
<label value="MRN"/>
<system value="urn:oid:0.1.2.3.4.5.6.7"/>
<value value="654321"/>
</identifier>
<name>
<use value="official"/>
<family value="Donald"/>
<given value="Duck"/>
</name>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
<display value="Male"/>
</coding>
</gender>
<photo>
<contentType value="image/gif"/>
<data value="R0lGODlhEwARAPcAAAAAAAAA/+9aAO+1AP/WAP/eAP/eCP/eEP/eGP/nAP/nCP/nEP/nIf/nKf/nUv/nWv/vAP/vCP/vEP/vGP/vIf/vKf/vMf/vOf/vWv/vY//va//vjP/3c//3lP/3nP//tf//vf///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAEALAAAAAATABEAAAi+AAMIDDCgYMGBCBMSvMCQ4QCFCQcwDBGCA4cLDyEGECDxAoAQHjxwyKhQAMeGIUOSJJjRpIAGDS5wCDly4AALFlYOgHlBwwOSNydM0AmzwYGjBi8IHWoTgQYORg8QIGDAwAKhESI8HIDgwQaRDI1WXXAhK9MBBzZ8/XDxQoUFZC9IiCBh6wEHGz6IbNuwQoSpWxEgyLCXL8O/gAnylNlW6AUEBRIL7Og3KwQIiCXb9HsZQoIEUzUjNEiaNMKAAAA7"/>
</photo>
<contact>
<relationship>
<coding>
<system value="http://hl7.org/fhir/patient-contact-relationship"/>
<code value="owner"/>
</coding>
</relationship>
<organization>
<!-- Which organization to contact to reach this patient -->
<reference value="Organization/1"/>
<display value="Walt Disney Corporation"/>
</organization>
</contact>
<managingOrganization>
<reference value="Organization/1"/>
<display value="ACME Healthcare, Inc"/>
</managingOrganization>
<link>
<other>
<reference value="Patient/pat2"/>
</other>
<type value="seealso" />
</link>
<active value="true"/>
</Patient>

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table>
<tbody>
<tr>
<td>Id</td>
<td>Kenzi (Dog: Golden Retriever)</td>
</tr>
<tr>
<td>Owner</td>
<td>Peter Chalmers, 534 Erewhon, Pleasantville, Vic, 3999</td>
</tr>
<tr>
<td>Contacts</td>
<td>Work: (03) 5555 6473</td>
</tr>
<tr>
<td>Id</td>
<td>Dog Tag: 1234123 (Maroondah City Council)</td>
</tr>
</tbody>
</table>
</div>
</text>
<!-- Dog tag, under Maroondah City council -->
<identifier>
<label value="Dog Tag"/>
<system value="http://www.maroondah.vic.gov.au/AnimalRegFees.aspx"/>
<value value="1234123"/>
<period>
<start value="2010-05-31"/>
</period>
<assigner>
<display value="Maroondah City Council"/>
</assigner>
</identifier>
<!-- Dog's name: Kenzi -->
<name>
<use value="usual"/>
<given value="Kenzi"/>
</name>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="F"/>
</coding>
</gender>
<birthDate value="2010-03-23"/>
<contact>
<relationship>
<coding>
<system value="http://hl7.org/fhir/patient-contact-relationship"/>
<code value="owner"/>
</coding>
</relationship>
<name>
<family value="Chalmers"/>
<given value="Peter"/>
<given value="James"/>
</name>
<telecom>
<system value="phone"/>
<value value="(03) 5555 6473"/>
<use value="work"/>
</telecom>
</contact>
<animal>
<species>
<coding>
<system value="http://hl7.org/fhir/animal-species"/>
<code value="canislf"/>
<display value="Dog"/>
</coding>
</species>
<breed>
<coding>
<system value="http://snomed.info/sct"/>
<code value="58108001"/>
<display value="Golden retriever"/>
</coding>
<coding>
<system value="http://hl7.org/fhir/animal-breed"/>
<code value="gret"/>
<display value="Golden Retriever"/>
</coding>
</breed>
<genderStatus>
<coding>
<system value="http://hl7.org/fhir/animal-genderstatus"/>
<code value="neutered"/>
</coding>
</genderStatus>
</animal>
<managingOrganization>
<display value="Pete's Vetinary Services"/>
</managingOrganization>
<active value="true"/>
</Patient>

View File

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Patient Donald D DUCK @ Acme Healthcare, Inc. MR = 123456</p>
</div>
</text>
<identifier>
<use value="usual"/>
<label value="MRN"/>
<system value="urn:oid:0.1.2.3.4.5.6.7"/>
<value value="123456"/>
</identifier>
<name>
<use value="official"/>
<family value="Donald"/>
<given value="Duck"/>
<given value="D"/>
</name>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
<display value="Male"/>
</coding>
</gender>
<photo>
<contentType value="image/gif"/>
<data value="R0lGODlhEwARAPcAAAAAAAAA/+9aAO+1AP/WAP/eAP/eCP/eEP/eGP/nAP/nCP/nEP/nIf/nKf/nUv/nWv/vAP/vCP/vEP/vGP/vIf/vKf/vMf/vOf/vWv/vY//
va//vjP/3c//3lP/3nP//tf//vf////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////yH5BAEAAAEALAAAAAATABEAAAi+AAMIDDCgYMGBCBMSvMCQ4QCFCQcwDBGCA4cLDyE
GECDxAoAQHjxwyKhQAMeGIUOSJJjRpIAGDS5wCDly4AALFlYOgHlBwwOSNydM0AmzwYGjBi8IHWoTgQYORg8QIGDAwAKhESI8HIDgwQaRDI1WXXAhK9MBBzZ8/X
DxQoUFZC9IiCBh6wEHGz6IbNuwQoSpWxEgyLCXL8O/gAnylNlW6AUEBRIL7Og3KwQIiCXb9HsZQoIEUzUjNEiaNMKAAAA7"/>
</photo>
<managingOrganization>
<reference value="Organization/1"/>
<display value="ACME Healthcare, Inc"/>
</managingOrganization>
<link>
<other>
<reference value="Patient/pat1"/>
</other>
<type value="seealso" />
</link>
<active value="true"/>
</Patient>

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/fhir-all.xsd">
<extension url="http://nema.org/fhir/extensions#0010:1010">
<valueQuantity>
<value value="56"/>
<units value="Y"/>
</valueQuantity>
</extension>
<extension url="http://nema.org/fhir/extensions#0010:1020">
<valueQuantity>
<value value="1.83"/>
<units value="m"/>
</valueQuantity>
</extension>
<extension url="http://nema.org/fhir/extensions#0010:1030">
<valueQuantity>
<value value="72.58"/>
<units value="kg"/>
</valueQuantity>
</extension>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"> Patient MINT_TEST, ID = MINT1234. Age = 56y, Size =
1.83m, Weight = 72.58kg </div>
</text>
<identifier>
<system value="http://nema.org/examples/patients"/>
<value value="MINT1234"/>
</identifier>
<name>
<family value="MINT_TEST"/>
</name>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
</coding>
<coding id="nemagender">
<system value="http://nema.org/examples/gender"/>
<code value="M"/>
</coding>
<!-- <primary value="nemagender" /> -->
</gender>
<managingOrganization>
<reference value="Organization/1"/>
</managingOrganization>
<active value="true"/>
</Patient>

View File

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<identifier>
<use value="usual"/>
<system value="urn:oid:2.16.840.1.113883.2.4.6.3"/>
<!-- BSN identification system -->
<value value="738472983"/>
</identifier>
<identifier>
<use value="usual"/>
<system value="urn:oid:2.16.840.1.113883.2.4.6.3"/>
<!-- BSN identification system -->
</identifier>
<name>
<use value="usual"/>
<family value="van de Heuvel"/>
<given value="Pieter"/>
<suffix value="MSc"/>
</name>
<telecom>
<system value="phone"/>
<value value="0648352638"/>
<use value="mobile"/>
</telecom>
<telecom>
<system value="email"/>
<value value="p.heuvel@gmail.com"/>
<use value="home"/>
</telecom>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
<display value="Male"/>
</coding>
</gender>
<birthDate value="1944-11-17"/>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<line value="Van Egmondkade 23"/>
<city value="Amsterdam"/>
<zip value="1024 RJ"/>
<country value="NLD"/> <!-- ISO 3166 Codes (Countries) -->
</address>
<maritalStatus>
<coding>
<system value="http://hl7.org/fhir/v3/MaritalStatus"/>
<code value="M"/>
<display value="Married"/>
</coding>
<text value="Getrouwd"/>
</maritalStatus>
<multipleBirthBoolean value="true"/>
<contact>
<relationship>
<coding>
<system value="http://hl7.org/fhir/patient-contact-relationship"/>
<code value="partner"/>
</coding>
</relationship>
<name>
<use value="usual"/>
<family value="Abels"/>
<given value="Sarah"/>
</name>
<telecom>
<system value="phone"/>
<value value="0690383372"/>
<use value="mobile"/>
</telecom>
</contact>
<communication>
<coding>
<system value="urn:ietf:bcp:47"/>
<!-- IETF language tag -->
<code value="nl"/>
<display value="Dutch"/>
</coding>
<text value="Nederlands"/>
</communication>
<managingOrganization>
<reference value="Organization/f001"/>
<display value="Burgers University Medical Centre"/>
</managingOrganization>
<active value="true"/>
</Patient>

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<identifier>
<!--The identifier for the person as this patient (fictive)-->
<use value="official"/>
<label value="BSN"/>
<system value="urn:oid:2.16.840.1.113883.2.4.6.3"/>
<value value="123456789"/>
</identifier>
<!--Demographics-->
<identifier>
<!--The identifier for this individual-->
<use value="official"/>
<label value="BSN"/>
<system value="urn:oid:2.16.840.1.113883.2.4.6.3"/>
<value value="123456789"/>
</identifier>
<name>
<!--The name associated with the individual (fictive)-->
<use value="official"/>
<text value="Roel"/>
<family value="Bor"/>
<given value="Roelof Olaf"/>
<prefix value="Drs."/>
<suffix value="PDEng."/>
</name>
<telecom>
<!--The mobile contact detail for the individual-->
<system value="phone"/>
<value value="+31612345678"/>
<use value="mobile"/>
</telecom>
<telecom>
<!--The home contact detail for the individual-->
<system value="phone"/>
<value value="+31201234567"/>
<use value="home"/>
</telecom>
<gender>
<!--The gender for administrative purposes-->
<coding>
<system value="http://snomed.info/sct"/>
<code value="248153007"/>
<display value="Male"/>
</coding>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
<display value="Male"/>
</coding>
</gender>
<birthDate value="1960-03-13"/>
<!--The date and time of birth for the individual -->
<deceasedBoolean value="false"/>
<!--Indicates that the individual is not deceased-->
<address><!--Home address for the individual-->
<use value="home"/>
<line value="Bos en Lommerplein 280"/>
<city value="Amsterdam"/>
<zip value="1055RW"/>
<country value="NLD"/><!--ISO 3166 3 letter code-->
</address>
<maritalStatus>
<!--Marital status of the person-->
<coding>
<system value="http://snomed.info/sct"/>
<code value="36629006"/>
<display value="Legally married"/>
</coding>
<coding>
<system value="http://hl7.org/fhir/v3/MaritalStatus"/>
<code value="M"/>
</coding>
</maritalStatus>
<multipleBirthBoolean value="false"/>
<photo>
<contentType value="image/jpeg" />
<url value="binary/@f006"/>
</photo>
<contact>
<!--Contact of the patient-->
<relationship>
<!--Indicates that the contact is the patient's wife-->
<coding>
<system value="http://snomed.info/sct"/>
<code value="127850001"/>
<display value="Wife"/>
</coding>
<coding>
<system value="http://hl7.org/fhir/patient-contact-relationship"/>
<code value="partner"/>
</coding>
</relationship>
<name>
<!--The name of the contact-->
<use value="usual"/>
<text value="Ariadne Bor-Jansma"/>
</name>
<telecom>
<!--The home contact detail-->
<system value="phone"/>
<value value="+31201234567"/>
<use value="home"/>
</telecom>
</contact>
<communication>
<coding>
<system value="urn:std:iso:639-1"/>
<code value="nl-NL"/>
<display value="Dutch"/>
</coding>
</communication>
<managingOrganization>
<reference value="Organization/f201"/>
<display value="AUMC"/>
</managingOrganization>
<!--Indicates that the patient is not part of a multiple birth -->
<active value="true"/>
</Patient>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- PID|||AB60001^^^A^PI||BROOKS^ALBERT^^^^^L -->
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Albert Brooks, Id: AB60001</div>
</text>
<!-- MRN assigned by ACME healthcare on 6-May 2001 -->
<identifier>
<label value="Internal Identifier"/>
<value value="AB60001"/>
</identifier>
<!-- Peter James Chalmers, but called "Jim" -->
<name>
<family value="BROOKS"/>
<given value="ALBERT"/>
</name>
<active value="true"/>
</Patient>

View File

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<extension url="http://hl7.org/fhir/Profile/us-core#race">
<valueCodeableConcept>
<coding>
<system value="http://hl7.org/fhir/v3/Race" />
<code value="1096-7" />
</coding>
</valueCodeableConcept>
</extension>
<extension url="http://hl7.org/fhir/Profile/us-core#ethnicity">
<valueCodeableConcept>
<coding>
<system value="http://hl7.org/fhir/v3/Ethnicity" />
<code value="2162-6" />
</coding>
</valueCodeableConcept>
</extension>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table>
<tbody>
<tr>
<td>Name</td>
<td>Peter James <b>Chalmers</b> ("Jim")</td>
</tr>
<tr>
<td>Address</td>
<td>534 Erewhon, Pleasantville, Orange County, 3999</td>
</tr>
<tr>
<td>Contacts</td>
<td>Home: unknown. Work: (03) 5555 6473</td>
</tr>
<tr>
<td>Id</td>
<td>MRN: 12345 (Acme Healthcare)</td>
</tr>
</tbody>
</table>
</div>
</text>
<!-- Peter James Chalmers, but called "Jim" -->
<name>
<use value="official"/>
<family value="Chalmers"/>
<given value="Peter"/>
<given value="James"/>
</name>
<address>
<extension url="http://hl7.org/fhir/Profile/us-core#county">
<valueString value="Orange County" />
</extension>
<use value="home"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<state value="Vic"/>
<zip value="3999"/>
</address>
<active value="true"/>
</Patient>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Henry Levin the 7th</p>
</div>
</text>
<identifier>
<use value="usual"/>
<label value="MRN"/>
<system value="urn:oid:2.16.840.1.113883.19.5"/>
<value value="12345"/>
</identifier>
<name>
<family value="Levin"/>
<given value="Henry"/>
</name>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
</coding>
</gender>
<birthDate value="1932-09-24"/>
<managingOrganization>
<reference value="Organization/2.16.840.1.113883.19.5"/>
<display value="Good Health Clinic"/>
</managingOrganization>
<active value="true"/>
</Patient>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Patient John Doe, M, 27-May 1956. ID: 89765a87b</p>
</div>
</text>
<identifier>
<use value="usual"/>
<label value="MRN"/>
<system value="urn:oid:1.2.3.4.5"/>
<value value="89765a87b"/>
</identifier>
<name>
<family value="Doe"/>
<given value="John"/>
</name>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
</coding>
</gender>
<birthDate value="1956-05-27"/>
<address>
<line value="100 Main St"/>
<city value="Metropolis"/>
<state value="Il"/>
<zip value="44130"/>
<country value="USA"/>
</address>
<managingOrganization>
<reference value="Organization/2"/>
</managingOrganization>
<active value="true"/>
</Patient>

View File

@ -1,116 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/patient.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table>
<tbody>
<tr>
<td>Name</td>
<td>Peter James <b>Chalmers</b> ("Jim")</td>
</tr>
<tr>
<td>Address</td>
<td>534 Erewhon, Pleasantville, Vic, 3999</td>
</tr>
<tr>
<td>Contacts</td>
<td>Home: unknown. Work: (03) 5555 6473</td>
</tr>
<tr>
<td>Id</td>
<td>MRN: 12345 (Acme Healthcare)</td>
</tr>
</tbody>
</table>
</div>
</text>
<!-- MRN assigned by ACME healthcare on 6-May 2001 -->
<identifier>
<use value="usual"/>
<label value="MRN"/>
<system value="urn:oid:1.2.36.146.595.217.0.1"/>
<value value="12345"/>
<period>
<start value="2001-05-06"/>
</period>
<assigner>
<display value="Acme Healthcare"/>
</assigner>
</identifier>
<!-- Peter James Chalmers, but called "Jim" -->
<name>
<use value="official"/>
<family value="Chalmers"/>
<given value="Peter"/>
<given value="James"/>
</name>
<name>
<use value="usual"/>
<given value="Jim"/>
</name>
<telecom>
<use value="home"/>
<!-- home communication details aren't known -->
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 5555 6473"/>
<use value="work"/>
</telecom>
<!-- use FHIR code system for male / female -->
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
<display value="Male"/>
</coding>
</gender>
<birthDate value="1974-12-25"/>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<state value="Vic"/>
<zip value="3999"/>
</address>
<contact>
<relationship>
<coding>
<system value="http://hl7.org/fhir/patient-contact-relationship"/>
<code value="partner"/>
</coding>
</relationship>
<name>
<family value="du">
<!-- the "du" part is a family name prefix (VV in iso 21090) -->
<extension url="http://hl7.org/fhir/Profile/iso-21090#qualifier">
<valueCode value="VV"/>
</extension>
</family>
<family value="Marché"/>
<given value="Bénédicte"/>
</name>
<telecom>
<system value="phone"/>
<value value="+33 (237) 998327"/>
</telecom>
</contact>
<managingOrganization>
<reference value="Organization/1"/>
</managingOrganization>
<active value="true"/>
</Patient>

View File

@ -1,95 +0,0 @@
<Questionnaire xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/questionnaire.xsd">
<!-- Please not that in this questionnaire, the questions are mostly unnamed, that is, the questions are not identified using the <name> element. It will therefore
be hard to extract useful information in an automated way from this questionnaire. This is, however, quite often the case when modelling existing questionnaires -->
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Cathy Jones, female. Birth weight 3.25 kg at 44.3 cm.
Injection of Vitamin K given on 1972-11-30 (first dose) and 1972-12-11 (second dose)
Note: Was able to speak Chinese at birth.
</pre>
</div>
</text>
<status value="completed"/>
<authored value="2013-02-19T14:15:00"/>
<subject>
<reference value="http://www.hl7.org/fhir/Patient/1"/>
</subject>
<author>
<reference value="http://www.hl7.org/fhir/Practitioner/1"/>
</author>
<group>
<name>
<text value="NSW Government My Personal Health Record, january 2013"/>
</name>
<!-- Many groups left out of this example -->
<group>
<name>
<coding>
<code value="6.1"/>
</coding>
<text value="Birth details"/>
</name>
<header value="Birth details - To be completed by health professional"/>
<group>
<question>
<text value="Name of child" />
<answerString value="Cathy Jones" />
</question>
<question>
<text value="Sex" />
<choice>
<code value="f" />
</choice>
</question>
</group>
<group>
<header value="Neonatal Information"/>
<question>
<text value="Birth weight (kg)"/>
<answerDecimal value="3.25"/>
</question>
<question>
<text value="Birth length (cm)"/>
<answerDecimal value="44.3"/>
</question>
<question>
<text value="Vitamin K given"/>
<choice>
<code value="INJECTION"/>
</choice>
<group>
<extension url="http://example.org/Profile/questionnaire#visibilityCondition">
<!-- note: this syntax is for demonstration purposes only, will need to be finalized during DSTU -->
<valueString value="HAS_VALUE(../choice/code) AND NEQ(../choice/code,'NO')"/>
</extension>
<question>
<text value="1st dose"/>
<answerDate value="1972-11-30"/>
</question>
<question>
<text value="2nd dose"/>
<answerDate value="1972-12-11"/>
</question>
</group>
</question>
<question>
<text value="Hep B given y / n"/>
<answerBoolean value="true"/>
<group>
<question>
<text value="Date given"/>
<answerDate value="1972-12-04"/>
</question>
</group>
</question>
<question>
<text value="Abnormalities noted at birth"/>
<answerString value="Already able to speak Chinese"/>
</question>
</group>
</group>
</group>
</Questionnaire>

View File

@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Questionnaire xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/questionnaire.xsd">
<status value="completed"/>
<authored value="2013-06-18T00:00:00+01:00"/>
<!--Fictive, only the below answers are non-fictive-->
<subject>
<reference value="Patient/f201"/>
<display value="Roel"/>
</subject>
<author>
<reference value="Practitioner/f201"/>
</author>
<source>
<reference value="Practitioner/f201"/>
</source>
<name>
<coding>
<system value="https://lifelines.nl"/>
<code value="VL 1-1, 18-65_1.2.2"/>
<display value="Lifelines Questionnaire 1 part 1"/>
</coding>
</name>
<identifier>
<use value="temp"/>
<label value="Roel's VL 1-1, 18-65_1.2.2"/>
</identifier>
<group>
<group>
<question>
<!--Seperate answer-->
<text value="Do you have allergies?"/>
<answerString value="I am allergic to house dust"/>
</question>
</group>
<group>
<!--Answers to general questions-->
<header value="General questions"/>
<question>
<text value="What is your gender?"/>
<answerString value="Male"/>
</question>
<question>
<name>
<text value="What is your date of birth?"/>
</name>
<answerDate value="1960-03-13"/>
</question>
<question>
<name>
<text value="What is your country of birth?"/>
</name>
<answerString value="The Netherlands"/>
</question>
<question>
<name>
<text value="What is your marital status?"/>
</name>
<answerString value="married"/>
</question>
</group>
<group>
<!--Answers to intoxications-->
<header value="Intoxications"/>
<question>
<text value="Do you smoke?"/>
<answerString value="No"/>
</question>
<question>
<text value="Do you drink alchohol?"/>
<answerString value="No, but I used to drink"/>
</question>
</group>
</group>
</Questionnaire>

View File

@ -1,200 +0,0 @@
<Questionnaire xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir ../../schema/questionnaire.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Comorbidity? YES
Cardial Comorbidity? YES
Angina? YES
MI? NO
Vascular Comorbidity?
(no answers)
...
Histopathology
Abdominal
pT category: 1a
...
</pre>
</div>
</text>
<contained>
<Patient id="patsub">
<identifier>
<system value="http://cancer.questionnaire.org/systems/id/patientnr"/>
<value value="A34442332"/>
</identifier>
<identifier>
<label value="Dutch BSN"/>
<system value="urn:oid:2.16.840.1.113883.2.4.6.3"/>
<value value="188912345"/>
</identifier>
<gender>
<coding>
<system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="M"/>
</coding>
</gender>
<birthDate value="1972-11-30"/>
</Patient>
</contained>
<contained>
<Practitioner id="questauth">
<identifier>
<label value="AUMC, Den Helder"/>
<system value="http://cancer.questionnaire.org/systems/id/org"/>
<value value="AUMC"/>
</identifier>
</Practitioner>
</contained>
<contained>
<Observation id="obs.pt-category">
<name>
<coding>
<system value="http://snomed.info/sct"/>
<code value="53786006"/>
<display value="pT1 category"/>
</coding>
</name>
<valueCodeableConcept>
<coding>
<system value="http://snomed.info/sct"/>
<code value="443357004" />
<display value="pT1a category" />
</coding>
</valueCodeableConcept>
<status value="final"/>
<reliability value="unknown"/>
</Observation>
</contained>
<status value="completed"/>
<authored value="2013-02-19T14:15:00"/>
<subject>
<reference value="#patsub"/>
</subject>
<author>
<reference value="#questauth"/>
</author>
<name>
<text value="Cancer Quality Forum Questionnaire 2012"/>
</name>
<group>
<group>
<!-- COMORBIDITY -->
<!-- First main section of the form, questions about comorbidity -->
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/sections"/>
<code value="COMORBIDITY"/>
</coding>
</name>
<!-- section contains one question: whether there is comorbidity -->
<question>
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/questions"/>
<code value="COMORB"/>
</coding>
</name>
<choice>
<system value="http://cancer.questionnaire.org/system/code/yesno"/>
<code value="1"/>
<display value="Yes"/>
</choice>
<group>
<!-- COMORBIDITY/CARDIAL -->
<!-- Subsection about specific comorbidity: cardial -->
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/sections"/>
<code value="CARDIAL"/>
</coding>
</name>
<question>
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/questions"/>
<code value="COMORBCAR"/>
</coding>
</name>
<choice>
<system value="http://cancer.questionnaire.org/system/code/yesno"/>
<code value="1"/>
</choice>
</question>
<question>
<!-- This answer carries both the questionnaire-specific name and an equivalent SNOMED CT code -->
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/questions"/>
<code value="COMCAR00"/>
<display value="Angina Pectoris"/>
</coding>
<coding>
<system value="http://snomed.info/sct"/>
<code value="194828000"/>
<display value="Angina (disorder)"/>
</coding>
</name>
<choice>
<system value="http://cancer.questionnaire.org/system/code/yesno"/>
<code value="1"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="http://snomed.info/sct"/>
<code value="22298006"/>
<display value="Myocardial infarction (disorder)"/>
</coding>
</name>
<choice>
<system value="http://cancer.questionnaire.org/system/code/yesno"/>
<code value="0"/>
</choice>
</question>
</group>
<group>
<!-- COMORBIDITY/VASCULAR -->
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/sections"/>
<code value="VASCULAR"/>
</coding>
</name>
</group>
</question>
</group>
<group>
<!-- HISTOPATHOLOGY -->
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/sections"/>
<code value="HISTOPATHOLOGY"/>
</coding>
</name>
<group>
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/sections"/>
<code value="ABDOMINAL"/>
</coding>
</name>
<question>
<name>
<coding>
<system value="http://cancer.questionnaire.org/system/code/questions"/>
<code value="STADPT"/>
<display value="pT category"/>
</coding>
</name>
<dataResource>
<reference value="#obs.pt-category"/>
</dataResource>
</question>
</group>
</group>
</group>
</Questionnaire>

View File

@ -1,133 +0,0 @@
package ca.uhn.fhir.jpa.test;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.client.IGenericClient;
public class Upload {
public static void main(String[] args) {
String msg = "{\n" +
" \"resourceType\": \"Patient\",\n" +
" \"text\": {\n" +
" \"status\": \"generated\",\n" +
" \"div\": \"<div>\\n <table>\\n <tbody>\\n <tr>\\n <td>Name</td>\\n <td>Peter James <b>Chalmers</b> (&quot;Jim&quot;)</td>\\n </tr>\\n <tr>\\n <td>Address</td>\\n <td>534 Erewhon, Pleasantville, Vic, 3999</td>\\n </tr>\\n <tr>\\n <td>Contacts</td>\\n <td>Home: unknown. Work: (03) 5555 6473</td>\\n </tr>\\n <tr>\\n <td>Id</td>\\n <td>MRN: 12345 (Acme Healthcare)</td>\\n </tr>\\n </tbody>\\n </table>\\n </div>\"\n" +
" },\n" +
" \"identifier\": [\n" +
" {\n" +
" \"use\": \"usual\",\n" +
" \"label\": \"MRN\",\n" +
" \"system\": \"urn:oid:1.2.36.146.595.217.0.1\",\n" +
" \"value\": \"12345\",\n" +
" \"period\": {\n" +
" \"start\": \"2001-05-06\"\n" +
" },\n" +
" \"assigner\": {\n" +
" \"display\": \"Acme Healthcare\"\n" +
" }\n" +
" }\n" +
" ],\n" +
" \"name\": [\n" +
" {\n" +
" \"use\": \"official\",\n" +
" \"family\": [\n" +
" \"Chalmers\"\n" +
" ],\n" +
" \"given\": [\n" +
" \"Peter\",\n" +
" \"James\"\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"use\": \"usual\",\n" +
" \"given\": [\n" +
" \"Jim\"\n" +
" ]\n" +
" }\n" +
" ],\n" +
" \"telecom\": [\n" +
" {\n" +
" \"use\": \"home\"\n" +
" },\n" +
" {\n" +
" \"system\": \"phone\",\n" +
" \"value\": \"(03) 5555 6473\",\n" +
" \"use\": \"work\"\n" +
" }\n" +
" ],\n" +
" \"gender\": {\n" +
" \"coding\": [\n" +
" {\n" +
" \"system\": \"http://hl7.org/fhir/v3/AdministrativeGender\",\n" +
" \"code\": \"M\",\n" +
" \"display\": \"Male\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" \"birthDate\": \"1974-12-25\",\n" +
" \"deceasedBoolean\": false,\n" +
" \"address\": [\n" +
" {\n" +
" \"use\": \"home\",\n" +
" \"line\": [\n" +
" \"534 Erewhon St\"\n" +
" ],\n" +
" \"city\": \"PleasantVille\",\n" +
" \"state\": \"Vic\",\n" +
" \"zip\": \"3999\"\n" +
" }\n" +
" ],\n" +
" \"contact\": [\n" +
" {\n" +
" \"relationship\": [\n" +
" {\n" +
" \"coding\": [\n" +
" {\n" +
" \"system\": \"http://hl7.org/fhir/patient-contact-relationship\",\n" +
" \"code\": \"partner\"\n" +
" }\n" +
" ]\n" +
" }\n" +
" ],\n" +
" \"name\": {\n" +
" \"family\": [\n" +
" \"du\",\n" +
" \"Marché\"\n" +
" ],\n" +
" \"_family\": [\n" +
" {\n" +
" \"extension\": [\n" +
" {\n" +
" \"url\": \"http://hl7.org/fhir/Profile/iso-21090#qualifier\",\n" +
" \"valueCode\": \"VV\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" null\n" +
" ],\n" +
" \"given\": [\n" +
" \"Bénédicte\"\n" +
" ]\n" +
" },\n" +
" \"telecom\": [\n" +
" {\n" +
" \"system\": \"phone\",\n" +
" \"value\": \"+33 (237) 998327\"\n" +
" }\n" +
" ]\n" +
" }\n" +
" ],\n" +
" \"active\": true\n" +
"}";
FhirContext ctx = new FhirContext();
IGenericClient client = ctx.newRestfulGenericClient("http://localhost:8888/fhir/context");
MethodOutcome outcome = client.create(ctx.newJsonParser().parseResource(msg));
System.out.println(outcome.getId());
}
}

View File

@ -1,39 +0,0 @@
package ca.uhn.fhir.jpa.test;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FilenameFilter;
import com.google.common.io.PatternFilenameFilter;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.dstu.resource.Questionnaire;
import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.rest.client.IGenericClient;
public class UploadTestResources {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UploadTestResources.class);
public static void main(String[] args) throws DataFormatException, FileNotFoundException {
FhirContext ctx = new FhirContext();
IGenericClient client = ctx.newRestfulGenericClient("http://localhost:8888/fhir/context");
File[] files = new File("src/test/resources/resources").listFiles(new PatternFilenameFilter(".*patient.*"));
for (File file : files) {
ourLog.info("Uploading: {}", file);
Patient patient = ctx.newXmlParser().parseResource(Patient.class, new FileReader(file));
client.create(patient);
}
files = new File("src/test/resources/resources").listFiles(new PatternFilenameFilter(".*questionnaire.*"));
for (File file : files) {
ourLog.info("Uploading: {}", file);
Questionnaire patient = ctx.newXmlParser().parseResource(Questionnaire.class, new FileReader(file));
client.create(patient);
}
}
}

View File

@ -14,7 +14,7 @@
<dependent-module archiveName="hapi-fhir-structures-dstu-0.9-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-structures-dstu/hapi-fhir-structures-dstu">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="hapi-fhir-structures-dev-0.9-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-structures-dev/hapi-fhir-structures-dev">
<dependent-module archiveName="hapi-fhir-structures-dstu2-0.9-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/hapi-fhir-structures-dstu2/hapi-fhir-structures-dstu2">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/" handle="module:/overlay/prj/hapi-fhir-testpage-overlay?includes=**/**&amp;excludes=META-INF/MANIFEST.MF">

View File

@ -27,7 +27,7 @@
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dev</artifactId>
<artifactId>hapi-fhir-structures-dstu2</artifactId>
<version>0.9-SNAPSHOT</version>
</dependency>
<dependency>

View File

@ -1,98 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>0.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-test</artifactId>
<packaging>jar</packaging>
<name>HAPI FHIR JPA Server - Tester</name>
<dependencies>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-base</artifactId>
<version>0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>17.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty_version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<junit_version>4.11</junit_version>
<jetty_version>9.1.1.v20140108</jetty_version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -12,7 +12,7 @@ import org.springframework.web.context.ContextLoaderListener;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.dao.IFhirSystemDao;
import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDev;
import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDstu2;
import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDstu1;
import ca.uhn.fhir.jpa.provider.JpaSystemProvider;
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
@ -80,12 +80,12 @@ public class TestRestfulServer extends RestfulServer {
break;
}
case "DSTU2": {
setFhirContext(FhirContext.forDev());
beans = myAppCtx.getBean("myResourceProvidersDev", List.class);
systemProvider = myAppCtx.getBean("mySystemProviderDev", JpaSystemProvider.class);
systemDao = myAppCtx.getBean("mySystemDaoDev", IFhirSystemDao.class);
setFhirContext(FhirContext.forDstu2());
beans = myAppCtx.getBean("myResourceProvidersDstu2", List.class);
systemProvider = myAppCtx.getBean("mySystemProviderDstu2", JpaSystemProvider.class);
systemDao = myAppCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class);
etagSupport = ETagSupportEnum.ENABLED;
JpaConformanceProviderDev confProvider = new JpaConformanceProviderDev(this, systemDao);
JpaConformanceProviderDstu2 confProvider = new JpaConformanceProviderDstu2(this, systemDao);
confProvider.setImplementationDescription(implDesc);
setServerConformanceProvider(confProvider);
baseUrlProperty = "fhir.baseurl.dstu2";

View File

@ -1,6 +1,4 @@
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/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -12,7 +12,7 @@
<artifactId>hapi-fhir-structures-dstu</artifactId>
<packaging>jar</packaging>
<name>HAPI FHIR Structures - DSTU (FHIR 0.80)</name>
<name>HAPI FHIR Structures - DSTU1 (FHIR v0.80)</name>
<dependencies>
<dependency>

View File

@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu;
/*
* #%L
* HAPI FHIR Structures - DSTU (FHIR 0.80)
* HAPI FHIR Structures - DSTU1 (FHIR v0.80)
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%

View File

@ -2,7 +2,7 @@ package ca.uhn.fhir.model.dstu.api;
/*
* #%L
* HAPI FHIR Structures - DSTU (FHIR 0.80)
* HAPI FHIR Structures - DSTU1 (FHIR v0.80)
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%

View File

@ -4,7 +4,7 @@ import ca.uhn.fhir.model.api.annotation.DatatypeDef;
/*
* #%L
* HAPI FHIR Structures - DSTU (FHIR 0.80)
* HAPI FHIR Structures - DSTU1 (FHIR v0.80)
* %%
* Copyright (C) 2014 - 2015 University Health Network
* %%

Some files were not shown because too many files have changed in this diff Show More