Openemr fhir encounters (#4550)
commita25900cee8e56a511ca82fa1410d7541b16eb4a8
authorStephen Nielson <stephen@nielson.org>
Sat, 31 Jul 2021 03:47:13 +0000 (30 23:47 -0400)
committerGitHub <noreply@github.com>
Sat, 31 Jul 2021 03:47:13 +0000 (30 20:47 -0700)
treed372a197d3a2f615c1271baa9c548b224faecda8
parent471c05ced8ca239cdf7e44cdd2f65f2709246868
Openemr fhir encounters (#4550)

* Comment on unclear code.

* Formatting encounter to match ONC requirements.

Still need to fix location and see what we do with ONC dispatchReason
for encounters.

* Add Facility Location Reference for encounter

* Implement permission issues on location resource.

Added a type to the location query so we can restrict location contact
information based on the user's permission level.

* Fix location query for fhir resource.

* Support Discharge Disposition field for encounters.

FHIR requires that we support the ability for an encounter to have
marked what the discharge disposition of the patient was when they left
an encounter.  Most of our user base will have Home be the default, but
other types of discharges are now supported via the dropdown.

* Fix single Location resource endpoint

* Style fixes

* Add discharge_disposition to new install...

You'd think I'd get this right eventually... forgot to add the column
for a new database installation.

* Fix the dang comma

* Fix use statement and escape text/attrs

* Fix location security issues for patient access.

Had a bug where patients were still getting access to address data that
was not their own data.  Now clinician and patient home address
information is hidden from the patient.

* Fix styles.
12 files changed:
_rest_routes.inc.php
interface/forms/newpatient/common.php
interface/forms/newpatient/new.php
interface/forms/newpatient/save.php
sql/6_0_0-to-6_1_0_upgrade.sql
sql/database.sql
src/RestControllers/FHIR/FhirLocationRestController.php
src/Services/EncounterService.php
src/Services/FHIR/FhirCodeSystemConstants.php
src/Services/FHIR/FhirEncounterService.php
src/Services/FHIR/FhirLocationService.php
src/Services/LocationService.php