Difference between revisions of "Using the VistA Appliance"

From VistApedia
Jump to: navigation, search
('''Next Steps''')
('''Next Steps''')
Line 226: Line 226:
  
 
== '''Next Steps''' ==
 
== '''Next Steps''' ==
Notes on items to develop
+
'''Notes on items to develop'''
 +
 
 +
<BR>
 +
Developing a streamlined method to launch the Registration, Transfer and Discharge module from the host system (Windows).
 +
<BR>
  
 
<pre>
 
<pre>
Line 312: Line 316:
 
:-)  
 
:-)  
  
**********************
+
- - - - - - - - - - - - - - - - - - -
  
 
JohnLeoZ    View profile  
 
JohnLeoZ    View profile  
Line 359: Line 363:
 
jlz  
 
jlz  
  
*****************************************
+
- - - - - - - - - - - - - - - - - - -
*****************************************
+
- - - - - - - - - - - - - - - - - - -
*****************************************
+
- - - - - - - - - - - - - - - - - - -
 
 
 
        
 
        
 
    
 
    
Chris    View profileHi Peter, Yes; it can be accomplished. Use inetd/xinetd and putty. Caveat; putty session will not be encrypted however the putty session is connecting to 127.0.0.1. Under "normal" circumstances the putty session isn't "leaving" the workstation per say so data is not transmitted over the network. I'm sure others can help explain that better. ;) Step 1) Configure inetd or xinetd to launch ^ZU or ^XUS or whatever routine you wish. [sample inetd/xinetd configuration below] Step 2) [This sample assumes you connect to port 4123 using the QEmu Toaster and have QEmu correctly configured.] Create a shortcut to putty with the following arguments w/o quotes "putty -telnet 127.0.0.1 4123" [Now you don't have to worry about saved sessions. putty starting from command line documentation available @ http://tinyurl.com/ysz6a9] Hope this helps! Mahalo, Chris --- sample xinetd configuration --- service vista {        type = UNLISTED        port = 4123        socket_type = stream        protocol = tcp        user = vista        server = /home/vista/vista_telnet        server_args = -u vista /home/vista/vista_telnet        disable = no        wait = no } --- sample vista_telnet --- #!/bin/sh export HOME=/home/vista source /home/vista/.bash_profile /usr/share/gtm/mumps -run ^ZU On Feb 26, 7:04 pm, "PeterBodtke" <peter.bod...@gmail.com> wrote: > > I submit that this whole thread seems to be way off track. > > Peter, at the top of the thread you said: > > "I am successful launching and connecting putty through the application > > interface, entering 127.0.0.1 in the Host/IP Address field and 2222 in > > the port field, protocol SSH." > I agree there has been a degree of drift in the thread. Perhaps I'm > wrong, but I don't think a saved putty session is what I need. Let me > stop and explain the end goal, by starting at the beginning. > I built an installer for training and demo, now posted on Source > Forge, that copies a modified Toaster, CPRS, QEMU, QEMU Accelerator, > some documents, and several short-cut to the user's Windows system. > Short-cuts are placed nicely on the Windows Start menu, in a > "WorldVistA" folder. One short-cut points to a batch file which > launches QEMU + the Toaster file + and throws in a bunch of commands > for good measure.The chain of event is roughly: QEMU launches, > followed by Linux, and VistA/Taskman auto-starts. Basically it's a one > click operation (in truth it's two, because you have to select a > screen resolution, so sue me.) > The next step is a click on another short-cut that launches CPRS, via > a batch file that contains the commands discussed earlier. The user > logs into CPRS and start using the system. It's a beautiful world and > no one had to type a line command, none, zero, zip. This may be a > confusing situation for a programmer, but total it's acceptable for > health care professional, not to use a line command, etc. > A person looking at the VA demo records will be entertained for 3 to 4 > minutes, reviewing the canned records, clicking thru the tabs, > wondering if they too are allergic to strawberries...and then the will > want to register a new patient. You know, create a new record. A > patient record that they can call their own. > So here is the goal. One click - to open the VistA registration > interface from the Windows desktop. One click, no line commands, no > filling out fields with IP addresses and port numbers, one click. A > short cut pointing to a batch file that contains all the command, > flags, ip address, user names, passwords, secret handshakes, that > launches putty (or whatever application will work, soon) The terminal > application courses its way thru the virtual host/guest/firewall haze > and connects with the VistA server and displays the registration > interface. > This is why I want to figure out the line command to launch a terminal > session that can connect the Windows desktop to QEMU/Linux/VistA/G.TM. > Once it is figured out, I'll put the batch file, cute custom icon, a > terminal application and an update copy of the readme file into the > VistA Demo Appliance installer. > In one click. My friends, can we do this? > Peter > On Feb 26, 9:37 pm, "JohnLeo Zimmer, MD" <jlzim...@cbchc.com> wrote: > > I submit that this whole thread seems to be way off track. > > Peter, at the top of the thread you said: > > "I am successful launching and connecting putty through the application > > interface, entering 127.0.0.1 in the Host/IP Address field and 2222 in > > the port field, protocol SSH." > > If that is so, there is a lot of unnecessary stuff in this thread about > > starting sshd, et cetera, et cetera. :-) > > If I understand you correctly, you want to be able to build a Windows > > bat file... or a Windows shortcut (same thing). That works similarly to > > the command line "CPRSChart s=127.0.0.1 p=9297 CCOW=DISABLE". That's > > what my last post describes. > > "session" is Putty's term for the configuration used to make any > > connection. When you configure Putty's gui interface with  hostname or > > IP address, Port, and protocol (in this case 127.0.0.1, 2222, and SSH) > > that's the "session" that you can save with a name. I used "dslToaster". > > PeterBodtke wrote: > > > John Leo, > > > Where is the session saved? The session configuration needs to be > > > portable, so it can be part of an installer. > > If putty were part of the installer... that might be possible. I'm not > > sure where putty stores his sessions. As it is once you have putty > > functioning the command line version you seek is all but done: > > c:/pathto/putty.exe -load "SESSIONNAME" > > jlz > >  From the Putty manual: > > 3.7.3.1 -load: load a saved session > > The -load option causes PuTTY to load configuration details out of a > > saved session. If these details include a host name, then this option is > > all you need to make PuTTY start a session (although Plink still > > requires an explicitly specified host name). > > You need double quotes around the session name if it contains spaces. > > If you want to create a Windows shortcut to start a PuTTY saved session, > > this is the option you should use: your shortcut should call something like > > d:\path\to\putty.exe -load "my session" > > (Note that PuTTY itself supports an alternative form of this option, for > > backwards compatibility. If you execute putty @sessionname it will have > > the same effect as putty -load "sessionname". With the @ form, no double > > quotes are required, and the @ sign must be the very first thing on the > > command line. This form of the option is deprecated.) - Hide quoted text -- Show quoted text -
 
  More options Feb 27, 7:52 pm 
 
 
