Various Carecoordination issues

I have various issues with the Carecoordination module. I will ask them in this thread one at a time. Firstly, using the demo at https://demo.openemr.io, if I select the following:

Modules > Carecoordination > Export > Transition Of Care > Search
Date: 2017 > 2027
Patient Name/ID: 1
Search

I get:
“Nothing to display”

If I select again Modules > Carecoordination, now some search results show up.

Another issue:

Download Wanda Moore as CCDA.

Then Import > CCDA or QRDA Cat I > select the .xml file > Add as new patient - “An error occurred”

An error occurred during execution; please try again later.
Additional information:
Error

File:

/var/www/localhost/htdocs/openemr/interface/modules/zend_modules/module/Documents/src/Documents/Controller/DocumentsController.php:165

Message:

XSLTProcessor::transformToXml() can only be called after a stylesheet has been imported

Stack trace:

#0 /var/www/localhost/htdocs/openemr/interface/modules/zend_modules/module/Documents/src/Documents/Controller/DocumentsController.php(165): XSLTProcessor->transformToXml(Object(SimpleXMLElement))
#1 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Documents\Controller\DocumentsController->retrieveAction()
#2 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#3 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#4 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#5 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#6 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#7 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#8 /var/www/localhost/htdocs/openemr/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#9 /var/www/localhost/htdocs/openemr/src/Core/ModulesApplication.php(116): Laminas\Mvc\Application->run()
#10 /var/www/localhost/htdocs/openemr/interface/modules/zend_modules/public/index.php(73): OpenEMR\Core\ModulesApplication->run()
#11 {main}

As I understand it, in Modules > Manage Modules > Care Coordination: Config > Settings, you’re supposed to have “Author” and “Primary Care Provider” set. However “Author” won’t save after it has been selected and the same option chosen. When you return to this setting after navigating away, “Author” is blank.

Author never worked inputted there. I take author from the encounter or who did the resource.
It’s been awhile since i’ve tested CCDA. Been laser focused on QRD so I hope I haven’t broken anything.

Can you post Wanda’s CCD and i’ll test. I think Wanda Moore is an example CCD patient. If not I’ll hunt down an IG version.

We recently used command line import that Brady put together to attempt create close to 1000000 patient database in 100,000 CCD batches using Synthea so if broken, I did it recently.

Thanks @sjpadgett, Attached is the CCDA exported from your OpenEMR 6.1 demo.

CCDA(7).zip (312.4 KB)

I’m working through various CCDA issues in the hope of eventually being able to merge 2 separate instances of OpenEMR.

On a test instance of my own, using OpenEMR 6.1, the menu option looks like this:

Modules > Carecoordination > Send to HIE

There is no option to select just Modules > Carecoordination.
And Modules > Carecoordination > Send to HIE gives:

"A 404 error occurred

Page not found.

The requested controller was unable to dispatch the request.

Controller:

Carecoordination\Controller\CarecoordinationController

No Exception available"

We’re not setup to use HIE so don’t. Everything runs from CCM and this works for me on master. Can’t test on 6.1 as I don’t have time right now…

What I’m saying though is that the Modules > Carecoordination menu option is inoperable, the only menu option that can be navigated there is Modules > Carecoordination > Send to HIE. (I’m not looking to use HIE.) Have you any idea what can cause this please?

Ahah, I’ve disabled “Send To HIE” in Hooks and the issue has gone away. Sorry for wasting your time on this particular one.

Truly not wasting my time Pete. Better documentation would help…

Despite the error message screen after a CCD import with “XSLTProcessor::transformToXml() can only be called after a stylesheet has been imported” on your demo instance, the new patient is actually created.

1 Like

It’s because when patient is created we try to build a html preview to show. Sometimes server can’t find the xsl style sheet so can’t create the html. Import though will work. I’m thinking of getting rid of that view as it serves no purpose!

I’m writing documentation for myself on setting up the Carecoordination module and will incorporate it here also if it happens to add anything not already covered by the existing docs.

1 Like

Trying to import a multiple of 4 patients at once using CCDA and receovied the following errors:

Error: Text data outside of root node.
Line: 613
Column: 189
Char: M
at error (…/ccdaservice/node_modules/sax/lib/sax.js:642:8)
at strictFail (…/ccdaservice/node_modules/sax/lib/sax.js:662:22)
at SAXParser.write (…/ccdaservice/node_modules/sax/lib/sax.js:960:13)
at Parser.exports.Parser.Parser.parseString (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:273:29)
at Parser.parseString (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:6:61)
at exports.parseString (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:296:19)
at module.exports (…/ccdaservice/node_modules/xmljson/lib/to_json.js:17:9)
at Socket.eventData (…/ccdaservice/serveccda.js:2886:13)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
Emitted ‘error’ event on Parser instance at:
at SAXParser.saxParser.onerror (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:109:24)
at emit (…/ccdaservice/node_modules/sax/lib/sax.js:615:33)
at error (…/ccdaservice/node_modules/sax/lib/sax.js:644:3)
at strictFail (…/ccdaservice/node_modules/sax/lib/sax.js:662:22)
[… lines matching original stack trace …]
at Socket.eventData (…/ccdaservice/serveccda.js:2886:13)
events.js:377
throw er; // Unhandled ‘error’ event

