Dynamic Document Generation

moodusroundoΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 4 χρόνια και 10 μήνες)

390 εμφανίσεις

Dynamic Document Generation

This is the installation and configuration manual for installing the Dynamic Document components. These
adapter components are independent components to replace the reference adapter side components
delivered with CONNECT.

For this installation, you will need the following:



Dynamic D
ocument Components





Having install issues? Visit the
forums
!

Contents



Overview




Test Deployment Footprint




Installation Checklist




Installation of Dynamic Document Components




Database Configuration



Overview

The Dynamic Document generation components were generated by
the
Telemedicine & Advanced
Technology Research
Center (TATRC)
, Conemaugh Health System (CHS)

and Northrop Gr
umman

Corporation in support of the DoD/VLER Phase 1a Pilot demonstration. The FHA has taken this
contribution and incorpor
ated the Dynamic Document G
eneration portion into CONNECT
.
-

The Dynamic
Document deployable components are bundled separately from the core CONNECT
components. The properties files and database scripts are included in
the Dynamic Document generation
binary bundle as well as the CONNECT
core release bundles.

In general, the
process flows as follows:

1.


A Document Query request is received by the adapter.

2.


Document Assembly validates with the Templates Manager that the requested document is supported.
Upon successful validation of the document type, Document Assembly valid
ates that the patient exists in
the system.

3.


Upon successful validation of the patient, the Document Query request is passed to the CDA
Document Builder component.

4.


CDA Document Builder requests templates information from Templates Manager for the re
quested
document. For example, w
hen the requested document is a C32 document, the Templates Manager will
respond with a list of CDA sections, such as Patient Information, Allergies, Medications and so on, that
constitute a C32 document.

5.


CDA Document Bu
ilder then makes a request to the CDA Sections Assembler to get the necessary
sections in order to construct the requested document.

6.


CDA Sections Assembler requests templates information from the Templates Manager for the
requested section. For example
, when the requested section is a Problem List, the Templates Manager
will respond with a list of one CDA Condition module.

7.


CDA Sections Builder makes a request to the CDA Modules Assembler to obtain the necessary
modules in order to construct a CDA
section in accordance with the HITSP/C83 CDA Content Modules
Specification.

8.


CDA Modules Assembler makes request(s) to the Data Access Service to obtain contents for the
module's data elements and construct a CDA module in accordance with the HITSP/C83
CDA Content
Modules Specification.

9.


Document Assembly returns the document to the calling entity.

The procedures in this document are specific to the installation of the Adapter Dynamic Document
Generation components on a
Windows

Operating System.

Test
Deployment Footprint

Hardware Requirements

This section describes the recommended minimum hardware component infrastructure including
processor performance, disk space, and RAM for the NHINC application server platform. This is
provisional information subj
ect to change based on continued development.

Item

Version

Processor

Minimum dual 2GHz CPU

RAM

Minimum of 4 GB

Hard Disk Size

Application Dependent on the deployment configuration. For sizing purposes, assume
100K per CCD record, 1K per audit log record.

Hard Disk
Speed

Minimum of 7200 RPM and 10000 RPM preferred

Network
Interface

100MB Ethernet acceptable; 1GB Ethernet des
irable

Software Requirements

This section describes any dependent software products.

Item

Description

Operating System

Use of the same operating system as needed by the Glassfish v2.1

and
GlassfishESB v2.1 applications is required.

For additional information, refer to the specific installation instructions for
Windows or Solaris.

Java
-
JRE/JDK

Java SDK 1.6 Update 16, Build 1

or Java SDK 1.71.7 Update 02

Application Server

Glassfish v2.1 build 20090201

or Glassfish v2.1.1 (final)


Communication Stack

Metro v1.4
or v2.1.1

Network Protocol

TCP/IP

Relational Database

Any ANSI SQL92 compliant relational database. For example, MySQL
5.0, Oracle, and DB2

Recommended Dev
Environment (Optional)

NetBeans IDE 6.7.1 (Build 200907230233)

Recommended Test Tools
(Optional)

S
oapUI v3.0.1

or SoapUI v3.5.1
, JUnit

Installation Checklist

