Openemr fhir device, careplan, goal (#4422)
* Implement medical device, fix practitioner
Had some bugs in the practitioner resource. Went ahead and fixed those
so they work properly with FHIR. This ended up refactoring some of the
address and name elements into the FHIR utils class so we could remove
duplicate code in Patient, and Person.
Also implemented the DeviceService for searching on medical devices.
* Implemented Goal&Careplan resources,Test Fixtures
Created a CarePlan service that handles the care plan form where goals and care plans are stored. Since care plans do not have a unique id we had to implement a surrogate key using the encounter and the form_id of the care plan form.
Implemented the CodeTypesService that wraps around some of the global lookup code functions and provides additional helper method functions for grabbing the OID or system URI for a specific code.
Fixed some style issues in various classes.
Updated PatientService's getOne function to remove duplicate code.
Added some protection on npi number in the PractitionerService class to deal with the 'missing' modifier.
Heavily modified the test fixtures to be able to pull in referenced column data points for the fixture. Wrote a small DSL to allow whitelisted function calls inside the JSON to do things like generate ids, and uuids. Wrote a fixture manager for Encounters and care plan.
* Fix styling bug.
* Fix the unit tests on demo db.
* Add patient uuid, fix device manufacturer,styles
Style fixes, fix patient uuid searches for care plan and device
manufacturer.
* Fix unit tests if provider, facility is empty
We were throwing errors if the provider or facility db was empty. This
resolves that issue.
* Fix escaping on fixture manager.
* Improve exception debugging.
* Improve table escaping
Added an option to throw an exception on the sql column name work so I
could figure out why the code was dieing. Fixed the incorrect column
key for encounters.
* Fix style issues.
Co-authored-by: Stephen Nielson <snielson@discoverandchange.com>
37 files changed: