Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For reference, all the configurable Java classes have been listed below. Entity proxies have also been included as the same steps apply for implementing these interfaces:

Service / FeatureCoponent TypeJava Class
MPIAdaptergov.hhs.fha.nhinc.mpi.adapter.component.PatientChecker
MPIAdaptergov.hhs.fha.nhinc.mpi.adapter.component.proxy.AdapterComponentMpiProxyJavaImpl
MPIAdapter

gov.hhs.fha.nhinc.mpi.adapter.proxy.AdapterMpiProxyJavaImpl

Redaction EngineAdaptergov.hhs.fha.nhinc.redactionengine.adapter.proxy.AdapterRedactionEngineProxyJavaImpl
Admin DistributionAdaptergov.hhs.fha.nhinc.admindistribution.adapter.proxy.AdapterAdminDistributionProxyJavaImpl
Admin DistributionEntitygov.hhs.fha.nhinc.admindistribution.entity.proxy.EntityAdminDistributionProxyJavaImpl
Audit Query LoggerEntitygov.hhs.fha.nhinc.auditquerylog.nhinc.proxy.AuditQueryLogProxyJavaImpl
Audit RepositoryEntitygov.hhs.fha.nhinc.auditrepository.nhinc.proxy.AuditRepositoryProxyJavaImpl
CORE X12 Document SubmissionAdaptergov.hhs.fha.nhinc.corex12.ds.genericbatch.request.adapter.proxy.AdapterX12BatchRequestProxyJavaImpl
CORE X12 Document SubmissionAdaptergov.hhs.fha.nhinc.corex12.ds.genericbatch.response.adapter.proxy.AdapterX12BatchResponseProxyJavaImpl
CORE X12 Document SubmissionAdaptergov.hhs.fha.nhinc.corex12.ds.realtime.adapter.proxy.AdapterX12RealTimeProxyJavaImpl
DirectEntitygov.hhs.fha.nhinc.direct.edge.proxy.DirectEdgeProxyJavaImpl
DirectEntitygov.hhs.fha.nhinc.direct.receiver.proxy.DirectReceiverProxyJavaImpl
DirectEntitygov.hhs.fha.nhinc.direct.sender.proxy.DirectSenderProxyJavaImpl
Document Data Submission (Pilot)Adaptergov.hhs.fha.nhinc.docdatasubmission.adapter.proxy.AdapterDocDataSubmissionProxyJavaImp
Document Data Submission (Pilot)Entitygov.hhs.fha.nhinc.docdatasubmission.entity.proxy.EntityDocDataSubmissionProxyJavaImpl
Document QueryEntitygov.hhs.fha.nhinc.docquery.entity.proxy.EntityDocQueryProxyJavaImpl
Document QueryAdaptergov.hhs.fha.nhinc.docquery.adapter.proxy.AdapterDocQueryProxyJavaImpl
Document RegistryAdaptergov.hhs.fha.nhinc.docregistry.adapter.proxy.AdapterComponentDocRegistryProxyJavaImpl
Document RetrieveAdaptergov.hhs.fha.nhinc.docretrieve.adapter.proxy.AdapterDocRetrieveProxyJavaImpl
Document RetrieveEntitygov.hhs.fha.nhinc.docretrieve.entity.proxy.EntityDocRetrieveProxyJavaImpl
Document RepositoryAdapter

gov.hhs.fha.nhinc.docrepository.adapter.proxy.AdapterComponentDocRepositoryProxyJavaImpl

