A few fixes resulting from the R5 merge
This commit is contained in:
parent
60eab3ad70
commit
b0eb19cf2f
|
@ -1,5 +1,25 @@
|
||||||
package ca.uhn.fhir.util.rdf;
|
package ca.uhn.fhir.util.rdf;
|
||||||
|
|
||||||
|
/*-
|
||||||
|
* #%L
|
||||||
|
* HAPI FHIR - Core Library
|
||||||
|
* %%
|
||||||
|
* Copyright (C) 2014 - 2019 University Health Network
|
||||||
|
* %%
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* #L%
|
||||||
|
*/
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,25 @@
|
||||||
package ca.uhn.fhir.util.rdf;
|
package ca.uhn.fhir.util.rdf;
|
||||||
|
|
||||||
|
/*-
|
||||||
|
* #%L
|
||||||
|
* HAPI FHIR - Core Library
|
||||||
|
* %%
|
||||||
|
* Copyright (C) 2014 - 2019 University Health Network
|
||||||
|
* %%
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* #L%
|
||||||
|
*/
|
||||||
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
|
@ -313,7 +313,7 @@ public class FhirResourceDaoValueSetR5 extends FhirResourceDaoR5<ValueSet> imple
|
||||||
if (myDaoConfig.isPreExpandValueSetsExperimental()) {
|
if (myDaoConfig.isPreExpandValueSetsExperimental()) {
|
||||||
if (retVal.getDeleted() == null) {
|
if (retVal.getDeleted() == null) {
|
||||||
ValueSet valueSet = (ValueSet) theResource;
|
ValueSet valueSet = (ValueSet) theResource;
|
||||||
myHapiTerminologySvc.storeTermValueSetAndChildren(retVal, org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSet));
|
myHapiTerminologySvc.storeTermValueSet(retVal, org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSet));
|
||||||
} else {
|
} else {
|
||||||
myHapiTerminologySvc.deleteValueSetAndChildren(retVal);
|
myHapiTerminologySvc.deleteValueSetAndChildren(retVal);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,10 @@ package ca.uhn.fhir.jpa.term;
|
||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
|
import ca.uhn.fhir.jpa.dao.IFhirResourceDao;
|
||||||
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem;
|
|
||||||
import ca.uhn.fhir.jpa.entity.TermConcept;
|
import ca.uhn.fhir.jpa.entity.TermConcept;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import ca.uhn.fhir.util.CoverageIgnore;
|
import ca.uhn.fhir.util.CoverageIgnore;
|
||||||
import ca.uhn.fhir.util.UrlUtil;
|
import ca.uhn.fhir.util.UrlUtil;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
import org.hl7.fhir.r5.hapi.ctx.IValidationSupport;
|
import org.hl7.fhir.r5.hapi.ctx.IValidationSupport;
|
||||||
|
@ -53,27 +51,19 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||||
public class HapiTerminologySvcR5 extends BaseHapiTerminologySvcImpl implements IValidationSupport, IHapiTerminologySvcR5 {
|
public class HapiTerminologySvcR5 extends BaseHapiTerminologySvcImpl implements IValidationSupport, IHapiTerminologySvcR5 {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@Qualifier("myValueSetDaoR5")
|
@Qualifier("myConceptMapDaoR4")
|
||||||
private IFhirResourceDao<ValueSet> myValueSetResourceDao;
|
|
||||||
@Autowired
|
|
||||||
@Qualifier("myConceptMapDaoR5")
|
|
||||||
private IFhirResourceDao<ConceptMap> myConceptMapResourceDao;
|
private IFhirResourceDao<ConceptMap> myConceptMapResourceDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFhirResourceDaoCodeSystem<CodeSystem, Coding, CodeableConcept> myCodeSystemResourceDao;
|
@Qualifier("myCodeSystemDaoR4")
|
||||||
|
private IFhirResourceDao<CodeSystem> myCodeSystemResourceDao;
|
||||||
|
@Autowired
|
||||||
|
@Qualifier("myValueSetDaoR4")
|
||||||
|
private IFhirResourceDao<ValueSet> myValueSetResourceDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IValidationSupport myValidationSupport;
|
private IValidationSupport myValidationSupport;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IHapiTerminologySvc myTerminologySvc;
|
|
||||||
@Autowired
|
|
||||||
private PlatformTransactionManager myTransactionManager;
|
private PlatformTransactionManager myTransactionManager;
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public HapiTerminologySvcR5() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addAllChildren(String theSystemString, ConceptDefinitionComponent theCode, List<VersionIndependentConcept> theListToPopulate) {
|
private void addAllChildren(String theSystemString, ConceptDefinitionComponent theCode, List<VersionIndependentConcept> theListToPopulate) {
|
||||||
if (isNotBlank(theCode.getCode())) {
|
if (isNotBlank(theCode.getCode())) {
|
||||||
theListToPopulate.add(new VersionIndependentConcept(theSystemString, theCode.getCode()));
|
theListToPopulate.add(new VersionIndependentConcept(theSystemString, theCode.getCode()));
|
||||||
|
@ -99,112 +89,72 @@ public class HapiTerminologySvcR5 extends BaseHapiTerminologySvcImpl implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IIdType createOrUpdateCodeSystem(org.hl7.fhir.r4.model.CodeSystem theCodeSystemResource) {
|
protected IIdType createOrUpdateCodeSystem(org.hl7.fhir.r4.model.CodeSystem theCodeSystemResource) {
|
||||||
CodeSystem resourceToStore;
|
|
||||||
try {
|
|
||||||
resourceToStore = org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem(theCodeSystemResource);
|
|
||||||
} catch (FHIRException e) {
|
|
||||||
throw new InternalErrorException(e);
|
|
||||||
}
|
|
||||||
validateCodeSystemForStorage(theCodeSystemResource);
|
validateCodeSystemForStorage(theCodeSystemResource);
|
||||||
if (isBlank(resourceToStore.getIdElement().getIdPart())) {
|
|
||||||
|
CodeSystem codeSystemR4 = org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem(theCodeSystemResource);
|
||||||
|
if (isBlank(theCodeSystemResource.getIdElement().getIdPart())) {
|
||||||
String matchUrl = "CodeSystem?url=" + UrlUtil.escapeUrlParam(theCodeSystemResource.getUrl());
|
String matchUrl = "CodeSystem?url=" + UrlUtil.escapeUrlParam(theCodeSystemResource.getUrl());
|
||||||
return myCodeSystemResourceDao.update(resourceToStore, matchUrl).getId();
|
return myCodeSystemResourceDao.update(codeSystemR4, matchUrl).getId();
|
||||||
} else {
|
} else {
|
||||||
return myCodeSystemResourceDao.update(resourceToStore).getId();
|
return myCodeSystemResourceDao.update(codeSystemR4).getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createOrUpdateConceptMap(org.hl7.fhir.r4.model.ConceptMap theConceptMap) {
|
protected void createOrUpdateConceptMap(org.hl7.fhir.r4.model.ConceptMap theConceptMap) {
|
||||||
ConceptMap resourceToStore;
|
|
||||||
try {
|
ConceptMap conceptMapR4 = org.hl7.fhir.convertors.conv40_50.ConceptMap.convertConceptMap(theConceptMap);
|
||||||
resourceToStore = org.hl7.fhir.convertors.conv40_50.ConceptMap.convertConceptMap(theConceptMap);
|
|
||||||
} catch (FHIRException e) {
|
if (isBlank(theConceptMap.getIdElement().getIdPart())) {
|
||||||
throw new InternalErrorException(e);
|
|
||||||
}
|
|
||||||
if (isBlank(resourceToStore.getIdElement().getIdPart())) {
|
|
||||||
String matchUrl = "ConceptMap?url=" + UrlUtil.escapeUrlParam(theConceptMap.getUrl());
|
String matchUrl = "ConceptMap?url=" + UrlUtil.escapeUrlParam(theConceptMap.getUrl());
|
||||||
myConceptMapResourceDao.update(resourceToStore, matchUrl);
|
myConceptMapResourceDao.update(conceptMapR4, matchUrl);
|
||||||
} else {
|
} else {
|
||||||
myConceptMapResourceDao.update(resourceToStore);
|
myConceptMapResourceDao.update(conceptMapR4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createOrUpdateValueSet(org.hl7.fhir.r4.model.ValueSet theValueSet) {
|
protected void createOrUpdateValueSet(org.hl7.fhir.r4.model.ValueSet theValueSet) {
|
||||||
ValueSet valueSetDstu3;
|
|
||||||
try {
|
ValueSet valueSetR4 = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(theValueSet);
|
||||||
valueSetDstu3 = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(theValueSet);
|
|
||||||
} catch (FHIRException e) {
|
if (isBlank(theValueSet.getIdElement().getIdPart())) {
|
||||||
throw new InternalErrorException(e);
|
String matchUrl = "ValueSet?url=" + UrlUtil.escapeUrlParam(theValueSet.getUrl());
|
||||||
|
myValueSetResourceDao.update(valueSetR4, matchUrl);
|
||||||
|
} else {
|
||||||
|
myValueSetResourceDao.update(valueSetR4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isBlank(valueSetDstu3.getIdElement().getIdPart())) {
|
@Override
|
||||||
String matchUrl = "ValueSet?url=" + UrlUtil.escapeUrlParam(theValueSet.getUrl());
|
public List<VersionIndependentConcept> expandValueSet(String theValueSet) {
|
||||||
myValueSetResourceDao.update(valueSetDstu3, matchUrl);
|
ValueSet valueSetR5 = myValidationSupport.fetchResource(myContext, ValueSet.class, theValueSet);
|
||||||
} else {
|
if (valueSetR5 == null) {
|
||||||
myValueSetResourceDao.update(valueSetDstu3);
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return expandValueSetAndReturnVersionIndependentConcepts(org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetR5));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBaseResource expandValueSet(IBaseResource theInput) {
|
||||||
|
org.hl7.fhir.r4.model.ValueSet valueSetToExpand = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet((ValueSet) theInput);
|
||||||
|
org.hl7.fhir.r4.model.ValueSet valueSetR4 = super.expandValueSet(valueSetToExpand);
|
||||||
|
return org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetR4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void expandValueSet(IBaseResource theValueSetToExpand, IValueSetConceptAccumulator theValueSetCodeAccumulator) {
|
||||||
|
org.hl7.fhir.r4.model.ValueSet valueSetToExpand = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet((ValueSet) theValueSetToExpand);
|
||||||
|
super.expandValueSet(valueSetToExpand, theValueSetCodeAccumulator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) {
|
public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) {
|
||||||
ValueSet valueSetToExpand = new ValueSet();
|
ValueSet valueSetToExpand = new ValueSet();
|
||||||
valueSetToExpand.getCompose().addInclude(theInclude);
|
valueSetToExpand.getCompose().addInclude(theInclude);
|
||||||
|
org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSet(org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetToExpand));
|
||||||
try {
|
return new ValueSetExpander.ValueSetExpansionOutcome(org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(expandedR4));
|
||||||
org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4;
|
|
||||||
valueSetToExpandR4 = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetToExpand);
|
|
||||||
org.hl7.fhir.r4.model.ValueSet expandedValueSet = super.expandValueSet(valueSetToExpandR4);
|
|
||||||
return new ValueSetExpander.ValueSetExpansionOutcome(org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(expandedValueSet));
|
|
||||||
} catch (FHIRException e) {
|
|
||||||
throw new InternalErrorException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IBaseResource expandValueSet(IBaseResource theInput) {
|
|
||||||
ValueSet valueSetToExpand = (ValueSet) theInput;
|
|
||||||
|
|
||||||
try {
|
|
||||||
org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4;
|
|
||||||
valueSetToExpandR4 = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetToExpand);
|
|
||||||
org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSet(valueSetToExpandR4);
|
|
||||||
return org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(expandedR4);
|
|
||||||
} catch (FHIRException e) {
|
|
||||||
throw new InternalErrorException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void expandValueSet(IBaseResource theValueSetToExpand, IValueSetCodeAccumulator theValueSetCodeAccumulator) {
|
|
||||||
ValueSet valueSetToExpand = (ValueSet) theValueSetToExpand;
|
|
||||||
|
|
||||||
try {
|
|
||||||
org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4;
|
|
||||||
valueSetToExpandR4 = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetToExpand);
|
|
||||||
super.expandValueSet(valueSetToExpandR4, theValueSetCodeAccumulator);
|
|
||||||
} catch (FHIRException e) {
|
|
||||||
throw new InternalErrorException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<VersionIndependentConcept> expandValueSet(String theValueSet) {
|
|
||||||
ValueSet vs = myValidationSupport.fetchResource(myContext, ValueSet.class, theValueSet);
|
|
||||||
if (vs == null) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4;
|
|
||||||
try {
|
|
||||||
valueSetToExpandR4 = org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(vs);
|
|
||||||
} catch (FHIRException e) {
|
|
||||||
throw new InternalErrorException(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return expandValueSetAndReturnVersionIndependentConcepts(valueSetToExpandR4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -223,17 +173,17 @@ public class HapiTerminologySvcR5 extends BaseHapiTerminologySvcImpl implements
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IBaseResource fetchResource(FhirContext theContext, Class theClass, String theUri) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@CoverageIgnore
|
@CoverageIgnore
|
||||||
@Override
|
@Override
|
||||||
public ValueSet fetchValueSet(FhirContext theContext, String theSystem) {
|
public ValueSet fetchValueSet(FhirContext theContext, String theSystem) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@CoverageIgnore
|
@CoverageIgnore
|
||||||
@Override
|
@Override
|
||||||
public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) {
|
public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) {
|
||||||
|
@ -284,17 +234,19 @@ public class HapiTerminologySvcR5 extends BaseHapiTerminologySvcImpl implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected org.hl7.fhir.r4.model.CodeSystem getCodeSystemFromContext(String theSystem) {
|
protected org.hl7.fhir.r4.model.CodeSystem getCodeSystemFromContext(String theSystem) {
|
||||||
CodeSystem codeSystem = myValidationSupport.fetchCodeSystem(myContext, theSystem);
|
CodeSystem codeSystemR5 = myValidationSupport.fetchCodeSystem(myContext, theSystem);
|
||||||
try {
|
return org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem(codeSystemR5);
|
||||||
return org.hl7.fhir.convertors.conv40_50.CodeSystem.convertCodeSystem(codeSystem);
|
|
||||||
} catch (FHIRException e) {
|
|
||||||
throw new InternalErrorException(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected org.hl7.fhir.r4.model.ValueSet getValueSetFromResourceTable(ResourceTable theResourceTable) {
|
||||||
|
ValueSet valueSetR5 = myValueSetResourceDao.toResource(ValueSet.class, theResourceTable, null, false);
|
||||||
|
return org.hl7.fhir.convertors.conv40_50.ValueSet.convertValueSet(valueSetR5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) {
|
public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) {
|
||||||
return myTerminologySvc.supportsSystem(theSystem);
|
return supportsSystem(theSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -304,25 +256,23 @@ public class HapiTerminologySvcR5 extends BaseHapiTerminologySvcImpl implements
|
||||||
|
|
||||||
@CoverageIgnore
|
@CoverageIgnore
|
||||||
@Override
|
@Override
|
||||||
public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) {
|
public IValidationSupport.CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) {
|
||||||
TransactionTemplate txTemplate = new TransactionTemplate(myTransactionManager);
|
TransactionTemplate txTemplate = new TransactionTemplate(myTransactionManager);
|
||||||
txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
|
txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
|
||||||
return txTemplate.execute(t-> {
|
return txTemplate.execute(t-> {
|
||||||
Optional<TermConcept> codeOpt = myTerminologySvc.findCode(theCodeSystem, theCode);
|
Optional<TermConcept> codeOpt = findCode(theCodeSystem, theCode);
|
||||||
if (codeOpt.isPresent()) {
|
if (codeOpt.isPresent()) {
|
||||||
ConceptDefinitionComponent def = new ConceptDefinitionComponent();
|
|
||||||
TermConcept code = codeOpt.get();
|
TermConcept code = codeOpt.get();
|
||||||
|
ConceptDefinitionComponent def = new ConceptDefinitionComponent();
|
||||||
def.setCode(code.getCode());
|
def.setCode(code.getCode());
|
||||||
def.setDisplay(code.getDisplay());
|
def.setDisplay(code.getDisplay());
|
||||||
CodeValidationResult retVal = new CodeValidationResult(def);
|
IValidationSupport.CodeValidationResult retVal = new IValidationSupport.CodeValidationResult(def);
|
||||||
retVal.setProperties(code.toValidationProperties());
|
retVal.setProperties(code.toValidationProperties());
|
||||||
retVal.setCodeSystemName(code.getCodeSystemVersion().getCodeSystem().getName());
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new CodeValidationResult(IssueSeverity.ERROR, "Unknown code {" + theCodeSystem + "}" + theCode);
|
return new IValidationSupport.CodeValidationResult(IssueSeverity.ERROR, "Unknown code {" + theCodeSystem + "}" + theCode);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -330,5 +280,4 @@ public class HapiTerminologySvcR5 extends BaseHapiTerminologySvcImpl implements
|
||||||
return super.lookupCode(theContext, theSystem, theCode);
|
return super.lookupCode(theContext, theSystem, theCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue