Nilled representedCustodianOrganization includes xsi:nil attribute
fieranmason@gmail.com
#1 Posted : Friday, July 19, 2013 1:25:29 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/8/2013(UTC)
Posts: 22
Points: 66
Location: University of Victoria

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hello Everest,
We have been working quite happily with Everest for roughly two weeks now and have run across an issue.

We have been using Everest 1.2 and have attempted an upgrade to 1.2.3 to remedy the situation but it has not solved our problem

The issue - we are trying to generate a CDA with a representedCustodianOrganization who's NullFlavor is No Information. The subsequent document which is generated includes an attribute xsi:nil with value "true". This is contrary to the CDA schema implementation to which we must conform. Is there a way to exclude this attribute at document generation time?

Thanks
Fieran
justin.fyfe1
#2 Posted : Friday, July 19, 2013 1:36:18 PM(UTC)

Rank: Administration

Medals: Mobile Tech Grasshopper: Mobile Tech GrasshopperHealth Informatics MVP

Groups: Registered, Administrators
Joined: 7/22/2010(UTC)
Posts: 96
Points: 297
Man
Location: Hamilton, ON

Thanks: 2 times
Was thanked: 17 time(s) in 17 post(s)
Hello Fieran,

The issue appears to be related with the XML ITS1 formatter. I believe XML ITS1 requires that a traversable association with a null flavor my carry xsi:nil, however that rule may just apply to messaging and not documents. I will add an option to the XmlIts1Formatter to prevent this behavior as a configuration option. However I won't be able to do this until Monday. In the meantime you can override the XML ITS1 formatter's WriteNullFlavorUtil method:

Code:

public class CustomCdaFormatter : XmlIts1Formatter
{
    public override void WriteNullFlavorUtil(XmlWriter s, MARC.Everest.Interfaces.IGraphable nullFlavor)
    {
        s.WriteAttributeString("nullFlavor", Util.ToWireFormat(nullFlavor));
    }
}


Then just use the custom formatter :

Code:

// XmlIts1Formatter fmtr = new XmlIts1Formatter();
CustomCdaFormatter fmtr = new CustomCdaFormatter();


Cheers
-Justin
justin.fyfe1
#3 Posted : Monday, July 22, 2013 9:45:42 AM(UTC)

Rank: Administration

Medals: Mobile Tech Grasshopper: Mobile Tech GrasshopperHealth Informatics MVP

Groups: Registered, Administrators
Joined: 7/22/2010(UTC)
Posts: 96
Points: 297
Man
Location: Hamilton, ON

Thanks: 2 times
Was thanked: 17 time(s) in 17 post(s)
Hello Fieran,

The new version of the framework (1.2.4) contains a new setting which will suppress the xsi:nil attribute for you, this can be controlled via:

Code:

XmlIts1Formatter fmtr = new XmlIts1Formatter();
fmtr.Settings |= SettingsType.SuppressXsiNil;
fieranmason@gmail.com
#4 Posted : Tuesday, July 23, 2013 9:02:43 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/8/2013(UTC)
Posts: 22
Points: 66
Location: University of Victoria

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Thanks Justin
Worked like charm.

Fieran
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

SoClean Theme By Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.092 seconds.