Document SubmissionAdaptergov.hhs.fha.nhinc.docsubmission.adapter.deferred.request.error.proxy.AdapterDocSubmissionDeferredRequestErrorProxyJavaImpl
Document SubmissionAdaptergov.hhs.fha.nhinc.docsubmission.adapter.deferred.request.proxy.AdapterDocSubmissionDeferredRequestProxyJavaImpl
Document SubmissionAdaptergov.hhs.fha.nhinc.docsubmission.adapter.component.deferred.request.proxy.AdapterComponentDocSubmissionRequestProxyJavaImpl
Document SubmissionEntitygov.hhs.fha.nhinc.docsubmission.entity.deferred.request.proxy.EntityDocSubmissionDeferredRequestProxyJavaImpl
Document SubmissionAdaptergov.hhs.fha.nhinc.docsubmission.adapter.component.deferred.response.proxy.AdapterComponentDocSubmissionResponseProxyJavaImpl
Document SubmissionAdaptergov.hhs.fha.nhinc.docsubmission.adapter.deferred.response.proxy.AdapterDocSubmissionDeferredResponseProxyJavaImpl
Document SubmissionEntitygov.hhs.fha.nhinc.docsubmission.entity.deferred.response.proxy.EntityDocSubmissionDeferredResponseProxyJavaImpl
Document SubmissionAdaptergov.hhs.fha.nhinc.docsubmission.adapter.proxy.AdapterDocSubmissionProxyJavaImpl
Document SubmissionAdaptergov.hhs.fha.nhinc.docsubmission.adapter.component.proxy.AdapterComponentDocSubmissionProxyJavaImpl
Document SubmissionEntitygov.hhs.fha.nhinc.docsubmission.entity.proxy.EntityDocSubmissionProxyJavaImpl
Patient DiscoveryAdaptergov.hhs.fha.nhinc.patientdiscovery.adapter.deferred.request.error.proxy.AdapterPatientDiscoveryDeferredReqErrorProxyJavaImpl
Patient DiscoveryAdaptergov.hhs.fha.nhinc.patientdiscovery.adapter.deferred.request.proxy.AdapterPatientDiscoveryDeferredReqProxyJavaImpl
Patient DiscoveryAdaptergov.hhs.fha.nhinc.patientdiscovery.adapter.deferred.request.queue.proxy.AdapterPatientDiscoveryAsyncReqQueueProxyJavaImpl
Patient DiscoveryEntitygov.hhs.fha.nhinc.patientdiscovery.entity.deferred.request.proxy.EntityPatientDiscoveryDeferredRequestProxyJavaImpl
Patient DiscoveryAdaptergov.hhs.fha.nhinc.patientdiscovery.adapter.deferred.response.proxy.AdapterPatientDiscoveryDeferredRespProxyJavaImpl
Patient DiscoveryEntitygov.hhs.fha.nhinc.patientdiscovery.entity.deferred.response.proxy.EntityPatientDiscoveryDeferredResponseProxyJavaImpl
Patient DiscoveryAdaptergov.hhs.fha.nhinc.patientdiscovery.adapter.proxy.AdapterPatientDiscoveryProxyJavaImpl
Patient DiscoveryEntitygov.hhs.fha.nhinc.patientdiscovery.entity.proxy.EntityPatientDiscoveryProxyJavaImpl
Patient Location Query (Pilot)Entitygov.hhs.fha.nhinc.patientlocationquery.entity.proxy.EntityPatientLocationQueryProxyJavaImpl
Patient Location Query (Pilot)Adaptergov.hhs.fha.nhinc.patientlocationquery.adapter.proxy.AdapterPatientLocationQueryProxyJavaImpl
Policy EngineAdaptergov.hhs.fha.nhinc.policyengine.adapter.proxy.PolicyEngineProxyJavaImpl
Policy EngineAdaptergov.hhs.fha.nhinc.policyengine.adapter.orchestrator.proxy.AdapterPolicyEngineOrchProxyJavaImpl
Policy EngineAdaptergov.hhs.fha.nhinc.policyengine.adapter.pep.proxy.AdapterPEPProxyJavaImpl


Example: Document Query skeleton injection

...

A bare bones Maven POM file is provided below:

Code Block
languagexml
titlepom.xml
<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">

    <artifactId>MyCustomAdapter</artifactId>
    <groupId>com.example</groupId>
    <name>CUSTOM Adapter - ${project.artifactId}</name>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <modelVersion>4.0.0</modelVersion>

    <properties>
        <spring.version>4.1.9.RELEASE</spring.version>
    </properties>
    
    <dependencies>
        <!-- CONNECT Modules / Web Services -->
        <dependency>
            <groupId>org.connectopensource</groupId>
            <artifactId>CONNECTCoreLib</artifactId>
            <version>5.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.connectopensource</groupId>
            <artifactId>DocumentQueryCore</artifactId>
            <version>5.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.connectopensource</groupId>
            <artifactId>CONNECTCommonTypesLib</artifactId>
            <version>5.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.connectopensource</groupId>
            <artifactId>DocumentQueryWebservices</artifactId>
            <version>5.3.0</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>


      <!-- Spring Framework -->
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.version}</version>
      </dependency>      
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
    </build>
</project>

...

As we will be demonstrating how to implement the Document Query adapter, we will need to use the Adapter Proxy for document query - AdapterDocQueryProxy in this case. Take note theĀ @AdapterDelegationEvent annotation on the method. This is used by failure logging and event logging and must be present on your Java adapter implementations. Failure to do so may result in raised exceptions not being caught and logged correctly, as well as incomplete/corrupted logging of the invocation of CONNECT. You may use the reference Java adapters for examples on the builder classes regarding the Event aspect.

Code Block
languagejava
titleMyDocQueryAdapter.java
package com.example.mycustomadapter
import gov.hhs.fha.nhinc.aspect.AdapterDelegationEvent;
import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType;
import gov.hhs.fha.nhinc.docquery.adapter.proxy.AdapterDocQueryProxy;
import gov.hhs.fha.nhinc.docquery.aspect.AdhocQueryRequestDescriptionBuilder;
import gov.hhs.fha.nhinc.docquery.aspect.AdhocQueryResponseDescriptionBuilder;
import oasis.names.tc.ebxml_regrep.xsd.query._3.AdhocQueryRequest;
import oasis.names.tc.ebxml_regrep.xsd.query._3.AdhocQueryResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class MyDocQueryAdapter implements AdapterDocQueryProxy{

    private static final Logger LOG = LoggerFactory.getLogger(MyDocQueryAdapter.class);

    @AdapterDelegationEvent(beforeBuilder = AdhocQueryRequestDescriptionBuilder.class,
        afterReturningBuilder = AdhocQueryResponseDescriptionBuilder.class, serviceType = "Document Query",
        version = "LEVEL_a0")
    public AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest msg, AssertionType assertion) {
        LOG.info("We called from inside our adapter and you have successfully injected your Java adapter into the CONNECT code");
        return new AdhocQueryResponse();
    }

}

...

Once you have implemented your custom adapter, your new project must be put in as a dependency for the service you are implementing. This is so your new beans (Created by the proxy definitions) will be in the same shared spring context as the rest of the other beans in the service. In the following snippet, we have added the "com.example" group ID and "MyCustomAdapter" artifact you have built earlier and installed into your local maven repository.

Code Block
languagexml
titleDocumentQueryCore - pom.xml
<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">

    <parent>
        <groupId>org.connectopensource</groupId>
        <artifactId>Services</artifactId>
        <version>5.3.0</version>
    </parent>

    <artifactId>DocumentQueryCore</artifactId>
    <name>CONNECT Document Query Core</name>
    <packaging>jar</packaging>
    <modelVersion>4.0.0</modelVersion>

    <dependencies>
        <!-- Java EE APIs -->
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.example</groupId>
             <artifactId>MyCustomAdapter</artifactId>
            <version>1.0.0</version>
        </dependency>

        <!-- CONNECT Modules / Web Services -->
        <dependency>
            <groupId>org.connectopensource</groupId>
            <artifactId>CONNECTCoreLib</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.connectopensource</groupId>
            <artifactId>AuditRepositoryCore</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.connectopensource</groupId>
            <artifactId>PatientCorrelationCore</artifactId>
            <version>${project.parent.version}</version>
        </dependency>

   ...

...