⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server readme.txt

📁 PatientRunner 20 Source
💻 TXT
字号:
PatientRunner Server Readme V2.0


Introduction
------------

PatientRunner is an open source mental health clinic medical records system.  Windows client software written in Delphi 7 connects to a MySQL database that contains progress notes, diagnoses, medications, and rating scales.  The client software features a "WYSIWYG" word processing style graphical user interface with spell checker that makes it easy to generate professional looking documents.  User customized templates allow for efficient note creation.  Multiple users can access the database simultaneously.

Ideally, the MySQL database server would be hosted on its own machine with client software installed on different machines.  However both the server and client server could be hosted on the same machine.


Installation
------------

Just run the Windows server self-installer.  The self-installer will install MySQL, start the service, initialize the database, install sample templates and finally set the MySQL root password.  A custom MySQL configuration file will also be installed that will enable the local loop-back interface by setting the bind-address.  As a result, you will only be able to connect to the database through the localhost.  This is recommended unless you know enough about security to set it otherwise.


Manual or Linux Installation
----------------------------

If you want to set it up the PatientRunner server yourself the hard way please read on.


Configuring the MySQL Database Server
-------------------------------------

1.  Install MySQL V4.0.x on your Windows or Linux server.  You can download the installation files from http://dev.mysql.com/downloads/mysql/4.0.html.  Note presently the PatientRunner client is not compatible with MySQL V4.1 or above.

2.  The default installation of MySQL usually does not have a root password and might includes some default anonymous user accounts.  Please pay careful attention to this and make sure you lock down your database correctly.  

You can check to see if MySQL has a root password set with mysql -u root; if you get a mysql prompt, no root password is set.  To set the MySQL root user password, open a mysql prompt and enter the following: 

mysql> update user set password=password('newpasswordhere') where user='root'; 
mysql> flush privileges; 

Check and make sure there are no anonymous accounts.  If there are, make sure all the access flags all permissions are disabled.

There are several nice GUI administration front-ends for MySQL that will let you manage your user accounts easily.  One such frontend is the MySQL Control Center from http://dev.mysql.com/downloads/other/mysqlcc.html.

3.  Log onto the MySQL shell account as root.

4.  Paste the following code into the shell in order to setup all the necessary MySQL tables:

create database patientrunner;
use patientrunner;

create table patients (
patientid int (10) unsigned primary key auto_increment,
lastname varchar(80),
firstname varchar(80),
ssn varchar(14),
birthday datetime,
sex tinyint(1),
rate varchar(20),
rank varchar(20),
service varchar(4),
paydate datetime,
command varchar(80),
poc varchar(80),
status varchar(80),
allergies varchar(80),
lastseendatetime datetime,
inactive tinyint(1),
author varchar(80) );

create table scales (
scaleid int (10) unsigned primary key auto_increment,
patientid int (10) unsigned,
description varchar(80),
scaledate datetime,
result int (11),
author varchar(80) );

create table notes (
noteid int (10) unsigned primary key auto_increment,
patientid int(10) unsigned,
description varchar(80),
notedatetime datetime,
note blob,
dictationpending tinyint(1),
pleasereview tinyint(1),
author varchar(80) );

create table diagnoses (
diagnosisid int (10) unsigned primary key auto_increment,
patientid int(10) unsigned,
diagnosis varchar(80),
startdate datetime,
enddate datetime,
resolved tinyint(1),
author varchar(80) );

create table medications (
medicationid int (10) unsigned primary key auto_increment,
patientid int(10) unsigned,
prescription varchar(80),
startdate datetime,
enddate datetime,
discontinued tinyint(1),
author varchar(80) );

create table templates (
templateid int (10) unsigned primary key auto_increment,
description varchar(80),
template blob,
author varchar(80) );

6.  Create a non-root MySQL user account to allow you to access the database.  This will be the username and password used when logging on to the database through the Windows client software. 

mysql> grant select, insert, update, delete on patientrunner.* to username@"%" identified by 'password'; 
mysql> flush privileges;

7.  That's it.  Your database should now be set up correctly.  Don't forget to start the service.


Compiling the Self-installer with your Custom Executable
--------------------------------------------------------

1.  Download and install Inno Setup from http://www.jrsoftware.org/isinfo.php.
2.  Run Inno Setup
3.  Open the patientrunnerserver.isi Inno Setup script file
4.  Customize and compile
5.  Make sure you include all necessary dependency files (libmysql.dll and the dictionary files)


Appendix A:  MySQL table structures
-------------------------------

PATIENTS

+------------------+------------------+------+-----+---------+----------------+
| Field            | Type             | Null | Key | Default | Extra          |
+------------------+------------------+------+-----+---------+----------------+
| patientid        | int(10) unsigned |      | PRI | NULL    | auto_increment |
| lastname         | varchar(80)      | YES  |     | NULL    |                |
| firstname        | varchar(80)      | YES  |     | NULL    |                |
| ssn              | varchar(14)      | YES  |     | NULL    |                |
| birthday         | datetime         | YES  |     | NULL    |                |
| sex              | tinyint(1)       | YES  |     | NULL    |                |
| rate             | varchar(20)      | YES  |     | NULL    |                |
| rank             | varchar(20)      | YES  |     | NULL    |                |
| service          | varchar(4)       | YES  |     | NULL    |                |
| paydate          | datetime         | YES  |     | NULL    |                |
| command          | varchar(80)      | YES  |     | NULL    |                |
| poc              | varchar(80)      | YES  |     | NULL    |                |
| status           | varchar(80)      | YES  |     | NULL    |                |
| allergies        | varchar(80)      | YES  |     | NULL    |                |
| inactive         | tinyint(1)       | YES  |     | NULL    |                |
| author           | varchar(80)      | YES  |     | NULL    |                |
| lastseendatetime | datetime         | YES  |     | NULL    |                |
+------------------+------------------+------+-----+---------+----------------+

SCALES

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| scaleid     | int(10) unsigned |      | PRI | NULL    | auto_increment |
| description | varchar(80)      | YES  |     | NULL    |                |
| scaledate   | datetime         | YES  |     | NULL    |                |
| author      | varchar(80)      | YES  |     | NULL    |                |
| patientid   | int(10) unsigned | YES  |     | NULL    |                |
| result      | int(11)          | YES  |     | NULL    |                |
+-------------+------------------+------+-----+---------+----------------+

NOTES

+------------------+------------------+------+-----+---------+----------------+
| Field            | Type             | Null | Key | Default | Extra          |
+------------------+------------------+------+-----+---------+----------------+
| noteid           | int(10) unsigned |      | PRI | NULL    | auto_increment |
| patientid        | int(10) unsigned | YES  |     | NULL    |                |
| description      | varchar(80)      | YES  |     | NULL    |                |
| notedatetime     | datetime         | YES  |     | NULL    |                |
| note             | blob             | YES  |     | NULL    |                |
| author           | varchar(80)      | YES  |     | NULL    |                |
| dictationpending | tinyint(1)       | YES  |     | NULL    |                |
| pleasereview     | tinyint(1)       | YES  |     | NULL    |                |
+------------------+------------------+------+-----+---------+----------------+
 
DIAGNOSES

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| diagnosisid | int(10) unsigned |      | PRI | NULL    | auto_increment |
| diagnosis   | varchar(80)      | YES  |     | NULL    |                |
| startdate   | datetime         | YES  |     | NULL    |                |
| enddate     | datetime         | YES  |     | NULL    |                |
| resolved    | tinyint(1)       | YES  |     | NULL    |                |
| patientid   | int(10) unsigned | YES  |     | NULL    |                |
| author      | varchar(80)      | YES  |     | NULL    |                |
+-------------+------------------+------+-----+---------+----------------+

MEDICATIONS

+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| medicationid | int(10) unsigned |      | PRI | NULL    | auto_increment |
| prescription | varchar(80)      | YES  |     | NULL    |                |
| startdate    | datetime         | YES  |     | NULL    |                |
| enddate      | datetime         | YES  |     | NULL    |                |
| patientid    | int(10) unsigned | YES  |     | NULL    |                |
| discontinued | tinyint(1)       | YES  |     | NULL    |                |
| author       | varchar(80)      | YES  |     | NULL    |                |
+--------------+------------------+------+-----+---------+----------------+

TEMPLATES

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| templateid  | int(10) unsigned |      | PRI | NULL    | auto_increment |
| description | varchar(80)      | YES  |     | NULL    |                |
| template    | blob             | YES  |     | NULL    |                |
| author      | varchar(80)      | YES  |     | NULL    |                |
+-------------+------------------+------+-----+---------+----------------+


Notes
-----

Get involved by visiting the official PatientRunner site at http://sf.net/projects/patientrunner.  There you can download the latest software, participate in the discussion forums, submit bug reports, and feature requests.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -