Click here to Skip to main content

foreverlove87 asked:

Open original thread
Hi
 

I want to convert this HL7 message to xml.I am using Hapi.
But it does not work if HL7 message starts from "FHS header".
Also I am getting an error for
 
Failed validation rule for value "756666": Matches the regular expression (\d{1,2} )?(\(\d{3}\))?\d{3}-\d{4}(X\d{1,5})?(B\d{1,5})?(C.*)?: Segment: PID Field #13
 

 

FHS|^~\&|Medical-Objects|Test Message capricorn
BHS|^~\&|Medical-Objects|Test Message capricorn
MSH|^~\&|EQUATORDXTRAY^EQUATORDXTRAY:2.20.2 (Build 4111) [win32-i386] {SVV=62;DBV=62}^L|Test Message capricorn^22B601DF-1415-4ACB-BE13-D7E9C9CCAC41^GUID|AUSHICPR.UP3123000QW^UP3123000QW.PAPERACT SOLUTIONS.UHG^L|PaperAct Solutions On Behalf of Unified Health Group Test^1D618FDB-DB0A-44DC-8B03-8A4C981BD038^GUID|20121121142346+1000|Test Message Capricorn (Equator) <MO882115.>|ORU^R01|TMSCP7427894|P|2.3.1^AUS&&ISO^AS4700.2&&L|||AL||AUS
PID|1||129833^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^SR^Test Message capricorn&22B601DF-1415-4ACB-BE13-D7E9C9CCAC41&GUID~129833^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^FI^Test Message capricorn&22B601DF-1415-4ACB-BE13-D7E9C9CCAC41&GUID~408091^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^FI^Think Positive Psychology Services&53604C05-48FA-4CF0-B398-58790CF638FA&GUID~100338^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^FI^Toronto Private Hospital&A6E05941-72EE-4D2C-9BAF-17D9D9C9207E&GUID||PATIENT^Test^^^^^L||20010101|M|||||61(07)54506495^PRN^PH^^61^07^54506495|||||||||||||||||N
PV1|1|O||||||UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN|UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN|||||||N
ORC|RE||F1705DC3-B14F-4B2D-A0BA-5707D0690CCB^Test Message capricorn^22B601DF-1415-4ACB-BE13-D7E9C9CCAC41^GUID||CM|||||||UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN
OBR|1||F1705DC3-B14F-4B2D-A0BA-5707D0690CCB^Test Message capricorn^22B601DF-1415-4ACB-BE13-D7E9C9CCAC41^GUID|11488-4^Consultation Note (E BROWN (MOTEST))^LN||20121121+1000|20121121+1000|||||||||UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN||From Test Message capricorn"XX11211408459-9711.oru" 21.11.2012||LN=F1705DC3-B14F-4B2D-A0BA-5707D0690CCB||20121121140814+1000||PHY|F||^^^20121121+1000|UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN||||EB4558000PX&BROWN (MOTEST)&ELI&&&Mr.&&&Medical-Objects
OBX|1|FT|11488-4^^LN||Hi there,\.br\ \.br\This is a test message from Medical-Objects to see if your connection is working for delivery of results.\.br\\.br\You may delete this message after 2 days.\.br\\.br\Kind Regards,\.br\\.br\Eli Brown\.br\Medical-Objects\.br\Ph (07) 5456 6000\.br\||||||F
BTS|1
FTS|1|Powered by www.medical-objects.com
 

[torsten]additional question[/torsten]
 
I want to fetch the PID segment and show all the details of patient .
Tags: XML, Java

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100