发布新帖

查找

讨论 (1)1
登录或注册以继续
问题
· 二月 24, 2023

IHE Inbound CCD Result Categorisation Customisation

Hi,

I'm currently working on an IHE implementation, and we've hit some issues around categorising inbound CCD results (i.e. mapping lab and rad results to their relevant SDA types).

I know that this is handled by the \CSP\xslt\SDA3\CDA-Support-Files\Import\Section-Modules\DiagnosticResults.xsl out of the box which can be overridden to use different logic, but I was wondering whether there's a standard/best practice approach for handling different sets of logic depending on the supplier of the CCD? We're going to be onboarding multiple data sources, so we're likely going to end up with lists of thousands of procedure codes, each mapped to a different specialty (e.g. Rad, Cell Path, Micro etc.), so I just wanted to get some thoughts on whether there's a common approach to make this as reusable (and painless) as possible.

This may end up being more of an XSLT-related question as I assume it'll likely involve referencing an external list of values from within a particular stylesheet, or is there maybe a way to call out to some objectscript to use a LUT?

Any advice or ideas would be great.

Thanks!

2 Comments
讨论 (2)3
登录或注册以继续
文章
· 二月 22, 2023 阅读大约需 4 分钟

Export to JSON - relationships and inheritance

Why I've decided to write this

Once again I had a challenge that costed me some time and a lot of testing to reach the best solution. And now that I've managed to solve it, I'd like to share a little bit of my knowledge.
 

What happened?

In a namespace there were a lot of similar classes, so to make them simpler there were a superclass with comon properties. Also, there are relationships between them. I had to export one of them to JSON, but I couldn't change the superclasses, or I would break down the flow of many other integrations.

What made it all difficult was the problem that my JSON couldn't have the properties of the superclass. Ouch! I could export and take them off one by one, but.. what if someone changes the superclass?

And even worse... what happens with the relationships? If we export a relationship, we export another whole object, with all of its properties, but I couldn't have them either in the JSON.

 

A light in the end of the tunnel

Luckily, there is always a light in the end of the tunnel, and my light is the XData.

The solution is very simple: lets call the class that I had to export ClassToExport, the class with the relationship RelatedClass and the superclass SuperClass.

We'll have:

Class project.SuperClass Extends %Persistent {
    Property CommonProperty As %String;
}
Class project.ClassToExport Extends project.SuperClass {
    Property PropertyToExport As %String;
    Relationship RelationshipToExport As project.RelatedClass [ Cardinality = many, Inverse = RelatedProperty ];
}
Class project.RelatedClass Extends project.SuperClass {
    Property DontExportThis As %String;
    Property ExportThis As %String;
    Relationship RelatedProperty As project.ClassToExport [ Cardinality = one, Inverse = RelationshipToExport ];
}

 

In ClassToExport, I write the XData: there must be a name and a tag <Mapping> with the tags <Property>. The tag <Mapping> carries the xml namespace, xmlns="http://intersystems.com/jsonmapping", and the tags <Property> carry the properties described in %JSON.MappingProperty¹ (of the official documentation).

 

The magic trick is that everything that is not specified in the mapping will be ignored. So, if we change ClassToExport to:

Class project.ClassToExport Extends project.SuperClass {
    Property PropertyToExport As %String;
    Relationship RelationshipToExport As project.RelatedClass [ Cardinality = many, Inverse = RelatedProperty ];
    XData MappingJSON {
        <Mapping xmlns = "http://intersystems.com/jsonmapping">
            <Property Name = "PropertyToExport" FieldName = "Property-JSON"/>
            <Property Name = "RelationshipToExport" FieldName = "RelatedClassJSON"/>
        </Mapping>
    }
}

we'll have in the JSON something like:

{
   "Property-JSON":"value",
   "RelatedClassJSON": [
      {"CommonProperty":"value", "DontExportThis":"value", "ExportThis":"value"},
      {"CommonProperty":"value", "DontExportThis":"value", "ExportThis":"value"}
   ]
}

So the names of the ClassToExport are ready, and only the properties we want are in the JSON, but the RelatedClass still has work to do.

 

Then, we change RelatedClass with an XData with the same name to arrange their properties:

Class project.RelatedClass Extends project.SuperClass {
    Property DontExportThis As %String;
    Property ExportThis As %String;
    Relationship RelatedProperty As project.ClassToExport [ Cardinality = one, Inverse = RelationshipToExport ];
    XData MappingJSON
    {
        <Mapping xmlns = "http://intersystems.com/jsonmapping">
            <Property Name = "DontExportThis" Include="None"/>
            <Property Name = "ExportThis" Include="INOUT"/>
            <Property Name = "CommonProperty" Include="INOUT"/>
        </Mapping>
    }
    
    
}

 

so we'll have in the JSON somehting like:

{
   "Property-JSON":"value",
   "RelatedClassJSON": [
      {"CommonProperty":"value", "ExportThis":"value"},
      {"CommonProperty":"value", "ExportThis":"value"}
   ]
}

which is what we want.

It is interesting to observe that for the property "DontExportThis", I specified a tag with INclude="None". This is the same of not putting any ta at all for that property.

 

¹ read also %JSON.PropertyParameters to understant what each property does.
 

Thank you for reading and I hope the article was useful!

Feel free to ask me for doubts or to get in touch if you think I can help in some specific case. I'll be happy to help!

讨论 (0)1
登录或注册以继续
InterSystems 官方
· 二月 22, 2023

Announcing developer preview #2 for InterSystems IRIS, IRIS for Health, & HealthShare Health Connect 2023.1

 InterSystems announces its second developer preview, as part of the developer preview program for the 2023.1 release. Many updates and enhancements have been added in 2023.1 and there are also brand-new capabilities, such as production-ready support for Columnar Storage, ability to use Bulk FHIR, and support to MacOS 13 Ventura. Some of these features or improvements may not be available in this current developer preview.

Future preview releases are expected to be updated biweekly and we will add features as they are ready. Please share your feedback through the Developer Community so we can build a better product together.

Documentation can be found at these links below. They will be updated over the next few weeks until launch is officially announced (General Availability - GA):

In addition, check out this link for upgrade information related to this release.

As usual, Extended Maintenance (EM) releases come with classic installation packages for all supported platforms, as well as container images in Docker container format.  For a complete list, refer to the Supported Platforms document.

Installation packages and preview keys are available from the WRC's preview download site or through the evaluation services website (use the flag "Show Preview Software" to get access to the 2023.1).

Container images for both Enterprise and Community Editions of InterSystems IRIS and IRIS for Health and all corresponding components are available from the new InterSystems Container Registry web interface. For additional information about docker commands, please see this post: Announcing the InterSystems Container Registry web user interface.

The build number for this developer preview release is 2023.1.0.196.0.

For a full list of the available images, please refer to the ICR documentation. Alternatively, tarball versions of all container images are available via the WRC's preview download site. 

讨论 (0)1
登录或注册以继续
公告
· 二月 16, 2023

In-Person Classroom Training returns to Cambridge!

GREAT NEWS!!

Starting in April the InterSystems classroom course schedule will once again include public in-person classroom training in Cambridge.

Many benefits are offered by being physically in the classroom with our instructors, so we invite you to return to in-person training for a more personalized educational experience.

In-person courses and dates currently offered are:

Register for a Course

Complete Course Schedule

For any questions please contact larry.finlayson@intersystems.com .

讨论 (0)1
登录或注册以继续