The installation of the Dynamic Document components assumes the successful completion of the
CONNECT

System Installa
tion and Configuration procedure:

The following steps are required to complete the installation and configuration.

1.

Install the Dynamic Document Generation components

2.
Configure MySQL database

3
.

Configure the Glassfish domain.xml to support Dynamic Document Generation databases

4
.

Update internalConnectionInfo.xml to include endpoints for Dynamic Document Generation
components.

5
.

Configure properties files

6
.

Restart Glassfish and Verify configu
ration

7
.

Deploy Dynamic Document Generation EJBs


8
.

Execute default CONNECT SoapUI Tests


Installation of Dynamic Document Components

There are
four

deployable
EJB components that comprise the Dynamic Document Generation
functionality. These components a
re available in the NHIN_CONNECT_DynamicDocuments
.zip file
.
Extract the components into C:
\
temp. This will create the C:
\
temp
\
bin directory that contains the
components. The deployment of these components is detailed in the Deploy Dynamic Document
Generati
on EJBs section.


Database Configuration

The Dynamic Document Generation capabilities utilize Toplink and Hibernate database drivers to access
MySQL database tables in support of generating dynamic documents. The existing database schema
docrepository is
not altered. Rather,

additional database schemas and tables are created. The database
scripts are provided in the delivery
of CONNECT and included in the
NHIN_CONNECT_DynamicDocuments.zip file
. Explode the zip file into C:
\
temp. The database scripts to
sup
port dynamic document generation are located in DBScripts
\
dynamicdocuments.

The existing CONNECT system user nhincuser/nhincpass is used in support of Dynamic Document
database access. The following steps assume that the MySQL installation resides at C:
\
Pr
ogram
Files
\
MySQL
\
MySQL Server 5.1
\
bin. Otherwise, use the directory path to MySQL that applies to the target
environment.



cd C:
\
Program Files
\
MySQL
\
MySQL Server 5.1
\
bin



mysql
-
uroot
-
pNHIE
-
Gateway < c:
\
temp
\
DBScripts
\
dynamicdocuments
\
enable_dyndocrepos
.s
ql



mysql
-
uroot
-
pNHIE
-
Gateway < c:
\
Temp
\
DBScripts
\
dynamicdocuments
\
docassembly_dll.sql



mysql
-
uroot
-
pNHIE
-
Gateway < c:
\
Temp
\
DBScripts
\
dynamicdocuments
\
templatedb_dll.sql




NOTE: During execution of the Dynamic Document components, the
creation

of the
dyn
docrepos
tables takes place. Due to this

creation of
the table schema, once the Dynamic Documentation
components are executed on a CONNECT system, the
dyn
docrepos schema should be generated to
create
a

document repository that is

compatible with the ref
erence copy of the
Document
Manager
EJB.

The dyndocrepos.sql file is provided should the software fail to automatically
create the document, eventcode and extraslot tables in the dyndocrepos schema.



Configure domain.xml

Confirm that the Glassfish
application server is stopped using the following command from the DOS
command line:



asadmin stop
-
domain domain1

Edit the domain.xml for the Glassfish
2.x
application server. The Dynamic Document Generation
components use the database connection pools tha
t are defined/configured in the domain.xml file. Add
the following statement:


<jdbc
-
resource enabled="true" jndi
-
name="jdbc/templateDS" object
-
type="user"
pool
-
name="templatedbPool"/>


Add <jdbc
-
connection
-
pool> tags, which describe the connection pools
referenced in the <jdbc
-
resource>
tags.



<jdbc
-
connection
-
pool


allow
-
non
-
component
-
callers="true"


associate
-
with
-
thread="false"


connection
-
creation
-
retry
-
attempts="0"


connection
-
creation
-
retry
-
interval
-
in
-
seconds="10"


c
onnection
-
leak
-
reclaim="false"


connection
-
leak
-
timeout
-
in
-
seconds="0"


connection
-
validation
-
method="auto
-
commit"


datasource
-
classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"


fail
-
all
-
connections="true"



idle
-
timeout
-
in
-
seconds="300"


is
-
connection
-
validation
-
required="true"


is
-
isolation
-
level
-
guaranteed="false"


lazy
-
connection
-
association="false"