From: "Chris" <chris.uyeh...@gmail.com>
 
Date: Wed, 28 Feb 2007 00:52:52 -0000
 
Local: Tues, Feb 27 2007 7:52 pm
 
Subject: Re: Launch putty and connecting to VistA via command line
 
Reply | Reply to author | Forward | Print | Individual message | Show original | Report this message | Find messages by this author
 
Hi Peter,
 
 
 
Yes; it can be accomplished. Use inetd/xinetd and putty. Caveat; putty  
 
Yes; it can be accomplished. Use inetd/xinetd and putty. Caveat; putty  
 
session will not be encrypted however the putty session is connecting  
 
session will not be encrypted however the putty session is connecting  
Line 397: Line 390:
 
Chris  
 
Chris  
  
 
+
--- sample xinetd configuration ---  
--- sample xinetd configuration ---  
 
 
service vista  
 
service vista  
 
{  
 
{  
Line 420: Line 412:
 
export HOME=/home/vista  
 
export HOME=/home/vista  
 
source /home/vista/.bash_profile  
 
source /home/vista/.bash_profile  
/usr/share/gtm/mumps -run ^ZU  
+
/usr/share/gtm/mumps -run ^ZU
 
 
On Feb 26, 7:04 pm, "PeterBodtke" <peter.bod...@gmail.com> wrote:
 

Revision as of 16:42, 3 March 2007

Project Goal

Create a plug and play VistA virtual appliance to support training and demonstration activities.

[1] VistA Appliance Use Case (PDF)

[2] VistA Appliance Demo V0.98 was release on 02/24/2007

This document discusses using the VistA Appliance. See this document for details on HowTo Build an Appliance.

The following are working notes for a project in progress.

Development Milestones

Beta V0.98 Progress

  • Host Configuration: 95%
    • Virtual tool selection: 100% (QEMU)
    • Virtual tool installed with QEMU Accelorator Module (optional)
    • VA Demo Appliance(Toaster) downloaded - 100%
    • Launch script preapred to run QEMU and VA Demo appliance - 100%
    • CPRS installed and launch script prepared - 100%
    • Code review and optimiazation - 20%
  • Guest Configuration: 100%
    • Modifications to inetd - 100%
    • automatically start and stop TaskMan - 100%
    • Code review and optimiazation - 20%
  • Installer design and development: 100%
  • Security Review and Certification: <out of scope for training system>
  • User documentation:
  • Technical documentation: 60%
  • Testing and User Acceptance: 10%

Host architecture - Directory structure

Windows Start Menu > WorldVistA (short-cut)

  • CPRS launch and connect(short-cut)
  • VistA Demo Appliance (short-cut) (a.k.a. QEMU/Linux/VistA/G/TM)
  • VistA Demo Wiki (URL)
  • www.WorldVistA.org (URL)

Program Files > WorldVistA

  • qemu-0.9.0-windows <dir>
  • kqemu-1.3.0pre11 <dir>
  • CPRS <dir>
  • VistA Demo Appliance_README.txt
  • www.WorldVistA.org (URL)
  • VistA Demo Appliance Wiki (URL)
  • VistA Demo Appliance (short-cut to batch file)
  • CPRS launch and connect (short-cut to batch file)
  • Uninst.exe (uninstaller)

VA VistA Demo Toaster 20060926

Extracted files from downloaded file, 'VAVistADemo20060912.zip'
File 'VAVistADemo20060912.qcow' is produced when extaction is complete
Moved 'VAVistADemo20060912.qcow' directory to 'C:\Program Files\qemu-0.8.2-windows'

Updates to VA VistA Demo Toaster appliance: http://groups.google.com/group/Hardhats/browse_thread/thread/89ba7bbdf941b19?hl=en

Modifications to inetd configuration (courtesy KS BHaskar):

To start inetd manually for only the current session:

sudo /etc/init.d/inetd start

To enable inetd to start automatically, execute each of the following commands once. When you reboot your Toaster, inetd will start automatically:

sudo ln -s /etc/init.d/inetd /etc/rc2.d/S20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc3.d/S20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc4.d/S20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc5.d/S20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc1.d/K20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc2.d/K20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc3.d/K20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc4.d/K20inetd 
sudo ln -s /etc/init.d/inetd /etc/rc5.d/K20inetd 

Enhancement to automatically start and stop Taskaman (courtesy KS BHaskar):

Edit the file /etc/init.d/VAVistADemo20060926 (e.g., with "sudo beaver /etc/init.d/VAVistADemo20060926" which gives you a WYSIWYG GUI editor), and make it look like this:

TIP: Be sure there are no blank spaces at the end of each row!


#!/bin/sh 

PATH=/bin:/usr/bin:/sbin:/usr/sbin

source /usr/local/gtm_V5.2-000/gtmprofile
cd /var/VAVistADemo20060926/gtm_V5.2-000

case "$1" in
  start)
        sudo -u dsl /usr/local/gtm_V5.2-000/mupip journal -recover -
backward g/mumps.mjl
        sudo -u dsl ./run RESTART^ZTMB <<EOF
Y
EOF
        ;;
  stop)
        sudo -u dsl ./run STOP^ZTMKU <<EOF
