Re: [HAPI-devel] HL7 v2 (2.7 and later versions) to FHIR conversion through HAPI

2024-10-20 Thread James Agnew
Hi Shreeja, Unfortunately no conversions between v2 and FHIR are provided by the open source library. We make a converter module available as a part of our commercial offering but it is unfortunately not open source. On Sun, Oct 20, 2024 at 1:26 AM Shr

Re: [HAPI-devel] Question regarding numberOfSegmentRepeats

2022-06-16 Thread James Agnew
Hi Greg, Unfortunately I think you probably have the wrong list. This mailing list is for HAPI HL7v2, which is a Java (not JavaScript) library. Cheers, James On Wed, Jun 15, 2022 at 11:55 AM White, Gregory (GE Healthcare) < gregory.wh...@med.ge.com> wrote: > Greetings all, > > > > I am somewha

Re: [HAPI-devel] HAPI TestPanel

2021-10-21 Thread James Agnew
ead-1] Hl7V2MessageEr7:364 - Highlited path > is now: /MSH-1 > 13:31:42,897 INFO [Thread-4] Controller:1025 - HAPI TestPanel is up to > date. Great! > 13:31:42,952 INFO [AWT-EventQueue-0] Hl7V2MessageTree:285 - Opening > default paths > > By unzipping the distribution and downloading an

Re: [HAPI-devel] HAPI TestPanel

2021-10-21 Thread James Agnew
Hi Randy, HAPI HL7v2 is definitely more in maintenance mode at this point as opposed to being actively developed, but it's still an active project. You can get a copy of the 2.3 release of the testpanel, which needs to be run from the command line but does work, here: https://github.com/hapifhir/

Re: [HAPI-devel] 0.9.6-hapi2.jar

2021-02-07 Thread James Agnew
Hi Benjamin, Unfortunately the source for this library is currently lost. The old HL7v2 testpanel hasn't seen a lot of attention in the last many years, and really needs some love. The testpanel application uses a fork of the JSyntaxPane library with a few bugs fixed, which is what that "0.9.6-ha

Re: [HAPI-devel] Obtaining XPath during "client" mode...

2020-04-06 Thread James Agnew
Hi Russell, FYI this is the HAPI-HL7v2 mailing list, it's probably better to ask this question on the HAPI FHIR list at : https://groups.google.com/forum/#!forum/hapi-fhir That said, there isn't a built-in way of applying XPath, but you might look at FhirContext#newFluentPath() (renamed to newFhr

Re: [HAPI-devel] Feedback Required on HAPI Article Series...

2018-08-14 Thread James Agnew
Wow, I think the community has spoken. :) These are great articles Saravanan, thanks for sharing! I'll add a link from the HAPI website. Cheers, James On Tue, Aug 14, 2018 at 4:42 AM Jens Villadsen < jenskristianvillad...@gmail.com> wrote: > It looks like a good place to start for new-comers. G

Re: [HAPI-devel] TestPanel with new version Please help

2018-07-05 Thread James Agnew
You can download the 2.3 release of TestPanel here: https://github.com/hapifhir/hapi-hl7v2/releases Cheers, James On Thu, Jul 5, 2018 at 9:38 AM VICTOR FERIA wrote: > Hello, > > Thank you a lot for this wonderful tool. > Please I would like to use TestPanel with new version "HAPI HL7v2 2.3 > Re

Re: [HAPI-devel] HL7 HAPI SUPPORT ASTM Messages

2017-08-24 Thread James Agnew
Hi Hassan, I have never used the ASTM protocol unfortunately, but my understanding is that it is not a subset of HL7 v2.x so much as a protocol that looks similar but different to HL7. This would mean that it is not possible to parse it using HAPI. It is entirely possible that I am wrong about th

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-08-03 Thread James Agnew
Hi Tom, If you are able to, a pull request against the GitHub Project would be gratefully accepted. Cheers, James On Thu, Aug 3, 2017 at 7:00 AM, Tom Chiverton wrote: > Here's a patch against the current trunk that adds this support. > > Using a modifie

[HAPI-devel] HAPI HL7v2 2.3 Released!

2017-06-23 Thread James Agnew
A new version of HAPI HL7v2 has been released! This new version includes a number of bugfixes, as well as new message structures for the following versions of HL7v2: v2.7, v2.8, and v2.8.1. Note that we're not currently able to release structures for v2.7.1 because of weirdness in the HL7 database

Re: [HAPI-devel] Lead spacing trimming

2017-05-26 Thread James Agnew
quivalent ways of > parsing a string into a Hapi Message. > > As they are not which is the recommended way to parse a HL7 string into a > Hapi Message object? > > Regards, > > -Mike > > > > > On 25 May 2017 at 21:03, James Agnew wrote: > >> Hi David,

Re: [HAPI-devel] Lead spacing trimming

2017-05-25 Thread James Agnew
Hi David, I'm not sure I could provide an answer as to why, given that this behaviour has existed in the library for roughly 15 years now. I would be nervous about changing it given how longstanding it has existed, but I can tell you that you can disable it by setting validation to NoValidation (

[HAPI-devel] Upcoming Release and migration to GitHub

2016-12-19 Thread James Agnew
Hello All, Two quick notes: 1. HAPI's HL7v2 codebase has been migrated to GitHub, and can now be found here: https://github.com/hapifhir/hapi-hl7v2/ This should allow us to more easily accept patches, and should make the project more manageable generally as time goes on. I'm also planning on cha

Re: [HAPI-devel] Tying a received message to a connection

2016-12-06 Thread James Agnew
Hi Jonny, Have a look at MetadataKeys.java. These can be used as keys in the ReceivingApplication (assuming you're using ApplicationRouter) to get the originating IP and port. It's not a reference to the connection exactly but it could be used to figure it out. Cheers, James On Tue, Dec 6, 2016

Re: [HAPI-devel] Distinguish segment as standard or non-standard

2016-09-28 Thread James Agnew
I don't think there is a direct way but you could always create a new empty message instance and compare the results of the getNames() method. sent from my phone. On Sep 28, 2016 10:31 PM, "Ankit Shrestha" wrote: > Hello, > Is it possible to distinguish a segment name as standard or non-standar

Re: [HAPI-devel] HAPI Test Panel source code?

2016-09-27 Thread James Agnew
Hi Pablo, The source for the test panel can be found here: https://sourceforge.net/p/hl7api/code/HEAD/tree/trunk/hapi-mvn/hapi-testpanel/ For what it's worth, I recently got it working on OSX by using the Linux build. It seems like recent versions of OSX don't like the binary format produced by t

Re: [HAPI-devel] HohClientSimple Exception (Missed putting the subject)

2016-02-24 Thread James Agnew
Hi Brian, To me that looks like the server isn't setting the content type on the response. Is that possible? Cheers, James On Tue, Feb 23, 2016 at 9:01 AM, Davies, Brian wrote: > Hi All, > > > > I am using the HAPI HohClientSimple client to send a simple HL7 message > to some HTTP endpoint but

Re: [HAPI-devel] Parser dropping 1 empty repeat on an OBX-5 each time you parse

2015-12-07 Thread James Agnew
Hi Ian, I turned this into a unit test, and it seems to give me the expected results: String msg = "MSH|^~\\&|HNAM|CL|CL_RADNET|CL|20110628095233||ORU^R01|Q2301030099T1904270849|P|2.4\r" + "PID|1||10011682^^^CL_MRN Pool^^CD:237968946|60683166^^^DONOTSEND^^CD:237968946|CLABTE

Re: [HAPI-devel] how to quote HAPI

2015-03-16 Thread James Agnew
Hi Peter, We have no preferred way to quote or refer to HAPI, so whatever you choose is fine. For what it's worth, the full name of the project is "HAPI: The Open Source HL7 API for Java". Cheers, James Ps- If by chance you can share when the paper is done, we're always excited to hear about how

Re: [HAPI-devel] 257 Processing?

2015-02-26 Thread James Agnew
Hi Bill, I'm afraid I have no idea what a 275 is, to be honest. Our library is focused on parsing and encoding HL7 messages, so if a 275 is a specific profile of an HL7 v2 or HL7 FHIR message then it's likely you could use HAPI to create one. Otherwise, it is unlikely we will support it. Cheers,

Re: [HAPI-devel] OBX- Multiple

2015-01-28 Thread James Agnew
Hi Gurmail, This is actually the list for HAPI (the Java HL7 API) and not nHAPI (the .NET one). The two project are actually not affiliated with each other. I believe that if you visit the nHAPI website they have a web forum for asking questions though. Cheers, James On Wed, Jan 28, 2015 at 7:49

Re: [HAPI-devel] OBX-5 Validation

2014-11-24 Thread James Agnew
To be honest, this sounds like it might be a bug with the profile validator... Are you able to share a sample message and profile by any chance? Cheers, James On Mon, Nov 24, 2014 at 2:46 PM, Pablo León wrote: > Hi, > > I'm using HAPI profile validator for ORU messages, but I'm getting the > f

Re: [HAPI-devel] HAPI FHIR server

2014-11-20 Thread James Agnew
Hi Chandan, (FYI, this is actually the mailing list for HAPI's HL7 v2 library. It's probably better to post to the HAPI FHIR list/group, which can be found over here: https://groups.google.com/d/forum/hapi-fhir ) The easiest way to get started is probably with the "Vagrant" development environmen

Re: [HAPI-devel] DG1 segments repetition.

2014-11-11 Thread James Agnew
om my BlackBerry Passport. > >*From: *James Agnew > *Sent: *Tuesday, November 11, 2014 17:16 > *To: *Singh, Brijesh > *Cc: *hl7api-devel@lists.sourceforge.net > *Subject: *Re: [HAPI-devel] DG1 segments repetition. > > Hi Brijesh, > > You're right, the custom

Re: [HAPI-devel] DG1 segments repetition.

2014-11-11 Thread James Agnew
Hi Brijesh, You're right, the custom segments are causing an issue since the parser csn't see subsequent DG1 repetitions as actual repetitions. The easiest way to do this would be to call MessageInstance.getAll("DG1") followed by MessageInstance.getAll("DG12") followed by MessageInstance.getAll("

Re: [HAPI-devel] ORU^R01 Message: Battery and its testsdf

2014-11-11 Thread James Agnew
Hi Rafael, (Other people please chime in too! I'm hardly a lab expert..) One of the joys of HL7 v2 is that a lot of the standard is loose and subject to interpretation, which means that often there isn't a right answer to how something works in the specification, you need to understand how the se

Re: [HAPI-devel] Custom XML output

2014-11-04 Thread James Agnew
I'm guessing this is related to your other question around converting v2 to PDF? FWIW there are obviously a million ways you could try and handle this.. I participated in a project years ago where I helped write XSLT transforms from HL7 v2/XML to drive Apache FOP for generating PDFs. That quickly

[HAPI-devel] Missing emails re. HAPI

2014-11-04 Thread James Agnew
Hi All, Just a quick note, sorry for this- I discovered this weekend that the email box my sourceforge email account and mailing lists were routed to silently stopped accepting most messages about 1.5 months ago. If anyone has sent me anything urgent in that time, you will need to resend. Cheers,

Re: [HAPI-devel] HL7 to XML

2014-11-04 Thread James Agnew
Hi Kathees, This is actually correct behaviour. It's a somewhat confusing aspect of HL7 v2 at first, but HL7 reuses some message structures for multiple message trigger events. For example, the ADT^A01 and ADT^A04 messages both need all of the same data fields, so HL7 decided to reuse the ADT^A01

Re: [HAPI-devel] Initiating the Hl7 class factory based on the MSH field

2014-11-04 Thread James Agnew
Hi Chandan, There are two good ways of doing this: you can use the Terser, which involves something along the lines of String version = new Terser(yourMsg).get("MSH-12"); or you can use the CanonicalModelClassFactory

Re: [HAPI-devel] unexplained behavior with toString() and getOBSERVATIONReps()

2014-10-14 Thread James Agnew
efore processing it. This should be resolved in the next version of HAPI either way. Cheers, James On Tue, Oct 14, 2014 at 5:54 PM, James Agnew wrote: > Hi Tim, > > Strangely I'm not seeing the same behaviour when I created a unit test to > try this out. Do you see the same resu

Re: [HAPI-devel] unexplained behavior with toString() and getOBSERVATIONReps()

2014-10-14 Thread James Agnew
Hi Tim, Strangely I'm not seeing the same behaviour when I created a unit test to try this out. Do you see the same results with the following? @Test public void testEncodeDoesntChangeStructure() throws HL7Exception { String message = "MSH|^~\\&|SYSTEM|XXX|CLOVERLEAF|XXX|201410011706

Re: [HAPI-devel] HL7 Message Creation Questions

2014-09-10 Thread James Agnew
Hi Harvey, The datatypes change a little but from version to version of HL7. If you're using version 2.2 MSH-3 is ST, whereas in version 2.3 it is HD (which is what the code above is expecting). If you're using HL7 2.2 you can call getSendingApplication().setValue("foo"); directly. Cheers, James

Re: [HAPI-devel] hapi-testpanel compile failure

2014-09-09 Thread James Agnew
Hi Mike, That assert looks like it's just an old artifact that should have been removed. I've removed it from the repo and also applied your correction to the readerinputstream. With those two changes, the tests all pass for me. Can you give it a whirl? (and thanks for the fix!) Cheers, James On

Re: [HAPI-devel] Hapi over http: Response Exception

2014-07-30 Thread James Agnew
Hi Sara, HAPI is expecting an HTTP 200 response (not 201) and an HL7 content type (not text/plain), per the HL7 over HTTP specification. It may be worth checking with OpenHIE developers whether it can be configured to send the needed content type and status code. If not, you may end up having to

Re: [HAPI-devel] Sending over HTTP issues

2014-07-24 Thread James Agnew
stractClient.java:161) > > Could you suggest what could be going wrong? > > Thanks & Regards > Sara Fatima > > > > On Wed, Jul 23, 2014 at 1:33 AM, James Agnew wrote: > >> Hi Sara, >> >> To send XML encoded messages, you need to pass an instance of

Re: [HAPI-devel] Sending over HTTP issues

2014-07-22 Thread James Agnew
Hi Sara, To send XML encoded messages, you need to pass an instance of DefaultXMLParser into the constructor of HohClientSimple. The client internally uses whatever parser it is passed (the sample you linked to uses a pipe parser) to encode the message object. Cheers, James On Tue, Jul 22, 2014

Re: [HAPI-devel] Does HAPI support BATCH messages?

2014-07-22 Thread James Agnew
Hi Pablo, Unfortunately not. We've never had any systems here that use it, so we've never been able to play with batch mode. I don't think it would be hard to implement though if anyone felt inclined to give it a shot.. :) James On Tue, Jul 22, 2014 at 4:52 AM, Pablo León wrote: > Hi, > > If

Re: [HAPI-devel] Using Z-segments in ADT_AXX superstructure

2014-07-21 Thread James Agnew
Hi Ian, I was able to recreate this, and it's a bug all right. I'll put a fix in, but I was able to work around it in the current version of HAPI by using a newly created parser that had validation disabled. The following snippet (which is kind of weird but does demonstrate a workaround..) works

Re: [HAPI-devel] Problem sending HL7 over HTTP

2014-07-21 Thread James Agnew
urceforge.jtds:jtds:jar:1.2.2:test > [INFO]| +- org.apache.derby:derbyclient:jar:10.4.2.0:test > [INFO]| \- postgresql:postgresql:jar:8.3-603.jdbc4:test > [INFO]+- com.h2database:h2:jar:1.2.135:test > [INFO]+- org.dbunit:dbunit:jar:2.4.7:test > [INFO]\- xmlunit:xmlunit:jar:1.3:test > [INFO] >

Re: [HAPI-devel] Problem sending HL7 over HTTP

2014-07-19 Thread James Agnew
That exclusion should be correct- Can you post your dependency tree? The heart of this is that you don't want conflicting versions of SLF4j to be in the WAR/EAR file you are deploying.. And to add to that from the stack trace you posted it looks like maybe Tomcat is bundling a 1.6.x copy in itself

Re: [HAPI-devel] Hl7 over HTTP

2014-07-16 Thread James Agnew
This should be fairly simple, it just means that you have a version of slf4j-api that is too new (probably because HAPI is pulling it in). If you explicitly add a dependency in your pom.xml for slf4j-api the specifies a 1.5.x version (you should be able to find one in your OpenHIE pom) it'll use th

Re: [HAPI-devel] Is the following HL7 message correct?

2014-07-16 Thread James Agnew
Hi Rishi, This is really more of a question for OpenMRS. HL7 v2 is unfortunately not really a 100% "plug and play" standard, so just having technically valid HL7 content rarely means that you can be sure you have met the needs of any given application. In other worse, there are many fields in your

Re: [HAPI-devel] Implementing Zxx segments on A05

2014-07-16 Thread James Agnew
heers, James On Wed, Jul 16, 2014 at 11:40 AM, Sheridan Paul (RBV) NHS Christie Tr < paul.sheri...@christie.nhs.uk> wrote: > Thanks for this, seems that this aspect of hapi didn’t make it into the > .net port – I’ll keep digging, thanks. > > > > P. > > > > *From:

Re: [HAPI-devel] Sending hl7 message over http

2014-07-15 Thread James Agnew
hNoValidation(); > > > Could you tell me where I could be going wrong? > > > > Regards > Sara Fatima > > > > On Tue, Jul 15, 2014 at 9:41 PM, James Agnew wrote: > >> Hi Sara, >> >> HTTP support is currently in a separate JAR wh

Re: [HAPI-devel] Sending hl7 message over http

2014-07-15 Thread James Agnew
Hi Sara, HTTP support is currently in a separate JAR which you can include in your pom.xml and use. Here is a fairly complete set of instructions: http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html Note though that HTTP support is a relatively new thing- It's not even yet approved form

Re: [HAPI-devel] Implementing Zxx segments on A05

2014-07-15 Thread James Agnew
Hi Paul, Not to worry, dealing with Z-segments is fairly common but not entirely intuitive at first. You'll find a complete example here: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/CustomModelClasses.html Basically, there are two ways to do it, one uses custom message types and giv

Re: [HAPI-devel] Fwd: Not returning ACK response

2014-07-10 Thread James Agnew
gt; ReceivingApplication I can return any Message type. So I should be able to > return a SRR message. But when I do that, I get error. Returning an ACK > works fine. > > > On Thu, Jul 10, 2014 at 6:30 PM, James Agnew wrote: > >> Hi Abhishek, >> >> I'm not sure

Re: [HAPI-devel] Fwd: Not returning ACK response

2014-07-10 Thread James Agnew
Hi Abhishek, I'm not sure I understand your issue- Are you building the client, or the server, or both? To have a different message returned, you need to modify the server to return that message. HAPI's client will simply return whatever it gets back. Cheers, James On Thu, Jul 10, 2014 at 6:57

Re: [HAPI-devel] hl7 over http

2014-06-10 Thread James Agnew
Hi Matt, You'll find the full specification for HL7 over HTTP here: http://hl7api.sourceforge.net/hapi-hl7overhttp/specification.html 1) what should the content type be for the response messages ER7 formatted hl7 requests (I'm thinking text/plain) application/hl7-v2 (although as a part of prepa

Re: [HAPI-devel] Sending over MLLP

2014-06-09 Thread James Agnew
In < 2.1 the ConnectionHub class is the main part of the API used to send messages. Here is a random example I found using it: http://icardea.googlecode.com/svn/trunk/icardea-cied-dataprocessing/src/main/java/de/offis/health/icardea/cied/hl7/processing/HL7_ORU_Sending.java Cheers, James On Mon,

Re: [HAPI-devel] HAPI v2.0

2014-06-05 Thread James Agnew
mpiled. (As I will also need patient identifier in my HL7 message) > > Also my knowledge about HAPI is limited and I am not very sure what effect > would be there by changing structure from v24 to v25. Could you please > brief me about the purpose of these 2 structures? > > Thanks &

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread James Agnew
I would try removing the provided from your dependencies. That means "use it to compile, but don't include it in the finished product" which is probably not wanted here. James On Wed, Jun 4, 2014 at 1:22 PM, Sara Fatima wrote: > Hi > > Which classpath are you referring to? I haven't set any cla

Re: [HAPI-devel] Can't return repetition - repeating segment

2014-06-02 Thread James Agnew
Hi Letha, Most likely some logic is preventing the 3rd rep from being added. Are you able to distill this down into a code fragment that could be posted to the list? Cheers, James On Mon, Jun 2, 2014 at 3:53 PM, Letha Joy wrote: > Hi, > > I am getting following error message when I tried to c

Re: [HAPI-devel] Working with HAPI

2014-06-02 Thread James Agnew
Hi Sara, This sounds like yet another dependency problem. Can you post your dependency tree? sent from my phone. On Jun 2, 2014 4:49 AM, "Sara Fatima" wrote: > Hi all, > > I have been working this on trying to create HL7 message. I have used this >

Re: [HAPI-devel] HAPI Logging

2014-05-29 Thread James Agnew
me > approach in both releases. > > Dayu > > On May 29, 2014, at 9:28 AM, James Agnew wrote: > > Hi Dayu, > > HAPI uses SLF4j ( http://www.slf4j.org/ ) for logging. SLF4j is a facade > framework which forwards logging to an underlying framework, such as LOG4j > or

Re: [HAPI-devel] HAPI Logging

2014-05-29 Thread James Agnew
Hi Dayu, HAPI uses SLF4j ( http://www.slf4j.org/ ) for logging. SLF4j is a facade framework which forwards logging to an underlying framework, such as LOG4j or Logback. The easiest way to get started with logging is to just add a logback JAR to your classpath. If you're already using a specific f

Re: [HAPI-devel] Create HL7 message example

2014-05-29 Thread James Agnew
Hi Sara, This is probably a similar issue to the other one you had, where OpenMRS is importing an older version of a libaray (in this case, slf4j). The easiest fix here might be to remove the SLF4j and log4j dependencies from your pom entirely (since they are being pulled already by OpenMRS) and a

Re: [HAPI-devel] Need help using HAPI.

2014-05-20 Thread James Agnew
Hi Sara, The issue likely lies in the following part of the dependency tree you posted: [INFO] +- org.openmrs.api:openmrs-api:jar:1.8.0:provided (snip) [INFO] | +- ca.uhn.hapi:hapi:jar:0.5:provided What this means is that the OpenMRS library has a dependency on a very old version of HAP

Re: [HAPI-devel] XPN.1s and XAD.1s are missing when parsing XML

2014-05-07 Thread James Agnew
HI Oliver, I'm fairly sure XPN.1 is a composite type, so that message looks invalid to me. I believe specifically that it should have a child element called or something similar. I'm on my phone at the moment so I can't check, but if you create a message instance in code with XPN populated and e

Re: [HAPI-devel] Parse only Segment MSH

2014-05-07 Thread James Agnew
Hi Rafael, If you just want the value of one field in the message header, probably the best way to do so would be using the PreParser: http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/preparser/PreParser.html One other thing to note- Parser objects are very heavyweight to create, so you wo

Re: [HAPI-devel] customizing datatype

2014-03-18 Thread James Agnew
Hi Letha, This definitely just looks like you're running up against invalid data in a field (which is pretty common in the real world). I believe you should be able to solve this by disabling validation, ie.e using NoValidationBuilder instead of DefaultValidationBuilder. Cheers, James On Tue,

Re: [HAPI-devel] HAPI TestPanel rejects message

2014-03-05 Thread James Agnew
Sorry, it occurs to me that I mentioned the new support for not sending an acknowledgement but didn't actually mention how to do it. If you want to try this out, have a look at HapiContext#getServerConfiguration() Cheers, James On Wed, Mar 5, 2014 at 10:06 AM, James Agnew wrote: >

Re: [HAPI-devel] HAPI TestPanel rejects message

2014-03-05 Thread James Agnew
Hi Tom, Your first question is well timed. The new 2.2 release just introduced the ability for you to configure servers to not send any ACK/NAK message in response when an application exception is detected in the processing code. This wasn't designed with your exact use case in mind, but I believe

[HAPI-devel] Announcements: HAPI 2.2 is out! (plus playing with FHIR)

2014-03-05 Thread James Agnew
Hello everyone, ** New release ** I'm happy to announce that HAPI 2.2 has been uploaded to Sourceforge and sync'ed to the Maven global repos. This release includes new releases of the core library, structures, and the hl7-over-http lib. There are plenty of bugfixes and improvements in the new ve

Re: [HAPI-devel] DT and DTM datatypes missing from javadoc?

2014-02-10 Thread James Agnew
HI Pablo, It's a bit weird, but the class definitions for those two types (and a small number of other datatypes) are found in the core library instead of the structure libraries. This means the JavaDocs will be found here: http://hl7api.sourceforge.net/base/apidocs/index.html If you're curious,

Re: [HAPI-devel] help required!

2014-02-04 Thread James Agnew
Hi Venkatesh, Your message string is missing segment delimiters (\r) at the end of each line. Change "[...]2.3.1" to "[...]2.3.1\r" and so on for each line and that code should work. Cheers, James On Tue, Feb 4, 2014 at 8:46 PM, Venkatesh Sundaramoorthy wrote: > Hi, > > > > I am new to HL7, I

Re: [HAPI-devel] HL7 Over HTTP: HTTP Response Codes

2014-02-03 Thread James Agnew
Hi Giacomo, Unfortunately this is a case of the code being behind the specification. At the previous HL7 working group meeting the ITS (implementable technology specification) group approved two changes to the spec: * HTTP 200 response code for all valid HL7 message responses (the rationale being

Re: [HAPI-devel] Full structure of a hl7 message with type

2014-01-29 Thread James Agnew
Hi Malith, Do you mean that you want programmatic access to the message structures themselves? (Ie. not the contents of an actual message instance, but the names of all the segments, fields, components, etc. within a message?) If that's the case, the most comprehensive authority for that informat

Re: [HAPI-devel] UTF-8 support, how to define and test?

2014-01-14 Thread James Agnew
Hi Tom, HAPI uses Java's underlying support for UTF-8 (and any other charsets) and I've never heard any reports that it was missing any support for specific subsets of that encoding. Is there any way that you could package your unit test up into something that could be shared? Cheers, James

Re: [HAPI-devel] My HAPI server stops accepting connections

2014-01-13 Thread James Agnew
Hi Tom, Is your client application holding onto the same connection? That error suggests that the client at least has a connection (since you'd get an IOException if it was trying but failing to connect to the server), which suggests that it's trying to use a connection it already has but failing

Re: [HAPI-devel] Decode ZPD-3.3 UUencode

2014-01-13 Thread James Agnew
Hi GGK, I've never seen anyone use UUEncoding inside an HL7 message (Base64 is the way I've generally seen people solve this problem) but it should be possible. Your problem is definitely that the first line of a UUEncoded string needs to be in the form begin You have all of that in your strin

Re: [HAPI-devel] HAPI 2.2 beta-1 released

2013-12-03 Thread James Agnew
gt; like to get further information on what is planned. > > Many thanks > Ian > > >>> James Agnew 02/12/13 22:52 >>> > Hi Everyone. > > Just a quick note that a new beta of HAPI (Core library, HL7 over HTTP, > and Structures) has been uploaded to Sourcefo

[HAPI-devel] HAPI 2.2 beta-1 released

2013-12-02 Thread James Agnew
tml>. There are also a number of upgrades to the base API. We are aiming to release this soon! Please help us out by testing and reporting any issues. Download it here or use version "2.2-beta1" in Maven. Che

Re: [HAPI-devel] Easiest way to run HAPI ReceivingApplication as standalone app?

2013-11-20 Thread James Agnew
Hi Tom, For what it's worth, we have approached this very problem in the past using the "Java Service Wrapper" library: http://wrapper.tanukisoftware.com/doc/english/download.jsp . This is not trivial by any means, but it's not terrible either and gives a nice way to have your standalone app insta

Re: [HAPI-devel] HAPI TestPanel rejects message

2013-10-30 Thread James Agnew
Hi John, My apologies on the slow response. The test panel doesn't have a source bundle available, but the source is available as a subproject in our main source tree here: https://sourceforge.net/p/hl7api/code/HEAD/tree/trunk/hapi-mvn/hapi-testpanel That said, I am betting this issue is actuall

Re: [HAPI-devel] clojure hapi class not found

2013-08-27 Thread James Agnew
Hi Daniel, I've never user lein and I'm far from a Clojure expert, so I'm mostly guessing here.. But you probably need the "hapi-structures-v24" dependency added to your project. You may possibly also need to add slf4j-api? If you do get this working and want to contribute a sample (even somethin

Re: [HAPI-devel] Hapi connection with existing server

2013-08-27 Thread James Agnew
to > integrate requires from us address and port to which he will connect and > listen to messages as well as send messages and I have no idea how exactly > this should work on the same port. > > > 2013/8/27 James Agnew > >> Are you saying that you want to have your appli

Re: [HAPI-devel] Hapi connection with existing server

2013-08-27 Thread James Agnew
l. +48 71 338 65 64; Kom. +48 668 891 540 > Fax +48 71 338 65 55b.buc...@phxtecno.comphxtecno.com > > On 08/27/2013 02:48 PM, James Agnew wrote: > > Hi Bartłomiej, > > It sounds like you're probably looking to create a client as opposed to > a server. You'll see an

Re: [HAPI-devel] Hapi connection with existing server

2013-08-27 Thread James Agnew
Hi Bartłomiej, It sounds like you're probably looking to create a client as opposed to a server. You'll see an example of how to do that starting on line 145 here: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html Cheers, James On Tue, Aug 27, 2013 at 6:37 AM,

Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-05 Thread James Agnew
me to another question. > > In HAPI 2.1 I don't see a java 1.4 implementation. We use JCAPS and HAPI > together these days, but our JCAPS version expects code at 1.4, and can run > some stuff at 1.5 > > Thanks > Ian > > >>> James Agnew 03/07/13 21:47 >&

Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-03 Thread James Agnew
Oops, looks like Christian beat me to it. :) James On Wed, Jul 3, 2013 at 7:41 AM, James Agnew wrote: > Hi Ian, > > The cleaner alternative, which was just added in HAPI 2.1 oddly enough is > as follows: > > if (!hl7Message.getINSURANCE(0).getIN1().isEmpty(

Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-03 Thread James Agnew
Hi Ian, The cleaner alternative, which was just added in HAPI 2.1 oddly enough is as follows: if (!hl7Message.getINSURANCE(0).getIN1().isEmpty()) { .. blah .. } There is also the somewhat uglier alternative which would work in older releases: if (!hl7Message.getINSURANCE(0).getAll("IN

Re: [HAPI-devel] TestPanel on mac won't open after last update of Java

2013-06-20 Thread James Agnew
Hi Paolo, Mac/OSX has been such a painful moving target for the TestPanel! I'm a Mac user myself and I have to say until we released TP I had no idea how much more pain Mac app developers went through compared to their Linux/Windows counterparts. :) Are you using the WebStart/JNLP version or the

Re: [HAPI-devel] Generic class for ADT message

2013-06-19 Thread James Agnew
es as > well? > I tried generating just MSH and PID segment using ADT_A01 for above listed > different triggers and that atleast worked well. > > > Regards, > Sagar Shah > > James Agnew wrote: > > > > Hi All, > > > > This does indeed appear to be a

Re: [HAPI-devel] Generic class for ADT message

2013-06-19 Thread James Agnew
Hi All, This does indeed appear to be a bug in the generator for the superstructures unfortunately. Sagar, the good news is that your code *should* work, you're doing the right thing. But the bad news is that it isn't working obviously. :) Superstructures are a brand new feature, and they haven't

Re: [HAPI-devel] Message profile, DefaultRuleBuilder and ValidationExceptions by field repeation

2013-06-14 Thread James Agnew
Hi Brennan, Any chance you could extract the issue into a code snippet and/or simple demo project that shows the issue? Cheers, James On Thu, Jun 13, 2013 at 10:42 AM, Brennan O'Banion < brennan.oban...@gmail.com> wrote: > I'm attempting to validate an HL7 message against a message profile. >

Re: [HAPI-devel] Hapi 2.1 version's MSH-9 filed concerns

2013-06-14 Thread James Agnew
the trigger event A01 >> can be associated with both ADT and ACK event type.[2,3] >> >> [1]http://www.hl7.org/special/committees/vocab/v26_appendix_a.pdf >> >> [1]0003 A01 ADT/ACK - Admit/visit notification >> [2]0003 R22 OUL - Unsolicited Specimen Ori

Re: [HAPI-devel] Hapi 2.1 version's MSH-9 filed concerns

2013-06-12 Thread James Agnew
Hi Ratha, While the HL7 standard doesn't seem to specifically mention whether or not the response for an OUL^R22 should have the R22 trigger event in it's ACK, the general pattern in processing HL7 v2 is that the trigger event will always be the same as the message being acknowledged. A quick scan

Re: [HAPI-devel] Hapi 2.1 version's MSH-9 filed concerns

2013-06-12 Thread James Agnew
Hi Ratha, The ACK message in your post appears to be valid, which part are you not happy with? ACK^A01^ACK means: 1 (ACK)- ACK is the message type 2 (A01)- Is the trigger event being acknowledged 3 (ACK)- Is the message structure for the ack message Cheers, James On Wed, Jun 12, 2013 at 6:01 A

Re: [HAPI-devel] Terser method to get number of reps yet?

2013-06-05 Thread James Agnew
Hi Charles, Unfortunately not, at present there is no good way that I am aware of for getting a number of repetitions using Terser. There was an attempt at one point to create a similar construct to Terser which combined message paths with a sort of "push model" similar to SAX. It was here: http:/

Re: [HAPI-devel] Parser performance

2013-06-04 Thread James Agnew
Hi John, Try refactoring so that the PipeParser is reused between calls. The first time a PipeParser encounters a given message type, it spends a bunch of time (although certainly not 2.5 seconds on any of our systems here) building up an internal in-memory representation of the message structure

Re: [HAPI-devel] NoValidation, validates the HL7 message?

2013-05-30 Thread James Agnew
Hi Vijayaratha, The snippet you posted doesn't appear to be valid, possibly you are instantiating a new parser and setting its context and the "new" keyword is missing? Either way, you will find an example of what you are trying to accomplish here: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/

Re: [HAPI-devel] Parsing not putting in line breaks

2013-05-14 Thread James Agnew
Hi Ryan, Is there any chance it's just an artifact of the way it's bring printed to the console? I'm sure you already know this, but HL7 uses unusual line endings (\r) as the segment delimiter and sometimes this can appear strangely when printed. It might be worth printing the encoded message stri

Re: [HAPI-devel] Dealing with messages that have failed to escape delimiters

2013-05-03 Thread James Agnew
n { > return (ZAL) get ("ZAL"); > } > > public ZAP getZAP() throws HL7Exception { > return (ZAP) get ("ZAP"); > } > > public ZBD getZBD() throws HL7Exception { > return (ZBD) get ("ZBD"); > } > public ZC

Re: [HAPI-devel] Transform a K22 response into HL7v2 XML

2013-05-02 Thread James Agnew
Hi Ryan, Converting a message from ER7 (pipes) to XML is quite easy: Message msg = ctx.getPipeParser().parse(stringEr7Message); String stringXmlMessage = ctx.getXmlParser().encode(msg); Cheers, James On Thu, May 2, 2013 at 1:20 PM, Ternier, Ryan wrote: > I’m translating a health request from

Re: [HAPI-devel] Dealing with messages that have failed to escape delimiters

2013-05-02 Thread James Agnew
Hi Ian, This is an issue that we have faced many times over the years, especially over the last 2 as we moved a bunch of legacy interfaces off of an eGate Interface Engine. Ugh. What you are describing looks suspiciously like a bug we fixed in HAPI 2.1. What version of the library are you using?

Re: [HAPI-devel] System property "ca.uhn.hl7v2.llp.charset"

2013-04-30 Thread James Agnew
Hi Derek, The character encodings are only ever applied when the message is transmitted over a network socket using a LowerLayerProtocol impementation (either MLLP or HL7-over-HTTP). At all other times, HAPI uses Java Strings to represent any textual data, which means that everything is in UTF-16.

Re: [HAPI-devel] Can we use serversocket to listen incoming messages in Hapi?

2013-04-30 Thread James Agnew
HI Ratha, Do you just mean that you want to open up a normal TCP/MLLP port to receive messages and send back responses? If so, there is an example of how to do this here: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html Cheers, James On Tue, Apr 30, 2013 at 2

  1   2   3   >