lazy
-
connection
-
enlistment="false"


match
-
connections="false"


max
-
c
onnection
-
usage
-
count="0"


max
-
pool
-
size="5"


max
-
wait
-
time
-
in
-
millis="600000"


name="templatedbPool"


non
-
transactional
-
connections="true"


pool
-
resize
-
quantity="1"


res
-
type="javax.sql.ConnectionPoolDataSource"


statement
-
timeout
-
in
-
seconds="
-
1"


steady
-
pool
-
size="3"


validate
-
atmost
-
once
-
period
-
in
-
seconds="0"


wrap
-
jdbc
-
objects="false">


<description>Connection pool for templates schema</description>


<
property name="MaxRows" value="
-
1"/>


<property name="DriverClass" value="com.mysql.jdbc.Driver"/>


<property name="PortNumber" value="3306"/>


<property name="Password" value="nhincpass"/>


<property name="LoginTimeout" value="0"/>


<p
roperty name="User" value="nhincuser"/>


<property name="URL" value="jdbc:mysql://localhost:3306/templatedb"/>


<property name="ServerName" value="localhost"/>


</jdbc
-
connection
-
pool>


Add <resource
-
ref> tags to the <server> node, then enter th
e following reference tags to ensure that the
connection resources are available to the adapter components.


<resource
-
ref enabled="true" ref="jdbc/templateDS"/>



Configure Dynamic Document Component Endpoints

The Dynamic Document component endpoints are defined in the internalConnectionInfo.xml.
For versions
of CONNECT prior to v3.3, t
he following endpoints need to be
updated
:

<service>


<name>adapterdocquerysecured</name>


<description>Adapter Document

Query</description>
<endpointURL>https://localhost:8181/NhinConnect/AdapterDocQuerySecured</endpo
intURL>


</service>



<service>


<name>adapterdocretrievesecured</name>


<description>Adapter Document Retrieve Secured</description>
<endpo
intURL>https://localhost:8181/NhinConnect/AdapterDocRetrieveSecured</en
dpointURL>


</service>


For CONNECT v3.3, the following endpoints need to be
updated:


<businessService serviceKey="uddi:testnhincnode:adapterdocquerysecured"




businessKey="uddi:testnhieonenode:1.1">



<name xml:lang="en">adapterdocquerysecured</name>



<bindingTemplates>




<bindingTemplate
bindingKey="uddi:testnhincnode:adapterdocquerysecured"




serviceKey="uddi:testnhincnode:a
dapterdocquerysecured">




<accessPoint


useType="endPoint">https://localhost:8181/NhinConnect/AdapterDocQuerySe
cured</accessPoint>




<categoryBag>





<keyedReference tModelKey="CONNECT:adapter:apilevel"
keyName=""

keyValue="LEVEL_a0"/>




</categoryBa
g>



</bindingTemplate>


</bindingTemplates>


<categoryBag>



<keyedReference tModelKey="uddi:nhin:standard
-
servicenames"

keyName="adapterdocquerysecured" keyValue="adapterdocquerysecured"/>


</categoryBag>

</businessService>


<
businessService serviceKey="uddi:testnhincnode:adapterdocretrievesecured"

businessKey="uddi:testnhieonenode:1.1">


<name xml:lang="en">adapterdocretrievesecured</name>


<bindingTemplates>



<bindingTemplate
bindingKey="uddi:testnhincnode:adapterdocretriev
esecured"

serviceKey="uddi:testnhincnode:adapterdocretrievesecured">




<accessPoint

useType="endPoint">https://localhost:8181/NhinConnect/AdapterDocRetriev
eSecured</accessPoint>




<categoryBag>





<keyedReference tModelKey="CONNECT:adapter:apilevel"
k
eyName=""

keyValue="LEVEL_a0"/>




</categoryBag>



</bindingTemplate>


</bindingTemplates>


<categoryBag>



<keyedReference tModelKey="uddi:nhin:standard
-
servicenames"

keyName="adapterdocretrievesecured"
keyValue="adapterdocretrievesecured"/>


</categor
yBag>

</businessService>


For versions of CONNECT prior to v3.3, the following endpoints need to be
added:


