profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/adunsulag/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Stephen Nielson adunsulag Georgia, United States

adunsulag/apsats-intake-system 0

Issue Tracker for the APSATS Community Intake System

adunsulag/bdt 0

Bulk Data Test Suite and Test Runner

adunsulag/ciphersweet-js 0

Searchable Encryption for Node.js projects

adunsulag/CS246GitTest 0

Git Setup Test Repo for CS246

adunsulag/CS246Test2 0

some test

adunsulag/cs313-nodejs 0

Nodejs github repo

pull request commentopenemr/openemr

QRDA import

@sjpadgett The only danger I can think of by grabbing sources other than the compendium is that we join against the compendium tables in order to get the FHIR information for procedures and Observation lab orders.

sjpadgett

comment created time in 6 hours

Pull request review commentopenemr/openemr

QRDA import

+<?php++/**+ * QrdaParseService Class+ *+ * @package   OpenEMR+ * @link      https://www.open-emr.org+ * @author    Jerry Padgett <sjpadgett@gmail.com>+ * @copyright Copyright (c) 2021 Jerry Padgett <sjpadgett@gmail.com>+ * @license   https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3+ */++namespace OpenEMR\Services\Qrda;++use OpenEMR\Services\CodeTypesService;++class QrdaParseService+{+    private $qrdaData;++    public function __construct()+    {+        $this->qrdaData = [];+    }++    /**+     * parsePatientDataSection+     *+     * @param array $entryComponents An array of QRDA entry templates+     * @return array+     */+    public function parsePatientDataSection($entryComponents): array+    {+        $this->is_qrda_import = true;+        $qrda_oids = array(+            //'2.16.840.1.113883.10.20.24.3.90' => '', // cda Substance or Device Allergy - Intolerance Observation (V2)+            '2.16.840.1.113883.10.20.24.3.147' => 'fetchAllergyIntoleranceObservation',+            '2.16.840.1.113883.10.20.24.3.41' => 'fetchMedicationData', // @todo medication list? active medication+            //'2.16.840.1.113883.10.20.24.3.139' => 'fetchMedicationData', //Medication Dispensed Act+            //'2.16.840.1.113883.10.20.24.3.42' => 'fetchMedicationData', // prescribe QDM Datatype: Substance, Administered+            //'2.16.840.1.113883.10.20.24.3.47' => 'fetchMedicationData', // planned QDM Datatype: Substance, Order i.e prescribed+            //'2.16.840.1.113883.10.20.22.4.3' => '', //cda concern act+            '2.16.840.1.113883.10.20.24.3.137' => 'fetchMedicalProblemData', //qrda diagnosis+            '2.16.840.1.113883.10.20.24.3.140' => 'fetchImmunizationData', // qrda Immunization Administered (V3)+            '2.16.840.1.113883.10.20.24.3.143' => '', // qrda Immunization Order (V3)+            //'2.16.840.1.113883.10.20.22.4.14' => '', // C-CDA R2.1 Procedure Activity Procedure (V2)+            '2.16.840.1.113883.10.20.24.3.64' => 'fetchProcedureData', // qrda procedure performed+            '2.16.840.1.113883.10.20.24.3.7' => 'fetchProcedureData', // qrda procedure Device Applied (V5)+            //'2.16.840.1.113883.10.20.24.3.38' => 'lab_result', // lab test preformed wip+            //'2.16.840.1.113883.10.20.24.3.37' => 'lab_result', // lab test ordered wip+            '2.16.840.1.113883.10.20.24.3.133' => 'fetchEncounter',+        );+        foreach ($entryComponents['section']['entry'] as $i => $entry) {+            $key = array_keys($entry)[0]; // need the entry type i.e. observation, activity, substance etc.+            if (!empty($entry[$key]['templateId']['root'])) {+                if (!empty($qrda_oids[$entry[$key]['templateId']['root']])) {+                    $func_name = $qrda_oids[$entry[$key]['templateId']['root']];+                    $this->$func_name($entry);+                }+            } elseif (count($entry[$key]['templateId']) > 1) {+                foreach ($entry[$key]['templateId'] as $key_1 => $value_1) {+                    if (!empty($qrda_oids[$entry[$key]['templateId'][$key_1]['root']])) {+                        $func_name = $qrda_oids[$entry[$key]['templateId'][$key_1]['root']];+                        if (!empty($func_name)) {+                            $this->$func_name($entry);+                        }+                        break;+                    }+                }+            }+        }+        return $this->qrdaData;+    }++    /**+     * @param $entry+     */+    public function fetchEncounter($entry): void+    {+        $this->getEncounterData($entry['act']['entryRelationship']);+    }++    /**+     * @param $entry+     */+    public function getEncounterData($entry): void+    {+        if ($entry['encounter']['effectiveTime']['value'] != 0 || $entry['encounter']['effectiveTime']['low']['value'] != 0) {+            $i = 1;+            if (!empty($this->qrdaData['field_name_value_array']['encounter'])) {+                $i += count($this->qrdaData['field_name_value_array']['encounter']);

This is copied from ccda right? This essentially makes it so we add a new encounter record to the $this->qrdaData['field_name_value_array']['encounter'] right?

So strange of ZH to do it this way.

sjpadgett

comment created time in 7 hours

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentopenemr/openemr

QRDA import

 public function fetch_social_history_value($social_history_data)             $this->ccda_data_array['field_name_value_array']['social_history'][$i][$social_history_array[$code]]['enddate'] = $social_history_data['observation']['effectiveTime']['high']['value'];             $this->ccda_data_array['field_name_value_array']['social_history'][$i][$social_history_array[$code]]['value'] = $social_history_data['observation']['value']['displayName'];             $this->ccda_data_array['entry_identification_array']['social_history'][$i] = $i;-            unset($social_history_data);+            unset($social_history_data); // @todo remove these unsets, don't make sense

Does seem strange, the function return will clear it anyways...

sjpadgett

comment created time in 7 hours

PR opened openemr/openemr

Fix php8 issue with front payment.

Minor fix for php8 issue where the 0 + $payment type conversion was throwing errors. @sjpadgett and I discovered this issue.

+2 -1

0 comment

1 changed file

pr created time in 8 hours

create barnchadunsulag/openemr

branch : openemr-fix-front-payment-php8

created branch time in 8 hours

PR opened openemr/openemr

Openemr encounters twig kernel

Add empty option for encounter discharge. Right now there is no way to opt out of setting an encounter's hospital discharge status. Looking at the ONC FHIR encounter spec it looks like this is a MUST Support requirement and not a Required attribute. Adding the optional value allows people to not fill this encounter in.

Made it so you can add additional search directories for twig. This makes it so modules can use twig templates inside their own folders.

Added a helper method to the EncounterService to be able to get the most recent encounter for a patient based on the encounter date.

Modified the search method in EncounterService so you can have order by and limit conditions.

Removed spam log from patient demographics.

+39 -18

0 comment

5 changed files

pr created time in 9 hours

create barnchadunsulag/openemr

branch : openemr-encounters-twig-kernel

created branch time in 9 hours

delete branch adunsulag/openemr

delete branch : openemr-encounters-twig-kernel

delete time in 9 hours

push eventopenemr/openemr

Stephen Nielson

commit sha 0f6b66d21e514be9457f5a39610550c1f73c34b5

Openemr events scope vitals (#4631) * Scope Event, Api helper methods/logs Added an event to handle adding additional scopes via event listeners. If a module adds to the REST api the api is pretty useful if there is not an accompanying scope added with the api. Also added some helper methods to the http request object and some more api logging. I needed this for a module I am building and it will be useful for the community to have it in core. * Fix styles

view details

push time in 9 hours

PR merged openemr/openemr

Openemr events scope vitals Status: Needs Review

Added an event to handle adding additional scopes via event listeners. If a module adds to the REST api the api is pretty useless if there is not an accompanying scope added with the api.

Also added some helper methods to the http request object and some more api logging. I needed this for a module I am building and it will be useful for the community to have it in core.

+125 -6

1 comment

7 changed files

adunsulag

pr closed time in 9 hours

create barnchadunsulag/openemr

branch : openemr-encounters-twig-kernel

created branch time in 9 hours

pull request commentopenemr/openemr

Building appointment event dispatcher

@juggernautsei Are you wanting to rebase your changes on top of brady's commit: bradymiller@d28ce9b ?

juggernautsei

comment created time in 15 hours

pull request commentopenemr/openemr

Building appointment event dispatcher

@juggernautsei @bradymiller are you needing any help in order to get this to the finish line? It sounds like LifeMesh has a deadline coming up. It looks like y'all are doing great but just wondering if you need anything from me on this.

juggernautsei

comment created time in a day

pull request commentopenemr/openemr

Building appointment event dispatcher

So the error givin in the PHP7.3,PHP7.4 checks is the following:

PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in ./interface/modules/custom_modules/oe-module-lifemesh-telehealth/vendor/symfony/polyfill-mbstring/bootstrap80.php on line 15
Error: Process completed with exit code 1.

So that PHP error comes from our psr static code analyzer the polyfill vendor project. Apparently the polyfill has different php files for different versions of php which causes static code php checkers to fail as discussed in this link for the polyfill-mbstring project https://github.com/symfony/polyfill/pull/327#issuecomment-756400063

The polyfill project refuses to fix it (which makes sense as they are polyfilling different versions of php). Is there a way @brady.miller to exclude certain folders in the psr check? Otherwise if we bring this pull request in it will break every future build.

juggernautsei

comment created time in 4 days

issue commentopenemr/openemr

Open PatientReport event dispatches to all modules

@juggernautsei So the fax module has a global setting that you still have to enable in globals even if you install the module. That checking of the global flag should be changed so that it can be done in the module, not in the code. You're correct that the dispatchers should just fire off events. If there's no one listening its essentially a no-op. Its up to the listener to determine how it wants to act. Here is an example from a module I am writing.

class PatientCreateStrategy implements IEventNotificationStrategy
{
  // ....
    public function canProcessEvent(Event $event, string $eventName): bool
    {
        if ($event instanceof PatientCreatedEvent && $eventName == PatientCreatedEvent::EVENT_HANDLE) {
            return true;
        }
        return false;
    }
// ....
}

Here is another example where I get the generic ServiceSaveEvent and I check specifically to know if I'm dealing with the VitalsService so I can fire off internally two events to handle a vitals create request versus a vitals save request.

public function dispatchVitalSaveEvents(ServiceSaveEvent $serviceSaveEvent, string $eventName)
    {
        if ($serviceSaveEvent->getService() instanceof VitalsService) {
            $pid = $serviceSaveEvent->getSaveData()['pid'] ?? null;

            if ($eventName == ServiceSaveEvent::EVENT_PRE_SAVE) {
                if (!empty($pid)) {
                    $this->vitalRecordByPid[$pid] = $serviceSaveEvent->getSaveData();
                }
                return;
            } else if (ServiceSaveEvent::EVENT_POST_SAVE) {
                $preSaveData = $this->vitalRecordByPid[$pid];
                unset($this->vitalRecordByPid[$pid]); // clear out any old data that we may have.
                $isNewRecord = empty($preSaveData['id']);
                $postSaveData = $serviceSaveEvent->getSaveData();
                
                if ($isNewRecord) {
                    $event = new PatientVitalsCreatedEvent();
                    $event->setVitalsData($postSaveData);
                    $event->setPid($pid);
                    $this->eventDispatcher->dispatch($event, PatientVitalsCreatedEvent::EVENT_HANDLE);
                } else {
                    $event = new PatientVitalsUpdatedEvent($preSaveData, $postSaveData);
                    $event->setPid($pid);
                    $this->eventDispatcher->dispatch($event, PatientVitalsUpdatedEvent::EVENT_HANDLE);
                }
            }
        }
adunsulag

comment created time in 6 days

PR opened openemr/openemr

Openemr events scope vitals

Added an event to handle adding additional scopes via event listeners. If a module adds to the REST api the api is pretty useless if there is not an accompanying scope added with the api.

Also added some helper methods to the http request object and some more api logging. I needed this for a module I am building and it will be useful for the community to have it in core.

+125 -6

0 comment

7 changed files

pr created time in 7 days

push eventadunsulag/openemr

Stephen Nielson

commit sha 727ad72d6a57d31a7572838b8badd3e81c4ed469

Fix styles

view details

push time in 7 days

issue openedopenemr/openemr

Open PatientReport event dispatches to all modules

@juggernautsei pointed out that that patient_report.php only allows dispatch events to be fired for just the fax module. As we want other module writers to be able to tie into those events we need to go through and remove all of the if statements that treat it just for the fax module. This will likely require updating the fax module to check on its end whether the fax module has been enabled or not.

created time in 7 days

PullRequestReviewEvent

Pull request review commentopenemr/openemr

Building appointment event dispatcher

 function find_available(extra) {         ?>         </span>             </div>+            <?php+            // Lifemesh button only show if module is enabled

That's odd, I don't remember seeing that with the $oefax, but I'll open up an issue as we should remove the if statement. We'll need to update the fax module to deal with the global flag.

juggernautsei

comment created time in 7 days

create barnchadunsulag/openemr

branch : openemr-events-scope-vitals

created branch time in 7 days

Pull request review commentopenemr/openemr

Building appointment event dispatcher

 function sel_patient() {     dlgopen('find_patient_popup.php', 'findPatient', 650, 300, '', title); } +// This invokes the cancellation popup.+<?php+if (stristr($row['pc_title'], 'telehealth') && ismoduleactive() >= 1) {+    $sendid = new AppointmentAddEvent();+    $sendid->setEventid($eid);+    $eventDispatcher->dispatch(AppointmentAddEvent::ACTION_RENDER_CANCEL_JAVASCRIPT, new GenericEvent());

That's really odd, so for some reason it wasn't recognizing the $eid? Sorry for the delayed responses, I've been doing quite a bit of traveling the last few weeks.

juggernautsei

comment created time in 9 days

PullRequestReviewEvent

Pull request review commentopenemr/openemr

Building appointment event dispatcher

 function sel_patient() {     dlgopen('find_patient_popup.php', 'findPatient', 650, 300, '', title); } +// This invokes the cancellation popup.

I agree, just passing the row data and leaving it generic will be way better and allows more customizations than just telehealth.

juggernautsei

comment created time in 9 days

PullRequestReviewEvent

pull request commentopenemr/openemr

Openemr swagger continued for api documentation

Great work on all of this @bradymiller!

bradymiller

comment created time in 13 days

PullRequestReviewEvent

Pull request review commentopenemr/openemr

Building appointment event dispatcher

 function sel_patient() {     dlgopen('find_patient_popup.php', 'findPatient', 650, 300, '', title); } +// This invokes the cancellation popup.+<?php+if (stristr($row['pc_title'], 'telehealth') && ismoduleactive() >= 1) {+    $sendid = new AppointmentAddEvent();+    $sendid->setEventid($eid);+    $eventDispatcher->dispatch(AppointmentAddEvent::ACTION_RENDER_CANCEL_JAVASCRIPT, new GenericEvent());

@juggernautsei Wouldn't you want to send the $sendid object here instead of GenericEvent?

juggernautsei

comment created time in 13 days