y
Y
EOF
        sleep 5
        sudo -u dsl killall mumps
        sudo -u dsl /usr/local/gtm_V5.2-000/mupip journal -recover -
backward g/mumps.mjl
        ;;
  *)
        echo "Usage: /etc/init.d/VAVistADemo20060926 {start|stop}"
        exit 1
esac

exit 0


Taskman will automatically start when you boot the Toaster, and shut down when you stop it.

Alternative Toaster Modification


  • Guest launch scripting

Modifications: qemu-win.bat

The .bat file that comes with QEMU has been modified to launch Toaster.

The original file:

REM Start qemu on windows.
@ECHO OFF
REM SDL_VIDEODRIVER=directx is faster than windib. But keyboard cannot work well.
SET SDL_VIDEODRIVER=windib
REM SDL_AUDIODRIVER=waveout or dsound can be used. Only if QEMU_AUDIO_DRV=sdl.
SET SDL_AUDIODRIVER=dsound
REM QEMU_AUDIO_DRV=dsound or fmod or sdl or none can be used. See qemu -audio-
help.
SET QEMU_AUDIO_DRV=dsound
REM QEMU_AUDIO_LOG_TO_MONITOR=1 displays log messages in QEMU monitor.
SET QEMU_AUDIO_LOG_TO_MONITOR=0
qemu.exe -L . -m 128 -hda linux.img -soundhw all -localtime

The modified file: (UPDATED 01/28/06 - added 'net start kqemu' to launch QEMU Accelerator Module

net start kqemu
REM Start qemu on windows.
@ECHO OFF
REM SDL_VIDEODRIVER=directx is faster than windib. But keyboard cannot work well.
SET SDL_VIDEODRIVER=windib
REM SDL_AUDIODRIVER=waveout or dsound can be used. Only if QEMU_AUDIO_DRV=sdl.
SET SDL_AUDIODRIVER=dsound
REM QEMU_AUDIO_DRV=dsound or fmod or sdl or none can be used. See qemu -audio-help.
SET QEMU_AUDIO_DRV=dsound
REM QEMU_AUDIO_LOG_TO_MONITOR=1 displays log messages in QEMU monitor.
SET QEMU_AUDIO_LOG_TO_MONITOR=0
qemu.exe -L . -m 128 -hda -soundhw all -localtime -redir tcp:2222::22 -redir tcp:9297::9297 VAVistADemo20060912.qcow

Client connection configuration

CPRS Connection CPRS can connect to the appliance from the host with "CPRSChart s=127.0.0.1 p=9297 CCOW=DISABLE".

  • Above string stored in batch file. Batch file copied to CPRS directory.
  • Windows Hosts file modifcation not required ('127.0.0.1 BROKERSERVER')
  • When CPRS launches and connects with VistA serve, a sign-in screen appears. Use the Access and Verify codes: VistAis#1 and #1isVistA respectively.

Terminal session via puTTY
Terminal session are used to access roll-and-scroll VistA interfaces, such as Admission, Discharge and Transfer. Insert the following into a batch file, copy the file to the same directory as puTTY.exe (commands courtesy John Leo Zimmer)

     Use one of the following, not both.

     putty.exe -ssh -P 2222 -l dsl -pw VistA localhost

     (or)

     putty.exe -ssh -P 2222 -l dsl -pw VistA 127.0.0.1

Double click on the file to launch puTTY and start a terminal session with VistA.

Guest architecture

  • Guest loading scripting
    • Start up / Shut down (/etc/init.d/) - 100%
    • Start/stop TaskMan script applied - 100%
    • Code review and optization - 15%


Development Resources

  • [3] Installer script VistA Demo Appliance V0.98
  • [4] QEMU Main Page

Installation resource references

  • [5] QEMU on Windows provides precompiled QEMU versions for Windows. Version up to 0.9.0.(2007/02/07)
  • [6] QEMU Accelerator Module. kqemu-1.3.0pre11.tar.gz
  • [7] Detailed release notes and VA VistA Demo Toaster 20060926
  • [8] NullSoft Installer System - used to create the set-up installation executable.
  • [9] GUI NSIS - tool for generating basic installer scripts.

Open Issues & Questions


[10] Time Zone Map

Next Steps

Notes on items to develop


Developing a streamlined method to launch the Registration, Transfer and Discharge module from the host system (Windows).

Peter Bodtke wrote:
> The goal is to initiate a Registration, Transfer and Discharge session
> in puTTY with one click of a batch file on the host system. The batch
> file currently logs the user in to Linux:
>

> putty.exe -ssh -P 2222 -l dsl -pw VistA 127.0.0.1 <http://127.0.0.1>

>
> Can the above command also contain a instructions to log into G.TM

> <http://G.TM> and start Registration, Transfer and Discharge session?

Peter,
I would like to find a way to spin multiple tasks from one .bat file.
But I don't see it. In a linux bash script the syntax is there. I am a
little surprised to find that I understand bash better than .bat.

I am not aware of a way to pass a command string to Linux,
BUT once into the bash shell a command to set take the user into GTM can
be included, and it can set a particular M entrypoint^routine.

I have an alias defined in dsl thusly:
set in .bashrc, or .bash_profile, I forget which is the preferred.

alias VISTA="/var/VistAOfficeEHR*/gtm*/run"

Then in the shell typing > VISTA gets you the GTM prompt
GTM>

Typing > VISTA XUS
will take you into VistA's login prompt.

A custom routine here could be used to drop into the desired menu option
with the desired DUZ, etc. already set. As in:
 > VISTA entrypoint^routine

or the alias could be set up as
alias VISTA="/var/VistAOfficeEHR*/gtm*/run entrypoint^routine"

jlz


JohnLeoZ View profile

 More options Feb 27, 2:33 pm  

From: "JohnLeoZ" <jlzim...@cbchc.com> Date: Tue, 27 Feb 2007 11:33:19 -0800 Local: Tues, Feb 27 2007 2:33 pm Subject: Re: Launch putty and connecting to VistA via command line Reply | Reply to author | Forward | Print | Individual message | Show original | Report this message | Find messages by this author On Feb 27, 12:23 pm, "JohnLeoZ" <jlzim...@cbchc.com> wrote:


> Stay tuna'd


Okay, ladies and gentlemen.

(0.) This assumes a "virgin" install of putty prior to these steps.


(1.) At the end of this message are the contents of a putty "session" that I named "QEMUToaster". It needs to be pasted into Notepad and saved with a name with the ".reg" suffix. e.g. "QEMUToaster.reg"


(2.) Open a Command Prompt and type:


regedit /s QEMUToaster.reg


(3.) Presto change-o a script starting putty with that session will now operate to put us into dsl. e.g.: "C:\Program Files\PuTTY\putty.exe" -load "dslToaster" -l dsl -pw vista (beware the wrap)


-)
- - - - - - - - - - - - - - - - - - - 