<service>

<name>adaptercommondatalayerservice</name>

<description>Adapter Common Data Layer Service</description>

<endpointURL>
http://localhost:8080/DoDConnectorService/DoDConnectorService</e
ndpointURL>

</service>


<service>

<name>documentassembly</name>

<description>Adapter Document Assembly Service</description>

<endpointURL>http://localhost:8080/DocumentAssembly/AdapterDocument
Assembly</
endpointURL>

</service>


<service>

<name>documentmanager</name>

<description>Adapter Document Manager</description>

<endpointURL>http://localhost:8080/DocumentManager_Service/DocumentManagerSer
vice</endpointURL>

</service>


For CONNECT v3.3, the following endpoints need to be
added:


<businessService
serviceKey="uddi:testnhincnode:adaptercommondatalayerservice"

businessKey="uddi:testnhieonenode:1.1">


<name xml:lang="en">adaptercommondatalayerservice</name>



<bindingTemplates>


<bindingTemplate

bindingKey="uddi:testnhincnode:adaptercommondatalayerservice"

serviceKey="uddi:testnhincnode:adaptercommondatalayerservice">


<accessPoint

useType="endPoint">htt
p://localhost:8080/DoDConnectorService/DoDConnect
orService</accessPoint>


<categoryBag>


<keyedReference
tModelKey="CONNECT:adapter:apilevel" keyName=""

keyValue="LEVEL_a0"/>


</cate
goryBag>


</bindingTemplate>


</bindingTemplates>


<categoryBag>


<keyedReference tModelKey="uddi:nhin:standard
-
servicenames"

keyName="adaptercommondatalayerservice"
keyValue="adaptercomm
ondatalayerservice"/>


</categoryBag>


</businessService>



<businessService serviceKey="uddi:testnhincnode:documentassembly"
businessKey="uddi:testnhieonenode:1.1">


<name xml:lang="en">documentassembly<
/name>


<bindingTemplates>


<bindingTemplate
bindingKey="uddi:testnhincnode:documentassembly"
serviceKey="uddi:testnhincnode:documentassembly">


<accessPoint
useType="endPoint">http://localhost:8080/DocumentA
ssembly/AdapterDocumentAsse
mbly</accessPoint>


<categoryBag>


<keyedReference
tModelKey="uddi:nhin:versionofservice" keyName="" keyValue="2.0"/>


</categoryBag>


</bindingTempl
ate>


</bindingTemplates>


<categoryBag>


<keyedReference tModelKey="uddi:nhin:standard
-
servicenames"
keyName="documentassembly" keyValue="documentassembly"/>


</categoryBag>

</businessServic
e>



<businessService serviceKey="uddi:testnhincnode:documentmanager"
businessKey="uddi:testnhieonenode:1.1">


<name xml:lang="en">documentmanager</name>


<bindingTemplates>


<bindingTemplate bindingKey="uddi:testnhincnod
e:documentmanager"
serviceKey="uddi:testnhincnode:documentmanager">


<accessPoint
useType="endPoint">http://localhost:8080/DocumentManager_Service/DocumentMana
gerService</accessPoint>


<categoryBag>


<keyedReference tMo
delKey="uddi:nhin:versionofservice"
keyName="" keyValue="2.0"/>


</categoryBag>


</bindingTemplate>


</bindingTemplates>


<categoryBag>


<keyedReference tModelKey="uddi:nhin:standard
-
servicenames"
keyName="documentmanager" ke
yValue="documentmanager"/>


</categoryBag>

</businessService>


Configure Property Files

The Dynamic Document configuration is controlled by several property files. Each file
,

located in the
Properties_File directory of the
NHIN_CONNECT_DynamicDocuments
.zip

file, needs to be copied to the
%NHINC_PROPERTIES_DIR% directory. The properties files are
described in the following sections.

adapte
r_common_datalayer.properties

This property file contains the configuration properties for common data layer
components. The directory
path to the CAL_Emulator files is specified here as well as the flags to enable/disable access to the
emulator files for Dynamic Document data. Common Access Layer (CAL) data files contain the dynamic
data used in the dynamic gene
ration of documents. Th
e default location is
%
NHINC_PROPERTIES_DIR
%
\
CAL_Emulator
\
xml
.
The data files that are located here are the C32
and
C62
message components use
d

