I did some digging around with a few different sample messages and realized
that the segrep being stored in the exception is not a segrep. It is more of a
seg identifier.
e.g. In the message there are to NK1 segs. Irrespective of where I make a
validation failing mistake, it prints the same number - 8. That's because NK1
is the 8th segment in ADT_A04 structure of 2.6 (my canonical MCF).
Likewise PID is the 4th seg in the structure.
This used to work correctly way back in 0.5.1.
I tested 1.1 since that was the only other version available thru maven, and
see the problem there.
The bug id I've raised is 3471934.
R,
rahul
On Jan 9, 2012, at 4:33 PM, Rahul Somasunderam wrote:
> I parsed this message with HAPI 1.2
>
> MSH|^~\&|ABCDEFG&1.23.4&ISO|CDS|LABADT|MCM|20120109|SECURITY|ADT^A04|MSG00001|P|2.4
> EVN|A01|198808181123
> PID|||R2D002^^^BADFAC&1.2.8.9.3.4.2.8&ISO||Smith^Michael^^^Mr||19800930|M||2106-3|1205
> S Main STREET^^San
> Jose^CA^27401-1020|GL|(919)379-1212|(919)271-3434~(919)277-3114||S||ADT_PID18^2^M10|123456789|9-87654^NC
> NK1|1|JONES^BARBARA^K|SPO|||||20011105
> NK1|1|JONES^MICHAEL^A|FTH
>
> I'm getting a HL7Exception for the phone fields being styled. However the
> exception contains bad data.
>
> ca.uhn.hl7v2.model.DataTypeException: Failed validation rule for value
> "(919)379-1212": The field/component is withdrawn from the current HL7
> version and should not be used. See the JavaDoc for WithdrawnDatatypeRule for
> information on disabling this rule.: Segment: PID (rep 4) Field #13
>
> There is just one rep of PID, but the exception says there's a problem in rep
> 4.
>
> I'm using a Canonical MCF with 2.6 as version, if that makes any difference.
>
> R,
> rahul
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev_______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel