transitions of care reference implementation development overview

14
Transitions of Care Reference Implementation Development Overview July 5, 2011

Upload: alagan

Post on 24-Feb-2016

27 views

Category:

Documents


0 download

DESCRIPTION

Transitions of Care Reference Implementation Development Overview. July 5, 2011. Agenda. Review Initial Draft of API Tools and Libraries Maven Overview Code Conventions How to Get Started. API Overview. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Transitions  of Care  Reference Implementation Development Overview

Transitions of Care Reference Implementation

Development Overview

July 5, 2011

Page 2: Transitions  of Care  Reference Implementation Development Overview

Agenda

• Review Initial Draft of API• Tools and Libraries• Maven Overview• Code Conventions• How to Get Started

Page 3: Transitions  of Care  Reference Implementation Development Overview

API Overview• Establishes the foundation for the development

effort by providing a contract for what a subsystem must provide functionally.– Validators – provide information on the validity of an incoming

document. More than one validator may be used on a specified document.

– Translators – convert a document from one input document format to an output format. More than one translator may be used to perform the conversion.

– Handlers – assemble the validators and translators to best handle a specified input document.

Page 4: Transitions  of Care  Reference Implementation Development Overview

Core Contractclass System

contract::Document

- content: String- docType: DocumentType

+ Document(DocumentType, String)+ getContent() : String+ getDocType() : DocumentType+ toString() : String

«interface»contract::DocumentHandler

+ translate(Document, DocumentType) : Document+ validate(Document) : Collection<ValidationMessage>

«interface»contract::DocumentTranslator

+ translate(Document, DocumentType) : Document

«enumeration»contract::DocumentType

CDA CCD CIM

Attributes- code: String- name: String

~ DocumentType(String, String)+ getCode() : String+ getName() : String

«interface»contract::DocumentValidator

+ validate(Document) : Collection<ValidationMessage>

RuntimeExceptioncontract::TranslationException

+ TranslationException()+ TranslationException(String)+ TranslationException(Throwable)+ TranslationException(String, Throwable)

RuntimeExceptioncontract::ValidationException

+ ValidationException()+ ValidationException(String)+ ValidationException(Throwable)+ ValidationException(String, Throwable)

contract::ValidationMessage

- message: String- severity: Severity

+ getMessage() : String+ getSeverity() : Severity+ toString() : String+ ValidationMessage(Severity, String)

«enumeration»contract::ValidationMessage::Severity

ERROR WARN INFO

-severity

-docType

Page 5: Transitions  of Care  Reference Implementation Development Overview

DocumentHandlerclass handlers

GenericDocumentHandler

- handlers: Map<String, DocumentHandler>- translators: Map<String, DocumentTranslator>- validators: Map<String, DocumentValidator>

+ setHandlers(Map<String, DocumentHandler>) : void+ setTranslators(Map<String, DocumentTranslator>) : void+ setValidators(Map<String, DocumentValidator>) : void+ translate(Document, DocumentType) : Document+ validate(Document) : Collection<ValidationMessage>

SimpleDocumentHandler

- translators: Map<String, DocumentTranslator>- validator: DocumentValidator

+ setTranslators(Map<String, DocumentTranslator>) : void+ setValidator(DocumentValidator) : void+ translate(Document, DocumentType) : Document+ validate(Document) : Collection<ValidationMessage>

«interface»contract::DocumentHandler

+ translate(Document, DocumentType) : Document+ validate(Document) : Collection<ValidationMessage>

Page 6: Transitions  of Care  Reference Implementation Development Overview

DocumentValidatorclass v alidators

ChainedDocumentValidator

- continueOnError: boolean- validators: List<DocumentValidator>

- containsErrors(Collection<ValidationMessage>) : boolean+ setContinueOnError(boolean) : void+ setValidators(List<DocumentValidator>) : void+ validate(Document) : Collection<ValidationMessage>

SchematronDocumentValidator

- xsl: String

+ getXsl() : String+ setXsl(String) : void+ validate(Document) : Collection<ValidationMessage>

«interface»contract::DocumentValidator

+ validate(Document) : Collection<ValidationMessage>

Page 7: Transitions  of Care  Reference Implementation Development Overview

