You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(4) |
May
(5) |
Jun
(6) |
Jul
(3) |
Aug
(13) |
Sep
(28) |
Oct
(33) |
Nov
(8) |
Dec
(1) |
2003 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(25) |
May
(21) |
Jun
(13) |
Jul
(12) |
Aug
(14) |
Sep
(6) |
Oct
(6) |
Nov
(16) |
Dec
(6) |
2004 |
Jan
(5) |
Feb
(7) |
Mar
(13) |
Apr
(17) |
May
(24) |
Jun
(14) |
Jul
(14) |
Aug
(8) |
Sep
(3) |
Oct
(8) |
Nov
(14) |
Dec
(26) |
2005 |
Jan
(18) |
Feb
(12) |
Mar
(29) |
Apr
(9) |
May
(4) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(12) |
Oct
|
Nov
(12) |
Dec
|
2006 |
Jan
(46) |
Feb
(18) |
Mar
(11) |
Apr
(13) |
May
(12) |
Jun
(27) |
Jul
(34) |
Aug
(45) |
Sep
(27) |
Oct
(13) |
Nov
(26) |
Dec
(22) |
2007 |
Jan
(21) |
Feb
(29) |
Mar
(32) |
Apr
(6) |
May
(11) |
Jun
(13) |
Jul
(14) |
Aug
(11) |
Sep
(15) |
Oct
(7) |
Nov
(30) |
Dec
(16) |
2008 |
Jan
(11) |
Feb
(14) |
Mar
(5) |
Apr
(18) |
May
(12) |
Jun
(11) |
Jul
(5) |
Aug
(12) |
Sep
(3) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
2009 |
Jan
(18) |
Feb
(6) |
Mar
(9) |
Apr
(10) |
May
(29) |
Jun
(16) |
Jul
(44) |
Aug
(49) |
Sep
(14) |
Oct
(21) |
Nov
(11) |
Dec
(22) |
2010 |
Jan
(12) |
Feb
(13) |
Mar
(5) |
Apr
(6) |
May
(15) |
Jun
(15) |
Jul
(14) |
Aug
(20) |
Sep
(17) |
Oct
(36) |
Nov
(19) |
Dec
(7) |
2011 |
Jan
(8) |
Feb
(14) |
Mar
(21) |
Apr
(12) |
May
(6) |
Jun
(12) |
Jul
(17) |
Aug
(6) |
Sep
(13) |
Oct
(15) |
Nov
(26) |
Dec
(9) |
2012 |
Jan
(25) |
Feb
(13) |
Mar
(31) |
Apr
(10) |
May
(16) |
Jun
(21) |
Jul
(61) |
Aug
(38) |
Sep
(16) |
Oct
(13) |
Nov
(37) |
Dec
(26) |
2013 |
Jan
(20) |
Feb
(26) |
Mar
(34) |
Apr
(32) |
May
(27) |
Jun
(56) |
Jul
(16) |
Aug
(38) |
Sep
(35) |
Oct
(17) |
Nov
(11) |
Dec
(7) |
2014 |
Jan
(36) |
Feb
(13) |
Mar
(25) |
Apr
|
May
(27) |
Jun
(33) |
Jul
(34) |
Aug
|
Sep
(4) |
Oct
(11) |
Nov
(42) |
Dec
(2) |
2015 |
Jan
(5) |
Feb
(6) |
Mar
(11) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(5) |
Sep
(5) |
Oct
(5) |
Nov
(8) |
Dec
(19) |
2016 |
Jan
(8) |
Feb
(12) |
Mar
(6) |
Apr
(5) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(9) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
2017 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
(14) |
Aug
(10) |
Sep
(6) |
Oct
(2) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(9) |
Mar
(2) |
Apr
(3) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(8) |
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2019 |
Jan
(10) |
Feb
(2) |
Mar
(6) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2020 |
Jan
(9) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(9) |
Oct
(1) |
Nov
(11) |
Dec
|
2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(2) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
From: Clayton D. <cl...@am...> - 2014-11-06 02:04:16
|
Good Afternoon, We're a Healthcare IT SaaS startup using HAPI indirectly through Mirth Connect. As a service provider, we will need to process messages from many different HL7 versions. In brief, our idea is to: - Feed messages of any version into a single parser (currently, based on 2.7.1), - Get a message in a uniform structure (avoiding, for example, differences arising from datatype replacements), and - Build one set of (internal) XML interpreters for that output. Can someone clarify details like: - How much of this can be achieved using HAPI "out of the box", - Is it enough that I can generate an XSD schema or is this the wrong format, and - What changes would be required inside HAPI ... and I suppose "are there any other questions I should have asked"? Thanks, Clayton Daley Ambassador Software Works |
From: Ian V. <Ian...@he...> - 2014-11-05 03:16:34
|
There are quite a few format escape sequences in HL7. You may find it valuable to get your hands on a copy of the standard, and refer to chapter 2 (in the 2.3.1 standard chapter 2 section 10). Here you will find a detailed list of the possible escape sequences, and what they indicate. Then you will face the challenge of how to render them in the environment you are dealing with, since there are highlight on/off, line break \.br\, column and tab setting and more. Hope this helps Ian From: Chandan Datta [mailto:cha...@au...] Sent: Wednesday, 5 November 2014 12:45 PM To: James Agnew Cc: HAPI Devel List Subject: Re: [HAPI-devel] Custom XML output A followup question: For the HL7 OBX-5 ST field, I have an example segment OBX||FT|Notes^Notes^""|""|Dr Tan\.br\MB BS FRACS PhD\.br\Boul Hospital \T\ Specialist Centre\.br\Phone (04)22569-7555\.br\Fax (04)22577-3451\.br\Client \T\ Claim Details\.br\Claim Number\.br\1SG948213\.br\Full Name:\.br\XX, Rob (Mr)\.br\Address:\.br\XX XX Street\.br\Tait\.br HUTT 5011\.br\Date of Birth:\.br\15.03.1967\.br\Telephone:\.br\(h) 330938 2684\.br\(m) 986 632 4590\.br\||||||F This is output as below. Is there a proper way to render the escape sequences for the PDF <REF_I12.OBSERVATION> <OBX> <OBX.2>FT</OBX.2> <OBX.3> <CE.1>Notes</CE.1> <CE.2>Notes</CE.2> <CE.3>""</CE.3> </OBX.3> <OBX.4>""</OBX.4> <OBX.5>Dr Tan<escape V=".br"/>MB BS FRACS PhD<escape V=".br"/>Boul Hospital & Specialist Centre<escape V=".br"/>Phone (04)22569-7555<escape V=".br"/>Fax (04)22577-3451<escape V=".br"/>Client & Claim Details<escape V=".br"/>Claim Number<escape V=".br"/>1SG948213<escape V=".br"/>Full Name:<escape V=".br"/>XX, Rob (Mr)<escape V=".br"/>Address:<escape V=".br"/>XX XX Street<escape V=".br"/>Tait<escape V=".br HUTT 5011"/>.brDate of Birth:<escape V=".br"/>15.03.1967<escape V=".br"/>Telephone:<escape V=".br"/>(h) 330938 2684<escape V=".br"/>(m) 986 632 4590<escape V=".br"/> </OBX.5> <OBX.11>F</OBX.11> </OBX> </REF_I12.OBSERVATION> On Wed, Nov 5, 2014 at 12:43 PM, Chandan Datta <cha...@au...<mailto:cha...@au...>> wrote: Thanks James Yes, this is related to my earlier email for generating human readable PDFs. I would like to use a template engine for that, but for a start couple of XSL-FOs that can generate PDFs would be great. I can then use something like Altova XmlSpy to play with the stylesheets to determine which fields I can omit and how the PDF visual layout looks like. If you have any transform examples or something I can play with, please let me know. On Wed, Nov 5, 2014 at 4:20 AM, James Agnew <jam...@gm...<mailto:jam...@gm...>> wrote: 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 became an unmaintainable mess. If I had to try and solve that particular problem today, I'd probably use Thymeleaf<http://www.thymeleaf.org/> templates and define a custom tag that allowed me to insert terser expressions into the HTML templates. But that may well be overkill if you just have a single transform you wanted to write.. Cheers, James On Tue, Nov 4, 2014 at 5:19 AM, Chandan Datta <cha...@au...<mailto:cha...@au...>> wrote: Thanks, I thought there might be some out-of-the-box human readability option. Since there are fields defined in the model definition. For example: http://hl7api.sourceforge.net/v25/apidocs/ca/uhn/hl7v2/model/v25/segment/PRD.html On Tue, Nov 4, 2014 at 10:11 PM, Jens Villadsen <jen...@gm...<mailto:jen...@gm...>> wrote: Sounds like a job for a plain XSL transformation On 4 November 2014 05:30, Chandan Datta <cha...@au...<mailto:cha...@au...>> wrote: Thanks Christian. Yep, I think so. On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr <chr...@gm...<mailto:chr...@gm...>> wrote: The XML that HAPI parses or renders is not our own invention but specified over HL7 as well as the pipe-encoded form. So I fear that if you want some custom XML representation of an HL7 message you need to do this yourself... best regards Christian 2014-10-30<tel:2014-10-30> 1:14 GMT+01:00 Chandan Datta <cha...@au...<mailto:cha...@au...>>: Hi HAPI devs, Is it possible to generate custom XML for a HL7 message using HAPI. For example, Input: HL7 v2.4 header segment MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 <?xml version="1.0" encoding="UTF-8"?> <REF_I12 xmlns="urn:hl7-org:v2xml"> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <HD.1>SPM</HD.1> </MSH.3> <MSH.4> <HD.1>boulcott</HD.1> </MSH.4> <MSH.6> <HD.1>acceartp</HD.1> </MSH.6> <MSH.7> <TS.1>20110922000000</TS.1> </MSH.7> <MSH.8>PKI</MSH.8> <MSH.9> <CM_MSG.1>REF</CM_MSG.1> <CM_MSG.2>I12</CM_MSG.2> </MSH.9> <MSH.10>20110922091157</MSH.10> <MSH.11> <PT.1>P</PT.1> </MSH.11> <MSH.12>2.3</MSH.12> </MSH> </REF_I12> Instead I would like <?xml version="1.0" encoding="UTF-8"?> <REFI12> <MSH> <FieldSeparator>|</FieldSeparator> <EncodingCharacters>^~\&</EncodingCharacters> <SendingApplication/> <SendingFacility/> <ReceivingFacility/> <DateTimeOfMessage/> <Security>PKI</Security> <MessageType/> <MessageControlID>20110922091157</MessageControlID> <ProcessingID/> <VersionID>2.3 ZRD</VersionID> <SequenceNumber>0</SequenceNumber> <AcceptAcknowledgementType/> <CharacterSet/> <PrincipalLanguageOfMessage/> </MSH> </REFI12> -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand ------------------------------------------------------------------------------ _______________________________________________ Hl7api-devel mailing list Hl7...@li...<mailto:Hl7...@li...> https://lists.sourceforge.net/lists/listinfo/hl7api-devel -- Regards, Chandan ------------------------------------------------------------------------------ _______________________________________________ Hl7api-devel mailing list Hl7...@li...<mailto:Hl7...@li...> https://lists.sourceforge.net/lists/listinfo/hl7api-devel -- Med venlig hilsen / Kind regards Jens Kristian Villadsen cand.polyt Stålhøjen 24 8240 Risskov Denmark Mobile +4523373806<tel:%2B4523373806> jen...@gm...<mailto:jen...@gm...> jkiddo.dyndns.org<http://jkiddo.dyndns.org> -- Regards, Chandan ------------------------------------------------------------------------------ _______________________________________________ Hl7api-devel mailing list Hl7...@li...<mailto:Hl7...@li...> https://lists.sourceforge.net/lists/listinfo/hl7api-devel -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand http://realworldrobotics.com<http://realworldrobotics.com/> Mobile : +64 20 4019 3210 SkypeIn : chandan.datta ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** |
From: Chandan D. <cha...@au...> - 2014-11-05 02:45:29
|
A followup question: For the HL7 OBX-5 ST field, I have an example segment OBX||FT|Notes^Notes^""|""|Dr Tan\.br\MB BS FRACS PhD\.br\Boul Hospital \T\ Specialist Centre\.br\Phone (04)22569-7555\.br\Fax (04)22577-3451\.br\Client \T\ Claim Details\.br\Claim Number\.br\1SG948213\.br\Full Name:\.br\XX, Rob (Mr)\.br\Address:\.br\XX XX Street\.br\Tait\.br HUTT 5011\.br\Date of Birth:\.br\15.03.1967\.br\Telephone:\.br\(h) 330938 2684\.br\(m) 986 632 4590\.br\||||||F This is output as below. Is there a proper way to render the escape sequences for the PDF <REF_I12.OBSERVATION> <OBX> <OBX.2>FT</OBX.2> <OBX.3> <CE.1>Notes</CE.1> <CE.2>Notes</CE.2> <CE.3>""</CE.3> </OBX.3> <OBX.4>""</OBX.4> <OBX.5>Dr Tan <escape V=".br"/>MB BS FRACS PhD<escape V=".br"/>Boul Hospital & Specialist Centre<escape V=".br"/>Phone (04)22569-7555<escape V=".br"/>Fax (04)22577-3451<escape V=".br"/>Client & Claim Details<escape V=".br"/>Claim Number<escape V=".br"/>1SG948213<escape V=".br"/>Full Name:<escape V=".br"/>XX, Rob (Mr)<escape V=".br"/>Address:<escape V=".br"/>XX XX Street<escape V= ".br"/>Tait<escape V=".br HUTT 5011"/>.brDate of Birth:<escape V=".br"/> 15.03.1967<escape V=".br"/>Telephone:<escape V=".br"/>(h) 330938 2684<escape V=".br"/>(m) 986 632 4590<escape V=".br"/> </OBX.5> <OBX.11>F</OBX.11> </OBX> </REF_I12.OBSERVATION> On Wed, Nov 5, 2014 at 12:43 PM, Chandan Datta <cha...@au... > wrote: > Thanks James > > Yes, this is related to my earlier email for generating human readable > PDFs. > > I would like to use a template engine for that, but for a start couple of > XSL-FOs that can generate PDFs would be great. I can then use something > like Altova XmlSpy to play with the stylesheets to determine which fields I > can omit and how the PDF visual layout looks like. If you have any > transform examples or something I can play with, please let me know. > > > On Wed, Nov 5, 2014 at 4:20 AM, James Agnew <jam...@gm...> wrote: > >> 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 >> became an unmaintainable mess. >> >> If I had to try and solve that particular problem today, I'd probably use >> Thymeleaf <http://www.thymeleaf.org/> templates and define a custom tag >> that allowed me to insert terser expressions into the HTML templates. But >> that may well be overkill if you just have a single transform you wanted to >> write.. >> >> Cheers, >> James >> >> On Tue, Nov 4, 2014 at 5:19 AM, Chandan Datta < >> cha...@au...> wrote: >> >>> Thanks, >>> I thought there might be some out-of-the-box human readability option. >>> Since there are fields defined in the model definition. For example: >>> http://hl7api.sourceforge.net/v25/apidocs/ca/uhn/hl7v2/model/v25/segment/PRD.html >>> >>> On Tue, Nov 4, 2014 at 10:11 PM, Jens Villadsen < >>> jen...@gm...> wrote: >>> >>>> Sounds like a job for a plain XSL transformation >>>> >>>> On 4 November 2014 05:30, Chandan Datta <cha...@au...> >>>> wrote: >>>> >>>>> Thanks Christian. Yep, I think so. >>>>> >>>>> On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr < >>>>> chr...@gm...> wrote: >>>>> >>>>>> The XML that HAPI parses or renders is not our own invention but >>>>>> specified over HL7 as well as the pipe-encoded form. >>>>>> So I fear that if you want some custom XML representation of an HL7 >>>>>> message you need to do this yourself... >>>>>> >>>>>> best regards >>>>>> Christian >>>>>> >>>>>> 2014-10-30 1:14 GMT+01:00 Chandan Datta <cha...@au... >>>>>> >: >>>>>> >>>>>>> Hi HAPI devs, >>>>>>> >>>>>>> Is it possible to generate custom XML for a HL7 message using HAPI. >>>>>>> For example, >>>>>>> >>>>>>> Input: HL7 v2.4 header segment >>>>>>> >>>>>>> >>>>>>> MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 >>>>>>> >>>>>>> >>>>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>>>> >>>>>>> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> >>>>>>> >>>>>>> <MSH> >>>>>>> >>>>>>> <MSH.1>*|*</MSH.1> >>>>>>> >>>>>>> <MSH.2>*^~\*&</MSH.2> >>>>>>> >>>>>>> <MSH.3> >>>>>>> >>>>>>> <HD.1>*SPM*</HD.1> >>>>>>> >>>>>>> </MSH.3> >>>>>>> >>>>>>> <MSH.4> >>>>>>> >>>>>>> <HD.1>*boulcott*</HD.1> >>>>>>> >>>>>>> </MSH.4> >>>>>>> >>>>>>> <MSH.6> >>>>>>> >>>>>>> <HD.1>*acceartp*</HD.1> >>>>>>> >>>>>>> </MSH.6> >>>>>>> >>>>>>> <MSH.7> >>>>>>> >>>>>>> <TS.1>*20110922000000*</TS.1> >>>>>>> >>>>>>> </MSH.7> >>>>>>> >>>>>>> <MSH.8>*PKI*</MSH.8> >>>>>>> >>>>>>> <MSH.9> >>>>>>> >>>>>>> <CM_MSG.1>*REF*</CM_MSG.1> >>>>>>> >>>>>>> <CM_MSG.2>*I12*</CM_MSG.2> >>>>>>> >>>>>>> </MSH.9> >>>>>>> >>>>>>> <MSH.10>*20110922091157*</MSH.10> >>>>>>> >>>>>>> <MSH.11> >>>>>>> >>>>>>> <PT.1>*P*</PT.1> >>>>>>> >>>>>>> </MSH.11> >>>>>>> >>>>>>> <MSH.12>*2.3*</MSH.12> >>>>>>> >>>>>>> </MSH> >>>>>>> >>>>>>> </REF_I12> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Instead I would like >>>>>>> >>>>>>> >>>>>>> >>>>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>>>> >>>>>>> <REFI12> >>>>>>> >>>>>>> <MSH> >>>>>>> >>>>>>> <FieldSeparator>*|*</FieldSeparator> >>>>>>> >>>>>>> <EncodingCharacters>*^~\*&</EncodingCharacters> >>>>>>> >>>>>>> <SendingApplication/> >>>>>>> >>>>>>> <SendingFacility/> >>>>>>> >>>>>>> <ReceivingFacility/> >>>>>>> >>>>>>> <DateTimeOfMessage/> >>>>>>> >>>>>>> <Security>*PKI*</Security> >>>>>>> >>>>>>> <MessageType/> >>>>>>> >>>>>>> <MessageControlID>*20110922091157*</MessageControlID> >>>>>>> >>>>>>> <ProcessingID/> >>>>>>> >>>>>>> <VersionID>*2.3 ZRD*</VersionID> >>>>>>> >>>>>>> <SequenceNumber>*0*</SequenceNumber> >>>>>>> >>>>>>> <AcceptAcknowledgementType/> >>>>>>> >>>>>>> <CharacterSet/> >>>>>>> >>>>>>> <PrincipalLanguageOfMessage/> >>>>>>> >>>>>>> </MSH> >>>>>>> >>>>>>> </REFI12> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Regards, >>>>>>> Chandan >>>>>>> Doctoral student,Robotics Research Group >>>>>>> University of Auckland, New Zealand >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Hl7api-devel mailing list >>>>>>> Hl7...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> Chandan >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Hl7api-devel mailing list >>>>> Hl7...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> Med venlig hilsen / Kind regards >>>> >>>> *Jens Kristian Villadsen* >>>> cand.polyt >>>> >>>> Stålhøjen 24 >>>> 8240 Risskov >>>> Denmark >>>> >>>> Mobile +4523373806 >>>> jen...@gm... >>>> jkiddo.dyndns.org >>>> >>> >>> >>> >>> -- >>> Regards, >>> Chandan >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7...@li... >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> >>> >> > > > -- > Regards, > Chandan > Doctoral student,Robotics Research Group > University of Auckland, New Zealand > -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand http://realworldrobotics.com Mobile : +64 20 4019 3210 SkypeIn : chandan.datta |
From: Chandan D. <cha...@au...> - 2014-11-04 23:43:35
|
Thanks James Yes, this is related to my earlier email for generating human readable PDFs. I would like to use a template engine for that, but for a start couple of XSL-FOs that can generate PDFs would be great. I can then use something like Altova XmlSpy to play with the stylesheets to determine which fields I can omit and how the PDF visual layout looks like. If you have any transform examples or something I can play with, please let me know. On Wed, Nov 5, 2014 at 4:20 AM, James Agnew <jam...@gm...> wrote: > 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 > became an unmaintainable mess. > > If I had to try and solve that particular problem today, I'd probably use > Thymeleaf <http://www.thymeleaf.org/> templates and define a custom tag > that allowed me to insert terser expressions into the HTML templates. But > that may well be overkill if you just have a single transform you wanted to > write.. > > Cheers, > James > > On Tue, Nov 4, 2014 at 5:19 AM, Chandan Datta < > cha...@au...> wrote: > >> Thanks, >> I thought there might be some out-of-the-box human readability option. >> Since there are fields defined in the model definition. For example: >> http://hl7api.sourceforge.net/v25/apidocs/ca/uhn/hl7v2/model/v25/segment/PRD.html >> >> On Tue, Nov 4, 2014 at 10:11 PM, Jens Villadsen < >> jen...@gm...> wrote: >> >>> Sounds like a job for a plain XSL transformation >>> >>> On 4 November 2014 05:30, Chandan Datta <cha...@au...> >>> wrote: >>> >>>> Thanks Christian. Yep, I think so. >>>> >>>> On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr < >>>> chr...@gm...> wrote: >>>> >>>>> The XML that HAPI parses or renders is not our own invention but >>>>> specified over HL7 as well as the pipe-encoded form. >>>>> So I fear that if you want some custom XML representation of an HL7 >>>>> message you need to do this yourself... >>>>> >>>>> best regards >>>>> Christian >>>>> >>>>> 2014-10-30 1:14 GMT+01:00 Chandan Datta <cha...@au...> >>>>> : >>>>> >>>>>> Hi HAPI devs, >>>>>> >>>>>> Is it possible to generate custom XML for a HL7 message using HAPI. >>>>>> For example, >>>>>> >>>>>> Input: HL7 v2.4 header segment >>>>>> >>>>>> >>>>>> MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 >>>>>> >>>>>> >>>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>>> >>>>>> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> >>>>>> >>>>>> <MSH> >>>>>> >>>>>> <MSH.1>*|*</MSH.1> >>>>>> >>>>>> <MSH.2>*^~\*&</MSH.2> >>>>>> >>>>>> <MSH.3> >>>>>> >>>>>> <HD.1>*SPM*</HD.1> >>>>>> >>>>>> </MSH.3> >>>>>> >>>>>> <MSH.4> >>>>>> >>>>>> <HD.1>*boulcott*</HD.1> >>>>>> >>>>>> </MSH.4> >>>>>> >>>>>> <MSH.6> >>>>>> >>>>>> <HD.1>*acceartp*</HD.1> >>>>>> >>>>>> </MSH.6> >>>>>> >>>>>> <MSH.7> >>>>>> >>>>>> <TS.1>*20110922000000*</TS.1> >>>>>> >>>>>> </MSH.7> >>>>>> >>>>>> <MSH.8>*PKI*</MSH.8> >>>>>> >>>>>> <MSH.9> >>>>>> >>>>>> <CM_MSG.1>*REF*</CM_MSG.1> >>>>>> >>>>>> <CM_MSG.2>*I12*</CM_MSG.2> >>>>>> >>>>>> </MSH.9> >>>>>> >>>>>> <MSH.10>*20110922091157*</MSH.10> >>>>>> >>>>>> <MSH.11> >>>>>> >>>>>> <PT.1>*P*</PT.1> >>>>>> >>>>>> </MSH.11> >>>>>> >>>>>> <MSH.12>*2.3*</MSH.12> >>>>>> >>>>>> </MSH> >>>>>> >>>>>> </REF_I12> >>>>>> >>>>>> >>>>>> >>>>>> Instead I would like >>>>>> >>>>>> >>>>>> >>>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>>> >>>>>> <REFI12> >>>>>> >>>>>> <MSH> >>>>>> >>>>>> <FieldSeparator>*|*</FieldSeparator> >>>>>> >>>>>> <EncodingCharacters>*^~\*&</EncodingCharacters> >>>>>> >>>>>> <SendingApplication/> >>>>>> >>>>>> <SendingFacility/> >>>>>> >>>>>> <ReceivingFacility/> >>>>>> >>>>>> <DateTimeOfMessage/> >>>>>> >>>>>> <Security>*PKI*</Security> >>>>>> >>>>>> <MessageType/> >>>>>> >>>>>> <MessageControlID>*20110922091157*</MessageControlID> >>>>>> >>>>>> <ProcessingID/> >>>>>> >>>>>> <VersionID>*2.3 ZRD*</VersionID> >>>>>> >>>>>> <SequenceNumber>*0*</SequenceNumber> >>>>>> >>>>>> <AcceptAcknowledgementType/> >>>>>> >>>>>> <CharacterSet/> >>>>>> >>>>>> <PrincipalLanguageOfMessage/> >>>>>> >>>>>> </MSH> >>>>>> >>>>>> </REFI12> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Regards, >>>>>> Chandan >>>>>> Doctoral student,Robotics Research Group >>>>>> University of Auckland, New Zealand >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> >>>>>> _______________________________________________ >>>>>> Hl7api-devel mailing list >>>>>> Hl7...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>>> >>>>>> >>>>> >>>> >>>> >>>> -- >>>> Regards, >>>> Chandan >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Hl7api-devel mailing list >>>> Hl7...@li... >>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>> >>>> >>> >>> >>> -- >>> >>> Med venlig hilsen / Kind regards >>> >>> *Jens Kristian Villadsen* >>> cand.polyt >>> >>> Stålhøjen 24 >>> 8240 Risskov >>> Denmark >>> >>> Mobile +4523373806 >>> jen...@gm... >>> jkiddo.dyndns.org >>> >> >> >> >> -- >> Regards, >> Chandan >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand |
From: James A. <jam...@gm...> - 2014-11-04 15:20:59
|
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 became an unmaintainable mess. If I had to try and solve that particular problem today, I'd probably use Thymeleaf <http://www.thymeleaf.org/> templates and define a custom tag that allowed me to insert terser expressions into the HTML templates. But that may well be overkill if you just have a single transform you wanted to write.. Cheers, James On Tue, Nov 4, 2014 at 5:19 AM, Chandan Datta <cha...@au...> wrote: > Thanks, > I thought there might be some out-of-the-box human readability option. > Since there are fields defined in the model definition. For example: > http://hl7api.sourceforge.net/v25/apidocs/ca/uhn/hl7v2/model/v25/segment/PRD.html > > On Tue, Nov 4, 2014 at 10:11 PM, Jens Villadsen < > jen...@gm...> wrote: > >> Sounds like a job for a plain XSL transformation >> >> On 4 November 2014 05:30, Chandan Datta <cha...@au...> >> wrote: >> >>> Thanks Christian. Yep, I think so. >>> >>> On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr <chr...@gm... >>> > wrote: >>> >>>> The XML that HAPI parses or renders is not our own invention but >>>> specified over HL7 as well as the pipe-encoded form. >>>> So I fear that if you want some custom XML representation of an HL7 >>>> message you need to do this yourself... >>>> >>>> best regards >>>> Christian >>>> >>>> 2014-10-30 1:14 GMT+01:00 Chandan Datta <cha...@au...>: >>>> >>>>> Hi HAPI devs, >>>>> >>>>> Is it possible to generate custom XML for a HL7 message using HAPI. >>>>> For example, >>>>> >>>>> Input: HL7 v2.4 header segment >>>>> >>>>> >>>>> MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 >>>>> >>>>> >>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>> >>>>> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> >>>>> >>>>> <MSH> >>>>> >>>>> <MSH.1>*|*</MSH.1> >>>>> >>>>> <MSH.2>*^~\*&</MSH.2> >>>>> >>>>> <MSH.3> >>>>> >>>>> <HD.1>*SPM*</HD.1> >>>>> >>>>> </MSH.3> >>>>> >>>>> <MSH.4> >>>>> >>>>> <HD.1>*boulcott*</HD.1> >>>>> >>>>> </MSH.4> >>>>> >>>>> <MSH.6> >>>>> >>>>> <HD.1>*acceartp*</HD.1> >>>>> >>>>> </MSH.6> >>>>> >>>>> <MSH.7> >>>>> >>>>> <TS.1>*20110922000000*</TS.1> >>>>> >>>>> </MSH.7> >>>>> >>>>> <MSH.8>*PKI*</MSH.8> >>>>> >>>>> <MSH.9> >>>>> >>>>> <CM_MSG.1>*REF*</CM_MSG.1> >>>>> >>>>> <CM_MSG.2>*I12*</CM_MSG.2> >>>>> >>>>> </MSH.9> >>>>> >>>>> <MSH.10>*20110922091157*</MSH.10> >>>>> >>>>> <MSH.11> >>>>> >>>>> <PT.1>*P*</PT.1> >>>>> >>>>> </MSH.11> >>>>> >>>>> <MSH.12>*2.3*</MSH.12> >>>>> >>>>> </MSH> >>>>> >>>>> </REF_I12> >>>>> >>>>> >>>>> >>>>> Instead I would like >>>>> >>>>> >>>>> >>>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>>> >>>>> <REFI12> >>>>> >>>>> <MSH> >>>>> >>>>> <FieldSeparator>*|*</FieldSeparator> >>>>> >>>>> <EncodingCharacters>*^~\*&</EncodingCharacters> >>>>> >>>>> <SendingApplication/> >>>>> >>>>> <SendingFacility/> >>>>> >>>>> <ReceivingFacility/> >>>>> >>>>> <DateTimeOfMessage/> >>>>> >>>>> <Security>*PKI*</Security> >>>>> >>>>> <MessageType/> >>>>> >>>>> <MessageControlID>*20110922091157*</MessageControlID> >>>>> >>>>> <ProcessingID/> >>>>> >>>>> <VersionID>*2.3 ZRD*</VersionID> >>>>> >>>>> <SequenceNumber>*0*</SequenceNumber> >>>>> >>>>> <AcceptAcknowledgementType/> >>>>> >>>>> <CharacterSet/> >>>>> >>>>> <PrincipalLanguageOfMessage/> >>>>> >>>>> </MSH> >>>>> >>>>> </REFI12> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> Chandan >>>>> Doctoral student,Robotics Research Group >>>>> University of Auckland, New Zealand >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Hl7api-devel mailing list >>>>> Hl7...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>> >>>>> >>>> >>> >>> >>> -- >>> Regards, >>> Chandan >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7...@li... >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> >>> >> >> >> -- >> >> Med venlig hilsen / Kind regards >> >> *Jens Kristian Villadsen* >> cand.polyt >> >> Stålhøjen 24 >> 8240 Risskov >> Denmark >> >> Mobile +4523373806 >> jen...@gm... >> jkiddo.dyndns.org >> > > > > -- > Regards, > Chandan > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Jens V. <jen...@gm...> - 2014-11-04 15:17:40
|
Hi James Will you also be attending the connectathon in Cleveland? On 4 November 2014 16:09, James Agnew <jam...@gm...> wrote: > 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, > James > > ps- If anyone is attending the FHIR DevDays2014 > <http://fhir.furore.com/Events/DevDays2014>, I'll be teaching a session > on HAPI. Come say hi! > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > -- Med venlig hilsen / Kind regards *Jens Kristian Villadsen* cand.polyt Stålhøjen 24 8240 Risskov Denmark Mobile +4523373806 jen...@gm... jkiddo.dyndns.org |
From: James A. <jam...@gm...> - 2014-11-04 15:14:08
|
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 structure for the ADT^A04 message. They call this structure ADT_A01 (note the underscore). MDM^T02 and MDM^T10 similarly share messages. The thing to note is the message type and structure in MSH-9: <MSH.9> <MSG.1>MDM</MSG.1> <MSG.2>T10</MSG.2> <MSG.3>MDM_T02</MSG.3> </MSH.9> Cheers, James On Tue, Nov 4, 2014 at 4:39 AM, Rajendram Kathees <kat...@gm...> wrote: > Hi, > > We used the Hapi library to convert the HL7 message [1] to XML format [2]. > I notice MDM_T02 comes as a root element in the XML. Shouldn't this be > MDM_T10 like in the other cases? Is this a bug? Can someone explain why > this is the case? > > [1] ER7 Message > MSH|^~\\&|||||20141104095415.605+0530||MDM^T10^MDM_T02|2101||2.6| > > [2] XML Message > <?xml version="1.0"?> > <MDM_T02 xmlns="urn:hl7-org:v2xml"> > <MSH> > <MSH.1>|</MSH.1> > <MSH.2>^~\&</MSH.2> > <MSH.7>20141104095415.605+0530</MSH.7> > <MSH.9> > <MSG.1>MDM</MSG.1> > <MSG.2>T10</MSG.2> > <MSG.3>MDM_T02</MSG.3> > </MSH.9> > <MSH.10>2101</MSH.10> > <MSH.12> > <VID.1>2.6</VID.1> > </MSH.12> > </MSH> > </MDM_T02> > > > > Thanks, > Kathees > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: James A. <jam...@gm...> - 2014-11-04 15:10:16
|
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, James ps- If anyone is attending the FHIR DevDays2014 <http://fhir.furore.com/Events/DevDays2014>, I'll be teaching a session on HAPI. Come say hi! |
From: James A. <jam...@gm...> - 2014-11-04 15:05:11
|
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 <http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/parser/CanonicalModelClassFactory.html> and configure it to just always use the highest version of HL7 you want to support. This is my preferred approach personally, and it works well because HL7 structures are basically backwards compatible (they add things and deprecate things, but they never remove anything). Cheers, James On Mon, Nov 3, 2014 at 11:25 PM, Chandan Datta <cha...@au... > wrote: > Hi, > I am trying to create a Hl7 to XML transformer which will support multiple > versions of Hl7 (such as v2.3 RSD/v2.4 RSD) files present in a directory. > Is there a way to detect the version from the MSH segment before initiating > HAPI? > > -- > Regards, > Chandan > Doctoral student,Robotics Research Group > University of Auckland, New Zealand > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Chandan D. <cha...@au...> - 2014-11-04 10:19:11
|
Thanks, I thought there might be some out-of-the-box human readability option. Since there are fields defined in the model definition. For example: http://hl7api.sourceforge.net/v25/apidocs/ca/uhn/hl7v2/model/v25/segment/PRD.html On Tue, Nov 4, 2014 at 10:11 PM, Jens Villadsen < jen...@gm...> wrote: > Sounds like a job for a plain XSL transformation > > On 4 November 2014 05:30, Chandan Datta <cha...@au...> > wrote: > >> Thanks Christian. Yep, I think so. >> >> On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr <chr...@gm...> >> wrote: >> >>> The XML that HAPI parses or renders is not our own invention but >>> specified over HL7 as well as the pipe-encoded form. >>> So I fear that if you want some custom XML representation of an HL7 >>> message you need to do this yourself... >>> >>> best regards >>> Christian >>> >>> 2014-10-30 1:14 GMT+01:00 Chandan Datta <cha...@au...>: >>> >>>> Hi HAPI devs, >>>> >>>> Is it possible to generate custom XML for a HL7 message using HAPI. For >>>> example, >>>> >>>> Input: HL7 v2.4 header segment >>>> >>>> >>>> MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 >>>> >>>> >>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>> >>>> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> >>>> >>>> <MSH> >>>> >>>> <MSH.1>*|*</MSH.1> >>>> >>>> <MSH.2>*^~\*&</MSH.2> >>>> >>>> <MSH.3> >>>> >>>> <HD.1>*SPM*</HD.1> >>>> >>>> </MSH.3> >>>> >>>> <MSH.4> >>>> >>>> <HD.1>*boulcott*</HD.1> >>>> >>>> </MSH.4> >>>> >>>> <MSH.6> >>>> >>>> <HD.1>*acceartp*</HD.1> >>>> >>>> </MSH.6> >>>> >>>> <MSH.7> >>>> >>>> <TS.1>*20110922000000*</TS.1> >>>> >>>> </MSH.7> >>>> >>>> <MSH.8>*PKI*</MSH.8> >>>> >>>> <MSH.9> >>>> >>>> <CM_MSG.1>*REF*</CM_MSG.1> >>>> >>>> <CM_MSG.2>*I12*</CM_MSG.2> >>>> >>>> </MSH.9> >>>> >>>> <MSH.10>*20110922091157*</MSH.10> >>>> >>>> <MSH.11> >>>> >>>> <PT.1>*P*</PT.1> >>>> >>>> </MSH.11> >>>> >>>> <MSH.12>*2.3*</MSH.12> >>>> >>>> </MSH> >>>> >>>> </REF_I12> >>>> >>>> >>>> >>>> Instead I would like >>>> >>>> >>>> >>>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>>> >>>> <REFI12> >>>> >>>> <MSH> >>>> >>>> <FieldSeparator>*|*</FieldSeparator> >>>> >>>> <EncodingCharacters>*^~\*&</EncodingCharacters> >>>> >>>> <SendingApplication/> >>>> >>>> <SendingFacility/> >>>> >>>> <ReceivingFacility/> >>>> >>>> <DateTimeOfMessage/> >>>> >>>> <Security>*PKI*</Security> >>>> >>>> <MessageType/> >>>> >>>> <MessageControlID>*20110922091157*</MessageControlID> >>>> >>>> <ProcessingID/> >>>> >>>> <VersionID>*2.3 ZRD*</VersionID> >>>> >>>> <SequenceNumber>*0*</SequenceNumber> >>>> >>>> <AcceptAcknowledgementType/> >>>> >>>> <CharacterSet/> >>>> >>>> <PrincipalLanguageOfMessage/> >>>> >>>> </MSH> >>>> >>>> </REFI12> >>>> >>>> >>>> >>>> -- >>>> Regards, >>>> Chandan >>>> Doctoral student,Robotics Research Group >>>> University of Auckland, New Zealand >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Hl7api-devel mailing list >>>> Hl7...@li... >>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>> >>>> >>> >> >> >> -- >> Regards, >> Chandan >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > > -- > > Med venlig hilsen / Kind regards > > *Jens Kristian Villadsen* > cand.polyt > > Stålhøjen 24 > 8240 Risskov > Denmark > > Mobile +4523373806 > jen...@gm... > jkiddo.dyndns.org > -- Regards, Chandan |
From: Kathees R. <ka...@ws...> - 2014-11-04 09:49:05
|
Hi, We used the Hapi library to convert the hl7 message [1] to XML format [2]. I notice MDM_T02 comes as a root element in the XML. Shouldn't this be MDM_T10 like in the other cases? Is this a bug? Can someone explain why this is the case? [1] ER7 Message MSH|^~\\&|||||20141104095415.605+0530||MDM^T10^MDM_T02|2101||2.6| [2] XML Message <?xml version="1.0"?> <MDM_T02 xmlns="urn:hl7-org:v2xml"> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.7>20141104095415.605+0530</MSH.7> <MSH.9> <MSG.1>MDM</MSG.1> <MSG.2>T10</MSG.2> <MSG.3>MDM_T02</MSG.3> </MSH.9> <MSH.10>2101</MSH.10> <MSH.12> <VID.1>2.6</VID.1> </MSH.12> </MSH> </MDM_T02> Thanks, Kathees |
From: Rajendram K. <kat...@gm...> - 2014-11-04 09:39:37
|
Hi, We used the Hapi library to convert the HL7 message [1] to XML format [2]. I notice MDM_T02 comes as a root element in the XML. Shouldn't this be MDM_T10 like in the other cases? Is this a bug? Can someone explain why this is the case? [1] ER7 Message MSH|^~\\&|||||20141104095415.605+0530||MDM^T10^MDM_T02|2101||2.6| [2] XML Message <?xml version="1.0"?> <MDM_T02 xmlns="urn:hl7-org:v2xml"> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.7>20141104095415.605+0530</MSH.7> <MSH.9> <MSG.1>MDM</MSG.1> <MSG.2>T10</MSG.2> <MSG.3>MDM_T02</MSG.3> </MSH.9> <MSH.10>2101</MSH.10> <MSH.12> <VID.1>2.6</VID.1> </MSH.12> </MSH> </MDM_T02> Thanks, Kathees |
From: Jens V. <jen...@gm...> - 2014-11-04 09:11:39
|
Sounds like a job for a plain XSL transformation On 4 November 2014 05:30, Chandan Datta <cha...@au...> wrote: > Thanks Christian. Yep, I think so. > > On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr <chr...@gm...> > wrote: > >> The XML that HAPI parses or renders is not our own invention but >> specified over HL7 as well as the pipe-encoded form. >> So I fear that if you want some custom XML representation of an HL7 >> message you need to do this yourself... >> >> best regards >> Christian >> >> 2014-10-30 1:14 GMT+01:00 Chandan Datta <cha...@au...>: >> >>> Hi HAPI devs, >>> >>> Is it possible to generate custom XML for a HL7 message using HAPI. For >>> example, >>> >>> Input: HL7 v2.4 header segment >>> >>> >>> MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 >>> >>> >>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>> >>> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> >>> >>> <MSH> >>> >>> <MSH.1>*|*</MSH.1> >>> >>> <MSH.2>*^~\*&</MSH.2> >>> >>> <MSH.3> >>> >>> <HD.1>*SPM*</HD.1> >>> >>> </MSH.3> >>> >>> <MSH.4> >>> >>> <HD.1>*boulcott*</HD.1> >>> >>> </MSH.4> >>> >>> <MSH.6> >>> >>> <HD.1>*acceartp*</HD.1> >>> >>> </MSH.6> >>> >>> <MSH.7> >>> >>> <TS.1>*20110922000000*</TS.1> >>> >>> </MSH.7> >>> >>> <MSH.8>*PKI*</MSH.8> >>> >>> <MSH.9> >>> >>> <CM_MSG.1>*REF*</CM_MSG.1> >>> >>> <CM_MSG.2>*I12*</CM_MSG.2> >>> >>> </MSH.9> >>> >>> <MSH.10>*20110922091157*</MSH.10> >>> >>> <MSH.11> >>> >>> <PT.1>*P*</PT.1> >>> >>> </MSH.11> >>> >>> <MSH.12>*2.3*</MSH.12> >>> >>> </MSH> >>> >>> </REF_I12> >>> >>> >>> >>> Instead I would like >>> >>> >>> >>> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >>> >>> <REFI12> >>> >>> <MSH> >>> >>> <FieldSeparator>*|*</FieldSeparator> >>> >>> <EncodingCharacters>*^~\*&</EncodingCharacters> >>> >>> <SendingApplication/> >>> >>> <SendingFacility/> >>> >>> <ReceivingFacility/> >>> >>> <DateTimeOfMessage/> >>> >>> <Security>*PKI*</Security> >>> >>> <MessageType/> >>> >>> <MessageControlID>*20110922091157*</MessageControlID> >>> >>> <ProcessingID/> >>> >>> <VersionID>*2.3 ZRD*</VersionID> >>> >>> <SequenceNumber>*0*</SequenceNumber> >>> >>> <AcceptAcknowledgementType/> >>> >>> <CharacterSet/> >>> >>> <PrincipalLanguageOfMessage/> >>> >>> </MSH> >>> >>> </REFI12> >>> >>> >>> >>> -- >>> Regards, >>> Chandan >>> Doctoral student,Robotics Research Group >>> University of Auckland, New Zealand >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7...@li... >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> >>> >> > > > -- > Regards, > Chandan > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > -- Med venlig hilsen / Kind regards *Jens Kristian Villadsen* cand.polyt Stålhøjen 24 8240 Risskov Denmark Mobile +4523373806 jen...@gm... jkiddo.dyndns.org |
From: Chandan D. <cha...@au...> - 2014-11-04 04:38:28
|
Thanks Christian. Yep, I think so. On Fri, Oct 31, 2014 at 12:15 PM, Christian Ohr <chr...@gm...> wrote: > The XML that HAPI parses or renders is not our own invention but specified > over HL7 as well as the pipe-encoded form. > So I fear that if you want some custom XML representation of an HL7 > message you need to do this yourself... > > best regards > Christian > > 2014-10-30 1:14 GMT+01:00 Chandan Datta <cha...@au...>: > >> Hi HAPI devs, >> >> Is it possible to generate custom XML for a HL7 message using HAPI. For >> example, >> >> Input: HL7 v2.4 header segment >> >> >> MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 >> >> >> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >> >> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> >> >> <MSH> >> >> <MSH.1>*|*</MSH.1> >> >> <MSH.2>*^~\*&</MSH.2> >> >> <MSH.3> >> >> <HD.1>*SPM*</HD.1> >> >> </MSH.3> >> >> <MSH.4> >> >> <HD.1>*boulcott*</HD.1> >> >> </MSH.4> >> >> <MSH.6> >> >> <HD.1>*acceartp*</HD.1> >> >> </MSH.6> >> >> <MSH.7> >> >> <TS.1>*20110922000000*</TS.1> >> >> </MSH.7> >> >> <MSH.8>*PKI*</MSH.8> >> >> <MSH.9> >> >> <CM_MSG.1>*REF*</CM_MSG.1> >> >> <CM_MSG.2>*I12*</CM_MSG.2> >> >> </MSH.9> >> >> <MSH.10>*20110922091157*</MSH.10> >> >> <MSH.11> >> >> <PT.1>*P*</PT.1> >> >> </MSH.11> >> >> <MSH.12>*2.3*</MSH.12> >> >> </MSH> >> >> </REF_I12> >> >> >> >> Instead I would like >> >> >> >> <?xml version=*"1.0"* encoding=*"UTF-8"*?> >> >> <REFI12> >> >> <MSH> >> >> <FieldSeparator>*|*</FieldSeparator> >> >> <EncodingCharacters>*^~\*&</EncodingCharacters> >> >> <SendingApplication/> >> >> <SendingFacility/> >> >> <ReceivingFacility/> >> >> <DateTimeOfMessage/> >> >> <Security>*PKI*</Security> >> >> <MessageType/> >> >> <MessageControlID>*20110922091157*</MessageControlID> >> >> <ProcessingID/> >> >> <VersionID>*2.3 ZRD*</VersionID> >> >> <SequenceNumber>*0*</SequenceNumber> >> >> <AcceptAcknowledgementType/> >> >> <CharacterSet/> >> >> <PrincipalLanguageOfMessage/> >> >> </MSH> >> >> </REFI12> >> >> >> >> -- >> Regards, >> Chandan >> Doctoral student,Robotics Research Group >> University of Auckland, New Zealand >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > -- Regards, Chandan |
From: Chandan D. <cha...@au...> - 2014-11-04 04:29:42
|
Hi Is anyone worked on a transform to html/pdf which can take in a Hl7 file and output a human readable format. Is there any code sample and a sample data pipeline which you can suggest such as HL7 -> XML -> PDF (HAPI+XSL-FO) ? Examples are below: HL7 Lab file: MSH|^~\&|^CCHITLabs^L-CL|^CCHIT^L-CL|^^|^^|20100407121000||ORU^R01^ORU_R01|20100407121000|P|2.5.1|0001||AL||||MT-ORU-2_R1 PID|1|12|00000333^^^^AN||Grayson^Jim^^^^^L||19430309|M|||834 Ocean Vista Avenue^Apt. 202^Santa Monica^CA^90401||3105552233 ORC|RE|||3^EHR-System OBR|1|3^EHR-System|LAB003^^CCHIT^L-CL|087-0714^Lipid Panel, Serum^99Lab^80061^Lipid Panel, Serum^C4|||20100407151000||||L|||||PRO1000#^Butler^Internist^E^^Dr^MD^^^^^^EI||||RO||20100407121000|||F OBX|1|NM|13457-7^LDL Cholesterol^LN||90|mg/dL|< 99||||F|||||^DOE^JOHN|||||||AccuLabs^^^^^CLIA^^^^10D987432|432 Administration Ave.^^St. Louis^MO^63146|^Smith^John^^^Dr.^MD NTE|0|L| OBX|2|NM|14646-4^HDL Cholesterol^LN||60|mg/dL|40-59|H|||F|||||^DOE^JOHN|||||||AccuLabs^^^^^CLIA^^^^10D987432|432 Administration Ave.^^St. Louis^MO^63146|^Smith^John^^^Dr.^MD NTE|0|L| OBX|3|NM|14647-2^Total Cholesterol^LN||120|mg/dL|< 199||||F|||||^DOE^JOHN|||||||AccuLabs^^^^^CLIA^^^^10D987432|432 Administration Ave.^^St. Louis^MO^63146|^Smith^John^^^Dr.^MD NTE|0|L| OBX|4|NM|14927-8^Triglycerides^LN||100|mg/dL|< 149||||F|||||^DOE^JOHN|||||||AccuLabs^^^^^CLIA^^^^10D987432|432 Administration Ave.^^St. Louis^MO^63146|^Smith^John^^^Dr.^MD NTE|0|L| Output: [image: image] -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand |
From: Chandan D. <cha...@au...> - 2014-11-04 04:25:50
|
Hi, I am trying to create a Hl7 to XML transformer which will support multiple versions of Hl7 (such as v2.3 RSD/v2.4 RSD) files present in a directory. Is there a way to detect the version from the MSH segment before initiating HAPI? -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand |
From: Mike M. <mi...@th...> - 2014-10-30 23:59:51
|
Have you ever thought about a baseclass for MSH that is independent of structure? This would make creating AppRoutingData much easier. So in ca.uhn.hl7v2.protocol.impl.ApplicationRouterImpl#findApplication where a terser is used to extract msh fields, you could replace this with a get("MSH") where it would be safe to cast the returned Structure to the baseclass MSH and get the fields directly. -Mike |
From: Christian O. <chr...@gm...> - 2014-10-30 23:15:24
|
The XML that HAPI parses or renders is not our own invention but specified over HL7 as well as the pipe-encoded form. So I fear that if you want some custom XML representation of an HL7 message you need to do this yourself... best regards Christian 2014-10-30 1:14 GMT+01:00 Chandan Datta <cha...@au...>: > Hi HAPI devs, > > Is it possible to generate custom XML for a HL7 message using HAPI. For > example, > > Input: HL7 v2.4 header segment > > > MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 > > > <?xml version=*"1.0"* encoding=*"UTF-8"*?> > > <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> > > <MSH> > > <MSH.1>*|*</MSH.1> > > <MSH.2>*^~\*&</MSH.2> > > <MSH.3> > > <HD.1>*SPM*</HD.1> > > </MSH.3> > > <MSH.4> > > <HD.1>*boulcott*</HD.1> > > </MSH.4> > > <MSH.6> > > <HD.1>*acceartp*</HD.1> > > </MSH.6> > > <MSH.7> > > <TS.1>*20110922000000*</TS.1> > > </MSH.7> > > <MSH.8>*PKI*</MSH.8> > > <MSH.9> > > <CM_MSG.1>*REF*</CM_MSG.1> > > <CM_MSG.2>*I12*</CM_MSG.2> > > </MSH.9> > > <MSH.10>*20110922091157*</MSH.10> > > <MSH.11> > > <PT.1>*P*</PT.1> > > </MSH.11> > > <MSH.12>*2.3*</MSH.12> > > </MSH> > > </REF_I12> > > > > Instead I would like > > > > <?xml version=*"1.0"* encoding=*"UTF-8"*?> > > <REFI12> > > <MSH> > > <FieldSeparator>*|*</FieldSeparator> > > <EncodingCharacters>*^~\*&</EncodingCharacters> > > <SendingApplication/> > > <SendingFacility/> > > <ReceivingFacility/> > > <DateTimeOfMessage/> > > <Security>*PKI*</Security> > > <MessageType/> > > <MessageControlID>*20110922091157*</MessageControlID> > > <ProcessingID/> > > <VersionID>*2.3 ZRD*</VersionID> > > <SequenceNumber>*0*</SequenceNumber> > > <AcceptAcknowledgementType/> > > <CharacterSet/> > > <PrincipalLanguageOfMessage/> > > </MSH> > > </REFI12> > > > > -- > Regards, > Chandan > Doctoral student,Robotics Research Group > University of Auckland, New Zealand > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Chandan D. <cha...@au...> - 2014-10-30 03:22:59
|
Thanks Ian, Yep, that snippet works fine with v2.3. I will update with some more examples of the HL7 and the corresponding XML I seek. On Thu, Oct 30, 2014 at 3:56 PM, Chandan Datta <cha...@au... > wrote: > Hi Ian, > > I want to just transform a HL7 segment to a XML. Is it possible to disable > the validation in the parser for that and create a XML representation out > of it? > > On Thu, Oct 30, 2014 at 3:11 PM, Ian Vowles <Ian...@he...> > wrote: > >> Here is a snippet of code which is in use here: >> >> >> >> HapiContext hapiContext = new DefaultHapiContext(); >> >> hapiContext.setModelClassFactory(new >> CanonicalModelClassFactory(hl7Version)); >> >> hapiContext.setValidationRuleBuilder(new NoValidationBuilder()); >> >> >> >> final PipeParser pipeParser = hapiContext.getPipeParser(); >> >> final Message hapiMessage = pipeParser.parse(message); >> >> >> >> hapi library version 2.2 >> >> >> >> hl7Version is a string describing the hl7Version to use (we usually set >> it to “2.4”, you could set it to “2.3”, or you could use a default model >> class factory and let the pipe parser find the Hl7 version from the MSH). >> >> message is a string containing the hl7 message. >> >> >> >> Hope this helps >> >> >> >> Ian >> >> >> >> Systems Integration Team >> >> Qld Dept of Health >> >> Australia >> >> >> >> *From:* Chandan Datta [mailto:cha...@au...] >> *Sent:* Thursday, 30 October 2014 10:11 AM >> *To:* hl7...@li... >> *Subject:* [HAPI-devel] Parse HL7 v2.3 REF message with local >> customizations >> >> >> >> Hi all, >> >> >> >> I am trying parse a HL7 REF I12 message with local customization(NZ). >> When I tried using the GenericParser, I keep getting Validation exceptions. >> >> >> >> For example for the segment below, I keep get the output ca.uhn.hl7v2.validation.ValidationException: >> Validation failed: Primitive value '(08)569-7555' requires to be empty or a >> US phone number >> >> >> >> PRD|PP|See T Tan^""^""^^""|""^^^^""^New Zealand||(08)569-7555||14134^NZMC >> >> >> >> My question is: >> >> - Is there a way to avoid the validation by using the conformance >> class generator >> - Is it possible to create own validation classes using >> CustomModelClasses? >> >> >> >> In either case, is there any example code for that or tutorial example >> documentation? >> >> >> >> -- >> >> Regards, >> Chandan >> Doctoral student,Robotics Research Group >> University of Auckland, New Zealand >> >> >> >> >> >> >> ******************************************************************************** >> >> This email, including any attachments sent with it, is confidential and >> for the sole use of the intended recipient(s). This confidentiality is not >> waived or lost, if you receive it and you are not the intended >> recipient(s), or if it is transmitted/received in error. >> >> Any unauthorised use, alteration, disclosure, distribution or review of >> this email is strictly prohibited. The information contained in this email, >> including any attachment sent with it, may be subject to a statutory duty >> of confidentiality if it relates to health service matters. >> >> If you are not the intended recipient(s), or if you have received this >> email in error, you are asked to immediately notify the sender by telephone >> collect on Australia +61 1800 198 175 or by return email. You should >> also delete this email, and any copies, from your computer system network >> and destroy any hard copies produced. >> >> If not an intended recipient of this email, you must not copy, distribute >> or take any action(s) that relies on it; any form of disclosure, >> modification, distribution and/or publication of this email is also >> prohibited. >> >> Although Queensland Health takes all reasonable steps to ensure this >> email does not contain malicious software, Queensland Health does not >> accept responsibility for the consequences if any person's computer >> inadvertently suffers any disruption to services, loss of information, harm >> or is infected with a virus, other malicious computer programme or code >> that may occur as a consequence of receiving this email. >> >> Unless stated otherwise, this email represents only the views of the >> sender and not the views of the Queensland Government. >> >> >> ********************************************************************************** >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > > -- > Regards, > Chandan > Doctoral student,Robotics Research Group > University of Auckland, New Zealand > -- Regards, Chandan |
From: Chandan D. <cha...@au...> - 2014-10-30 02:56:20
|
Hi Ian, I want to just transform a HL7 segment to a XML. Is it possible to disable the validation in the parser for that and create a XML representation out of it? On Thu, Oct 30, 2014 at 3:11 PM, Ian Vowles <Ian...@he...> wrote: > Here is a snippet of code which is in use here: > > > > HapiContext hapiContext = new DefaultHapiContext(); > > hapiContext.setModelClassFactory(new > CanonicalModelClassFactory(hl7Version)); > > hapiContext.setValidationRuleBuilder(new NoValidationBuilder()); > > > > final PipeParser pipeParser = hapiContext.getPipeParser(); > > final Message hapiMessage = pipeParser.parse(message); > > > > hapi library version 2.2 > > > > hl7Version is a string describing the hl7Version to use (we usually set it > to “2.4”, you could set it to “2.3”, or you could use a default model class > factory and let the pipe parser find the Hl7 version from the MSH). > > message is a string containing the hl7 message. > > > > Hope this helps > > > > Ian > > > > Systems Integration Team > > Qld Dept of Health > > Australia > > > > *From:* Chandan Datta [mailto:cha...@au...] > *Sent:* Thursday, 30 October 2014 10:11 AM > *To:* hl7...@li... > *Subject:* [HAPI-devel] Parse HL7 v2.3 REF message with local > customizations > > > > Hi all, > > > > I am trying parse a HL7 REF I12 message with local customization(NZ). When > I tried using the GenericParser, I keep getting Validation exceptions. > > > > For example for the segment below, I keep get the output ca.uhn.hl7v2.validation.ValidationException: > Validation failed: Primitive value '(08)569-7555' requires to be empty or a > US phone number > > > > PRD|PP|See T Tan^""^""^^""|""^^^^""^New Zealand||(08)569-7555||14134^NZMC > > > > My question is: > > - Is there a way to avoid the validation by using the conformance > class generator > - Is it possible to create own validation classes using > CustomModelClasses? > > > > In either case, is there any example code for that or tutorial example > documentation? > > > > -- > > Regards, > Chandan > Doctoral student,Robotics Research Group > University of Auckland, New Zealand > > > > > > > ******************************************************************************** > > This email, including any attachments sent with it, is confidential and > for the sole use of the intended recipient(s). This confidentiality is not > waived or lost, if you receive it and you are not the intended > recipient(s), or if it is transmitted/received in error. > > Any unauthorised use, alteration, disclosure, distribution or review of > this email is strictly prohibited. The information contained in this email, > including any attachment sent with it, may be subject to a statutory duty > of confidentiality if it relates to health service matters. > > If you are not the intended recipient(s), or if you have received this > email in error, you are asked to immediately notify the sender by telephone > collect on Australia +61 1800 198 175 or by return email. You should also > delete this email, and any copies, from your computer system network and > destroy any hard copies produced. > > If not an intended recipient of this email, you must not copy, distribute > or take any action(s) that relies on it; any form of disclosure, > modification, distribution and/or publication of this email is also > prohibited. > > Although Queensland Health takes all reasonable steps to ensure this email > does not contain malicious software, Queensland Health does not accept > responsibility for the consequences if any person's computer inadvertently > suffers any disruption to services, loss of information, harm or is > infected with a virus, other malicious computer programme or code that may > occur as a consequence of receiving this email. > > Unless stated otherwise, this email represents only the views of the > sender and not the views of the Queensland Government. > > > ********************************************************************************** > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand |
From: Ian V. <Ian...@he...> - 2014-10-30 02:28:23
|
Here is a snippet of code which is in use here: HapiContext hapiContext = new DefaultHapiContext(); hapiContext.setModelClassFactory(new CanonicalModelClassFactory(hl7Version)); hapiContext.setValidationRuleBuilder(new NoValidationBuilder()); final PipeParser pipeParser = hapiContext.getPipeParser(); final Message hapiMessage = pipeParser.parse(message); hapi library version 2.2 hl7Version is a string describing the hl7Version to use (we usually set it to “2.4”, you could set it to “2.3”, or you could use a default model class factory and let the pipe parser find the Hl7 version from the MSH). message is a string containing the hl7 message. Hope this helps Ian Systems Integration Team Qld Dept of Health Australia From: Chandan Datta [mailto:cha...@au...] Sent: Thursday, 30 October 2014 10:11 AM To: hl7...@li... Subject: [HAPI-devel] Parse HL7 v2.3 REF message with local customizations Hi all, I am trying parse a HL7 REF I12 message with local customization(NZ). When I tried using the GenericParser, I keep getting Validation exceptions. For example for the segment below, I keep get the output ca.uhn.hl7v2.validation.ValidationException: Validation failed: Primitive value '(08)569-7555' requires to be empty or a US phone number PRD|PP|See T Tan^""^""^^""|""^^^^""^New Zealand||(08)569-7555||14134^NZMC My question is: * Is there a way to avoid the validation by using the conformance class generator * Is it possible to create own validation classes using CustomModelClasses? In either case, is there any example code for that or tutorial example documentation? -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** |
From: Chandan D. <cha...@au...> - 2014-10-30 01:11:26
|
Hi HAPI devs, Is it possible to generate custom XML for a HL7 message using HAPI. For example, Input: HL7 v2.4 header segment MSH|^~\&|SPM|boulcott||acceartp|20110922000000|PKI|REF^I12|20110922091157|P|2.3 <?xml version=*"1.0"* encoding=*"UTF-8"*?> <REF_I12 xmlns=*"urn:hl7-org:v2xml"*> <MSH> <MSH.1>*|*</MSH.1> <MSH.2>*^~\*&</MSH.2> <MSH.3> <HD.1>*SPM*</HD.1> </MSH.3> <MSH.4> <HD.1>*boulcott*</HD.1> </MSH.4> <MSH.6> <HD.1>*acceartp*</HD.1> </MSH.6> <MSH.7> <TS.1>*20110922000000*</TS.1> </MSH.7> <MSH.8>*PKI*</MSH.8> <MSH.9> <CM_MSG.1>*REF*</CM_MSG.1> <CM_MSG.2>*I12*</CM_MSG.2> </MSH.9> <MSH.10>*20110922091157*</MSH.10> <MSH.11> <PT.1>*P*</PT.1> </MSH.11> <MSH.12>*2.3*</MSH.12> </MSH> </REF_I12> Instead I would like <?xml version=*"1.0"* encoding=*"UTF-8"*?> <REFI12> <MSH> <FieldSeparator>*|*</FieldSeparator> <EncodingCharacters>*^~\*&</EncodingCharacters> <SendingApplication/> <SendingFacility/> <ReceivingFacility/> <DateTimeOfMessage/> <Security>*PKI*</Security> <MessageType/> <MessageControlID>*20110922091157*</MessageControlID> <ProcessingID/> <VersionID>*2.3 ZRD*</VersionID> <SequenceNumber>*0*</SequenceNumber> <AcceptAcknowledgementType/> <CharacterSet/> <PrincipalLanguageOfMessage/> </MSH> </REFI12> -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand |
From: Chandan D. <cha...@au...> - 2014-10-30 00:34:10
|
Hi all, I am trying parse a HL7 REF I12 message with local customization(NZ). When I tried using the GenericParser, I keep getting Validation exceptions. For example for the segment below, I keep get the output ca.uhn.hl7v2.validation.ValidationException: Validation failed: Primitive value '(08)569-7555' requires to be empty or a US phone number PRD|PP|See T Tan^""^""^^""|""^^^^""^New Zealand||(08)569-7555||14134^NZMC My question is: - Is there a way to avoid the validation by using the conformance class generator - Is it possible to create own validation classes using CustomModelClasses? In either case, is there any example code for that or tutorial example documentation? -- Regards, Chandan Doctoral student,Robotics Research Group University of Auckland, New Zealand |
From: Birsan, D. <dan...@eh...> - 2014-10-29 23:33:31
|
Hello HAPI users, The SendAndReceiveAMessage sample is extremely helpfull but it doesn't really explain how we can actually extract the incoming message on port 1011. I can send messages from en external source and I see the debuggin info listing the message I've sent but when I actually try to capture that message and store it into a variable or println into the Console I don't really know how to do that. I'm using the generic handler <server.registerApplication("*", "*", handler);> but I would like to extract the incoming message into a String so it doesn't really matter what type of message I'm getting. I'm thinking it must be something very simple. For instance in the <connectionReceived> we should be able to write something like: System.out.println("Message received: " + theC.getMessage().toString()); Please let me know if there are any questions or comments on my inquiry. Regards, Dan |
From: James A. <ja...@ja...> - 2014-10-14 22:05:39
|
Oops, never mind that. I do see it, I was calling toString() on the string representation of the message and not the HAPI message object. This is actually a quirk with the way the parser works internally. Calling toString() actually just calls PipeParser.encode(message), and PipeParser has a bit of unexpected behaviour in it. Essentially it creates a single repetition of each repeatable segment in the message as a part of its scan across the message. This means that once you have encoded a message once, the getXXXReps() counts are no longer reliable. There is an open bug about this issue (Issue 607 here http://sourceforge.net/p/hl7api/bugs/207/ ) and the exact cause has been found, but I'm still not sure if there would be regressions caused by solving this. For now, probably your best bet is to not call toString() unfortunately, or to call isEmpty() on the OBX segment before 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 <ja...@ja...> 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 results with the following? > > @Test > public void testEncodeDoesntChangeStructure() throws HL7Exception { > > String message = > "MSH|^~\\&|SYSTEM|XXX|CLOVERLEAF|XXX|20141001170652|RISTECH|ORM^O01|1262|T|2.4|||||||||\r" > + > > "PID|1||1234567^^^XXX^PI~100000000^^^NLMINBIZA^NNNLD||TEST&&TEST^T^^^^^L||19761201|M|TEST^^^||STREET > 10&STREET&10^^CITY^^1234^NLD^M||^PRN^PH^^31|^WPN^PH^^31||||14205|188780348|||||||||||||\r" > + > "PD1||||||||||||||||||\r" + > > "PV1||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|||||||||||14205|||||||||||||||||||||||||20141001152757|||||||V\r" > + > > "ORC|NW|66955^EPC|743||Arrived||^^^20141001130500^^R||20141001170652|RISTECH^RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|101001103^^^101001^^^^^NUCLEAR > MEDICINE||||||||||||||||I|\r" + > "OBR|1|66955^EPC|743|^^^1052000729^DMSA > UPTAKESCAN^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI||743|743|E32||||NM|Arrived||^^^20141001130500^^R||||^test|||||20141001130500||||||||^^^1052000729^DMSA > UPTAKE SCAN^L|\r" + > > "ORC|NW|66955^EPC|743||Planned||^^^20141001110500^^R||20141001170652|RISTECH^RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|101001103^^^101001^^^^^NUCLEAR > MEDICINE||||||||||||||||I|\r" + > "OBR|1|66955^EPC|743|^^^1052000728^INJECTION > DMSA^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI||743|743|E33||||NM|Planned||^^^20141001110500^^R||||^test|||||20141001110500||||||||^^^1052000728^INJECTION > DMSA^L|\r" + > "OBX|1|ST|WEIGHT^Weight patient (kg):||70|KG\r" + > "OBX|2|ST|LENGTH^Length patient (cm):||180|CM\r"; > > ca.uhn.hl7v2.model.v24.message.ORM_O01 orm = new > ca.uhn.hl7v2.model.v24.message.ORM_O01(); > orm.parse(message); > > message.toString(); > > ourLog.info(orm.printStructure()); > > int orderCount = orm.getORDERReps(); > for (int i = 0; i < orderCount; i++) { > ourLog.info("order("+i+") #OBX : " + > orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); > > if (i == 0) { > assertEquals(0, > orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); > } > if (i == 1) { > assertEquals(2, > orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); > } > > } > > > } > > On Tue, Oct 14, 2014 at 4:45 AM, Tim de Wit <t.c...@gm...> wrote: > >> hi all, >> >> i'm busy developing an ORM-interface using Hapi v2.2 and encountered some >> very strange behaviour when reading out OBX segments from the following >> multiple-order ORM_O01 message: >> >> >> MSH|^~\&|SYSTEM|XXX|CLOVERLEAF|XXX|20141001170652|RISTECH|ORM^O01|1262|T|2.4 >> ||||||||| >> >> PID|1||1234567^^^XXX^PI~100000000^^^NLMINBIZA^NNNLD||TEST&&TEST^T^^^^^L||197 >> 61201|M|TEST^^^||STREET >> >> 10&STREET&10^^CITY^^1234^NLD^M||^PRN^PH^^31|^WPN^PH^^31||||14205|188780348|| >> ||||||||||| >> PD1|||||||||||||||||| >> >> PV1||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|||||||||||14205| >> ||||||||||||||||||||||||20141001152757|||||||V >> >> ORC|NW|66955^EPC|743||Arrived||^^^20141001130500^^R||20141001170652|RISTECH^ >> >> RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI| >> 101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I| >> OBR|1|66955^EPC|743|^^^1052000729^DMSA UPTAKE >> >> SCAN^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^ >> >> ^^NPI||743|743|E32||||NM|Arrived||^^^20141001130500^^R||||^test|||||20141001 >> 130500||||||||^^^1052000729^DMSA UPTAKE SCAN^L| >> >> ORC|NW|66955^EPC|743||Planned||^^^20141001110500^^R||20141001170652|RISTECH^ >> >> RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI| >> 101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I| >> OBR|1|66955^EPC|743|^^^1052000728^INJECTION >> >> DMSA^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^ >> >> ^^NPI||743|743|E33||||NM|Planned||^^^20141001110500^^R||||^test|||||20141001 >> 110500||||||||^^^1052000728^INJECTION DMSA^L| >> OBX|1|ST|WEIGHT^Weight patient (kg):||70|KG >> OBX|2|ST|LENGTH^Length patient (cm):||180|CM >> >> This message contains two orders (2x ORC+OBR), with the first order having >> no OBX and the second having two OBX segments. The following code: >> >> ORM_O01 orm = (ORM_O01) message; >> //System.out.println(orm.toString()); >> int orderCount = orm.getORDERReps(); >> for (int i = 0; i < orderCount; i++) { >> System.out.println("order("+i+") #OBX : " + >> orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); >> } >> >> gives the expected output: >> order(0) #OBX : 0 >> order(1) #OBX : 2 >> >> However... if i uncomment the .toString() line, i get the following wrong >> output: >> order(0) #OBX : 1 >> order(1) #OBX : 2 >> The same thing also happens if i use >> "System.out.println(message.toString())" instead. >> >> Any ideas what i'm doing wrong? >> >> kind regards, >> >> Tim de Wit >> >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> > > |