Openemr fix 5277 immunization reason codes (#5296)
commit37b7a12c67ae114f2efb7a0922de066859484b42
authorStephen Nielson <snielson@discoverandchange.com>
Sat, 7 May 2022 16:32:45 +0000 (7 10:32 -0600)
committerGitHub <noreply@github.com>
Sat, 7 May 2022 16:32:45 +0000 (7 10:32 -0600)
tree81bab3ef5b204addd0f70c1e7ad9dd255ea93440
parent77fe6f7af86850f6d05497728dccb6ebd5e208f9
Openemr fix 5277 immunization reason codes (#5296)

* WIP #5277 Immunization reason codes

This depends on the encounter_type work so we are making this a WIP for
now.  We need to handle both the reason and negationReason which for
immunization is the refusal_reason code.  I couldn't find any examples
where both a reason and negationRationale QDM exist simultaneously but
the spec supports the use case.  Since we already had reason codes
populated I map the valuesets for QDM to the NIP002 CDC code mappings in
the SQL so we can still support reporting to immunization registries.

I also updated the FHIR to support the religious objection since that's
the only additional value code that makes sense in addition to patient
objection for what FHIR allows.  I imagine future versions of FHIR will
be more in line with CCDA/QRDA for the immunization reason codes.

* Immunization populate code if snomeds installed

If the OpenEMR installation has the SNOMED code types installed we will
go through and populate our code types so that we can make them
available for use.

Fixed the sql upgrade script.

* Immunizations UI add reason_code support

Added the reason_code and reason_description to the Immunizations UI so
reasons can be specified as to why the immunization was done.  Required
for Clinical Quality Measures but useful for billing purposes as well.
If there is a refusal reason there is a dropdown to select from the
supported value set of possible refusal reasons.

* Style fixes

* Added immunization data to database.sql

* Fix text escaping and db comments
interface/modules/zend_modules/module/CodeTypes/src/CodeTypes/Listener/CodeTypeEventsSubscriber.php
interface/patient_file/summary/immunizations.php
sql/6_1_0-to-7_0_0_upgrade.sql
sql/database.sql
src/Services/FHIR/FhirImmunizationService.php
src/Services/ImmunizationService.php
src/Services/Qdm/Services/ImmunizationAdministeredService.php