Extracting CCD document values using MDHT via Mirth - hl7

I am trying to use MDHT tools to extract values from a CCD document via Mirth. I am doing this in the following way.
Downloaded Java runtime libraries and placed them in Mirth's custom-lib folder and wrote sample code to extract some patient values in Mirth's transformer & Deploy section.
Code in transformer.
// Load the CCD Document
var doc = org.openhealthtools.mdht.uml.cda.util.CDAUtil.load(new
java.io.ByteArrayInputStream(messageObject.getRawData().getBytes("UTF-8")));
// Get CCD Document Sections to be parsed
var docPatientRole = doc.getRecordTargets().get(0).getPatientRole();
var docPatient = docPatientRole.getPatient();
var docPatientName = docPatient.getNames().get(0);
// Map Patient Identity Fields to Mirth Channel Map Variables
channelMap.put('patientFirstName',
docPatientName.getGivens().get(0).getText());
channelMap.put('patientLastName',
docPatientName.getFamilies().get(0).getText());
channelMap.put('patientGenderCode',
docPatient.getAdministrativeGenderCode().getCode());
channelMap.put('patientDateOfBirth', docPatient.getBirthTime().getValue()); // YYYYMMDD
Can anyone help me with the code as I am new to JavaScript and also I am not aware of all the functions in the .jar files so as to access all the other components in a CCD.
I am currently stuck at this point. I need to access all the sections/Components in a CCD. Can anyone please redirect me to any examples/tutorials (via Mirth) related to each section. I have already looked at some links guide/developers guide but all links are Dead and not working.
Any help is appreciated.

"but all links are dead and not working"
I know that feel... it's frustrating.
For a start, you need to define a type and a version of the document that you want to consume. Check out this article What version of CCDA Document is this? Then you need to find an Implementation Guide (IG) for this type of documents so you know its structure (for example, HL7 C-CDA Release 1.1 IG is available here). If you know the document type, you know what data can be extracted from the document.
I'm not sure about a programming language that you use in your question. Is it Java or JavaScript? My examples are in Java:
CCDA REST API - package com.appliedinformatics.cdaapi.parser (RecordTarget, Medications, Problems, Results).
MDHT Developers Guide: Consume CDA Content using MDHT API (Allergies).
MDHT Consolidated CDA Validator - GitHub
A reference C-CDA Validator - GitHub
MDHT CDA Maven example - GitHub

Related

How to create docs for spring-integration endpoint

I'm using a SpringBoot 2.2.6 WebApplication with Maven 3. I'm also using spring-integration-http for my endpoint, that's mean that my endpoint are similar to follow:
#Bean
public IntegrationFlow test(CommonTransformer<TestDTO, String, TestMapper> testTransformer, Jackson2JsonObjectMapper obj) {
return IntegrationFlows.from(Http.inboundGateway("/foo/{name}")
.requestMapping(m -> m.methods(HttpMethod.GET))
.payloadExpression("#pathVariables.name")
.replyChannel(Constants.REPLY)
.requestPayloadType(String.class))
.transform(testTransformer)
.transform(new ObjectToJsonTransformer(obj))
.channel(Constants.HTTP_REQUEST)
.get();
}
Now I would like to create a OpenApi docs for my endpoint and, if it's possible, a swagger GUI interface to test it.
I have read several official/unofficial docs and I find interesting docs here another much interesting example here.
My preoccupation is that many of this articles are dated before 2020 (for example one of these use deprecated annotation likes #EnableSwagger2Mvc) but I can't managed to find out something more updated.
Is anyone aware of a more up-to-date procedure?
-------------------------- UPDATE --------------------------
First of all Thanks #ArtemBilan for yor response.
Yes I read that article and I'm not new to documenting my REST API. With springdoc-openapi-ui I'm able to create a .json file that, if putted in some editor like http://swagger.io or if used with a specific maven plugin can create a client (in both spring java and Angular language) ready for use.
I have tried the springfox way (above) to documenting my spring-integration-http but it sucks! It generate some useless files to reproduce the call via CURL..
Is not what I'm looking for. I must (the STO asks) documenting my endpoint like the .yaml you can find for the example Swagger Pet Store.
And it seems there's no way with this spring-integration-http to do so..
Any help is appreciate.

IBM Integration Bus and xsd:anyType

I'm working with IIB v9 mxsd message definitions. I'd like to define one of the XML elements to be of type xsd:anyType. However, in the list of types I can choose from, only anySimpleType and anyUri are possible (besides all other types like string, integer, etc.).
How can I get around this limitation?
The XMLNSC parser supports the entire XML Schema specification, including xs:any and xs:anyType. In IIBv9 you should create a Library and import your xsds into it. Link your Application to the Library and the XMLNSC parser will find and use the model. You do not need to specify the name of the Library in the node properties; the XSD model will be automatically available to the entire application.
You do not need to use a message set at all in IIBv9 and later versions.
The mxsd file format is used only by the MRM (not DFDL) parser.
You shouldn't use an MXSD to model your XML data, use a normal XSD.
MXSD is for modelling data for the DFDL parser, but you should use the XMLNSC parser for XML messages and define them in XSDs, in which you can use anyType.
As far as I know DFDL doesn't support anyType.

How can find what is included in the #containment annotation?

How can find what is included in the #containment annotation? I can not find that in the documentation online, that refers only to grammar-spec and nothing more? I'm talking about trying to obtain information/facts from the M3 model..
As an example:
scheme=="java+variable" or some other condition is used in a comprehesion to filter, how do you know what can be used to find certain thing??
Thanks
The documentation is not complete, but these pages are relevant:
http://tutor.rascal-mpl.org/Rascal/Libraries/lang/java/m3/m3.html#/Rascal/Libraries/analysis/m3/Core/Core.html
http://tutor.rascal-mpl.org/Rascal/Libraries/lang/java/m3/m3.html
I would also have a look at the code in these files:
https://github.com/cwi-swat/rascal/blob/master/src/org/rascalmpl/library/lang/java/m3/Core.rsc
https://github.com/cwi-swat/rascal/blob/master/src/org/rascalmpl/library/lang/java/m3/AST.rsc
They can be found in the rascal navigator view in Eclipse as well. In particular the core file contains all to know about the relations and locations in the java m3 model.

Deedle - what's the schema format for readCsv

I was using Deedle in F# to read a txt file (no header) to data frame, and cannot find any example about how to specify the schema.
let df= Frame.ReadCsv(datafile, separators="\t", hasHeaders=false, schema=schema)
I tried to give a string with names separated by ',', but seems don't work.
let schema = #"name, age, address";
I did some search on the doc, but only find following - don't know where I can find the info. :(
schema - A string that specifies CSV schema. See the documentation
for information about the schema format.
The schema format is the same as in the CSV type provider in F# Data.
The only problem (quite important!) is that the Deedle library had a bug where it completely ignores the schema parameter, so no matter what you provide, it would be ignored.
I just submitted a pull request that fixes the bug and also includes some examples (in the form of unit tests). See the pull request here (and click on "Files changed" to see the samples).
If you do not want to wait for a new release, just get the code from my GitHub fork and build it using build.cmd in the root (run this for the first time to restore packages). The complete build requires local installation of R (because it builds R plugin too), but it should build Deedle.dll and then fail... (After the first run of build.cmd, you can just use Deedle.sln solution).

How to extract just the visualization data from the solidworks files .sldprt and .sldasm in a standalone application?

Maybe like converting .sldprt to stl or step file outside solidworks. I dont want to create this using a plugin for solidworks..
I know that visualization data is public but the original geometry and brep data is stored in proprietary format of solidworks..
Varun,
SolidWorks provides source code of the project named display-lists that provide functionality to extract tesselation info from SW files without the SW software itself. Check it out here: https://forum.solidworks.com/docs/DOC-2323

Resources