Error: Text data outside of root node.
Line: 1840
Column: 189
Char: M
at error (…/ccdaservice/node_modules/sax/lib/sax.js:642:8)
at strictFail (…/ccdaservice/node_modules/sax/lib/sax.js:662:22)
at SAXParser.write (…/ccdaservice/node_modules/sax/lib/sax.js:960:13)
at Parser.exports.Parser.Parser.parseString (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:273:29)
at Parser.parseString (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:6:61)
at exports.parseString (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:296:19)
at module.exports (…/ccdaservice/node_modules/xmljson/lib/to_json.js:17:9)
at Socket.eventData (…/ccdaservice/serveccda.js:2886:13)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
Emitted ‘error’ event on Parser instance at:
at SAXParser.saxParser.onerror (…/ccdaservice/node_modules/xml2js/lib/xml2js.js:109:24)
at emit (…/ccdaservice/node_modules/sax/lib/sax.js:615:33)
at error (…/ccdaservice/node_modules/sax/lib/sax.js:644:3)
at strictFail (…/ccdaservice/node_modules/sax/lib/sax.js:662:22)
[… lines matching original stack trace …]
at Socket.eventData (…/ccdaservice/serveccda.js:2886:13)
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to Moment.js | Guides for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 12/11/2019, _f: undefined, _strict: undefined, _locale: [object Object]
Error
at Function.createFromInputFallback (…/ccdaservice/node_modules/moment/moment.js:324:94)
at configFromString (…/ccdaservice/node_modules/moment/moment.js:2366:11)
at configFromInput (…/ccdaservice/node_modules/moment/moment.js:2592:9)
at prepareConfig (…/ccdaservice/node_modules/moment/moment.js:2575:9)
at createFromConfig (…/ccdaservice/node_modules/moment/moment.js:2542:40)
at createLocalOrUTC (…/ccdaservice/node_modules/moment/moment.js:2629:12)
at createLocal (…/ccdaservice/node_modules/moment/moment.js:2633:12)
at Function.createInZone [as parseZone] (…/ccdaservice/node_modules/moment/moment.js:3935:24)
at exports.time (…/ccdaservice/oe-blue-button-generate/lib/translate.js:74:20)
at …/ccdaservice/oe-blue-button-generate/lib/engine.js:29:27
events.js:377
throw er; // Unhandled ‘error’ event
^

I see an array of issues, which I’m going to drop here without any more investigation yet, in case it’s something that can be easily resolved:

Not all have the option to import

Patient Name and DOB are blank

Previous imports are left in the list of imports and remain there even when logout. (Perhaps this isn’t an error.) I can’t see a way to remove them from the list.

Of the 4 imported, only 1, has an option to add it, the others just have the ‘show details’ option; or, on subsequent test import, none of them have the option to add.

PHP Warning: fread(): Length parameter must be greater than 0 in …/interface/modules/zend_modules/module/Documents/src/Documents/Controller/DocumentsController.php on line 86, referer: …/interface/modules/zend_modules/public/ccd/upload

Import 1 again and 3 of them now have an option to add; once 1 is imported, none have that option; import another 1 and then 4 have the option to add.

Patient Name and DOB are now displaying correctly for some but not all.

some of these issues are fixed in master especially mass import which was broken for sure. I now allow mass imports to chart from single button from uploads view and also allow clearing imported list of left overs. I just need a little time to test again for using these features with ccda and building a patch for 6.1. I’m just not ready to go back to ccda until I finishing testing qrda importing. Still i’ll try next day or two.

I look forward to it, thank you.

I’m not seeing PDF documents migrated, is that by design or likely an issue on my side?
If it’s by design, is CCDA still my best option for merging 2 separate EMRs?

Thanks

lol, if xml is not enough, you want to bring up PDF. It’s madness I tell ya!:slight_smile:

The way I’ve done it in the past with Practice Fusion was import via CCM and add the PDF to the patient documents for reference.
If you have 100’s of imports then I’d throw them in a directory and import via command line option that Brady and @stephenwaite put together and tested so @adunsulag could stress test our APIs. Which went remarkedly well imo.

What version of CCDA do we support? 2.1? I never would have guessed that CCDA supports embedded PDFs CDA with Embedded PDF 1

Sounds like a fun feature if someone wanted to add it.

Last IG validation test was against rel2.1 with cures. Though CCM doesn’t support import 100% but closer everyday.
As far as I know, PDF import is not a thing. Could be wrong but no way, let me repeat, no wayyyy I’d be involved!

For export I think we support PDF but not sure.

Ahh, OK. I just presumed CCDA export/import supported everything in the patient record, as I was recommended it here as a means of migrating patients from one EMR to another. Plus ‘Clinical Document Architecture - Wikipedia’ says “An XML element in a CDA supports unstructured text, as well as links to composite documents encoded in pdf, docx, or rtf, as well as image formats like jpg and png.”

I have hundreds of patients in one EMR and thousands in another. I will give this more thought. Thanks for your help so far. At least, being able to migrate occasional patients individually between EMRs is an advantage I didn’t have previously. I appreciate all the improvements CCDA is receiving recently, it seems significantly improved between OpenEMR 6.0 and 6.1.