Using the VistA Appliance

From VistApedia
Revision as of 00:41, 20 July 2009 by Ivaldes1 (talk | contribs)
Jump to: navigation, search

In many ways the [Astronaut_Installers|Astronaut Installers] have obsoleted this.

[1] VistA Appliance Demo V1.0 was posted to SourceForge.net on 03/09/2007
http://sourceforge.net/project/showfiles.php?group_id=60087&package_id=223030

Project Goal

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

[2] VistA Appliance Use Case (PDF)


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


Hi Team,

I think I have successfully achieved what yall are looking for.

1) I created a user in Linux called registration and gave it a generic password. 2) Created a routine "CKUADT.m" 3) Commented out code that issues modem hang up code. Line 27 of XUSCLEAN was commented out. "; I $D(^%ZIS("H"))#2 X ^("H")"

Run CKUADT and registration menu appears. Why did I take this approach? Because you can create a shortcut using windows that will launch putty, connect to registration user and in the bash profile you can automatically launch CKUADT. I basically expanded upon JLZ concept. CKUADT allows you to specify any DUZ. Ie, putty.exe -ssh -P 2222 -l registration -pw reg1s 127.0.0.1

I must agree though, the cleaner and correct approach [in a production environment] is to setup menus with access and verify codes. However if your not interested in having the users type the access and verify codes [over and over and over again] the presented solution works wonderfully for testing/training/learning purposes. ;)

Everyone have fun @ the seminar and take plenty of pictures! Tell everyone I said "Hi!"

Mahalo,

[11] CKUADT.m



Chris U wrote:

>
> ...
> Run CKUADT and registration menu appears. ....
>

????

Chris, I am at a loss to figure this out. When I DO ^CKUADT, I get the following:

GTM>d ^CKUADT


Terminal Type set to: C-VT320

Flow Chart Entire Routine

FLOW CHART GENERATOR FOR MUMPS ROUTINES

< COND > = CONDITIONAL, if 'COND' is true code to the left is performed

[ LINE^ROU ] = DO or SUBROUTINE call to location LINE of routine ROU,

                control returns to commands following this in sequence

{ LINE^ROU } = GO TO, control is transferred to the location LINE in

              routine ROU.

Routine:


jlz

a screenshot

VOE VADemo.JPG