Openemr fix 5508 ccd date ranges (#5525)
commit7250ca4321e425c974cdee7474241d693b4ec5b0
authorStephen Nielson <snielson@discoverandchange.com>
Wed, 22 Jun 2022 14:37:47 +0000 (22 08:37 -0600)
committerGitHub <noreply@github.com>
Wed, 22 Jun 2022 14:37:47 +0000 (22 08:37 -0600)
treeae45550d280d513ef789fb654257ebf0b42c2217
parent06333dbfc0a13d42c643dd9f4b5f46c3b1647fd8
Openemr fix 5508 ccd date ranges (#5525)

Fixes #5508

* Initial implementation of #5508 ccd date filtering

Changes g9 $docref to be a POST api since we generate a new document
every time.

Fixes ISO8601 date problems with php since php's date constant is
incorrect.  Switch to ATOM constant.

Got the start and end date working from the g9 but we are failing in
some instances in the ccda generator because its excluding encounters
that some of the data elements rely upon.

Fixed the ORDataObject saving incorrectly on some database instance
types due to the timezone and microsecond formatting.

Added __clone helper methods to the search field classes so we can copy
them and modify properties w/o modifying the references.

* Fixes #5508 encounter date filtering, docs

Added brief, terse documentation for g9 generation with docref.  Needs
to be fleshed out in the fhir readme file.

Updated the swagger file to point to the g9 documentation.

Removed the remote xsl stuff as I found out chrome actively blocks
remote xsl's from rendering unless everything is in the same folder,
port, origin, and schema.

Changed up the filtering as careplan was still breaking due to its
requirement on an encounter.  Changed up the filtering to be encounter
based so that any of the sections related to an encounter are filtered
for the CCD.  I left non-ccd document types alone since g9 only requires
the ccd filtering.

Removed unused referral pieces in the care plan section as they were all
being skipped due to the missing required codes in the transactions
table.  node side was skipping it as well so I left it off.

* Fix styles

* ccda-Clean up imports, fix vitals fatal exception

* Fix fatal error in ccda preview

The preview button for ccda was failing

* Fix missing scope in readme
18 files changed:
API_README.md
FHIR_README.md
_rest_routes.inc.php
ccdaservice/serveccda.js
interface/modules/zend_modules/module/Carecoordination/src/Carecoordination/Listener/CCDAEventsSubscriber.php
interface/modules/zend_modules/module/Carecoordination/src/Carecoordination/Model/CcdaGenerator.php
interface/modules/zend_modules/module/Carecoordination/src/Carecoordination/Model/CcdaServiceDocumentRequestor.php
interface/modules/zend_modules/module/Carecoordination/src/Carecoordination/Model/CcdaServiceRequestModelGenerator.php
interface/modules/zend_modules/module/Carecoordination/src/Carecoordination/Model/EncounterccdadispatchTable.php
src/Common/ORDataObject/ORDataObject.php
src/Events/PatientDocuments/PatientDocumentCreateCCDAEvent.php
src/Services/FHIR/FhirDocRefService.php
src/Services/FHIR/FhirProvenanceService.php
src/Services/PatientService.php
src/Services/Search/BasicSearchField.php
src/Services/Search/DateSearchField.php
src/Services/Search/SearchFieldComparableValue.php
swagger/openemr-api.yaml