Using customized cda schema
psharp
#1 Posted : Tuesday, November 12, 2013 3:10:17 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/12/2013(UTC)
Posts: 19
Points: 57

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Hi Everest,

I've been working with Fieran these last couple months. I've come across a requirement in our specification to use some custom elements that were added to an POCD_MT00040.Observation element. Are there any examples of how to extend these objects? In this case I need to add a field called confidentialityCode with a type of CE.

Phil
justin.fyfe1
#2 Posted : Tuesday, November 12, 2013 3:18:20 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,

You can use the same technique as described in this post here to add elements through object orientation.

Cheers
-Justin
psharp
#3 Posted : Tuesday, November 12, 2013 3:44:46 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/12/2013(UTC)
Posts: 19
Points: 57

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Ahh yes. I thought I had seen this posted somewhere but couldn't find it. Thanks, I'll give it a go shortly.

Phil
psharp
#4 Posted : Monday, December 23, 2013 2:17:19 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/12/2013(UTC)
Posts: 19
Points: 57

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Hi Justin,

Happy Holidays. I finally had some time to really give this a solid go. I was able to follow the example in the other post with no problems and the multiple race codes were generated. However when I tried to create a custom Observation I receive the following validation error:
Quote:
Type E2E_DTC.Extensions.ObservationWithConfidentialityCode is not a valid choice according to available choice elements and won't be formatted

This results in no xml being generated for that element.

Code:

    [Structure(Model = "POCD_MT000040", Name = "Observation", StructureType = StructureAttribute.StructureAttributeType.MessageType)]
    public class ObservationWithConfidentialityCode : Observation
    {
        [Property(Name = "confidentialityCode", PropertyType = PropertyAttribute.AttributeAttributeType.NonStructural)]
        public CE<x_BasicConfidentialityKind> ConfidentialityCode { get; set; }
    }


And then registered the same way as the example via:

Code:

     MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter fmtr = new MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter();
     fmtr.GraphAides.Add(new ClinicalDocumentDatatypeFormatter());
     fmtr.Settings |= SettingsType.SuppressXsiNil;
     fmtr.Settings |= SettingsType.SuppressNullEnforcement;
     fmtr.Settings |= SettingsType.AlwaysCheckForOverrides;
     fmtr.RegisterXSITypeName("POCD_MT000040UV.Observation", typeof(ObservationWithConfidentialityCode));


Any thoughts on what I did wrong/didn't setup correctly? (Using Everest 1.2.10)
justin.fyfe1
#5 Posted : Thursday, January 16, 2014 10:18:24 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)
Hi Phil,

This is a bug with the formatter. I will take a look at it and fix asap and will post a new version which addresses the issue.

Good find!
-Justin
psharp
#6 Posted : Thursday, January 23, 2014 2:35:58 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/12/2013(UTC)
Posts: 19
Points: 57

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Thanks Justin,

Looks like it's serializing as expected now. I get a validation error however: Property 'UpdateMode' in 'ANY' is not supported by this datatype formatter

Also is it possible to change the namespace of this element to be something other than the default namespace of the document?

justin.fyfe1
#7 Posted : Thursday, January 23, 2014 5:05:35 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)
That error is ok, it just means that there was some data that doesn't have a home in the XML ITS data types R1 (the CDA data types) so it couldn't represent it on the wire.

I don't think there is a way to change the namespace of serialization, but I will check into it for you and get back.

There was a feature request that came in for our 1.4 dev branch that wanted to allow custom namespaces to be used.
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.048 seconds.