Skip to content

Commit

Permalink
temp as of tuesday
Browse files Browse the repository at this point in the history
  • Loading branch information
creavill committed May 2, 2023
1 parent 525520a commit 031b860
Show file tree
Hide file tree
Showing 128 changed files with 4,163 additions and 33 deletions.
2 changes: 1 addition & 1 deletion windowsInstaller/newFemr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ RUN sbt clean compile
EXPOSE 9000

# run fEMR using env variables
ENTRYPOINT url=$DB_URL usr=$DB_USER pass=$DB_PASS sbt ~run
ENTRYPOINT url=$DB_URL usr=$DB_USER pass=$DB_PASS sbt ~run
92 changes: 92 additions & 0 deletions windowsInstaller/newFemr/conf/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
include "matching.conf"
#Default admin username and password
default.admin.username="admin"
default.admin.password="admin"

#Default superuser username and password
default.superuser.username="superuser"
default.superuser.password="password"

#Set to 1 to limit functionality to only the research module
#Set to 0 (or not 1) for normal functionality
settings.researchOnly=0

#Session time out, in minutes
sessionTimeout=30

#Password hash strength
bcrypt.workFactor=10

play.http.secret.key="xSLvw;4MmQfa0uc2oB8OuIh[=?t;hJ4wN=SGK8Xfmo?WHgQ2h>s@<hU?291ZO;/o"
play.il8n.langs="en"

#Register MySQL database settings
db.default.driver="com.mysql.jdbc.Driver"
db.default.url="jdbc:mysql://localhost/femr_db?characterEncoding=UTF-8"
db.default.username="sa"
db.default.password="password"
db.default.logStatements=false

#Register paths for photos
#if photos.useDbStorage = "true", then fEmr will store all photos
# within the database. Otherwise store them as files.
photos.useDbStorage="true"
photos.path="./Upload/Pictures/Patients"
photos.encounterPath="./Upload/Pictures/PatientEncounters"
photos.defaultProfilePhoto="./public/img/defaultProfile.png"
#Register path for CSV export
csv.path="./Upload/CSV"


#Register eBean classes
ebean.default=["femr.data.models.*"]

#Register Guice modules
play.modules.enabled += "femr.util.dependencyinjection.modules.BusinessLayerModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.DataLayerModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.MapperModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.UtilitiesModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.SeederModule"

# true will turn on a scheduler
# false will turn it off
# This scheduler will check for internet connectivity and inform and
# endpoint defined by locationDataEndpoint
# It will also try to build a reverse SSH connection to the server running fEMR
internetconnection.enableInternetConnectivityFunctionality = false
# Time to wait before the task times out
internetconnection.timeoutInMiliseconds = 1000
# How often the scheduled task will check for internet
internetconnection.connectionCheckIntervalInSeconds = 5
# Note, that trailing slash is important. Django can't redirect and retain post data
internetconnection.locationDataEndpoint = "http://central.teamfemr.org/femrlocations/postlocation/"
# How often the scheduled task will inform the endpoint that it is awake
internetconnection.locationDataSendIntervalInSeconds = 60
# Parameters for executing ssh
internetconnection.sshUser = ""
internetconnection.sshHost = ""
# SSH key that is not password protected
internetconnection.pathToSshKey = ""
#internetconnection.pathToSshKnownHosts = "/home/<your user>/.ssh/known_hosts"
# Remote port listening for an SSH connection
internetconnection.remoteSshPort = 0
# Remote port that will forward SSH traffic
internetconnection.remoteSshPortForward = 0
# Local port listening for an SSH conncetion
internetconnection.localSshPort = 0
internetconnection.sshTimeoutInMilliseconds = 100000

#Register custom error handler
play.http.errorHandler = "femr.util.ErrorHandler"

#Location for HTTP Filters
play.http.filters = "femr.util.filters.Filters"

#Akka HTTP server timeout overrides
play.server.http.idleTimeout = 60s
play.server.akka.requestTimeout = 60s

play.assets {
path = "/public"
urlPrefix = "/assets"
}
91 changes: 91 additions & 0 deletions windowsInstaller/newFemr/conf/application.docker.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#Default admin username and password
default.admin.username="admin"
default.admin.password="admin"

#Default superuser username and password
default.superuser.username="superuser"
default.superuser.password="password"

#Set to 1 to limit functionality to only the research module
#Set to 0 (or not 1) for normal functionality
settings.researchOnly=0

#Session time out, in minutes
sessionTimeout=30

#Password hash strength
bcrypt.workFactor=10

