Patient Portal / View CCD not working

Situation
When viewing the patient portal and clicking view CCD I get an error message. @sjpadgett I know you have done some work with the portal, i wonder if you have any idea on this?
I did find some vague topics on the forums but with no fix or outcome.

Fatal error: Uncaught Symfony\Component\HttpClient\Exception\ServerException: HTTP/2 500 returned for “https://test.xxx.co.uk/interface/modules/zend_modules/public/encounterccdadispatch?combination=3&recipient=patient&view=1&me=yE8p2sHtqnYARwR6r0yp6ZGMw65qPPBKpCsG2OJLlWnR7fsH&site=default”. in /home/tem/public_html/vendor/symfony/http-client/Response/ResponseTrait.php:283 Stack trace: #0 /home/tem/public_html/vendor/symfony/http-client/Response/ResponseTrait.php(103): Symfony\Component\HttpClient\Response\CurlResponse->checkStatusCode() #1 /home/tem/public_html/vendor/symfony/http-client/Response/CurlResponse.php(221): Symfony\Component\HttpClient\Response\CurlResponse->doGetContent() #2 /home/tem/public_html/src/Services/CDADocumentService.php(165): Symfony\Component\HttpClient\Response\CurlResponse->getContent() #3 /home/tem/public_html/ccdaservice/ccda_gateway.php(77): OpenEMR\Services\CDADocumentService->portalGenerateCCD() #4 {main} thrown in /home/tem/public_html/vendor/symfony/http-client/Response/ResponseTrait.php on line 283

Doing some more digging the PHP error log showed some errors too (below under logs)

OpenEMR Version
I’m using OpenEMR version 7.0.0 (2)

Browser:
I’m using: Chrome & Firefox (latest versions / checked for updates)

Operating System
I’m using: Almalinux 9.1 with virtualmin
PHP 7.4
MariaDB 10.5.16

Logs

[11-Jan-2023 22:42:36 Europe/London] PHP Fatal error:  Uncaught Symfony\Component\HttpClient\Exception\ServerException: HTTP/2 500  returned for "https://test.xxx.co.uk/interface/modules/zend_modules/public/encounterccdadispatch?combination=3&recipient=patient&view=1&me=yE8p2sHtqnYARwR6r0yp6ZGMw65qPPBKpCsG2OJLlWnR7fsH&site=default". in /home/tem/public_html/vendor/symfony/http-client/Response/ResponseTrait.php:283
Stack trace:
#0 /home/tem/public_html/vendor/symfony/http-client/Response/ResponseTrait.php(103): Symfony\Component\HttpClient\Response\CurlResponse->checkStatusCode()
#1 /home/tem/public_html/vendor/symfony/http-client/Response/CurlResponse.php(221): Symfony\Component\HttpClient\Response\CurlResponse->doGetContent()
#2 /home/tem/public_html/src/Services/CDADocumentService.php(165): Symfony\Component\HttpClient\Response\CurlResponse->getContent()
#3 /home/tem/public_html/ccdaservice/ccda_gateway.php(77): OpenEMR\Services\CDADocumentService->portalGenerateCCD()
#4 {main}
  thrown in /home/tem/public_html/vendor/symfony/http-client/Response/ResponseTrait.php on line 283

Hey Mark,
This feature used to work but I think we broke it when we did some changes for ONC or other refactor to twig templates.
I’ll have to look when I get a chance.

Since a html status 500 i’d expect an error in php error log.

@madmax
I just tested this on master and v7(2) and works for me.
Does a ccda get generated from the openemr ccda module?
If so then look at php error log to get the specific error from the http status 500 error.

Hi Jerry, Do I need to do any configuring other then turning this on in globals?

I cleared my error_log and retried and noticed this error:

[12-Jan-2023 17:17:21 Europe/London] [2023-01-12T17:17:21.088180+00:00] OpenEMR.ERROR: Carecoordination\Model\EncounterccdadispatchTable->getDocumentAuthorRecord() Failed to find author for c-cda document, no hie_author_id, authUserID in session, or provider relationship [] []

Yes this is helpful.
Go to the manage module setup for carecoordination and add an author.
This is part of setup however I don’t think we’ve gotten around to documenting the newer options for author.

And we have a new PHP error! standby i’ll post in a moment…

#11 /home/tem/public_html/src/Core/ModulesApplication.php(118): Laminas\Mvc\Application->run()
#12 /home/tem/public_html/interface/modules/zend_modules/public/index.php(80): OpenEMR\Core\ModulesApplication->run()
#13 {ma
[12-Jan-2023 17:49:32 Europe/London] ERROR: 
 Exception: Statement could not be executed (42S22 - 1054 - Unknown column 'date_created' in 'field list')
 Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_created' in 'field list'
 SQL statement : INSERT INTO module_configuration SET field_name = ?, field_value = ?, module_id = ?, updated_by = ?, created_by = ?, date_created=NOW()('hie_legal_authenticator_id','6','1','1','1')
 #0 /home/tem/public_html/interface/modules/zend_modules/module/Application/src/Application/Model/ApplicationTable.php(63): Laminas\Db\Adapter\Driver\Pdo\Statement->execute()