DocumentTranslatorclass translators

ChainedDocumentTranslator

- translatorDestDocTypes: List<String>- translators: List<DocumentTranslator>

+ setTranslatorDestDocTypes(List<String>) : void+ setTranslators(List<DocumentTranslator>) : void+ translate(Document, DocumentType) : Document

XSLDocumentTranslator

- xsl: String

+ getXsl() : String+ setXsl(String) : void+ translate(Document, DocumentType) : Document

«interface»contract::DocumentTranslator

+ translate(Document, DocumentType) : Document

Page 8: Transitions  of Care  Reference Implementation Development Overview

Tools and Libraries• Libraries

– Spring • http://www.springsource.com/developer/spring

“Spring is a popular and widely deployed open source framework that helps developers build high quality applications faster. Spring provides a consistent programming and configuration model that is well understood and used by millions of developers worldwide.“ – from springsource.com

– Maven• http://maven.apache.org

“Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.” – from apache.org

– Saxon• http://saxon.sourceforge.net

The Saxon package is a collection of tools for processing XML documents. The main components are: an XSLT 1.0/2.0 processor, an XPath 2.0 processor, an XQuery 1.0 processor, and an XML Schema 1.0 processor.

– Schematron• http://www.schematron.com

“A language for making assertions about the presence or absence of patterns in XML documents.” – from schematron.com

Page 9: Transitions  of Care  Reference Implementation Development Overview

Tools and Libraries cont.• Tools

– Open Health Tools• http://www.openhealthtools.org• Provides a source code repository• Provides document repository• Provides wiki forum• Provides discussion forum

Page 10: Transitions  of Care  Reference Implementation Development Overview

Maven Overview• Typical Project

– Pom.xml – specifies the project structure, dependent libraries, reports, unit-testing, etc.

– Src• Main – contains the deliverable code

– Java– Config– Resources

• Test – contains the code that tests the deliverable code– Java– Config– Resources

– Target – the destination for all compiled code, reports, etc.• Site – contains the generated reports (checkstyle, cobertura, javadoc, etc)

• $USER_HOME\.m2– Settings.xml– Repository – contains the dependent libraries

Page 11: Transitions  of Care  Reference Implementation Development Overview

Maven Overview cont.• Sample commands

– mvn install – sets up project locally by downloading dependent libraries, etc.

– mvn clean – cleans all target items– mvn test – tests the code– mvn site – generate all reports for the project

• Plugins– M2Eclipse – http://m2eclipse.sonatype.org – NetBeans – http://wiki.netbeans.org/MavenBestPractices– IntelliJ – http://www.jetbrains.com/idea/features/ant_maven.html

See http://maven.apache.org for detailed reference, samples, quickstart, etc.

Page 12: Transitions  of Care  Reference Implementation Development Overview

Development Conventions & Process• Package structure

– gov.hhs.hin.ri.toc• gov.hhs.hin.ri.toc.contract – contains the API (e.g.,

DocumentHandler, DocumentTranslator, etc.)• gov.hhs.hin.ri.toc.handlers – contains the handler implementations

(e.g., GenericDocumentHandler)• gov.hhs.hin.ri.toc.translators – contains the translator

implementations (e.g., XslTranslator)• gov.hhs.hin.ri.toc.validators – contains the validator

implementations (e.g., SchematronValidator)

• Process– http://wiki.siframework.org/S%26I+Framework+RI+Developme

nt+Process

Page 13: Transitions  of Care  Reference Implementation Development Overview

How to Get Started• Please provide feedback and suggestions on development plan and API by

7/7/2011.• Create a login account at www.openhealthtools.org.• Install Maven 3.0 and review documentation.• Install IDE (Eclipse, NetBeans, etc.) if desired.• Suggested Review

– Spring• http://blog.springsource.com/category/green-beans/• Suggest Getting Started with Spring Integration

– Saxon• http://www.saxonica.com/documentation/about/gettingstarted/gettingstartedjava.x

ml– Schematron

• http://www.schematron.com/elements.html• Tasks assignments are scheduled to begin 7/12/2011.

Page 14: Transitions  of Care  Reference Implementation Development Overview

Q&A

Questions and Answers