![]() |
WorldVistA CPRSChart Ver 3-16 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
VistA
is a health information system deployed across all veteran care sites in the United States.
VistA is the Client/Server system. The most known VistA client application is CPRSChart.exe.
The source code of VistA is available by FOIA request.
WorldVistA EHR 3.1 Ver 3-16 is a version of VistA created
by the WorldVistA open source community.
This document describes process of creation WorldVistA CPRSChart - client application that provides access to a patient data in WorldVistA EHR system. It does not discuss installation or usage of the EHR Server software. The version of CPRSChart for WorldVistA EHR 3.1 Ver 3-16 will be referred as WV-CPRSv3-16 in this text. Document map:
Development Tools |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Development Tools | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CPRSChart was developed with Microsoft Windows 10 and Embarcadero's
Delphi.
In preparation of this document the source code of WV-CPRSv3-16 was
successfully compiled with 2 versions of Delphi:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Source Code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CPRChart source code consists of two parts - CPRS Packages and CPRS GUI. CPRS Packages are components developed in Delphi specifically for CPRS graphical user interface. GUI The source code of WV-CPRSv3-16 GUI is the result of merging VA CPRS GUI v30c (VistA patch OR*3.0*404) into WVEHR3v2-16. The source code of the WVEHR3v2-16 was updated with several enhancements and bug fixes. CPRS Packages While the source code of CPRSChart GUI is changing significantly with every version of the application the Packages code is typically backward compatible. In preparation of VW-CPRSv3-16 we used source code of CPRS Packages v31b. You may replace the packages source with the version of 30c if prefer to use code 100% compatible with VA CPRS GUI v30c. (Usage of CPRS Packages 30c with WV-CPRSv3-16 GUI is not included in this document)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IDE Setup Step-by-step | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Before you begin:
It is common to use Delphi for development of several applications using
the same set of component libraries. Delphi resolve this issue by use of IDE command line -r switch. The switch value identifies Windows registry key that contains parameters of the IDE at startup. The next image illustrates the use of -r switch to start IDE. The switch value is set to WorldVistA:
1. Removing previous versions of packages To review packages installed in IDE:
2. Setting environment variables to specify location of the compiled packages By default Delphi saves results of package compilations in the direcory defined by the environment variable BDSCOMMONDIR. Changing the default value allows you to control where the compiled packages and other files required for your project compilation will be placed.
To add or modify environment variables:
3. Updating Delphi Options Use the environment variable created in step 2 in fields Package output directory, DCP output directory:
Don't forget to select the correct Compilation Platform Windows 32-bit!
Add variabels to Library Path and Browsing Path
4. Save options and restart Delphi IDE After restart Delphi will offer to add new environment to existing set - confirm this change. Now it's time to open Package Group containing source code of the CPRS packages. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Packages Compilation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CPRS Packages v31b Project Source
GUI and Packages must be compiled with the same version of Delphi. Original CPRS GUI v31b was compiled with Dephi XE8. Two package groups are prepared for compilation with Delphi version 10.3.3 and 10.4:
Package names include references on the compiler versions (340 for SYDNEY, 330 - RIO). The source code of CPRS Packages is kept in the CPRS_Packages_31b directory. Location and short description of the individual packages:
To compile code with Delphi 10.4 several constant definitions of the package PKI file wcrypt2.pas should be updated with the references to the type. For example, line 18054 requires a reference to the type LPCSTR:
Similar changes should be applied to the next lines of file wcrypt2.pas :
Compilation steps are straightforward: 1. Open package group matching compiler version CPRS_Packages_SYDNEY - Delphi 10.4
2. Rebuild packages starting from the top of the list.
To verify if the components are now available restart Delphi,
open CPRS GUI project, and review the component palette.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GUI Project Details | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CPRS GUI project file CPRSChart.dpr is located in CPRS directory.
Compiled untits will be placed in "CPRS\DCU" directory while executable file will be kept in "CPRS" directory. This is the WV-CPRSv3-16 project tree:
Project file compiles as any other Delphi application. The rest of this section describes differences made to the application.
The WV-CPRSv3-16 project was built as an enhancement of the WVEHR3v2-16 and utilizes most of its code. Files introduced in WV-CPRSv3-16 were placed in the WVEHR folder. Changes to the project options file CPRSChart.dproj:
Two conditional symbols were added:
Changes to the project file CPRSChart.dpr:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Vitals DLL | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The most resent values of patient vitals are shown on the CPRS cover sheet.
To enter vitals CPRS uses GMV_VitalsViewEnter DLL. If you plan to add
vitals data to the patient record you will need version of DLL that
can work with the Broker used by the CPRS GUI. Source code of the Vitals GUI (patch GMRV*5.0*38) can be found in directory GMRV-5-0-38. The following changes were made to the original code:
Compilation of the Vitals GUI and DLL requires installation of 2 packages:
To recompile GMV_VitalsViewEnter:
You can install the latest version of the Orpheus using Delphi GetIt Package Manager
2. Installing ROR_Components package
3. Recompiling DLL |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Additional Information | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (c) WorldVistA 2020 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||