3719 enable map response terminology for bulk export (#3735)

* added failing test for Map Response Terminology for bulk export

* moved logic for terminology translation out of the interceptor to svc, added translation logic to bulk export file writer, added more tests

* added changelog

* Wip refactor dependency fix

* wip terminology translation code refactor

* terminology translation code refactor

* refactor clean up

* Remove circular dependency

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3719-enable-map-response-terminology-for-bulk-export.yaml

* bump version of hapi to 6.1.0-PRE7-SNAPSHOT

* doc update

* fix issue when search param registry doesn't contain search param for the resource type

* fix beans

* hapi version bump from PRE7 to PRE10

* doc update

* add ResponseTerminologyTranslationSvc as a constructor variable to the interceptor

* fixed ResponseTerminologyInterceptorLoaderTest, added IT for cdr side

* version bump to PRE13

* removed unused import

Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
This commit is contained in:
StevenXLi 2022-07-12 12:24:15 -04:00 committed by GitHub
parent 3d4556b70b
commit 2bc6c91153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 410 additions and 201 deletions

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -3,14 +3,14 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-bom</artifactId> <artifactId>hapi-fhir-bom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>HAPI FHIR BOM</name> <name>HAPI FHIR BOM</name>
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-cli</artifactId> <artifactId>hapi-fhir-cli</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../../hapi-deployable-pom</relativePath> <relativePath>../../hapi-deployable-pom</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -249,13 +249,14 @@ public class ServletExamples {
public class RestfulServerWithResponseTerminologyTranslationInterceptor extends RestfulServer { public class RestfulServerWithResponseTerminologyTranslationInterceptor extends RestfulServer {
private IValidationSupport myValidationSupport; private IValidationSupport myValidationSupport;
private ResponseTerminologyTranslationSvc myResponseTerminologyTranslationSvc;
@Override @Override
protected void initialize() throws ServletException { protected void initialize() throws ServletException {
// START SNIPPET: ResponseTerminologyTranslationInterceptor // START SNIPPET: ResponseTerminologyTranslationInterceptor
// Create an interceptor that will map from a proprietary CodeSystem to LOINC // Create an interceptor that will map from a proprietary CodeSystem to LOINC
ResponseTerminologyTranslationInterceptor interceptor = new ResponseTerminologyTranslationInterceptor(myValidationSupport); ResponseTerminologyTranslationInterceptor interceptor = new ResponseTerminologyTranslationInterceptor(myValidationSupport, myResponseTerminologyTranslationSvc);
interceptor.addMappingSpecification("http://examplelabs.org", "http://loinc.org"); interceptor.addMappingSpecification("http://examplelabs.org", "http://loinc.org");
// Register the interceptor // Register the interceptor

View File

@ -0,0 +1,4 @@
---
type: add
issue: 3719
title: "Added support to Bulk Export for FHIR Response Terminology Translation. It will use the same mappings as the Translation Interceptor."

View File

@ -11,7 +11,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -140,6 +140,7 @@ import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter; import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter;
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationInterceptor; import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationInterceptor;
import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationSvc;
import ca.uhn.fhir.rest.server.interceptor.consent.IConsentContextServices; import ca.uhn.fhir.rest.server.interceptor.consent.IConsentContextServices;
import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor; import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor;
import ca.uhn.fhir.util.ThreadPoolUtil; import ca.uhn.fhir.util.ThreadPoolUtil;
@ -223,8 +224,14 @@ public class JpaConfig {
@Lazy @Lazy
@Bean @Bean
public ResponseTerminologyTranslationInterceptor responseTerminologyTranslationInterceptor(IValidationSupport theValidationSupport) { public ResponseTerminologyTranslationInterceptor responseTerminologyTranslationInterceptor(IValidationSupport theValidationSupport, ResponseTerminologyTranslationSvc theResponseTerminologyTranslationSvc) {
return new ResponseTerminologyTranslationInterceptor(theValidationSupport); return new ResponseTerminologyTranslationInterceptor(theValidationSupport, theResponseTerminologyTranslationSvc);
}
@Lazy
@Bean
public ResponseTerminologyTranslationSvc responseTerminologyTranslationSvc(IValidationSupport theValidationSupport) {
return new ResponseTerminologyTranslationSvc(theValidationSupport);
} }
@Bean @Bean

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -1,11 +1,21 @@
package ca.uhn.fhir.jpa.interceptor; package ca.uhn.fhir.jpa.interceptor;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.interceptor.api.IInterceptorService; import ca.uhn.fhir.interceptor.api.IInterceptorService;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.batch.config.BatchConstants;
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportSvc;
import ca.uhn.fhir.jpa.bulk.export.model.BulkExportJobStatusEnum;
import ca.uhn.fhir.jpa.provider.r4.BaseResourceProviderR4Test; import ca.uhn.fhir.jpa.provider.r4.BaseResourceProviderR4Test;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.server.bulk.BulkDataExportOptions;
import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationInterceptor; import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationInterceptor;
import ca.uhn.fhir.util.UrlUtil;
import com.google.common.collect.Sets;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.r4.model.Binary;
import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Coding;
import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Observation;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
@ -14,16 +24,21 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.fail;
public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceProviderR4Test { public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceProviderR4Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResponseTerminologyTranslationInterceptorTest.class); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResponseTerminologyTranslationInterceptorTest.class);
public static final String TEST_OBV_FILTER = "Observation?status=amended";
@Autowired @Autowired
private DaoRegistry myDaoRegistry; private DaoRegistry myDaoRegistry;
@ -31,6 +46,13 @@ public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceP
private IInterceptorService myInterceptorBroadcaster; private IInterceptorService myInterceptorBroadcaster;
@Autowired @Autowired
private ResponseTerminologyTranslationInterceptor myResponseTerminologyTranslationInterceptor; private ResponseTerminologyTranslationInterceptor myResponseTerminologyTranslationInterceptor;
@Autowired
private IBulkDataExportSvc myBulkDataExportSvc;
@Autowired
private IBulkDataExportJobSchedulingHelper myBulkDataExportJobSchedulingHelper;
@Autowired
private FhirContext myFhirContext;
@BeforeEach @BeforeEach
public void beforeEach() { public void beforeEach() {
@ -50,7 +72,7 @@ public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceP
Observation observation = new Observation(); Observation observation = new Observation();
observation.setStatus(Observation.ObservationStatus.AMENDED); observation.setStatus(Observation.ObservationStatus.AMENDED);
observation .getCode() observation.getCode()
.addCoding(new Coding(CS_URL, "12345", null)); .addCoding(new Coding(CS_URL, "12345", null));
IIdType id = myObservationDao.create(observation).getId(); IIdType id = myObservationDao.create(observation).getId();
@ -69,7 +91,7 @@ public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceP
Observation observation = new Observation(); Observation observation = new Observation();
observation.setStatus(Observation.ObservationStatus.AMENDED); observation.setStatus(Observation.ObservationStatus.AMENDED);
observation .getCode() observation.getCode()
.addCoding(new Coding(CS_URL, "12345", null)); .addCoding(new Coding(CS_URL, "12345", null));
IIdType id = myObservationDao.create(observation).getId(); IIdType id = myObservationDao.create(observation).getId();
@ -92,7 +114,7 @@ public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceP
Observation observation = new Observation(); Observation observation = new Observation();
observation.setStatus(Observation.ObservationStatus.AMENDED); observation.setStatus(Observation.ObservationStatus.AMENDED);
observation .getCode() observation.getCode()
.addCoding(new Coding(CS_URL, "12345", null)) .addCoding(new Coding(CS_URL, "12345", null))
.addCoding(new Coding(CS_URL_2, "9999", "Display 9999")); .addCoding(new Coding(CS_URL_2, "9999", "Display 9999"));
IIdType id = myObservationDao.create(observation).getId(); IIdType id = myObservationDao.create(observation).getId();
@ -112,7 +134,7 @@ public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceP
Observation observation = new Observation(); Observation observation = new Observation();
observation.setStatus(Observation.ObservationStatus.AMENDED); observation.setStatus(Observation.ObservationStatus.AMENDED);
observation .getCode() observation.getCode()
.addCoding(new Coding(CS_URL, "FOO", null)); .addCoding(new Coding(CS_URL, "FOO", null));
IIdType id = myObservationDao.create(observation).getId(); IIdType id = myObservationDao.create(observation).getId();
@ -124,10 +146,111 @@ public class ResponseTerminologyTranslationInterceptorTest extends BaseResourceP
)); ));
} }
@Test
public void testBulkExport_TerminologyTranslation_MappingFound() {
// Create some resources to load
Observation observation = new Observation();
observation.setStatus(Observation.ObservationStatus.AMENDED);
observation.getCode()
.addCoding(new Coding(CS_URL, "12345", null));
myObservationDao.create(observation);
// set mapping specs
myResponseTerminologyTranslationInterceptor.addMappingSpecification(CS_URL, CS_URL_2);
List<String> codingList = Arrays.asList(
"{\"system\":\"http://example.com/my_code_system\",\"code\":\"12345\"}",
"{\"system\":\"http://example.com/my_code_system2\",\"code\":\"34567\",\"display\":\"Target Code 34567\"}");
createBulkJobAndCheckCodingList(codingList);
}
@Test
public void testBulkExport_TerminologyTranslation_MappingNotNeeded() {
// Create some resources to load
Observation observation = new Observation();
observation.setStatus(Observation.ObservationStatus.AMENDED);
observation.getCode()
.addCoding(new Coding(CS_URL, "12345", null))
.addCoding(new Coding(CS_URL_2, "9999", "Display 9999"));
myObservationDao.create(observation);
// set mapping specs
myResponseTerminologyTranslationInterceptor.addMappingSpecification(CS_URL, CS_URL_2);
List<String> codingList = Arrays.asList(
"{\"system\":\"http://example.com/my_code_system\",\"code\":\"12345\"}",
"{\"system\":\"http://example.com/my_code_system2\",\"code\":\"9999\",\"display\":\"Display 9999\"}");
createBulkJobAndCheckCodingList(codingList);
}
@Test
public void testBulkExport_TerminologyTranslation_NoMapping() {
// Create some resources to load
Observation observation = new Observation();
observation.setStatus(Observation.ObservationStatus.AMENDED);
observation.getCode()
.addCoding(new Coding(CS_URL, "12345", null));
myObservationDao.create(observation);
List<String> codingList = List.of(
"{\"system\":\"http://example.com/my_code_system\",\"code\":\"12345\"}");
createBulkJobAndCheckCodingList(codingList);
}
private void createBulkJobAndCheckCodingList(List<String> codingList) {
// Create a bulk job
BulkDataExportOptions options = new BulkDataExportOptions();
options.setResourceTypes(Sets.newHashSet("Observation"));
options.setFilters(Sets.newHashSet(TEST_OBV_FILTER));
options.setExportStyle(BulkDataExportOptions.ExportStyle.SYSTEM);
IBulkDataExportSvc.JobInfo jobDetails = myBulkDataExportSvc.submitJob(options, true, mySrd);
assertNotNull(jobDetails.getJobId());
// Check the status
IBulkDataExportSvc.JobInfo status = myBulkDataExportSvc.getJobInfoOrThrowResourceNotFound(jobDetails.getJobId());
assertEquals(BulkExportJobStatusEnum.SUBMITTED, status.getStatus());
assertEquals("/$export?_outputFormat=application%2Ffhir%2Bndjson&_type=Observation&_typeFilter=" + UrlUtil.escapeUrlParam(TEST_OBV_FILTER), status.getRequest());
// Run a scheduled pass to build the export
myBulkDataExportJobSchedulingHelper.startSubmittedJobs();
awaitAllBulkJobCompletions();
// Fetch the job again
status = myBulkDataExportSvc.getJobInfoOrThrowResourceNotFound(jobDetails.getJobId());
assertEquals(BulkExportJobStatusEnum.COMPLETE, status.getStatus());
// Iterate over the files
for (IBulkDataExportSvc.FileEntry next : status.getFiles()) {
Binary nextBinary = myBinaryDao.read(next.getResourceId());
assertEquals(Constants.CT_FHIR_NDJSON, nextBinary.getContentType());
String nextContents = new String(nextBinary.getContent(), Constants.CHARSET_UTF8);
ourLog.info("Next contents for type {}:\n{}", next.getResourceType(), nextContents);
if ("Observation".equals(next.getResourceType())) {
for (String coding : codingList) {
assertThat(nextContents, containsString(coding));
}
} else {
fail(next.getResourceType());
}
}
assertEquals(1, status.getFiles().size());
}
@Nonnull @Nonnull
private List<String> toCodeStrings(Observation observation) { private List<String> toCodeStrings(Observation observation) {
return observation.getCode().getCoding().stream().map(t -> "[system=" + t.getSystem() + ", code=" + t.getCode() + ", display=" + t.getDisplay() + "]").collect(Collectors.toList()); return observation.getCode().getCoding().stream().map(t -> "[system=" + t.getSystem() + ", code=" + t.getCode() + ", display=" + t.getDisplay() + "]").collect(Collectors.toList());
} }
private void awaitAllBulkJobCompletions() {
myBatchJobHelper.awaitAllBulkJobCompletions(
BatchConstants.BULK_EXPORT_JOB_NAME,
BatchConstants.PATIENT_BULK_EXPORT_JOB_NAME,
BatchConstants.GROUP_BULK_EXPORT_JOB_NAME,
BatchConstants.DELETE_EXPUNGE_JOB_NAME,
BatchConstants.MDM_CLEAR_JOB_NAME
);
}
} }

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -49,7 +49,6 @@ public class BaseResponseTerminologyInterceptor {
Validate.notNull(myContext, "The validation support must not return a null context"); Validate.notNull(myContext, "The validation support must not return a null context");
} }
@Nonnull @Nonnull
protected List<IBaseResource> toListForProcessing(RequestDetails theRequestDetails, IBaseResource theResource) { protected List<IBaseResource> toListForProcessing(RequestDetails theRequestDetails, IBaseResource theResource) {

View File

@ -20,34 +20,19 @@ package ca.uhn.fhir.rest.server.interceptor;
* #L% * #L%
*/ */
import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition;
import ca.uhn.fhir.context.support.IValidationSupport; import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.TranslateConceptResult;
import ca.uhn.fhir.context.support.TranslateConceptResults;
import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.Hook;
import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.interceptor.api.Pointcut;
import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.util.FhirTerser;
import ca.uhn.fhir.util.IModelVisitor;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseCoding;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import static ca.uhn.fhir.rest.server.interceptor.InterceptorOrders.RESPONSE_TERMINOLOGY_TRANSLATION_INTERCEPTOR; import static ca.uhn.fhir.rest.server.interceptor.InterceptorOrders.RESPONSE_TERMINOLOGY_TRANSLATION_INTERCEPTOR;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
/** /**
* This interceptor leverages ConceptMap resources stored in the repository to automatically map * This interceptor leverages ConceptMap resources stored in the repository to automatically map
@ -62,39 +47,16 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
*/ */
public class ResponseTerminologyTranslationInterceptor extends BaseResponseTerminologyInterceptor { public class ResponseTerminologyTranslationInterceptor extends BaseResponseTerminologyInterceptor {
private final BaseRuntimeChildDefinition myCodingSystemChild; private final ResponseTerminologyTranslationSvc myResponseTerminologyTranslationSvc;
private final BaseRuntimeChildDefinition myCodingCodeChild;
private final BaseRuntimeElementDefinition<IPrimitiveType<?>> myUriDefinition;
private final BaseRuntimeElementDefinition<IPrimitiveType<?>> myCodeDefinition;
private final Class<? extends IBase> myCodeableConceptType;
private final Class<? extends IBase> myCodingType;
private final BaseRuntimeChildDefinition myCodeableConceptCodingChild;
private final BaseRuntimeElementCompositeDefinition<?> myCodingDefinitition;
private final RuntimePrimitiveDatatypeDefinition myStringDefinition;
private final BaseRuntimeChildDefinition myCodingDisplayChild;
private Map<String, String> myMappingSpecifications = new HashMap<>();
/** /**
* Constructor * Constructor
* *
* @param theValidationSupport The validation support module * @param theValidationSupport The validation support module
*/ */
public ResponseTerminologyTranslationInterceptor(IValidationSupport theValidationSupport) { public ResponseTerminologyTranslationInterceptor(IValidationSupport theValidationSupport, ResponseTerminologyTranslationSvc theResponseTerminologyTranslationSvc) {
super(theValidationSupport); super(theValidationSupport);
myResponseTerminologyTranslationSvc = theResponseTerminologyTranslationSvc;
BaseRuntimeElementCompositeDefinition<?> codeableConceptDef = (BaseRuntimeElementCompositeDefinition<?>) Objects.requireNonNull(myContext.getElementDefinition("CodeableConcept"));
myCodeableConceptType = codeableConceptDef.getImplementingClass();
myCodeableConceptCodingChild = codeableConceptDef.getChildByName("coding");
myCodingDefinitition = (BaseRuntimeElementCompositeDefinition<?>) Objects.requireNonNull(myContext.getElementDefinition("Coding"));
myCodingType = myCodingDefinitition.getImplementingClass();
myCodingSystemChild = myCodingDefinitition.getChildByName("system");
myCodingCodeChild = myCodingDefinitition.getChildByName("code");
myCodingDisplayChild = myCodingDefinitition.getChildByName("display");
myUriDefinition = (RuntimePrimitiveDatatypeDefinition) myContext.getElementDefinition("uri");
myCodeDefinition = (RuntimePrimitiveDatatypeDefinition) myContext.getElementDefinition("code");
myStringDefinition = (RuntimePrimitiveDatatypeDefinition) myContext.getElementDefinition("string");
} }
/** /**
@ -105,94 +67,23 @@ public class ResponseTerminologyTranslationInterceptor extends BaseResponseTermi
* @param theTargetCodeSystemUrl The target CodeSystem URL * @param theTargetCodeSystemUrl The target CodeSystem URL
*/ */
public void addMappingSpecification(String theSourceCodeSystemUrl, String theTargetCodeSystemUrl) { public void addMappingSpecification(String theSourceCodeSystemUrl, String theTargetCodeSystemUrl) {
Validate.notBlank(theSourceCodeSystemUrl, "theSourceCodeSystemUrl must not be null or blank"); myResponseTerminologyTranslationSvc.addMappingSpecification(theSourceCodeSystemUrl, theTargetCodeSystemUrl);
Validate.notBlank(theTargetCodeSystemUrl, "theTargetCodeSystemUrl must not be null or blank");
myMappingSpecifications.put(theSourceCodeSystemUrl, theTargetCodeSystemUrl);
} }
/** /**
* Clear all mapping specifications * Clear all mapping specifications
*/ */
public void clearMappingSpecifications() { public void clearMappingSpecifications() {
myMappingSpecifications.clear(); myResponseTerminologyTranslationSvc.clearMappingSpecifications();
} }
public Map<String, String> getMappingSpecifications() {
return myResponseTerminologyTranslationSvc.getMappingSpecifications();
}
@Hook(value = Pointcut.SERVER_OUTGOING_RESPONSE, order = RESPONSE_TERMINOLOGY_TRANSLATION_INTERCEPTOR) @Hook(value = Pointcut.SERVER_OUTGOING_RESPONSE, order = RESPONSE_TERMINOLOGY_TRANSLATION_INTERCEPTOR)
public void handleResource(RequestDetails theRequestDetails, IBaseResource theResource) { public void handleResource(RequestDetails theRequestDetails, IBaseResource theResource) {
List<IBaseResource> resources = toListForProcessing(theRequestDetails, theResource); List<IBaseResource> resources = toListForProcessing(theRequestDetails, theResource);
myResponseTerminologyTranslationSvc.processResourcesForTerminologyTranslation(resources);
FhirTerser terser = myContext.newTerser();
for (IBaseResource nextResource : resources) {
terser.visit(nextResource, new MappingVisitor());
}
}
private class MappingVisitor implements IModelVisitor {
@Override
public void acceptElement(IBaseResource theResource, IBase theElement, List<String> thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition<?> theDefinition) {
if (myCodeableConceptType.isAssignableFrom(theElement.getClass())) {
// Find all existing Codings
Multimap<String, String> foundSystemsToCodes = ArrayListMultimap.create();
List<IBase> nextCodeableConceptCodings = myCodeableConceptCodingChild.getAccessor().getValues(theElement);
for (IBase nextCodeableConceptCoding : nextCodeableConceptCodings) {
String system = myCodingSystemChild.getAccessor().getFirstValueOrNull(nextCodeableConceptCoding).map(t -> (IPrimitiveType<?>) t).map(t -> t.getValueAsString()).orElse(null);
String code = myCodingCodeChild.getAccessor().getFirstValueOrNull(nextCodeableConceptCoding).map(t -> (IPrimitiveType<?>) t).map(t -> t.getValueAsString()).orElse(null);
if (isNotBlank(system) && isNotBlank(code) && !foundSystemsToCodes.containsKey(system)) {
foundSystemsToCodes.put(system, code);
}
}
// Look for mappings
for (String nextSourceSystem : foundSystemsToCodes.keySet()) {
String wantTargetSystem = myMappingSpecifications.get(nextSourceSystem);
if (wantTargetSystem != null) {
if (!foundSystemsToCodes.containsKey(wantTargetSystem)) {
for (String code : foundSystemsToCodes.get(nextSourceSystem)) {
List<IBaseCoding> codings = new ArrayList<IBaseCoding>();
codings.add(createCodingFromPrimitives(nextSourceSystem, code, null));
TranslateConceptResults translateConceptResults = myValidationSupport.translateConcept(new IValidationSupport.TranslateCodeRequest(codings, wantTargetSystem));
if (translateConceptResults != null) {
List<TranslateConceptResult> mappings = translateConceptResults.getResults();
for (TranslateConceptResult nextMapping : mappings) {
IBase newCoding = createCodingFromPrimitives(
nextMapping.getSystem(),
nextMapping.getCode(),
nextMapping.getDisplay());
// Add coding to existing CodeableConcept
myCodeableConceptCodingChild.getMutator().addValue(theElement, newCoding);
}
}
}
}
}
}
}
}
private IBaseCoding createCodingFromPrimitives(String system, String code, String display) {
IBaseCoding newCoding = (IBaseCoding) myCodingDefinitition.newInstance();
IPrimitiveType<?> newSystem = myUriDefinition.newInstance(system);
myCodingSystemChild.getMutator().addValue(newCoding, newSystem);
IPrimitiveType<?> newCode = myCodeDefinition.newInstance(code);
myCodingCodeChild.getMutator().addValue(newCoding, newCode);
if (isNotBlank(display)) {
IPrimitiveType<?> newDisplay = myStringDefinition.newInstance(display);
myCodingDisplayChild.getMutator().addValue(newCoding, newDisplay);
}
return newCoding;
}
} }
} }

View File

@ -0,0 +1,179 @@
package ca.uhn.fhir.rest.server.interceptor;
/*-
* #%L
* HAPI FHIR - Server Framework
* %%
* Copyright (C) 2014 - 2022 Smile CDR, Inc.
* %%
* 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.BaseRuntimeChildDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.TranslateConceptResult;
import ca.uhn.fhir.context.support.TranslateConceptResults;
import ca.uhn.fhir.util.FhirTerser;
import ca.uhn.fhir.util.IModelVisitor;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseCoding;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public class ResponseTerminologyTranslationSvc {
private BaseRuntimeChildDefinition myCodingSystemChild;
private BaseRuntimeChildDefinition myCodingCodeChild;
private BaseRuntimeElementDefinition<IPrimitiveType<?>> myUriDefinition;
private BaseRuntimeElementDefinition<IPrimitiveType<?>> myCodeDefinition;
private Class<? extends IBase> myCodeableConceptType;
private Class<? extends IBase> myCodingType;
private BaseRuntimeChildDefinition myCodeableConceptCodingChild;
private BaseRuntimeElementCompositeDefinition<?> myCodingDefinition;
private RuntimePrimitiveDatatypeDefinition myStringDefinition;
private BaseRuntimeChildDefinition myCodingDisplayChild;
private Map<String, String> myMappingSpec;
private final IValidationSupport myValidationSupport;
private final FhirContext myFhirContext;
public ResponseTerminologyTranslationSvc(@Nonnull IValidationSupport theValidationSupport) {
myValidationSupport = theValidationSupport;
Validate.notNull(theValidationSupport, "The validation support must not be null");
myFhirContext = theValidationSupport.getFhirContext();
Validate.notNull(myFhirContext, "The validation support must not return a null context");
BaseRuntimeElementCompositeDefinition<?> codeableConceptDef = (BaseRuntimeElementCompositeDefinition<?>) Objects.requireNonNull(myFhirContext.getElementDefinition("CodeableConcept"));
myCodeableConceptType = codeableConceptDef.getImplementingClass();
myCodeableConceptCodingChild = codeableConceptDef.getChildByName("coding");
myCodingDefinition = (BaseRuntimeElementCompositeDefinition<?>) Objects.requireNonNull(myFhirContext.getElementDefinition("Coding"));
myCodingType = myCodingDefinition.getImplementingClass();
myCodingSystemChild = myCodingDefinition.getChildByName("system");
myCodingCodeChild = myCodingDefinition.getChildByName("code");
myCodingDisplayChild = myCodingDefinition.getChildByName("display");
myUriDefinition = (RuntimePrimitiveDatatypeDefinition) myFhirContext.getElementDefinition("uri");
myCodeDefinition = (RuntimePrimitiveDatatypeDefinition) myFhirContext.getElementDefinition("code");
myStringDefinition = (RuntimePrimitiveDatatypeDefinition) myFhirContext.getElementDefinition("string");
}
public void processResourcesForTerminologyTranslation(List<IBaseResource> resources) {
FhirTerser terser = myFhirContext.newTerser();
for (IBaseResource nextResource : resources) {
terser.visit(nextResource, new MappingVisitor());
}
}
public void addMappingSpecification(String theSourceCodeSystemUrl, String theTargetCodeSystemUrl) {
Validate.notBlank(theSourceCodeSystemUrl, "theSourceCodeSystemUrl must not be null or blank");
Validate.notBlank(theTargetCodeSystemUrl, "theTargetCodeSystemUrl must not be null or blank");
getMappingSpecifications().put(theSourceCodeSystemUrl, theTargetCodeSystemUrl);
}
public void clearMappingSpecifications() {
myMappingSpec.clear();
}
public Map<String, String> getMappingSpecifications() {
if (myMappingSpec == null) {
myMappingSpec = new HashMap<>();
}
return myMappingSpec;
}
private class MappingVisitor implements IModelVisitor {
@Override
public void acceptElement(IBaseResource theResource, IBase theElement, List<String> thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition<?> theDefinition) {
if (myCodeableConceptType.isAssignableFrom(theElement.getClass())) {
// Find all existing Codings
Multimap<String, String> foundSystemsToCodes = ArrayListMultimap.create();
List<IBase> nextCodeableConceptCodings = myCodeableConceptCodingChild.getAccessor().getValues(theElement);
for (IBase nextCodeableConceptCoding : nextCodeableConceptCodings) {
String system = myCodingSystemChild.getAccessor().getFirstValueOrNull(nextCodeableConceptCoding).map(t -> (IPrimitiveType<?>) t).map(IPrimitiveType::getValueAsString).orElse(null);
String code = myCodingCodeChild.getAccessor().getFirstValueOrNull(nextCodeableConceptCoding).map(t -> (IPrimitiveType<?>) t).map(IPrimitiveType::getValueAsString).orElse(null);
if (StringUtils.isNotBlank(system) && StringUtils.isNotBlank(code) && !foundSystemsToCodes.containsKey(system)) {
foundSystemsToCodes.put(system, code);
}
}
// Look for mappings
for (String nextSourceSystem : foundSystemsToCodes.keySet()) {
String wantTargetSystem = getMappingSpecifications().get(nextSourceSystem);
if (wantTargetSystem != null) {
if (!foundSystemsToCodes.containsKey(wantTargetSystem)) {
for (String code : foundSystemsToCodes.get(nextSourceSystem)) {
List<IBaseCoding> codings = new ArrayList<>();
codings.add(createCodingFromPrimitives(nextSourceSystem, code, null));
TranslateConceptResults translateConceptResults = myValidationSupport.translateConcept(new IValidationSupport.TranslateCodeRequest(codings, wantTargetSystem));
if (translateConceptResults != null) {
List<TranslateConceptResult> mappings = translateConceptResults.getResults();
for (TranslateConceptResult nextMapping : mappings) {
IBase newCoding = createCodingFromPrimitives(
nextMapping.getSystem(),
nextMapping.getCode(),
nextMapping.getDisplay());
// Add coding to existing CodeableConcept
myCodeableConceptCodingChild.getMutator().addValue(theElement, newCoding);
}
}
}
}
}
}
}
}
private IBaseCoding createCodingFromPrimitives(String system, String code, String display) {
assert myUriDefinition != null;
assert myCodeDefinition != null;
IBaseCoding newCoding = (IBaseCoding) myCodingDefinition.newInstance();
IPrimitiveType<?> newSystem = myUriDefinition.newInstance(system);
myCodingSystemChild.getMutator().addValue(newCoding, newSystem);
IPrimitiveType<?> newCode = myCodeDefinition.newInstance(code);
myCodingCodeChild.getMutator().addValue(newCoding, newCode);
if (StringUtils.isNotBlank(display)) {
assert myStringDefinition != null;
IPrimitiveType<?> newDisplay = myStringDefinition.newInstance(display);
myCodingDisplayChild.getMutator().addValue(newCoding, newDisplay);
}
return newCoding;
}
}
}

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-spring-boot-samples</artifactId> <artifactId>hapi-fhir-spring-boot-samples</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</parent> </parent>
<artifactId>hapi-fhir-spring-boot-sample-client-apache</artifactId> <artifactId>hapi-fhir-spring-boot-sample-client-apache</artifactId>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-spring-boot-samples</artifactId> <artifactId>hapi-fhir-spring-boot-samples</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</parent> </parent>
<artifactId>hapi-fhir-spring-boot-sample-client-okhttp</artifactId> <artifactId>hapi-fhir-spring-boot-sample-client-okhttp</artifactId>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-spring-boot-samples</artifactId> <artifactId>hapi-fhir-spring-boot-samples</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</parent> </parent>
<artifactId>hapi-fhir-spring-boot-sample-server-jersey</artifactId> <artifactId>hapi-fhir-spring-boot-sample-server-jersey</artifactId>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-spring-boot</artifactId> <artifactId>hapi-fhir-spring-boot</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</parent> </parent>
<artifactId>hapi-fhir-spring-boot-samples</artifactId> <artifactId>hapi-fhir-spring-boot-samples</artifactId>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -30,12 +30,15 @@ import ca.uhn.fhir.jpa.batch.log.Logs;
import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationInterceptor;
import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationSvc;
import ca.uhn.fhir.util.BinaryUtil; import ca.uhn.fhir.util.BinaryUtil;
import org.hl7.fhir.instance.model.api.IBaseBinary; import org.hl7.fhir.instance.model.api.IBaseBinary;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IIdType;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@ -62,6 +65,9 @@ public abstract class BaseResourceToFileWriter implements ItemWriter<List<IBaseR
private final OutputStreamWriter myWriter; private final OutputStreamWriter myWriter;
private final IParser myParser; private final IParser myParser;
@Autowired
private ResponseTerminologyTranslationSvc myResponseTerminologyTranslationSvc;
protected BaseResourceToFileWriter(FhirContext theFhirContext, DaoRegistry theDaoRegistry) { protected BaseResourceToFileWriter(FhirContext theFhirContext, DaoRegistry theDaoRegistry) {
myFhirContext = theFhirContext; myFhirContext = theFhirContext;
myDaoRegistry = theDaoRegistry; myDaoRegistry = theDaoRegistry;
@ -70,7 +76,6 @@ public abstract class BaseResourceToFileWriter implements ItemWriter<List<IBaseR
myWriter = new OutputStreamWriter(myOutputStream, Constants.CHARSET_UTF8); myWriter = new OutputStreamWriter(myOutputStream, Constants.CHARSET_UTF8);
} }
protected IIdType createBinaryFromOutputStream() { protected IIdType createBinaryFromOutputStream() {
IBaseBinary binary = BinaryUtil.newBinary(myFhirContext); IBaseBinary binary = BinaryUtil.newBinary(myFhirContext);
binary.setContentType(Constants.CT_FHIR_NDJSON); binary.setContentType(Constants.CT_FHIR_NDJSON);
@ -81,9 +86,9 @@ public abstract class BaseResourceToFileWriter implements ItemWriter<List<IBaseR
@Override @Override
public void write(List<? extends List<IBaseResource>> theList) throws Exception { public void write(List<? extends List<IBaseResource>> theList) throws Exception {
int count = 0; int count = 0;
for (List<IBaseResource> resourceList : theList) { for (List<IBaseResource> resourceList : theList) {
myResponseTerminologyTranslationSvc.processResourcesForTerminologyTranslation(resourceList);
for (IBaseResource nextFileResource : resourceList) { for (IBaseResource nextFileResource : resourceList) {
myParser.encodeResourceToWriter(nextFileResource, myWriter); myParser.encodeResourceToWriter(nextFileResource, myWriter);
myWriter.append("\n"); myWriter.append("\n");

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId> <artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath> <relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@ -58,37 +58,37 @@
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu3</artifactId> <artifactId>hapi-fhir-structures-dstu3</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId> <artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r4</artifactId> <artifactId>hapi-fhir-structures-r4</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r5</artifactId> <artifactId>hapi-fhir-structures-r5</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId> <artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId> <artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r4</artifactId> <artifactId>hapi-fhir-validation-resources-r4</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.velocity</groupId> <groupId>org.apache.velocity</groupId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -6,7 +6,7 @@
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<name>HAPI-FHIR</name> <name>HAPI-FHIR</name>
<description>An open-source implementation of the FHIR specification in Java.</description> <description>An open-source implementation of the FHIR specification in Java.</description>
<url>https://hapifhir.io</url> <url>https://hapifhir.io</url>
@ -2011,7 +2011,7 @@
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-checkstyle</artifactId> <artifactId>hapi-fhir-checkstyle</artifactId>
<!-- Remember to bump this when you upgrade the version --> <!-- Remember to bump this when you upgrade the version -->
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE12-SNAPSHOT</version> <version>6.1.0-PRE13-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>