diff --git a/TODO.txt b/TODO.txt index 7584c61d846..e52c45a8a0a 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,8 +1,21 @@ - * Implement JSON parser and encoder - * Implement strategy for narrative generation - * Fix XML encoder to not encode empty elements + * Implement JSON parser and encoder- I'm thinking probably just using GSON + and writing the encode() part from scratch. For the parse() part, the + ParserState class from the XML parser should be able to be shared with + the Json parser, which will make it a lot easier to implement..? + + * Implement strategy for narrative generation- I'm thinking maybe + an interface that turns a given resource into an HTML representation + and then a default implementation for our basic types (Patient, Observation) + and maybe a way to configure this in the FhirContext so that the parser + can take advantage? + * Add SimpleSetters for all primitive datatypes + * Implement and add Simple Getters in a similar way to simple setters + * Add support for modifierExtensions - * \ No newline at end of file + + * Add client and server support for other operations from + the list here (we currently support read, vread, and search + but there are many more): http://latest.fhir.me/http.html \ No newline at end of file diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 109f2c7f0da..a9e8135187e 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 @@ -30,7 +31,8 @@ 4.2.0 - + @@ -44,9 +46,9 @@ 1.9 - commons-io - commons-io - 2.4 + commons-io + commons-io + 2.4 @@ -69,9 +71,9 @@ 4.3.3 - org.apache.httpcomponents - httpcore - 4.3.2 + org.apache.httpcomponents + httpcore + 4.3.2 @@ -142,6 +144,55 @@ + + + + maven-site-plugin + 3.3 + + + org.apache.maven.plugins + maven-surefire-report-plugin + 2.16 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + + + default + + javadoc + + + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.3 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.7 + + + + project-team + issue-tracking + license + scm + + + + + + + diff --git a/hapi-fhir-base/src/site/apt/building.apt b/hapi-fhir-base/src/site/apt/building.apt new file mode 100644 index 00000000000..3c598dcac68 --- /dev/null +++ b/hapi-fhir-base/src/site/apt/building.apt @@ -0,0 +1,96 @@ +Hacking HAPI + + This page explains all of the steps neccesary to work with the actual source + code for HAPI. This might be done for example to fix bugs, add features, or + learn how HAPI works internally. + + As of version 0.6, HAPI uses the {{{./http://maven.apache.org}Maven}} build system to build + it's source code. Generating the source takes the following steps. + +* Getting the Source + + The first step to building HAPI is obtaining the source code. HAPI uses CVS + as its {{{./source-repository.html}source-code repository}}. + + Note that the correct subdirectory to check out from the repository is now + called "hapi-mvn". There is an outdated directory called "hapi" which + is kept only for reference. + + If you are using Eclipse to check the project out, the project may show errors + when you first check it out. These will be resolved by running through the build + using Maven. + +* Understanding the Project Structure + + HAPI is now broken up into several subprojects: + +*--------------------+------+ + hapi-base | This is the core of the HAPI library. It contains things such as parsers, transport, validation, etc. If you are making changes to HAPI itself, this is probably where you want to start. +*--------------------+------+ + hapi-sourcegen | This project is used to generate message libraries. It is only used at build time. +*--------------------+------+ + hapi-structures-vXX | These projects contain the libraries used to generate and process individual messages for a specific version of HL7. They are generated using the proprietary HL7 database provided by HL7.org, and so are usually not modified by end users of the HAPI library. +*--------------------+------+ + hapi-examples | This project provides several annotated examples of how to use HAPI. +*--------------------+------+ + hapi-test | This project contains unit tests for the HAPI library +*--------------------+------+ + + +* Install the build tools + + Download the latest version of {{{http://maven.apache.org}Maven}}. The download page also + has instructions for installing Maven correctly. + + +* Building HAPI + + Building a HAPI base JAR is as simple as typing: + ++----------------+ +mvn install ++----------------+ + + At the end of this build, you should have a compiled JAR in the following + subdirectory: + ++----------------+ +[workspace]/hapi-mvn/hapi-base/target/hapi-base-VERSION.jar ++----------------+ + + +* Set up Eclipse + + Once Maven has been run for the first time, you will need to define an Eclipse classpath variable + pointing to your local maven repository. + + * First, find your local Maven repository. It will be a directory called ".m2/repository" in your home directory. So, for a user named "james", it would be in the following location, depending on OS: + +*--------------------+------+ + Windows XP | C:\Documents and Settings\James\.m2\repository +*--------------------+------+ + Windows Vista | C:\Users\James\.m2\repository +*--------------------+------+ + Linux | /home/james/.m2/repository +*--------------------+------+ + + * Next, in Eclipse, open the Preferences dialogue (in the Window menu). + + * Navigate to the following section: Java -> Build Path -> Classpath Variables + + * Click on "New" + + ** For "Name", enter "M2_REPO" + + ** For "Path", enter the path to the local repo. eg: "C:\Users\James\.m2\repository" + + +* Tips and tricks + + To skip running the unit tests, execute the following: + ++----------------+ +mvn -Dmaven.test.skip -P CORE install ++----------------+ + + \ No newline at end of file diff --git a/hapi-fhir-base/src/site/imgsources/hapi_banner.xcf b/hapi-fhir-base/src/site/imgsources/hapi_banner.xcf new file mode 100644 index 00000000000..9152a8c9dfa Binary files /dev/null and b/hapi-fhir-base/src/site/imgsources/hapi_banner.xcf differ diff --git a/hapi-fhir-base/src/site/imgsources/hapi_fhir_banner.xcf b/hapi-fhir-base/src/site/imgsources/hapi_fhir_banner.xcf new file mode 100644 index 00000000000..fde8cb9693b Binary files /dev/null and b/hapi-fhir-base/src/site/imgsources/hapi_fhir_banner.xcf differ diff --git a/hapi-fhir-base/src/site/imgsources/hapi_hoh_banner.xcf b/hapi-fhir-base/src/site/imgsources/hapi_hoh_banner.xcf new file mode 100644 index 00000000000..d6c4d3b1961 Binary files /dev/null and b/hapi-fhir-base/src/site/imgsources/hapi_hoh_banner.xcf differ diff --git a/hapi-fhir-base/src/site/imgsources/hapi_testpanel_banner.xcf b/hapi-fhir-base/src/site/imgsources/hapi_testpanel_banner.xcf new file mode 100644 index 00000000000..c665ce02cec Binary files /dev/null and b/hapi-fhir-base/src/site/imgsources/hapi_testpanel_banner.xcf differ diff --git a/hapi-fhir-base/src/site/imgsources/who_uses_hapi.xcf b/hapi-fhir-base/src/site/imgsources/who_uses_hapi.xcf new file mode 100644 index 00000000000..e11ffc1de15 Binary files /dev/null and b/hapi-fhir-base/src/site/imgsources/who_uses_hapi.xcf differ diff --git a/hapi-fhir-base/src/site/resources/hapi.css b/hapi-fhir-base/src/site/resources/hapi.css new file mode 100644 index 00000000000..80e6db15b1c --- /dev/null +++ b/hapi-fhir-base/src/site/resources/hapi.css @@ -0,0 +1,87 @@ +#bodyColumn { + margin-left: 180px !important; +} + +#breadcrumbs { + background: white; + padding: 0px; + border-bottom-width: 1px; + border-bottom-color: #C0C0C0; + border-bottom-style: solid; +} + +#navcolumn { + background-color: white !important; +} + +#leftColumn { + border: none !important; + width: 180px !important; + margin: 0px; +} + +#navcolumn h5 { + color: #806020; + background-color: #FFF0C0; + border-bottom: 1px solid #E3701A; +} + +#navcolumn li.expanded { + background: url("") !important; +} + +.nobr { + white-space: nowrap; +} + +.section { + padding: 0px; +} + +.section h2 { + border-bottom-width: 2px; + border-bottom-style: solid; + border-bottom-color: #CF4711; + background-color: #FF5721; + color: #FFA; +} + +.section h3 { + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #993300; + width: 66%; + background-image: url('images/littlehapiface.png'); + background-repeat: no-repeat; + padding-left: 25px; +} + + +h1,h2,h3,h4,h5 { + color: #E3701A; + font-weight: bold; +} + +h4 { + padding: 0px; + margin-bottom: -15px; +} + +li.expanded ul { + border-left: 2px solid #C0FFC0; + margin: 0px 0px 4px 0px !important; +} + +li.expanded ul li { + padding-left: 2px !important; +} + +dfn { + color: #008000; + background-color: #E0FFE0; + border-bottom: 1px dotted #40A040; +} + +a,a.externalLink,a:active,a:hover,a:link,a:visited { + color: #993300; +} diff --git a/hapi-fhir-base/src/site/resources/images/hapi_fhir_banner.png b/hapi-fhir-base/src/site/resources/images/hapi_fhir_banner.png new file mode 100644 index 00000000000..93b45fc0bc1 Binary files /dev/null and b/hapi-fhir-base/src/site/resources/images/hapi_fhir_banner.png differ diff --git a/hapi-fhir-base/src/site/resources/images/littlehapiface.png b/hapi-fhir-base/src/site/resources/images/littlehapiface.png new file mode 100644 index 00000000000..4215aecdf96 Binary files /dev/null and b/hapi-fhir-base/src/site/resources/images/littlehapiface.png differ diff --git a/hapi-fhir-base/src/site/resources/images/littlehapiface2020.png b/hapi-fhir-base/src/site/resources/images/littlehapiface2020.png new file mode 100644 index 00000000000..e9f02033c3b Binary files /dev/null and b/hapi-fhir-base/src/site/resources/images/littlehapiface2020.png differ diff --git a/hapi-fhir-base/src/site/resources/images/logos/maven-feather.png b/hapi-fhir-base/src/site/resources/images/logos/maven-feather.png new file mode 100644 index 00000000000..b5ada836e9e Binary files /dev/null and b/hapi-fhir-base/src/site/resources/images/logos/maven-feather.png differ diff --git a/hapi-fhir-base/src/site/site.xml b/hapi-fhir-base/src/site/site.xml new file mode 100644 index 00000000000..a2ebef1f3c3 --- /dev/null +++ b/hapi-fhir-base/src/site/site.xml @@ -0,0 +1,54 @@ + + + + + HAPI + images/hapi_fhir_banner.png + http://hl7api.sourceforge.net/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + com.googlecode.fluido-skin + fluido-skin + 1.3 + + + diff --git a/hapi-fhir-base/src/site/xdoc/index.xml b/hapi-fhir-base/src/site/xdoc/index.xml new file mode 100644 index 00000000000..e596bcea566 --- /dev/null +++ b/hapi-fhir-base/src/site/xdoc/index.xml @@ -0,0 +1,41 @@ + + + + + The Open Source HL7 API for Java + James Agnew + + + + + +
+

+ SOCIALPLUGINSHEREAPI +

+

+ This is the homepage for the HAPI-FHIR library. This library is still + in experimental stage, so please tread with caution. +

+ + + +

+ The easiest way to get started with HAPI-FHIR is to either download the + source code from our + Git Repository, + or to use Maven: +

+ + ca.uhn.hapi.fhir + hapi-fhir-base + 1.0-SNAPSHOT +]]> + +
+ +
+ + + +