From: Ian V. <Ian...@he...> - 2018-09-02 22:28:30
|
Am currently trialling Hapi 2.3 on our set of message definitions and message tests from sending systems. One of the sending systems never fills out the MFE Primary Key Value Type field. In version 2.2 of Hapi that does not cause an exception when parsing. If version 2.3 it does. ca.uhn.hl7v2.HL7Exception: A datatype for MFE- must be specified in 4- . at ca.uhn.hl7v2.parser.FixFieldDataType.fix(FixFieldDataType.java:165) at ca.uhn.hl7v2.parser.FixFieldDataType.fixMFE4(FixFieldDataType.java:132) at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:406) at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:1169) at ca.uhn.hl7v2.model.AbstractMessage.parse(AbstractMessage.java:196) at au.gov.qld.health.sit.hl7.MFNTest.TestMFN(MFNTest.java:51) Just in case it helped I tried setting the parser configuration for Obx2 default and invalid, it may have set some overall default. ======= Test Case Code ============== @Test public void TestMFN() throws HL7Exception { MFN_M02 mfnM02 = new MFN_M02(); mfnM02.getParser().getParserConfiguration().setValidating(false); mfnM02.getParser().getParserConfiguration().setDefaultObx2Type("ST"); mfnM02.getParser().getParserConfiguration().setInvalidObx2Type("ST"); String message = "MSH|^~\\&|SENDER||RECEIVER||20120618080043||MFN^M02|201206180800442450824|P|2.3|||AL|AL|AUS|ASCII|ENG\r" + "MFI|PRA||UPD|||NE|\r" + "MFE|MUP|||BAEE|\r" + "STF|BAEE||SURNAME^GIVEN^^^DR^^L||||I|||12345678^WPN^PH~87654321^WPN^FX|111 EXAMPLE TERRACE^^BRISBANE^^4000^^M||20120618||\"\"|P||\"\"|||||||||\r" + "PRA|BAEE||RD||||||\r"; mfnM02.parse(message); String mfe5 = mfnM02.getMF_STAFF(0).getMFE().getMfe5_PrimaryKeyValueType(0).getValue(); String mfe4 = mfnM02.getMF_STAFF(0).getMFE().getMfe4_PrimaryKeyValueMFE(0).getData().encode(); // System.out.println(mfnM02.printStructure()); } ==================================== Note the only message structures imported are the 2.4 messages. This didn't help. Is there a method to make similar settings to the OBX default/invalid for the MFE segment, or an overall default behaviour? Thanks Ian Vowles Integration Specialist Metro North Integration Centre Citilink Lobby 2, Level 3 153 Campbell St Bowen Hills QLD 4006 Ph: (07) 3646 2557 Ian...@he...<mailto:Ian...@he...> metronorth.health.qld.gov.au<https://metronorth.health.qld.gov.au/> [Values in Action] [Facebook]<http://www.facebook.com/metronorthhhs> [Twitter]<http://www.twitter.com/MetroNorthHHS> [LinkedIn]<http://www.linkedin.com/company/metro-north-hospital-and-health-service> follow us on social media ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** |