Skip to content

Releases: LightSys/midwife-EMR

0.8.2

08 Nov 02:17
Compare
Choose a tag to compare

0.8.2

  • Uses shmig for database migrations now.

Database changes

CREATE TABLE `shmig_version` (
`version` int(11) NOT NULL,
  `migrated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
);

INSERT INTO shmig_version VALUE (1509440772, now());

0.8.1

04 Jul 06:39
Compare
Choose a tag to compare

0.8.1

  • Added the Elm client for the administrator role.
    • Activated per user when the user comment field starts with PHASE2ELM.
  • Vaccination report has separate columns to distinguish TT from TD vaccinations.
  • Add the keyValue table and some records, but adjust the records per the installation site.

SQL changes

These are the changes to implement the keyValue table. Backup your database before applying changes.

CREATE TABLE IF NOT EXISTS `keyValue` (
  id INT AUTO_INCREMENT PRIMARY KEY,
  kvKey VARCHAR(50) NOT NULL,
  kvValue VARCHAR(200) NULL,
  description VARCHAR(200) NULL,
  valueType ENUM('text', 'list', 'integer', 'decimal', 'date', 'boolean') NOT NULL,
  acceptableValues VARCHAR(500) NULL,
  systemOnly TINYINT NOT NULL DEFAULT 0,
  UNIQUE(kvKey)
);

CREATE TABLE keyValueLog LIKE keyValue;
ALTER TABLE keyValueLog ADD COLUMN op CHAR(1) DEFAULT '';
ALTER TABLE keyValueLog ADD COLUMN replacedAt DATETIME NOT NULL;
ALTER TABLE keyValueLog MODIFY COLUMN id INT DEFAULT 0;
ALTER TABLE keyValueLog DROP PRIMARY KEY;
ALTER TABLE keyValueLog ADD PRIMARY KEY (id, replacedAt);
ALTER TABLE keyValueLog DROP KEY kvKey;

DELIMITER $$
DROP TRIGGER IF EXISTS keyValue_after_insert;
CREATE TRIGGER keyValue_after_insert AFTER INSERT ON keyValue
FOR EACH ROW
BEGIN
  INSERT INTO keyValueLog
  (id, kvKey, kvValue, description, valueType, acceptableValues, systemOnly, op, replacedAt)
  VALUES (NEW.id, NEW.kvKey, NEW.kvValue, NEW.description, NEW.valueType, NEW.acceptableValues, NEW.systemOnly, "I", NOW());
END;$$
DELIMITER ;

DELIMITER $$
DROP TRIGGER IF EXISTS keyValue_after_update;
CREATE TRIGGER keyValue_after_update AFTER UPDATE ON keyValue
FOR EACH ROW
BEGIN
  INSERT INTO keyValueLog
  (id, kvKey, kvValue, description, valueType, acceptableValues, systemOnly, op, replacedAt)
  VALUES (NEW.id, NEW.kvKey, NEW.kvValue, NEW.description, NEW.valueType, NEW.acceptableValues, NEW.systemOnly, "U", NOW());
END;$$
DELIMITER ;

DELIMITER $$
DROP TRIGGER IF EXISTS keyValue_after_delete;
CREATE TRIGGER keyValue_after_delete AFTER DELETE ON keyValue
FOR EACH ROW
BEGIN
  INSERT INTO keyValueLog
  (id, kvKey, kvValue, description, valueType, acceptableValues, systemOnly, op, replacedAt)
  VALUES (OLD.id, OLD.kvKey, OLD.kvValue, OLD.description, OLD.valueType, OLD.acceptableValues, OLD.systemOnly, "D", NOW());
END;$$
DELIMITER ;

INSERT INTO keyValue
  (kvKey, kvValue, description, valueType, acceptableValues, systemOnly)
VALUES
  ('siteShortName', 'YourClinic', 'A relatively short name for the clinic, i.e. under 10 characters.', 'text', '', 0),
  ('siteLongName', 'Your Full Clinic Name', 'The full name for the clinic.', 'text', '', 0),
  ('address1', 'Street Address Line 1', 'The first line of the street address.', 'text', '', 0),
  ('address2', 'Street Address Line 2', 'The second line of the street address.', 'text', '', 0),
  ('address3', 'Street Address Line 3', 'The third line of the street address, if there is one.', 'text', '', 0),
  ('defaultCity', 'Home Town Name', 'The default locality you want to use that most of your patients come from.', 'text', '', 0),
  ('searchRowsPerPage', '20', 'The number of rows of search results to display per page.', 'integer', '', 0),
  ('customField1', 'Custom1', 'The label on the custom field on the general prenatal tab.', 'text', '', 0),
  ('dateFormat', 'YYYY-MM-DD', 'The date format to use.', 'list', 'MM-DD-YYYY|DD-MM-YYYY|YYYY-MM-DD|MM/DD/YYYY|DD/MM/YYYY|YYYY/MM/DD|MM.DD.YYYY|DD.MM.YYYY|YY.MM.DD', 0)
;

0.6.4

13 Sep 01:24
Compare
Choose a tag to compare

Changes

The following bugs were fixed.

  • Fixed pagination bug in summary report.
  • Fixed bug with reports involving streaming to browser.
  • Fixed bug on tablets not showing A1 risk option.
  • Fixed bug to allow adding client on tablet.

0.6.3

02 May 08:01
Compare
Choose a tag to compare

Change log

  • Only shows active users for health teacher dropdown.

0.6.2

04 Feb 09:09
Compare
Choose a tag to compare

Changes

  • Replaces the session table with sessions as required by the express-mysql-sessions module.
    • This updates table creation script and drops the unused session table.
  • Handle an occasional error due to uninitialized object while adding a pregnancy.
  • Downgrade Bcrypt back to 0.7.8 because it would not compile on the ODroid.
  • Remove Grunt dependencies.
  • Adds an invoice worksheet for midwives to use.
  • Shows EDD instead of LMP on drop down to switch between multiple pregnancies.

Upgrade instructions

See docs/upgrades/0.6.2.md for details.

Run the following in the database.

DROP TABLE session;

0.6.1

12 Oct 03:09
Compare
Choose a tag to compare

Changes

  • Fixed gulpfile.js to properly process priorityList.js.

0.6.0

07 Oct 03:23
Compare
Choose a tag to compare

Changes

See CHANGELOG.md for details.

  • Increased the note fields in many different places to handle longer notes.
  • Modified the note fields on the screens to automatically resize during typing and to always show the full note, therefore no scrolling is required.
  • Allow more than one pregnancy to a patient.
    • Easily add a pregnancy to a patient.
    • Easily see whether a patient has another pregnancy.
    • Easily switch between pregnancies of a patient.
  • Various bug fixes.
    • Lots of fixes to the Summary Report.
    • Better table layout on some screens.
    • Guard can no longer see summary report button and other options (he could never run the report, only see the button).
    • Better handling of LMP on labs page and Iron report.
    • Display of checkboxes is better.
  • Upgrade to current of almost all third-party modules.

Upgrade Instructions

  • Upgrade to Nodejs v0.10.40.
  • Add host and port to cfg.session.config in the configuration file. See config.sample.js.
npm install -g gulp
npm install -g bower
npm install
bower install
gulp

Run the following SQL to upgrade the database. Back up your database first.

ALTER TABLE pregnancy MODIFY COLUMN riskNote VARCHAR(2000) NULL;
ALTER TABLE pregnancy MODIFY COLUMN questionnaireNote VARCHAR(2000) NULL;
ALTER TABLE pregnancyHistory MODIFY COLUMN note VARCHAR(2000) NULL;
ALTER TABLE prenatalExam MODIFY COLUMN fhNote VARCHAR(2000) NULL;
ALTER TABLE prenatalExam MODIFY COLUMN fhtNote VARCHAR(2000) NULL;
ALTER TABLE prenatalExam MODIFY COLUMN risk VARCHAR(2000) NULL;
ALTER TABLE prenatalExam MODIFY COLUMN note VARCHAR(4000) NULL;
ALTER TABLE labTestResult MODIFY COLUMN result VARCHAR(4000) NULL;

ALTER TABLE pregnancyLog MODIFY COLUMN riskNote VARCHAR(2000) NULL;
ALTER TABLE pregnancyLog MODIFY COLUMN questionnaireNote VARCHAR(2000) NULL;
ALTER TABLE pregnancyHistoryLog MODIFY COLUMN note VARCHAR(2000) NULL;
ALTER TABLE prenatalExamLog MODIFY COLUMN fhNote VARCHAR(2000) NULL;
ALTER TABLE prenatalExamLog MODIFY COLUMN fhtNote VARCHAR(2000) NULL;
ALTER TABLE prenatalExamLog MODIFY COLUMN risk VARCHAR(2000) NULL;
ALTER TABLE prenatalExamLog MODIFY COLUMN note VARCHAR(4000) NULL;
ALTER TABLE labTestResultLog MODIFY COLUMN result VARCHAR(4000) NULL;

0.4.0

17 Sep 00:40
Compare
Choose a tag to compare

Changes

  • Added history viewing mode to allow review of all historical changes to a patient record through time and across screens.
  • Added logging to the pregnote table.

Upgrade Instructions

bower install
npm install
grunt

Then run the following SQL.

CREATE TABLE pregnoteTypeLog LIKE pregnoteType;                                      
ALTER TABLE pregnoteTypeLog ADD COLUMN op CHAR(1) DEFAULT '';                        
ALTER TABLE pregnoteTypeLog ADD COLUMN replacedAt DATETIME NOT NULL;                 
ALTER TABLE pregnoteTypeLog MODIFY COLUMN id INT DEFAULT 0;                          
ALTER TABLE pregnoteTypeLog DROP PRIMARY KEY;                                        
ALTER TABLE pregnoteTypeLog ADD PRIMARY KEY (id, replacedAt);                        

CREATE TABLE pregnoteLog LIKE pregnote;                                              
ALTER TABLE pregnoteLog ADD COLUMN op CHAR(1) DEFAULT '';                            
ALTER TABLE pregnoteLog ADD COLUMN replacedAt DATETIME NOT NULL;                     
ALTER TABLE pregnoteLog MODIFY COLUMN id INT DEFAULT 0;                              
ALTER TABLE pregnoteLog DROP PRIMARY KEY;                                            
ALTER TABLE pregnoteLog ADD PRIMARY KEY (id, replacedAt);

DELIMITER $$                                                                         
DROP TRIGGER IF EXISTS pregnote_after_insert;                                        
CREATE TRIGGER pregnote_after_insert AFTER INSERT ON pregnote                        
FOR EACH ROW                                                                         
BEGIN                                                                                
  INSERT INTO pregnoteLog                                                            
  (id, pregnoteType, noteDate, note, updatedBy, updatedAt, supervisor, pregnancy_id, op, replacedAt)
  VALUES (NEW.id, NEW.pregnoteType, NEW.noteDate, NEW.note, NEW.updatedBy, NEW.updatedAt, NEW.supervisor, NEW.pregnancy_id, "I", NOW());
END;$$                                                                               
DELIMITER ;                                                                          

DELIMITER $$                                                                         
DROP TRIGGER IF EXISTS pregnote_after_update;                                        
CREATE TRIGGER pregnote_after_update AFTER UPDATE ON pregnote                        
FOR EACH ROW                                                                         
BEGIN                                                                                
  INSERT INTO pregnoteLog                                                            
  (id, pregnoteType, noteDate, note, updatedBy, updatedAt, supervisor, pregnancy_id, op, replacedAt)
  VALUES (NEW.id, NEW.pregnoteType, NEW.noteDate, NEW.note, NEW.updatedBy, NEW.updatedAt, NEW.supervisor, NEW.pregnancy_id, "U", NOW());
END;$$                                                                               
DELIMITER ;                                                                          

DELIMITER $$                                                                         
DROP TRIGGER IF EXISTS pregnote_after_delete;                                        
CREATE TRIGGER pregnote_after_delete AFTER DELETE ON pregnote                        
FOR EACH ROW                                                                         
BEGIN                                                                                
  INSERT INTO pregnoteLog                                                            
  (id, pregnoteType, noteDate, note, updatedBy, updatedAt, supervisor, pregnancy_id, op, replacedAt)
  VALUES (OLD.id, OLD.pregnoteType, OLD.noteDate, OLD.note, OLD.updatedBy, OLD.updatedAt, OLD.supervisor, OLD.pregnancy_id, "D", NOW());
END;$$                                                                               
DELIMITER ;

DELIMITER $$                                                                         
DROP TRIGGER IF EXISTS pregnoteType_after_insert;                                    
CREATE TRIGGER pregnoteType_after_insert AFTER INSERT ON pregnoteType                
FOR EACH ROW                                                                         
BEGIN                                                                                
  INSERT INTO pregnoteTypeLog                                                        
  (id, name, description, op, replacedAt)                                            
  VALUES (NEW.id, NEW.name, NEW.description, "I", NOW());                            
END;$$                                                                               
DELIMITER ;                                                                          

DELIMITER $$                                                                         
DROP TRIGGER IF EXISTS pregnoteType_after_update;                                    
CREATE TRIGGER pregnoteType_after_update AFTER UPDATE ON pregnoteType                
FOR EACH ROW                                                                         
BEGIN                                                                                
  INSERT INTO pregnoteTypeLog                                                        
  (id, name, description, op, replacedAt)                                            
  VALUES (NEW.id, NEW.name, NEW.description, "U", NOW());                            
END;$$                                                                               
DELIMITER ;                                                                          

DELIMITER $$                                                                         
DROP TRIGGER IF EXISTS pregnoteType_after_delete;                                    
CREATE TRIGGER pregnoteType_after_delete AFTER DELETE ON pregnoteType                
FOR EACH ROW                                                                         
BEGIN                                                                                
  INSERT INTO pregnoteTypeLog                                                        
  (id, name, description, op, replacedAt)                                            
  VALUES (OLD.id, OLD.name, OLD.description, "D", NOW());                            
END;$$                                                                               
DELIMITER ;

INSERT INTO pregnoteTypeLog (id, name, description, op, replacedAt)                  
SELECT id, name, description, "I", date('2015-03-21') FROM pregnoteType;             

INSERT INTO pregnoteLog (id, pregnoteType, noteDate, note, updatedBy,                
  updatedAt, supervisor, pregnancy_id, op, replacedAt)                               
SELECT id, pregnoteType, noteDate, note, updatedBy, updatedAt, supervisor,           
  pregnancy_id, "I", updatedAt                                                       
FROM pregnote;

0.2.33

09 Sep 05:41
Compare
Choose a tag to compare

Changes

  • Fixed overflow issues in Summary report.
  • Upgraded PDFKit to 0.7.1.

Upgrade Instructions

npm update pdfkit
grunt

Release 0.2.32

21 Jul 12:35
Compare
Choose a tag to compare

Changes

  • Upgrade to Bootstrap 3.3.5.
  • Refactored modals per Bootstrap requirements.
  • Other minor visual changes regarding checkboxes, etc.
  • Fixed some overlapping text on some buttons on tablet views.
  • Fixed summary report for two fields reporting incorrectly.
  • Fixed prenatal summary of examiners show unique list now.

Upgrade Instructions

  • bower install
  • grunt