19.11.09

Spring test masking exceptions

Spring test module has lots of benefits. Bu some times it may be a bit confusing.

When Using spring test module it mostly produces only one exception for all exceptions. As below

java.lang.NoSuchMethodError:
org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava lang/Throwable;)V

exception masking all others and getting debug process harder for me. Finally I can figure out the problem. If you use spring 2.5.x series you have to use Junit 4.4 . If you use 3.0 then Junit 4.7 will suits for u.

15.8.09

"signer information does not match signer information of other classes in the same package" Error

I get this error when trying to test some of my new program prototype. And the reason was conflict of JUnit3 ( which comes with Hapi ) and JUnit4 ( which I've added manually ).

After removing Junit3 from may build path everything goes Ok.

31.7.09

Camel Mina and "java.lang.NoSuchFieldError: name" error

We decide to use IPF for HL7 processing validation and integration. If you think HAPI is not enough or a bit cumbersome for you IPF might be the solution you look for.

Anyway after reading tutorials I try to write an example app which uses Camel-mina component to listen tcp for messages. But there is strange error thrown by Surefire component. After googling and trying a few hours finally I can find the solution here. The problem is about dependencies camel-mina component depends on both mina-core 1.1.7  and slf4j 1.5.5 while the mina-core 1.1.7 itself depends on slf4j 1.4.3.

And the solution is reorganizing dependencies in pom.xml as below;

...

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-hl7</artifactId>
            <version>1.6.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.mina</groupId>
                    <artifactId>mina-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mina</artifactId>
            <version>1.6.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.mina</groupId>
                    <artifactId>mina-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.mina</groupId>
            <artifactId>mina-core</artifactId>
            <version>1.1.7</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>



...

19.6.09

Introduction to HAPI - 1

Explanation for HAPI packages;


ca.uhn.hl7v2.app

This package includes Application stuff.

From an HL7 messaging perspective, an Application is a consumer of a messages. Once a parser parses an incoming message, the message would normally be forwarded to an Application of some sort (e.g. a lab system) which would process the message in some way meaningful for it, and then return a response.

If you are wondering how to integrate HAPI into an existing server application, this is probably the place. Create a class that implements Application, then look at Responder and SimpleServer to see how to get HAPI to listen for messages on a socket and pass them to your Application.

ca.uhn.hl7v2.llp

This package includes stuff for working on a Lower Layer Protocol (LLP). And an implementation of "Minimal Lower Layer Protocol" from the HL7 Implementation Guide, Appendix C

The HL7 protocol will be used primarily in network environments. Most of the details of error detection and correction are handled by the lower levels of any reasonable network protocol and are not appropriate for the HL7 Standard. Many mini and mainframe computer systems, however, operate in communication environments that do not provide sufficient lower layer functionality.

In these cases HL7 offers severalalternate lower layer protocols to suit different environments. It is not a requirement of a vendor to implement any of these protocols to be considered HL7 compliant at the encoding rule level.

( See Health Level Seven Implementation Support Guide for further details on LLP. )


ca.uhn.hl7v2.view


This package includes only one class which is a Swing panel that displays the contents of
a Message object in a JTree. The tree currently only expands to the field level (components shown as one node).


ca.uhn.hl7v2.model

This package ( in the hapi-base-.jar ) includes interfaces, abstract classes and exceptions for HL7 data model.  İmplementation of data model is in the generated source jars.

ca.uhn.hl7v2.parser:
This package includes a name which doesn't need an explanation :)

ca.uhn.hl7v2.preparser: This package includes classes extracts specified fields from unparsed messages.

ca.uhn.hl7v2.protocol:
This package includes classws for HL7 comminication roles and backends.

ca.uhn.hl7v2.conf: This package includes stuff for parsing and validating conformance profile messages.

ca.uhn.hl7v2.validation:
This package includes validation utilities for parsed and encoded messages.

ca.uhn.log:
This package enhances logging for HAPI.