Ok, thanks for your help !
Do you know which field should be used instead of XTN-1 ? I would like to keep
validation and put the telephone number into the right field.
________________________________
De : [email protected] [mailto:[email protected]] De la part de James
Agnew
Envoyé : lundi 26 juillet 2010 14:54
À : zze-OR HVA MEYER R ext RD-BIZZ-GRE
Cc : [email protected]
Objet : Re: [HAPI-devel] HL7 validation with "Phone Number Home" failed
Hi Raphaëlle,
Basically, XTN-1 is withdrawn in HL7 2.6, and is not supposed to be used, so
HAPI by default enforces a maximum length of 0 on it.
The error message you get is a bit misleading I would admit, so in the next
release I think we should do something to address that.
The easiest way to work around this is to disable validation on your parser:
parser.setValidationContext(new NoValidation());
Cheers,
James
On Mon, Jul 26, 2010 at 5:22 AM, <[email protected]> wrote:
Hi all,
I'm trying to validate a HL7 message with Hapi, but I always get this
error :
ca.uhn.hl7v2.model.DataTypeException: Failed validation rule for value
"999-9999": Maxumim size <= 0 characters: Segment: PID (rep 0) Field #13
My message contains a phone number in the field PID-13 (Phone Number
Home) subfield 1 (Telephone Number). I would like to keep my phone number in
the subfield 1 (and not to put it in subfield 12 (Unformatted Telephone
Number)).
Here is my code :
Parser parser = new GenericParser();
parser.setValidationContext(new DefaultValidation());
Message msg = parser.parse(hl7Message);
Here is my complete message :
String deviceObservationMessage =
"MSH|^~\\&|AcmeInc^ACDE48234567ABCD^EUI-64||||20090713090030+0000||ORU^R01^ORU_R01|MSGID1234|P|2.6|||NE|AL|||||IHE
PCD ORU-R01 2006^HL7^2.16.840.1.113883.9.n.m^HL7\r"
+ "PID|||1^^^Imaginary Hospital^PI
||Doe^John^Joseph^^^^L^A|||M|||||0123456789\r"
+
"OBR|1|AB12345^AcmeAHDInc^ACDE48234567ABCD^EUI-64|CD12345^AcmeAHDInc^ACDE48234567ABCD^EUI-64|182777000^monitoring
of patient^SNOMED-CT|||20090813095715+0000\r"
+
"OBX|1|CWE|68220^MDC_TIME_SYNC_PROTOCOL^MDC|0.0.0.1|532224^MDC_TIME_SYNC_NONE^MDC|||||R\r"
+
"OBX|2||528391^MDC_DEV_SPEC_PROFILE_BP^MDC|1|||||||X|||||||0123456789ABCDEF^EUI-64\r"
+
"OBX|3||150020^MDC_PRESS_BLD_NONINV^MDC|1.0.1|||||||X|||20090813095715+0000\r"
+
"OBX|4|NM|150021^MDC_PRESS_BLD_NONINV_SYS^MDC|1.0.1.1|120|266016^MDC_DIM_MMHG^MDC|||||R\r"
+
"OBX|5|NM|150022^MDC_PRESS_BLD_NONINV_DIA^MDC|1.0.1.2|80|266016^MDC_DIM_MMHG^MDC|||||R\r"
+
"OBX|6|NM|150023^MDC_PRESS_BLD_NONINV_MEAN^MDC|1.0.1.3|100|266016^MDC_DIM_MMHG^MDC|||||R\r"
+
"OBX|7|DTM|67975^MDC_ATTR_TIME_ABS^MDC|1.0.0.1|20091028123702||||||R|||20091028173702+0000\r";
I tried with different phone number formats ('"0123456789",
"(415)925-0121X305", "(999)999-9999", "999 (999)999-9999", "999 (999)999-9999
X99999 B99999 C any text") but nothing works !
Does someone know what I need to do in order to validate my message ?
Thanks for your help !
Raphaëlle
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel