old-www/HOWTO/Medicine-HOWTO/x409.html

673 lines
19 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Installing a Medical Record Application (not ready yet)
</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux Medicine-HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Veterinary applications"
HREF="x400.html"><LINK
REL="NEXT"
TITLE="Imaging Applications"
HREF="imaging.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Medicine-HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x400.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="imaging.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN409"
></A
>8. Installing a Medical Record Application (not ready yet)</H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN411"
></A
>8.1. CLARIFICATION</H2
><P
>I will no longer aim this HOW-TO as an actual how-to. This section is deprecated and will no longer be maintained, but will not be removed.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN414"
></A
>8.2. Point of this section</H2
><P
> This section is actually going to be the <EM
>HOW-TO</EM
> of this HOW-TO document. I intend to include instructions or refer
to instruction on installing what available systems that
are readily usable at this point.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN418"
></A
>8.3. My Assumptions About You</H2
><P
>I will try to be pretty cook book about how to install these applications, which means that if I can, i will always tell you what to type (at least what to type that works for me). The problem is that this assumes that you know what a shell window is and can switch directories with-in, which actually assumes a fair level of technical sophistication since most of us have gotten used to Microsoft based Windows systems. Which is to say that a lot of us only have interacted with a computer using a Graphics User Interface (Gui's), and that these installation require that you be familiar with Command Line Interfaces (CLI) like a terminal window or a shell.
</P
><P
>If you don't know what I am talking about then I recommend you ask someone (me possibly) about what shell windows are, and probably what a UNIX-based Operating system looks like, especially without a GUI.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN422"
></A
>8.4. OIO</H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN424"
></A
>8.4.1. What is it?</H3
><P
> The OIO system starts a higher level of abstraction
- starting with modeling "forms". The forms are then
used to model/build progress notes etc. The OIO system
makes use of a relational database back-end (PostgreSQL) - 1) making the data/metadata/presentation separation more distinct, 2) making integration with other system (e.g. legacy systems, GNUMed, SQL Clinic etc) easier, 3) making query construction/extension easier (via SQL).
</P
><P
>If you search the OpenHealth mailing list archives, you will see extensive discussion regarding this in the context of GEHR and OIO. GEHR uses the same approach but calls this intermediate level of abstraction "archetypes". The advantage of the OIO/GEHR approach is that the metadata components can be plug-and-play - meaning that the system can be easily extended/customized AND portable medical records become easier to implement.
</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN428"
></A
>8.4.2. HOW TO INSTALL OIO</H3
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN430"
></A
>8.4.2.1. A word on documentation</H4
><P
>I can not stress how really good and how much documentation the developers of OIO have written. There are some confusing parts, especially if you are in a hurry. :) However, please read the install documentation at <A
HREF="http://www.txoutcome.org"
TARGET="_top"
>OIO</A
> then come back. Hopefully, I will import or streamline the documentation since, the developers want to support OIO on all distribution, whereas my slant is becoming more and more based on the Debian distribution.</P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN434"
></A
>8.4.2.2. Initial Notes on Debian Installation</H4
><DIV
CLASS="SECT5"
><H5
CLASS="SECT5"
><A
NAME="AEN436"
></A
>8.4.2.2.1. Changes to PostgreSQL</H5
><P
>One of the more aggravating things was find that Zope could not interact (connect) to the PostgreSQL database. What was happening (I will give greater detail later) is that the 'postgres' user could not be authenticated. I think this is a problem in that Krebs authentication is not installed by default. To fix this you need to <TT
CLASS="USERINPUT"
><B
>cd /etc/PostgreSQL/</B
></TT
> and find the pg_hba.conf file. Using what ever editor you like, find the bit of code that tells who can and can not access to the database. Unfortunately, the only way I could get it to work for now is to change:</P
><P
> <A
NAME="AEN441"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>local all peer sameuser</P
><P
>host all 127.0.0.1 255.0.0.0 ident sameuser</P
><P
>host all 0.0.0.0 0.0.0.0 reject</P
><P
>And change it to </P
><P
>local all trust</P
><P
>host all 127.0.0.1 255.0.0.0 trust</P
><P
>host all 0.0.0.0 0.0.0.0 reject</P
></BLOCKQUOTE
>
</P
></DIV
><DIV
CLASS="SECT5"
><H5
CLASS="SECT5"
><A
NAME="AEN449"
></A
>8.4.2.2.2. TimeStamp Error</H5
><P
>I ran into this problem because apparently PostgreSQL does not like the</P
><A
NAME="AEN452"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
><P
CLASS="LITERALLAYOUT"
>On&nbsp;Sat,&nbsp;2&nbsp;Mar&nbsp;2002&nbsp;dude@deletia.com&nbsp;wrote:<br>
...<br>
&#62;&nbsp;I&nbsp;have&nbsp;reached&nbsp;the&nbsp;section&nbsp;that&nbsp;asks&nbsp;me&nbsp;to&nbsp;archive&nbsp;a&nbsp;form.<br>
&#62;<br>
&#62;&nbsp;I&nbsp;hit&nbsp;the&nbsp;'now'&nbsp;button,&nbsp;then&nbsp;hit&nbsp;'Create&nbsp;a&nbsp;new&nbsp;version'&nbsp;and&nbsp;i&nbsp;get&nbsp;the<br>
&#62;&nbsp;follow&nbsp;error:<br>
&#62;&nbsp;This&nbsp;is&nbsp;the&nbsp;source&nbsp;of&nbsp;it&nbsp;the&nbsp;html&nbsp;page:<br>
&#62;&nbsp;&#60;strong&#62;Error&nbsp;Value:&nbsp;ERROR:&nbsp;&nbsp;Bad&nbsp;timestamp&nbsp;external&nbsp;representation<br>
&#62;&nbsp;'2002/02/03&nbsp;17:22:58&nbsp;US/Pacific'<br>
<br>
I&nbsp;ran&nbsp;into&nbsp;this&nbsp;same&nbsp;problem&nbsp;after&nbsp;the&nbsp;end&nbsp;of&nbsp;day&nbsp;light&nbsp;savings&nbsp;time.&nbsp;:-)<br>
The&nbsp;reason&nbsp;for&nbsp;this&nbsp;is&nbsp;that&nbsp;PostgreSQL&nbsp;does&nbsp;not&nbsp;like&nbsp;US/Pacific&nbsp;for&nbsp;time<br>
zone.&nbsp;The&nbsp;fix&nbsp;is&nbsp;to&nbsp;provide&nbsp;the&nbsp;time&nbsp;stamp&nbsp;in&nbsp;GMT&nbsp;time.<br>
<br>
The&nbsp;fix&nbsp;is&nbsp;to&nbsp;add&nbsp;the&nbsp;following&nbsp;to&nbsp;the&nbsp;OIO/forms/archive_form/archive_b<br>
method:<br>
++++++++++++++++++++++++++++++++<br>
&#60;dtml-if&nbsp;time&#62;<br>
&nbsp;&#60;dtml-call&nbsp;"REQUEST.set('time_string',&nbsp;_.str(time.toZone('GMT')))"&#62;<br>
&#60;/dtml-if&#62;<br>
++++++++++++++++++++++++++++++++<br>
(it&nbsp;goes&nbsp;right&nbsp;before&nbsp;the&nbsp;following,&nbsp;make&nbsp;sure&nbsp;time=time_string&nbsp;in&nbsp;the<br>
parameter&nbsp;list)<br>
==========================================<br>
&#60;!--#in&nbsp;"putin_archived_forms_c(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;form=name,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;archivedname=newname,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version=newversion_value,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time=time_string,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;creator=creator,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description=description<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)"--&#62;<br>
==========================================<br>
So,&nbsp;basically&nbsp;the&nbsp;new&nbsp;routine&nbsp;converts&nbsp;the&nbsp;time&nbsp;stamp&nbsp;into&nbsp;GMT&nbsp;time&nbsp;-&nbsp;I<br>
think&nbsp;GMT-7&nbsp;&nbsp;or&nbsp;GMT-8&nbsp;for&nbsp;US/Pacific,&nbsp;depending&nbsp;on&nbsp;daylight&nbsp;saving&nbsp;time<br>
status.<br>
<br>
Best&nbsp;regards,<br>
<br>
Andrew<br>
---<br>
Andrew&nbsp;P.&nbsp;Ho,&nbsp;M.D.<br>
OIO:&nbsp;Open&nbsp;Infrastructure&nbsp;for&nbsp;Outcomes<br>
www.TxOutcome.Org<br>
<br>&#13;</P
></P
></BLOCKQUOTE
><DIV
CLASS="CAUTION"
><P
></P
><TABLE
CLASS="CAUTION"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Note that in the originally distribution of OIO you only see 'time=time', when you are change the source code on this page, so make sure to make it <TT
CLASS="USERINPUT"
><B
>time=time_string</B
></TT
>.</P
><P
>I am told that this will be fixed in the next release 1.0</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT5"
><H5
CLASS="SECT5"
><A
NAME="AEN459"
></A
>8.4.2.2.3. Port Problems</H5
><P
>Note that Zope has changed its default port from 8080 to 9673 to avoid conflicts with the proxy server.
You will not be able to get OIO to run correctly if you don't specify the correct ports that Zope is using.
You can correct these by clicking on the main OIO folder, and selecting the Properties. Or you add <TT
CLASS="USERINPUT"
><B
>/manage</B
></TT
> to the end of you OIO URL. For instance <TT
CLASS="USERINPUT"
><B
>http://localhost:8673/OIO</B
></TT
> becomes <TT
CLASS="USERINPUT"
><B
>http://localhost:9673/OIO/manage</B
></TT
></P
><P
>You are looking for field base_URL and form_URL and you will see that OIO has port 8080 set up as the default. You need to change this number to 9673.</P
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN466"
></A
>8.5. FreePM</H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN468"
></A
>8.5.1. Introduction to FreePM</H3
><P
> This is the second application that I see that I think is actually useful for the medical office. (One of my main concerns, as I will be using it exactly for that.)
</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN471"
></A
>8.5.2. Where to to get it</H3
><P
>You can get the entire package which include everything you need like Zope products and even python from <A
HREF="http://www.freepm.org:8080/freepm_download/fpm_downloads"
TARGET="_top"
>Here</A
> and choosing FreePM-1.0b6-FULL-linux2-x86.tar.gz. This will include all the documentation.
</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN475"
></A
>8.5.3. Basic Installation of FreePM</H3
><P
>Given that Tim Cook has put together everything you need to get a fully running FreePM application, I will first deal with installing the application as if you downloaded the full 14MB gzipped file. However, since Zope can be installed separately, and you may have other Zope applications going on, I will also discuss how to install the FreePM Zope product separately from installing Zope.
</P
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN478"
></A
>8.5.3.1. Using the 14MB FreePM download</H4
><P
>Once you have downloaded the 14 MB package, be sure to also download the extensions_for_1.0b6.tar.gz. At this point, it really doesn't matter what directory you have download the gzipped tar files into, but to play it clean and safe, I would download them or move them into their own directory. Then go ahead and <TT
CLASS="USERINPUT"
><B
> gunzip FreePM-1.0b6-FULL-linux2-x86.tar.gz </B
></TT
> to unzip the file and then <TT
CLASS="USERINPUT"
><B
>tar xvf FreePM-1.0b6-FULL-linux2-x86.tar.gz</B
></TT
>
</P
><P
>Once the tar file has finished unpacking, you should see a new directory called FreePM-1.0b6-FULL-linux2-x86. To make things easier I would change the name of this directory to 'FreePM' like so <TT
CLASS="USERINPUT"
><B
>mv FreePM-1.0b6-FULL-linux2-x86 FreePM</B
></TT
>
</P
><P
>Move the extensions_for_1.0b6.tar.gz to the newly created FreePM directory and look for the 'Extension' directory and go ahead and move it there and unpack using the <TT
CLASS="USERINPUT"
><B
>tar xvf</B
></TT
>
</P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN487"
></A
>8.5.3.2. Installing the Zope server</H4
><P
>Tim Cook was smart and kind of enough to write an install script to install the Zope. Once you are in the FreePM directory (remember, the one that you created when you untar-ed the 14MB file), you run the script by tying <TT
CLASS="USERINPUT"
><B
>./install</B
></TT
>
</P
><DIV
CLASS="CAUTION"
><P
></P
><TABLE
CLASS="CAUTION"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>DON'T FORGET TO WRITE YOUR ADMIN and PASSWORD that you will at this point otherwise you will need to re-install the Zope server and determine you new password for admin</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN493"
></A
>8.5.3.3. Running the Zope Server</H4
><P
>Tim Cook also wrote two scripts to start the server and stop the server. Be sure you our in the FreePM directory. You will know this if you see the files 'start' and 'stop' in there. It is also the same directory where you ran the <TT
CLASS="USERINPUT"
><B
>./install</B
></TT
>. To start the Zope server, type <TT
CLASS="USERINPUT"
><B
>./start</B
></TT
>. However you might want to type <TT
CLASS="USERINPUT"
><B
>./start&#38;</B
></TT
> to make it a background process which will free up your terminal window. This will also allow you to stop the Zope Server by typing <TT
CLASS="USERINPUT"
><B
>./stop</B
></TT
> instead of hitting the CRTL-C key combination, a rather blunt way of stopping the Zope server and not an aesthetically pleasing way of stopping the zope process.
</P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN500"
></A
>8.5.3.4. Installing the FreePM zope products</H4
><P
>The key thing before I talk about installing the zope products is that, the first user, Admin, can only add other users and can not by itself actually manage any products. You first need to add a new user and make the user a manager before you can do anything else.
</P
><P
> To log into the running Zope server, you need to open a browser, type in http://127.0.0.1:8080 or depending on how new the Zope server is http://127.0.0.1:9673. If you look at the output during the install it will tell you what to what port to connect. <DIV
CLASS="CAUTION"
><P
></P
><TABLE
CLASS="CAUTION"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Note: Using the old port 8080 would conflict, which is why Zope changed the port connection.</P
></TD
></TR
></TABLE
></DIV
> At this point you should the zope introductory page, if not, make sure you have the correct port.
</P
><P
>Go ahead and click on the link that says Zope management interface or enter http:127.0.0.1:8080/manage and you should the zope management screen. You know you are in the correct section if you see a root folder at the top of the Left Frame. To make sure we are on the same page, go ahead and click on the Root Folder icon in the right Frame.</P
><P
>You then should see the list of contents of the Root Folder on the Right Frame.</P
><P
>Look for and click on the <EM
>acl_users</EM
> folder. select add new user, fill in the required fields. You leave the domain field blank. And then be sure sure to select role. In this case, click on <EM
>manager</EM
> for this user.</P
><P
>I am having problems successfully logging out completely using zope, so when you intend to switch users, be sure to completely close all browser windows.</P
><P
>Once you added a new user that has the role of manager, log back in. That is to say, Close all browsers and open up a new browsers and go the the zope management screen. You should be asked for a login at this point. Go ahead and enter in you new user login and password.</P
><P
>Once you are logged in as an user (not the admin user), go ahead and click on the Root Folder on the top of the left frame. Scroll to the bottom of the Right Frame and you should see the Import/Export button. You see a new screen. In the Field Import File Name, enter FreePM Product.zexp and then hit the import button. You should see a new scree indicating success</P
><P
>The next step, is to again hit on the Root Folder Icon at the TOP LEFT FRAME. Again hit the Import/Export button, but this time, you want to import FreePM.zexp. Then hit the Import button. <DIV
CLASS="CAUTION"
><P
></P
><TABLE
CLASS="CAUTION"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Note that it will take some time to import the FreePM.zexp Zope product as it is quite large and you may get a browser error. I almost lost hair doing this stage because I could not figure out what was going wrong. In fact nothing was going wrong, it just took some time to import this large (32MB) zope product. If you want to make sure something is actually going on, I recommend using the <TT
CLASS="USERINPUT"
><B
>top</B
></TT
> unix command, which will show you that python is actively still working to import FreePM.zexp.</P
></TD
></TR
></TABLE
></DIV
></P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN518"
></A
>8.5.3.5. Running FreePM</H4
><P
>To actually get to the FreePM, you need to open a browser and go to http://127.0.0.1:8080/FreePM</P
><P
>You should see the introductory screen of FreePM. However, so far I can only add patients but can not edit any sensitive information. This section will need a lot of work</P
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x400.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="imaging.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Veterinary applications</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Imaging Applications</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>