#1 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Model/InstModuleTable.php(239): Application\Model\ApplicationTable->zQuery()
#2 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Controller/InstallerController.php(350): Installer\Model\InstModuleTable->saveSettings()
#3 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Installer\Controller\InstallerController->saveConfigAction()
#4 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#5 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /home/tem/public_html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#9 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#10 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#11 /home/tem/public_html/src/Core/ModulesApplication.php(118): Laminas\Mvc\Application->run()
#12 /home/tem/public_html/interface/modules/zend_modules/public/index.php(80): OpenEMR\Core\ModulesApplication->run()
#13 {ma
[12-Jan-2023 17:49:32 Europe/London] ERROR: 
 Exception: Statement could not be executed (42S22 - 1054 - Unknown column 'date_created' in 'field list')
 Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_created' in 'field list'
 SQL statement : INSERT INTO module_configuration SET field_name = ?, field_value = ?, module_id = ?, updated_by = ?, created_by = ?, date_created=NOW()('hie_authenticator_id','12','1','1','1')
 #0 /home/tem/public_html/interface/modules/zend_modules/module/Application/src/Application/Model/ApplicationTable.php(63): Laminas\Db\Adapter\Driver\Pdo\Statement->execute()
#1 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Model/InstModuleTable.php(239): Application\Model\ApplicationTable->zQuery()
#2 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Controller/InstallerController.php(350): Installer\Model\InstModuleTable->saveSettings()
#3 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Installer\Controller\InstallerController->saveConfigAction()
#4 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#5 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /home/tem/public_html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#9 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#10 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#11 /home/tem/public_html/src/Core/ModulesApplication.php(118): Laminas\Mvc\Application->run()
#12 /home/tem/public_html/interface/modules/zend_modules/public/index.php(80): OpenEMR\Core\ModulesApplication->run()
#13 {ma
[12-Jan-2023 17:49:32 Europe/London] ERROR: 
 Exception: Statement could not be executed (42S22 - 1054 - Unknown column 'date_created' in 'field list')
 Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_created' in 'field list'
 SQL statement : INSERT INTO module_configuration SET field_name = ?, field_value = ?, module_id = ?, updated_by = ?, created_by = ?, date_created=NOW()('hie_primary_care_provider_id','6','1','1','1')
 #0 /home/tem/public_html/interface/modules/zend_modules/module/Application/src/Application/Model/ApplicationTable.php(63): Laminas\Db\Adapter\Driver\Pdo\Statement->execute()
#1 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Model/InstModuleTable.php(239): Application\Model\ApplicationTable->zQuery()
#2 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Controller/InstallerController.php(350): Installer\Model\InstModuleTable->saveSettings()
#3 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Installer\Controller\InstallerController->saveConfigAction()
#4 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#5 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /home/tem/public_html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#9 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#10 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#11 /home/tem/public_html/src/Core/ModulesApplication.php(118): Laminas\Mvc\Application->run()
#12 /home/tem/public_html/interface/modules/zend_modules/public/index.php(80): OpenEMR\Core\ModulesApplication->run()
#13 {ma
[12-Jan-2023 17:49:32 Europe/London] ERROR: 
 Exception: Statement could not be executed (42S22 - 1054 - Unknown column 'date_created' in 'field list')
 Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_created' in 'field list'
 SQL statement : INSERT INTO module_configuration SET field_name = ?, field_value = ?, module_id = ?, updated_by = ?, created_by = ?, date_created=NOW()('hie_force_latest_encounter_provenance_date','yes','1','1','1')
 #0 /home/tem/public_html/interface/modules/zend_modules/module/Application/src/Application/Model/ApplicationTable.php(63): Laminas\Db\Adapter\Driver\Pdo\Statement->execute()
#1 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Model/InstModuleTable.php(239): Application\Model\ApplicationTable->zQuery()
#2 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Controller/InstallerController.php(350): Installer\Model\InstModuleTable->saveSettings()
#3 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Installer\Controller\InstallerController->saveConfigAction()
#4 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#5 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /home/tem/public_html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#9 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#10 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#11 /home/tem/public_html/src/Core/ModulesApplication.php(118): Laminas\Mvc\Application->run()
#12 /home/tem/public_html/interface/modules/zend_modules/public/index.php(80): OpenEMR\Core\ModulesApplication->run()
#13 {ma
[12-Jan-2023 17:49:32 Europe/London] ERROR: 
 Exception: Statement could not be executed (42S22 - 1054 - Unknown column 'date_created' in 'field list')
 Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_created' in 'field list'
 SQL statement : INSERT INTO module_configuration SET field_name = ?, field_value = ?, module_id = ?, updated_by = ?, created_by = ?, date_created=NOW()('hie_author_date','2023-01-12T17:48:12','1','1','1')
 #0 /home/tem/public_html/interface/modules/zend_modules/module/Application/src/Application/Model/ApplicationTable.php(63): Laminas\Db\Adapter\Driver\Pdo\Statement->execute()
#1 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Model/InstModuleTable.php(239): Application\Model\ApplicationTable->zQuery()
#2 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Controller/InstallerController.php(350): Installer\Model\InstModuleTable->saveSettings()
#3 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Installer\Controller\InstallerController->saveConfigAction()
#4 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#5 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /home/tem/public_html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#9 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#10 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#11 /home/tem/public_html/src/Core/ModulesApplication.php(118): Laminas\Mvc\Application->run()
#12 /home/tem/public_html/interface/modules/zend_modules/public/index.php(80): OpenEMR\Core\ModulesApplication->run()
#13 {ma
[12-Jan-2023 17:49:32 Europe/London] ERROR: 
 Exception: Statement could not be executed (42S22 - 1054 - Unknown column 'date_created' in 'field list')
 Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_created' in 'field list'
 SQL statement : INSERT INTO module_configuration SET field_name = ?, field_value = ?, module_id = ?, updated_by = ?, created_by = ?, date_created=NOW()('hie_office_contact','6','1','1','1')
 #0 /home/tem/public_html/interface/modules/zend_modules/module/Application/src/Application/Model/ApplicationTable.php(63): Laminas\Db\Adapter\Driver\Pdo\Statement->execute()
#1 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Model/InstModuleTable.php(239): Application\Model\ApplicationTable->zQuery()
#2 /home/tem/public_html/interface/modules/zend_modules/module/Installer/src/Installer/Controller/InstallerController.php(350): Installer\Model\InstModuleTable->saveSettings()
#3 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Installer\Controller\InstallerController->saveConfigAction()
#4 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#5 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /home/tem/public_html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#9 /home/tem/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#10 /home/tem/public_html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#11 /home/tem/public_html/src/Core/ModulesApplication.php(118): Laminas\Mvc\Application->run()
#12 /home/tem/public_html/interface/modules/zend_modules/public/index.php(80): OpenEMR\Core\ModulesApplication->run()
#13 {ma

Looks like a missing column, likely from when my sql server was having issues with upgrade scripts in the past. Can you tell me where / what I should add column wise and try again?

I don’t think this is a upgrade issue for database. There was a bug with dates that I thought was fixed in patch 2 but could be wrong. I’d have to check but have several phone calls just now and be a couple hours!

Alright, thanks for getting back to me and hope to hear from you in a few hours :slight_smile:

Just to confirm I performed a clean install / db and get the same error regarding columns, so the base installer contains that issue too, I guess it also includes patch 2 from November so that would suggest its not patched there yet.

@madmax
Looks like we forgot to add the field when we were doing providence for author and ONC.
Run the attached patch.sql from browser just as you’d do for a patch update.
Somehow I have to get out of the carecoordination business!:slight_smile:
Hey I have an idea @madmax you should be expert enough by now to take that role on! What do ya say?:slight_smile:

patch.sql (9.9 KB)

INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `notes`, `codes`) VALUES ('drug_route', 'bymouth', 'By Mouth', 1, 0, 'PO', 'NCI-CONCEPT-ID:C38288')

Error occured at:2023-01-12 18:51:04
Line no.:65
Error Code: 1062 - Duplicate entry 'drug_route-bymouth' for key 'PRIMARY'

Got an error from your sql file (posted above). I wish I had the time to take that on hehe but will help where I can.

Got it working! Thanks for the help

You’re welcome but that will $1.99 please!:slight_smile: We’ll donate it to the Save Jerry from Carecoordination Foundation!

1 Like

I just now need to figure out why it says

Node is not installed on the system. Connection failed

Even though I can run node -v as the user in putty and see a version output etc.
I’m using version 18 here but the documentation says version 16, should that make a massive difference?

Depends if node was installed globally and if using node 18 then you’d have to delete the ccdaservice node directory or entire directory then reinstall ccdaservice directory but I haven’t made sure node 18 works so suggest everyone stick to node 16.

Jerry I will remove and downgrade node. Are there any steps with openemr I need to perform before setting it up again?

Just be sure you wipe the ccdaservice directory and copy in from install zip or wherever you have the files.
Otherwise you should be good as your current setting shouldn’t be touched.