├── .gitignore ├── .java-version ├── Errata in ONC C-CDA R2.1 Validator April 2018.docx ├── Errata in ONC C-CDA R2.1 Validator June 2017.docx ├── Errata-ONC-C-CDA-R2.1-Validator-April-2018.docx ├── LICENSE ├── README.md ├── Release-Comparison-C-CDA-R2.1-2018-06-15.xlsx ├── SECURITY.md ├── configuration ├── Instructions.txt ├── ccdaReferenceValidatorConfig.xml ├── dynamic │ └── ccdaScorecardConfig.xml └── referenceccdaservice.xml ├── mvnvm.properties ├── pom.xml ├── scripts ├── 6_22_scripts │ ├── eclipse-common.bat │ ├── eclipse-contenttype.bat │ ├── eclipse-ecore.bat │ ├── eclipse-ecorexmi.bat │ ├── eclipse-jobs.bat │ ├── eclipse-ocl.bat │ ├── eclipse-oclcommon.bat │ ├── eclipse-oclecore.bat │ ├── eclipse-runtime.bat │ ├── eclipse-uml2common.bat │ ├── eclipse-uml2types.bat │ ├── lpgintaller.bat │ ├── mdht-cda.bat │ ├── mdht-consol2.bat │ ├── mdht-datatypes.bat │ ├── mdht-emfruntime.bat │ ├── mdht-rim.bat │ └── mdht-vocab.bat ├── 7_7_scripts │ ├── eclipse-common.bat │ ├── eclipse-contenttype.bat │ ├── eclipse-ecore.bat │ ├── eclipse-ecorexmi.bat │ ├── eclipse-jobs.bat │ ├── eclipse-ocl.bat │ ├── eclipse-oclcommon.bat │ ├── eclipse-oclecore.bat │ ├── eclipse-runtime.bat │ ├── eclipse-uml2common.bat │ ├── eclipse-uml2types.bat │ ├── lpgintaller.bat │ ├── mdht-cda.bat │ ├── mdht-consol2.bat │ ├── mdht-datatypes.bat │ ├── mdht-emfruntime.bat │ ├── mdht-rim.bat │ └── mdht-vocab.bat ├── 8_31_scripts │ ├── eclipse-common.bat │ ├── eclipse-contenttype.bat │ ├── eclipse-ecore.bat │ ├── eclipse-ecorexmi.bat │ ├── eclipse-jobs.bat │ ├── eclipse-ocl.bat │ ├── eclipse-oclcommon.bat │ ├── eclipse-oclecore.bat │ ├── eclipse-runtime.bat │ ├── eclipse-uml2common.bat │ ├── eclipse-uml2types.bat │ ├── lpgintaller.bat │ ├── mdht-cda.bat │ ├── mdht-consol2.bat │ ├── mdht-datatypes.bat │ ├── mdht-emfruntime.bat │ ├── mdht-rim.bat │ └── mdht-vocab.bat ├── 9_26_2016_scripts │ ├── eclipse-common.bat │ ├── eclipse-contenttype.bat │ ├── eclipse-ecore.bat │ ├── eclipse-ecorexmi.bat │ ├── eclipse-jobs.bat │ ├── eclipse-ocl.bat │ ├── eclipse-oclcommon.bat │ ├── eclipse-oclecore.bat │ ├── eclipse-runtime.bat │ ├── eclipse-uml2common.bat │ ├── eclipse-uml2types.bat │ ├── lpgintaller.bat │ ├── mdht-cda.bat │ ├── mdht-consol2.bat │ ├── mdht-datatypes.bat │ ├── mdht-emfruntime.bat │ ├── mdht-rim.bat │ └── mdht-vocab.bat ├── db │ ├── mdht-cda.bat │ ├── mdht-consol2.bat │ ├── mdht-datatypes.bat │ ├── mdht-emfruntime.bat │ ├── mdht-rim.bat │ └── mdht-vocab.bat ├── eclipse-common.bat ├── eclipse-contenttype.bat ├── eclipse-ecore.bat ├── eclipse-ecorexmi.bat ├── eclipse-jobs.bat ├── eclipse-ocl.bat ├── eclipse-oclcommon.bat ├── eclipse-oclecore.bat ├── eclipse-runtime.bat ├── eclipse-uml2common.bat ├── eclipse-uml2types.bat ├── lpgintaller.bat ├── mdht-cda.bat ├── mdht-consol2.bat ├── mdht-datatypes.bat ├── mdht-emfruntime.bat ├── mdht-rim.bat └── mdht-vocab.bat └── src ├── main ├── java │ └── org │ │ └── sitenv │ │ └── referenceccda │ │ ├── assembly │ │ └── referenceccdaapi.xml │ │ ├── configuration │ │ ├── ApplicationInitializer.java │ │ ├── KeycloakTokenValidationClient.java │ │ ├── MvcConfiguration.java │ │ ├── SwaggerConfig.java │ │ └── TokenFilter.java │ │ ├── controllers │ │ └── ReferenceCCDAValidationController.java │ │ ├── dto │ │ ├── ResultMetaData.java │ │ ├── ValidationResultsDto.java │ │ └── ValidationResultsMetaData.java │ │ ├── services │ │ ├── ReferenceCCDAValidationService.java │ │ ├── VocabularyService.java │ │ └── wrappers │ │ │ ├── GithubResponseWrapper.java │ │ │ └── TestDataTreeWrapper.java │ │ └── validators │ │ ├── BaseCCDAValidator.java │ │ ├── CCDAValidator.java │ │ ├── RefCCDAValidationResult.java │ │ ├── XPathIndexer.java │ │ ├── content │ │ └── ReferenceContentValidator.java │ │ ├── enums │ │ ├── UsrhSubType.java │ │ └── ValidationResultType.java │ │ ├── schema │ │ ├── CCDATemplateIds.java │ │ ├── CCDATypes.java │ │ ├── CCDAVersion.java │ │ ├── MDHTResultDetails.java │ │ ├── ReferenceCCDAValidator.java │ │ └── ValidationObjectives.java │ │ └── vocabulary │ │ └── VocabularyCCDAValidator.java ├── profiles │ ├── prod │ │ └── environment.properties │ ├── test │ │ └── environment.properties │ └── webapps │ │ └── environment.properties ├── resources │ └── logback.xml └── webapp │ ├── META-INF │ └── context.xml │ └── static │ ├── css │ ├── angular-block-ui.min.css │ ├── bootstrap-treeview.min.css │ ├── main.css │ ├── shCore.css │ └── shThemeDefault.css │ ├── js │ ├── app.js │ ├── validator_controller.js │ ├── validator_service.js │ └── vendor │ │ ├── angular-block-ui.min.js │ │ ├── bootstrap-treeview.min.js │ │ ├── ng-file-upload-shim.min.js │ │ ├── ng-file-upload.min.js │ │ ├── shBrushXml.js │ │ ├── shCore.js │ │ └── ui-bootstrap-tpls-2.1.3.min.js │ └── validationui.html └── test ├── java └── org │ └── sitenv │ └── referenceccda │ └── test │ ├── other │ ├── ReferenceValidationLogger.java │ └── ReferenceValidationTester.java │ └── tests │ └── RefCCDATest.java └── resources ├── 170.315_b1_toc_amb_ccd_r21_sample1_v8.xml ├── 170.315_b8_ds4p_amb_sample1_v5.xml ├── 170.315_b8_ds4p_amb_sample2_v2.xml ├── 170.315_b8_ds4p_inp_sample1_v5.xml ├── 170.315_b8_ds4p_inp_sample2_v2.xml ├── 2023SVAPCCD.xml ├── 2023SVAPCCD2.xml ├── AppendixAandB.xml ├── C-CDA_R2-1_CCD_EF.xml ├── ConsolNoteActivity.xml ├── DS4PRefrainTest.xml ├── LarsonHealthSummaryExp225.9.24.xml ├── MedicationSectionCodeInvalid.xml ├── ReferralNote.xml ├── ReferralNote2.xml ├── SDTCExtensionsTest.xml ├── Sample.xml ├── Sample_CCDA_CCD_b1_Ambulatory_v2.xml ├── Sample_DS4P_MDHTGen.xml ├── Sample_addSchemaErrors.xml ├── Sample_basicHTML.xml ├── Sample_blank_Empty_Document.xml ├── Sample_invalid-SnippetOnly.xml ├── SocialHistoryWithBirthSexObsTemplateSite3094.xml ├── ccdaReferenceValidatorConfigTest.xml ├── ivl_real_example.xml ├── ivl_real_example2.xml ├── logback-test.xml ├── lotorbatch.xml ├── maritalstatus.xml ├── maritalstatus2.xml ├── severityLevelLimitTestConfig.xml ├── subProceduresWithDeviceIdentifierObservationBadValueRootSite3218.xml ├── subProceduresWithDeviceIdentifierObservationSite3218.xml ├── tempResults_ValidatorBrokeETTGG.xml └── vocabAndMdhtSeverityLevelErrorFileBasedConfig.xml /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .vscode/ 4 | /target/ 5 | .settings/ 6 | .project 7 | .classpath 8 | /src/main/profiles/local/ 9 | /bin 10 | /reference-ccda-api -------------------------------------------------------------------------------- /.java-version: -------------------------------------------------------------------------------- 1 | 1.8 2 | -------------------------------------------------------------------------------- /Errata in ONC C-CDA R2.1 Validator April 2018.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onc-healthit/reference-ccda-validator/409a05fbf045857f1125f4fb64d6f484e6c908bc/Errata in ONC C-CDA R2.1 Validator April 2018.docx -------------------------------------------------------------------------------- /Errata in ONC C-CDA R2.1 Validator June 2017.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onc-healthit/reference-ccda-validator/409a05fbf045857f1125f4fb64d6f484e6c908bc/Errata in ONC C-CDA R2.1 Validator June 2017.docx -------------------------------------------------------------------------------- /Errata-ONC-C-CDA-R2.1-Validator-April-2018.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onc-healthit/reference-ccda-validator/409a05fbf045857f1125f4fb64d6f484e6c908bc/Errata-ONC-C-CDA-R2.1-Validator-April-2018.docx -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Standards Implementation & Testing Environment (SITE) 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /Release-Comparison-C-CDA-R2.1-2018-06-15.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onc-healthit/reference-ccda-validator/409a05fbf045857f1125f4fb64d6f484e6c908bc/Release-Comparison-C-CDA-R2.1-2018-06-15.xlsx -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | latest release only 5 | 6 | ## Review Interval 7 | 4 months 8 | 9 | ## Reporting a Vulnerability 10 | Use google groups to report.https://groups.google.com/g/edge-test-tool 11 | -------------------------------------------------------------------------------- /configuration/Instructions.txt: -------------------------------------------------------------------------------- 1 | This document is meant to outline the steps to successfully configure and deploy the reference ccda application. 2 | 3 | **1. Assumptions** 4 | 5 | a. Tomcat 7 or above has been installed and NOT running. https://tomcat.apache.org/download-70.cgi 6 | b. You are using a pre-built referenceccdaservice.war file. In other words, the .war file was not built from the project directly. 7 | Such a thing is possible but beyond the scope of this document. 8 | c. With Tomcat installed and the referenceccdaservice.war in your hands, you are ready to begin configuration and deployment. 9 | 10 | **2. Configuration Instructions** 11 | * Vocabulary Artifacts needed for vocabulary validation 12 | * Scenario files needed for content validation 13 | * The war 14 | * Server (tomcat) configuration 15 | 16 | Vocabulary Artifacts 17 | 18 | 1. Create a directory that will hold the vocabulary artifacts. For example, /path/to/VocabularyConfiguration 19 | a. this folder will contain the needed vocabulary configuration files 20 | 21 | 2. Place the ccdaReferenceValidatorConfig.xml in this folder. For example, /path/to/VocabularyConfiguration/ccdaReferenceValidatorConfig.xml 22 | a. this file contains the xpath expressions that target particular nodes in the given C-CDA to be validated. Each expression is configured with at least one validator. For example: 23 | > 24 | > 25 | > ValueSetCodeValidator 26 | > 27 | > SHOULD 28 | > 29 | > 2.16.840.1.113883.1.11.16926 30 | > 31 | > 32 | 33 | 3.Create a local directory for Codes, Valuesets and Scenario files. For example, 34 | a. /path/to/validatorconfiguration/vocabulary/code_repository 35 | b. /path/to/validatorconfiguration/vocabulary/valueset_repository/VSAC 36 | c. /path/to/validatorconfiguration/scenarios 37 | 38 | > NOTE: Code systems and valuesets are externally published and this project does **NOT** come packaged with any of these files. 39 | > code system - defines a set of codes with meanings (also known as enumeration, terminology, classification, and/or ontology) 40 | > value set - selects a set of codes from those defined by one or more code systems 41 | > To learn more about valuesets and code systems, go to: 42 | [VSAC Support](https://www.nlm.nih.gov/vsac/support/authorguidelines/code-systems.html) 43 | 44 | The referenceccdaservice.war 45 | 46 | 1. Navigate to the webapps directory in your Tomcat instance. For example, ~/apache-tomcat-7.0.57/webapps 47 | 2. Place the referenceccdaservice.war file here 48 | 49 | Server Configuration 50 | 51 | 1. Place a copy of referenceccdaservice.xml in $CATALINA_BASE/conf/[enginename]/[hostname]/. For example, ~/apache-tomcat-7.0.57/conf/Catalina/localhost 52 | 2. Edit the referenceccdaservice.xml key values to point to the locations configured in the previous steps. For example; 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | **3. Run the application** 61 | 62 | 1. Start your tomcat instance - you should see output showing the databases getting initialized and the .war file getting deployed. 63 | NOTE: Allow a few moments for the vocabulary valuesets and codes to be inserted into the in-memory database. 64 | 2. Access the endpoint. For example, localhost:8080/referenceccdaservice/ 65 | 3. For convenience, API documentation and a validation UI is included: 66 | API documentation - /referenceccdaservice/swagger-ui.html 67 | UI - referenceccdaservice/ui -------------------------------------------------------------------------------- /configuration/dynamic/ccdaScorecardConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /configuration/referenceccdaservice.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /mvnvm.properties: -------------------------------------------------------------------------------- 1 | mvn_version=3.6.3 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.emf.common-2.9.2.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.common -Dversion=2.9.2.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-contenttype.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.core.contenttype-3.4.200.v20130326-1255.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.contenttype -Dversion=3.4.200.v20130326-1255 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-ecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.emf.ecore-2.9.2.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore -Dversion=2.9.2.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-ecorexmi.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.emf.ecore.xmi-2.9.1.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore.xmi -Dversion=2.9.1.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-jobs.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.core.jobs-3.5.300.v20130429-1813.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.jobs -Dversion=3.5.300.v20130429-1813 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-ocl.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.ocl-3.3.0.v20140120-1508.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl -Dversion=3.3.0.v20140120-1508 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-oclcommon.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.ocl.common-1.1.0.v20130531-0544.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.common -Dversion=1.1.0.v20130531-0544 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-oclecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.ocl.ecore-3.3.0.v20130520-1222.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.ecore -Dversion=3.3.0.v20130520-1222 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-runtime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.core.runtime-3.9.100.v20131218-1515.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.runtime -Dversion=3.9.100.v20131218-1515 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-uml2common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.uml2.common-1.8.2.v20140202-2055.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.common -Dversion=1.8.2.v20140202-2055 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/eclipse-uml2types.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.uml2.types-1.1.0.v20140202-2055.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.types -Dversion=1.1.0.v20140202-2055 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/lpgintaller.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\lpg.runtime.java-2.0.17.v201004271640.jar -DgroupId=org.mdht.dependencies -DartifactId=lpg.runtime.java -Dversion=2.0.17.v201004271640 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/mdht-cda.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.openhealthtools.mdht.uml.cda-2.5.4.201507022155 -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/mdht-consol2.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.openhealthtools.mdht.uml.cda.consol2-2.5.2.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda.consol2 -Dversion=2.5.2 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/mdht-datatypes.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.openhealthtools.mdht.uml.hl7.datatypes-2.5.4.201506182117.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.datatypes -Dversion=2.5.4.201506182117 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/mdht-emfruntime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.openhealthtools.mdht.emf.runtime-2.5.4.201507022155.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.emf.runtime -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/mdht-rim.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.openhealthtools.mdht.uml.hl7.rim-2.5.4.201507022155.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.rim -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/6_22_scripts/mdht-vocab.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.openhealthtools.mdht.uml.hl7.vocab-2.5.4.201506182117.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.vocab -Dversion=2.5.4.201506182117 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.common-2.9.2.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.common -Dversion=2.9.2.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-contenttype.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.contenttype-3.4.200.v20130326-1255.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.contenttype -Dversion=3.4.200.v20130326-1255 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-ecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.emf.ecore-2.11.2.v20160208-0816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore -Dversion=2.11.2.v20160208-0816 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-ecorexmi.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.ecore.xmi-2.9.1.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore.xmi -Dversion=2.9.1.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-jobs.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.core.jobs-3.5.300.v20130429-1813.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.jobs -Dversion=3.5.300.v20130429-1813 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-ocl.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl-3.3.0.v20140120-1508.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl -Dversion=3.3.0.v20140120-1508 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-oclcommon.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl.common-1.1.0.v20130531-0544.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.common -Dversion=1.1.0.v20130531-0544 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-oclecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.ocl.ecore-3.5.0.v20150525-1635.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.ecore -Dversion=3.5.0.v20150525-1635 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-runtime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.runtime-3.9.100.v20131218-1515.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.runtime -Dversion=3.9.100.v20131218-1515 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-uml2common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.uml2.common-1.8.2.v20140202-2055.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.common -Dversion=1.8.2.v20140202-2055 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/eclipse-uml2types.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.uml2.types-1.1.0.v20140202-2055.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.types -Dversion=1.1.0.v20140202-2055 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/lpgintaller.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\lpg.runtime.java-2.0.17.v201004271640.jar -DgroupId=org.mdht.dependencies -DartifactId=lpg.runtime.java -Dversion=2.0.17.v201004271640 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/mdht-cda.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.openhealthtools.mdht.uml.cda-2.5.4.201507022155.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/mdht-consol2.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.openhealthtools.mdht.uml.cda.consol2-2.5.2.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda.consol2 -Dversion=2.5.2 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/mdht-datatypes.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.openhealthtools.mdht.uml.hl7.datatypes-2.5.4.201507022155.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.datatypes -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/mdht-emfruntime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.openhealthtools.mdht.emf.runtime-2.5.4.201507022155.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.emf.runtime -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/mdht-rim.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.openhealthtools.mdht.uml.hl7.rim-2.5.4.201507022155.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.rim -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/7_7_scripts/mdht-vocab.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.openhealthtools.mdht.uml.hl7.vocab-2.5.4.201507022155.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.vocab -Dversion=2.5.4.201507022155 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.common-2.9.2.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.common -Dversion=2.9.2.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-contenttype.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.contenttype-3.4.200.v20130326-1255.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.contenttype -Dversion=3.4.200.v20130326-1255 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-ecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.ecore-2.9.2.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore -Dversion=2.9.2.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-ecorexmi.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.emf.ecore.xmi-2.11.1.v20160208-0816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore.xmi -Dversion=2.11.1.v20160208-0816 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-jobs.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.core.jobs-3.5.300.v20130429-1813.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.jobs -Dversion=3.5.300.v20130429-1813 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-ocl.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.ocl-3.5.0.v20150521-1211.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl -Dversion=3.5.0.v20150521-1211 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-oclcommon.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.ocl.common-1.3.0.v20150519-0914.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.common -Dversion=1.3.0.v20150519-0914 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-oclecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl.ecore-3.3.0.v20130520-1222.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.ecore -Dversion=3.3.0.v20130520-1222 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-runtime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.runtime-3.9.100.v20131218-1515.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.runtime -Dversion=3.9.100.v20131218-1515 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-uml2common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.uml2.common-1.8.2.v20140202-2055.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.common -Dversion=1.8.2.v20140202-2055 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/eclipse-uml2types.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.uml2.types-2.0.0.v20160201-0816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.types -Dversion=2.0.0.v20160201-0816 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/lpgintaller.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\lpg.runtime.java-2.0.17.v201004271640.jar -DgroupId=org.mdht.dependencies -DartifactId=lpg.runtime.java -Dversion=2.0.17.v201004271640 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/mdht-cda.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\8_31_2015\org.openhealthtools.mdht.uml.cda-2.5.9.201509011938.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda -Dversion=2.5.9.201509011938 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/mdht-consol2.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\8_31_2015\org.openhealthtools.mdht.uml.cda.consol2-2.5.4.2015083115.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda.consol2 -Dversion=2.5.4.2015083115 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/mdht-datatypes.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\8_31_2015\org.openhealthtools.mdht.uml.hl7.datatypes-2.5.9.201509011938.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.datatypes -Dversion=2.5.9.201509011938 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/mdht-emfruntime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\8_31_2015\org.openhealthtools.mdht.emf.runtime-2.5.9.201509011938.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.emf.runtime -Dversion=2.5.9.201509011938 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/mdht-rim.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\8_31_2015\org.openhealthtools.mdht.uml.hl7.rim-2.5.9.201509011938.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.rim -Dversion=2.5.9.201509011938 2 | -------------------------------------------------------------------------------- /scripts/8_31_scripts/mdht-vocab.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\8_31_2015\org.openhealthtools.mdht.uml.hl7.vocab-2.5.9.201509011938.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.vocab -Dversion=2.5.9.201509011938 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.emf.common-2.11.1.v20160208-0816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.common -Dversion=2.11.1.v20160208-0816 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-contenttype.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.contenttype-3.4.200.v20130326-1255.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.contenttype -Dversion=3.4.200.v20130326-1255 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-ecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.ecore-2.9.2.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore -Dversion=2.9.2.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-ecorexmi.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.ecore.xmi-2.9.1.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore.xmi -Dversion=2.9.1.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-jobs.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.core.jobs-3.5.300.v20130429-1813.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.jobs -Dversion=3.5.300.v20130429-1813 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-ocl.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl-3.3.0.v20140120-1508.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl -Dversion=3.3.0.v20140120-1508 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-oclcommon.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl.common-1.1.0.v20130531-0544.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.common -Dversion=1.1.0.v20130531-0544 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-oclecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl.ecore-3.3.0.v20130520-1222.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.ecore -Dversion=3.3.0.v20130520-1222 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-runtime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.runtime-3.9.100.v20131218-1515.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.runtime -Dversion=3.9.100.v20131218-1515 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-uml2common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.uml2.common-2.1.0.v20160201-0816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.common -Dversion=2.1.0.v20160201-0816 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/eclipse-uml2types.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.uml2.types-1.1.0.v20140202-2055.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.types -Dversion=1.1.0.v20140202-2055 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/lpgintaller.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\07_25_2016\lpg.runtime.java-2.0.17.v201004271640.jar -DgroupId=org.mdht.dependencies -DartifactId=lpg.runtime.java -Dversion=2.0.17.v201004271640 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/mdht-cda.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\09_26_2016\runtime\mdht\org.eclipse.mdht.uml.cda-3.0.0.201608160501.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.cda -Dversion=3.0.0.201608160501 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/mdht-consol2.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\09_26_2016\runtime\mdht\org.openhealthtools.mdht.uml.cda.consol2-2.5.17.20160816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda.consol2 -Dversion=2.5.17.20160816 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/mdht-datatypes.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\09_26_2016\runtime\mdht\org.eclipse.mdht.uml.hl7.datatypes-3.0.0.201608160501.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.hl7.datatypes -Dversion=3.0.0.201608160501 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/mdht-emfruntime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\09_26_2016\runtime\mdht\org.eclipse.mdht.emf.runtime-3.0.0.201608160501.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.emf.runtime -Dversion=3.0.0.201608160501 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/mdht-rim.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\09_26_2016\runtime\mdht\org.eclipse.mdht.uml.hl7.rim-3.0.0.201608160501.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.hl7.rim -Dversion=3.0.0.201608160501 2 | -------------------------------------------------------------------------------- /scripts/9_26_2016_scripts/mdht-vocab.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\09_26_2016\runtime\mdht\org.eclipse.mdht.uml.hl7.vocab-3.0.0.201608160501.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.hl7.vocab -Dversion=3.0.0.201608160501 2 | -------------------------------------------------------------------------------- /scripts/db/mdht-cda.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\temp\builds\r2\new\runtime\mdht\org.openhealthtools.mdht.uml.cda-2.5.19.201603232017.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda -Dversion=2.5.19.201603232017 2 | -------------------------------------------------------------------------------- /scripts/db/mdht-consol2.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\temp\builds\r2\new\runtime\mdht\org.openhealthtools.mdht.uml.cda.consol2-2.5.8.20160323.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda.consol2 -Dversion=2.5.8.20160323 2 | -------------------------------------------------------------------------------- /scripts/db/mdht-datatypes.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\temp\builds\r2\new\runtime\mdht\org.openhealthtools.mdht.uml.hl7.datatypes-2.5.19.201603232017.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.datatypes -Dversion=2.5.19.201603232017 2 | -------------------------------------------------------------------------------- /scripts/db/mdht-emfruntime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\temp\builds\r2\new\runtime\mdht\org.openhealthtools.mdht.emf.runtime-2.5.19.201603232017.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.emf.runtime -Dversion=2.5.19.201603232017 2 | -------------------------------------------------------------------------------- /scripts/db/mdht-rim.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\temp\builds\r2\new\runtime\mdht\org.openhealthtools.mdht.uml.hl7.rim-2.5.19.201603232017.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.rim -Dversion=2.5.19.201603232017 2 | -------------------------------------------------------------------------------- /scripts/db/mdht-vocab.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\temp\builds\r2\new\runtime\mdht\org.openhealthtools.mdht.uml.hl7.vocab-2.5.19.201603232017.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.hl7.vocab -Dversion=2.5.19.201603232017 2 | -------------------------------------------------------------------------------- /scripts/eclipse-common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.emf.common-2.11.1.v20160208-0816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.common -Dversion=2.11.1.v20160208-0816 2 | -------------------------------------------------------------------------------- /scripts/eclipse-contenttype.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.contenttype-3.4.200.v20130326-1255.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.contenttype -Dversion=3.4.200.v20130326-1255 2 | -------------------------------------------------------------------------------- /scripts/eclipse-ecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.ecore-2.9.2.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore -Dversion=2.9.2.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/eclipse-ecorexmi.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.emf.ecore.xmi-2.9.1.v20131212-0545.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.emf.ecore.xmi -Dversion=2.9.1.v20131212-0545 2 | -------------------------------------------------------------------------------- /scripts/eclipse-jobs.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\6_22\org.eclipse.core.jobs-3.5.300.v20130429-1813.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.jobs -Dversion=3.5.300.v20130429-1813 2 | -------------------------------------------------------------------------------- /scripts/eclipse-ocl.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl-3.3.0.v20140120-1508.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl -Dversion=3.3.0.v20140120-1508 2 | -------------------------------------------------------------------------------- /scripts/eclipse-oclcommon.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl.common-1.1.0.v20130531-0544.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.common -Dversion=1.1.0.v20130531-0544 2 | -------------------------------------------------------------------------------- /scripts/eclipse-oclecore.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.ocl.ecore-3.3.0.v20130520-1222.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.ocl.ecore -Dversion=3.3.0.v20130520-1222 2 | -------------------------------------------------------------------------------- /scripts/eclipse-runtime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.core.runtime-3.9.100.v20131218-1515.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.core.runtime -Dversion=3.9.100.v20131218-1515 2 | -------------------------------------------------------------------------------- /scripts/eclipse-uml2common.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\06_29_2016\org.eclipse.uml2.common-2.1.0.v20160201-0816.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.common -Dversion=2.1.0.v20160201-0816 2 | -------------------------------------------------------------------------------- /scripts/eclipse-uml2types.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\7_7\org.eclipse.uml2.types-1.1.0.v20140202-2055.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.uml2.types -Dversion=1.1.0.v20140202-2055 2 | -------------------------------------------------------------------------------- /scripts/lpgintaller.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=D:\MDHT\07_25_2016\lpg.runtime.java-2.0.17.v201004271640.jar -DgroupId=org.mdht.dependencies -DartifactId=lpg.runtime.java -Dversion=2.0.17.v201004271640 2 | -------------------------------------------------------------------------------- /scripts/mdht-cda.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\12_13_2016\runtime\mdht\org.eclipse.mdht.uml.cda-3.0.0.201612130602.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.cda -Dversion=3.0.0.201612130602 2 | -------------------------------------------------------------------------------- /scripts/mdht-consol2.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\12_13_2016\runtime\mdht\org.openhealthtools.mdht.uml.cda.consol2-2.5.22.20161213.jar -DgroupId=org.mdht.dependencies -DartifactId=org.openhealthtools.mdht.uml.cda.consol2 -Dversion=2.5.22.20161213 2 | -------------------------------------------------------------------------------- /scripts/mdht-datatypes.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\12_13_2016\runtime\mdht\org.eclipse.mdht.uml.hl7.datatypes-3.0.0.201612130602.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.hl7.datatypes -Dversion=3.0.0.201612130602 2 | -------------------------------------------------------------------------------- /scripts/mdht-emfruntime.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\12_13_2016\runtime\mdht\org.eclipse.mdht.emf.runtime-3.0.0.201612130602.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.emf.runtime -Dversion=3.0.0.201612130602 2 | -------------------------------------------------------------------------------- /scripts/mdht-rim.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\12_13_2016\runtime\mdht\org.eclipse.mdht.uml.hl7.rim-3.0.0.201612130602.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.hl7.rim -Dversion=3.0.0.201612130602 2 | -------------------------------------------------------------------------------- /scripts/mdht-vocab.bat: -------------------------------------------------------------------------------- 1 | mvn install:install-file -DlocalRepositoryPath=mdht-vocab-repo -DcreateChecksum=true -Dpackaging=jar -Dfile=C:\NIST\12_13_2016\runtime\mdht\org.eclipse.mdht.uml.hl7.vocab-3.0.0.201612130602.jar -DgroupId=org.mdht.dependencies -DartifactId=org.eclipse.mdht.uml.hl7.vocab -Dversion=3.0.0.201612130602 2 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/assembly/referenceccdaapi.xml: -------------------------------------------------------------------------------- 1 | 5 | bundle 6 | 7 | tar.gz 8 | zip 9 | tar 10 | 11 | false 12 | 13 | 14 | configuration 15 | 16 | Instructions.txt 17 | 18 | / 19 | 20 | 21 | configuration 22 | 23 | ccdaReferenceValidatorConfig.xml 24 | referenceccda-orientdb-server-profiles.xml 25 | 26 | VocabularyConfiguration 27 | 28 | 29 | E:\Brian\Development\Environment\VocabularyConfiguration\scenarios 30 | VocabularyConfiguration\scenarios 31 | 32 | 33 | E:\Brian\Development\Environment\VocabularyConfiguration\Vocabulary 34 | VocabularyConfiguration\Vocabulary 35 | 36 | 37 | configuration 38 | 39 | referenceccdaservice.xml 40 | 41 | tomcat7/conf/Catalina/localhost 42 | 43 | 44 | target 45 | 46 | *.war 47 | 48 | / 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/configuration/ApplicationInitializer.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.configuration; 2 | 3 | import org.sitenv.contentvalidator.configuration.ContentValidatorApiConfiguration; 4 | import org.sitenv.vocabularies.configuration.CodeValidatorApiConfiguration; 5 | import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 6 | 7 | import javax.servlet.ServletContext; 8 | 9 | public class ApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 10 | 11 | @Override 12 | protected Class[] getRootConfigClasses() { 13 | return new Class[] { MvcConfiguration.class, CodeValidatorApiConfiguration.class, ContentValidatorApiConfiguration.class, SwaggerConfig.class}; 14 | } 15 | 16 | @Override 17 | protected Class[] getServletConfigClasses() { 18 | return new Class[] {}; 19 | } 20 | 21 | @Override 22 | protected String[] getServletMappings() { 23 | return new String[] { "/" }; 24 | } 25 | 26 | @Override 27 | protected void registerDispatcherServlet(ServletContext servletContext) { 28 | super.registerDispatcherServlet(servletContext); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/configuration/KeycloakTokenValidationClient.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.configuration; 2 | 3 | import okhttp3.*; 4 | import org.json.JSONObject; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.stereotype.Component; 8 | 9 | import javax.net.ssl.HostnameVerifier; 10 | import javax.net.ssl.SSLSession; 11 | import javax.servlet.http.HttpServletRequest; 12 | import java.io.IOException; 13 | 14 | /** 15 | * KeycloakTokenValidationClient class used for validating token 16 | */ 17 | @Component("keycloakTokenValidationClient") 18 | public class KeycloakTokenValidationClient { 19 | 20 | /** The LOGGERGER */ 21 | private static final Logger LOGGER = LoggerFactory.getLogger(KeycloakTokenValidationClient.class); 22 | private static final String APPLICATION_URL_FORM_ENCODED = "application/x-www-form-urlencoded"; 23 | 24 | /** 25 | * 26 | * @param request 27 | * @param authUrl : Auth base URL for keycloak 28 | * @param realm : keycloak realm for introspect 29 | * @param clientId : client id for authenticating token 30 | * @param clientSecret 31 | * @return 32 | */ 33 | public boolean validateToken(HttpServletRequest request, String authUrl, String realm, String clientId, String clientSecret) { 34 | 35 | LOGGER.info("Entry - validateToken Method in KeyCloakTokenValidationClient "); 36 | boolean validationResponse = false; 37 | final String authorizationHeaderValue = request.getHeader("Authorization"); 38 | if (authorizationHeaderValue != null && authorizationHeaderValue.startsWith("Bearer")); 39 | String token = authorizationHeaderValue.substring(7, authorizationHeaderValue.length()); 40 | 41 | String url = authUrl + "/realms/" + realm + "/protocol/openid-connect/token/introspect"; 42 | LOGGER.info("KeyCloakTokenValidationClient URL = "+url ); 43 | 44 | OkHttpClient client = new OkHttpClient().newBuilder().hostnameVerifier(new HostnameVerifier() 45 | { 46 | @Override 47 | public boolean verify(String hostname, SSLSession session) 48 | { 49 | return true; 50 | } 51 | }).build(); 52 | 53 | MediaType mediaType = MediaType.parse(APPLICATION_URL_FORM_ENCODED); 54 | 55 | RequestBody body = RequestBody.create(mediaType, "token="+token+"&client_id="+clientId+"&client_secret="+clientSecret); 56 | 57 | Request requestOne = new Request.Builder() 58 | .url(url) 59 | .method("POST", body) 60 | .addHeader("Content-Type", "application/x-www-form-urlencoded") 61 | .build(); 62 | Response clientResponse; 63 | try { 64 | clientResponse = client.newCall(requestOne).execute(); 65 | clientResponse.body(); 66 | if (!clientResponse.isSuccessful()) { 67 | LOGGER.error("Failed to authenticate"); 68 | } 69 | String response = clientResponse.body().string(); 70 | JSONObject jsonObj = new JSONObject(response); 71 | validationResponse = (boolean) jsonObj.get("active"); 72 | LOGGER.info("Access Token Validation Status ::::" + validationResponse); 73 | } catch (IOException e) { 74 | LOGGER.info("Exception - validateToken Method in KeyCloakTokenValidationClient",e); 75 | e.printStackTrace(); 76 | } 77 | LOGGER.info("Exit - validateToken Method in KeyCloakTokenValidationClient "); 78 | return validationResponse; 79 | 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/configuration/MvcConfiguration.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.configuration; 2 | 3 | import org.springframework.cache.CacheManager; 4 | import org.springframework.cache.annotation.EnableCaching; 5 | import org.springframework.cache.concurrent.ConcurrentMapCacheManager; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.ComponentScan; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.context.annotation.PropertySource; 10 | import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; 11 | import org.springframework.web.multipart.MultipartResolver; 12 | import org.springframework.web.multipart.commons.CommonsMultipartResolver; 13 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 14 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 15 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 16 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 17 | 18 | @EnableWebMvc 19 | @EnableCaching 20 | @Configuration 21 | @ComponentScan("org.sitenv") 22 | @PropertySource(value = "/META-INF/maven/org.sitenv/referenceccdavalidator/pom.properties", ignoreResourceNotFound=true) 23 | public class MvcConfiguration extends WebMvcConfigurerAdapter { 24 | 25 | @Override 26 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 27 | registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); 28 | registry.addResourceHandler("swagger-ui.html") 29 | .addResourceLocations("classpath:/META-INF/resources/"); 30 | registry.addResourceHandler("/webjars/**") 31 | .addResourceLocations("classpath:/META-INF/resources/webjars/"); 32 | registry.addResourceHandler("/static/**").addResourceLocations("/static/"); 33 | } 34 | 35 | @Bean 36 | public MultipartResolver multipartResolver() { 37 | CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(); 38 | return multipartResolver; 39 | } 40 | 41 | @Bean 42 | public static PropertySourcesPlaceholderConfigurer placeHolderConfigurer() { 43 | return new PropertySourcesPlaceholderConfigurer(); 44 | } 45 | 46 | @Bean 47 | public CacheManager cacheManager() { 48 | return new ConcurrentMapCacheManager("messagetypeValidationObjectivesAndReferenceFilesMap"); 49 | } 50 | 51 | @Override 52 | public void addViewControllers(ViewControllerRegistry registry) { 53 | registry.addViewController("/ui").setViewName("redirect:static/validationui.html"); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/configuration/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.configuration; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import springfox.documentation.builders.ApiInfoBuilder; 7 | import springfox.documentation.builders.PathSelectors; 8 | import springfox.documentation.builders.RequestHandlerSelectors; 9 | import springfox.documentation.service.ApiInfo; 10 | import springfox.documentation.spi.DocumentationType; 11 | import springfox.documentation.spring.web.plugins.Docket; 12 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 13 | 14 | /** 15 | * Created by Brian on 8/18/2016. 16 | */ 17 | @Configuration 18 | @EnableSwagger2 19 | public class SwaggerConfig { 20 | @Value("${version:none}") 21 | private String applicationPomVersion; 22 | 23 | private ApiInfo apiInfo(){ 24 | return new ApiInfoBuilder() 25 | .title("Reference C-CDA Validator API Documentation") 26 | .description("The goal of the Reference C-CDA Validator is to validate conformance of C-CDA documents to the standard in order to promote interoperability. The validator is also a resource that can evaluate submitted C-CDA documents conformance to ONC 2014 and 2015 Edition Standards and Certification Criteria (S&CC) objectives and regulations.") 27 | .version(applicationPomVersion) 28 | .build(); 29 | } 30 | 31 | @Bean 32 | public Docket api() { 33 | return new Docket(DocumentationType.SWAGGER_2) 34 | .select() 35 | .apis(RequestHandlerSelectors.any()) 36 | .paths(PathSelectors.any()) 37 | .build() 38 | .apiInfo(apiInfo()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/configuration/TokenFilter.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.configuration; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.stereotype.Component; 6 | 7 | import javax.servlet.*; 8 | import javax.servlet.annotation.WebFilter; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | import java.io.IOException; 12 | 13 | /** 14 | * Filter class for intercepting incoming request 15 | */ 16 | @Component 17 | @WebFilter(urlPatterns = "/*") 18 | public class TokenFilter implements Filter { 19 | 20 | /** The LOGGERGER */ 21 | private static final Logger LOGGER = LoggerFactory.getLogger(TokenFilter.class); 22 | private String authUrl; 23 | private String realm; 24 | private String clientId; 25 | private String clientSecret; 26 | private String authEnabled; 27 | 28 | @Override 29 | public void init(FilterConfig filterConfig) throws ServletException { 30 | ServletContext servletContext = filterConfig.getServletContext(); 31 | authEnabled = servletContext.getInitParameter("keycloak.enabled"); 32 | authUrl = servletContext.getInitParameter("keycloak.auth.server"); 33 | realm = servletContext.getInitParameter("keycloak.realm"); 34 | clientId = servletContext.getInitParameter("keycloak.client.id"); 35 | clientSecret = servletContext.getInitParameter("keycloak.client.secret"); 36 | LOGGER.info("authEnabled"+authEnabled+"authUrl == "+authUrl +"\nrealm == "+realm+"\nclientId == "+clientId+"\nclientSecret == "+clientSecret); 37 | //System.out.println("authEnabled == "+authEnabled+"\nauthUrl == "+authUrl +"\nrealm == "+realm+"\nclientId == "+clientId+"\nclientSecret == "+clientSecret); 38 | } 39 | 40 | /** 41 | * (non-Javadoc) Details of the APIs and the request types that can be used with 42 | * this application 43 | * 44 | * @param req 45 | * @param res 46 | * @param chain 47 | */ 48 | @Override 49 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) 50 | throws IOException, ServletException { 51 | LOGGER.info("Entry - doFilter Method in TokenFilter "); 52 | HttpServletRequest request = (HttpServletRequest) req; 53 | HttpServletResponse response = (HttpServletResponse) res; 54 | 55 | String referrer = request.getHeader("Referer"); 56 | String path = request.getRequestURL().toString(); 57 | 58 | if (path.contains("/static/") || path.contains("/ui") || (referrer != null && referrer.contains("/referenceccdaservice/static/validationui.html") )) { 59 | chain.doFilter(request, response); 60 | LOGGER.info("Exit - doFilter Method in TokenFilter -- CCDA UI endpoint"); 61 | }else if ("true".equals(authEnabled)) { 62 | KeycloakTokenValidationClient keyCloakTokenValidationClient = new KeycloakTokenValidationClient(); 63 | boolean responseStatus = keyCloakTokenValidationClient.validateToken(request, authUrl, realm, clientId, clientSecret); 64 | LOGGER.info("RESPONSE STATUS :: " + responseStatus); 65 | if (responseStatus) { 66 | chain.doFilter(request, response); 67 | LOGGER.info("Exit - doFilter Method in TokenFilter "); 68 | } else { 69 | response.sendError(401, "UnAuthorized User"); 70 | LOGGER.error("Error in doFilter TokenFilter - UnAuthorized User "); 71 | } 72 | } else { 73 | chain.doFilter(request, response); 74 | LOGGER.info("Exit - doFilter Method in TokenFilter -- Keycloak authentication not enabled"); 75 | } 76 | } 77 | 78 | /** 79 | * Destroy method 80 | */ 81 | @Override 82 | public void destroy() { 83 | LOGGER.info("Entry - destroy Method in Web Filter "); 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/controllers/ReferenceCCDAValidationController.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.controllers; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.sitenv.referenceccda.dto.ValidationResultsDto; 6 | import org.sitenv.referenceccda.services.ReferenceCCDAValidationService; 7 | import org.sitenv.referenceccda.services.VocabularyService; 8 | import org.sitenv.vocabularies.constants.VocabularyConstants; 9 | import org.sitenv.vocabularies.constants.VocabularyConstants.SeverityLevel; 10 | import org.sitenv.vocabularies.validation.entities.Code; 11 | import org.sitenv.vocabularies.validation.entities.VsacValueSet; 12 | import org.sitenv.vocabularies.validation.services.VocabularyValidationService; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.cache.annotation.Cacheable; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.RequestMethod; 17 | import org.springframework.web.bind.annotation.RequestParam; 18 | import org.springframework.web.bind.annotation.RestController; 19 | import org.springframework.web.multipart.MultipartFile; 20 | 21 | import java.util.Arrays; 22 | import java.util.List; 23 | import java.util.Map; 24 | 25 | @RestController 26 | public class ReferenceCCDAValidationController { 27 | @Autowired 28 | ReferenceCCDAValidationService referenceCcdaValidationService; 29 | @Autowired 30 | VocabularyService vocabularyService; 31 | @Autowired 32 | VocabularyValidationService validationManager; 33 | 34 | private static final String GITHUB_URL = "https://api.github.com/repos/onc-healthit/2015-certification-ccda-testdata/git/trees/master?recursive=1"; 35 | private static final String DEFAULT_SEVERITY_LEVEL = "INFO"; 36 | private static Logger logger = LoggerFactory.getLogger(ReferenceCCDAValidationController.class); 37 | 38 | @RequestMapping(value = "/", headers = "content-type=multipart/*", method = RequestMethod.POST) 39 | public ValidationResultsDto doValidation( 40 | @RequestParam(value = "validationObjective", required = true) String validationObjective, 41 | @RequestParam(value = "referenceFileName", required = true) String referenceFileName, 42 | @RequestParam(value = "ccdaFile", required = true) MultipartFile ccdaFile, 43 | @RequestParam(value = "ccdaType", required = false) String ccdaType, 44 | @RequestParam(defaultValue = VocabularyConstants.Config.DEFAULT, required = false) String vocabularyConfig, 45 | @RequestParam(defaultValue = DEFAULT_SEVERITY_LEVEL, required = false) String severityLevel) { 46 | 47 | logger.info("severityLevel requestParam: " + severityLevel); 48 | 49 | if ((severityLevel == null || severityLevel.equals("")) 50 | || (!severityLevel.equalsIgnoreCase(VocabularyConstants.SeverityLevel.INFO.name()) 51 | && !severityLevel.equalsIgnoreCase(VocabularyConstants.SeverityLevel.WARNING.name()) 52 | && !severityLevel.equalsIgnoreCase(VocabularyConstants.SeverityLevel.ERROR.name()))) { 53 | severityLevel = DEFAULT_SEVERITY_LEVEL; 54 | logger.info("severityLevel was set/overwritten to default: " + severityLevel); 55 | } 56 | 57 | SeverityLevel severityLevelEnum = SeverityLevel.valueOf(severityLevel.toUpperCase()); 58 | logger.info("Final severityLevelEnum.name() " + severityLevelEnum.name()); 59 | 60 | return referenceCcdaValidationService.validateCCDA(validationObjective, referenceFileName, ccdaFile, 61 | ccdaType, vocabularyConfig, severityLevelEnum); 62 | } 63 | 64 | @RequestMapping(value = "/getvaluesetsbyoids", method = RequestMethod.GET) 65 | public List getValuesetsByOids(@RequestParam(value = "oids", required = true) String[] valuesetOids) { 66 | return vocabularyService.getValuesetsByOids(Arrays.asList(valuesetOids)); 67 | } 68 | 69 | @RequestMapping(value = "/getbycodeincodesystem", method = RequestMethod.GET) 70 | public List getByCodeInCodeSystems(@RequestParam(value = "code", required = true) String code, 71 | @RequestParam(value = "codeSystems", required = true) String[] codeSystems) { 72 | return vocabularyService.getByCodeInCodesystems(code, Arrays.asList(codeSystems)); 73 | } 74 | 75 | @RequestMapping(value = "/getbycodeinvaluesetoid", method = RequestMethod.GET) 76 | public List getByCodeInValuesetOid(@RequestParam(value = "code", required = true) String code, 77 | @RequestParam(value = "oids", required = true) String[] valuesetOids) { 78 | return vocabularyService.getByCodeInValuesetOids(code, Arrays.asList(valuesetOids)); 79 | } 80 | 81 | @RequestMapping(value = "/iscodeandisplaynameincodesystem", method = RequestMethod.GET) 82 | public boolean isCodeAndDisplayNameFoundInCodeSystems(@RequestParam(value = "code", required = true) String code, 83 | @RequestParam(value = "displayName", required = true) String displayName, 84 | @RequestParam(value = "codeSystems", required = true) String[] codeSystems) { 85 | return vocabularyService.isCodeAndDisplayNameFoundInCodeSystems(code, displayName, Arrays.asList(codeSystems)); 86 | } 87 | 88 | @RequestMapping(value = "/iscodeincodesystem", method = RequestMethod.GET) 89 | public boolean isCodeFoundInCodeSystems(@RequestParam(value = "code", required = true) String code, 90 | @RequestParam(value = "codeSystems", required = true) String[] codeSystems) { 91 | return vocabularyService.isCodeFoundInCodesystems(code, Arrays.asList(codeSystems)); 92 | } 93 | 94 | @RequestMapping(value = "/iscodeinvalueset", method = RequestMethod.GET) 95 | public boolean isCodeFoundInValuesetOids(@RequestParam(value = "code", required = true) String code, 96 | @RequestParam(value = "valuesetOids", required = true) String[] valuesetOids) { 97 | return vocabularyService.isCodeFoundInValuesetOids(code, Arrays.asList(valuesetOids)); 98 | } 99 | 100 | @Cacheable("messagetypeValidationObjectivesAndReferenceFilesMap") 101 | @RequestMapping(value = "/senderreceivervalidationobjectivesandreferencefiles", method = RequestMethod.GET) 102 | public Map>> getMapOfSenderAndRecieverValidationObjectivesWithReferenceFiles() { 103 | return vocabularyService.getMapOfSenderAndRecieverValidationObjectivesWithReferenceFiles(); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/dto/ResultMetaData.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.dto; 2 | 3 | public class ResultMetaData { 4 | private String type; 5 | private int count; 6 | 7 | public ResultMetaData(String type, int count) { 8 | this.type = type; 9 | this.count = count; 10 | } 11 | 12 | public String getType() { 13 | return type; 14 | } 15 | 16 | public void setType(String type) { 17 | this.type = type; 18 | } 19 | 20 | public int getCount() { 21 | return count; 22 | } 23 | 24 | public void setCount(int count) { 25 | this.count = count; 26 | } 27 | 28 | @Override 29 | public int hashCode() { 30 | final int prime = 31; 31 | int result = 1; 32 | result = prime * result + (type == null ? 0 : type.hashCode()); 33 | return result; 34 | } 35 | 36 | @Override 37 | public boolean equals(Object obj) { 38 | if (this == obj) { 39 | return true; 40 | } 41 | if (obj == null) { 42 | return false; 43 | } 44 | if (getClass() != obj.getClass()) { 45 | return false; 46 | } 47 | ResultMetaData other = (ResultMetaData) obj; 48 | if (type == null) { 49 | if (other.type != null) { 50 | return false; 51 | } 52 | } else if (!type.equals(other.type)) { 53 | return false; 54 | } 55 | return true; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/dto/ValidationResultsDto.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.dto; 2 | 3 | import org.sitenv.referenceccda.validators.RefCCDAValidationResult; 4 | 5 | import java.util.List; 6 | 7 | public class ValidationResultsDto { 8 | private ValidationResultsMetaData resultsMetaData; 9 | private List ccdaValidationResults; 10 | 11 | public List getCcdaValidationResults() { 12 | return ccdaValidationResults; 13 | } 14 | 15 | public void setCcdaValidationResults(List ccdaValidationResults) { 16 | this.ccdaValidationResults = ccdaValidationResults; 17 | } 18 | 19 | public ValidationResultsMetaData getResultsMetaData() { 20 | return resultsMetaData; 21 | } 22 | 23 | public void setResultsMetaData(ValidationResultsMetaData resultsMetaData) { 24 | this.resultsMetaData = resultsMetaData; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/dto/ValidationResultsMetaData.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.dto; 2 | 3 | import org.sitenv.referenceccda.validators.enums.ValidationResultType; 4 | 5 | import java.util.ArrayList; 6 | import java.util.LinkedHashMap; 7 | import java.util.List; 8 | import java.util.Map; 9 | import java.util.concurrent.atomic.AtomicInteger; 10 | 11 | 12 | public class ValidationResultsMetaData { 13 | private String ccdaDocumentType; 14 | private String ccdaVersion; 15 | private String objectiveProvided; 16 | private boolean serviceError; 17 | private String serviceErrorMessage; 18 | private String ccdaFileName; 19 | private String ccdaFileContents; 20 | private final Map errorCounts = new LinkedHashMap(); 21 | private List resultMetaData; 22 | private int vocabularyValidationConfigurationsCount; 23 | private int vocabularyValidationConfigurationsErrorCount; 24 | private String severityLevel; 25 | private long totalConformanceErrorChecks; 26 | 27 | public ValidationResultsMetaData() { 28 | for (ValidationResultType resultType : ValidationResultType.values()) { 29 | errorCounts.put(resultType.getTypePrettyName(), new AtomicInteger(0)); 30 | } 31 | } 32 | 33 | public String getCcdaDocumentType() { 34 | return ccdaDocumentType; 35 | } 36 | 37 | public void setCcdaDocumentType(String ccdaDocumentType) { 38 | this.ccdaDocumentType = ccdaDocumentType; 39 | } 40 | 41 | public void setCcdaVersion(String ccdaVersion) { 42 | this.ccdaVersion = ccdaVersion; 43 | } 44 | 45 | public String getCcdaVersion() { 46 | return ccdaVersion; 47 | } 48 | 49 | public String getObjectiveProvided() { 50 | return objectiveProvided; 51 | } 52 | 53 | public void setObjectiveProvided(String objectiveProvided) { 54 | this.objectiveProvided = objectiveProvided; 55 | } 56 | 57 | public boolean isServiceError() { 58 | return serviceError; 59 | } 60 | 61 | public void setServiceError(boolean serviceError) { 62 | this.serviceError = serviceError; 63 | } 64 | 65 | public String getServiceErrorMessage() { 66 | return serviceErrorMessage; 67 | } 68 | 69 | public void setServiceErrorMessage(String serviceErrorMessage) { 70 | this.serviceErrorMessage = serviceErrorMessage; 71 | } 72 | 73 | public List getResultMetaData() { 74 | resultMetaData = new ArrayList(); 75 | for (Map.Entry entry : errorCounts.entrySet()) { 76 | resultMetaData.add(new ResultMetaData(entry.getKey(), entry.getValue().intValue())); 77 | } 78 | return resultMetaData; 79 | } 80 | 81 | public String getCcdaFileName() { 82 | return ccdaFileName; 83 | } 84 | 85 | public void setCcdaFileName(String ccdaFileName) { 86 | this.ccdaFileName = ccdaFileName; 87 | } 88 | 89 | public String getCcdaFileContents() { 90 | return ccdaFileContents; 91 | } 92 | 93 | public void setCcdaFileContents(String ccdaFileContents) { 94 | this.ccdaFileContents = ccdaFileContents; 95 | } 96 | 97 | public void addCount(ValidationResultType resultType) { 98 | if (errorCounts.containsKey(resultType.getTypePrettyName())) { 99 | errorCounts.get(resultType.getTypePrettyName()).addAndGet(1); 100 | } else { 101 | errorCounts.put(resultType.getTypePrettyName(), new AtomicInteger(1)); 102 | } 103 | } 104 | 105 | public int getVocabularyValidationConfigurationsCount() { 106 | return vocabularyValidationConfigurationsCount; 107 | } 108 | 109 | public void setVocabularyValidationConfigurationsCount(int vocabularyValidationConfigurationsCount) { 110 | this.vocabularyValidationConfigurationsCount = vocabularyValidationConfigurationsCount; 111 | } 112 | 113 | public int getVocabularyValidationConfigurationsErrorCount() { 114 | return vocabularyValidationConfigurationsErrorCount; 115 | } 116 | 117 | public void setVocabularyValidationConfigurationsErrorCount(int vocabularyValidationConfigurationsErrorCount) { 118 | this.vocabularyValidationConfigurationsErrorCount = vocabularyValidationConfigurationsErrorCount; 119 | } 120 | 121 | public String getSeverityLevel() { 122 | return severityLevel; 123 | } 124 | 125 | public void setSeverityLevel(String severityLevel) { 126 | this.severityLevel = severityLevel; 127 | } 128 | 129 | public long getTotalConformanceErrorChecks() { 130 | return totalConformanceErrorChecks; 131 | } 132 | 133 | public void setTotalConformanceErrorChecks(long totalConformanceErrorChecks) { 134 | this.totalConformanceErrorChecks = totalConformanceErrorChecks; 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/services/VocabularyService.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.services; 2 | 3 | import org.sitenv.referenceccda.services.wrappers.GithubResponseWrapper; 4 | import org.sitenv.referenceccda.services.wrappers.TestDataTreeWrapper; 5 | import org.sitenv.vocabularies.validation.entities.Code; 6 | import org.sitenv.vocabularies.validation.entities.VsacValueSet; 7 | import org.sitenv.vocabularies.validation.services.VocabularyCodeService; 8 | import org.sitenv.vocabularies.validation.services.VocabularyValuesetService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.core.ParameterizedTypeReference; 11 | import org.springframework.http.HttpMethod; 12 | import org.springframework.http.ResponseEntity; 13 | import org.springframework.stereotype.Service; 14 | import org.springframework.web.client.RestTemplate; 15 | 16 | import java.util.*; 17 | 18 | /** 19 | * Created by Brian on 2/23/2016. 20 | */ 21 | @Service 22 | public class VocabularyService { 23 | private VocabularyValuesetService vocabularyValuesetService; 24 | private VocabularyCodeService vocabularyCodeService; 25 | private static final String GITHUB_URL = "https://api.github.com/repos/onc-healthit/2015-certification-ccda-testdata/git/trees/master?recursive=1"; 26 | 27 | @Autowired 28 | public VocabularyService(VocabularyValuesetService vocabularyValuesetService, VocabularyCodeService vocabularyCodeService) { 29 | this.vocabularyValuesetService = vocabularyValuesetService; 30 | this.vocabularyCodeService = vocabularyCodeService; 31 | } 32 | 33 | public java.util.List getValuesetsByOids(List valuesetOids){ 34 | return vocabularyValuesetService.getValuesetsByOids(new HashSet<>(valuesetOids)); 35 | } 36 | 37 | public boolean isCodeAndDisplayNameFoundInCodeSystems(String code, String displayName, List codeSystems){ 38 | return vocabularyCodeService.isFoundByCodeAndDisplayNameInCodeSystems(code, displayName, new HashSet<>(codeSystems)); 39 | } 40 | 41 | public boolean isCodeFoundInCodesystems(String code, List codeSystems){ 42 | return vocabularyCodeService.isFoundByCodeInCodeSystems(code, new HashSet<>(codeSystems)); 43 | } 44 | 45 | public boolean isCodeFoundInValuesetOids(String code, List valuesetOids){ 46 | return vocabularyValuesetService.isFoundByCodeInValuesetOids(code, new HashSet<>(valuesetOids)); 47 | } 48 | 49 | public List getByCodeInCodesystems(String code, List codeSystems){ 50 | return vocabularyCodeService.getByCodeInCodeSystems(code, codeSystems); 51 | } 52 | 53 | public List getByCodeInValuesetOids(String code, List valuesetOids){ 54 | return vocabularyValuesetService.getValuesetByCodeInValuesetOids(code, new HashSet<>(valuesetOids)); 55 | } 56 | 57 | public Map>> getMapOfSenderAndRecieverValidationObjectivesWithReferenceFiles(){ 58 | RestTemplate restTemplate = new RestTemplate(); 59 | ResponseEntity responseEntity = restTemplate.exchange(GITHUB_URL, HttpMethod.GET, null, new ParameterizedTypeReference() { 60 | }); 61 | 62 | Map>> messageTypeValidationObjectiveReferenceFilesMap = new HashMap<>(); 63 | for(TestDataTreeWrapper testDataTreeWrapper : responseEntity.getBody().getTree()){ 64 | if(!(testDataTreeWrapper.getPath().equalsIgnoreCase("license") || testDataTreeWrapper.getPath().equalsIgnoreCase("README.md"))){ 65 | if(isMessageTypeInMap(messageTypeValidationObjectiveReferenceFilesMap, testDataTreeWrapper)){ 66 | if(isValidationObjectiveInMap(messageTypeValidationObjectiveReferenceFilesMap, testDataTreeWrapper)){ 67 | addReferenceFileNameToListInValidationObjectiveMap(messageTypeValidationObjectiveReferenceFilesMap, testDataTreeWrapper); 68 | }else{ 69 | addValidationObjectiveToMap(messageTypeValidationObjectiveReferenceFilesMap, testDataTreeWrapper); 70 | } 71 | }else{ 72 | addMessageTypeToMap(messageTypeValidationObjectiveReferenceFilesMap, testDataTreeWrapper); 73 | } 74 | } 75 | } 76 | return messageTypeValidationObjectiveReferenceFilesMap; 77 | } 78 | 79 | private void addReferenceFileNameToListInValidationObjectiveMap(Map>> messageTypeValidationObjectiveReferenceFilesMap, TestDataTreeWrapper testDataTreeWrapper) { 80 | messageTypeValidationObjectiveReferenceFilesMap.get(testDataTreeWrapper.getMessageType()).get(testDataTreeWrapper.getValidationObjective()).add(testDataTreeWrapper.getReferenceFileName()); 81 | } 82 | 83 | private void addValidationObjectiveToMap(Map>> messageTypeValidationObjectiveReferenceFilesMap, TestDataTreeWrapper testDataTreeWrapper) { 84 | messageTypeValidationObjectiveReferenceFilesMap.get(testDataTreeWrapper.getMessageType()).put(testDataTreeWrapper.getValidationObjective(), new ArrayList()); 85 | } 86 | 87 | private boolean isValidationObjectiveInMap(Map>> messageTypeValidationObjectiveReferenceFilesMap, TestDataTreeWrapper testDataTreeWrapper) { 88 | return messageTypeValidationObjectiveReferenceFilesMap.get(testDataTreeWrapper.getMessageType()).containsKey(testDataTreeWrapper.getValidationObjective()); 89 | } 90 | 91 | private void addMessageTypeToMap(Map>> messageTypeValidationObjectiveReferenceFilesMap, TestDataTreeWrapper testDataTreeWrapper) { 92 | messageTypeValidationObjectiveReferenceFilesMap.put(testDataTreeWrapper.getMessageType(), new HashMap>()); 93 | } 94 | 95 | private boolean isMessageTypeInMap(Map>> messageTypeValidationObjectiveReferenceFilesMap, TestDataTreeWrapper testDataTreeWrapper) { 96 | return messageTypeValidationObjectiveReferenceFilesMap.containsKey(testDataTreeWrapper.getMessageType()); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/services/wrappers/GithubResponseWrapper.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.services.wrappers; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Brian on 8/24/2016. 10 | */ 11 | 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | public class GithubResponseWrapper { 14 | @JsonProperty("sha") 15 | private String sha; 16 | @JsonProperty("url") 17 | private String url; 18 | @JsonProperty("tree") 19 | private List tree; 20 | 21 | public String getSha() { 22 | return sha; 23 | } 24 | 25 | public void setSha(String sha) { 26 | this.sha = sha; 27 | } 28 | 29 | public String getUrl() { 30 | return url; 31 | } 32 | 33 | public void setUrl(String url) { 34 | this.url = url; 35 | } 36 | 37 | public List getTree() { 38 | return tree; 39 | } 40 | 41 | public void setTree(List tree) { 42 | this.tree = tree; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/services/wrappers/TestDataTreeWrapper.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.services.wrappers; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | import org.apache.commons.lang3.StringUtils; 6 | 7 | /** 8 | * Created by Brian on 8/26/2016. 9 | */ 10 | @JsonIgnoreProperties(ignoreUnknown = true) 11 | public class TestDataTreeWrapper { 12 | @JsonProperty("path") 13 | private String path; 14 | 15 | public String getPath() { 16 | return path; 17 | } 18 | 19 | public void setPath(String path) { 20 | this.path = path; 21 | } 22 | 23 | public String[] getPathArray(){ 24 | return StringUtils.split(path, '/'); 25 | } 26 | 27 | public String getMessageType(){ 28 | return getPathArray()[0]; 29 | } 30 | 31 | public String getValidationObjective(){ 32 | if(getPathArray().length > 1){ 33 | return getPathArray()[1]; 34 | } 35 | return null; 36 | } 37 | 38 | public String getReferenceFileName(){ 39 | if(getPathArray().length > 2){ 40 | return getPathArray()[2]; 41 | } 42 | return null; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/BaseCCDAValidator.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators; 2 | 3 | import java.io.IOException; 4 | import java.io.StringReader; 5 | 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.xml.sax.InputSource; 9 | import org.xml.sax.SAXException; 10 | import org.xml.sax.XMLReader; 11 | import org.xml.sax.helpers.XMLReaderFactory; 12 | 13 | public abstract class BaseCCDAValidator { 14 | public static final String UTF8_BOM = "\uFEFF"; 15 | private static Logger logger = LoggerFactory.getLogger(BaseCCDAValidator.class); 16 | 17 | protected static void trackXPathsInXML(XPathIndexer xpathIndexer, String xmlString) throws SAXException{ 18 | XMLReader parser = XMLReaderFactory.createXMLReader(); 19 | parser.setContentHandler(xpathIndexer); 20 | try { 21 | xmlString = ifHasUtf8BomThenRemove(xmlString); 22 | InputSource inputSource = new InputSource(new StringReader(xmlString)); 23 | parser.parse(inputSource); 24 | } catch (IOException e) { 25 | e.printStackTrace(); 26 | logger.error("Error In Line Number Routine: Bad filename, path or invalid document."); 27 | } 28 | } 29 | 30 | private static String ifHasUtf8BomThenRemove(String xml) { 31 | if (xml.startsWith(UTF8_BOM)) { 32 | logger.warn("Found UTF-8 BOM, removing..."); 33 | xml = xml.substring(1); 34 | } 35 | return xml; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/CCDAValidator.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators; 2 | 3 | import org.xml.sax.SAXException; 4 | 5 | import java.util.ArrayList; 6 | 7 | /** 8 | * Created by Brian on 10/20/2015. 9 | */ 10 | public interface CCDAValidator { 11 | ArrayList validateFile(String validationObjective, 12 | String referenceFileName, String ccdaFile, String ccdaType) throws SAXException, Exception; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/RefCCDAValidationResult.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators; 2 | 3 | import org.sitenv.referenceccda.validators.enums.ValidationResultType; 4 | import org.sitenv.referenceccda.validators.schema.MDHTResultDetails; 5 | 6 | public class RefCCDAValidationResult { 7 | 8 | // Common Error information 9 | private final String description; 10 | private final ValidationResultType type; 11 | private final String xPath; 12 | private final String validatorConfiguredXpath; 13 | private final String documentLineNumber; 14 | 15 | // Only required for MDHT 16 | private final MDHTResultDetails mdhtResultDetails; 17 | 18 | // Only valid for Vocabulary testing 19 | private String actualCode; 20 | private String actualCodeSystem; 21 | private String actualCodeSystemName; 22 | private String actualDisplayName; 23 | 24 | private RefCCDAValidationResult(RefCCDAValidationResultBuilder builder){ 25 | this.description = builder.description; 26 | this.xPath = builder.xPath; 27 | this.validatorConfiguredXpath = builder.validatorConfiguredXpath; 28 | this.type = builder.type; 29 | this.documentLineNumber = builder.documentLineNumber; 30 | this.actualCode = builder.actualCode; 31 | this.actualCodeSystem = builder.actualCodeSystem; 32 | this.actualCodeSystemName = builder.actualCodeSystemName; 33 | this.actualDisplayName = builder.actualDisplayName; 34 | if(builder.mdhtResultDetails != null) { 35 | this.mdhtResultDetails = builder.mdhtResultDetails; 36 | } else { 37 | this.mdhtResultDetails = new MDHTResultDetails(); 38 | } 39 | } 40 | 41 | public String getDescription() { 42 | return description; 43 | } 44 | 45 | public ValidationResultType getType() { 46 | return type; 47 | } 48 | 49 | public String getxPath() { 50 | return xPath; 51 | } 52 | 53 | public String getValidatorConfiguredXpath() { 54 | return validatorConfiguredXpath; 55 | } 56 | 57 | public String getDocumentLineNumber() { 58 | return documentLineNumber; 59 | } 60 | 61 | public boolean isSchemaError() { 62 | return mdhtResultDetails.isSchemaError(); 63 | } 64 | 65 | public boolean isDataTypeSchemaError() { 66 | return mdhtResultDetails.isDataTypeSchemaError(); 67 | } 68 | 69 | public boolean isIGIssue() { 70 | return mdhtResultDetails.isIGIssue(); 71 | } 72 | 73 | public boolean isMUIssue() { 74 | return mdhtResultDetails.isMUIssue(); 75 | } 76 | 77 | public boolean isDS4PIssue() { 78 | return mdhtResultDetails.isDS4PIssue(); 79 | } 80 | 81 | public String getActualCodeSystem() { 82 | return actualCodeSystem; 83 | } 84 | 85 | public String getActualCode() { 86 | return actualCode; 87 | } 88 | 89 | public String getActualDisplayName() { 90 | return actualDisplayName; 91 | } 92 | 93 | public String getActualCodeSystemName() { 94 | return actualCodeSystemName; 95 | } 96 | 97 | //builder pattern 98 | public static class RefCCDAValidationResultBuilder{ 99 | // Common Error information 100 | private final String description; 101 | private final ValidationResultType type; 102 | private final String xPath; 103 | private final String validatorConfiguredXpath; 104 | private final String documentLineNumber; 105 | 106 | // Only required for MDHT 107 | private MDHTResultDetails mdhtResultDetails; 108 | 109 | // Only valid for Vocabulary testing 110 | private String actualCodeSystem; 111 | private String actualCode; 112 | private String actualDisplayName; 113 | private String actualCodeSystemName; 114 | 115 | public RefCCDAValidationResultBuilder(String description, String xPath, 116 | String validatorConfiguredXpath, ValidationResultType type, String documentLineNumber) { 117 | this.description = description; 118 | this.validatorConfiguredXpath = validatorConfiguredXpath; 119 | this.type = type; 120 | this.xPath = xPath; 121 | this.documentLineNumber = documentLineNumber; 122 | } 123 | 124 | public RefCCDAValidationResultBuilder mdhtResultDetails(MDHTResultDetails mdhtResultDetails) { 125 | this.mdhtResultDetails = mdhtResultDetails; 126 | return this; 127 | } 128 | 129 | public RefCCDAValidationResultBuilder actualCodeSystem(String actualCodeSystem) { 130 | this.actualCodeSystem = actualCodeSystem; 131 | return this; 132 | } 133 | 134 | public RefCCDAValidationResultBuilder actualCode(String actualCode) { 135 | this.actualCode = actualCode; 136 | return this; 137 | } 138 | 139 | public RefCCDAValidationResultBuilder actualDisplayName(String actualDisplayName) { 140 | this.actualDisplayName = actualDisplayName; 141 | return this; 142 | } 143 | 144 | public RefCCDAValidationResultBuilder actualCodeSystemName(String actualCodeSystemName) { 145 | this.actualCodeSystemName = actualCodeSystemName; 146 | return this; 147 | } 148 | 149 | public RefCCDAValidationResult build() { 150 | return new RefCCDAValidationResult(this); 151 | } 152 | } 153 | 154 | } 155 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/XPathIndexer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010 Sean Muir 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Sean Muir (JKM Software) - initial API and implementation 10 | * Dan Brown (Ai) - not really a contribution, but, 11 | * removed column for (minor) efficiency improvement in this implementation 12 | *******************************************************************************/ 13 | package org.sitenv.referenceccda.validators; 14 | 15 | import org.xml.sax.Attributes; 16 | import org.xml.sax.ContentHandler; 17 | import org.xml.sax.Locator; 18 | import org.xml.sax.SAXException; 19 | 20 | import java.util.ArrayList; 21 | import java.util.HashMap; 22 | import java.util.Stack; 23 | 24 | /** 25 | * XPathIndexer creates and index of line and column number of all elements 26 | * within an XML document as supplied by the SAX Locator. The locator is not 27 | * 100% accurate regarding values but this is currently only used to approximate 28 | * mark locations as part of the CDA validation within the eclipse Validator2 29 | * framework. 30 | * 31 | * @author Sean Muir (JKM Software) 32 | * 33 | */ 34 | public class XPathIndexer implements ContentHandler { 35 | 36 | /** 37 | * ElementEntry is used to maintain a bottom up stack of elements found 38 | * within the CDA document. 39 | * 40 | */ 41 | static private class ElementEntry { 42 | 43 | final String elementName; 44 | 45 | final int elementIndex; 46 | 47 | final ElementEntry elementParent; 48 | 49 | ElementEntry(String elementName, int elementIndex, ElementEntry next) { 50 | 51 | this.elementName = elementName; 52 | 53 | this.elementIndex = elementIndex; 54 | 55 | elementParent = next; 56 | } 57 | }; 58 | 59 | /** 60 | * ElementLocationData is used to cache the location of each element 61 | * 62 | */ 63 | public static class ElementLocationData { 64 | public int line; 65 | 66 | // public int column; 67 | 68 | // public ElementLocationData(int line, int column) { 69 | public ElementLocationData(int line) { 70 | super(); 71 | this.line = line; 72 | // this.column = column; 73 | } 74 | }; 75 | 76 | private ElementEntry currentXMLElement = null; 77 | 78 | /* 79 | * ELementIndexes Structure supports [Parent][Element][Location*] Where 80 | * Parent is the xpath to elements location Element is the element name 81 | * Location* is sequential array for location for the named element 82 | * 83 | * It is designed to support an incremental count approach of elements so 84 | * 85 | * 86 | * would have one Parent index pointing to a hashmap in that hash map you 87 | * have Element index pointing to an array in the array you would have 3 88 | * sequential locations, one for each element found 89 | * 90 | * 91 | * The structure and indexElement track element instances to supply running 92 | * total of element document indexes 93 | */ 94 | public HashMap>> elementIndexes = new HashMap>>(); 95 | 96 | /* 97 | * xpathLocations is a map between xpath and corresponding xml location 98 | */ 99 | public HashMap xpathLocations = new HashMap(); 100 | 101 | public HashMap xpathAttributes = new HashMap(); 102 | 103 | /* 104 | * SAX Locator 105 | */ 106 | Locator locator = null; 107 | 108 | public void characters(char[] text, int start, int length) throws SAXException { 109 | 110 | } 111 | 112 | public void endDocument() throws SAXException { 113 | } 114 | 115 | public void endElement(String namespace, String local, String name) throws SAXException { 116 | currentXMLElement = currentXMLElement.elementParent; 117 | } 118 | 119 | public void endPrefixMapping(String prefix) throws SAXException { 120 | } 121 | 122 | public ElementLocationData getAttributeLocationByValue(String value) { 123 | 124 | ElementLocationData elementLocationData = null; 125 | 126 | if (xpathAttributes.containsKey(value)) { 127 | elementLocationData = xpathAttributes.get(value); 128 | } 129 | return elementLocationData; 130 | } 131 | 132 | /** 133 | * getElementLocationByPath Returns ElementLocationData - Convert xpath to 134 | * all upper case to avoid some subtle differences in EMF validation and 135 | * actual xml content 136 | * 137 | */ 138 | public ElementLocationData getElementLocationByPath(String xpath) { 139 | 140 | ElementLocationData elementLocationData = null; 141 | 142 | String upperXPath = xpath.toUpperCase(); 143 | 144 | if (xpathLocations.containsKey(upperXPath)) { 145 | elementLocationData = xpathLocations.get(upperXPath); 146 | } 147 | return elementLocationData; 148 | } 149 | 150 | private String getXPathFromEntry(ElementEntry elementEntry) { 151 | 152 | Stack path = new Stack(); 153 | 154 | while (elementEntry != null) { 155 | 156 | path.push("/" + elementEntry.elementName + "[" + elementEntry.elementIndex + "]"); 157 | 158 | elementEntry = elementEntry.elementParent; 159 | } 160 | 161 | StringBuilder result = new StringBuilder(); 162 | 163 | while (!path.isEmpty()) { 164 | result.append(path.pop()); 165 | } 166 | 167 | return result.toString(); 168 | } 169 | 170 | public void ignorableWhitespace(char[] text, int start, int length) throws SAXException { 171 | } 172 | 173 | /* 174 | * Populates elementIndexes based on parent and element 175 | */ 176 | private int indexElement(String parent, String element) { 177 | 178 | // if new parent, create index 179 | if (!elementIndexes.containsKey(parent)) { 180 | elementIndexes.put(parent, new HashMap>()); 181 | } 182 | 183 | // if new element for parent, create index 184 | if (!elementIndexes.get(parent).containsKey(element)) { 185 | elementIndexes.get(parent).put(element, new ArrayList()); 186 | } 187 | 188 | // add sequential location based on SAX location 189 | elementIndexes.get(parent).get(element).add(locator); 190 | 191 | // return index count - used in ElementEntry to recreate xpath 192 | return elementIndexes.get(parent).get(element).size(); 193 | } 194 | 195 | public void processingInstruction(String target, String data) throws SAXException { 196 | } 197 | 198 | public void setDocumentLocator(Locator locator) { 199 | this.locator = locator; 200 | } 201 | 202 | public void skippedEntity(String name) throws SAXException { 203 | } 204 | 205 | public void startDocument() throws SAXException { 206 | } 207 | 208 | public void startElement(String namespace, String local, String name, Attributes attrs) throws SAXException { 209 | 210 | int index = indexElement(getXPathFromEntry(currentXMLElement), name); 211 | 212 | currentXMLElement = new ElementEntry(name, index, currentXMLElement); 213 | 214 | // ElementLocationData location = new 215 | // ElementLocationData(locator.getLineNumber(), 216 | // locator.getColumnNumber()); 217 | ElementLocationData location = new ElementLocationData(locator.getLineNumber()); 218 | 219 | xpathLocations.put(getXPathFromEntry(currentXMLElement).toUpperCase(), location); 220 | 221 | for (int actr = 0; actr < attrs.getLength(); actr++) { 222 | 223 | if (!xpathAttributes.containsKey(attrs.getValue(actr))) { 224 | xpathAttributes.put(attrs.getValue(actr), location); 225 | } 226 | 227 | } 228 | 229 | } 230 | 231 | public void startPrefixMapping(String prefix, String uri) throws SAXException { 232 | } 233 | 234 | } 235 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/content/ReferenceContentValidator.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.content; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.sitenv.contentvalidator.dto.ContentValidationResult; 7 | import org.sitenv.contentvalidator.service.ContentValidatorService; 8 | import org.sitenv.referenceccda.validators.BaseCCDAValidator; 9 | import org.sitenv.referenceccda.validators.CCDAValidator; 10 | import org.sitenv.referenceccda.validators.RefCCDAValidationResult; 11 | import org.sitenv.referenceccda.validators.enums.ValidationResultType; 12 | import org.sitenv.vocabularies.constants.VocabularyConstants.SeverityLevel; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Component; 15 | import org.springframework.web.context.annotation.RequestScope; 16 | import org.xml.sax.SAXException; 17 | 18 | 19 | /** 20 | * Created by Brian on 8/15/2016. 21 | */ 22 | @RequestScope 23 | @Component 24 | public class ReferenceContentValidator extends BaseCCDAValidator implements CCDAValidator { 25 | private ContentValidatorService contentValidatorService; 26 | 27 | @Autowired 28 | public ReferenceContentValidator(ContentValidatorService contentValidatorService) { 29 | this.contentValidatorService = contentValidatorService; 30 | } 31 | 32 | @Override 33 | public ArrayList validateFile(String validationObjective, String referenceFileName, 34 | String ccdaFile,String ccdaType) throws SAXException { 35 | return validateFile(validationObjective, referenceFileName, ccdaFile, ccdaType, 36 | SeverityLevel.INFO); 37 | } 38 | 39 | public ArrayList validateFile(String validationObjective, String referenceFileName, 40 | String ccdaFile, String ccdaType,SeverityLevel severityLevel) throws SAXException { 41 | ArrayList results = null; 42 | if (ccdaFile != null) { 43 | results = doValidation(validationObjective, referenceFileName, ccdaFile, ccdaType, 44 | severityLevel); 45 | } 46 | return results; 47 | } 48 | 49 | private ArrayList doValidation(String validationObjective, String referenceFileName, 50 | String ccdaFile, String ccdaType,SeverityLevel severityLevel) throws SAXException { 51 | org.sitenv.contentvalidator.dto.enums.SeverityLevel userSeverityLevelForContentValidation = 52 | org.sitenv.contentvalidator.dto.enums.SeverityLevel.valueOf(severityLevel.name()); 53 | 54 | List validationResults = contentValidatorService.validate( 55 | validationObjective, referenceFileName, ccdaFile,ccdaType, 56 | userSeverityLevelForContentValidation); 57 | 58 | ArrayList results = new ArrayList<>(); 59 | for (ContentValidationResult result : validationResults) { 60 | results.add(createValidationResult(result)); 61 | } 62 | 63 | return results; 64 | } 65 | 66 | private RefCCDAValidationResult createValidationResult(ContentValidationResult result) { 67 | ValidationResultType type; 68 | switch(result.getContentValidationResultLevel()){ 69 | case ERROR: type = ValidationResultType.REF_CCDA_ERROR; 70 | break; 71 | case WARNING: type = ValidationResultType.REF_CCDA_WARN; 72 | break; 73 | default: type = ValidationResultType.REF_CCDA_INFO; 74 | break; 75 | } 76 | 77 | return new RefCCDAValidationResult.RefCCDAValidationResultBuilder(result.getMessage(), null, null, type, "0") 78 | .build(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/enums/UsrhSubType.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.enums; 2 | 3 | public enum UsrhSubType { 4 | CONSULTATION_NOTE("Consultation Note"), CONTINUITY_OF_CARE_DOCUMENT("CCD"), DIAGNOSTIC_IMAGING_REPORT("Diagnostic Imaging Report"), 5 | DISCHARGE_SUMMARY("Discharge Summary"), HISTORY_AND_PHYSICAL_NOTE("History and Physical Note"), OPERATIVE_NOTE("Operative Note"), 6 | PROCEDURE_NOTE("Procedure Note"), PROGRESS_NOTE("Progress Note"), UNSTRUCTURED_DOCUMENT("Unstructured Document"), 7 | CARE_PLAN("Care Plan"), REFERRAL_NOTE("Referral Note"), TRANSFER_SUMMARY("Transfer Summary"), 8 | US_REALM_HEADER_PATIENT_GENERATED_DOCUMENT("USRH Patient Generated Document"); 9 | 10 | private String name; 11 | 12 | private UsrhSubType(String name) { 13 | this.name = name; 14 | } 15 | 16 | public String getName() { 17 | return name; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/enums/ValidationResultType.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.enums; 2 | 3 | import com.fasterxml.jackson.annotation.JsonValue; 4 | 5 | public enum ValidationResultType { 6 | CCDA_MDHT_CONFORMANCE_ERROR("C-CDA MDHT Conformance Error"), CCDA_MDHT_CONFORMANCE_WARN("C-CDA MDHT Conformance Warning"), CCDA_MDHT_CONFORMANCE_INFO("C-CDA MDHT Conformance Info"), CCDA_VOCAB_CONFORMANCE_ERROR( 7 | "ONC 2015 S&CC Vocabulary Validation Conformance Error"), CCDA_VOCAB_CONFORMANCE_WARN("ONC 2015 S&CC Vocabulary Validation Conformance Warning"), CCDA_VOCAB_CONFORMANCE_INFO("ONC 2015 S&CC Vocabulary Validation Conformance Info"), REF_CCDA_ERROR( 8 | "ONC 2015 S&CC Reference C-CDA Validation Error"), REF_CCDA_WARN("ONC 2015 S&CC Reference C-CDA Validation Warning"), REF_CCDA_INFO("ONC 2015 S&CC Reference C-CDA Validation Info"); 9 | 10 | private String errorTypePrettyName; 11 | 12 | private ValidationResultType(String type) { 13 | errorTypePrettyName = type; 14 | } 15 | 16 | @JsonValue 17 | public String getTypePrettyName() { 18 | return errorTypePrettyName; 19 | } 20 | 21 | public String getValidationResultType() { 22 | return name(); 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/schema/CCDATemplateIds.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.schema; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.List; 6 | 7 | public final class CCDATemplateIds { 8 | // C-CDA Header roots 9 | public static final String US_REALM_HEADER_ROOT = "2.16.840.1.113883.10.20.22.1.1"; 10 | public static final String US_REALM_HEADER_V2_ROOT = US_REALM_HEADER_ROOT; 11 | // Non-C-CDA Header roots 12 | public static final String C32_MAIN_ROOT = "2.16.840.1.113883.3.88.11.32.1"; 13 | // R1.1 Document Type roots 14 | public static final String CONSULTATION_NOTE_ROOT = "2.16.840.1.113883.10.20.22.1.4"; 15 | public static final String CONTINUITY_OF_CARE_DOCUMENT_ROOT = "2.16.840.1.113883.10.20.22.1.2"; 16 | public static final String DIAGNOSTIC_IMAGING_REPORT_ROOT = "2.16.840.1.113883.10.20.22.1.5"; 17 | public static final String DISCHARGE_SUMMARY_ROOT = "2.16.840.1.113883.10.20.22.1.8"; 18 | public static final String HISTORY_AND_PHYSICAL_NOTE_ROOT = "2.16.840.1.113883.10.20.22.1.3"; 19 | public static final String OPERATIVE_NOTE_ROOT = "2.16.840.1.113883.10.20.22.1.7"; 20 | public static final String PROCEDURE_NOTE_ROOT = "2.16.840.1.113883.10.20.22.1.6"; 21 | public static final String PROGRESS_NOTE_ROOT = "2.16.840.1.113883.10.20.22.1.9"; 22 | public static final String UNSTRUCTURED_DOCUMENT_ROOT = "2.16.840.1.113883.10.20.22.1.10"; 23 | public static final List R1_DOCUMENT_ROOTS = new ArrayList( 24 | Arrays.asList(CONSULTATION_NOTE_ROOT, CONTINUITY_OF_CARE_DOCUMENT_ROOT, DIAGNOSTIC_IMAGING_REPORT_ROOT, 25 | DISCHARGE_SUMMARY_ROOT, HISTORY_AND_PHYSICAL_NOTE_ROOT, OPERATIVE_NOTE_ROOT, PROCEDURE_NOTE_ROOT, 26 | PROGRESS_NOTE_ROOT, UNSTRUCTURED_DOCUMENT_ROOT)); 27 | 28 | // R2.0/1 extensions 29 | public static final String R20_EXTENSION = "2014-06-09"; 30 | public static final String R21_EXTENSION = "2015-08-01"; 31 | // R2.0/1 versioned Document Type roots 32 | public static final String CONSULTATION_NOTE_V2_ROOT = CONSULTATION_NOTE_ROOT; 33 | public static final String CONTINUITY_OF_CARE_DOCUMENT_V2_ROOT = CONTINUITY_OF_CARE_DOCUMENT_ROOT; 34 | public static final String DIAGNOSTIC_IMAGING_REPORT_V2_ROOT = DIAGNOSTIC_IMAGING_REPORT_ROOT; 35 | public static final String DISCHARGE_SUMMARY_V2_ROOT = DISCHARGE_SUMMARY_ROOT; 36 | public static final String HISTORY_AND_PHYSICAL_NOTE_V2_ROOT = HISTORY_AND_PHYSICAL_NOTE_ROOT; 37 | public static final String OPERATIVE_NOTE_V2_ROOT = OPERATIVE_NOTE_ROOT; 38 | public static final String PROCEDURE_NOTE_V2_ROOT = PROCEDURE_NOTE_ROOT; 39 | public static final String PROGRESS_NOTE_V2_ROOT = PROGRESS_NOTE_ROOT; 40 | public static final String UNSTRUCTURED_DOCUMENT_V2_ROOT = UNSTRUCTURED_DOCUMENT_ROOT; 41 | // R2 NEW documents 42 | // Note: Since these are 'NEW', they don't have an extension for R2.0, but 43 | // they do for R2.1 since they were versioned from 2.0 44 | public static final String CARE_PLAN_ROOT = "2.16.840.1.113883.10.20.22.1.15"; 45 | public static final String REFERRAL_NOTE_ROOT = "2.16.840.1.113883.10.20.22.1.14"; 46 | public static final String TRANSFER_SUMMARY_ROOT = "2.16.840.1.113883.10.20.22.1.13"; 47 | public static final String US_REALM_HEADER_PATIENT_GENERATED_DOCUMENT_ROOT = "2.16.840.1.113883.10.20.29.1"; 48 | public static final List R20_NEW_DOCS_NO_EXT = new ArrayList(Arrays.asList(CARE_PLAN_ROOT, 49 | REFERRAL_NOTE_ROOT, TRANSFER_SUMMARY_ROOT, US_REALM_HEADER_PATIENT_GENERATED_DOCUMENT_ROOT)); 50 | public static final List R2_DOCUMENT_ROOTS = new ArrayList(Arrays.asList(CONSULTATION_NOTE_V2_ROOT, 51 | CONTINUITY_OF_CARE_DOCUMENT_V2_ROOT, DIAGNOSTIC_IMAGING_REPORT_V2_ROOT, DISCHARGE_SUMMARY_V2_ROOT, 52 | HISTORY_AND_PHYSICAL_NOTE_V2_ROOT, OPERATIVE_NOTE_V2_ROOT, PROCEDURE_NOTE_V2_ROOT, PROGRESS_NOTE_V2_ROOT, 53 | UNSTRUCTURED_DOCUMENT_V2_ROOT, CARE_PLAN_ROOT, REFERRAL_NOTE_ROOT, TRANSFER_SUMMARY_ROOT, 54 | US_REALM_HEADER_PATIENT_GENERATED_DOCUMENT_ROOT)); 55 | 56 | public static final List USRH_AND_ALL_DOC_ROOTS = new ArrayList(); 57 | static { 58 | USRH_AND_ALL_DOC_ROOTS.add(US_REALM_HEADER_V2_ROOT); 59 | USRH_AND_ALL_DOC_ROOTS.addAll(R2_DOCUMENT_ROOTS); 60 | } 61 | 62 | public static void main(String[] args) { 63 | System.out.println(USRH_AND_ALL_DOC_ROOTS); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/schema/CCDATypes.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.schema; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.List; 6 | 7 | public final class CCDATypes { 8 | // higher level validation versions - NOT an objective 9 | public static final String CCDAR21_OR_CCDAR11 = "C-CDA R2.1 or R1.1 Document"; 10 | public static final String CCDAR11_MU2 = "C-CDA R1.1 MU2 Document"; 11 | public static final String DS4P = "DS4P Document"; 12 | public static final String UNKNOWN_DOC_TYPE = "Unknown Document Type"; 13 | 14 | /// all below here are an actual validationObjective 15 | // generic CCDA base level 16 | public static final String NON_SPECIFIC_CCDA = "NonSpecificCCDA"; 17 | public static final String NON_SPECIFIC_CCDAR2 = "NonSpecificCCDAR2"; 18 | public static final List NON_SPECIFIC_CCDA_TYPES = new ArrayList( 19 | Arrays.asList(NON_SPECIFIC_CCDA, NON_SPECIFIC_CCDAR2)); 20 | 21 | // most common mu2 22 | public static final String TRANSITIONS_OF_CARE_AMBULATORY_SUMMARY = "TransitionsOfCareAmbulatorySummary"; 23 | // other mu2 24 | public static final String CLINICAL_OFFICE_VISIT_SUMMARY = "ClinicalOfficeVisitSummary"; 25 | public static final String TRANSITIONS_OF_CARE_INPATIENT_SUMMARY = "TransitionsOfCareInpatientSummary"; 26 | public static final String VDT_AMBULATORY_SUMMARY = "VDTAmbulatorySummary"; 27 | public static final String VDT_INPATIENT_SUMMARY = "VDTInpatientSummary"; 28 | public static final List MU2_TYPES = new ArrayList( 29 | Arrays.asList(TRANSITIONS_OF_CARE_AMBULATORY_SUMMARY, 30 | CLINICAL_OFFICE_VISIT_SUMMARY, 31 | TRANSITIONS_OF_CARE_INPATIENT_SUMMARY, 32 | VDT_AMBULATORY_SUMMARY, VDT_INPATIENT_SUMMARY)); 33 | 34 | // CCDA document level (non-mu2) 35 | public static final String CONSULTATION_NOTE = "ConsultationNote"; 36 | public static final String CONTINUITY_OF_CARE_DOCUMENT = "ContinuityOfCareDocument"; 37 | public static final String DIAGNOSTIC_IMAGING_REPORT = "DiagnosticImagingReport"; 38 | public static final String DISCHARGE_SUMMARY = "DischargeSummary"; 39 | public static final String HISTORY_AND_PHYSICAL_NOTE = "HistoryAndPhysicalNote"; 40 | public static final String OPERATIVE_NOTE = "OperativeNote"; 41 | public static final String PROCEDURE_NOTE = "ProcedureNote"; 42 | public static final String PROGRESS_NOTE = "ProgressNote"; 43 | public static final String UNSTRUCTURED_DOCUMENT = "UnstructuredDocument"; 44 | 45 | //ds4p 46 | public static final String NON_SPECIFIC_DS4P = "NonSpecificDS4P"; 47 | public static final List DS4P_TYPES = new ArrayList(Arrays.asList(NON_SPECIFIC_DS4P, 48 | ValidationObjectives.Sender.B7_DS4P_AMB_170_315, ValidationObjectives.Sender.B7_DS4P_INP_170_315, 49 | ValidationObjectives.Receiver.B8_DS4P_AMB_170_315, ValidationObjectives.Receiver.B8_DS4P_INP_170_315)); 50 | 51 | public static String getTypes() { 52 | StringBuffer sb = new StringBuffer(); 53 | ValidationObjectives.appendObjectivesData(NON_SPECIFIC_CCDA_TYPES, "LEGACY (same result as 'C-CDA_IG_Plus_Vocab')", sb); 54 | sb.append(" "); 55 | ValidationObjectives.appendObjectivesData(MU2_TYPES, "C-CDA R1.1 WITH MU2", sb); 56 | sb.append(" "); 57 | ValidationObjectives.appendObjectivesData(Arrays.asList(NON_SPECIFIC_DS4P), "DS4P", sb); 58 | return sb.toString(); 59 | } 60 | 61 | public static void main(String[] args) { 62 | System.out.println(CCDATypes.getTypes()); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/schema/CCDAVersion.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.schema; 2 | 3 | public enum CCDAVersion { 4 | R11("R1.1"), R20("R2.0"), R21("R2.1"), NOT_CCDA("Not a C-CDA document"); 5 | 6 | private final String version; 7 | 8 | private CCDAVersion(final String version) { 9 | this.version = version; 10 | } 11 | 12 | public String getVersion() { 13 | return version; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/schema/MDHTResultDetails.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.schema; 2 | 3 | public class MDHTResultDetails { 4 | private boolean isSchemaError, isDataTypeSchemaError, isIGIssue, isMUIssue, isDS4PIssue; 5 | 6 | public MDHTResultDetails() { 7 | this(false, false, false, false, false); 8 | } 9 | 10 | public MDHTResultDetails(boolean isSchemaError, boolean isDataTypeSchemaError, 11 | boolean isIGIssue, boolean isMUIssue, boolean isDS4PIssue) { 12 | this.isSchemaError = isSchemaError; 13 | this.isDataTypeSchemaError = isDataTypeSchemaError; 14 | this.isIGIssue = isIGIssue; 15 | this.isMUIssue = isMUIssue; 16 | this.isDS4PIssue = isDS4PIssue; 17 | } 18 | 19 | public boolean isSchemaError() { 20 | return isSchemaError; 21 | } 22 | 23 | public void setSchemaError(boolean isSchemaError) { 24 | this.isSchemaError = isSchemaError; 25 | } 26 | 27 | public boolean isDataTypeSchemaError() { 28 | return isDataTypeSchemaError; 29 | } 30 | 31 | public void setDataTypeSchemaError(boolean isDataTypeSchemaError) { 32 | this.isDataTypeSchemaError = isDataTypeSchemaError; 33 | } 34 | 35 | public boolean isIGIssue() { 36 | return isIGIssue; 37 | } 38 | 39 | public void setIGIssue(boolean isIGIssue) { 40 | this.isIGIssue = isIGIssue; 41 | } 42 | 43 | public boolean isMUIssue() { 44 | return isMUIssue; 45 | } 46 | 47 | public void setMUIssue(boolean isMUIssue) { 48 | this.isMUIssue = isMUIssue; 49 | } 50 | 51 | public boolean isDS4PIssue() { 52 | return isDS4PIssue; 53 | } 54 | 55 | public void setDS4PIssue(boolean isDS4PIssue) { 56 | this.isDS4PIssue = isDS4PIssue; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/schema/ValidationObjectives.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.schema; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.Collection; 6 | import java.util.HashSet; 7 | import java.util.List; 8 | import java.util.Set; 9 | 10 | public final class ValidationObjectives { 11 | public static final List ALL = new ArrayList(); 12 | public static final Set ALL_UNIQUE = new HashSet(); 13 | public static final Set ALL_UNIQUE_EXCEPT_DS4P = new HashSet(); 14 | public static final Set ALL_UNIQUE_CONTENT_ONLY = new HashSet(); 15 | static { 16 | ALL.addAll(Sender.OBJECTIVES); 17 | ALL.addAll(Receiver.OBJECTIVES); 18 | 19 | ALL_UNIQUE.addAll(ALL); 20 | 21 | ALL_UNIQUE_CONTENT_ONLY.addAll(ALL_UNIQUE); 22 | ALL_UNIQUE_CONTENT_ONLY.removeAll(Arrays.asList(Sender.C_CDA_IG_ONLY, Sender.C_CDA_IG_PLUS_VOCAB)); 23 | 24 | ALL_UNIQUE_EXCEPT_DS4P.addAll(ALL_UNIQUE); 25 | ALL_UNIQUE_EXCEPT_DS4P.removeAll(CCDATypes.DS4P_TYPES); 26 | } 27 | 28 | public static final List CURRENTLY_PROCESSED_BY_CONTENT_VALIDATOR = new ArrayList(Arrays.asList( 29 | Sender.B1_TOC_AMB_170_315, Sender.B1_TOC_INP_170_315, 30 | Sender.B2_CIRI_AMB_170_315, Sender.B2_CIRI_INP_170_315, 31 | Sender.B4_CCDS_AMB_170_315, Sender.B4_CCDS_INP_170_315, 32 | Sender.B6_DE_AMB_170_315, Sender.B6_DE_INP_170_315, 33 | Sender.B9_CP_AMB_170_315, Sender.B9_CP_INP_170_315, 34 | Sender.E1_VDT_AMB_170_315, Sender.E1_VDT_INP_170_315, 35 | Sender.G9_APIACCESS_AMB_170_315, Sender.G9_APIACCESS_INP_170_315)); 36 | 37 | public static class Sender { 38 | public static final String B1_TOC_AMB_170_315 = "170.315_b1_ToC_Amb"; 39 | public static final String B1_TOC_INP_170_315 = "170.315_b1_ToC_Inp"; 40 | public static final String B2_CIRI_AMB_170_315 = "170.315_b2_CIRI_Amb"; 41 | public static final String B2_CIRI_INP_170_315 = "170.315_b2_CIRI_Inp"; 42 | public static final String B4_CCDS_AMB_170_315 = "170.315_b4_CCDS_Amb"; 43 | public static final String B4_CCDS_INP_170_315 = "170.315_b4_CCDS_Inp"; 44 | public static final String B6_DE_AMB_170_315 = "170.315_b6_DE_Amb"; 45 | public static final String B6_DE_INP_170_315 = "170.315_b6_DE_Inp"; 46 | public static final String B7_DS4P_AMB_170_315 = "170.315_b7_DS4P_Amb"; 47 | public static final String B7_DS4P_INP_170_315 = "170.315_b7_DS4P_Inp"; 48 | public static final String B9_CP_AMB_170_315 = "170.315_b9_CP_Amb"; 49 | public static final String B9_CP_INP_170_315 = "170.315_b9_CP_Inp"; 50 | public static final String E1_VDT_AMB_170_315 = "170.315_e1_VDT_Amb"; 51 | public static final String E1_VDT_INP_170_315 = "170.315_e1_VDT_Inp"; 52 | public static final String G9_APIACCESS_AMB_170_315 = "170.315_g9_APIAccess_Amb"; 53 | public static final String G9_APIACCESS_INP_170_315 = "170.315_g9_APIAccess_Inp"; 54 | public static final String C_CDA_IG_ONLY = "C-CDA_IG_Only"; 55 | public static final String C_CDA_IG_PLUS_VOCAB = "C-CDA_IG_Plus_Vocab"; 56 | public static final String GOLD_SAMPLES_FOR_PRACTICE = "Gold_Samples_For_Practice"; 57 | public static final List OBJECTIVES = new ArrayList( 58 | Arrays.asList(B1_TOC_AMB_170_315, B1_TOC_INP_170_315, 59 | B2_CIRI_AMB_170_315, B2_CIRI_INP_170_315, 60 | B4_CCDS_AMB_170_315, B4_CCDS_INP_170_315, 61 | B6_DE_AMB_170_315, B6_DE_INP_170_315, 62 | B7_DS4P_AMB_170_315, B7_DS4P_INP_170_315, 63 | B9_CP_AMB_170_315, B9_CP_INP_170_315, 64 | E1_VDT_AMB_170_315, E1_VDT_INP_170_315, 65 | G9_APIACCESS_AMB_170_315, G9_APIACCESS_INP_170_315, 66 | C_CDA_IG_ONLY, C_CDA_IG_PLUS_VOCAB, 67 | GOLD_SAMPLES_FOR_PRACTICE)); 68 | } 69 | 70 | public static class Receiver { 71 | public static final String B1_TOC_AMB_170_315 = Sender.B1_TOC_AMB_170_315; 72 | public static final String B1_TOC_INP_170_315 = Sender.B1_TOC_INP_170_315; 73 | public static final String B2_CIRI_AMB_170_315 = Sender.B2_CIRI_AMB_170_315; 74 | public static final String B2_CIRI_INP_170_315 = Sender.B2_CIRI_INP_170_315; 75 | public static final String B5_CCDS_AMB_170_315 = "170.315_b5_CCDS_Amb"; 76 | public static final String B5_CCDS_INP_170_315 = "170.315_b5_CCDS_Inp"; 77 | public static final String B8_DS4P_AMB_170_315 = "170.315_b8_DS4P_Amb"; 78 | public static final String B8_DS4P_INP_170_315 = "170.315_b8_DS4P_Inp"; 79 | public static final String B9_CP_AMB_170_315 = Sender.B9_CP_AMB_170_315; 80 | public static final String B9_CP_INP_170_315 = Sender.B9_CP_INP_170_315; 81 | public static final String NEGATIVE_TESTING_CCDS = "NegativeTesting_CCDS"; 82 | public static final String NEGATIVE_TESTING_CAREPLAN = "NegativeTesting_CarePlan"; 83 | public static final List OBJECTIVES = new ArrayList( 84 | Arrays.asList(B1_TOC_AMB_170_315, B1_TOC_INP_170_315, 85 | B2_CIRI_AMB_170_315, B2_CIRI_INP_170_315, 86 | B5_CCDS_AMB_170_315, B5_CCDS_INP_170_315, 87 | B8_DS4P_AMB_170_315, B8_DS4P_INP_170_315, 88 | B9_CP_AMB_170_315, B9_CP_INP_170_315, 89 | NEGATIVE_TESTING_CCDS, NEGATIVE_TESTING_CAREPLAN)); 90 | } 91 | 92 | public static String getObjectives() { 93 | StringBuffer sb = new StringBuffer(); 94 | appendObjectivesData(Sender.OBJECTIVES, "SENDER", sb); 95 | sb.append(" "); 96 | appendObjectivesData(Receiver.OBJECTIVES, "RECEIVER", sb); 97 | return sb.toString(); 98 | } 99 | 100 | protected static void appendObjectivesData(List objectives, String parentClassName, StringBuffer sb) { 101 | sb.append(parentClassName + " options: "); 102 | for (int i = 0; i < objectives.size(); i++) { 103 | sb.append(objectives.get(i) 104 | + (i == objectives.size() - 1 ? "" : ", ")); 105 | } 106 | } 107 | 108 | public static void main(String[] args) { 109 | System.out.println("ValidationObjectives.getObjectives():" + System.lineSeparator() + "-" + ValidationObjectives.getObjectives()); 110 | printObjectivesHelperForDebugging(ALL, "ALL"); 111 | printObjectivesHelperForDebugging(ALL_UNIQUE, "ALL_UNIQUE"); 112 | printObjectivesHelperForDebugging(ALL_UNIQUE_CONTENT_ONLY, "ALL_UNIQUE_CONTENT_ONLY"); 113 | printObjectivesHelperForDebugging(CURRENTLY_PROCESSED_BY_CONTENT_VALIDATOR, "CURRENTLY_PROCESSED_BY_CONTENT_VALIDATOR"); 114 | } 115 | 116 | private static void printObjectivesHelperForDebugging(Collection collection, String description) { 117 | System.out.println(description + ":" + System.lineSeparator() + "-Size: " + collection.size() + System.lineSeparator() 118 | + "-Content" + collection); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /src/main/java/org/sitenv/referenceccda/validators/vocabulary/VocabularyCCDAValidator.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.validators.vocabulary; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.apache.commons.io.IOUtils; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.sitenv.referenceccda.validators.BaseCCDAValidator; 11 | import org.sitenv.referenceccda.validators.CCDAValidator; 12 | import org.sitenv.referenceccda.validators.RefCCDAValidationResult; 13 | import org.sitenv.referenceccda.validators.XPathIndexer; 14 | import org.sitenv.referenceccda.validators.enums.ValidationResultType; 15 | import org.sitenv.vocabularies.constants.VocabularyConstants; 16 | import org.sitenv.vocabularies.constants.VocabularyConstants.SeverityLevel; 17 | import org.sitenv.vocabularies.validation.dto.GlobalCodeValidatorResults; 18 | import org.sitenv.vocabularies.validation.dto.VocabularyValidationResult; 19 | import org.sitenv.vocabularies.validation.services.VocabularyValidationService; 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.beans.factory.annotation.Value; 22 | import org.springframework.stereotype.Component; 23 | import org.springframework.web.context.annotation.RequestScope; 24 | import org.xml.sax.SAXException; 25 | 26 | @RequestScope 27 | @Component 28 | public class VocabularyCCDAValidator extends BaseCCDAValidator implements CCDAValidator { 29 | @Value("${referenceccda.configFile}") 30 | private String vocabularyXpathExpressionConfiguration; 31 | private VocabularyValidationService vocabularyValidationService; 32 | private GlobalCodeValidatorResults globalCodeValidatorResults; 33 | private static Logger logger = LoggerFactory.getLogger(VocabularyCCDAValidator.class); 34 | 35 | @Autowired 36 | public VocabularyCCDAValidator(VocabularyValidationService vocabularyValidationService) { 37 | this.vocabularyValidationService = vocabularyValidationService; 38 | globalCodeValidatorResults = new GlobalCodeValidatorResults(); 39 | } 40 | 41 | public ArrayList validateFile(String validationObjective, String referenceFileName, 42 | String ccdaFile) throws SAXException { 43 | return validateFileImplementation(validationObjective, referenceFileName, ccdaFile, 44 | VocabularyConstants.Config.DEFAULT, SeverityLevel.INFO); 45 | } 46 | 47 | public ArrayList validateFile(String validationObjective, String referenceFileName, 48 | String ccdaFile, String vocabularyConfig) throws SAXException { 49 | return validateFileImplementation(validationObjective, referenceFileName, ccdaFile, vocabularyConfig, 50 | SeverityLevel.INFO); 51 | } 52 | 53 | public ArrayList validateFile(String validationObjective, String referenceFileName, 54 | String ccdaFile, String vocabularyConfig, SeverityLevel severityLevel) throws SAXException { 55 | return validateFileImplementation(validationObjective, referenceFileName, ccdaFile, vocabularyConfig, 56 | severityLevel); 57 | } 58 | 59 | private ArrayList validateFileImplementation(String validationObjective, String referenceFileName, 60 | String ccdaFile, String vocabularyConfig, SeverityLevel severityLevel) throws SAXException { 61 | ArrayList results = null; 62 | if (ccdaFile != null) { 63 | final XPathIndexer xpathIndexer = new XPathIndexer(); 64 | trackXPathsInXML(xpathIndexer, ccdaFile); 65 | try { 66 | logger.info("15: severityLevel (Enum) in validateFileImplementation for vocab calling doValidation " + severityLevel.name()); 67 | results = doValidation(ccdaFile, xpathIndexer, vocabularyConfig, severityLevel); 68 | } catch (IOException e) { 69 | e.printStackTrace(); 70 | } 71 | } 72 | return results; 73 | } 74 | 75 | private ArrayList doValidation(String ccdaFile, XPathIndexer xpathIndexer, 76 | String vocabularyConfig, SeverityLevel severityLevel) throws IOException, SAXException { 77 | logger.info("16: severityLevel (Enum) in doValidation for vocab calling doValidation before run validate" + severityLevel.name()); 78 | List validationResults = vocabularyValidationService 79 | .validate(IOUtils.toInputStream(ccdaFile, "UTF-8"), vocabularyConfig, severityLevel); 80 | globalCodeValidatorResults = vocabularyValidationService.getGlobalCodeValidatorResults(); 81 | ArrayList results = new ArrayList<>(); 82 | for (VocabularyValidationResult result : validationResults) { 83 | results.add(createValidationResult(result, xpathIndexer)); 84 | } 85 | return results; 86 | } 87 | 88 | public GlobalCodeValidatorResults getGlobalCodeValidatorResults() { 89 | return globalCodeValidatorResults; 90 | } 91 | 92 | private RefCCDAValidationResult createValidationResult(VocabularyValidationResult result, XPathIndexer xpathIndexer) { 93 | ValidationResultType type; 94 | switch(result.getVocabularyValidationResultLevel()){ 95 | case SHALL: type = ValidationResultType.CCDA_VOCAB_CONFORMANCE_ERROR; 96 | break; 97 | case SHOULD: type = ValidationResultType.CCDA_VOCAB_CONFORMANCE_WARN; 98 | break; 99 | default: type = ValidationResultType.CCDA_VOCAB_CONFORMANCE_INFO; 100 | break; 101 | } 102 | String lineNumber = getLineNumberInXMLUsingXpath(xpathIndexer, result.getNodeValidationResult().getValidatedDocumentXpathExpression()); 103 | 104 | return new RefCCDAValidationResult.RefCCDAValidationResultBuilder(result.getMessage(), 105 | result.getNodeValidationResult().getValidatedDocumentXpathExpression(), 106 | result.getNodeValidationResult().getConfiguredXpathExpression(), type, lineNumber) 107 | .actualCode(result.getNodeValidationResult().getRequestedCode()) 108 | .actualCodeSystem(result.getNodeValidationResult().getRequestedCodeSystem()) 109 | .actualCodeSystemName(result.getNodeValidationResult().getRequestedCodeSystemName()) 110 | .actualDisplayName(result.getNodeValidationResult().getRequestedDisplayName()) 111 | .build(); 112 | } 113 | 114 | private String getLineNumberInXMLUsingXpath(final XPathIndexer xpathIndexer, String xpath) { 115 | XPathIndexer.ElementLocationData eld = xpathIndexer.getElementLocationByPath(xpath.toUpperCase()); 116 | String lineNumber = eld != null ? Integer.toString(eld.line) : "Line number not available"; 117 | return lineNumber; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /src/main/profiles/prod/environment.properties: -------------------------------------------------------------------------------- 1 | vocabulary.localCodeRepositoryDir=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/Vocabulary/code_repository/ 2 | vocabulary.localValueSetRepositoryDir=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/Vocabulary/valueset_repository/ 3 | content.scenariosDir=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/scenarios/ 4 | referenceccda.configFile=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/ccdaReferenceValidatorConfig.xml 5 | referenceccda.isDynamicVocab=true 6 | referenceccda.configFolder=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/ -------------------------------------------------------------------------------- /src/main/profiles/test/environment.properties: -------------------------------------------------------------------------------- 1 | vocabulary.localCodeRepositoryDir=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/Vocabulary/code_repository/ 2 | vocabulary.localValueSetRepositoryDir=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/Vocabulary/valueset_repository/ 3 | content.scenariosDir=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/scenarios/ 4 | referenceccda.configFile=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/ccdaReferenceValidatorConfig.xml 5 | referenceccda.isDynamicVocab=true 6 | referenceccda.configFolder=/opt/apache-tomcat-7.0.53/mdht/Environment/VocabularyConfiguration/ -------------------------------------------------------------------------------- /src/main/profiles/webapps/environment.properties: -------------------------------------------------------------------------------- 1 | vocabulary.localCodeRepositoryDir=C:/Programming/SITE/code_repository 2 | vocabulary.localValueSetRepositoryDir=C:/Programming/SITE/valueset_repository 3 | content.scenariosDir=C:/Programming/SITE/scenarios 4 | referenceccda.configFile=C:/Users/AIadministrator/git/referenceccdavalidator/configuration/ccdaReferenceValidatorConfig.xml 5 | local.tomcat.webapps.directory=C:/Programming/Servers/apache-tomcat-7.0.32_ScorecardTesting/webapps 6 | referenceccda.isDynamicVocab=true 7 | referenceccda.configFolder=C:/Programming/SITE/config/dynamic/ -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | ${REF_LOG}.${timestamp}.log 12 | 13 | 14 | ${REF_LOG}.-%d{yyyy-MM-dd}%i.log 15 | 16 | 100MB 17 | 18 | 19 | 20 | 21 | %d %p %c{1.} [%t] %m%n 22 | 23 | 24 | 25 | 26 | ${CONTENT_LOG}.${timestamp}.log 27 | 28 | 29 | ${CONTENT_LOG}.-%d{yyyy-MM-dd}%i.log 30 | 31 | 100MB 32 | 33 | 34 | 35 | 36 | %d %p %c{1.} [%t] %m%n 37 | 38 | 39 | 40 | 41 | ${CODE_LOG}.${timestamp}.log 42 | 43 | 44 | ${CODE_LOG}.-%d{yyyy-MM-dd}%i.log 45 | 46 | 100MB 47 | 48 | 49 | 50 | 51 | %d %p %c{1.} [%t] %m%n 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 512 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /src/main/webapp/META-INF/context.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/webapp/static/css/angular-block-ui.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | angular-block-ui v0.2.1 3 | (c) 2015 (null) McNull https://github.com/McNull/angular-block-ui 4 | License: MIT 5 | */.block-ui{position:relative}body.block-ui{position:static}.block-ui-main>.block-ui-container,body.block-ui>.block-ui-container{position:fixed}.block-ui-container{position:absolute;z-index:10000;top:0;right:0;bottom:0;left:0;height:0;overflow:hidden;opacity:0;filter:alpha(opacity=00)}.block-ui-active>.block-ui-container{height:100%;cursor:wait}.block-ui-active .block-ui-active>.block-ui-container{height:0}.block-ui-visible>.block-ui-container{opacity:1;filter:alpha(opacity=100)}.block-ui-overlay{width:100%;height:100%;opacity:.5;filter:alpha(opacity=50);background-color:#fff}.block-ui-message-container{position:absolute;top:35%;left:0;right:0;height:0;text-align:center;z-index:10001}.block-ui-message{display:inline-block;text-align:left;background-color:#333;color:#f5f5f5;padding:20px;border-radius:4px;font-size:20px;font-weight:700;filter:alpha(opacity=100)}.block-ui-anim-fade>.block-ui-container{transition:height 0s linear 200ms,opacity 200ms ease 0s}.block-ui-anim-fade.block-ui-active>.block-ui-container{transition-delay:0s} -------------------------------------------------------------------------------- /src/main/webapp/static/css/bootstrap-treeview.min.css: -------------------------------------------------------------------------------- 1 | .treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed} -------------------------------------------------------------------------------- /src/main/webapp/static/css/main.css: -------------------------------------------------------------------------------- 1 | #ccdafileChooser { 2 | float: left 3 | } 4 | 5 | #ccdavalidate_btn { 6 | clear: both; 7 | display: block; 8 | position: relative; 9 | width: 200px; 10 | margin-top: 30px; 11 | } 12 | 13 | div.fileinputs { 14 | position: relative; 15 | } 16 | 17 | div.fileinputs>input { 18 | width: 320px; 19 | } 20 | 21 | div.fakefile { 22 | position: absolute; 23 | top: 0px; 24 | left: 0px; 25 | z-index: 1; 26 | width: 320px; 27 | } 28 | 29 | div.fakefile>img, div.fakefile>input { 30 | display: inline-block; 31 | vertical-align: middle; 32 | } 33 | 34 | input.file { 35 | position: relative; 36 | text-align: right; 37 | -moz-opacity: 0; 38 | filter: alpha(opacity = 0); 39 | opacity: 0; 40 | z-index: 2; 41 | } 42 | 43 | form { 44 | height: auto; 45 | position: relative; 46 | padding-top: 10px; 47 | } 48 | 49 | #reportSaveAsQuestion input[type="radio"] { 50 | float: right; 51 | } 52 | 53 | #ValidationResult { 54 | padding: 0px !important; 55 | } 56 | 57 | #ValidationResult .bordered { 58 | border: solid #ccc 1px; 59 | -moz-border-radius: 6px; 60 | -webkit-border-radius: 6px; 61 | border-radius: 6px; 62 | -webkit-box-shadow: 0 1px 1px #ccc; 63 | -moz-box-shadow: 0 1px 1px #ccc; 64 | box-shadow: 0 1px 1px #ccc; 65 | table-layout: fixed; 66 | border-collapse: separate; 67 | width: 100%; 68 | } 69 | 70 | #ValidationResult .bordered .table-bordered { 71 | border: solid #ccc 1px; 72 | width: 100%; 73 | table-layout: fixed; 74 | } 75 | 76 | #ValidationResult .bordered .table-bordered tr td { 77 | word-wrap: break-word; 78 | } 79 | 80 | #ValidationResult .bordered tr:hover { 81 | background: #fbf8e9; 82 | -o-transition: all 0.1s ease-in-out; 83 | -webkit-transition: all 0.1s ease-in-out; 84 | -moz-transition: all 0.1s ease-in-out; 85 | -ms-transition: all 0.1s ease-in-out; 86 | transition: all 0.1s ease-in-out; 87 | } 88 | 89 | #ValidationResult .bordered td, .bordered th { 90 | border-left: 1px solid #ccc; 91 | border-top: 1px solid #ccc; 92 | padding: 10px; 93 | text-align: left; 94 | } 95 | 96 | #ValidationResult .bordered th { 97 | background-color: #dce9f9; 98 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ebf3fc), 99 | to(#dce9f9)); 100 | background-image: -webkit-linear-gradient(top, #ebf3fc, #dce9f9); 101 | background-image: -moz-linear-gradient(top, #ebf3fc, #dce9f9); 102 | background-image: -ms-linear-gradient(top, #ebf3fc, #dce9f9); 103 | background-image: -o-linear-gradient(top, #ebf3fc, #dce9f9); 104 | background-image: linear-gradient(top, #ebf3fc, #dce9f9); 105 | -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; 106 | -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; 107 | box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; 108 | border-top: none; 109 | text-shadow: 0 1px 0 rgba(255, 255, 255, .5); 110 | } 111 | 112 | #ValidationResult .bordered td:first-child, .bordered th:first-child { 113 | border-left: none; 114 | } 115 | 116 | #ValidationResult .bordered th:first-child { 117 | -moz-border-radius: 6px 0 0 0; 118 | -webkit-border-radius: 6px 0 0 0; 119 | border-radius: 6px 0 0 0; 120 | } 121 | 122 | #ValidationResult .bordered th:last-child { 123 | -moz-border-radius: 0 6px 0 0; 124 | -webkit-border-radius: 0 6px 0 0; 125 | border-radius: 0 6px 0 0; 126 | } 127 | 128 | #ValidationResult .bordered th:only-child { 129 | -moz-border-radius: 6px 6px 0 0; 130 | -webkit-border-radius: 6px 6px 0 0; 131 | border-radius: 6px 6px 0 0; 132 | } 133 | 134 | #ValidationResult .bordered tr:last-child td:first-child { 135 | -moz-border-radius: 0 0 0 6px; 136 | -webkit-border-radius: 0 0 0 6px; 137 | border-radius: 0 0 0 6px; 138 | } 139 | 140 | #ValidationResult .bordered tr:last-child td:last-child { 141 | -moz-border-radius: 0 0 6px 0; 142 | -webkit-border-radius: 0 0 6px 0; 143 | border-radius: 0 0 6px 0; 144 | } 145 | 146 | #ValidationResult .ui-state-disabled { 147 | display: none; 148 | } 149 | 150 | code { 151 | color: inherit; 152 | white-space: inherit; 153 | background-color: inherit; 154 | } 155 | 156 | .radio { 157 | display: inline; 158 | } 159 | 160 | .radio input[type="radio"] { 161 | margin: 0px 0px 0px 0px; 162 | } 163 | 164 | h6 { 165 | margin-top: 0px; 166 | margin-bottom: 0px; 167 | } 168 | 169 | .modal .nav-tabs { 170 | border-bottom: none; 171 | } 172 | 173 | .modal-wide .modal-header { 174 | padding-bottom: 0px; 175 | } 176 | 177 | .modal.modal-wide .modal-dialog { 178 | width: 90%; 179 | } 180 | 181 | .panel select { 182 | border: 1px solid #BBBBBB; 183 | color: #666666; 184 | -webkit-box-shadow: inset 0 2px 2px #ccc, 0 1px 0 #fff; 185 | -moz-box-shadow: inset 0 2px 2px #ccc, 0 1px 0 #fff; 186 | box-shadow: inset 0 2px 2px #ccc, 0 1px 0 #fff; 187 | padding-left: 10px; 188 | background-position: 10px 6px; 189 | margin: 0; 190 | display: block; 191 | width: 100%; 192 | margin: 0 10px; 193 | background-image: none !important; 194 | margin: 0px 1px 0px 0px !important; 195 | } 196 | 197 | .nav-tabs li.active a:hover { 198 | background-color: lightgray; 199 | text-decoration: underline; 200 | } 201 | 202 | .nav-tabs li.active a:focus { 203 | background-color: lightgray; 204 | text-decoration: underline; 205 | } 206 | 207 | .nav-tabs li.active a { 208 | background-color: lightgray; 209 | } 210 | 211 | .nav-tabs li a { 212 | background-color: #eeeeee; 213 | } 214 | 215 | .nav-tabs li a:hover { 216 | background-color: #eeeeee; 217 | text-decoration: underline; 218 | } 219 | 220 | .nav-tabs li a:focus { 221 | background-color: #eeeeee; 222 | text-decoration: underline; 223 | } 224 | 225 | .download-list { 226 | margin-bottom: 0px; 227 | } 228 | 229 | #incorperrorlock { 230 | padding: 0 10px 0 0; 231 | margin: 0; 232 | } 233 | 234 | .rightMenu { 235 | position: absolute; 236 | float: right; 237 | top: 0px; 238 | left: 180px; 239 | } 240 | 241 | .right { 242 | float: right; 243 | } 244 | 245 | #dLabel { 246 | width: 180px; 247 | } 248 | 249 | #reconciledBundledLabel { 250 | width: 180px; 251 | } 252 | 253 | #referenceDownloadLabel { 254 | width: 180px; 255 | } 256 | 257 | #ccdafiletreepanel { 258 | background: #ffffff; 259 | height: 150px; 260 | } 261 | 262 | #reconciledBundleFileTreePanel { 263 | background: #ffffff; 264 | height: 150px; 265 | } 266 | 267 | #referenceDownloadFileTreePanel { 268 | background: #ffffff; 269 | height: 150px; 270 | } 271 | 272 | #incorpFormWrapper { 273 | /*height:240px*/ 274 | 275 | } 276 | 277 | .well .panel { 278 | border: 0px; 279 | } 280 | 281 | .well .panel+.panel { 282 | margin-top: 0px; 283 | } 284 | 285 | .panel-group.well { 286 | margin: 0px; 287 | padding: 0px; 288 | } 289 | 290 | div#collapseSampleDownloads .panel-body .list-group-item { 291 | border-radius: 0px; 292 | } 293 | 294 | div#collapseSampleDownloads .panel-body { 295 | padding: 0px; 296 | } 297 | 298 | div#collapseNegativeTesting .panel-body .list-group-item { 299 | border-radius: 0px; 300 | } 301 | 302 | div#collapseNegativeTesting .panel-body { 303 | padding: 0px; 304 | } 305 | 306 | div#collapseReference .panel-body .list-group-item { 307 | border-radius: 0px; 308 | } 309 | 310 | div#collapseReference .panel-body { 311 | padding: 0px; 312 | } 313 | 314 | .jstree li { 315 | min-width: 360px; 316 | } 317 | 318 | .treeButton { 319 | width: 180px; 320 | } 321 | 322 | .panel { 323 | border: 0; 324 | } 325 | 326 | table tbody{ 327 | font-size: 12px; 328 | word-wrap: break-word; 329 | } 330 | 331 | .resultpopover { 332 | max-width: 500px !important; 333 | padding: 10px !important; 334 | background-color: beige; 335 | left: 800px !important; 336 | } 337 | 338 | .resultPopoverBackground{ 339 | background-color: beige; 340 | } 341 | 342 | .result-title{ 343 | background-color: beige; 344 | font-weight: bold; 345 | } 346 | 347 | div.line:hover{ 348 | box-shadow: 0px 0px 5px #fff; 349 | } 350 | 351 | .syntaxhighlighter div.line.alt2.ccdaErrorHighlight:hover, .syntaxhighlighter div.line.alt1.ccdaErrorHighlight:hover, .syntaxhighlighter div.line.alt2.ccdaErrorHighlight:focus, .syntaxhighlighter div.line.alt1.ccdaErrorHighlight:focus{ 352 | box-shadow: inset 0 0 5px red; 353 | } 354 | 355 | .syntaxhighlighter div.line.alt2.ccdaWarningHighlight:hover, .syntaxhighlighter div.line.alt1.ccdaWarningHighlight:hover, .syntaxhighlighter div.line.alt2.ccdaWarningHighlight:focus, .syntaxhighlighter div.line.alt1.ccdaWarningHighlight:focus { 356 | box-shadow: inset 0 0 5px yellow; 357 | } 358 | 359 | .syntaxhighlighter div.line.alt2.ccdaInfoHighlight:hover, .syntaxhighlighter div.line.alt1.ccdaInfoHighlight:hover, .syntaxhighlighter div.line.alt2.ccdaInfoHighlight:focus, .syntaxhighlighter div.line.alt1.ccdaInfoHighlight:focus { 360 | box-shadow: inset 0 0 5px blue; 361 | } 362 | 363 | .syntaxhighlighter div.line.alt2.ccdaErrorHighlight{ 364 | /* border: 2px solid #ebccd1 !important; */ 365 | background-color: #f2dede !important; 366 | cursor: pointer; 367 | } 368 | 369 | .syntaxhighlighter div.line.alt2.ccdaWarningHighlight{ 370 | /* border: 2px solid #f5e79e !important; */ 371 | background-color: #fcf8e3 !important; 372 | cursor: pointer; 373 | } 374 | 375 | .syntaxhighlighter div.line.alt2.ccdaInfoHighlight{ 376 | /* border: 2px solid #9acfea !important; */ 377 | background-color: #d9edf7 !important; 378 | cursor: pointer; 379 | } 380 | 381 | .syntaxhighlighter div.line.alt1.ccdaErrorHighlight{ 382 | /* border: 2px solid #ebccd1 !important; */ 383 | background-color: #f2dede !important; 384 | cursor: pointer; 385 | } 386 | 387 | .syntaxhighlighter div.line.alt1.ccdaWarningHighlight{ 388 | /* border: 2px solid #f5e79e !important; */ 389 | background-color: #fcf8e3 !important; 390 | cursor: pointer; 391 | } 392 | 393 | .syntaxhighlighter div.line.alt1.ccdaInfoHighlight{ 394 | /* border: 2px solid #9acfea !important; */ 395 | background-color: #d9edf7 !important; 396 | cursor: pointer; 397 | } 398 | 399 | .syntaxhighlighter .code .container:before { 400 | display: block; 401 | } 402 | 403 | .syntaxhighlighter { 404 | overflow-y: hidden !important; 405 | } 406 | 407 | .label-as-badge { 408 | border-radius: 1em; 409 | float: right; 410 | font-size: 100%; 411 | } -------------------------------------------------------------------------------- /src/main/webapp/static/css/shCore.css: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | .syntaxhighlighter a, 18 | .syntaxhighlighter div, 19 | .syntaxhighlighter code, 20 | .syntaxhighlighter table, 21 | .syntaxhighlighter table td, 22 | .syntaxhighlighter table tr, 23 | .syntaxhighlighter table tbody, 24 | .syntaxhighlighter table thead, 25 | .syntaxhighlighter table caption, 26 | .syntaxhighlighter textarea { 27 | -moz-border-radius: 0 0 0 0 !important; 28 | -webkit-border-radius: 0 0 0 0 !important; 29 | background: none !important; 30 | border: 0 !important; 31 | bottom: auto !important; 32 | float: none !important; 33 | height: auto !important; 34 | left: auto !important; 35 | line-height: 1.1em !important; 36 | margin: 0 !important; 37 | outline: 0 !important; 38 | overflow: visible !important; 39 | padding: 0 !important; 40 | position: static !important; 41 | right: auto !important; 42 | text-align: left !important; 43 | top: auto !important; 44 | vertical-align: baseline !important; 45 | width: auto !important; 46 | box-sizing: content-box !important; 47 | font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; 48 | font-weight: normal !important; 49 | font-style: normal !important; 50 | font-size: 1em !important; 51 | min-height: inherit !important; 52 | min-height: auto !important; 53 | } 54 | 55 | .syntaxhighlighter { 56 | width: 100% !important; 57 | margin: 1em 0 1em 0 !important; 58 | position: relative !important; 59 | overflow: auto !important; 60 | font-size: 1em !important; 61 | } 62 | .syntaxhighlighter.source { 63 | overflow: hidden !important; 64 | } 65 | .syntaxhighlighter .bold { 66 | font-weight: bold !important; 67 | } 68 | .syntaxhighlighter .italic { 69 | font-style: italic !important; 70 | } 71 | .syntaxhighlighter .line { 72 | white-space: pre !important; 73 | } 74 | .syntaxhighlighter table { 75 | width: 100% !important; 76 | } 77 | .syntaxhighlighter table caption { 78 | text-align: left !important; 79 | padding: .5em 0 0.5em 1em !important; 80 | } 81 | .syntaxhighlighter table td.code { 82 | width: 100% !important; 83 | } 84 | .syntaxhighlighter table td.code .container { 85 | position: relative !important; 86 | } 87 | .syntaxhighlighter table td.code .container textarea { 88 | box-sizing: border-box !important; 89 | position: absolute !important; 90 | left: 0 !important; 91 | top: 0 !important; 92 | width: 100% !important; 93 | height: 100% !important; 94 | border: none !important; 95 | background: white !important; 96 | padding-left: 1em !important; 97 | overflow: hidden !important; 98 | white-space: pre !important; 99 | } 100 | .syntaxhighlighter table td.gutter .line { 101 | text-align: right !important; 102 | padding: 0 0.5em 0 1em !important; 103 | } 104 | .syntaxhighlighter table td.code .line { 105 | padding: 0 1em !important; 106 | } 107 | .syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { 108 | padding-left: 0em !important; 109 | } 110 | .syntaxhighlighter.show { 111 | display: block !important; 112 | } 113 | .syntaxhighlighter.collapsed table { 114 | display: none !important; 115 | } 116 | .syntaxhighlighter.collapsed .toolbar { 117 | padding: 0.1em 0.8em 0em 0.8em !important; 118 | font-size: 1em !important; 119 | position: static !important; 120 | width: auto !important; 121 | height: auto !important; 122 | } 123 | .syntaxhighlighter.collapsed .toolbar span { 124 | display: inline !important; 125 | margin-right: 1em !important; 126 | } 127 | .syntaxhighlighter.collapsed .toolbar span a { 128 | padding: 0 !important; 129 | display: none !important; 130 | } 131 | .syntaxhighlighter.collapsed .toolbar span a.expandSource { 132 | display: inline !important; 133 | } 134 | .syntaxhighlighter .toolbar { 135 | position: absolute !important; 136 | right: 1px !important; 137 | top: 1px !important; 138 | width: 11px !important; 139 | height: 11px !important; 140 | font-size: 10px !important; 141 | z-index: 10 !important; 142 | } 143 | .syntaxhighlighter .toolbar span.title { 144 | display: inline !important; 145 | } 146 | .syntaxhighlighter .toolbar a { 147 | display: block !important; 148 | text-align: center !important; 149 | text-decoration: none !important; 150 | padding-top: 1px !important; 151 | } 152 | .syntaxhighlighter .toolbar a.expandSource { 153 | display: none !important; 154 | } 155 | .syntaxhighlighter.ie { 156 | font-size: .9em !important; 157 | padding: 1px 0 1px 0 !important; 158 | } 159 | .syntaxhighlighter.ie .toolbar { 160 | line-height: 8px !important; 161 | } 162 | .syntaxhighlighter.ie .toolbar a { 163 | padding-top: 0px !important; 164 | } 165 | .syntaxhighlighter.printing .line.alt1 .content, 166 | .syntaxhighlighter.printing .line.alt2 .content, 167 | .syntaxhighlighter.printing .line.highlighted .number, 168 | .syntaxhighlighter.printing .line.highlighted.alt1 .content, 169 | .syntaxhighlighter.printing .line.highlighted.alt2 .content { 170 | background: none !important; 171 | } 172 | .syntaxhighlighter.printing .line .number { 173 | color: #bbbbbb !important; 174 | } 175 | .syntaxhighlighter.printing .line .content { 176 | color: black !important; 177 | } 178 | .syntaxhighlighter.printing .toolbar { 179 | display: none !important; 180 | } 181 | .syntaxhighlighter.printing a { 182 | text-decoration: none !important; 183 | } 184 | .syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { 185 | color: black !important; 186 | } 187 | .syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { 188 | color: #008200 !important; 189 | } 190 | .syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { 191 | color: blue !important; 192 | } 193 | .syntaxhighlighter.printing .keyword { 194 | color: #006699 !important; 195 | font-weight: bold !important; 196 | } 197 | .syntaxhighlighter.printing .preprocessor { 198 | color: gray !important; 199 | } 200 | .syntaxhighlighter.printing .variable { 201 | color: #aa7700 !important; 202 | } 203 | .syntaxhighlighter.printing .value { 204 | color: #009900 !important; 205 | } 206 | .syntaxhighlighter.printing .functions { 207 | color: #ff1493 !important; 208 | } 209 | .syntaxhighlighter.printing .constants { 210 | color: #0066cc !important; 211 | } 212 | .syntaxhighlighter.printing .script { 213 | font-weight: bold !important; 214 | } 215 | .syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { 216 | color: gray !important; 217 | } 218 | .syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { 219 | color: #ff1493 !important; 220 | } 221 | .syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { 222 | color: red !important; 223 | } 224 | .syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { 225 | color: black !important; 226 | } 227 | -------------------------------------------------------------------------------- /src/main/webapp/static/css/shThemeDefault.css: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | .syntaxhighlighter { 18 | background-color: white !important; 19 | } 20 | .syntaxhighlighter .line.alt1 { 21 | background-color: white !important; 22 | } 23 | .syntaxhighlighter .line.alt2 { 24 | background-color: white !important; 25 | } 26 | .syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { 27 | background-color: #e0e0e0 !important; 28 | } 29 | .syntaxhighlighter .line.highlighted.number { 30 | color: black !important; 31 | } 32 | .syntaxhighlighter table caption { 33 | color: black !important; 34 | } 35 | .syntaxhighlighter .gutter { 36 | color: #afafaf !important; 37 | } 38 | .syntaxhighlighter .gutter .line { 39 | border-right: 3px solid #6ce26c !important; 40 | } 41 | .syntaxhighlighter .gutter .line.highlighted { 42 | background-color: #6ce26c !important; 43 | color: white !important; 44 | } 45 | .syntaxhighlighter.printing .line .content { 46 | border: none !important; 47 | } 48 | .syntaxhighlighter.collapsed { 49 | overflow: visible !important; 50 | } 51 | .syntaxhighlighter.collapsed .toolbar { 52 | color: blue !important; 53 | background: white !important; 54 | border: 1px solid #6ce26c !important; 55 | } 56 | .syntaxhighlighter.collapsed .toolbar a { 57 | color: blue !important; 58 | } 59 | .syntaxhighlighter.collapsed .toolbar a:hover { 60 | color: red !important; 61 | } 62 | .syntaxhighlighter .toolbar { 63 | color: white !important; 64 | background: #6ce26c !important; 65 | border: none !important; 66 | } 67 | .syntaxhighlighter .toolbar a { 68 | color: white !important; 69 | } 70 | .syntaxhighlighter .toolbar a:hover { 71 | color: black !important; 72 | } 73 | .syntaxhighlighter .plain, .syntaxhighlighter .plain a { 74 | color: black !important; 75 | } 76 | .syntaxhighlighter .comments, .syntaxhighlighter .comments a { 77 | color: #008200 !important; 78 | } 79 | .syntaxhighlighter .string, .syntaxhighlighter .string a { 80 | color: blue !important; 81 | } 82 | .syntaxhighlighter .keyword { 83 | color: #006699 !important; 84 | } 85 | .syntaxhighlighter .preprocessor { 86 | color: gray !important; 87 | } 88 | .syntaxhighlighter .variable { 89 | color: #aa7700 !important; 90 | } 91 | .syntaxhighlighter .value { 92 | color: #009900 !important; 93 | } 94 | .syntaxhighlighter .functions { 95 | color: #ff1493 !important; 96 | } 97 | .syntaxhighlighter .constants { 98 | color: #0066cc !important; 99 | } 100 | .syntaxhighlighter .script { 101 | font-weight: bold !important; 102 | color: #006699 !important; 103 | background-color: none !important; 104 | } 105 | .syntaxhighlighter .color1, .syntaxhighlighter .color1 a { 106 | color: gray !important; 107 | } 108 | .syntaxhighlighter .color2, .syntaxhighlighter .color2 a { 109 | color: #ff1493 !important; 110 | } 111 | .syntaxhighlighter .color3, .syntaxhighlighter .color3 a { 112 | color: red !important; 113 | } 114 | 115 | .syntaxhighlighter .keyword { 116 | font-weight: bold !important; 117 | } 118 | -------------------------------------------------------------------------------- /src/main/webapp/static/js/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var app = angular.module('referenceValidator', ['ui.bootstrap', 'ngFileUpload', 'blockUI']).config(function(blockUIConfig){ 3 | blockUIConfig.message = 'Validating ...'; 4 | }); -------------------------------------------------------------------------------- /src/main/webapp/static/js/validator_service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Brian on 8/29/2016. 3 | */ 4 | 'use strict'; 5 | angular.module('referenceValidator').factory('ValidatorService', ['$http', '$q', function($http, $q){ 6 | 7 | var factory = { 8 | }; 9 | return factory; 10 | 11 | function senderRecieverValidationObjectives(){ 12 | return $http.get('senderreceivervalidationobjectivesandreferencefiles').data; 13 | } 14 | }]); -------------------------------------------------------------------------------- /src/main/webapp/static/js/vendor/angular-block-ui.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | angular-block-ui v0.2.1 3 | (c) 2015 (null) McNull https://github.com/McNull/angular-block-ui 4 | License: MIT 5 | */ 6 | !function(t){function e(e){try{t.module(e)}catch(n){return!1}return!0}function n(t,n,o){function r(){t.$on("$locationChangeStart",function(t){n.$_blockLocationChange&&n.state().blockCount>0&&t.preventDefault()}),t.$on("$locationChangeSuccess",function(){n.$_blockLocationChange=o.blockBrowserNavigation})}if(o.blockBrowserNavigation)if(e("ngRoute"))var c=t.$on("$viewContentLoaded",function(){c(),r()});else r()}var o=t.module("blockUI",[]);o.config(["$provide","$httpProvider",function(t,e){t.decorator("$exceptionHandler",["$delegate","$injector",function(t,e){var n,o;return function(r,c){if(o=o||e.get("blockUIConfig"),o.resetOnException)try{n=n||e.get("blockUI"),n.instances.reset()}catch(i){console.log("$exceptionHandler",r)}t(r,c)}}]),e.interceptors.push("blockUIHttpInterceptor")}]),o.run(["$document","blockUIConfig","$templateCache",function(t,e,n){e.autoInjectBodyBlock&&t.find("body").attr("block-ui","main"),e.template&&(e.templateUrl="$$block-ui-template$$",n.put(e.templateUrl,e.template))}]),o.config(["$provide",function(t){t.decorator("$location",r)}]);var r=["$delegate","blockUI","blockUIConfig",function(e,n,o){function r(t){var o=e[t];e[t]=function(){var t=o.apply(e,arguments);return t===e&&(n.$_blockLocationChange=!1),t}}if(o.blockBrowserNavigation){n.$_blockLocationChange=!0;var c=["url","path","search","hash","state"];t.forEach(c,r)}return e}];o.directive("blockUiContainer",["blockUIConfig","blockUiContainerLinkFn",function(t,e){return{scope:!0,restrict:"A",templateUrl:t.templateUrl,compile:function(){return e}}}]).factory("blockUiContainerLinkFn",["blockUI","blockUIUtils",function(){return function(t,e){var n=e.inheritedData("block-ui");if(!n)throw new Error("No parent block-ui service instance located.");t.state=n.state()}}]),o.directive("blockUi",["blockUiCompileFn",function(t){return{scope:!0,restrict:"A",compile:t}}]).factory("blockUiCompileFn",["blockUiPreLinkFn",function(t){return function(e){return e.append('
'),{pre:t}}}]).factory("blockUiPreLinkFn",["blockUI","blockUIUtils","blockUIConfig",function(t,e,o){return function(r,c,i){c.hasClass("block-ui")||c.addClass(o.cssClass),i.$observe("blockUiMessageClass",function(t){r.$_blockUiMessageClass=t});var a=i.blockUi||"_"+r.$id,l=t.instances.get(a);if("main"===a)n(r,l,o);else{var s=c.inheritedData("block-ui");s&&(l._parent=s)}r.$on("$destroy",function(){l.release()}),l.addRef(),r.$_blockUiState=l.state(),r.$watch("$_blockUiState.blocking",function(t){c.attr("aria-busy",!!t),c.toggleClass("block-ui-visible",!!t)}),r.$watch("$_blockUiState.blockCount > 0",function(t){c.toggleClass("block-ui-active",!!t)});var u=i.blockUiPattern;if(u){var f=e.buildRegExp(u);l.pattern(f)}c.data("block-ui",l)}}]),o.constant("blockUIConfig",{templateUrl:"angular-block-ui/angular-block-ui.ng.html",delay:250,message:"Loading ...",autoBlock:!0,resetOnException:!0,requestFilter:t.noop,autoInjectBodyBlock:!0,cssClass:"block-ui block-ui-anim-fade",blockBrowserNavigation:!1}),o.factory("blockUIHttpInterceptor",["$q","$injector","blockUIConfig","$templateCache",function(t,e,n,o){function r(){a=a||e.get("blockUI")}function c(t){n.autoBlock&&t&&!t.$_noBlock&&t.$_blocks&&(r(),t.$_blocks.stop())}function i(e){try{c(e.config)}catch(n){console.log("httpRequestError",n)}return t.reject(e)}var a;return{request:function(t){if(n.autoBlock&&("GET"!=t.method||!o.get(t.url))){var e=n.requestFilter(t);e===!1?t.$_noBlock=!0:(r(),t.$_blocks=a.instances.locate(t),t.$_blocks.start(e))}return t},requestError:i,response:function(t){return t&&c(t.config),t},responseError:i}}]),o.factory("blockUI",["blockUIConfig","$timeout","blockUIUtils","$document",function(e,n,o,r){function c(c){var l,u=this,f={id:c,blockCount:0,message:e.message,blocking:!1},k=[];this._id=c,this._refs=0,this.start=function(c){function s(){l=null,f.blocking=!0}c=c||{},t.isString(c)?c={message:c}:t.forEach(a,function(t){if(c[t])throw new Error("The property "+t+" is reserved for the block state.")}),t.extend(f,c),f.message=f.blockCount>0?c.message||f.message||e.message:c.message||e.message,f.blockCount++;var k=t.element(r[0].activeElement);k.length&&o.isElementInBlockScope(k,u)&&(u._restoreFocus=k[0],n(function(){u._restoreFocus&&u._restoreFocus!==i[0]&&u._restoreFocus.blur()})),l||0===e.delay?0===e.delay&&s():l=n(s,e.delay)},this._cancelStartTimeout=function(){l&&(n.cancel(l),l=null)},this.stop=function(){f.blockCount=Math.max(0,--f.blockCount),0===f.blockCount&&u.reset(!0)},this.isBlocking=function(){return f.blocking},this.message=function(t){f.message=t},this.pattern=function(t){return void 0!==t&&(u._pattern=t),u._pattern},this.reset=function(e){if(u._cancelStartTimeout(),f.blockCount=0,f.blocking=!1,u._restoreFocus&&(!r[0].activeElement||r[0].activeElement===i[0])){try{u._restoreFocus.focus()}catch(o){!function(){var t=u._restoreFocus;n(function(){if(t)try{t.focus()}catch(e){}},100)}()}u._restoreFocus=null}try{e&&t.forEach(k,function(t){t()})}finally{k.length=0}},this.done=function(t){k.push(t)},this.state=function(){return f},this.addRef=function(){u._refs+=1},this.release=function(){--u._refs<=0&&s.instances._destroy(u)}}var i=r.find("body"),a=["id","blockCount","blocking"],l=[];l.get=function(t){if(!isNaN(t))throw new Error("BlockUI id cannot be a number");var e=l[t];return e||(e=l[t]=new c(t),l.push(e)),e},l._destroy=function(e){if(t.isString(e)&&(e=l[e]),e){e.reset();var n=o.indexOf(l,e);l.splice(n,1),delete l[e.state().id]}},l.locate=function(t){var e=[];o.forEachFnHook(e,"start"),o.forEachFnHook(e,"stop");for(var n=l.length;n--;){var r=l[n],c=r._pattern;c&&c.test(t.url)&&e.push(r)}return 0===e.length&&e.push(s),e},o.forEachFnHook(l,"reset");var s=l.get("main");return s.addRef(),s.instances=l,s}]),o.factory("blockUIUtils",function(){var e=t.element,n={buildRegExp:function(t){var e,n=t.match(/^\/(.*)\/([gim]*)$/);if(!n)throw Error("Incorrect regular expression format: "+t);return e=new RegExp(n[1],n[2])},forEachFn:function(t,e,n){for(var o=t.length;o--;){var r=t[o];r[e].apply(r,n)}},forEachFnHook:function(t,e){t[e]=function(){n.forEachFn(this,e,arguments)}},isElementInBlockScope:function(t,e){for(var n=t.inheritedData("block-ui");n;){if(n===e)return!0;n=n._parent}return!1},findElement:function(t,o,r){var c=null;if(o(t))c=t;else{var i;i=r?t.parent():t.children();for(var a=i.length;!c&&a--;)c=n.findElement(e(i[a]),o,r)}return c},indexOf:function(t,e,n){for(var o=n||0,r=t.length;r>o;o++)if(t[o]===e)return o;return-1}};return n}),t.module("blockUI").run(["$templateCache",function(t){t.put("angular-block-ui/angular-block-ui.ng.html",'
{{ state.message }}
')}])}(angular); 7 | //# sourceMappingURL=angular-block-ui.min.js.map -------------------------------------------------------------------------------- /src/main/webapp/static/js/vendor/ng-file-upload-shim.min.js: -------------------------------------------------------------------------------- 1 | /*! 12.2.5 */ 2 | !function(){function a(a,b){window.XMLHttpRequest.prototype[a]=b(window.XMLHttpRequest.prototype[a])}function b(a,b,c){try{Object.defineProperty(a,b,{get:c})}catch(d){}}if(window.FileAPI||(window.FileAPI={}),!window.XMLHttpRequest)throw"AJAX is not supported. XMLHttpRequest is not defined.";if(FileAPI.shouldLoad=!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){var c=function(a){if(!a.__listeners){a.upload||(a.upload={}),a.__listeners=[];var b=a.upload.addEventListener;a.upload.addEventListener=function(c,d){a.__listeners[c]=d,b&&b.apply(this,arguments)}}};a("open",function(a){return function(b,d,e){c(this),this.__url=d;try{a.apply(this,[b,d,e])}catch(f){f.message.indexOf("Access is denied")>-1&&(this.__origError=f,a.apply(this,[b,"_fix_for_ie_crossdomain__",e]))}}}),a("getResponseHeader",function(a){return function(b){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(b):null==a?null:a.apply(this,[b])}}),a("getAllResponseHeaders",function(a){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==a?null:a.apply(this)}}),a("abort",function(a){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==a?null:a.apply(this)}}),a("setRequestHeader",function(a){return function(b,d){if("__setXHR_"===b){c(this);var e=d(this);e instanceof Function&&e(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[b]=d,a.apply(this,arguments)}}),a("send",function(a){return function(){var c=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var d=arguments[0],e={url:c.__url,jsonp:!1,cache:!0,complete:function(a,d){a&&angular.isString(a)&&-1!==a.indexOf("#2174")&&(a=null),c.__completed=!0,!a&&c.__listeners.load&&c.__listeners.load({type:"load",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),!a&&c.__listeners.loadend&&c.__listeners.loadend({type:"loadend",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),"abort"===a&&c.__listeners.abort&&c.__listeners.abort({type:"abort",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),void 0!==d.status&&b(c,"status",function(){return 0===d.status&&a&&"abort"!==a?500:d.status}),void 0!==d.statusText&&b(c,"statusText",function(){return d.statusText}),b(c,"readyState",function(){return 4}),void 0!==d.response&&b(c,"response",function(){return d.response});var e=d.responseText||(a&&0===d.status&&"abort"!==a?a:void 0);b(c,"responseText",function(){return e}),b(c,"response",function(){return e}),a&&b(c,"err",function(){return a}),c.__fileApiXHR=d,c.onreadystatechange&&c.onreadystatechange(),c.onload&&c.onload()},progress:function(a){if(a.target=c,c.__listeners.progress&&c.__listeners.progress(a),c.__total=a.total,c.__loaded=a.loaded,a.total===a.loaded){var b=this;setTimeout(function(){c.__completed||(c.getAllResponseHeaders=function(){},b.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:c.__requestHeaders};e.data={},e.files={};for(var f=0;f-1){e=h.substring(0,g+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=e),i.setAttribute("src",d||e+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(i)}FileAPI.ngfFixIE=function(d,e,f){if(!b())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var g=function(){var b=e.parent();d.attr("disabled")?b&&b.removeClass("js-fileapi-wrapper"):(e.attr("__ngf_flash_")||(e.unbind("change"),e.unbind("click"),e.bind("change",function(a){h.apply(this,[a]),f.apply(this,[a])}),e.attr("__ngf_flash_","true")),b.addClass("js-fileapi-wrapper"),a(d)||(b.css("position","absolute").css("top",c(d[0]).top+"px").css("left",c(d[0]).left+"px").css("width",d[0].offsetWidth+"px").css("height",d[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",d.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),e.css("width",d[0].offsetWidth+"px").css("height",d[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))};d.bind("mouseenter",g);var h=function(a){for(var b=FileAPI.getFiles(a),c=0;c[:\\w-\\.]+)', 'xg').exec(code), 29 | result = [] 30 | ; 31 | 32 | if (match.attributes != null) 33 | { 34 | var attributes, 35 | regex = new XRegExp('(? [\\w:\\-\\.]+)' + 36 | '\\s*=\\s*' + 37 | '(? ".*?"|\'.*?\'|\\w+)', 38 | 'xg'); 39 | 40 | while ((attributes = regex.exec(code)) != null) 41 | { 42 | result.push(new constructor(attributes.name, match.index + attributes.index, 'color1')); 43 | result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string')); 44 | } 45 | } 46 | 47 | if (tag != null) 48 | result.push( 49 | new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword') 50 | ); 51 | 52 | return result; 53 | } 54 | 55 | this.regexList = [ 56 | { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // 57 | { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // 58 | { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process } 59 | ]; 60 | }; 61 | 62 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 63 | Brush.aliases = ['xml', 'xhtml', 'xslt', 'html']; 64 | 65 | SyntaxHighlighter.brushes.Xml = Brush; 66 | 67 | // CommonJS 68 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 69 | })(); 70 | -------------------------------------------------------------------------------- /src/main/webapp/static/validationui.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | Reference C-CDA Validator 14 | 15 | 16 |
17 |
19 |
    20 |
  1. Select Certification Criteria Version 21 |
    22 | 27 |
    28 |
  2. 29 |
  3. Select whether your system is a Sender of C-CDA's or 30 | Receiver of C-CDA's. 31 |
    32 | 34 | 36 |
    37 |
  4. 38 |
  5. Select ONC 2015 Edition S&CC objective or other C-CDA IG 39 | conformance criteria from the list below. 40 |
    41 | 46 |
    47 |
  6. 48 |
  7. Select the scenario file that you used to generate the 49 | C-CDA, if you are testing a C-CDA generated without using any of 50 | the scenario files in the drop down, select "No scenario File". 51 |
    52 | 57 |
    58 |
  8. 59 |
  9. Select a severity level. Selecting 'INFO' processes all 60 | available result types (info, errors, and warnings). Selecting 61 | 'WARNING' processes info and warnings only. Selecting 'ERROR' 62 | processes errors only and is the most performant (runs the fastest) 63 | but provides the lowest level of detail. Selecting 'INFO' is the 64 | least performant (runs the slowest) but provides the highest level 65 | of detail and is the default option. 66 |
    67 | 72 |
    73 |
  10. 74 |
  11. Upload generated C-CDA file to validate. 75 |
    Select
    77 |
  12. 78 |
  13. Validate {{validationModel.file.name}} 79 |
    80 | 83 |
    84 | 85 |
  14. 86 |
87 |
88 | 89 | 90 | 119 |
120 | 121 | 124 | 126 | 128 | 130 | 132 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /src/test/java/org/sitenv/referenceccda/test/other/ReferenceValidationLogger.java: -------------------------------------------------------------------------------- 1 | package org.sitenv.referenceccda.test.other; 2 | 3 | import java.util.List; 4 | 5 | import org.sitenv.referenceccda.validators.RefCCDAValidationResult; 6 | import org.sitenv.vocabularies.test.other.ValidationLogger; 7 | 8 | public class ReferenceValidationLogger extends ValidationLogger { 9 | 10 | public static void printResults(List results) { 11 | printResults(results, true, true, true); 12 | } 13 | 14 | public static void printResults(List results, 15 | boolean showSchema, boolean showType, boolean showIgOrMuType) { 16 | if (logResults) { 17 | if (!results.isEmpty()) { 18 | for (RefCCDAValidationResult result : results) { 19 | printResults(result, showSchema, showType, showIgOrMuType); 20 | } 21 | println(); 22 | } else { 23 | println("There are no results to print as the list is empty."); 24 | } 25 | } 26 | } 27 | 28 | public static void printResults(RefCCDAValidationResult result) { 29 | printResults(result, true, true, true); 30 | } 31 | 32 | public static void printResults(RefCCDAValidationResult result, 33 | boolean showSchema, boolean showType, boolean showIgOrMuOrDS4PType) { 34 | if (logResults) { 35 | println("Description : " + result.getDescription()); 36 | if(showType) { 37 | println("Type : " + result.getType()); 38 | } 39 | if(showSchema) { 40 | println("result.isSchemaError() : " + result.isSchemaError()); 41 | println("result.isDataTypeSchemaError() : " + result.isDataTypeSchemaError()); 42 | } 43 | if(showIgOrMuOrDS4PType) { 44 | println("result.isIGIssue() : " + result.isIGIssue()); 45 | println("result.isMUIssue() : " + result.isMUIssue()); 46 | println("result.isDS4PIssue() : " + result.isDS4PIssue()); 47 | } 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/test/resources/MedicationSectionCodeInvalid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 10 | 11 | 16 |
17 |
18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /src/test/resources/ReferralNote.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/resources/ReferralNote2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | PERSON NAME HERE 13 | 14 | 15 | 16 | 17 | 18 | 19 | familynamegiven 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/Sample_basicHTML.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Not a C-CDA

6 |

Nothin here...

7 | 8 | 9 | -------------------------------------------------------------------------------- /src/test/resources/Sample_blank_Empty_Document.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onc-healthit/reference-ccda-validator/409a05fbf045857f1125f4fb64d6f484e6c908bc/src/test/resources/Sample_blank_Empty_Document.xml -------------------------------------------------------------------------------- /src/test/resources/Sample_invalid-SnippetOnly.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | Results CO2 Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
ResultValueUnitsRangeDateInterpretation
CO227mmol/L23-29 mmol/L8/15/2012Normal
31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 61 | 62 | 63 | 64 | 67 | 23-29 mmol/L 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
81 |
82 | 83 | -------------------------------------------------------------------------------- /src/test/resources/ccdaReferenceValidatorConfigTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ClassCodeValidator 7 | 8 | SHALL 9 | 10 | 2.16.840.1.113883.11.20.9.33 11 | 12 | 13 | 14 | 15 | 16 | 17 | CodeSystemCodeValidator 18 | 19 | SHALL 20 | 21 | SNOMED-CT 22 | 23 | 24 | 25 | 26 | 37 | 38 | 39 | 50 | 51 | 52 | 53 | 54 | NodeCodeSystemMatchesConfiguredCodeSystemValidator 55 | 56 | SHALL 57 | 58 | codeSystem 59 | 2.16.840.1.113883.5.111 60 | 61 | 62 | 63 | 64 | 65 | 66 | RequiredNodeValidator 67 | 68 | SHALL 69 | 70 | 71 | @unit 72 | 73 | If Observation/value is a physical quantity (xsi:type="PQ"), the unit of measure SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive 2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1198-31484). 74 | 75 | 76 | 77 | 78 | 79 | 80 | TextNodeValidator 81 | 82 | SHALL 83 | 84 | 2.16.840.1.113883.3.88.12.80.63 85 | 86 | 87 | 88 | 89 | 100 | 101 | 102 | 113 | 114 | 115 | 126 | 127 | 128 | 129 | 130 | NodeCodeSystemMatchesConfiguredCodeSystemValidator 131 | codeSystem 132 | 2.16.840.1.113883.6.1 133 | 134 | 135 | 136 | 137 | 138 | 139 | NodeCodeSystemMatchesConfiguredCodeSystemValidator 140 | codeSystem 141 | 2.16.840.1.113883.6.1 142 | 143 | 144 | 145 | 146 | 147 | RequiredNodeValidator 148 | 149 | SHOULD 150 | 151 | v3:prefix 152 | informant/relatedEntity/relatedPerson/name SHOULD contain a prefix element (not a real rule - just a test) 153 | 154 | 155 | 156 | 157 | 158 | RequiredNodeValidator 159 | 160 | MAY 161 | 162 | v3:prefix 163 | informant/relatedEntity/relatedPerson/name MAY contain a prefix element (not a real rule - just a test) 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | ${REF_LOG}.${timestamp}.log 12 | 13 | 14 | ${REF_LOG}.-%d{yyyy-MM-dd}%i.log 15 | 16 | 100MB 17 | 18 | 19 | 20 | 21 | %d %p %c{1.} [%t] %m%n 22 | 23 | 24 | 25 | 26 | ${CONTENT_LOG}.${timestamp}.log 27 | 28 | 29 | ${CONTENT_LOG}.-%d{yyyy-MM-dd}%i.log 30 | 31 | 100MB 32 | 33 | 34 | 35 | 36 | %d %p %c{1.} [%t] %m%n 37 | 38 | 39 | 40 | 41 | ${CODE_LOG}.${timestamp}.log 42 | 43 | 44 | ${CODE_LOG}.-%d{yyyy-MM-dd}%i.log 45 | 46 | 100MB 47 | 48 | 49 | 50 | 51 | %d %p %c{1.} [%t] %m%n 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 512 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /src/test/resources/maritalstatus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/test/resources/maritalstatus2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/severityLevelLimitTestConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RequiredNodeValidator 6 | 7 | MAY 8 | 9 | v3:prefix 10 | informant/relatedEntity/relatedPerson/name MAY contain a prefix element (not a real rule - just a test) 11 | 12 | 13 | RequiredNodeValidator 14 | 15 | MAY 16 | 17 | v3:prefix 18 | informant/relatedEntity/relatedPerson/name MAY contain a prefix element (not a real rule - just a test) 19 | 20 | 21 | RequiredNodeValidator 22 | 23 | MAY 24 | 25 | v3:prefix 26 | informant/relatedEntity/relatedPerson/name MAY contain a prefix element (not a real rule - just a test) 27 | 28 | 29 | 30 | 31 | 32 | RequiredNodeValidator 33 | 34 | SHOULD 35 | 36 | v3:prefix 37 | informant/relatedEntity/relatedPerson/name SHOULD contain a prefix element (not a real rule - just a test) 38 | 39 | 40 | RequiredNodeValidator 41 | 42 | SHOULD 43 | 44 | v3:prefix 45 | informant/relatedEntity/relatedPerson/name SHOULD contain a prefix element (not a real rule - just a test) 46 | 47 | 48 | RequiredNodeValidator 49 | 50 | SHOULD 51 | 52 | v3:prefix 53 | informant/relatedEntity/relatedPerson/name SHOULD contain a prefix element (not a real rule - just a test) 54 | 55 | 56 | 57 | 58 | 59 | RequiredNodeValidator 60 | 61 | SHALL 62 | 63 | v3:prefix 64 | informant/relatedEntity/relatedPerson/name SHALL contain a prefix element (not a real rule - just a test) 65 | 66 | 67 | RequiredNodeValidator 68 | 69 | SHALL 70 | 71 | v3:prefix 72 | informant/relatedEntity/relatedPerson/name SHALL contain a prefix element (not a real rule - just a test) 73 | 74 | 75 | RequiredNodeValidator 76 | 77 | SHALL 78 | 79 | v3:prefix 80 | informant/relatedEntity/relatedPerson/name SHALL contain a prefix element (not a real rule - just a test) 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/test/resources/vocabAndMdhtSeverityLevelErrorFileBasedConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RequiredNodeValidator 6 | 7 | MAY 8 | 9 | v3:prefix 10 | informant/relatedEntity/relatedPerson/name MAY contain a prefix element (not a real rule - just a test) 11 | 12 | 13 | 14 | 15 | 16 | RequiredNodeValidator 17 | 18 | SHOULD 19 | 20 | v3:prefix 21 | informant/relatedEntity/relatedPerson/name SHOULD contain a prefix element (not a real rule - just a test) 22 | 23 | 24 | 25 | 26 | 27 | RequiredNodeValidator 28 | 29 | SHALL 30 | 31 | v3:prefix 32 | informant/relatedEntity/relatedPerson/name SHALL contain a prefix element (not a real rule - just a test) 33 | 34 | 35 | 36 | 37 | 38 | RequiredNodeValidator 39 | 40 | MAY 41 | 42 | v3:prefix 43 | informant/relatedEntity/relatedPerson/name MAY contain a prefix element (not a real rule - just a test) 44 | 45 | 46 | 47 | 48 | 49 | RequiredNodeValidator 50 | 51 | SHOULD 52 | 53 | v3:prefix 54 | informant/relatedEntity/relatedPerson/name SHOULD contain a prefix element (not a real rule - just a test) 55 | 56 | 57 | 58 | 59 | 60 | RequiredNodeValidator 61 | 62 | SHALL 63 | 64 | v3:prefix 65 | informant/relatedEntity/relatedPerson/name SHALL contain a prefix element (not a real rule - just a test) 66 | 67 | 68 | 69 | 70 | 71 | RequiredNodeValidator 72 | 73 | MAY 74 | 75 | v3:prefix 76 | informant/relatedEntity/relatedPerson/name MAY contain a prefix element (not a real rule - just a test) 77 | 78 | 79 | 80 | 81 | 82 | RequiredNodeValidator 83 | 84 | SHOULD 85 | 86 | v3:prefix 87 | informant/relatedEntity/relatedPerson/name SHOULD contain a prefix element (not a real rule - just a test) 88 | 89 | 90 | 91 | 92 | 93 | RequiredNodeValidator 94 | 95 | SHALL 96 | 97 | v3:prefix 98 | informant/relatedEntity/relatedPerson/name SHALL contain a prefix element (not a real rule - just a test) 99 | 100 | 101 | 102 | 103 | --------------------------------------------------------------------------------