Skip to content
This repository has been archived by the owner on Feb 17, 2018. It is now read-only.

Commit

Permalink
DocumentReference feed now working.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin.mayfield committed Apr 7, 2016
1 parent e4f4844 commit 03ff4e2
Show file tree
Hide file tree
Showing 36 changed files with 459 additions and 387 deletions.
@@ -1,4 +1,4 @@
package uk.co.mayfieldis.jorvik.camelRoute.hl7v2HAPI;
package uk.co.mayfieldis.jorvik.camelRoute.hl7v2FHIR;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.hl7.HL7DataFormat;
Expand Down
@@ -1,4 +1,4 @@
package uk.co.mayfieldis.jorvik.camelRoute.hl7v2HAPI;
package uk.co.mayfieldis.jorvik.camelRoute.hl7v2FHIR;

import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
Expand All @@ -10,7 +10,7 @@

public class httpOutcomeProcessor implements Processor {

private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.camelRoute.hl7v2HAPI.httpOutcomeProcessor.class);
private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.camelRoute.hl7v2FHIR.httpOutcomeProcessor.class);
@Override
public void process(Exchange exchange) throws Exception {
//
Expand Down
4 changes: 2 additions & 2 deletions HL7v2-HAPI/src/main/resources/camel-context.xml
Expand Up @@ -54,8 +54,8 @@

<camel:endpoint id="hl7MinaListener" uri="mina2:tcp://0.0.0.0:8888?sync=true&amp;disconnectOnNoReply=false&amp;codec=#hl7codec"/>

<camel:camelContext id="HL7v2-HAPI" xmlns="http://camel.apache.org/schema/spring">
<package>uk.co.mayfieldis.jorvik.camelRoute.hl7v2HAPI</package>
<camel:camelContext id="HL7v2-FHIR" xmlns="http://camel.apache.org/schema/spring">
<package>uk.co.mayfieldis.jorvik.camelRoute.hl7v2FHIR</package>
</camel:camelContext>

</beans>
Expand Down
6 changes: 2 additions & 4 deletions Jorvik-Core/pom.xml
Expand Up @@ -11,8 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<camel-version>2.17.0</camel-version>
<junit-version>4.11</junit-version>
<log4j-version>1.2.17</log4j-version>


<logback-version>1.1.3</logback-version>

<spring-security-version>4.0.2.RELEASE</spring-security-version>
Expand Down Expand Up @@ -48,7 +47,6 @@


<dependencies>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
Expand Down Expand Up @@ -145,7 +143,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>

<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down
Expand Up @@ -10,12 +10,10 @@
import org.hl7.fhir.instance.model.Bundle;
import org.hl7.fhir.instance.model.Appointment;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class EnrichAppointmentwithAppointment implements AggregationStrategy {

private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithAppointment.class);
//private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithAppointment.class);

@Override
public Exchange aggregate(Exchange exchange, Exchange enrichment) {
Expand Down Expand Up @@ -43,7 +41,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#9 JSON Parse failed "+ex.getMessage());
//log.error("#9 JSON Parse failed "+ex.getMessage());
}
}
else
Expand All @@ -55,7 +53,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#10 XML Parse failed "+ex.getMessage());
//log.error("#10 XML Parse failed "+ex.getMessage());
}
}
ByteArrayInputStream xmlNewContentBytes = new ByteArrayInputStream ((byte[]) exchange.getIn().getBody(byte[].class));
Expand Down Expand Up @@ -83,10 +81,13 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
throw ex;
/*
log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
+" Properties: " + exchange.getProperties().toString()
+" Headers: " + exchange.getIn().getHeaders().toString()
+ " Message:" + exchange.getIn().getBody().toString());
*/
}

exchange.getIn().setHeader(Exchange.HTTP_QUERY,"");
Expand All @@ -95,7 +96,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch (Exception ex)
{
log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
//log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
}

return exchange;
Expand Down
Expand Up @@ -11,12 +11,11 @@
import org.hl7.fhir.instance.model.Appointment;
import org.hl7.fhir.instance.model.Location;
import org.hl7.fhir.instance.model.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class EnrichAppointmentwithLocation implements AggregationStrategy {

private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithLocation.class);
//private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithLocation.class);

@Override
public Exchange aggregate(Exchange exchange, Exchange enrichment) {
Expand Down Expand Up @@ -44,7 +43,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#9 JSON Parse failed "+ex.getMessage());
// log.error("#9 JSON Parse failed "+ex.getMessage());
}
}
else
Expand All @@ -56,7 +55,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#10 XML Parse failed "+ex.getMessage());
// log.error("#10 XML Parse failed "+ex.getMessage());
}
}
ByteArrayInputStream xmlNewContentBytes = new ByteArrayInputStream ((byte[]) exchange.getIn().getBody(byte[].class));
Expand All @@ -79,10 +78,10 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
catch(Exception ex)
{

log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
+" Properties: " + exchange.getProperties().toString()
+" Headers: " + exchange.getIn().getHeaders().toString()
+ " Message:" + exchange.getIn().getBody().toString());
// log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
// +" Properties: " + exchange.getProperties().toString()
// +" Headers: " + exchange.getIn().getHeaders().toString()
// + " Message:" + exchange.getIn().getBody().toString());
}