play.http.secret.key="xSLvw;4MmQfa0uc2oB8OuIh[=?t;hJ4wN=SGK8Xfmo?WHgQ2h>s@<hU?291ZO;/o"
play.il8n.langs="en"

#Register MySQL database settings
db.default.driver="com.mysql.jdbc.Driver"
db.default.url=${?url}
db.default.username=${?usr}
db.default.password=${?pass}
db.default.logStatements=false

#Register paths for photos
#if photos.useDbStorage = "true", then fEmr will store all photos
# within the database. Otherwise store them as files.
photos.useDbStorage="true"
photos.path="./Upload/Pictures/Patients"
photos.encounterPath="./Upload/Pictures/PatientEncounters"
photos.defaultProfilePhoto="./public/img/defaultProfile.png"
#Register path for CSV export
csv.path="./Upload/CSV"


#Register eBean classes
ebean.default=["femr.data.models.*"]

#Register Guice modules
play.modules.enabled += "femr.util.dependencyinjection.modules.BusinessLayerModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.DataLayerModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.MapperModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.UtilitiesModule"
play.modules.enabled += "femr.util.dependencyinjection.modules.SeederModule"

# true will turn on a scheduler
# false will turn it off
# This scheduler will check for internet connectivity and inform and
# endpoint defined by locationDataEndpoint
# It will also try to build a reverse SSH connection to the server running fEMR
internetconnection.enableInternetConnectivityFunctionality = false
# Time to wait before the task times out
internetconnection.timeoutInMiliseconds = 1000
# How often the scheduled task will check for internet
internetconnection.connectionCheckIntervalInSeconds = 5
# Note, that trailing slash is important. Django can't redirect and retain post data
internetconnection.locationDataEndpoint = "http://central.teamfemr.org/femrlocations/postlocation/"
# How often the scheduled task will inform the endpoint that it is awake
internetconnection.locationDataSendIntervalInSeconds = 60
# Parameters for executing ssh
internetconnection.sshUser = ""
internetconnection.sshHost = ""
# SSH key that is not password protected
internetconnection.pathToSshKey = ""
#internetconnection.pathToSshKnownHosts = "/home/<your user>/.ssh/known_hosts"
# Remote port listening for an SSH connection
internetconnection.remoteSshPort = 0
# Remote port that will forward SSH traffic
internetconnection.remoteSshPortForward = 0
# Local port listening for an SSH conncetion
internetconnection.localSshPort = 0
internetconnection.sshTimeoutInMilliseconds = 100000

#Register custom error handler
#play.http.errorHandler = "femr.util.ErrorHandler"

#Location for HTTP Filters
play.http.filters = "femr.util.filters.Filters"

#Akka HTTP server timeout overrides
play.server.http.idleTimeout = 60s
play.server.akka.requestTimeout = 60s

play.assets {
path = "/public"
urlPrefix = "/assets"
}
15 changes: 15 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# --- !Ups

CREATE TABLE `users` (
`id` INT NOT NULL AUTO_INCREMENT ,
`first_name` VARCHAR(255) NOT NULL ,
`last_name` VARCHAR(255) NULL ,
`email` VARCHAR(255) NOT NULL ,
`password` VARCHAR(255) NOT NULL ,
PRIMARY KEY (`id`) ,
UNIQUE INDEX `id_UNIQUE` (`id` ASC) ,
UNIQUE INDEX `email_UNIQUE` (`email` ASC) );

# --- !Downs

DROP TABLE IF EXISTS users;
84 changes: 84 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/10.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# --- !Ups

UPDATE `vitals`
SET name="Height_Feet"
WHERE name="Height"
AND unit_of_measurement = "feet";

UPDATE `vitals`
SET name="Height_Inches"
WHERE name="Height"
AND unit_of_measurement = "inches";

UPDATE `vitals`
SET name="Heart_Rate"
WHERE name="Heart Rate";

UPDATE `vitals`
SET name="Respiratory_Rate"
WHERE name="Respiratory Rate";

UPDATE `vitals`
SET name="Oxygen_Saturation"
WHERE name="Oxygen Saturation";

UPDATE `vitals`
SET name="Blood_Pressure_Systolic"
WHERE name="Blood Pressure"
AND unit_of_measurement = "systolic";

UPDATE `vitals`
SET name="Blood_Pressure_Diasolic"
WHERE name="Blood Pressure"
AND unit_of_measurement = "diasolic";

UPDATE `vitals`
SET unit_of_measurement="mmHg"
WHERE unit_of_measurement="diasolic";

UPDATE `vitals`
SET unit_of_measurement="mmHg"
WHERE unit_of_measurement="systolic";

# --- !Downs

UPDATE `vitals`
SET name="Height"
WHERE name="Height Feet"
AND unit_of_measurement = "feet";

UPDATE `vitals`
SET name="Height"
WHERE name="Height_Inches"
AND unit_of_measurement = "inches";

UPDATE `vitals`
SET name="Heart Rate"
WHERE name="Heart_Rate";

UPDATE `vitals`
SET name="Respiratory Rate"
WHERE name="Respiratory_Rate";

UPDATE `vitals`
SET name="Oxygen Saturation"
WHERE name="Oxygen_Saturation";

UPDATE `vitals`
SET name="Blood Pressure"
WHERE name="Blood_Pressure_Systolic"
AND unit_of_measurement = "systolic";

UPDATE `vitals`
SET name="Blood Pressure"
WHERE name="Blood_Pressure_Diasolic"
AND unit_of_measurement = "diasolic";

UPDATE `vitals`
SET unit_of_measurement="diasolic"
WHERE name="Blood_Pressure_Diasolic";

UPDATE `vitals`
SET unit_of_measurement="systolic"
WHERE name="Blood_Pressure_Systolic";

13 changes: 13 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/100.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --- !Ups

ALTER TABLE `play_evolutions`
CHANGE COLUMN `apply_script` `apply_script` MEDIUMTEXT NULL DEFAULT NULL ,
CHANGE COLUMN `revert_script` `revert_script` MEDIUMTEXT NULL DEFAULT NULL ,
CHANGE COLUMN `last_problem` `last_problem` MEDIUMTEXT NULL DEFAULT NULL ;

# --- !Downs

ALTER TABLE `play_evolutions`
CHANGE COLUMN `apply_script` `apply_script` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `revert_script` `revert_script` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `last_problem` `last_problem` TEXT NULL DEFAULT NULL ;
7 changes: 7 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/101.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# --- !Ups

ALTER TABLE `system_settings` ADD COLUMN description VARCHAR(250);

# --- !Downs

ALTER TABLE `system_settings` DROP COLUMN `description`;
11 changes: 11 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/102.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --- !Ups

UPDATE `tab_fields`
SET name="procedure_counseling"
WHERE name="treatment"

# --- !Downs

UPDATE `tab_fields`
SET name="treatment"
WHERE name="procedure_counseling"
8 changes: 8 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/103.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# --- !Ups

ALTER TABLE `photos`
ADD COLUMN `photo` LONGBLOB NULL AFTER `insertTS`;

# --- !Downs

ALTER TABLE `photos` DROP COLUMN `photo`;
17 changes: 17 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/104.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --- !Ups

ALTER TABLE `patient_encounter_tab_fields`
ADD COLUMN `IsDeleted` DATETIME NULL AFTER `chief_complaint_id`,
ADD COLUMN `DeletedByUserId` INTEGER NULL AFTER `IsDeleted`,
ADD CONSTRAINT `fk_deleted_by_user_id_id`
FOREIGN KEY (`DeletedByUserId`)
REFERENCES `users` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;

# --- !Downs

ALTER TABLE `patient_encounter_tab_fields`
DROP COLUMN `IsDeleted`,
DROP FOREIGN KEY `fk_deleted_by_user_id_id`,
DROP COLUMN `DeletedByUserId`;
11 changes: 11 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/105.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --- !Ups

ALTER TABLE `medication_inventories`
ADD COLUMN `timeAdded` DATETIME NULL,
ADD COLUMN `createdBy` INT(11) NULL;

# --- !Downs

ALTER TABLE `medication_inventories`
DROP COLUMN `timeAdded`,
DROP COLUMN `createdBy`;
13 changes: 13 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/106.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --- !Ups

ALTER TABLE `medication_inventories`
ADD CONSTRAINT `fk_created_by_user_id_user_id`
FOREIGN KEY (`createdBy`)
REFERENCES `users` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;

# --- !Downs

ALTER TABLE `medication_inventories`
DROP FOREIGN KEY `fk_created_by_user_id_user_id`;
11 changes: 11 additions & 0 deletions windowsInstaller/newFemr/conf/evolutions/default/107.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --- !Ups

CREATE TABLE `feedback` (
`id` INT NOT NULL AUTO_INCREMENT ,
`date` DATE NOT NULL ,
`feedback` TEXT NOT NULL ,
PRIMARY KEY (`id`) );

# --- !Downs

DROP TABLE IF EXISTS feedback;
Loading

0 comments on commit 031b860

Please sign in to comment.