during dynamic document generation to emula
te an interface to a
specific EH
R system. To
enable the emulation, set the *_test flags to "Y".



medications_test=Y



allergies_test=Y



problems_test=Y



patient_info_test=Y


For CONNECT v3.3 users, please ensure the emulator_data property points to the correct Glassfish
server path as follows:


emulator_data=C:
\
\
Oracle
\
\
glassfish
\
\
domains
\
\
domain1
\
\
config
\
\
nhin
\
\
CAL_Emulator
\
\
xml
\
\

repository.properties

This file contains the Hibernate configuration for the document repository. The Dynamic Do
cument
Generation feature uses the dyndocrepos
database table
that is dynamically built using Hibernate
. There
are no configuration modifications required on this property file.

docassembly
.properties

This file contains

the configuration properties for constructing the meta
-
data values for a clinical
d
ocument. It is also used to direct the Dynamic Document Generation plug
-
in to an implementation of the
Common Access Layer (CAL) web service interface.
There are no configuration modifications required on
this property file.

CAL_Emulator/xml/*.xml

These a
re the support data files used for Dynamic Document Generation. These files are stubs to be
replaced by an Adapter Agency's specific interface to patient records. These are a set of files with the
following naming conventions:



<receiverOID>_<patientID>_ALL
ERGIES_CareRecordQUOCIN043200UV01Response.xml



<receiverOID>_<patientID>_PATIENT_INFO_PatientDemographicsPRPAMT201303UV02Re
sponse.xml



<receiverOID>_<patientID>_MEDS_CareRecordQUOCIN043200UV01Response.xml



<receiverOID>_<patientID>_PROBLEMS_CareRecordQUOCI
N043200UV01Response.xml



<receiverOID>_<patientID>_
FIND_DOCUMENT_WITH_CONTENT_FindDocumentWithCont
entRCMRIN000032UV01Response

These files can be modified to change the default set of patient health record information to return from
Dynamic Document Generat
ion. The modifications are then incorporated into the document and
accessible in the repository. Medications, allergies, problems, and patient info can be changes in these
files and the results present in the next dynamic document generated.

Copy the file
s located in the
CAL_Emulator/xml directory of the NHIN_CONNECT_DynamicDocuments.zip file to the
%
NHINC_PROPERTIES_DIR
%
\
CAL_Emulator
\
xml

directory
.


Update Interface WSDL and Schema Files

In order to successfully deploy the CAL emulator that is used to
validate the Dynamic Document
Generation plug
-
in, the following steps must be performed:



Copy and replace the AdapterCommonDataLayer.wsdl and DocumentManager.wsdl files from
C:
\
Temp
\
Interface_WSDLs
\

to the
%NHINC_SOURCE_DIR%
\
Product
\
Production
\
Common
\
Inter
faces
\
src
\
wsdl directory



Copy the C:
\
Temp
\
Interface_Schemas
\
HL7CommonDataLayerMessages.xsd file to the
%NHINC_SOURCE_DIR%
\
Product
\
Production
\
Common
\
Interfaces
\
src
\
schemas
\
nhinc
\
hl7
directory



Copy the RCMR_IN000031UV01.xsd, RCMR_IN000032UV01.xsd, RCMR_MT00
0002UV02.xsd,
QUQI_MT120001UV01.xsd and RCMR_MT000003UV01.xsd files from the
C:Temp
\
Interface_Schemas directory to the
%NHINC_SOURCE_DIR%
\
Product
\
Production
\
Common
\
Interfaces
\
src
\
schemas
\
HL7v3
\
NE2008
\
multicacheschemas folder



Copy the C:Temp
\
Interface_Schem
as
\
DocManager.xds file to the
%NHINC_SOURCE_DIR%
\
Product
\
Production
\
Common
\
Interfaces
\
src
\
schemas
\
nhinc
\
common
directory



Open a command prompt and navigate to the
%NHINC_SOURCE_DIR%
\
Product
\
Production
\
Common
\
CONNECTCommonTypesLib directory



From the comman
d line, execute a build of the CONNECTCommonTypesLib project:

o

ant clean

o

ant package.create



Copy the
%NHINC_SOURCE_DIR%
\
Product
\
Production
\
Common
\
CONNECTCommonTypesLib
\
dist
\
debu
g
\
CONNECTCommonTypesLib.jar file to the %AS_HOME%
\
lib directory (v3.3) or
%AS_HO
ME%
\
domains
\
domain1
\
lib directory for other versions of CONNECT

Update Hibernate Config Files

The Dynamic Document Generation plug
-
in uses Hibernate to perform repository actions. In order to
correctly configure Hibernate for use with the Dynamic Document
Generation plug
-
in, perform the
following steps:



Copy the C:
\
Temp
\
Hibernate_Config_Files
\
docmgr.hibernate.cfg.xml file to the
%NHINC_PROPERTIES_DIR%
\
hibernate directory

Restart Glassfish and Verify Configuration

Perform the following steps to restart the
Glassfish application and verify the configuration:

1.

Restart Glassfish by executing asadmin start
-
domain domain1.

2.

Verify that the connection pools are defined from the Glassfish console. You will need to first log on to
the Glassfish admin console.

3.

Open the URL
http://localhost:4848/login.jsf
. The default user name is admin, and the default password
is adminadmin. If you customized any of these settings in your installation, use your custom settings
in
stead.

4.

Select the Resources task from the navigation panel on the left.

5.

Expand out the JDBC node. Then expand the JDBC Resources to verify the jdbc/templateDS
is

defined.

6.

Expand the Connection Pools to verify the templatedbPool
is

defined.


Deploy Dynamic Document Generation EJBs

The Dynamic Document Generation functionality is provided through
four

EJBs. The complete list of the
EJBs to be dep
loyed is:



AdapterCommonDataLayerEJB



AdapterDocumentAssemblyProxyEJB



DocumentManagerEJB



NhinAdapterServiceEJB


Each of these EJBs
, located in the bin directory of the NHIN_CONNECT_DynamicDocuments.zip,

is
deployed manually from the Glassfish console by executing the following steps for each component.

1.

From the Glassfish console, select EJB Modules from the navigation panel on the left.


2.

Select the
Deploy

button. From this page, you can select the
Browse

button to navigate to each of the
Dynamic Document components
located in C:
\
Temp
\
bin
. Then select the
OK

button to initiate the
deployment.


3.

Follow these same steps for each of the
four

EJBs listed above. Then stop/start Glassfish via:



asadmin stop
-
domain domain1



asadmin start
-
domain domain1


4.

Monitor the server.log to verify a clean/successful restart.

Execute SoapUI Tests


The CONNECT System comes with a set of SoapUI tests to exec
ute the core system using a reference
version of the adapter components. The SoapUI tests for Dynamic Document Generation are included
with these tests with the tests cases in a default disable state. The tests are called Dynamic Document
Query and Dynamic

Document Retrieve

and are located in the
%NHINC_SOURCE_DIR%
\
Product
\
SoapUI_Test
\
ManualSuite directory
.

NOTE: When the CONNECT System is in the Dynamic Document Generation configuration, the default
Document Query and Document Retrieve SoapUI tests will fa
il to execute successfully.

After launching the SoapUI GUI and loading the DynamicDocumentTest
-
Internal
-
soapui
-
project.xml and
DynamicDocumentTest
-
EndtoEnd
-
soapui
-
project.xml from C:
\
Temp
\
SoapUI_Test
\
ManualSuite
\
, expand
the test suite nodes to view the in
dividual test cases. By default, the dynamic versions of Document
Query and Document Retrieve might have disabled.

Prior to running the tests, the dynamic test cases have to be enabled.


The tests can be run as a suite or individually. The only test case applicable to Dynamic Document
Generation is the Dynamic Document Query and Dynamic

Document Retrieve tests.

The criteria for successful tests are:



Document Query


Two documents, a C32 Summarization of Episode Note and a C62
Emergency Department Discharge Summary, are stored in the dyndocrepos.document database
table and a reference to
each document is returned in the Document Query web service
response.



Document Retrieve


The response contains encoded document content for the C32 document.