Expand All @@ -91,7 +90,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch (Exception ex)
{
log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
//log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
}

return exchange;
Expand Down
Expand Up @@ -11,12 +11,11 @@
import org.hl7.fhir.instance.model.Bundle;
import org.hl7.fhir.instance.model.Patient;
import org.hl7.fhir.instance.model.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class EnrichAppointmentwithPatient implements AggregationStrategy {

private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithPatient.class);
//private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithPatient.class);

@Override
public Exchange aggregate(Exchange exchange, Exchange enrichment) {
Expand Down Expand Up @@ -44,7 +43,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#9 JSON Parse failed "+ex.getMessage());
//log.error("#9 JSON Parse failed "+ex.getMessage());
}
}
else
Expand All @@ -56,7 +55,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#10 XML Parse failed "+ex.getMessage());
// log.error("#10 XML Parse failed "+ex.getMessage());
}
}
ByteArrayInputStream xmlNewContentBytes = new ByteArrayInputStream ((byte[]) exchange.getIn().getBody(byte[].class));
Expand Down Expand Up @@ -86,10 +85,10 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
+" Properties: " + exchange.getProperties().toString()
+" Headers: " + exchange.getIn().getHeaders().toString()
+ " Message:" + exchange.getIn().getBody().toString());
// log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
// +" Properties: " + exchange.getProperties().toString()
// +" Headers: " + exchange.getIn().getHeaders().toString()
// + " Message:" + exchange.getIn().getBody().toString());
}

exchange.getIn().setHeader(Exchange.HTTP_QUERY,"");
Expand All @@ -98,7 +97,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch (Exception ex)
{
log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
//log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
}

return exchange;
Expand Down
Expand Up @@ -11,12 +11,11 @@
import org.hl7.fhir.instance.model.Bundle;
import org.hl7.fhir.instance.model.Practitioner;
import org.hl7.fhir.instance.model.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class EnrichAppointmentwithPractitioner implements AggregationStrategy {

private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithPractitioner.class);
//private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichAppointmentwithPractitioner.class);

@Override
public Exchange aggregate(Exchange exchange, Exchange enrichment) {
Expand Down Expand Up @@ -44,7 +43,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#9 JSON Parse failed "+ex.getMessage());
// log.error("#9 JSON Parse failed "+ex.getMessage());
}
}
else
Expand All @@ -56,7 +55,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch(Exception ex)
{
log.error("#10 XML Parse failed "+ex.getMessage());
//log.error("#10 XML Parse failed "+ex.getMessage());
}
}
ByteArrayInputStream xmlNewContentBytes = new ByteArrayInputStream ((byte[]) exchange.getIn().getBody(byte[].class));
Expand Down Expand Up @@ -84,10 +83,10 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
catch(Exception ex)
{

log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
+" Properties: " + exchange.getProperties().toString()
+" Headers: " + exchange.getIn().getHeaders().toString()
+ " Message:" + exchange.getIn().getBody().toString());
// log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
// +" Properties: " + exchange.getProperties().toString()
// +" Headers: " + exchange.getIn().getHeaders().toString()
// + " Message:" + exchange.getIn().getBody().toString());
}


Expand All @@ -96,7 +95,7 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment) {
}
catch (Exception ex)
{
log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
// log.error(exchange.getExchangeId() + " " + ex.getMessage() +" " + enrichment.getProperties().toString());
}

return exchange;
Expand Down
Expand Up @@ -15,14 +15,13 @@
import org.hl7.fhir.instance.model.Reference;
import org.hl7.fhir.instance.model.Extension;
import org.hl7.fhir.instance.model.Practitioner.PractitionerPractitionerRoleComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


import uk.co.mayfieldis.jorvik.FHIRConstants.FHIRCodeSystems;

public class EnrichConsultantwithOrganisation implements AggregationStrategy {

private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichConsultantwithOrganisation.class);
// private static final Logger log = LoggerFactory.getLogger(uk.co.mayfieldis.jorvik.core.EnrichConsultantwithOrganisation.class);

@Override
public Exchange aggregate(Exchange exchange, Exchange enrichment)
Expand Down Expand Up @@ -101,10 +100,10 @@ public Exchange aggregate(Exchange exchange, Exchange enrichment)
}
catch(Exception ex)
{
log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
+" Properties: " + exchange.getProperties().toString()
+" Headers: " + exchange.getIn().getHeaders().toString()
+ " Message:" + exchange.getIn().getBody().toString());
// log.error("#12 XML Parse failed 2"+ exchange.getExchangeId() + " " + ex.getMessage()
// +" Properties: " + exchange.getProperties().toString()
// +" Headers: " + exchange.getIn().getHeaders().toString()
// + " Message:" + exchange.getIn().getBody().toString());
}
}
}
Expand Down

0 comments on commit 03ff4e2

Please sign in to comment.