From: James A. <ja...@ja...> - 2014-05-07 15:16:45
|
HI Oliver, I'm fairly sure XPN.1 is a composite type, so that message looks invalid to me. I believe specifically that it should have a child element called <FN.1> or something similar. I'm on my phone at the moment so I can't check, but if you create a message instance in code with XPN populated and encode it using the XmlParser you will get an example of how XPN.1 should look. Do you have control over the system creating the data? If not, you may need to correct the message manually before parsing it. You could also go the route of creating a custom structure for your message with the datatype in XPN.1 redefined to something primitive, but that would be a lot of effort.. Cheers, James On Wed, May 7, 2014 at 6:27 AM, Oliver Wilkie <oli...@gm...>wrote: > Hi! > > I’m a first-time user of the HAPI library (version 2.2) and am seeing some > strange behaviour. > > I’m parsing in an ADT A01 Hl7v2.4 message which has the following patient > info section > > <hl7v2:PID.5> > <hl7v2:XPN.1>SMITH</hl7v2:XPN.1> > <hl7v2:XPN.2>FREDRICA</hl7v2:XPN.2> > <hl7v2:XPN.3>J</hl7v2:XPN.3> > <hl7v2:XPN.5>MRS</hl7v2:XPN.5> > <hl7v2:XPN.7>L</hl7v2:XPN.7> > </hl7v2:PID.5> > > When I parse the message using the DefaultHapiContext() with no > validation() the XPN.1 value disappears. XPN.2, XPN.3, XPN.5, and XPN.7 are > there still but XPN.1 isn’t. > > I look across the rest of my message and see that all the XPN.1s and > XAD.1s are missing. > > What am I doing wrong? > > Thanks > Oli > > > *Oliver Wilkie* > ( 07854601573 | 2 uk.linkedin.com/in/owilkie 8 o<rob...@im...> > liv...@gm... > > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find > out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |