Hi all,
to be more precise, in HL7 versions before 2.3, PID-2 is of composite type
CK which has NM primitives in its first components. As of v2.3, PID-2 is CX
which has ST primitives.
Your error message obviously stems from parsing a HL7 v2.1 message and is
correct with regard to the v2.1 specification.
If you want to relax validation for NM, please be aware that then all NM
fields won't be validated correctly anymore. If you can live that, ok.
Another simple (but dirty!) possibility is to replace the '2.1' with '2.3'
in the pipe-encoded HL7 message before it gets parsed.
cheers
Christian
Serbulent Unsal-3 wrote:
>
> On Thursday 03 December 2009 04:15:10 pm Janine Graul wrote:
>> Hi Frédéric,
>>
>> thank you for your quick reply.
>>
>> I did not wrote my own ValidationContextImpl, but I did something like
>> this:
>>
>> ValidationContextImpl context =
>> (ValidationContextImpl)pipeParser.getValidationContext(); List<?> list =
>> context.getPrimitiveRuleBindings();
>> for (Object object : list) {
>> RuleBinding rb = (RuleBinding) object;
>> if(rb.getScope().equals("NM")) {
>> rb.setActive(false);
>> }
>> }
>>
>> It worked also, but somebody told me that PID-2 ist not NM type. So I
>> searched and found this:
>> http://ihe.univ-rennes1.fr/HL7/segments.php?seg_code=PID
>>
>> If you click an the CX (Datastructure for PID-2) you see that the first
>> sequence is defined as ST. Or is this incorrect?
>>
>> That is what I don't understand. I don't like the solution above, because
>> I
>> want to validate "real" NM fields the way hapi does.
>>
>> Janine
>
> Hi,
>
> In IHE profiles datatypes can be different from HL7 specs. For Hapi please
> look
> at HL7 Official Guides.
>
> --
> Serbulent Unsal | Software Expert
> GSM : +90 555 697 50 46 | Tel : +90.312.478 48 00
> Akgun Softwares & Services Pvt. Ltd.
> Çetin Emeç Bulv. 4. Cad. No:5/3
> 06460 A.Öveçler / ANKARA
>
> This e-mail and its attachments are private and confidential to the
> exclusive
> use of the individual or entity to whom it is addressed. It may also be
> legally confidential. Any disclosure, distribution or other dissemination
> of
> this message to any third party is strictly prohibited. If you are not the
> intended recipient, you may not copy, forward, send or use any part of it.
> If
> you are not the intended recipient or the person who is responsible to
> transmit to the intended recipient, please contact the sender by reply
> e-mail
> and destroy all copies of the original message and its attachments.
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
--
View this message in context:
http://old.nabble.com/Failed-validation-rule-PID--2-tp26625837p26632438.html
Sent from the hl7api-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel