christillman / encounterpro_os

EncounterPro-OS Electronic Health Record Software
GNU Affero General Public License v3.0
0 stars 0 forks source link

Track user that created new patient charts #68

Open MCIR opened 2 months ago

MCIR commented 2 months ago

Currently, it is not possible to track who created patient charts. This applies to new patient charts. It looks like it is possible to track this because the created_by column is showing 'NULL' for all patient charts. Would like to make it possible to track which user created new patient charts and if possible which user merged patient charts.

christillman commented 2 months ago

I found that the current user was not being included in f_create_patient for the created_by column. I added code to sp_patient_merge to record the merging user in the modified_by column, and added an upgrade script to set the patient created_by to the first user who progressed the patient.

MCIR commented 2 months ago

Okay thank you

From: Christopher Tillman @.> Sent: Saturday, 29 June 2024 03:36 To: christillman/encounterpro_os @.> Cc: Madeline Wanjiru @.>; Author @.> Subject: Re: [christillman/encounterpro_os] Track user that created new patient charts (Issue #68)

I believe the nulls are being placed because the new_encounter call uses "current_scribe" as the user_id.

// Create the new appointment ll_encounter_id = current_patient.new_encounter(lstr_encounter, & current_scribe.user_id, & lb_open_encounter)

I think the current_scribe should be set to the current_user if scribing is not in use. I'll check to see why that is not occurring.

— Reply to this email directly, view it on GitHub https://github.com/christillman/encounterpro_os/issues/68#issuecomment-2197826181 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJT6WKJU5TM5EK2NV3NM2YDZJYFRLAVCNFSM6AAAAABJXLS5QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXHAZDMMJYGE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AJT6WKM2KT2EQQV6VCGJ7W3ZJYFRLA5CNFSM6AAAAABJXLS5QOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUDAAVIK.gif Message ID: @. @.> >