Seems to work here, except when using the DefaultValidation rules of a
default PipeParser, IN1-1 should be a number, not a string ("s").

* What HAPI version do you use?
* Check your validation rules
* Ensure that the segments (lines) are delimited by \r, not by \n 

regards
Christian



Michael Monstein wrote:
> 
> Dear all
> 
> I have the followin PHARM H2 Test Message and would like to extract
> Patient Data from it:
> 
> MSH|^~\&|IHE|EU-CAT2011|||20110307194153||RDE^O11|MSG00003|P|2.6||||||UTF-8
> PID|||A9283923889^^^^||Doe^John||19680306|M
> PV1||I|Cardiology^4^01^CATEUR_WARDS&&L||||||||||||||||V00001
> IN1|s|ID001^Full Insurance|XXXX|INSURANCE_Ltd.
> ORC|NW|PL001||P001|||||20110414153220|||00000999^Strangelove^Peter^^^Dr.|||||||P0343874^Jansen^Patricia||Connectathon
> Europe 2011^^^^^^^^^CATEUR2011|Casa della Città Leopolda, Piazza
> Guerrazzi, 56125 Pisa|0039 50 48587||P3;V3
> TQ1|1|2^Tab&Tablets&99FCS|TID
> RXO|S0002^Paracetamol^99SCS|500||mg^milligram^99UCS|Tab^Tablets^99FCS||||G|||||||||||J00.0^Cold^I10
> NTE|1||TAKE WITH WATER
> RXR|PO|MOUTH|
> RXC|B|N02BE01^Paracetamol^ATC|500|mg^milligram^ANS+
> RXE||054565^Dafalgan 500 mg tablets^99LCN|2|||Tab^Tablets^99FCS|01^Take
> with Water|||||||P0343874^Jansen^Patricia|P001
> NTE|1||Prescription Item OK|IA^Prescription item Advice notes
> NTE|2||Prescription OK|PA^Prescription-wide Advice notes
> TQ1|1|1^Tab&Tablets&99FCS||070000~150000~230000|||20110307
> RXR|PO|MOUTH|
> 
> Strange is, that I am somehow not able to parse the birthdate of the
> patient from it. Here's how I try to do that using the V2.6 parser:
> 
> PipeParser parser = new PipeParser();
> RDE_O11 msg = (RDE_O11) parser.parse( getMessageAsString((InputStream)
> pSource) );
> PID pid = msg.getPATIENT().getPID();
> pid.getPid7_DateTimeOfBirth().getValueAsDate();
> 
> Can anyone see where I am mistaken?
> 
> Best Regards,
> Michael
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Cant-parse-Date-from-PHARM-H2-Message-tp34391227p34391731.html
Sent from the hl7api-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to