diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/AdverseReactionAuditor.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/AdverseReactionAuditor.java index 9c935f3cb46..357729487ae 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/AdverseReactionAuditor.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/AdverseReactionAuditor.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.server.audit; +/* + * #%L + * HAPI FHIR Structures - DSTU (FHIR 0.80) + * %% + * Copyright (C) 2014 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.HashMap; import java.util.Map; diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ObservationAuditor.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ObservationAuditor.java index fa4a0467b8a..ebf48fb9a75 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ObservationAuditor.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ObservationAuditor.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.server.audit; +/* + * #%L + * HAPI FHIR Structures - DSTU (FHIR 0.80) + * %% + * Copyright (C) 2014 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.HashMap; import java.util.Map; diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ProcedureAuditor.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ProcedureAuditor.java index 6ec9aa739f6..700254c6243 100644 --- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ProcedureAuditor.java +++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/audit/ProcedureAuditor.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.rest.server.audit; +/* + * #%L + * HAPI FHIR Structures - DSTU (FHIR 0.80) + * %% + * Copyright (C) 2014 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.HashMap; import java.util.Map; diff --git a/hapi-fhir-tutorial/simple-server/.classpath b/hapi-fhir-tutorial/simple-server/.classpath new file mode 100644 index 00000000000..fcfac2c5f1e --- /dev/null +++ b/hapi-fhir-tutorial/simple-server/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hapi-fhir-tutorial/simple-server/.project b/hapi-fhir-tutorial/simple-server/.project new file mode 100644 index 00000000000..11fad4f7bc8 --- /dev/null +++ b/hapi-fhir-tutorial/simple-server/.project @@ -0,0 +1,42 @@ + + + hapi-fhir-example-simple-server + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/hapi-fhir-tutorial/simple-server/pom.xml b/hapi-fhir-tutorial/simple-server/pom.xml new file mode 100644 index 00000000000..f449283803c --- /dev/null +++ b/hapi-fhir-tutorial/simple-server/pom.xml @@ -0,0 +1,122 @@ + + 4.0.0 + + + + org.sonatype.oss + oss-parent + 7 + + + + ca.uhn.hapi.example + hapi-fhir-example-simple-server + 0.8-SNAPSHOT + war + + HAPI FHIR Example - Simple Server + + + + oss-snapshots + + true + + https://oss.sonatype.org/content/repositories/snapshots/ + + + + + + + + ca.uhn.hapi.fhir + hapi-fhir-base + 0.8-SNAPSHOT + + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu + 0.8-SNAPSHOT + + + + + ch.qos.logback + logback-classic + 1.1.2 + + + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + + + + + + restful-server-example + + + + + + org.eclipse.jetty + jetty-maven-plugin + 9.1.1.v20140108 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.6 + 1.6 + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + false + + + + + + + diff --git a/hapi-fhir-tutorial/simple-server/src/main/webapp/WEB-INF/web.xml b/hapi-fhir-tutorial/simple-server/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..88020ad1d40 --- /dev/null +++ b/hapi-fhir-tutorial/simple-server/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,89 @@ + + + + + + org.springframework.web.context.ContextLoaderListener + + + contextConfigLocation + + /WEB-INF/hapi-fhir-tester-application-context.xml + /WEB-INF/hapi-fhir-tester-config.xml + + + + spring + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + + /WEB-INF/hapi-fhir-tester-application-context.xml + /WEB-INF/hapi-fhir-tester-config.xml + + + 2 + + + spring + /tester/* + + + + + CORS Filter + org.ebaysf.web.cors.CORSFilter + + A comma separated list of allowed origins. Note: An '*' cannot be used for an allowed origin when using credentials. + cors.allowed.origins + * + + + A comma separated list of HTTP verbs, using which a CORS request can be made. + cors.allowed.methods + GET,POST,PUT,DELETE,OPTIONS + + + A comma separated list of allowed headers when making a non simple CORS request. + cors.allowed.headers + X-FHIR-Starter,Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers + + + A comma separated list non-standard response headers that will be exposed to XHR2 object. + cors.exposed.headers + Location,Content-Location + + + A flag that suggests if CORS is supported with cookies + cors.support.credentials + true + + + A flag to control logging + cors.logging.enabled + true + + + Indicates how long (in seconds) the results of a preflight request can be cached in a preflight result cache. + cors.preflight.maxage + 300 + + + + CORS Filter + /* + + + + + + fhir + ca.uhn.example.servlet.ExampleRestfulServlet + + + fhir + /fhir/* + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index d4af89d4a8b..1630bde883f 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ Arizona State University - jathman + jjathman Joe Athman diff --git a/src/changes/changes.xml b/src/changes/changes.xml index c88133d0237..4cdb9cd5690 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -92,7 +92,7 @@ but the version bundled with IBM's JDK is flaky and resulted in a number of problems when deploying to Websphere. - + Primitive datatypes now preserve their original string value when parsing resources, as well as containing the "parsed value". For instance, a DecimalDt field value of 1.0000]]> will be parsed into the corresponding @@ -146,6 +146,11 @@ Do not strip version from resource references in resources returned from server search methods. Thanks to Bill de Beaubien for reporting! + + Correct an issue with the validator where changes to the underlying + OperationOutcome produced by a validation cycle cause the validation + results to be incorrect. + @@ -260,7 +265,7 @@ trying out the HAPI server modules. Thanks to Preston Lee for the pull request, and for offering to maintain this! - + Change validation API so that it uses a return type instead of exceptions to communicate validation failures. Thanks to Joe Athman for the pull request!