-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
WIP: Feat openemr #9373 bulk fhir #9384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
WIP: Feat openemr #9373 bulk fhir #9384
Conversation
A number of resources that rely on session values were failing as the session was not populating in the Bulk Export and in the Provenance resource. Fixed queries that were breaking with the _since parameter that search based on last updated.
Got the patient profile validation working properly with injection of the globals in the controller and service classes. Move IGlobalsAware to be a service interface instead of just a command interface for OEGlobalsBag injection.
MedicationAdherence wasn't showing up for linked prescriptions so fixed that issue.
Not sure how but somehow the class got renamed, so fixed that.
Moved the encounter dropdown from the TwigExtension into its own class so it can be used in both twig and in PHP.
When updating a linked lists_medication record from an existing prescription, the save was failing.
Fixed a bug when inventory is used where the drug_code is not properly populated. Fixes openemr#9382
Invalid request w/ outputFormat for BULK FHIR export was throwing a fatal 500 operation outcome error. Fixed it so its an bad request (400) and now support the shorthand ndjson format.
Specimen.value[x] must be a numeric value and not a string. Removed usedReference as it was breaking the specification.
|
Will come back to this on Monday but wanted to push this out for people to have a chance to see it. Its very fascinating to me that the BULK on FHIR profile validation seems to be more conformant to spec than the API Single Patient. It caught a number of issues that the API Single Patient validation did not via Inferno. Will have to come back and do a sweep in API Single Patient and hope that there isn't conflicting validation requirements. Also noticed that the Inferno Validator java server (on docker) appears to have a memory leak. Memory usage has gone from 4GB of memory up to 12GB of memory over a 2 day period with nothing being freed. Doing a docker compose restart hl7_validator_service appears to free everything up once again. |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
|
||
| #IfMissingColumn immunizations encounter_id | ||
| ALTER TABLE `immunizations` ADD COLUMN `encounter_id` BIGINT(20) DEFAULT NULL COMMENT 'fk to form_encounter.encounter to link immunization to encounter record'; | ||
| #EndIf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also need change in database.sql
We were not adding in the profiles to the diagnostic report resources which failed bulk fhir profile validation. Had old code in the clinical notes diagnostic profile that was adding in sample records.
There were extra logs of resource uuids and patient pids
Resources were not conforming to profile
|
|
||
| // Iterate through all PlaceOfServiceEnum cases and build the array | ||
| // AI Generated | ||
| foreach (PlaceOfServiceEnum::cases() as $posEnum) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
| { | ||
| private ?EncounterService $encounterService = null; | ||
|
|
||
| public function __construct(private $pid = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface doesn't require a constructor, and there's at least one other implementation of this interface with a different constructor sig. Just making sure this is what you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I'm trying to provide a pathway to have some conformity with the options.inc.php and the building of widgets (would be lovely for this to eventually become web components). The constructor I'm leaving up to the implementation to decide how to handle any additional state that is required. EncounterListOptionType relies on a global pid value in options.inc.php and a pid that's in context in the other location its used, whereas LocalProviderListType doesn't rely on any additional state than what is passed in through the interface function methods.
| `date` AS last_updated, | ||
| "' . self::TYPE_PATIENT . '" AS `type` | ||
| "' . self::TYPE_PATIENT . '" AS `type`, | ||
| \'\' AS location_role_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest you use a heredoc to avoid the leaning toothpicks
Fixes openemr#9386 - issues with us core vitals. Removes bp and pulse oximetry sub-components as observations and bundles them into the correct component implementation.
Fixes openemr#9387 adding in missing fields in fhir
Was missing fields needed for specimen
Capability statement was not showing the correct profiles
access token was being forced to the bulk export system user
Added location search and fixed up permissions missing from the session by using explicit vars instead of global $_SESSION
Fixed provenance with Care Experience and Treatment Intervention observations. Fixed missing oxygen saturation
That should then pass everything with single patient api and bulk on fhir api. Leaving just the granular security scopes & patient context to fix. |
Fixes #9373 bulk on fhir export
Fixes #9382
Implements Bulk on FHIR spec compliance for the following resources
Fixes _outputFormat,_since Bulk on FHIR export.
Still have a number of issues working on. Can see #9373 for details.