Beautiful. I am about to reply to this with the same. You have replied it..
Thanks James. Once again thanks for your prompt response. I'm really
excited about this.. thanks for this....
Now I am encountering the below error w.r.t phone number. If I remove the
number it works fine but if the phone number exist I still get the below
error.
ca.uhn.hl7v2.model.DataTypeException:
ca.uhn.hl7v2.validation.ValidationException: Validation failed: Primitive
value '02 9999 9999' requires to be empty or a US phone number at PRD-5
at
ca.uhn.hl7v2.model.AbstractPrimitive.setValue(AbstractPrimitive.java:99)
at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:438)
at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:382)
at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:1158)
at ca.uhn.hl7v2.parser.PipeParser.doParse(PipeParser.java:222)
at ca.uhn.hl7v2.parser.GenericParser.doParse(GenericParser.java:245)
at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:212)
at ca.uhn.hl7v2.parser.GenericParser.parse(GenericParser.java:253)
at util.hl7.helpers.ParseHL7Messages.main(ParseHL7Messages.java:69)
Caused by: ca.uhn.hl7v2.validation.ValidationException: Validation failed:
Primitive value '02 9999 9999' requires to be empty or a US phone number
at ca.uhn.hl7v2.validation.impl.RuleSupport.failed(RuleSupport.java:67)
at
ca.uhn.hl7v2.validation.impl.RuleSupport.failedWithValue(RuleSupport.java:58)
at ca.uhn.hl7v2.validation.impl.RuleSupport.result(RuleSupport.java:48)
at ca.uhn.hl7v2.validation.impl.RuleSupport.result(RuleSupport.java:44)
at
ca.uhn.hl7v2.validation.builder.PredicatePrimitiveTypeRule.apply(PredicatePrimitiveTypeRule.java:115)
at
ca.uhn.hl7v2.validation.builder.PredicatePrimitiveTypeRule.apply(PredicatePrimitiveTypeRule.java:38)
at
ca.uhn.hl7v2.model.AbstractPrimitive.setValue(AbstractPrimitive.java:97)
... 8 more
Thanks,
Venkatesh S
On Wed, Feb 5, 2014 at 1:59 PM, James Agnew <ja...@jamesagnew.ca> wrote:
> 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 <
> venk...@gmail.com> wrote:
>
>> Hi,
>>
>>
>>
>> I am new to HL7, I am trying to process a sample HL7 message using HAPI
>> API I am getting the following exception and I am unable to proceed
>> further. Please, assist me on how to resolve this issue.
>>
>> Appreciate your help.
>>
>>
>>
>> FYI: I added all the jar files provided under lib folder onto my
>> classpath and I am using the sample java program provided in the site, I
>> just replaced the message provided with the below message string no other
>> changes.
>>
>>
>>
>>
>> *Sample message: (partial message)*
>>
>>
>>
>> "MSH|^~\\&|deLacy 2.9.14|svmhstst^CPS-Care
>> Connect|BP|svmhbprt^HealthLink|20120117124847||REF^I12|20120117124847781|P|2.3.1"
>>
>> +"RF1|P|R|DRF|DS^Discharge
>> Summary^^HL70282||1122239-20120117124842879|201201171248|||E^Event
>> Summary^HL70336"
>>
>> +"PRD|RT^General Provider|EHSLER^ROBERT^^^DR|Suite 505 Level 5
>> SVC DARLINGHURST^^^NSW^2010^Australia||02 9999 9999^WPN^PH~02 8888
>> 8888^WPN^FX||1234567A^1234567A"
>>
>> +"PRD|RP^Discharging Provider|EHSEEF^MARK OLIVER|Suite 707
>> Level 7 SVC DARLINGHURST^^^NSW^2010^Australia||02 6666 6666^WPN^PH~02 7777
>> 7777^WPN^FX||7654321A^7654321A"
>>
>>
>> +"PID|||5859343^^^SVH^MR~123456789^^^^MC||BARNES^SARAH^^^MRS||19340301|F|||15
>> CAMELIA AVENUE CASTLE HILL^^Sydney^NSW^2154^Australia||02 9883
>> 4876||||||123456789"
>>
>> +"NK1|1|MR CYRIL BARNES|^HUSBAND|15 CAMELIA AVENUE, CASTLE HILL
>> 2154|02 9883 4876|02 9080 5432|P^Primary"
>>
>> +"DG1|1||DG1^INVESTIGATION OF LUNG
>> MALIGNANCY||201111170000|F|||||||||1"
>>
>> +"AL1|1|DA|^ABBOCILLIN||Asthma|20120106"
>>
>> +"AL1|2|FA|^Bananas||Blisters|20120106"
>>
>> +"OBR|1|||^Discharge Summary|||201201171248"
>>
>> ..........";
>>
>>
>>
>>
>>
>> *Error message:*
>>
>>
>>
>> *ca.uhn.hl7v2.HL7Exception*: The HL7 version 2.3.1RF1 is not recognized
>>
>> at ca.uhn.hl7v2.parser.Parser.assertVersionExists(
>> *Parser.java:527*)
>>
>> at ca.uhn.hl7v2.parser.Parser.parse(*Parser.java:208*)
>>
>> at ca.uhn.hl7v2.parser.GenericParser.parse(
>> *GenericParser.java:253*)
>>
>> at util.hl7.helpers.ParseHL7Messages.main(
>> *ParseHL7Messages.java:60*)
>>
>>
>>
>>
>>
>> Thanks,
>>
>> Venkatesh S
>>
>>
>> ------------------------------------------------------------------------------
>> Managing the Performance of Cloud-Based Applications
>> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
>> Read the Whitepaper.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Hl7api-devel mailing list
>> Hl7api-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>
>>
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel