Can we update the wiki to our current understanding and progress (as we go forward)?
Regards, On Wed, Oct 19, 2011 at 10:27 PM, Darius Jazayeri <[email protected]>wrote: > Hi Rohit, > > If you include a link to the project or ticket in your email, that will > give people more background for (the majority) of people who don't know > offhand what the auditing project is. > > Generally when you create/update/void something, we have "SaveHandlers" > that are invoked via AOP and they set the creator/dateCreated/changedBy/etc > fields on the objects. (Or at least that's what we were doing until > recently, when we added a hibernate interceptor to take care of some of > those details.) So, for example if a user wants to soft-delete a Patient, > they'd call patientService.voidPatient(patient, "Reason"). The user and date > would be set by OpenMRS. > > Now, the goal of the audit project is that we would actually remove the > audit fields. The fact that a patient is edited, and by whom, would be in > the audit table--it wouldn't need to be stored in the patient table anymore. > > To answer your initial question, void reason should usually be provided by > the user (e.g. the second argument to PatientService.voidPatient), and if > not it should default to something like "deleted through API". The changedBy > would be Context.getAuthenticatedUser(), and dateChanged would be now(). > > -Darius > > On Wed, Oct 19, 2011 at 6:59 PM, Rohit Manohar <[email protected]> wrote: > >> Restating, does an insert/update/delete to a table with auditing require >> that all the audit attributes ( >> https://wiki.openmrs.org/display/docs/Conventions) be specified by the >> user? >> >> >> On Wed, Oct 19, 2011 at 9:54 PM, Rohit Manohar <[email protected]> wrote: >> >>> Hi >>> >>> We are working on building a centralizes audit service. One of the fields >>> required is 'void_reason'. Could someone elaborate how the hibernate >>> interceptor is supposed to obtain this? >>> >>> Regards, >>> -- >>> Rohit Manohar >>> Graduate Student >>> North Carolina State University >>> Raleigh, US. >>> >>> >> >> >> -- >> Rohit Manohar >> Graduate Student >> North Carolina State University >> Raleigh, US. >> >> ------------------------------ >> Click here to >> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from >> OpenMRS Developers' mailing list >> > > ------------------------------ > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list -- Rohit Manohar Graduate Student North Carolina State University Raleigh, US. _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

