PN Datatype - Serialisation
xmlcoder
#1 Posted : Thursday, February 23, 2012 7:29:47 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 18
Points: 54

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
I have been trying ( and failing ) to get all of the attributes of the PN to be included in the XML serialisation.

I dont seem to get the "validTime" or "updateMode" attributes to appear - is this missing from the code?
justin.fyfe1
#2 Posted : Thursday, February 23, 2012 8:26:09 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,

I think that the updateMode is only an R2 element (I can't see it in the NE2008 or 2010 xsds that I have), so that would explain the missing updateMode on the render. When you parse the IResultDetail array returned by the formatter do you see an instance of the UnsupportedDatatypeR1PropertyResultDetail class in the list?

As per valid time, I believe you have found a bug! ValidTimeLow and ValidTimeHigh are HXIT attributes from the ISO 21090:2009 spec (R2), but I see a work item in our internal tracking log to turn this into <validTime>, I guess it never got implemented. I sense a patch :)

On another note; do you have a datatypes-base XSD that is used in your jurisdiction? I may be able to create a compatibility mode within the R1 serializer that adapts the formatting to include any restrictions and/or extensions for your jurisdiction. Currently the R1 formatter only adapts to NE2008/2010 via the Universal compatibility mode and the Canadian extensions via the "Canadian" compatibility mode.

Cheers
-Justin
xmlcoder
#3 Posted : Monday, February 27, 2012 5:50:44 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 18
Points: 54

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
Hi

I can live without "Update Mode", I was just testing the datatype serialisation, I don't need that attribute at the moment.
I do however need to handle "validTime" in PN and "useablePeriod" in TEL, both of which appear to be missing. I notice that the "useablePeriod" in AD is present though.

If you could patch this, then it would be very much appreciated.

With regards to the UK "localisation" I have made a number of changes to the serializer code to accommodate this and think I have just about got it all covered,so far at least.

thanks
xmlcoder
#4 Posted : Monday, February 27, 2012 6:05:13 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 18
Points: 54

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
I should have mentioned, the models I am working with are all CDA R2.
justin.fyfe1
#5 Posted : Tuesday, February 28, 2012 10:16:35 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)
Issue 2102 has been resolved and a patch attached to the issue http://te.marc-hi.ca/issue/view.aspx?project=af66d54e-d41e-4ac1-8b44-d0d3ca6cabf0&issue=cf359781-13ba-40d6-b68f-17cb3edac6d7.

I was digging through our internal discussions about validTime on the EN type and found that we had planned to use HXIT's validTimeLow and validTimeHigh to have 'equivalent' functionality. Some team members felt that having HXIT's validTimeLow and validTimeHigh (ISO 21090 properties) appear with a validTime property would be confusing, so we decided to use the HXIT elements to construct the IVL for R1.

The following code constructs a full IVL:
Code:

EN instance = new EN();
instance.Part.Add(new ENXP("Smith", EntityNamePartType.Family));
instance.ValidTimeLow = (TS)"20090101";
instance.ValidTimeHigh = new TS() { NullFlavor = NullFlavor.NotApplicable };


Results in :

Code:

<name>
     <family partType="FAM">Smith</family>
     <validTime>
          <low value="20090101" />
          <high nullFlavor="NA"/>
     </validTime>
</name>


Parsing an EN with a <validTime> element will result in the validTimeLow and validTimeHigh properties being populated. The useablePeriod property for AD and TEL were fixed in the 1.0 release of Everest.

Cheers
-Justin
xmlcoder
#6 Posted : Wednesday, February 29, 2012 5:09:14 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 18
Points: 54

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
Thanks for the quick reply Justin. I'll download the 1.0 version in the next few days, and then make the localisation changes (if required).

I think I might have some bigger issues as I think I am using some obsolete methods at the moment when I am serialising the data types.
What is the most efficient way to serialise data type for CDA R2 using everest 1.0?
justin.fyfe1
#7 Posted : Thursday, March 1, 2012 9:02:09 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)
The best way to turn on the CDAr2 compatibility mode is :

Code:

DatatypeFormatter df = new DatatypeFormatter()
{
    CompatibilityMode = DatatypeFormatterCompatibilityMode.ClinicalDocumentArchitecture,
    ValidateConformance = false
};


As per the obsolete methods, if you've been using the snapshots (January or February) you should be fine. The changelog notes for removing obsolete methods are mostly targeted at those using RC1 versions and earlier, most of the obsolete attributes are non-fail (i.e. won't cause a compile fail, but just a warning). I believe there will only be minor changes required for your code.

If you need any help please don't hesitate to ask.

Cheers
-Justin
1 user thanked justin.fyfe1 for this useful post.
xmlcoder on 3/2/2012(UTC)
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.108 seconds.