Closed maurya closed 3 years ago
@maurya fyi, I edited your description to flesh out the design a bit
sql for the table
CREATE TABLE `openmrs`.`patientportal_event_log` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` TIMESTAMP(3) NOT NULL DEFAULT NOW(3),
`user_id` INT NULL,
`event` VARCHAR(50) NOT NULL,
`event_data` JSON NULL,
PRIMARY KEY (`id`),
INDEX `User_id_fk_idx` (`user_id` ASC),
CONSTRAINT `User_id_fk`
FOREIGN KEY (`user_id`)
REFERENCES `openmrs`.`users` (`user_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
Added the event Table code commit - https://github.com/personalcancertoolkit/openmrs-module-patientportaltoolkit/commit/3f53ac16aed3e58e4869238b0092de4f5a95d479
added the javascript piece here - https://github.com/personalcancertoolkit/openmrs-module-patientportaltoolkit/commit/ec19339141f007ef22521315217f53af4a02c615
event_log
tableusers.user_id
text
data typeevent_log
with the current user, the given event name, and JSON stringify of data (if provided)