Hi Ryan,

IHE defines for PDQ queries the field QPD-3 to be a repeatable and of type
QIP.
The HL7 standard does not define any explicit type for QPD-3 ("Varies"),
and that's why the parser (using the default model class factory) assigns
an "unknown" or generic data type.
You can use the Terser class to read the data e.g. from QPD-3(0)-1,
QPD-3(0)-2 etc.

You can define a custom HL7 model for this message, see the example
http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/CustomModelClasses.htmlon
how to do this with HAPI.
For a number of HL7 models for IHE transactions this has been done already,
e.g. in the Open eHealth Integration Platform (IPF). The model definitions
are here:
https://github.com/oehf/ipf/tree/master/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions
.

Regarding the ValidationException: you can assign any other set of
Validation Rules to your  HapiContext or Parser, e.g.
DefaultValidationWithoutTN that contains all validation rules except for
the telephone number data type.

cheers
Christian



2013/5/3 Ternier, Ryan <ryan.tern...@cgi.com>

>  Hey James,****
>
> ** **
>
> Thanks for the reply – sorry it’s taken me a bit to get back to you.****
>
> ** **
>
> What part of the HAPI code are you talking about with that snippet there?*
> ***
>
> ** **
>
> I’ve written a quick custom parser for this because I wasn’t able to
> figure out how to get HAPI “Happy” with it.****
>
> ** **
>
> The way Cerner has documented some of this HL7v2 messaging helps me
> understand it, but not sure where to go from there.****
>
> ** **
>
> |@PID.5.1^JOHNSON|****
>
> ** **
>
> The first component of this data type is a string (ST) and contains the
> segment field name. I believe this is what you were referencing with your
> post, but I’m not sure where to implement it.****
>
> The second component contains the field values.****
>
> ** **
>
> The QPD segment is where my troubles come in when working with HAPI, where
> should I explore putting that bit of code you pasted?****
>
> ** **
>
> Please also consider the following;  ****
>
> ** **
>
> MSH|^~\&|Bar|Foo|CERNER|Foo|20130320095727||RSP^K22|49550||D|2.4****
>
> MSA|AA|49550||****
>
> QAK|49550||OK****
>
> QPD|Q22^Find
> Candidates|49550|@PID.5.1^Audi~@PID.5.2^baby~@PID.7^20110815000000||Exact*
> ***
>
> PID|1|||123123123123^^^Id Number^NHN|AUDI^CAPTAINKIRK^||19770209|F****
>
> QRI|200|EXACT****
>
> PID|2||123123123^^^PAMRN^MRN|123123123^^^Id
> Number^NHN|AUDI^UNICORN^||19871128|F|||4231 PINE ST^^REGINA^SK^V6Y3E9^~1896
> MANTON RD^^REGINA^SK^V5T7Y3^||5559991234^****
>
> QRI|31|EXACT****
>
> PID|3|||123123123^^^Id Number^NHN|AUDI^GODZILLA^||19890214|F|||1871
> BALFOUR BLVD^^QUESNEL^BC^V6J2W9^CA^MAIL||604112-1111^HOME|778334-3333
> ^BUS^^^^^^8888****
>
> QRI|6|EXACT****
>
> ** **
>
> ** **
>
> A second parsing issue:****
>
> ** **
>
> It also blows up when parsing the last bits of the PID’s (Phone numbers,
> etc.) Error I’m getting:****
>
> ** **
>
> Failed validation rule for value "6049993586": 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****
>
> ** **
>
> PID Field #13 is a HOME phone number - 40,XTN,O,r – PH.****
>
> ** **
>
> Is there a place to modify the RegEx used for this PID Field, or ignore
> it? ****
>
>
> ****
>
> ** **
>
> Cheers,****
>
>
> Ryan****
>
>
>
>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to