Skip to content

Commit

Permalink
Merge branch 'release/1.0.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
Plow74 committed Feb 15, 2017
2 parents db24601 + c7c464d commit 3f43ceb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
14 changes: 12 additions & 2 deletions configuration/ccdaReferenceValidatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,16 @@
<!-- PROBLEM STATUS (DEPRICATED) END -->

<!-- PROCEDURE ACTIVITY ACT START -->
<expression xpathExpression="//v3:act/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.12' and @extension='2014-06-09']/ancestor::v3:act[1]/v3:code[@code and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>CodeSystemCodeValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHOULD</codeSeverityLevel>
</validationResultSeverityLevels>
<allowedCodesystemNames>CDT,SNOMED-CT,CPT</allowedCodesystemNames><!-- need to add HCPS -->
</validator>
</expression>

<!--8. MAY contain zero or one [0..1] priorityCode, which SHALL be selected from ValueSet Act Priority urn:oid:2.16.840.1.113883.1.11.16866 DYNAMIC (CONF:1098-8300).-->
<expression xpathExpression="//v3:act/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.12' and @extension='2014-06-09']/ancestor::v3:act[1]/v3:priorityCode[not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
Expand Down Expand Up @@ -1436,7 +1446,7 @@
<validationResultSeverityLevels>
<codeSeverityLevel>SHOULD</codeSeverityLevel>
</validationResultSeverityLevels>
<allowedCodesystemNames>CDT,SNOMED-CT</allowedCodesystemNames><!-- need to add CPT-4 and HCPS -->
<allowedCodesystemNames>CDT,SNOMED-CT,CPT</allowedCodesystemNames><!-- need to add HCPS -->
</validator>
</expression>

Expand Down Expand Up @@ -1559,7 +1569,7 @@
<validationResultSeverityLevels>
<codeSeverityLevel>SHOULD</codeSeverityLevel>
</validationResultSeverityLevels>
<allowedCodesystemNames>LOINC,SNOMED-CT</allowedCodesystemNames>
<allowedCodesystemNames>LOINC,SNOMED-CT,CPT</allowedCodesystemNames>
</validator>
</expression>
<!-- RESULT ORGANIZER END -->
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.sitenv</groupId>
<artifactId>referenceccdavalidator</artifactId>
<version>1.0.11</version>
<version>1.0.12</version>
<packaging>war</packaging>
<name>Reference CCDA Validator</name>

Expand Down Expand Up @@ -126,7 +126,7 @@
<dependency>
<groupId>org.sitenv.vocabulary</groupId>
<artifactId>codevalidator-api</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
</dependency>
<!-- END VOCAB DEPENDENCIES -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import org.sitenv.vocabularies.validation.services.VocabularyValidationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -47,6 +47,11 @@ public List<Code> getByCodeInCodeSystems(@RequestParam(value = "code", required
return vocabularyService.getByCodeInCodesystems(code, Arrays.asList(codeSystems));
}

@RequestMapping(value = "/getbycodeinvaluesetoid", method = RequestMethod.GET)
public List<VsacValueSet> getByCodeInValuesetOid(@RequestParam(value = "code", required = true)String code, @RequestParam(value = "oids", required = true) String[] valuesetOids){
return vocabularyService.getByCodeInValuesetOids(code, Arrays.asList(valuesetOids));
}

@RequestMapping(value = "/iscodeandisplaynameincodesystem", method = RequestMethod.GET)
public boolean isCodeAndDisplayNameFoundInCodeSystems(@RequestParam(value = "code", required = true)String code, @RequestParam(value = "displayName", required = true)String displayName, @RequestParam(value = "codeSystems", required = true) String[] codeSystems){
return vocabularyService.isCodeAndDisplayNameFoundInCodeSystems(code, displayName, Arrays.asList(codeSystems));
Expand All @@ -62,17 +67,6 @@ public boolean isCodeFoundInValuesetOids(@RequestParam(value = "code", required
return vocabularyService.isCodeFoundInValuesetOids(code, Arrays.asList(valuesetOids));
}

@RequestMapping(value = "/downloadreferenceccdaartifact/{artifactType}", method = RequestMethod.GET)
public void downloadReferenceCCDAArtifact(HttpServletResponse httpServletResponse, @PathVariable("artifactType") String artifactType) throws IOException{
File fileToDownload = new File("referenceccdaservice-bundle." + artifactType);
String mimeType = "application/octet-stream";
httpServletResponse.setContentType(mimeType);
httpServletResponse.setHeader("Content-Disposition", String.format("attachment; filename=\"%s\"", fileToDownload.getName()));
httpServletResponse.setContentLength((int)fileToDownload.length());
InputStream inputStream = new BufferedInputStream(new FileInputStream(fileToDownload));
FileCopyUtils.copy(inputStream, httpServletResponse.getOutputStream());
}

@Cacheable("messagetypeValidationObjectivesAndReferenceFilesMap")
@RequestMapping(value = "/senderreceivervalidationobjectivesandreferencefiles", method = RequestMethod.GET)
public Map<String, Map<String, List<String>>> getMapOfSenderAndRecieverValidationObjectivesWithReferenceFiles(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public List<Code> getByCodeInCodesystems(String code, List<String> codeSystems){
return vocabularyCodeService.getByCodeInCodeSystems(code, codeSystems);
}

public List<VsacValueSet> getByCodeInValuesetOids(String code, List<String> valuesetOids){
return vocabularyValuesetService.getValuesetByCodeInValuesetOids(code, new HashSet<>(valuesetOids));
}

public Map<String, Map<String, List<String>>> getMapOfSenderAndRecieverValidationObjectivesWithReferenceFiles(){
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<GithubResponseWrapper> responseEntity = restTemplate.exchange(GITHUB_URL, HttpMethod.GET, null, new ParameterizedTypeReference<GithubResponseWrapper>() {
Expand Down

0 comments on commit 3f43ceb

Please sign in to comment.