JohnLeoZ View profile

 More options Feb 27, 2:55 pm  

From: "JohnLeoZ" <jlzim...@cbchc.com> Date: Tue, 27 Feb 2007 11:55:46 -0800 Local: Tues, Feb 27 2007 2:55 pm Subject: Re: Launch putty and connecting to VistA via command line Reply | Reply to author | Forward | Print | Individual message | Show original | Report this message | Find messages by this author for step (4A) above:

Edit dsl's .bash_profile to add the line:


  else /var/VistA*/gtm*/run 


to make .bash_profile look like this:



  1. !/bin/bash

export IRCNICK=DSL SSH=`env | grep SSH_CONNECTION` RUNLEVEL=`runlevel|cut -f2 -d' '` if [ -z "$SSH" ]; then

  if [ $RUNLEVEL -eq 5 ]; then 
      startx 
  fi 
  else /var/VistA*/gtm*/run 

fi




I think that is correct. Bhaskar can correct me if I screwed up this step.


Now we have a MUMPS prompt. An appropriate entry point can be added as appropriate.


jlz

- - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - - 
     
  

Yes; it can be accomplished. Use inetd/xinetd and putty. Caveat; putty session will not be encrypted however the putty session is connecting to 127.0.0.1. Under "normal" circumstances the putty session isn't "leaving" the workstation per say so data is not transmitted over the network. I'm sure others can help explain that better. ;)


Step 1) Configure inetd or xinetd to launch ^ZU or ^XUS or whatever routine you wish. [sample inetd/xinetd configuration below] Step 2) [This sample assumes you connect to port 4123 using the QEmu Toaster and have QEmu correctly configured.] Create a shortcut to putty with the following arguments w/o quotes "putty -telnet 127.0.0.1 4123" [Now you don't have to worry about saved sessions. putty starting from command line documentation available @ http://tinyurl.com/ysz6a9]


Hope this helps!


Mahalo, Chris

--- sample xinetd configuration --- 

service vista {

       type = UNLISTED 
       port = 4123 
       socket_type = stream 
       protocol = tcp 
       user = vista 
       server = /home/vista/vista_telnet 
       server_args = -u vista /home/vista/vista_telnet 
       disable = no 
       wait = no 


}


--- sample vista_telnet ---

  1. !/bin/sh

export HOME=/home/vista source /home/vista/.bash_profile

/usr/share/gtm/mumps -run ^ZU