merge and fix testing bugs

This commit is contained in:
Grahame Grieve 2022-02-01 10:20:56 +11:00
commit bac81752c8
104 changed files with 33668 additions and 281 deletions

View File

@ -43,12 +43,31 @@ This project uses [Apache Maven](http://maven.apache.org) to build. To build:
```
mvn install
```
Note that unit tests will run, but are currently not set to fail the build as they do not all pass. This is being worked on.
_Note that unit tests will run, but are currently not set to fail the build as they do not all pass. This is being worked on._
To skip unit tests:
```
mvn -Dmaven.test.skip install
```
To clean and rebuild the terminology server caches.
_clean_
```
mvn clean -Dfhir.txcache.clean=true
```
_rebuild_
```
mvn test -Dfhir.txcache.rebuild=true
```
_The source contains cached terminology server responses for testing. If the expected responses have changed in any way,
this cache should be cleaned and rebuilt with the above so that subsequent `mvn test` calls will have the most current
responses cached._
### Publishing Binaries
An brief overview of our publishing process is [here][Link-Publishing].

View File

@ -1,5 +1,7 @@
## Validator Changes
## Other code Changes
* Change date/time rendering to allow provision of string format
## Validator Changes
* no changes
## Other code changes
* Use cached terminology server responses for unit and integration tests.

View File

@ -37,6 +37,8 @@ import org.hl7.fhir.r5.utils.client.FHIRToolingClient;
import org.hl7.fhir.r5.utils.client.network.ClientHeaders;
import org.hl7.fhir.utilities.ToolingClientLogger;
import org.hl7.fhir.utilities.Utilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URISyntaxException;
import java.util.Map;

View File

@ -79,7 +79,6 @@ public class FHIRToolingClient {
base = baseServiceUrl;
resourceAddress = new ResourceAddress(baseServiceUrl);
this.maxResultSetSize = -1;
checkCapabilities();
}
public Client getClient() {
@ -582,6 +581,7 @@ public class FHIRToolingClient {
}
public String getServerVersion() {
checkCapabilities();
return capabilities == null ? null : capabilities.getSoftware().getVersion();
}
}

View File

@ -12,6 +12,7 @@ import org.hl7.fhir.dstu3.utils.ResourceUtilities;
import org.hl7.fhir.dstu3.utils.client.EFhirClientException;
import org.hl7.fhir.dstu3.utils.client.ResourceFormat;
import org.hl7.fhir.utilities.ToolingClientLogger;
import org.hl7.fhir.utilities.TxInterceptor;
import java.io.IOException;
import java.util.ArrayList;
@ -162,6 +163,7 @@ public class FhirRequestBuilder {
return okHttpClient.newBuilder()
.addInterceptor(new RetryInterceptor(retryCount))
.addInterceptor(TxInterceptor.getInstance())
.connectTimeout(timeout, timeoutUnit)
.writeTimeout(timeout, timeoutUnit)
.readTimeout(timeout, timeoutUnit)

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r4.context;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
import com.google.gson.JsonObject;

View File

@ -76,7 +76,6 @@ public class FHIRToolingClient {
base = baseServiceUrl;
resourceAddress = new ResourceAddress(baseServiceUrl);
this.maxResultSetSize = -1;
checkCapabilities();
}
public Client getClient() {
@ -549,6 +548,7 @@ public class FHIRToolingClient {
}
public String getServerVersion() {
checkCapabilities();
return capabilities == null ? null : capabilities.getSoftware().getVersion();
}
}

View File

@ -12,6 +12,7 @@ import org.hl7.fhir.r4.utils.ResourceUtilities;
import org.hl7.fhir.r4.utils.client.EFhirClientException;
import org.hl7.fhir.r4.utils.client.ResourceFormat;
import org.hl7.fhir.utilities.ToolingClientLogger;
import org.hl7.fhir.utilities.TxInterceptor;
import java.io.IOException;
import java.util.ArrayList;
@ -164,6 +165,7 @@ public class FhirRequestBuilder {
OkHttpClient.Builder builder = okHttpClient.newBuilder();
if (logger != null) builder.addInterceptor(logger);
builder.addInterceptor(new RetryInterceptor(retryCount));
builder.addInterceptor(TxInterceptor.getInstance());
return builder.connectTimeout(timeout, timeoutUnit)
.addInterceptor(new RetryInterceptor(retryCount))

View File

@ -114,6 +114,13 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok_version}</version>
<scope>provided</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@ -45,6 +45,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
import org.fhir.ucum.UcumService;
import org.hl7.fhir.exceptions.DefinitionException;
@ -194,6 +195,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
protected String version; // although the internal resources are all R5, the version of FHIR they describe may not be
private String cacheId;
private boolean isTxCaching;
@Getter
private int serverQueryCount = 0;
private Set<String> cached = new HashSet<>();
private Map<String, Map<String, ResourceProxy>> allResourcesById = new HashMap<String, Map<String, ResourceProxy>>();
@ -234,6 +237,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
protected ILoggingService logger;
protected Parameters expParameters;
private TranslationServices translator = new NullTranslator();
@Getter
protected TerminologyCache txCache;
protected TimeTracker clock;
private boolean tlogging = true;
@ -595,7 +600,9 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (txcaps == null) {
try {
log("Terminology server: Check for supported code systems for "+system);
setTxCaps(txClient.getTerminologyCapabilities());
final TerminologyCapabilities capabilityStatement = txCache.hasTerminologyCapabilities() ? txCache.getTerminologyCapabilities() : txClient.getTerminologyCapabilities();
txCache.cacheTerminologyCapabilities(capabilityStatement);
setTxCaps(capabilityStatement);
} catch (Exception e) {
if (canRunWithoutTerminology) {
noTerminologyServer = true;
@ -658,7 +665,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
}
return expandVS(vs, cacheOk, heirarchical);
}
@Override
public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean hierarchical) throws TerminologyServiceException {
ValueSet vs = new ValueSet();
@ -671,14 +679,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (res != null) {
return res;
}
Parameters p = expParameters.copy();
p.setParameter("includeDefinition", false);
p.setParameter("excludeNested", !hierarchical);
boolean cached = addDependentResources(p, vs);
if (cached) {
p.addParameter().setName("cache-id").setValue(new StringType(cacheId));
}
Parameters p = constructParameters(vs, hierarchical);
for (ConceptSetComponent incl : vs.getCompose().getInclude()) {
codeSystemsUsed.add(incl.getSystem());
}
@ -722,10 +723,13 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
return expandVS(vs, cacheOk, heirarchical, incompleteOk, p);
}
public ValueSetExpansionOutcome expandVS(ValueSet vs, boolean cacheOk, boolean heirarchical, boolean incompleteOk, Parameters p) {
if (p == null) {
public ValueSetExpansionOutcome expandVS(ValueSet vs, boolean cacheOk, boolean hierarchical, boolean incompleteOk, Parameters pIn) {
if (pIn == null) {
throw new Error(formatMessage(I18nConstants.NO_PARAMETERS_PROVIDED_TO_EXPANDVS));
}
Parameters p = pIn.copy();
if (vs.hasExpansion()) {
return new ValueSetExpansionOutcome(vs.copy());
}
@ -739,7 +743,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
codeSystemsUsed.add(inc.getSystem());
}
CacheToken cacheToken = txCache.generateExpandToken(vs, heirarchical);
CacheToken cacheToken = txCache.generateExpandToken(vs, hierarchical);
ValueSetExpansionOutcome res;
if (cacheOk) {
res = txCache.getExpansion(cacheToken);
@ -748,7 +752,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
}
}
p.setParameter("includeDefinition", false);
p.setParameter("excludeNested", !heirarchical);
p.setParameter("excludeNested", !hierarchical);
if (incompleteOk) {
p.setParameter("incomplete-ok", true);
}
@ -756,7 +760,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
List<String> allErrors = new ArrayList<>();
// ok, first we try to expand locally
ValueSetExpanderSimple vse = new ValueSetExpanderSimple(this);
ValueSetExpanderSimple vse = constructValueSetExpanderSimple();
try {
res = vse.expand(vs, p);
allErrors.addAll(vse.getAllErrors());
@ -848,7 +852,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
for (CodingValidationRequest t : codes) {
if (!t.hasResult()) {
try {
ValueSetCheckerSimple vsc = new ValueSetCheckerSimple(options, vs, this);
ValueSetCheckerSimple vsc = constructValueSetCheckerSimple(options, vs);
ValidationResult res = vsc.validateCode(t.getCoding());
if (txCache != null) {
txCache.cacheValidation(t.getCacheToken(), res, TerminologyCache.TRANSIENT);
@ -879,24 +883,16 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
Bundle batch = new Bundle();
batch.setType(BundleType.BATCH);
Set<String> systems = new HashSet<>();
for (CodingValidationRequest t : codes) {
if (!t.hasResult()) {
Parameters pIn = new Parameters();
pIn.addParameter().setName("coding").setValue(t.getCoding());
if (options.isGuessSystem()) {
pIn.addParameter().setName("implySystem").setValue(new BooleanType(true));
}
if (vs != null) {
pIn.addParameter().setName("valueSet").setResource(vs);
}
pIn.addParameter().setName("profile").setResource(expParameters);
for (CodingValidationRequest codingValidationRequest : codes) {
if (!codingValidationRequest.hasResult()) {
Parameters pIn = constructParameters(options, codingValidationRequest, vs);
setTerminologyOptions(options, pIn);
BundleEntryComponent be = batch.addEntry();
be.setResource(pIn);
be.getRequest().setMethod(HTTPVerb.POST);
be.getRequest().setUrl("CodeSystem/$validate-code");
be.setUserData("source", t);
systems.add(t.getCoding().getSystem());
be.setUserData("source", codingValidationRequest);
systems.add(codingValidationRequest.getCoding().getSystem());
}
}
if (batch.getEntry().size() > 0) {
@ -936,28 +932,33 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
return validateCode(options, code, vs, ctxt);
}
private final String getCodeKey(Coding code) {
return code.hasVersion() ? code.getSystem()+"|"+code.getVersion() : code.getSystem();
}
@Override
public ValidationResult validateCode(ValidationOptions options, Coding code, ValueSet vs, ValidationContextCarrier ctxt) {
if (options == null) {
options = ValidationOptions.defaults();
}
public ValidationResult validateCode(final ValidationOptions optionsArg, final Coding code, final ValueSet vs, final ValidationContextCarrier ctxt) {
ValidationOptions options = optionsArg != null ? optionsArg : ValidationOptions.defaults();
if (code.hasSystem()) {
codeSystemsUsed.add(code.getSystem());
}
CacheToken cacheToken = txCache != null ? txCache.generateValidationToken(options, code, vs) : null;
final CacheToken cacheToken = txCache != null ? txCache.generateValidationToken(options, code, vs) : null;
ValidationResult res = null;
if (txCache != null) {
res = txCache.getValidation(cacheToken);
}
if (res != null) {
updateUnsupportedCodeSystems(res, code, getCodeKey(code));
return res;
}
if (options.isUseClient()) {
// ok, first we try to validate locally
try {
ValueSetCheckerSimple vsc = new ValueSetCheckerSimple(options, vs, this, ctxt);
ValueSetCheckerSimple vsc = constructValueSetCheckerSimple(options, vs, ctxt);
if (!vsc.isServerSide(code.getSystem())) {
res = vsc.validateCode(code);
if (txCache != null) {
@ -969,10 +970,10 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
}
}
String codeKey = code.hasVersion() ? code.getSystem()+"|"+code.getVersion() : code.getSystem();
if (!options.isUseServer()) {
return new ValidationResult(IssueSeverity.WARNING,formatMessage(I18nConstants.UNABLE_TO_VALIDATE_CODE_WITHOUT_USING_SERVER), TerminologyServiceErrorClass.BLOCKED_BY_OPTIONS);
}
String codeKey = getCodeKey(code);
if (unsupportedCodeSystems.contains(codeKey)) {
return new ValidationResult(IssueSeverity.ERROR,formatMessage(I18nConstants.TERMINOLOGY_TX_SYSTEM_NOTKNOWN, code.getSystem()), TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED);
}
@ -988,24 +989,78 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
tlog("$validate "+csumm+" before cache exists");
}
try {
Parameters pIn = new Parameters();
pIn.addParameter().setName("coding").setValue(code);
if (options.isGuessSystem()) {
pIn.addParameter().setName("implySystem").setValue(new BooleanType(true));
}
setTerminologyOptions(options, pIn);
Parameters pIn = constructParameters(options, code);
res = validateOnServer(vs, pIn, options);
} catch (Exception e) {
res = new ValidationResult(IssueSeverity.ERROR, e.getMessage() == null ? e.getClass().getName() : e.getMessage()).setTxLink(txLog == null ? null : txLog.getLastId()).setErrorClass(TerminologyServiceErrorClass.SERVER_ERROR);
}
if (res.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED && !code.hasVersion()) {
unsupportedCodeSystems.add(codeKey);
} else if (txCache != null) { // we never cache unsuppoted code systems - we always keep trying (but only once per run)
updateUnsupportedCodeSystems(res, code, codeKey);
if (txCache != null) { // we never cache unsupported code systems - we always keep trying (but only once per run)
txCache.cacheValidation(cacheToken, res, TerminologyCache.PERMANENT);
}
return res;
}
protected ValueSetExpanderSimple constructValueSetExpanderSimple() {
return new ValueSetExpanderSimple(this);
}
protected ValueSetCheckerSimple constructValueSetCheckerSimple( ValidationOptions options, ValueSet vs, ValidationContextCarrier ctxt) {
return new ValueSetCheckerSimple(options, vs, this, ctxt);
}
protected ValueSetCheckerSimple constructValueSetCheckerSimple( ValidationOptions options, ValueSet vs) {
return new ValueSetCheckerSimple(options, vs, this);
}
protected Parameters constructParameters(ValueSet vs, boolean hierarchical) {
Parameters p = expParameters.copy();
p.setParameter("includeDefinition", false);
p.setParameter("excludeNested", !hierarchical);
boolean cached = addDependentResources(p, vs);
if (cached) {
p.addParameter().setName("cache-id").setValue(new StringType(cacheId));
}
return p;
}
protected Parameters constructParameters(ValidationOptions options, Coding coding) {
Parameters pIn = new Parameters();
pIn.addParameter().setName("coding").setValue(coding);
if (options.isGuessSystem()) {
pIn.addParameter().setName("implySystem").setValue(new BooleanType(true));
}
setTerminologyOptions(options, pIn);
return pIn;
}
protected Parameters constructParameters(ValidationOptions options, CodeableConcept codeableConcept) {
Parameters pIn = new Parameters();
pIn.addParameter().setName("codeableConcept").setValue(codeableConcept);
setTerminologyOptions(options, pIn);
return pIn;
}
protected Parameters constructParameters(ValidationOptions options, CodingValidationRequest codingValidationRequest, ValueSet valueSet) {
Parameters pIn = new Parameters();
pIn.addParameter().setName("coding").setValue(codingValidationRequest.getCoding());
if (options.isGuessSystem()) {
pIn.addParameter().setName("implySystem").setValue(new BooleanType(true));
}
if (valueSet != null) {
pIn.addParameter().setName("valueSet").setResource(valueSet);
}
pIn.addParameter().setName("profile").setResource(expParameters);
return pIn;
}
private void updateUnsupportedCodeSystems(ValidationResult res, Coding code, String codeKey) {
if (res.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED && !code.hasVersion()) {
unsupportedCodeSystems.add(codeKey);
}
}
private void setTerminologyOptions(ValidationOptions options, Parameters pIn) {
if (!Utilities.noString(options.getLanguage())) {
pIn.addParameter("displayLanguage", options.getLanguage());
@ -1034,7 +1089,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
if (options.isUseClient()) {
// ok, first we try to validate locally
try {
ValueSetCheckerSimple vsc = new ValueSetCheckerSimple(options, vs, this);
ValueSetCheckerSimple vsc = constructValueSetCheckerSimple(options, vs);
res = vsc.validateCode(code);
txCache.cacheValidation(cacheToken, res, TerminologyCache.TRANSIENT);
return res;
@ -1055,9 +1110,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
}
tlog("$validate "+txCache.summary(code)+" for "+ txCache.summary(vs));
try {
Parameters pIn = new Parameters();
pIn.addParameter().setName("codeableConcept").setValue(code);
setTerminologyOptions(options, pIn);
Parameters pIn = constructParameters(options, code);
res = validateOnServer(vs, pIn, options);
} catch (Exception e) {
res = new ValidationResult(IssueSeverity.ERROR, e.getMessage() == null ? e.getClass().getName() : e.getMessage()).setTxLink(txLog.getLastId());
@ -1066,7 +1119,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
return res;
}
private ValidationResult validateOnServer(ValueSet vs, Parameters pin, ValidationOptions options) throws FHIRException {
protected ValidationResult validateOnServer(ValueSet vs, Parameters pin, ValidationOptions options) throws FHIRException {
boolean cache = false;
if (vs != null) {
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
@ -1202,7 +1255,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
// --------------------------------------------------------------------------------------------------------------------------------------------------------
public void initTS(String cachePath) throws Exception {
public void initTS(String cachePath) throws IOException {
if (!new File(cachePath).exists()) {
Utilities.createDirectory(cachePath);
}
@ -2122,10 +2175,6 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
return this;
}
public String getTxCache() {
return txCache.getFolder();
}
public TerminologyClient getTxClient() {
return txClient;
}

View File

@ -59,18 +59,11 @@ import org.hl7.fhir.r5.formats.IParser;
import org.hl7.fhir.r5.formats.JsonParser;
import org.hl7.fhir.r5.formats.ParserType;
import org.hl7.fhir.r5.formats.XmlParser;
import org.hl7.fhir.r5.model.Bundle;
import org.hl7.fhir.r5.model.*;
import org.hl7.fhir.r5.model.Bundle.BundleEntryComponent;
import org.hl7.fhir.r5.model.CanonicalResource;
import org.hl7.fhir.r5.model.CapabilityStatement;
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent;
import org.hl7.fhir.r5.model.Questionnaire;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.ResourceType;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
import org.hl7.fhir.r5.model.StructureMap;
import org.hl7.fhir.r5.model.StructureMap.StructureMapModelMode;
import org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent;
import org.hl7.fhir.r5.terminologies.TerminologyClient;
@ -292,9 +285,15 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
}
txClient.setLogger(txLog);
txClient.setUserAgent(userAgent);
CapabilityStatement cps = txClient.getCapabilitiesStatementQuick();
setTxCaps(txClient.getTerminologyCapabilities());
return cps.getSoftware().getVersion();
final CapabilityStatement capabilitiesStatementQuick = txCache.hasCapabilityStatement() ? txCache.getCapabilityStatement() : txClient.getCapabilitiesStatementQuick();
txCache.cacheCapabilityStatement(capabilitiesStatementQuick);
final TerminologyCapabilities capabilityStatement = txCache.hasTerminologyCapabilities() ? txCache.getTerminologyCapabilities() : txClient.getTerminologyCapabilities();
txCache.cacheTerminologyCapabilities(capabilityStatement);
setTxCaps(capabilityStatement);
return capabilitiesStatementQuick.getSoftware().getVersion();
} catch (Exception e) {
throw new FHIRException(formatMessage(canNoTS ? I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER_USE_PARAMETER_TX_NA_TUN_RUN_WITHOUT_USING_TERMINOLOGY_SERVICES_TO_VALIDATE_LOINC_SNOMED_ICDX_ETC_ERROR__ : I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER, e.getMessage()), e);
}

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r5.context;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -36,21 +36,19 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.context.IWorkerContext.ValidationResult;
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
import org.hl7.fhir.r5.formats.JsonParser;
import org.hl7.fhir.r5.model.*;
import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.r5.model.CodeableConcept;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.UriType;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent;
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
@ -63,16 +61,15 @@ import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
import org.hl7.fhir.utilities.validation.ValidationOptions;
import com.google.gson.JsonElement;
import com.google.gson.JsonNull;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
/**
* This implements a two level cache.
* - a temporary cache for remmbering previous local operations
* - a persistent cache for rembering tx server operations
* - a temporary cache for remembering previous local operations
* - a persistent cache for remembering tx server operations
*
* the cache is a series of pairs: a map, and a list. the map is the loaded cache, the list is the persiistent cache, carefully maintained in order for version control consistency
* the cache is a series of pairs: a map, and a list. the map is the loaded cache, the list is the persistent cache, carefully maintained in order for version control consistency
*
* @author graha
*
@ -84,10 +81,28 @@ public class TerminologyCache {
private static final String ENTRY_MARKER = "-------------------------------------------------------------------------------------";
private static final String BREAK = "####";
private static final String CACHE_FILE_EXTENSION = ".cache";
private static final String CAPABILITY_STATEMENT_TITLE = ".capabilityStatement";
private static final String TERMINOLOGY_CAPABILITIES_TITLE = ".terminologyCapabilities";
@Getter
private int requestCount;
@Getter
private int hitCount;
@Getter
private int networkCount;
public class CacheToken {
@Getter
private String name;
private String key;
@Getter
private String request;
@Accessors(fluent = true)
@Getter
private boolean hasVersion;
public void setName(String n) {
if (name == null)
name = n;
@ -112,25 +127,74 @@ public class TerminologyCache {
private Object lock;
private String folder;
private CapabilityStatement capabilityStatementCache = null;
public boolean hasCapabilityStatement() {
return capabilityStatementCache != null;
}
public CapabilityStatement getCapabilityStatement() {
return capabilityStatementCache;
}
public void cacheCapabilityStatement(CapabilityStatement capabilityStatement) {
if (noCaching) {
return;
}
this.capabilityStatementCache = capabilityStatement;
save(capabilityStatementCache, CAPABILITY_STATEMENT_TITLE);
}
private TerminologyCapabilities terminologyCapabilitiesCache = null;
public boolean hasTerminologyCapabilities() {
return terminologyCapabilitiesCache != null;
}
public TerminologyCapabilities getTerminologyCapabilities() {
return terminologyCapabilitiesCache;
}
public void cacheTerminologyCapabilities(TerminologyCapabilities terminologyCapabilities) {
if (noCaching) {
return;
}
this.terminologyCapabilitiesCache = terminologyCapabilities;
save(terminologyCapabilitiesCache, TERMINOLOGY_CAPABILITIES_TITLE);
}
private Map<String, NamedCache> caches = new HashMap<String, NamedCache>();
@Getter @Setter
private static boolean noCaching;
@Getter @Setter
private static boolean cacheErrors;
// use lock from the context
public TerminologyCache(Object lock, String folder) throws FileNotFoundException, IOException, FHIRException {
super();
this.lock = lock;
this.folder = folder;
if (folder != null)
requestCount = 0;
hitCount = 0;
networkCount = 0;
if (folder != null) {
load();
}
}
public void clear() {
caches.clear();
}
public CacheToken generateValidationToken(ValidationOptions options, Coding code, ValueSet vs) {
CacheToken ct = new CacheToken();
if (code.hasSystem())
if (code.hasSystem()) {
ct.name = getNameForSystem(code.getSystem());
ct.hasVersion = code.hasVersion();
}
else
ct.name = NAME_FOR_NO_SYSTEM;
nameCacheToken(vs, ct);
@ -151,14 +215,14 @@ public class TerminologyCache {
throw new Error(e);
}
}
ct.key = String.valueOf(hashNWS(ct.request));
ct.key = String.valueOf(hashJson(ct.request));
return ct;
}
public String extracted(JsonParser json, ValueSet vsc) throws IOException {
String s = null;
if (vsc.getExpansion().getContains().size() > 1000 || vsc.getCompose().getIncludeFirstRep().getConcept().size() > 1000) {
s = Integer.toString(vsc.hashCode()); // turn caching off - hack efficiency optimisation
s = vsc.getUrl();
} else {
s = json.composeString(vsc);
}
@ -168,8 +232,10 @@ public class TerminologyCache {
public CacheToken generateValidationToken(ValidationOptions options, CodeableConcept code, ValueSet vs) {
CacheToken ct = new CacheToken();
for (Coding c : code.getCoding()) {
if (c.hasSystem())
if (c.hasSystem()) {
ct.setName(getNameForSystem(c.getSystem()));
ct.hasVersion = c.hasVersion();
}
}
nameCacheToken(vs, ct);
JsonParser json = new JsonParser();
@ -189,7 +255,7 @@ public class TerminologyCache {
throw new Error(e);
}
}
ct.key = String.valueOf(hashNWS(ct.request));
ct.key = String.valueOf(hashJson(ct.request));
return ct;
}
@ -205,36 +271,45 @@ public class TerminologyCache {
return vsc;
}
public CacheToken generateExpandToken(ValueSet vs, boolean heirarchical) {
public CacheToken generateExpandToken(ValueSet vs, boolean hierarchical) {
CacheToken ct = new CacheToken();
nameCacheToken(vs, ct);
if (vs.hasUrl() && vs.hasVersion()) {
ct.request = "{\"hierarchical\" : "+(heirarchical ? "true" : "false")+", \"url\": \""+Utilities.escapeJson(vs.getUrl())+"\", \"version\": \""+Utilities.escapeJson(vs.getVersion())+"\"}\r\n";
ct.request = "{\"hierarchical\" : "+(hierarchical ? "true" : "false")+", \"url\": \""+Utilities.escapeJson(vs.getUrl())+"\", \"version\": \""+Utilities.escapeJson(vs.getVersion())+"\"}\r\n";
} else {
ValueSet vsc = getVSEssense(vs);
JsonParser json = new JsonParser();
json.setOutputStyle(OutputStyle.PRETTY);
try {
ct.request = "{\"hierarchical\" : "+(heirarchical ? "true" : "false")+", \"valueSet\" :"+extracted(json, vsc)+"}\r\n";
ct.request = "{\"hierarchical\" : "+(hierarchical ? "true" : "false")+", \"valueSet\" :"+extracted(json, vsc)+"}\r\n";
} catch (IOException e) {
throw new Error(e);
}
}
ct.key = String.valueOf(hashNWS(ct.request));
ct.key = String.valueOf(hashJson(ct.request));
return ct;
}
public void nameCacheToken(ValueSet vs, CacheToken ct) {
if (vs != null) {
for (ConceptSetComponent inc : vs.getCompose().getInclude())
if (inc.hasSystem())
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
if (inc.hasSystem()) {
ct.setName(getNameForSystem(inc.getSystem()));
for (ConceptSetComponent inc : vs.getCompose().getExclude())
if (inc.hasSystem())
ct.hasVersion = inc.hasVersion();
}
}
for (ConceptSetComponent inc : vs.getCompose().getExclude()) {
if (inc.hasSystem()) {
ct.setName(getNameForSystem(inc.getSystem()));
for (ValueSetExpansionContainsComponent inc : vs.getExpansion().getContains())
if (inc.hasSystem())
ct.hasVersion = inc.hasVersion();
}
}
for (ValueSetExpansionContainsComponent inc : vs.getExpansion().getContains()) {
if (inc.hasSystem()) {
ct.setName(getNameForSystem(inc.getSystem()));
ct.hasVersion = inc.hasVersion();
}
}
}
}
@ -267,10 +342,14 @@ public class TerminologyCache {
}
public NamedCache getNamedCache(CacheToken cacheToken) {
NamedCache nc = caches.get(cacheToken.name);
final String cacheName = cacheToken.name == null ? "null" : cacheToken.name;
NamedCache nc = caches.get(cacheName);
if (nc == null) {
nc = new NamedCache();
nc.name = cacheToken.name;
nc.name = cacheName;
caches.put(nc.name, nc);
}
return nc;
@ -302,6 +381,14 @@ public class TerminologyCache {
if (noCaching) {
return;
}
if ( !cacheErrors &&
( e.v!= null
&& e.v.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED
&& !cacheToken.hasVersion)) {
return;
}
boolean n = nc.map.containsKey(cacheToken.key);
nc.map.put(cacheToken.key, e);
if (persistent) {
@ -322,14 +409,18 @@ public class TerminologyCache {
return null;
}
synchronized (lock) {
requestCount++;
NamedCache nc = getNamedCache(cacheToken);
CacheEntry e = nc.map.get(cacheToken.key);
if (e == null)
if (e == null) {
networkCount++;
return null;
else
} else {
hitCount++;
return e.v;
}
}
}
public void cacheValidation(CacheToken cacheToken, ValidationResult res, boolean persistent) {
if (cacheToken.key != null) {
@ -351,12 +442,29 @@ public class TerminologyCache {
}
private <K extends Resource> void save(K resource, String title) {
if (folder == null)
return;
try {
OutputStreamWriter sw = new OutputStreamWriter(new FileOutputStream(Utilities.path(folder, title + CACHE_FILE_EXTENSION)), "UTF-8");
JsonParser json = new JsonParser();
json.setOutputStyle(OutputStyle.PRETTY);
sw.write(json.composeString(resource).trim());
sw.close();
} catch (Exception e) {
System.out.println("error saving capability statement "+e.getMessage());
}
}
private void save(NamedCache nc) {
if (folder == null)
return;
try {
OutputStreamWriter sw = new OutputStreamWriter(new FileOutputStream(Utilities.path(folder, nc.name+".cache")), "UTF-8");
OutputStreamWriter sw = new OutputStreamWriter(new FileOutputStream(Utilities.path(folder, nc.name+CACHE_FILE_EXTENSION)), "UTF-8");
sw.write(ENTRY_MARKER+"\r\n");
JsonParser json = new JsonParser();
json.setOutputStyle(OutputStyle.PRETTY);
@ -409,34 +517,39 @@ public class TerminologyCache {
}
}
private void load() throws FHIRException {
for (String fn : new File(folder).list()) {
if (fn.endsWith(".cache") && !fn.equals("validation.cache")) {
int c = 0;
private boolean isCapabilityCache(String fn) {
if (fn == null) {
return false;
}
return fn.startsWith(CAPABILITY_STATEMENT_TITLE) || fn.startsWith(TERMINOLOGY_CAPABILITIES_TITLE);
}
private void loadCapabilityCache(String fn) {
try {
String title = fn.substring(0, fn.lastIndexOf("."));
NamedCache nc = new NamedCache();
nc.name = title;
caches.put(title, nc);
String src = TextFile.fileToString(Utilities.path(folder, fn));
if (src.startsWith("?"))
src = src.substring(1);
int i = src.indexOf(ENTRY_MARKER);
while (i > -1) {
c++;
String s = src.substring(0, i);
src = src.substring(i+ENTRY_MARKER.length()+1);
i = src.indexOf(ENTRY_MARKER);
if (!Utilities.noString(s)) {
int j = s.indexOf(BREAK);
String q = s.substring(0, j);
String p = s.substring(j+BREAK.length()+1).trim();
JsonObject o = (JsonObject) new com.google.gson.JsonParser().parse(src);
Resource resource = new JsonParser().parse(o);
if (fn.startsWith(CAPABILITY_STATEMENT_TITLE)) {
this.capabilityStatementCache = (CapabilityStatement) resource;
} else if (fn.startsWith(TERMINOLOGY_CAPABILITIES_TITLE)) {
this.terminologyCapabilitiesCache = (TerminologyCapabilities) resource;
}
} catch (Exception e) {
throw new FHIRException("Error loading " + fn + ": " + e.getMessage(), e);
}
}
private CacheEntry getCacheEntry(String request, String resultString) throws IOException {
CacheEntry ce = new CacheEntry();
ce.persistent = true;
ce.request = q;
boolean e = p.charAt(0) == 'e';
p = p.substring(3);
JsonObject o = (JsonObject) new com.google.gson.JsonParser().parse(p);
ce.request = request;
boolean e = resultString.charAt(0) == 'e';
resultString = resultString.substring(3);
JsonObject o = (JsonObject) new com.google.gson.JsonParser().parse(resultString);
String error = loadJS(o.get("error"));
if (e) {
if (o.has("valueSet"))
@ -454,14 +567,56 @@ public class TerminologyCache {
TerminologyServiceErrorClass errorClass = t == null ? null : TerminologyServiceErrorClass.valueOf(t) ;
ce.v = new ValidationResult(severity, error, system, new ConceptDefinitionComponent().setDisplay(display).setDefinition(definition).setCode(code)).setErrorClass(errorClass);
}
nc.map.put(String.valueOf(hashNWS(ce.request)), ce);
nc.list.add(ce);
return ce;
}
private void loadNamedCache(String fn) {
int c = 0;
try {
String src = TextFile.fileToString(Utilities.path(folder, fn));
String title = fn.substring(0, fn.lastIndexOf("."));
NamedCache nc = new NamedCache();
nc.name = title;
if (src.startsWith("?"))
src = src.substring(1);
int i = src.indexOf(ENTRY_MARKER);
while (i > -1) {
c++;
String s = src.substring(0, i);
src = src.substring(i + ENTRY_MARKER.length() + 1);
i = src.indexOf(ENTRY_MARKER);
if (!Utilities.noString(s)) {
int j = s.indexOf(BREAK);
String request = s.substring(0, j);
String p = s.substring(j + BREAK.length() + 1).trim();
CacheEntry cacheEntry = getCacheEntry(request, p);
nc.map.put(String.valueOf(hashJson(cacheEntry.request)), cacheEntry);
nc.list.add(cacheEntry);
}
caches.put(nc.name, nc);
}
} catch (Exception e) {
throw new FHIRException("Error loading "+fn+": "+e.getMessage()+" entry "+c, e);
}
}
private void load() throws FHIRException {
for (String fn : new File(folder).list()) {
if (fn.endsWith(CACHE_FILE_EXTENSION) && !fn.equals("validation" + CACHE_FILE_EXTENSION)) {
try {
if (isCapabilityCache(fn)) {
loadCapabilityCache(fn);
} else {
loadNamedCache(fn);
}
} catch (FHIRException e) {
throw e;
}
}
}
}
@ -476,7 +631,7 @@ public class TerminologyCache {
return s;
}
private String hashNWS(String s) {
protected String hashJson(String s) {
s = StringUtils.remove(s, ' ');
s = StringUtils.remove(s, '\n');
s = StringUtils.remove(s, '\r');
@ -540,14 +695,6 @@ public class TerminologyCache {
return b.toString();
}
public static boolean isNoCaching() {
return noCaching;
}
public static void setNoCaching(boolean noCaching) {
TerminologyCache.noCaching = noCaching;
}
public void removeCS(String url) {
synchronized (lock) {
String name = getNameForSystem(url);

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r5.terminologies;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/

View File

@ -0,0 +1,7 @@
package org.hl7.fhir.r5.test.utils;
import java.nio.file.Paths;
public class TestConstants {
public static final java.lang.String TX_CACHE = Paths.get("src","test","resources", "txCache").toAbsolutePath().toString();
}

View File

@ -17,12 +17,14 @@ import org.apache.commons.codec.binary.Base64;
import org.fhir.ucum.UcumEssenceService;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.context.SimpleWorkerContext;
import org.hl7.fhir.r5.context.TerminologyCache;
import org.hl7.fhir.r5.model.Parameters;
import org.hl7.fhir.utilities.CSFile;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.npm.ToolsVersion;
import org.hl7.fhir.utilities.tests.BaseTestingUtilities;
import org.w3c.dom.Document;
@ -89,7 +91,7 @@ public class TestingUtilities extends BaseTestingUtilities {
FilesystemPackageCacheManager pcm;
try {
pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
IWorkerContext fcontext = SimpleWorkerContext.fromPackage(pcm.loadPackage(VersionUtilities.packageForVersion(version), version));
IWorkerContext fcontext = getWorkerContext(pcm.loadPackage(VersionUtilities.packageForVersion(version), version));
fcontext.setUcumService(new UcumEssenceService(TestingUtilities.loadTestResourceStream("ucum", "ucum-essence.xml")));
fcontext.setExpansionProfile(new Parameters());
// ((SimpleWorkerContext) fcontext).connectToTSServer(new TerminologyClientR5("http://tx.fhir.org/r4"), null);
@ -102,6 +104,22 @@ public class TestingUtilities extends BaseTestingUtilities {
return fcontexts.get(v);
}
public static SimpleWorkerContext getWorkerContext(NpmPackage npmPackage) throws Exception {
SimpleWorkerContext swc = SimpleWorkerContext.fromPackage(npmPackage);
swc.initTS(TestConstants.TX_CACHE);
TerminologyCache.setCacheErrors(true);
swc.setUserAgent("fhir/r5-test-cases");
return swc;
}
public static SimpleWorkerContext getWorkerContext(NpmPackage npmPackage, IWorkerContext.IContextResourceLoader loader) throws Exception {
SimpleWorkerContext swc = SimpleWorkerContext.fromPackage(npmPackage, loader);
swc.initTS(TestConstants.TX_CACHE);
TerminologyCache.setCacheErrors(true);
swc.setUserAgent("fhir/r5-test-cases");
return swc;
}
static public String fixedpath;
static public String contentpath;

View File

@ -37,13 +37,11 @@ import org.hl7.fhir.r5.model.*;
import org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent;
import org.hl7.fhir.r5.utils.client.network.ByteUtils;
import org.hl7.fhir.r5.utils.client.network.Client;
import org.hl7.fhir.r5.utils.client.network.ClientHeaders;
import org.hl7.fhir.r5.utils.client.network.ResourceRequest;
import org.hl7.fhir.utilities.ToolingClientLogger;
import org.hl7.fhir.utilities.Utilities;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
@ -108,7 +106,6 @@ public class FHIRToolingClient {
base = baseServiceUrl;
resourceAddress = new ResourceAddress(baseServiceUrl);
this.maxResultSetSize = -1;
checkCapabilities();
}
public Client getClient() {
@ -119,13 +116,6 @@ public class FHIRToolingClient {
this.client = client;
}
private void checkCapabilities() {
try {
capabilities = getCapabilitiesStatementQuick();
} catch (Throwable e) {
}
}
public String getPreferredResourceFormat() {
return preferredResourceFormat.getHeader();
}
@ -157,9 +147,9 @@ public class FHIRToolingClient {
}
public CapabilityStatement getCapabilitiesStatement() {
CapabilityStatement conformance = null;
CapabilityStatement capabilityStatement = null;
try {
conformance = (CapabilityStatement) client.issueGetResourceRequest(resourceAddress.resolveMetadataUri(false),
capabilityStatement = (CapabilityStatement) client.issueGetResourceRequest(resourceAddress.resolveMetadataUri(false),
getPreferredResourceFormat(),
generateHeaders(),
"CapabilitiesStatement",
@ -167,13 +157,13 @@ public class FHIRToolingClient {
} catch (Exception e) {
throw new FHIRException("Error fetching the server's conformance statement", e);
}
return conformance;
return capabilityStatement;
}
public CapabilityStatement getCapabilitiesStatementQuick() throws EFhirClientException {
if (capabilities != null) return capabilities;
try {
capabilities = (CapabilityStatement) client.issueGetResourceRequest(resourceAddress.resolveMetadataUri(true),
capabilities = (CapabilityStatement) client.issueGetResourceRequest(resourceAddress.resolveMetadataUri(true),
getPreferredResourceFormat(),
generateHeaders(),
"CapabilitiesStatement-Quick",
@ -583,6 +573,13 @@ public class FHIRToolingClient {
}
public String getServerVersion() {
if (capabilities == null) {
try {
getCapabilitiesStatementQuick();
} catch (Throwable e) {
//FIXME This is creepy. Shouldn't we report this at some level?
}
}
return capabilities == null ? null : capabilities.getSoftware().getVersion();
}

View File

@ -11,11 +11,9 @@ import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.utils.ResourceUtilities;
import org.hl7.fhir.r5.utils.client.EFhirClientException;
import org.hl7.fhir.r5.utils.client.ResourceFormat;
import org.hl7.fhir.utilities.ToolingClientLogger;
import org.hl7.fhir.utilities.TxInterceptor;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@ -164,7 +162,7 @@ public class FhirRequestBuilder {
OkHttpClient.Builder builder = okHttpClient.newBuilder();
if (logger != null) builder.addInterceptor(logger);
builder.addInterceptor(new RetryInterceptor(retryCount));
builder.addInterceptor(TxInterceptor.getInstance());
return builder.connectTimeout(timeout, timeoutUnit)
.writeTimeout(timeout, timeoutUnit)
.readTimeout(timeout, timeoutUnit)

View File

@ -0,0 +1,69 @@
package org.hl7.fhir.utilities.tests;
import lombok.Getter;
import org.hl7.fhir.utilities.ToolingClientLogger;
import java.nio.charset.StandardCharsets;
import java.util.List;
public class CacheVerificationLogger implements ToolingClientLogger {
public static final String FHIR_TXCACHE_REBUILD = "fhir.txcache.rebuild";
public static final String isRebuildingCache = System.getProperty(FHIR_TXCACHE_REBUILD);
@Getter
int requests = 0;
@Override
public void logRequest(String method, String url, List<String> headers, byte[] body) {
if (!isRebuildingCache()) {
System.err.println("Unexpected request to server");
System.err.println(method);
System.err.println(url);
if (headers != null) {
for (String header : headers) {
System.err.println("Header: " + header);
}
}
System.err.println("Body");
System.err.println("----");
System.err.println(new String(body, StandardCharsets.UTF_8));
}
requests++;
}
@Override
public void logResponse(String outcome, List<String> headers, byte[] body) {
}
@Override
public String getLastId() {
return null;
}
@Override
public void clearLastId() {
}
private boolean isRebuildingCache() {
return isRebuildingCache != null && "TRUE".equals(isRebuildingCache.toUpperCase());
}
public boolean verifyHasNoRequests() {
if (isRebuildingCache()) {
return true;
} else {
if (requests != 0) {
System.err.println("Unexpected TX server request during test. If a new test has been added, you may need to " +
"rebuild the TX Cache for the test using the 'mvn test -D" + FHIR_TXCACHE_REBUILD + "=true' option");
return false;
} else {
return true;
}
}
}
}

View File

@ -0,0 +1,8 @@
package org.hl7.fhir.r5.context;
import org.hl7.fhir.utilities.validation.ValidationOptions;
public class CacheTestUtils {
public static final ValidationOptions validationOptions = new ValidationOptions().guessSystem().setVersionFlexible(false);
}

View File

@ -0,0 +1,415 @@
package org.hl7.fhir.r5.context;
import org.hl7.fhir.r5.model.*;
import org.hl7.fhir.r5.terminologies.TerminologyClient;
import org.hl7.fhir.r5.terminologies.ValueSetCheckerSimple;
import org.hl7.fhir.r5.terminologies.ValueSetExpander;
import org.hl7.fhir.r5.terminologies.ValueSetExpanderSimple;
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
import org.hl7.fhir.utilities.ToolingClientLogger;
import org.hl7.fhir.utilities.graphql.Value;
import org.hl7.fhir.utilities.validation.ValidationOptions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentMatcher;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
@ExtendWith(MockitoExtension.class)
public class SimpleWorkerContextTests {
private static final String DUMMY_URL = "dummyUrl";
@Spy
SimpleWorkerContext context;
@Mock
TerminologyCache terminologyCache;
@Mock
ToolingClientLogger txLog;
@Mock
TerminologyClient terminologyClient;
@Mock
TerminologyCache.CacheToken cacheToken;
@Mock
IWorkerContext.ValidationResult expectedValidationResult;
@Mock
ValueSetExpander.ValueSetExpansionOutcome expectedExpansionResult;
@Mock
ValueSetCheckerSimple valueSetCheckerSimple;
@Mock
ValueSetExpanderSimple valueSetExpanderSimple;
@Mock
Parameters pIn;
@Mock
Parameters expParameters;
public static final TerminologyCapabilities terminologyCapabilities = new TerminologyCapabilities();
static { terminologyCapabilities.getExpansion().setParameter(Arrays.asList());}
public static final CapabilityStatement.CapabilityStatementSoftwareComponent software = new CapabilityStatement.CapabilityStatementSoftwareComponent();
static { software.setVersion("dummyVersion"); }
public static final CapabilityStatement capabilitiesStatement = new CapabilityStatement();
static { capabilitiesStatement.setSoftware(software);}
@BeforeEach
public void beforeEach() {
context.txCache = terminologyCache;
context.expParameters = expParameters;
context.txClient = terminologyClient;
context.txLog = txLog;
}
private final static Map<String, String> params = new HashMap<>();
static {
params.put("_limit", Integer.toString(1000));
params.put("_incomplete", "true");
}
private final static Parameters pInWithDependentResources = new Parameters();
static {
pInWithDependentResources.addParameter("includeDefinition", false);
pInWithDependentResources.addParameter("excludeNester", false);
pInWithDependentResources.addParameter("incomplete-ok", true);
}
public class ValueSetMatcher implements ArgumentMatcher<ValueSet> {
private ValueSet left;
ValueSetMatcher(ValueSet left) {
this.left = left;
}
@Override
public boolean matches(ValueSet right) {
return left.getStatus().equals(right.getStatus())
&& left.getCompose().equalsDeep(right.getCompose());
}
}
public class ParametersMatcher implements ArgumentMatcher<Parameters> {
final private Parameters left;
ParametersMatcher(Parameters left) {
this.left = left;
}
@Override
public boolean matches(Parameters right) {
return left.equalsShallow(right);
}
}
@Test
public void testValidateCodingWithCache() throws IOException {
ValidationOptions validationOptions = new ValidationOptions().guessSystem().setVersionFlexible(false);
ValueSet valueSet = new ValueSet();
Coding coding = new Coding();
Mockito.doReturn(cacheToken).when(terminologyCache).generateValidationToken(validationOptions, coding, valueSet);
Mockito.doReturn(expectedValidationResult).when(terminologyCache).getValidation(cacheToken);
ValidationContextCarrier ctxt = mock(ValidationContextCarrier.class);
IWorkerContext.ValidationResult actualValidationResult = context.validateCode(validationOptions, coding, valueSet, ctxt);
assertEquals(expectedValidationResult, actualValidationResult);
Mockito.verify(valueSetCheckerSimple, times(0)).validateCode(coding);
Mockito.verify(terminologyCache).getValidation(cacheToken);
Mockito.verify(terminologyCache, times(0)).cacheValidation(any(), any(), anyBoolean());
}
@Test
public void testValidateCodingWithValueSetChecker() throws IOException {
ValidationOptions validationOptions = new ValidationOptions().guessSystem().setVersionFlexible(false);
ValueSet valueSet = new ValueSet();
Coding coding = new Coding();
Mockito.doReturn(cacheToken).when(terminologyCache).generateValidationToken(validationOptions, coding, valueSet);
Mockito.doReturn(valueSetCheckerSimple).when(context).constructValueSetCheckerSimple(any(), any(), any());
Mockito.doReturn(expectedValidationResult).when(valueSetCheckerSimple).validateCode(any(Coding.class));
ValidationContextCarrier ctxt = mock(ValidationContextCarrier.class);
IWorkerContext.ValidationResult actualValidationResult = context.validateCode(validationOptions, coding, valueSet, ctxt);
assertEquals(expectedValidationResult, actualValidationResult);
Mockito.verify(valueSetCheckerSimple).validateCode(coding);
Mockito.verify(terminologyCache).getValidation(cacheToken);
Mockito.verify(terminologyCache).cacheValidation(cacheToken, expectedValidationResult,false);
}
@Test
public void testValidateCodingWithServer() throws IOException {
ValidationOptions validationOptions = new ValidationOptions().guessSystem().setVersionFlexible(false).noClient();
ValueSet valueSet = new ValueSet();
Coding coding = new Coding();
Mockito.doReturn(cacheToken).when(terminologyCache).generateValidationToken(validationOptions, coding, valueSet);
Mockito.doReturn(pIn).when(context).constructParameters(validationOptions, coding);
Mockito.doReturn(expectedValidationResult).when(context).validateOnServer(valueSet, pIn, validationOptions);
ValidationContextCarrier ctxt = mock(ValidationContextCarrier.class);
IWorkerContext.ValidationResult actualValidationResult = context.validateCode(validationOptions, coding, valueSet, ctxt);
assertEquals(expectedValidationResult, actualValidationResult);
Mockito.verify(valueSetCheckerSimple, times(0)).validateCode(coding);
Mockito.verify(terminologyCache).getValidation(cacheToken);
Mockito.verify(terminologyCache).cacheValidation(cacheToken, expectedValidationResult,true);
}
@Test
public void testValidateCodableConceptWithCache() throws IOException {
CodeableConcept codeableConcept = new CodeableConcept();
ValueSet valueSet = new ValueSet();
Mockito.doReturn(cacheToken).when(terminologyCache).generateValidationToken(CacheTestUtils.validationOptions, codeableConcept, valueSet);
Mockito.doReturn(expectedValidationResult).when(terminologyCache).getValidation(cacheToken);
IWorkerContext.ValidationResult actualValidationResult = context.validateCode(CacheTestUtils.validationOptions, codeableConcept, valueSet);
assertEquals(expectedValidationResult, actualValidationResult);
Mockito.verify(valueSetCheckerSimple, times(0)).validateCode(codeableConcept);
Mockito.verify(terminologyCache).getValidation(cacheToken);
Mockito.verify(terminologyCache, times(0)).cacheValidation(any(), any(), anyBoolean());
}
@Test
public void testValidateCodableConceptWithValueSetChecker() throws IOException {
Mockito.doReturn(valueSetCheckerSimple).when(context).constructValueSetCheckerSimple(any(), any());
Mockito.doReturn(expectedValidationResult).when(valueSetCheckerSimple).validateCode(any(CodeableConcept.class));
CodeableConcept codeableConcept = new CodeableConcept();
ValueSet valueSet = new ValueSet();
Mockito.doReturn(cacheToken).when(terminologyCache).generateValidationToken(CacheTestUtils.validationOptions, codeableConcept, valueSet);
IWorkerContext.ValidationResult validationResultB = context.validateCode(CacheTestUtils.validationOptions, codeableConcept, valueSet);
assertEquals(expectedValidationResult, validationResultB);
Mockito.verify(valueSetCheckerSimple).validateCode(codeableConcept);
Mockito.verify(terminologyCache).cacheValidation(cacheToken, expectedValidationResult, false);
Mockito.verify(context, times(0)).validateOnServer(any(), any(), any());
}
@Test
public void testValidateCodableConceptWithServer() throws IOException {
CodeableConcept codeableConcept = new CodeableConcept();
ValueSet valueSet = new ValueSet();
ValidationOptions validationOptions = CacheTestUtils.validationOptions.noClient();
Mockito.doReturn(pIn).when(context).constructParameters(validationOptions, codeableConcept);
Mockito.doReturn(expectedValidationResult).when(context).validateOnServer(valueSet, pIn, validationOptions);
Mockito.doReturn(cacheToken).when(terminologyCache).generateValidationToken(validationOptions, codeableConcept, valueSet);
IWorkerContext.ValidationResult validationResultB = context.validateCode(validationOptions, codeableConcept, valueSet);
assertEquals(expectedValidationResult, validationResultB);
Mockito.verify(valueSetCheckerSimple, times(0)).validateCode(codeableConcept);
Mockito.verify(terminologyCache).cacheValidation(cacheToken, expectedValidationResult, true);
Mockito.verify(context).validateOnServer(valueSet, pIn, validationOptions);
}
@Test
public void testExpandValueSetWithCache() throws IOException {
ValueSet.ConceptSetComponent inc = new ValueSet.ConceptSetComponent();
ValueSet vs = new ValueSet();
vs.setStatus(Enumerations.PublicationStatus.ACTIVE);
vs.setCompose(new ValueSet.ValueSetComposeComponent());
vs.getCompose().getInclude().add(inc);
Mockito.doReturn(cacheToken).when(terminologyCache).generateExpandToken(argThat(new ValueSetMatcher(vs)),eq(true));
Mockito.doReturn(expectedExpansionResult).when(terminologyCache).getExpansion(cacheToken);
ValueSetExpander.ValueSetExpansionOutcome actualExpansionResult = context.expandVS(inc, true);
assertEquals(expectedExpansionResult, actualExpansionResult);
Mockito.verify(terminologyCache).getExpansion(cacheToken);
Mockito.verify(terminologyCache, times(0)).cacheExpansion(any(), any(), anyBoolean());
Mockito.verify(terminologyClient, times(0)).expandValueset(any(), any(), any());
}
@Test
public void testExpandValueSetWithClient() throws IOException {
ValueSet.ConceptSetComponent inc = new ValueSet.ConceptSetComponent();
ValueSet vs = new ValueSet();
vs.setStatus(Enumerations.PublicationStatus.ACTIVE);
vs.setCompose(new ValueSet.ValueSetComposeComponent());
vs.getCompose().getInclude().add(inc);
Mockito.doReturn(cacheToken).when(terminologyCache).generateExpandToken(argThat(new ValueSetMatcher(vs)),eq(true));
Mockito.doReturn(expParameters).when(context).constructParameters(argThat(new ValueSetMatcher(vs)), eq(true));
ValueSet expectedValueSet = new ValueSet();
Mockito.doReturn(expectedValueSet).when(terminologyClient).expandValueset(argThat(new ValueSetMatcher(vs)),
argThat(new ParametersMatcher(pInWithDependentResources)), eq(params));
ValueSetExpander.ValueSetExpansionOutcome actualExpansionResult = context.expandVS(inc, true);
assertEquals(expectedValueSet, actualExpansionResult.getValueset());
Mockito.verify(terminologyCache).getExpansion(cacheToken);
Mockito.verify(terminologyCache).cacheExpansion(cacheToken, actualExpansionResult,true);
}
@Test
public void testExpandValueSet4ArgsWithCache() throws IOException {
ValueSet vs = new ValueSet();
vs.setUrl(DUMMY_URL);
Mockito.doReturn(cacheToken).when(terminologyCache).generateExpandToken(vs,true);
Mockito.doReturn(expectedExpansionResult).when(terminologyCache).getExpansion(cacheToken);
Parameters pIn = new Parameters();
ValueSetExpander.ValueSetExpansionOutcome actualExpansionResult = context.expandVS(vs, true, true, true, pIn);
assertEquals(expectedExpansionResult, actualExpansionResult);
Mockito.verify(terminologyCache).getExpansion(cacheToken);
Mockito.verify(terminologyCache, times(0)).cacheExpansion(any(), any(), anyBoolean());
Mockito.verify(terminologyClient, times(0)).expandValueset(any(), any(), any());
}
@Test
public void testExpandValueSet4ArgsWithValueSetExpanderSimple() throws IOException {
ValueSet vs = new ValueSet();
vs.setUrl(DUMMY_URL);
Mockito.doReturn(cacheToken).when(terminologyCache).generateExpandToken(vs,true);
Parameters pIn = new Parameters();
Mockito.doReturn(vs).when(expectedExpansionResult).getValueset();
Mockito.doReturn(expectedExpansionResult).when(valueSetExpanderSimple).expand(eq(vs),
argThat(new ParametersMatcher(pInWithDependentResources)));
Mockito.doReturn(valueSetExpanderSimple).when(context).constructValueSetExpanderSimple();
ValueSetExpander.ValueSetExpansionOutcome actualExpansionResult = context.expandVS(vs, true, true, true, pIn);
assertEquals(expectedExpansionResult, actualExpansionResult);
Mockito.verify(terminologyCache).getExpansion(cacheToken);
Mockito.verify(terminologyCache).cacheExpansion(cacheToken, actualExpansionResult, false);
Mockito.verify(terminologyClient, times(0)).expandValueset(any(), any(), any());
}
@Test
public void testExpandValueSet4ArgsWithClient() throws IOException {
ValueSet vs = new ValueSet();
vs.setUrl(DUMMY_URL);
Mockito.doReturn(cacheToken).when(terminologyCache).generateExpandToken(vs,true);
Parameters pIn = new Parameters();
ValueSet expectedValueSet = new ValueSet();
expectedValueSet.setUrl("dummyUrl2");
Mockito.doReturn(expectedExpansionResult).when(valueSetExpanderSimple).expand(eq(vs),
argThat(new ParametersMatcher(pInWithDependentResources)));
Mockito.doReturn(valueSetExpanderSimple).when(context).constructValueSetExpanderSimple();
Mockito.doReturn(expectedValueSet).when(terminologyClient).expandValueset(eq(vs), argThat(new ParametersMatcher(pInWithDependentResources)), eq(params));
ValueSetExpander.ValueSetExpansionOutcome actualExpansionResult = context.expandVS(vs, true, true, true, pIn);
assertEquals(expectedValueSet, actualExpansionResult.getValueset());
Mockito.verify(terminologyCache).getExpansion(cacheToken);
Mockito.verify(terminologyCache).cacheExpansion(cacheToken, actualExpansionResult, true);
}
@Test
public void testInitializationWithCache() {
Mockito.doReturn(true).when(terminologyCache).hasTerminologyCapabilities();
Mockito.doReturn(true).when(terminologyCache).hasCapabilityStatement();
Mockito.doReturn(terminologyCapabilities).when(terminologyCache).getTerminologyCapabilities();
Mockito.doReturn(capabilitiesStatement).when(terminologyCache).getCapabilityStatement();
String actual = context.connectToTSServer(terminologyClient, null);
assertEquals("dummyVersion", actual);
Mockito.verify(terminologyCache).getTerminologyCapabilities();
Mockito.verify(terminologyCache).getCapabilityStatement();
Mockito.verify(terminologyClient, times(0)).getTerminologyCapabilities();
Mockito.verify(terminologyClient, times(0)).getCapabilitiesStatementQuick();
Mockito.verify(context).setTxCaps(terminologyCapabilities);
}
@Test
public void testInitializationWithClient() {
Mockito.doReturn(false).when(terminologyCache).hasTerminologyCapabilities();
Mockito.doReturn(false).when(terminologyCache).hasCapabilityStatement();
Mockito.doReturn(terminologyCapabilities).when(terminologyClient).getTerminologyCapabilities();
Mockito.doReturn(capabilitiesStatement).when(terminologyClient).getCapabilitiesStatementQuick();
String actual = context.connectToTSServer(terminologyClient, null);
assertEquals("dummyVersion", actual);
Mockito.verify(terminologyCache, times(0)).getTerminologyCapabilities();
Mockito.verify(terminologyCache, times(0)).getCapabilityStatement();
Mockito.verify(terminologyClient).getTerminologyCapabilities();
Mockito.verify(terminologyClient).getCapabilitiesStatementQuick();
Mockito.verify(context).setTxCaps(terminologyCapabilities);
}
}

View File

@ -0,0 +1,443 @@
package org.hl7.fhir.r5.context;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import org.hl7.fhir.r5.formats.IParser;
import org.hl7.fhir.r5.model.*;
import org.hl7.fhir.r5.terminologies.ValueSetExpander;
import org.hl7.fhir.utilities.validation.ValidationMessage;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.mock;
public class TerminologyCacheTests {
static final ValueSet.ConceptSetComponent include = new ValueSet.ConceptSetComponent();
static {
include.setSystem("dummyIncludeSystem");
include.setVersion("dummyIncludeVersion");
}
static final ValueSet.ConceptSetComponent exclude = new ValueSet.ConceptSetComponent();
static {
exclude.setSystem("dummyExcludeSystem");
exclude.setVersion("dummyExcludeVersion");
}
static final ValueSet.ValueSetExpansionContainsComponent containsComponent = new ValueSet.ValueSetExpansionContainsComponent();
static {
containsComponent.setSystem("dummyContainsSystem");
containsComponent.setVersion("dummyContainsVersion");
}
private JsonParser jsonParser = new JsonParser();
private JsonElement getJsonFromFile(String filename) throws URISyntaxException, IOException {
final Path path = Paths.get("src","test","resources", "context", filename);
final String stringValue = new String ( Files.readAllBytes(path));
return jsonParser.parse(stringValue);
};
private TerminologyCache createTerminologyCache() throws IOException {
Object lock = new Object();
TerminologyCache terminologyCache = new TerminologyCache(lock, null);
return terminologyCache;
}
public Path createTempCacheDirectory() throws IOException {
Path tmp = Files.createTempDirectory("integrationTestCache");
tmp.toFile().deleteOnExit();
return tmp;
}
public void deleteTempCacheDirectory(Path path) {
File directory = new File(path.toUri());
for (File file : directory.listFiles()) {
file.delete();
}
}
@Test
public void testCachePersistence() throws IOException, URISyntaxException {
Object lock = new Object();
Path tempCacheDirectory = createTempCacheDirectory();
ValueSet valueSet = new ValueSet();
valueSet.setUrl("dummyValueSetURL");
TerminologyCapabilities terminologyCapabilities = new TerminologyCapabilities();
terminologyCapabilities.getExpansion().setParameter(Arrays.asList());
CapabilityStatement.CapabilityStatementSoftwareComponent software = new CapabilityStatement.CapabilityStatementSoftwareComponent();
software.setVersion("dummyVersion");
CapabilityStatement capabilityStatement = new CapabilityStatement();
capabilityStatement.setSoftware(software);
Coding coding = new Coding();
coding.setCode("dummyCode");
CodeableConcept concept = new CodeableConcept();
concept.addCoding(new Coding().setCode("dummyCode"));
ValueSet ccvalueSet = new ValueSet();
// Add dummy results to the cache
TerminologyCache terminologyCacheA = new TerminologyCache(lock, tempCacheDirectory.toString());
terminologyCacheA.cacheTerminologyCapabilities(terminologyCapabilities);
terminologyCacheA.cacheCapabilityStatement(capabilityStatement);
IWorkerContext.ValidationResult codingResultA = new IWorkerContext.ValidationResult(ValidationMessage.IssueSeverity.INFORMATION, "dummyInfo");
TerminologyCache.CacheToken codingTokenA = terminologyCacheA.generateValidationToken(CacheTestUtils.validationOptions,
coding, valueSet);
terminologyCacheA.cacheValidation(codingTokenA, codingResultA, true);
IWorkerContext.ValidationResult codeableConceptResultA = new IWorkerContext.ValidationResult(ValidationMessage.IssueSeverity.INFORMATION, "dummyInfo");
TerminologyCache.CacheToken codeableConceptTokenA = terminologyCacheA.generateValidationToken(CacheTestUtils.validationOptions,
concept, valueSet);
terminologyCacheA.cacheValidation(codeableConceptTokenA, codeableConceptResultA, true);
TerminologyCache.CacheToken expansionTokenA = terminologyCacheA.generateExpandToken(valueSet, true);
ValueSetExpander.ValueSetExpansionOutcome expansionOutcomeA = new ValueSetExpander.ValueSetExpansionOutcome(valueSet);
terminologyCacheA.cacheExpansion(expansionTokenA, expansionOutcomeA, true);
// Check that the in-memory cache is returning what we put in
{
assertEquals(terminologyCapabilities, terminologyCacheA.getTerminologyCapabilities());
assertEquals(capabilityStatement, terminologyCacheA.getCapabilityStatement());
assertValidationResultEquals(codingResultA, terminologyCacheA.getValidation(codingTokenA));
assertValidationResultEquals(codeableConceptResultA, terminologyCacheA.getValidation(codeableConceptTokenA));
assertExpansionOutcomeEquals(expansionOutcomeA,terminologyCacheA.getExpansion(expansionTokenA));
}
//Create another cache using the same directory, and check that it gives the same results.
{
TerminologyCache terminologyCacheB = new TerminologyCache(lock, tempCacheDirectory.toString());
assertCanonicalResourceEquals(terminologyCapabilities, terminologyCacheB.getTerminologyCapabilities());
assertCanonicalResourceEquals(capabilityStatement, terminologyCacheB.getCapabilityStatement());
assertValidationResultEquals(codingResultA, terminologyCacheB.getValidation(terminologyCacheA.generateValidationToken(CacheTestUtils.validationOptions,
coding, valueSet)));
assertValidationResultEquals(codeableConceptResultA, terminologyCacheB.getValidation(terminologyCacheA.generateValidationToken(CacheTestUtils.validationOptions,
concept, valueSet)));
assertExpansionOutcomeEquals(expansionOutcomeA,terminologyCacheB.getExpansion(terminologyCacheA.generateExpandToken(valueSet, true)));
}
deleteTempCacheDirectory(tempCacheDirectory);
}
private void assertCanonicalResourceEquals(CanonicalResource a, CanonicalResource b) {
assertTrue(a.equalsDeep(b));
}
private void assertValidationResultEquals(IWorkerContext.ValidationResult a, IWorkerContext.ValidationResult b) {
assertEquals(a.getSeverity(), b.getSeverity());
assertEquals(a.getMessage(), b.getMessage());
}
private void assertExpansionOutcomeEquals(ValueSetExpander.ValueSetExpansionOutcome a, ValueSetExpander.ValueSetExpansionOutcome b) {
assertEquals(a.getValueset().getUrl(), b.getValueset().getUrl());
}
@Test
public void testCodingCacheTokenGeneration() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
ValueSet valueSet = new ValueSet();
Coding coding = new Coding();
coding.setCode("dummyCode");
TerminologyCache.CacheToken cacheToken = terminologyCache.generateValidationToken(CacheTestUtils.validationOptions,
coding, valueSet );
JsonElement actual = jsonParser.parse(cacheToken.getRequest());
JsonElement expected = getJsonFromFile("codingEmptyValueSet.json");
assertEquals(expected, actual);
assertEquals(terminologyCache.hashJson(expected.toString()), terminologyCache.hashJson(actual.toString()));
}
@Test
public void testCodingWithSystemCacheTokenGeneration() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
ValueSet valueSet = new ValueSet();
Coding coding = new Coding();
coding.setCode("dummyCode");
coding.setSystem("dummySystem");
coding.setVersion("dummyVersion");
TerminologyCache.CacheToken cacheToken = terminologyCache.generateValidationToken(CacheTestUtils.validationOptions,
coding, valueSet );
JsonElement actual = jsonParser.parse(cacheToken.getRequest());
JsonElement expected = getJsonFromFile("codingEmptyValueSetSystem.json");
assertEquals(expected, actual);
assertEquals(terminologyCache.hashJson(expected.toString()), terminologyCache.hashJson(actual.toString()));
}
@Test
public void testCodingWithSystemCacheTokenGenerationNoSystem() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
ValueSet valueSet = new ValueSet();
Coding coding = new Coding();
coding.setCode("dummyCode");
TerminologyCache.CacheToken cacheToken = terminologyCache.generateValidationToken(CacheTestUtils.validationOptions,
coding, valueSet);
assertEquals("all-systems", cacheToken.getName());
assertFalse(cacheToken.hasVersion());
}
@Test
public void testCodingWithSystemCacheTokenGenerationWithSystem() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
ValueSet valueSet = new ValueSet();
Coding coding = new Coding();
coding.setCode("dummyCode");
coding.setSystem("dummySystem");
coding.setVersion("dummyVersion");
TerminologyCache.CacheToken cacheToken = terminologyCache.generateValidationToken(CacheTestUtils.validationOptions,
coding, valueSet);
assertEquals("dummySystem", cacheToken.getName());
assertTrue(cacheToken.hasVersion());
}
@Test
public void testCodableConceptCacheTokenGeneration() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
CodeableConcept concept = new CodeableConcept();
concept.addCoding(new Coding().setCode("dummyCode"));
ValueSet valueSet = new ValueSet();
TerminologyCache.CacheToken cacheToken = terminologyCache.generateValidationToken(CacheTestUtils.validationOptions,
concept, valueSet );
assertNull(cacheToken.getName());
assertEquals(false, cacheToken.hasVersion());
JsonElement actual = jsonParser.parse(cacheToken.getRequest());
JsonElement expected = getJsonFromFile("codableConceptEmptyValueSet.json");
assertEquals(expected, actual);
assertEquals(terminologyCache.hashJson(expected.toString()), terminologyCache.hashJson(actual.toString()));
}
@Test
public void testCodableConceptCacheTokenGenerationWithSystem() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
CodeableConcept concept = new CodeableConcept();
Coding coding = new Coding().setCode("dummyCode");
coding.setSystem("dummySystem");
coding.setVersion("dummyVersion");
concept.addCoding(coding);
ValueSet valueSet = new ValueSet();
TerminologyCache.CacheToken cacheToken = terminologyCache.generateValidationToken(CacheTestUtils.validationOptions,
concept, valueSet);
assertEquals("dummySystem", cacheToken.getName());
assertEquals(true, cacheToken.hasVersion());
JsonElement actual = jsonParser.parse(cacheToken.getRequest());
JsonElement expected = getJsonFromFile("codableConceptEmptyValueSetSystem.json");
assertEquals(expected, actual);
assertEquals(terminologyCache.hashJson(expected.toString()), terminologyCache.hashJson(actual.toString()));
}
@Test
public void testCodableConceptCacheTokenGenerationNoSystem() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
CodeableConcept concept = new CodeableConcept();
Coding coding = new Coding().setCode("dummyCode");
concept.addCoding(coding);
ValueSet valueSet = new ValueSet();
TerminologyCache.CacheToken cacheToken = terminologyCache.generateValidationToken(CacheTestUtils.validationOptions,
concept, valueSet);
assertNull(cacheToken.getName());
assertFalse(cacheToken.hasVersion());
}
private static Stream<Arguments> getExpansionTokenParams() {
ValueSet baseValueSet = new ValueSet();
baseValueSet.setUrl("dummyUrl");
ValueSet withInclude = baseValueSet.copy();
withInclude.getCompose().setInclude(Arrays.asList(include));
ValueSet withExclude = baseValueSet.copy();
withExclude.getCompose().setExclude(Arrays.asList(exclude));
ValueSet withExpansion = baseValueSet.copy();
withExpansion.getExpansion().setContains(Arrays.asList(containsComponent));
ValueSet allSystem = baseValueSet.copy();
allSystem.getCompose().setExclude(Arrays.asList(exclude));
allSystem.getExpansion().setContains(Arrays.asList(containsComponent));
return Stream.of(
Arguments.of(baseValueSet, null, false),
Arguments.of(withInclude, "dummyIncludeSystem", true),
Arguments.of(withExclude, "dummyExcludeSystem", true),
Arguments.of(withExpansion, "dummyContainsSystem", true),
// Essentially, if more than one system is used, we're switching to 'all-systems'
Arguments.of(allSystem, "all-systems", true)
);
}
@ParameterizedTest
@MethodSource("getExpansionTokenParams")
public void testExpansionTokenInclude(ValueSet valueSet, String expectedName, boolean expectedHasVersion) throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
TerminologyCache.CacheToken expansionToken = terminologyCache.generateExpandToken(valueSet, false);
TerminologyCache.CacheToken expansionTokenHierarchical = terminologyCache.generateExpandToken(valueSet, true);
assertEquals(expectedName, expansionToken.getName());
assertEquals(expectedName, expansionTokenHierarchical.getName());
assertEquals(expectedHasVersion, expansionToken.hasVersion());
assertEquals(expectedHasVersion, expansionTokenHierarchical.hasVersion());
}
@Test
public void testExpansionToken() throws IOException, URISyntaxException {
TerminologyCache terminologyCache = createTerminologyCache();
ValueSet valueSet = new ValueSet();
valueSet.setUrl("dummyUrl");
valueSet.getCompose().setInclude(Arrays.asList(include));
valueSet.getCompose().setExclude(Arrays.asList(exclude));
valueSet.getExpansion().setContains(Arrays.asList(containsComponent));
TerminologyCache.CacheToken expansionToken = terminologyCache.generateExpandToken(valueSet, false);
TerminologyCache.CacheToken expansionTokenHierarchical = terminologyCache.generateExpandToken(valueSet, true);
JsonElement actualExpansion = jsonParser.parse(expansionToken.getRequest());
JsonElement expectedExpansion = getJsonFromFile("expansion.json");
assertEquals(expectedExpansion, actualExpansion);
JsonElement actualExpansionHierarchical = jsonParser.parse(expansionTokenHierarchical.getRequest());
JsonElement expectedExpansionHierarchical = getJsonFromFile("expansionHierarchical.json");
assertEquals(expectedExpansionHierarchical, actualExpansionHierarchical);
assertEquals(terminologyCache.hashJson(expectedExpansion.toString()),
terminologyCache.hashJson(actualExpansion.toString()));
assertEquals(terminologyCache.hashJson(expectedExpansionHierarchical.toString()),
terminologyCache.hashJson(actualExpansionHierarchical.toString()));
}
@Test
public void testGetVSEssence() throws IOException {
ValueSet.ValueSetExpansionParameterComponent vsepc = new ValueSet.ValueSetExpansionParameterComponent().setName("dummyValueSetExpansionParameterComponent");
ValueSet vs = new ValueSet();
vs.getExpansion().setParameter(Arrays.asList(vsepc));
vs.getExpansion().setContains(Arrays.asList(new ValueSet.ValueSetExpansionContainsComponent().setCode("dummyVSExpansionContainsComponent")));
vs.getExpansion().setIdentifier("dummyIdentifier");
vs.getExpansion().setTimestamp(new Date());
assertTrue(vs.getExpansion().hasIdentifier());
TerminologyCache cache = createTerminologyCache();
ValueSet vse = cache.getVSEssense(vs);
assertEquals(vs.getExpansion().getParameter(), vse.getExpansion().getParameter());
assertEquals(vs.getExpansion().getContains(), vse.getExpansion().getContains());
assertFalse(vse.getExpansion().hasIdentifier());
assertFalse(vse.getExpansion().hasTimestamp());
}
private List<ValueSet.ValueSetExpansionContainsComponent> createContainsArray(int size) {
return IntStream.range(0, size).boxed()
.map(value -> new ValueSet.ValueSetExpansionContainsComponent().setCode("dummyVSExpansionContainsComponent"
+ value)).collect(Collectors.toList());
}
private static Stream<Arguments> under1000IntParams() {
return getIntParams(0, 1000);
}
private static Stream<Arguments> over1000IntParams() {
return getIntParams(1001, 1100);
}
private static Stream<Arguments> getIntParams(int min, int max) {
return new Random().ints(5, min, max).boxed().map( value ->
Arguments.of(value)
);
}
@ParameterizedTest
@MethodSource("under1000IntParams")
public void testExtractedUnder1000(int max) throws IOException {
TerminologyCache cache = createTerminologyCache();
ValueSet vs = new ValueSet();
List<ValueSet.ValueSetExpansionContainsComponent> list = createContainsArray(max);
vs.setUrl("http://dummy.org");
vs.getExpansion().setContains(list);
org.hl7.fhir.r5.formats.JsonParser json = new org.hl7.fhir.r5.formats.JsonParser();
json.setOutputStyle(IParser.OutputStyle.PRETTY);
String extracted = cache.extracted(json, vs);
JsonElement element = jsonParser.parse(extracted);
assertEquals(max, element.getAsJsonObject().getAsJsonObject("expansion").getAsJsonArray("contains").size());
}
@ParameterizedTest
@MethodSource("over1000IntParams")
public void testExtractedOver1000(int max) throws IOException {
TerminologyCache cache = createTerminologyCache();
ValueSet vs = new ValueSet();
List<ValueSet.ValueSetExpansionContainsComponent> list = createContainsArray(max);
vs.setUrl("http://dummy.org");
vs.getExpansion().setContains(list);
org.hl7.fhir.r5.formats.JsonParser json = new org.hl7.fhir.r5.formats.JsonParser();
json.setOutputStyle(IParser.OutputStyle.PRETTY);
String extracted = cache.extracted(json, vs);
assertEquals("http://dummy.org", extracted);
}
}

View File

@ -27,7 +27,7 @@ public class CDARoundTripTests {
@BeforeAll
public static void setUp() throws Exception {
FilesystemPackageCacheManager pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
context = SimpleWorkerContext.fromPackage(pcm.loadPackage("hl7.fhir.r4.core", "4.0.1"));
context = TestingUtilities.getWorkerContext(pcm.loadPackage("hl7.fhir.r4.core", "4.0.1"));
fp = new FHIRPathEngine(context);
context.loadFromFile(TestingUtilities.loadTestResourceStream("validator", "cda", "any.xml"), "any.xml", null);

View File

@ -25,7 +25,7 @@ public class StructureMapUtilitiesTest implements ITransformerServices {
@BeforeAll
static public void setUp() throws Exception {
FilesystemPackageCacheManager pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
context = SimpleWorkerContext.fromPackage(pcm.loadPackage("hl7.fhir.r4.core", "4.0.1"));
context = TestingUtilities.getWorkerContext(pcm.loadPackage("hl7.fhir.r4.core", "4.0.1"));
}
@Test

View File

@ -25,7 +25,8 @@ public class XmlParserTests {
@BeforeAll
public static void setUp() throws Exception {
FilesystemPackageCacheManager pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
context = SimpleWorkerContext.fromPackage(pcm.loadPackage("hl7.fhir.r4.core", "4.0.1"));
context = TestingUtilities.getWorkerContext(pcm.loadPackage("hl7.fhir.r4.core", "4.0.1"));
fp = new FHIRPathEngine(context);
context.loadFromFile(TestingUtilities.loadTestResourceStream("validator", "cda", "any.xml"), "any.xml", null);

View File

@ -0,0 +1,18 @@
{
"code": {
"coding": [
{
"code": "dummyCode"
}
]
},
"valueSet": {
"resourceType": "ValueSet"
},
"lang": "null",
"useServer": "true",
"useClient": "true",
"guessSystem": "true",
"valueSetMode": "ALL_CHECKS",
"versionFlexible": "false"
}

View File

@ -0,0 +1,20 @@
{
"code": {
"coding": [
{
"system": "dummySystem",
"version": "dummyVersion",
"code": "dummyCode"
}
]
},
"valueSet": {
"resourceType": "ValueSet"
},
"lang": "null",
"useServer": "true",
"useClient": "true",
"guessSystem": "true",
"valueSetMode": "ALL_CHECKS",
"versionFlexible": "false"
}

View File

@ -0,0 +1 @@
{"code":{"code":"dummyCode"},"valueSet":{"resourceType":"ValueSet"},"lang":"null","useServer":"true","useClient":"true","guessSystem":"true","valueSetMode":"ALL_CHECKS","versionFlexible":"false"}

View File

@ -0,0 +1 @@
{"code":{"system":"dummySystem","version":"dummyVersion","code":"dummyCode"},"valueSet":{"resourceType":"ValueSet"},"lang":"null","useServer":"true","useClient":"true","guessSystem":"true","valueSetMode":"ALL_CHECKS","versionFlexible":"false"}

View File

@ -0,0 +1,28 @@
{
"hierarchical": false,
"valueSet": {
"resourceType": "ValueSet",
"compose": {
"include": [
{
"system": "dummyIncludeSystem",
"version": "dummyIncludeVersion"
}
],
"exclude": [
{
"system": "dummyExcludeSystem",
"version": "dummyExcludeVersion"
}
]
},
"expansion": {
"contains": [
{
"system": "dummyContainsSystem",
"version": "dummyContainsVersion"
}
]
}
}
}

View File

@ -0,0 +1,28 @@
{
"hierarchical": true,
"valueSet": {
"resourceType": "ValueSet",
"compose": {
"include": [
{
"system": "dummyIncludeSystem",
"version": "dummyIncludeVersion"
}
],
"exclude": [
{
"system": "dummyExcludeSystem",
"version": "dummyExcludeVersion"
}
]
},
"expansion": {
"contains": [
{
"system": "dummyContainsSystem",
"version": "dummyContainsVersion"
}
]
}
}
}

View File

@ -0,0 +1,18 @@
-------------------------------------------------------------------------------------
{"hierarchical" : false, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"include" : [{
"system" : "urn:iso:std:iso:4217"
}]
}
}}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/currencies", "version": "4.0.1"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "fr-CA"
}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"severity" : "error",
"error" : "Attempt to use Terminology server when no Terminology server is available",
"class" : "SERVER_ERROR"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,18 @@
-------------------------------------------------------------------------------------
{"hierarchical" : false, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"include" : [{
"system" : "urn:ietf:bcp:13"
}]
}
}}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.0.1"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,102 @@
-------------------------------------------------------------------------------------
{"hierarchical" : false, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"include" : [{
"system" : "http://unitsofmeasure.org",
"concept" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "second"
}],
"code" : "s",
"display" : "second",
"designation" : [{
"language" : "zh",
"value" : "秒"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "minute"
}],
"code" : "min",
"display" : "minute",
"designation" : [{
"language" : "zh",
"value" : "分钟"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "hour"
}],
"code" : "h",
"display" : "hour",
"designation" : [{
"language" : "zh",
"value" : "小时"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "day"
}],
"code" : "d",
"display" : "day",
"designation" : [{
"language" : "zh",
"value" : "天"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "week"
}],
"code" : "wk",
"display" : "week",
"designation" : [{
"language" : "zh",
"value" : "星期"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "month"
}],
"code" : "mo",
"display" : "month",
"designation" : [{
"language" : "zh",
"value" : "月"
}]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-concept-definition",
"valueString" : "year"
}],
"code" : "a",
"display" : "year",
"designation" : [{
"language" : "zh",
"value" : "年"
}]
}]
}]
}
}}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------
{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "4.0.1"}####
e: {
"error" : "java.lang.NullPointerException"
}
-------------------------------------------------------------------------------------

View File

@ -42,6 +42,13 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.0</version>
<optional>true</optional>
</dependency>
<!-- JSON Utilities -->
<dependency>
<groupId>com.google.code.gson</groupId>

View File

@ -0,0 +1,49 @@
package org.hl7.fhir.utilities;
import okhttp3.Interceptor;
import okhttp3.Response;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* An {@link Interceptor} for {@link okhttp3.OkHttpClient} that tracks visits to specific urls
*/
public class TxInterceptor implements Interceptor {
private String getKey(String method, String url) {
return method + " " + url;
}
private static TxInterceptor instance;
public static TxInterceptor getInstance() {
if (instance == null) {
instance = new TxInterceptor();
}
return instance;
}
final Map<String, Integer> queriedUrls;
private TxInterceptor() {
queriedUrls = new HashMap<>();
}
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Response response = chain.proceed(chain.request());
final String key = getKey(response.request().method(), response.request().url().toString());
final int count = queriedUrls.containsKey(key) ? queriedUrls.get(key) : 1;
queriedUrls.put(key, count+1);
System.out.print("");
return response;
}
}

View File

@ -163,6 +163,16 @@ public class NativeHostServices {
validator.connectToTSServer(txServer, log, FhirPublication.R5);
}
/**
* Set up the validator with a terminology service
*
* @param txServer - the URL of the terminology service (http://tx.fhir.org/r4 default)
* @throws Exception
*/
public void connectToTxSvc(String txServer, String log, String txCache) throws Exception {
validator.connectToTSServer(txServer, log, txCache, FhirPublication.R5);
}
/**
* get back a JSON object with information about the process.
* @return

View File

@ -195,18 +195,26 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
}
public ValidationEngine(String src, String txsrvr, String txLog, FhirPublication version, boolean canRunWithoutTerminologyServer, String vString, String userAgent) throws FHIRException, IOException, URISyntaxException {
this(src, txsrvr, txLog, null, version, canRunWithoutTerminologyServer, vString, userAgent);
}
public ValidationEngine(String src, String txsrvr, String txLog, String txCachePath, FhirPublication version, boolean canRunWithoutTerminologyServer, String vString, String userAgent) throws FHIRException, IOException, URISyntaxException {
loadCoreDefinitions(src, false, null);
getContext().setUserAgent(userAgent);
getContext().setCanRunWithoutTerminology(canRunWithoutTerminologyServer);
setTerminologyServer(txsrvr, txLog, version);
setTerminologyServer(txsrvr, txLog, txCachePath, version);
setVersion(vString);
igLoader = new IgLoader(getPcm(), getContext(), getVersion(), isDebug());
}
public ValidationEngine(String src, String txsrvr, String txLog, FhirPublication version, String vString, String userAgent) throws FHIRException, IOException, URISyntaxException {
public ValidationEngine(String src, String txsrvr, String txLog, FhirPublication version, String vString, String userAgent) throws FHIRException, IOException, URISyntaxException {
this(src, txsrvr, txLog, null, version, vString, userAgent);
}
public ValidationEngine(String src, String txsrvr, String txLog, String txCachePath, FhirPublication version, String vString, String userAgent) throws FHIRException, IOException, URISyntaxException {
loadCoreDefinitions(src, false, null);
getContext().setUserAgent(userAgent);
setTerminologyServer(txsrvr, txLog, version);
setTerminologyServer(txsrvr, txLog, txCachePath, version);
setVersion(vString);
igLoader = new IgLoader(getPcm(), getContext(), getVersion(), isDebug());
}
@ -280,7 +288,11 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
return ep;
}
public String connectToTSServer(String url, String log, FhirPublication version) throws URISyntaxException, FHIRException {
public String connectToTSServer(String url, String log, FhirPublication version) throws URISyntaxException, IOException, FHIRException {
return connectToTSServer(url, log, null, version);
}
public String connectToTSServer(String url, String log, String txCachePath, FhirPublication version) throws URISyntaxException, IOException, FHIRException {
context.setTlogging(false);
if (url == null) {
context.setCanRunWithoutTerminology(true);
@ -288,6 +300,10 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
return "n/a: No Terminology Server";
} else {
try {
//FIXME this can fail for a different reason than connectToTSServer
if (txCachePath != null) {
context.initTS(txCachePath);
}
return context.connectToTSServer(TerminologyClientFactory.makeClient(url, context.getUserAgent(), version), log);
} catch (Exception e) {
if (context.isCanRunWithoutTerminology()) {
@ -689,8 +705,12 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
throw new FHIRException("Source/Target version not supported: " + version + " -> " + targetVer);
}
public String setTerminologyServer(String src, String log, FhirPublication version) throws FHIRException, URISyntaxException {
return connectToTSServer(src, log, version);
public String setTerminologyServer(String src, String log, FhirPublication version) throws FHIRException, IOException, URISyntaxException {
return setTerminologyServer(src, log, null, version);
}
public String setTerminologyServer(String src, String log, String txCachePath, FhirPublication version) throws FHIRException, IOException, URISyntaxException {
return connectToTSServer(src, log, txCachePath, version);
}
public ValidationEngine setMapLog(String mapLog) throws FileNotFoundException {

View File

@ -58,6 +58,8 @@ public class CliContext {
private String sv = null;
@JsonProperty("txLog")
private String txLog = null;
@JsonProperty("txCache")
private String txCache = null;
@JsonProperty("mapLog")
private String mapLog = null;
@JsonProperty("lang")
@ -372,6 +374,17 @@ public class CliContext {
return this;
}
@JsonProperty("txCache")
public String getTxCache() {
return txCache;
}
@JsonProperty("txLog")
public CliContext setTxCache(String txCache) {
this.txCache = txCache;
return this;
}
@JsonProperty("mapLog")
public String getMapLog() {
return mapLog;

View File

@ -295,7 +295,7 @@ public class ValidationService {
System.out.println(" - " + validator.getContext().countAllCaches() + " resources (" + tt.milestone() + ")");
igLoader.loadIg(validator.getIgs(), validator.getBinaries(), "hl7.terminology", false);
System.out.print(" Terminology server " + cliContext.getTxServer());
String txver = validator.setTerminologyServer(cliContext.getTxServer(), cliContext.getTxLog(), ver);
String txver = validator.setTerminologyServer(cliContext.getTxServer(), cliContext.getTxLog(), cliContext.getTxCache(), ver);
System.out.println(" - Version " + txver + " (" + tt.milestone() + ")");
validator.setDebug(cliContext.isDoDebug());
for (String src : cliContext.getIgs()) {

View File

@ -37,6 +37,7 @@ public class Params {
public static final String SCAN = "-scan";
public static final String TERMINOLOGY = "-tx";
public static final String TERMINOLOGY_LOG = "-txLog";
public static final String TERMINOLOGY_CACHE = "-txCache";
public static final String LOG = "-log";
public static final String LANGUAGE = "-language";
public static final String IMPLEMENTATION_GUIDE = "-ig";
@ -228,7 +229,13 @@ public class Params {
throw new Error("Specified -txLog without indicating file");
else
cliContext.setTxLog(args[++i]);
} else if (args[i].equals(LOG)) {
} else if (args[i].equals(TERMINOLOGY_CACHE)) {
if (i + 1 == args.length)
throw new Error("Specified -txCache without indicating file");
else
cliContext.setTxCache(args[++i]);
}
else if (args[i].equals(LOG)) {
if (i + 1 == args.length)
throw new Error("Specified -log without indicating file");
else

View File

@ -55,6 +55,7 @@ import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.context.IWorkerContext.IContextResourceLoader;
import org.hl7.fhir.r5.context.SimpleWorkerContext;
import org.hl7.fhir.r5.model.Parameters;
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.utilities.CSFile;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
@ -86,7 +87,7 @@ public class UtilitiesXTests {
FilesystemPackageCacheManager pcm;
try {
pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
IWorkerContext fcontext = SimpleWorkerContext.fromPackage(pcm.loadPackage(VersionUtilities.packageForVersion(version), version), loaderForVersion(version));
IWorkerContext fcontext = TestingUtilities.getWorkerContext(pcm.loadPackage(VersionUtilities.packageForVersion(version), version), loaderForVersion(version));
fcontext.setUcumService(new UcumEssenceService(UtilitiesXTests.loadTestResourceStream("ucum", "ucum-essence.xml")));
fcontext.setExpansionProfile(new Parameters());
fcontexts.put(version, fcontext);

View File

@ -7,6 +7,7 @@ import org.hl7.fhir.validation.ValidationEngine;
import org.hl7.fhir.validation.cli.model.CliContext;
import org.hl7.fhir.validation.cli.model.FileInfo;
import org.hl7.fhir.validation.cli.model.ValidationRequest;
import org.hl7.fhir.validation.tests.utilities.TestConstants;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
@ -17,6 +18,7 @@ import org.mockito.Mockito;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@ -34,7 +36,7 @@ class ValidationServiceTest {
List<FileInfo> filesToValidate = new ArrayList<>();
filesToValidate.add(new FileInfo().setFileName("test_resource.json").setFileContent(resource).setFileType(Manager.FhirFormat.JSON.getExtension()));
ValidationRequest request = new ValidationRequest().setCliContext(new CliContext()).setFilesToValidate(filesToValidate);
ValidationRequest request = new ValidationRequest().setCliContext(new CliContext().setTxCache(Paths.get(TestConstants.TX_CACHE, "validationService").toString())).setFilesToValidate(filesToValidate);
// Validation run 1...nothing cached yet
myService.validateSources(request);
Mockito.verify(sessionCache, Mockito.times(1)).cacheSession(ArgumentMatchers.any(ValidationEngine.class));

View File

@ -3,8 +3,11 @@ package org.hl7.fhir.validation.tests;
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.validation.NativeHostServices;
import org.hl7.fhir.validation.tests.utilities.TestConstants;
import org.junit.jupiter.api.Test;
import java.nio.file.Paths;
public class NativeHostServiceTester {
@Test
@ -13,7 +16,7 @@ public class NativeHostServiceTester {
NativeHostServices svc = new NativeHostServices();
svc.init("hl7.fhir.r4.core#4.0.1");
svc.connectToTxSvc("http://tx.fhir.org/r4", null);
svc.connectToTxSvc("http://tx.fhir.org/r4", null, Paths.get(TestConstants.TX_CACHE, "nativeHost").toString());
System.out.println("base: "+svc.status());
svc.seeResource(TestingUtilities.loadTestResourceBytes("validator", "misc", "ValueSet-dicm-2-AnatomicModifier.json"), FhirFormat.JSON);

View File

@ -3,6 +3,8 @@ package org.hl7.fhir.validation.tests;
import java.util.ArrayList;
import java.util.List;
import org.hl7.fhir.utilities.tests.CacheVerificationLogger;
import org.hl7.fhir.validation.tests.utilities.TestConstants;
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
import org.hl7.fhir.r5.model.FhirPublication;
import org.hl7.fhir.r5.model.OperationOutcome;
@ -15,6 +17,8 @@ import org.hl7.fhir.validation.tests.utilities.TestUtilities;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class ValidationEngineTests {
public static final String DEF_TX = "http://tx.fhir.org";
@ -26,7 +30,9 @@ public class ValidationEngineTests {
public void testCurrentXml() throws Exception {
if (!TestUtilities.silent)
System.out.println("TestCurrentXml: Validate patient-example.xml in Current version");
ValidationEngine ve = new ValidationEngine("hl7.fhir.r4.core#4.0.1", DEF_TX, null, FhirPublication.R4, "4.0.1", "fhir/test-cases");
ValidationEngine ve = TestUtilities.getValidationEngine("hl7.fhir.r4.core#4.0.1", DEF_TX, null, FhirPublication.R4, "4.0.1", "fhir/test-cases");
CacheVerificationLogger logger = new CacheVerificationLogger();
ve.getContext().getTxClient().setLogger(logger);
OperationOutcome op = ve.validate(FhirFormat.XML, TestingUtilities.loadTestResourceStream("validator", "patient-example.xml"), null);
int e = errors(op);
int w = warnings(op);
@ -40,13 +46,16 @@ public class ValidationEngineTests {
Assertions.assertEquals(0, e);
Assertions.assertEquals(0, w);
Assertions.assertEquals(1, h);
assertTrue(logger.verifyHasNoRequests(), "Unexpected request to TX server");
}
@Test
public void testCurrentJson() throws Exception {
if (!TestUtilities.silent)
System.out.println("TestCurrentJson: Validate patient-example.json in Current version");
ValidationEngine ve = new ValidationEngine("hl7.fhir.r4.core#4.0.1", DEF_TX, null, FhirPublication.R4, "4.0.1", "fhir/test-cases");
ValidationEngine ve = TestUtilities.getValidationEngine("hl7.fhir.r4.core#4.0.1", DEF_TX, null, FhirPublication.R4, "4.0.1", "fhir/test-cases");
CacheVerificationLogger logger = new CacheVerificationLogger();
ve.getContext().getTxClient().setLogger(logger);
OperationOutcome op = ve.validate(FhirFormat.JSON, TestingUtilities.loadTestResourceStream("validator", "patient-example.json"), null);
int e = errors(op);
int w = warnings(op);
@ -54,6 +63,7 @@ public class ValidationEngineTests {
Assertions.assertEquals(0, e);
Assertions.assertEquals(0, w);
Assertions.assertEquals(1, h);
assertTrue(logger.verifyHasNoRequests(), "Unexpected request to TX server");
if (!TestUtilities.silent)
System.out.println(" .. done: " + Integer.toString(e) + " errors, " + Integer.toString(w) + " warnings, " + Integer.toString(h) + " information messages");
}
@ -66,8 +76,9 @@ public class ValidationEngineTests {
}
if (!TestUtilities.silent)
System.out.println("Test140: Validate patient-example.xml in v1.4.0 version");
ValidationEngine ve = new ValidationEngine("hl7.fhir.r2b.core#1.4.0", DEF_TX, null, FhirPublication.DSTU2016May, "1.4.0", "fhir/test-cases");
ve.getContext().setUserAgent("fhir/test-cases");
ValidationEngine ve = TestUtilities.getValidationEngine("hl7.fhir.r2b.core#1.4.0", DEF_TX, null, FhirPublication.DSTU2016May, "1.4.0", "fhir/test-cases");
CacheVerificationLogger logger = new CacheVerificationLogger();
ve.getContext().getTxClient().setLogger(logger);
OperationOutcome op = ve.validate(FhirFormat.XML, TestingUtilities.loadTestResourceStream("validator", "patient140.xml"), null);
if (!TestUtilities.silent)
for (OperationOutcomeIssueComponent iss : op.getIssue()) {
@ -79,6 +90,7 @@ public class ValidationEngineTests {
Assertions.assertEquals(1, e);
Assertions.assertEquals(0, w);
Assertions.assertEquals(0, h);
assertTrue(logger.verifyHasNoRequests(), "Unexpected request to TX server");
if (!TestUtilities.silent)
System.out.println(" .. done: " + Integer.toString(e) + " errors, " + Integer.toString(w) + " warnings, " + Integer.toString(h) + " information messages");
}
@ -91,8 +103,10 @@ public class ValidationEngineTests {
}
if (!org.hl7.fhir.validation.tests.utilities.TestUtilities.silent)
System.out.println("Test102: Validate patient-example.xml in v1.0.2 version");
ValidationEngine ve = new ValidationEngine("hl7.fhir.r2.core#1.0.2", DEF_TX, null, FhirPublication.DSTU2, "1.0.2", "fhir/test-cases");
ValidationEngine ve = TestUtilities.getValidationEngine("hl7.fhir.r2.core#1.0.2", DEF_TX, null, FhirPublication.DSTU2, "1.0.2", "fhir/test-cases");
ve.setNoInvariantChecks(true);
CacheVerificationLogger logger = new CacheVerificationLogger();
ve.getContext().getTxClient().setLogger(logger);
OperationOutcome op = ve.validate(FhirFormat.XML, TestingUtilities.loadTestResourceStream("validator", "patient102.xml"), null);
if (!TestUtilities.silent)
for (OperationOutcomeIssueComponent iss : op.getIssue()) {
@ -104,6 +118,7 @@ public class ValidationEngineTests {
Assertions.assertEquals(1, e);
Assertions.assertEquals(0, w);
Assertions.assertEquals(0, h);
assertTrue(logger.verifyHasNoRequests(), "Unexpected request to TX server");
if (!TestUtilities.silent)
System.out.println(" .. done: " + Integer.toString(e) + " errors, " + Integer.toString(w) + " warnings, " + Integer.toString(h) + " information messages");
}
@ -116,8 +131,10 @@ public class ValidationEngineTests {
}
if (!TestUtilities.silent)
System.out.println("TestObs102: Validate patient-example.xml in v1.0.2 version");
ValidationEngine ve = new ValidationEngine("hl7.fhir.r2.core#1.0.2", DEF_TX, null, FhirPublication.DSTU2, "1.0.2", "fhir/test-cases");
ValidationEngine ve = TestUtilities.getValidationEngine("hl7.fhir.r2.core#1.0.2", DEF_TX, null, FhirPublication.DSTU2, "1.0.2", "fhir/test-cases");
ve.setNoInvariantChecks(true);
CacheVerificationLogger logger = new CacheVerificationLogger();
ve.getContext().getTxClient().setLogger(logger);
OperationOutcome op = ve.validate(FhirFormat.JSON, TestingUtilities.loadTestResourceStream("validator", "observation102.json"), null);
if (!TestUtilities.silent)
for (OperationOutcomeIssueComponent iss : op.getIssue()) {
@ -129,6 +146,7 @@ public class ValidationEngineTests {
Assertions.assertEquals(1, e);
Assertions.assertEquals(0, w);
Assertions.assertEquals(1, h);
assertTrue(logger.verifyHasNoRequests(), "Unexpected request to TX server");
if (!TestUtilities.silent)
System.out.println(" .. done: " + Integer.toString(e) + " errors, " + Integer.toString(w) + " warnings, " + Integer.toString(h) + " information messages");
}
@ -138,7 +156,9 @@ public class ValidationEngineTests {
public void test301() throws Exception {
if (!TestUtilities.silent)
System.out.println("Test301: Validate observation301.xml against Core");
ValidationEngine ve = new ValidationEngine("hl7.fhir.r3.core#3.0.2", DEF_TX, null, FhirPublication.STU3, "3.0.2", "fhir/test-cases");
ValidationEngine ve = TestUtilities.getValidationEngine("hl7.fhir.r3.core#3.0.2", DEF_TX, null, FhirPublication.STU3, "3.0.2", "fhir/test-cases");
CacheVerificationLogger logger = new CacheVerificationLogger();
ve.getContext().getTxClient().setLogger(logger);
if (!TestUtilities.silent)
System.out.println(" .. load USCore");
OperationOutcome op = ve.validate(FhirFormat.XML, TestingUtilities.loadTestResourceStream("validator", "observation301.xml"), null);
@ -149,6 +169,7 @@ public class ValidationEngineTests {
int w = warnings(op);
int h = hints(op);
Assertions.assertEquals(0, e);
assertTrue(logger.verifyHasNoRequests(), "Unexpected request to TX server");
if (!TestUtilities.silent)
System.out.println(" .. done: " + Integer.toString(e) + " errors, " + Integer.toString(w) + " warnings, " + Integer.toString(h) + " information messages");
}
@ -157,7 +178,9 @@ public class ValidationEngineTests {
public void test301USCore() throws Exception {
if (!TestUtilities.silent)
System.out.println("Test301USCore: Validate patient300.xml against US-Core");
ValidationEngine ve = new ValidationEngine("hl7.fhir.r3.core#3.0.2", DEF_TX, null, FhirPublication.STU3, "3.0.2", "fhir/test-cases");
ValidationEngine ve = TestUtilities.getValidationEngine("hl7.fhir.r3.core#3.0.2", DEF_TX, null, FhirPublication.STU3, "3.0.2", "fhir/test-cases");
CacheVerificationLogger logger = new CacheVerificationLogger();
ve.getContext().getTxClient().setLogger(logger);
IgLoader igLoader = new IgLoader(ve.getPcm(), ve.getContext(), ve.getVersion(), true);
if (!TestUtilities.silent)
System.out.println(" .. load USCore");
@ -174,6 +197,7 @@ public class ValidationEngineTests {
Assertions.assertEquals(1, e);
Assertions.assertEquals(0, w);
Assertions.assertEquals(0, h);
assertTrue(logger.verifyHasNoRequests(), "Unexpected request to TX server");
if (!TestUtilities.silent)
System.out.println(" .. done: " + Integer.toString(e) + " errors, " + Integer.toString(w) + " warnings, " + Integer.toString(h) + " information messages");
}

View File

@ -15,6 +15,9 @@ import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.NotImplementedException;
import org.hl7.fhir.utilities.*;
import org.hl7.fhir.utilities.tests.CacheVerificationLogger;
import org.hl7.fhir.validation.tests.utilities.TestUtilities;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_10_50;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_14_50;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_50;
@ -53,11 +56,7 @@ import org.hl7.fhir.r5.utils.validation.BundleValidationRule;
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;
import org.hl7.fhir.r5.utils.validation.constants.ContainedReferenceValidationPolicy;
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
import org.hl7.fhir.utilities.SimpleHTTPClient;
import org.hl7.fhir.utilities.SimpleHTTPClient.HTTPResult;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.json.JSONUtil;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.validation.ValidationMessage;
@ -79,6 +78,8 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(Parameterized.class)
public class ValidationTests implements IEvaluationContext, IValidatorResourceFetcher, IValidationPolicyAdvisor {
@ -112,6 +113,8 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
private String name;
private static Map<String, ValidationEngine> ve = new HashMap<>();
private static ValidationEngine vCurr;
private static IgLoader igLoader;
@ -123,8 +126,9 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
@SuppressWarnings("deprecation")
@Test
public void test() throws Exception {
CacheVerificationLogger logger = new CacheVerificationLogger();
long setup = System.nanoTime();
this.content = content;
this.name = name;
System.out.println("---- " + name + " ----------------------------------------------------------------");
System.out.println("** Core: ");
@ -141,22 +145,22 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
version = VersionUtilities.getMajMin(version);
if (!ve.containsKey(version)) {
if (version.startsWith("5.0"))
ve.put(version, new ValidationEngine("hl7.fhir.r5.core#4.5.0", ValidationEngineTests.DEF_TX, txLog, FhirPublication.R5, true, "4.5.0", "fhir/test-cases"));
ve.put(version, TestUtilities.getValidationEngine("hl7.fhir.r5.core#4.5.0", ValidationEngineTests.DEF_TX, txLog, FhirPublication.R5, true, "4.5.0", "fhir/test-cases"));
else if (version.startsWith("4.3"))
ve.put(version, new ValidationEngine("hl7.fhir.r4b.core#4.3.0", ValidationEngineTests.DEF_TX, txLog, FhirPublication.R4B, true, "4.3.0", "fhir/test-cases"));
ve.put(version, TestUtilities.getValidationEngine("hl7.fhir.r4b.core#4.3.0", ValidationEngineTests.DEF_TX, txLog, FhirPublication.R4B, true, "4.3.0", "fhir/test-cases"));
else if (version.startsWith("4.0"))
ve.put(version, new ValidationEngine("hl7.fhir.r4.core#4.0.1", ValidationEngineTests.DEF_TX, txLog, FhirPublication.R4, true, "4.0.1", "fhir/test-cases"));
ve.put(version, TestUtilities.getValidationEngine("hl7.fhir.r4.core#4.0.1", ValidationEngineTests.DEF_TX, txLog, FhirPublication.R4, true, "4.0.1", "fhir/test-cases"));
else if (version.startsWith("3.0"))
ve.put(version, new ValidationEngine("hl7.fhir.r3.core#3.0.2", ValidationEngineTests.DEF_TX, txLog, FhirPublication.STU3, true, "3.0.2", "fhir/test-cases"));
else if (version.startsWith("1.0"))
ve.put(version, new ValidationEngine("hl7.fhir.r2.core#1.0.2", ValidationEngineTests.DEF_TX, txLog, FhirPublication.DSTU2, true, "1.0.2", "fhir/test-cases"));
ve.put(version, TestUtilities.getValidationEngine("hl7.fhir.r3.core#3.0.2", ValidationEngineTests.DEF_TX, txLog, FhirPublication.STU3, true, "3.0.2", "fhir/test-cases"));
else if (version.startsWith("1.4"))
ve.put(version, new ValidationEngine("hl7.fhir.r2b.core#1.4.0", ValidationEngineTests.DEF_TX, txLog, FhirPublication.DSTU2016May, true, "1.4.0", "fhir/test-cases"));
ve.put(version, TestUtilities.getValidationEngine("hl7.fhir.r2b.core#1.4.0", ValidationEngineTests.DEF_TX, txLog, FhirPublication.DSTU2016May, true, "1.4.0", "fhir/test-cases"));
else if (version.startsWith("1.0"))
ve.put(version, TestUtilities.getValidationEngine("hl7.fhir.r2.core#1.0.2", ValidationEngineTests.DEF_TX, txLog, FhirPublication.DSTU2, true, "1.0.2", "fhir/test-cases"));
else
throw new Exception("unknown version " + version);
}
vCurr = ve.get(version);
vCurr.getContext().setUserAgent("fhir/test-cases");
vCurr.getContext().getTxClient().setLogger(logger);
igLoader = new IgLoader(vCurr.getPcm(), vCurr.getContext(), vCurr.getVersion(), true);
if (TestingUtilities.fcontexts == null) {
TestingUtilities.fcontexts = new HashMap<>();
@ -330,8 +334,10 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
}
checkOutcomes(errorsLogical, logical, "logical", name);
}
logger.verifyHasNoRequests();
}
private FhirFormat determineFormat(JsonObject config, byte[] cnt) throws IOException {
String name = JSONUtil.str(config, "file");
return org.hl7.fhir.validation.ResourceChecker.checkIsResource(vCurr.getContext(), true, cnt, name, !JSONUtil.bool(config, "guess-format"));

View File

@ -0,0 +1,9 @@
package org.hl7.fhir.validation.tests.utilities;
import java.nio.file.Paths;
public class TestConstants {
public static final java.lang.String TX_CACHE = Paths.get("src","test","resources", "txCache").toAbsolutePath().toString();
public static final java.lang.String TX_CACHE_LOG = Paths.get(System.getProperty("user.dir"), "tx.log.html").toAbsolutePath().toString();
}

View File

@ -1,5 +1,11 @@
package org.hl7.fhir.validation.tests.utilities;
import org.hl7.fhir.r5.context.TerminologyCache;
import org.hl7.fhir.r5.model.FhirPublication;
import org.hl7.fhir.validation.ValidationEngine;
import java.nio.file.Paths;
public class TestUtilities {
public static boolean silent = false;
@ -7,5 +13,19 @@ public class TestUtilities {
// public static String resourceNameToFile(String name) throws IOException {
// return org.hl7.fhir.utilities.Utilities.path(System.getProperty("user.dir"), "src", "test", "resources", name);
// }
public static final ValidationEngine getValidationEngine(java.lang.String src, java.lang.String txsrvr, java.lang.String txLog, FhirPublication version, boolean canRunWithoutTerminologyServer, java.lang.String vString, java.lang.String userAgent) throws Exception {
txLog = TestConstants.TX_CACHE_LOG;
final ValidationEngine validationEngine = new ValidationEngine(src, txsrvr, txLog, Paths.get(TestConstants.TX_CACHE, vString).toString(), version, canRunWithoutTerminologyServer, vString, userAgent);
TerminologyCache.setCacheErrors(true);
validationEngine.getContext().setUserAgent("fhir/test-cases");
return validationEngine;
}
public static ValidationEngine getValidationEngine(java.lang.String src, java.lang.String txsrvr, java.lang.String txLog, FhirPublication version, java.lang.String vString, java.lang.String userAgent) throws Exception {
txLog = TestConstants.TX_CACHE_LOG;
final ValidationEngine validationEngine = new ValidationEngine(src, txsrvr, txLog, Paths.get(TestConstants.TX_CACHE, vString).toString(), version, vString, userAgent);
TerminologyCache.setCacheErrors(true);
validationEngine.getContext().setUserAgent("fhir/test-cases");
return validationEngine;
}
}

View File

@ -0,0 +1,39 @@
{
"resourceType" : "CapabilityStatement",
"id" : "FhirServer",
"meta" : {
"tag" : [{
"system" : "http://hl7.org/fhir/v3/ObservationValue",
"code" : "SUBSETTED",
"display" : "Subsetted"
}]
},
"extension" : [{
"url" : "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown",
"valueCode" : "both"
}],
"url" : "http://fhir.healthintersections.com.au/open/metadata",
"version" : "1.0.2-2.0.12-SNAPSHOT",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-01-06T15:44:28.286Z",
"contact" : [{
"telecom" : [{
"system" : "other",
"value" : "http://healthintersections.com.au/"
}]
}],
"description" : "Standard Conformance Statement for the open source Reference FHIR Server provided by Health Intersections",
"kind" : "instance",
"software" : {
"name" : "Reference Server",
"version" : "2.0.12-SNAPSHOT",
"releaseDate" : "2021-12-20T02:28:03.769Z"
},
"fhirVersion" : "1.0.2",
"format" : ["application/xml+fhir",
"application/json+fhir"],
"rest" : [{
"mode" : "server"
}]
}

View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "3141-9",
"display" : "Weight Measured"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Body weight Measured",
"code" : "3141-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "27113001",
"display" : "Body weight"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Body weight",
"code" : "27113001",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "[lb_av]"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "[lb_av]",
"code" : "[lb_av]",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,66 @@
{
"resourceType" : "CapabilityStatement",
"id" : "FhirServer",
"meta" : {
"tag" : [{
"system" : "http://hl7.org/fhir/v3/ObservationValue",
"code" : "SUBSETTED",
"display" : "Subsetted"
}]
},
"extension" : [{
"url" : "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown",
"valueCode" : "both"
}],
"url" : "http://fhir.healthintersections.com.au/open/metadata",
"version" : "3.0.2-2.0.12-SNAPSHOT",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-01-10T11:02:52.097Z",
"contact" : [{
"telecom" : [{
"system" : "other",
"value" : "http://healthintersections.com.au/"
}]
}],
"kind" : "instance",
"instantiates" : ["http://hl7.org/fhir/CapabilityStatement/terminology-server"],
"software" : {
"name" : "Reference Server",
"version" : "2.0.12-SNAPSHOT",
"releaseDate" : "2021-12-20T02:28:03.769Z"
},
"fhirVersion" : "3.0.2",
"format" : ["application/fhir+xml",
"application/fhir+json"],
"rest" : [{
"mode" : "server",
"security" : {
"cors" : true
},
"operation" : [{
"name" : "expand",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand"
},
{
"name" : "lookup",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-lookup"
},
{
"name" : "validate-code",
"definition" : "http://hl7.org/fhir/OperationDefinition/Resource-validate"
},
{
"name" : "translate",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-translate"
},
{
"name" : "closure",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-closure"
},
{
"name" : "versions",
"definition" : "/OperationDefinition/fso-versions"
}]
}]
}

View File

@ -0,0 +1,66 @@
{
"resourceType" : "CapabilityStatement",
"id" : "FhirServer",
"meta" : {
"tag" : [{
"system" : "http://hl7.org/fhir/v3/ObservationValue",
"code" : "SUBSETTED",
"display" : "Subsetted"
}]
},
"extension" : [{
"url" : "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown",
"valueCode" : "both"
}],
"url" : "http://fhir.healthintersections.com.au/open/metadata",
"version" : "3.0.2-2.0.12-SNAPSHOT",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-01-10T11:02:52.097Z",
"contact" : [{
"telecom" : [{
"system" : "other",
"value" : "http://healthintersections.com.au/"
}]
}],
"kind" : "instance",
"instantiates" : ["http://hl7.org/fhir/CapabilityStatement/terminology-server"],
"software" : {
"name" : "Reference Server",
"version" : "2.0.12-SNAPSHOT",
"releaseDate" : "2021-12-20T02:28:03.769Z"
},
"fhirVersion" : "3.0.2",
"format" : ["application/fhir+xml",
"application/fhir+json"],
"rest" : [{
"mode" : "server",
"security" : {
"cors" : true
},
"operation" : [{
"name" : "expand",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand"
},
{
"name" : "lookup",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-lookup"
},
{
"name" : "validate-code",
"definition" : "http://hl7.org/fhir/OperationDefinition/Resource-validate"
},
{
"name" : "translate",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-translate"
},
{
"name" : "closure",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-closure"
},
{
"name" : "versions",
"definition" : "/OperationDefinition/fso-versions"
}]
}]
}

View File

@ -0,0 +1,80 @@
-------------------------------------------------------------------------------------
{"code" : {
"code" : "fi"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "3.0.2", "lang":"fi", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Finnish",
"code" : "fi",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "d"
}, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "天",
"code" : "d",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "image/jpg"
}, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"include" : [{
"system" : "urn:ietf:bcp:13"
}]
}
}, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "image/jpg",
"code" : "image/jpg",
"system" : "urn:ietf:bcp:13"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "application/pdf"
}, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"include" : [{
"system" : "urn:ietf:bcp:13"
}]
}
}, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "application/pdf",
"code" : "application/pdf",
"system" : "urn:ietf:bcp:13"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "de-CH"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "German (Switzerland)",
"code" : "de-CH",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "US",
"display" : "United States of America"
}, "url": "http://hl7.org/fhir/ValueSet/jurisdiction", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "United States of America",
"code" : "US",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "en"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "3.0.2", "lang":"en", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "English",
"code" : "en",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,84 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "NL"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Netherlands",
"code" : "NL",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "NL",
"display" : "Netherlands"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Netherlands",
"code" : "NL",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "NL",
"display" : "Netherlands"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Netherlands",
"code" : "NL",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "NL"
}, "url": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.2--20171231000000--0", "version": "2017-12-31T00:00:00", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Netherlands",
"code" : "NL",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "NL"
}, "url": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.2--20171231000000--0", "version": "2017-12-31T00:00:00", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Netherlands",
"code" : "NL",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "NL",
"display" : "Netherlands"
}, "url": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.2--20171231000000", "version": "2017-12-31T00:00:00", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Netherlands",
"code" : "NL",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "US"
}, "url": "http://hl7.org/fhir/ValueSet/jurisdiction--0", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "United States of America",
"code" : "US",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "US"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "United States of America",
"code" : "US",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,309 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "19935-6",
"display" : "Maximum expiratory gas flow Respiratory system airway by Peak flow meter"
}, "valueSet" :null, "lang":"fi", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Maximum expiratory gas flow Respiratory system airway by Peak flow meter",
"code" : "19935-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "19935-6"
}, "url": "http://phr.kanta.fi/ValueSet/fiphr-vs-vitalsigns--0", "version": "0.03", "lang":"fi", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "ei käännetty",
"code" : "19935-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "19935-6",
"display" : "Maximum expiratory gas flow Respiratory system airway by Peak flow meter"
}, "url": "http://phr.kanta.fi/ValueSet/fiphr-vs-vitalsigns", "version": "0.03", "lang":"fi", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Maximum expiratory gas flow Respiratory system airway by Peak flow meter",
"code" : "19935-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "19935-6"
}, "valueSet" :null, "lang":"fi", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Maximum expiratory gas flow Respiratory system airway by Peak flow meter",
"code" : "19935-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "28655-9"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Attending Discharge summary",
"code" : "28655-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "28655-9"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Attending Discharge summary",
"code" : "28655-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "28655-9"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Attending Discharge summary",
"code" : "28655-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "29299-5",
"display" : "Reason for visit Narrative"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Reason for visit Narrative",
"code" : "29299-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "10183-2",
"display" : "Hospital discharge medications Narrative"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Hospital discharge medications Narrative",
"code" : "10183-2",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "48765-2",
"display" : "Allergies and adverse reactions Document"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Allergies and adverse reactions Document",
"code" : "48765-2",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "46241-6"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Hospital admission diagnosis Narrative - Reported",
"code" : "46241-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18842-5"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Discharge summary",
"code" : "18842-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18842-5",
"display" : "Discharge Summary"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "3.0.2", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Discharge summary",
"code" : "18842-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18842-5"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Discharge summary",
"code" : "18842-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "48765-2",
"display" : "Allergies"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Allergies and adverse reactions Document",
"code" : "48765-2",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Allergies\" is not a valid display for the code {http://loinc.org}48765-2 - should be one of ['Allergies and adverse reactions Document', 'Allergies &or adverse reactions Doc', '临床文档型' (zh-CN), '临床文档' (zh-CN), '文档' (zh-CN), '文书' (zh-CN), '医疗文书' (zh-CN), '临床医疗文书 医疗服务对象' (zh-CN), '客户' (zh-CN), '病人' (zh-CN), '病患' (zh-CN), '病号' (zh-CN), '超系统 - 病人 发现是一个原子型临床观察指标,并不是作为印象的概括陈述。体格检查、病史、系统检查及其他此类观察指标的属性均为发现。它们的标尺对于编码型发现可能是名义型,而对于叙述型文本之中所报告的发现,则可能是叙述型。' (zh-CN), '发现物' (zh-CN), '所见' (zh-CN), '结果' (zh-CN), '结论 变态反应与不良反应 文档.其他' (zh-CN), '杂项类文档' (zh-CN), '其他文档 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 杂项' (zh-CN), '杂项类' (zh-CN), '杂项试验 过敏反应' (zh-CN), '过敏' (zh-CN), '' (zh-CN), 'Allergie e reazioni avverse Documentazione miscellanea Miscellanea Osservazione paziente Punto nel tempo (episodio)' (it-IT), 'Документ Точка во времени' (ru-RU), 'Момент' (ru-RU)] (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8648-8",
"display" : "Hospital course Narrative"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Hospital course Narrative",
"code" : "8648-8",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "78375-3",
"display" : "Discharge diagnosis Narrative"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Discharge diagnosis Narrative",
"code" : "78375-3",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "75311-1",
"display" : "Discharge medications Narrative"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Discharge medications Narrative",
"code" : "75311-1",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "42347-5",
"display" : "Admission diagnosis (narrative)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Admission diagnosis (narrative)",
"code" : "42347-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "42346-7",
"display" : "Medications on admission (narrative)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Medications on admission (narrative)",
"code" : "42346-7",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "42344-2",
"display" : "Discharge diet (narrative)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Discharge diet (narrative)",
"code" : "42344-2",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "10164-2",
"display" : "History of Present illness Narrative"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "History of Present illness Narrative",
"code" : "10164-2",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18776-5",
"display" : "Plan of care"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Plan of care note",
"code" : "18776-5",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Plan of care\" is not a valid display for the code {http://loinc.org}18776-5 - should be one of ['Plan of care note', 'Plan of care note', '临床文档型' (zh-CN), '临床文档' (zh-CN), '文档' (zh-CN), '文书' (zh-CN), '医疗文书' (zh-CN), '临床医疗文书 事件发生的地方' (zh-CN), '场景' (zh-CN), '环境' (zh-CN), '背景 医疗服务(照护服务、护理服务、护理、照护、医疗照护、诊疗、诊疗服务、照顾、看护)计划(方案)记录 发现是一个原子型临床观察指标,并不是作为印象的概括陈述。体格检查、病史、系统检查及其他此类观察指标的属性均为发现。它们的标尺对于编码型发现可能是名义型,而对于叙述型文本之中所报告的发现,则可能是叙述型。' (zh-CN), '发现物' (zh-CN), '所见' (zh-CN), '结果' (zh-CN), '结论 文档本体' (zh-CN), '临床文档本体' (zh-CN), '文档本体' (zh-CN), '文书本体' (zh-CN), '医疗文书本体' (zh-CN), '临床医疗文书本体 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 未加明确说明的角色 笔记' (zh-CN), '按语' (zh-CN), '注释' (zh-CN), '说明' (zh-CN), '票据' (zh-CN), '单据' (zh-CN), '证明书' (zh-CN), '' (zh-CN), 'Documentazione dell''ontologia Osservazione Piano di cura Punto nel tempo (episodio) Ruolo non specificato' (it-IT)] (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "47420-5",
"display" : "Functional status assessment note"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Functional status assessment note",
"code" : "47420-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "47519-4",
"display" : "History of Procedures Document"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "History of Procedures Document",
"code" : "47519-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "10187-3",
"display" : "Review of systems Narrative Reporte"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Review of systems Narrative - Reported",
"code" : "10187-3",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Review of systems Narrative Reporte\" is not a valid display for the code {http://loinc.org}10187-3 - should be one of ['Review of systems Narrative - Reported', 'Review of systems', '医疗服务对象' (zh-CN), '客户' (zh-CN), '病人' (zh-CN), '病患' (zh-CN), '病号' (zh-CN), '超系统 - 病人 历史纪录与体格检查 历史纪录与体格检查.历史记录' (zh-CN), '历史纪录与体格检查.历史记录类' (zh-CN), '历史纪录与体格检查.历史记录类别' (zh-CN), '历史纪录与体格检查.病史' (zh-CN), '历史纪录与体格检查.病史类' (zh-CN), '历史纪录与体格检查.病史类别' (zh-CN), '历史纪录与体格检查.病史记录' (zh-CN), '历史纪录与体格检查.病史记录类' (zh-CN), '历史纪录与体格检查.病史记录类别' (zh-CN), '历史纪录与体格检查小节.历史记录' (zh-CN), '历史纪录与体格检查小节.历史记录类' (zh-CN), '历史纪录与体格检查小节.历史记录类别' (zh-CN), '历史纪录与体格检查小节.病史' (zh-CN), '历史纪录与体格检查小节.病史类' (zh-CN), '历史纪录与体格检查小节.病史类别' (zh-CN), '历史纪录与体格检查小节.病史记 历史纪录与体格检查小节 发现是一个原子型临床观察指标,并不是作为印象的概括陈述。体格检查、病史、系统检查及其他此类观察指标的属性均为发现。它们的标尺对于编码型发现可能是名义型,而对于叙述型文本之中所报告的发现,则可能是叙述型。' (zh-CN), '发现物' (zh-CN), '所见' (zh-CN), '结果' (zh-CN), '结论 叙述' (zh-CN), '叙述性文字' (zh-CN), '报告' (zh-CN), '报告型' (zh-CN), '文字叙述' (zh-CN), '文本叙述型' (zh-CN), '文本描述' (zh-CN), '文本描述型 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 病史与体格检查 系统回顾' (zh-CN), '系统审核' (zh-CN), '' (zh-CN), 'Anamnesi Osservazione paziente Punto nel tempo (episodio)' (it-IT), 'Анамнестические сведения' (ru-RU), 'Сообщенная третьим лицом информация Описательный Точка во времени' (ru-RU), 'Момент' (ru-RU)] (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "87504-7",
"display" : "Administrative information"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "LCDS v4.00 - Administrative information - discharge [CMS Assessment]",
"code" : "87504-7",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Administrative information\" is not a valid display for the code {http://loinc.org}87504-7 - should be one of ['LCDS v4.00 - Administrative information - discharge [CMS Assessment]', ''] (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "2069-3",
"display" : "Chloride [Moles/volume] in Blood"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Chloride [Moles/volume] in Blood",
"code" : "2069-3",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,334 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "66493003"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Product containing theophylline (medicinal product)",
"code" : "66493003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "394899003",
"display" : "oral administration of treatment"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Oral administration of treatment",
"code" : "394899003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "118246004",
"display" : "Laboratory test finding (finding)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Laboratory test finding",
"code" : "118246004",
"system" : "http://snomed.info/sct",
"severity" : "warning",
"error" : "The display \"Laboratory test finding (finding)\" is not a valid display for the code {http://snomed.info/sct}118246004 - should be one of ['Laboratory test finding', 'Laboratory test observations', 'Laboratory test result', 'Laboratory test finding (navigational concept)'] (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "275711006",
"display" : "Chemistry"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Serum chemistry test",
"code" : "275711006",
"system" : "http://snomed.info/sct",
"severity" : "warning",
"error" : "The display \"Chemistry\" is not a valid display for the code {http://snomed.info/sct}275711006 - should be one of ['Serum chemistry test', 'Serum chemistry test (procedure)'] (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "281302008",
"display" : "Above reference range"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Above reference range",
"code" : "281302008",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "419891008",
"display" : "Record artifact (record artifact)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Record artifact (record artifact)",
"code" : "419891008",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "371525003",
"display" : "Clinical procedure report (record artifact)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Clinical procedure report",
"code" : "371525003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "17621005",
"display" : "Normal (qualifier value)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Normal",
"code" : "17621005",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "722172003",
"display" : "Military health institution (environment)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Military health institution (environment)",
"code" : "722172003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "394609007",
"display" : "General surgery (qualifier value)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "General surgery (qualifier value)",
"code" : "394609007",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "71388002",
"display" : "Procedure (procedure)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Procedure",
"code" : "71388002",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "823681000000100",
"display" : "Outpatient letter"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 823681000000100 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"823681000000100\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#823681000000100) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "886921000000105",
"display" : "Allergies and adverse reactions"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 886921000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"886921000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#886921000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "1077881000000105",
"display" : "Attendance details"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 1077881000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"1077881000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1077881000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "887181000000106",
"display" : "Clinical summary"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887181000000106 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"887181000000106\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887181000000106) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "887161000000102",
"display" : "Diagnoses"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887161000000102 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"887161000000102\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887161000000102) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "1052891000000108",
"display" : "Referrer details"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 1052891000000108 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"1052891000000108\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1052891000000108) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "715851000000102",
"display" : "Examination findings"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 715851000000102 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"715851000000102\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#715851000000102) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "717121000000105",
"display" : "History"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 717121000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"717121000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#717121000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "933361000000108",
"display" : "Medications and medical devices"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 933361000000108 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"933361000000108\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#933361000000108) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "887171000000109",
"display" : "Procedures"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887171000000109 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"887171000000109\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887171000000109) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "887201000000105",
"display" : "Plan and requested actions"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887201000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"887201000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887201000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "1052951000000105",
"display" : "Information and advice given"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 1052951000000105 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"1052951000000105\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#1052951000000105) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "886731000000109",
"display" : "Patient demographics"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 886731000000109 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"886731000000109\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#886731000000109) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "887231000000104",
"display" : "Person completing record"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 887231000000104 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"887231000000104\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#887231000000104) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "9290701000001101",
"display" : "Optrex"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Unable to find code 9290701000001101 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"9290701000001101\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#9290701000001101) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "443938003",
"display" : "Procedure carried out on subject"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Procedure carried out on subject (situation)",
"code" : "443938003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "17621005",
"display" : "Normal"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Normal",
"code" : "17621005",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "27171005"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Urinalysis",
"code" : "27171005",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "55011004"
}, "valueSet" :null, "lang":"en", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Steady",
"code" : "55011004",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "55011004"
}, "valueSet" :{
"resourceType" : "ValueSet",
"expansion" : {
"contains" : [{
"system" : "http://snomed.info/sct",
"code" : "55011004"
}]
}
}, "lang":"en", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"code" : "55011004",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,39 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "L/min"
}, "valueSet" :null, "lang":"fi", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "L/min",
"code" : "L/min",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "21612-7"
}, "valueSet" :null, "lang":"fi", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Error processing Unit: '21612-7': Expected \"/\" or \".\" at character 6; The code \"21612-7\" is not valid in the system http://unitsofmeasure.org; The code provided (http://unitsofmeasure.org#21612-7) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "tbl"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Error processing Unit: 'tbl': The unit \"tbl\" is unknown at character 1; The code \"tbl\" is not valid in the system http://unitsofmeasure.org; The code provided (http://unitsofmeasure.org#tbl) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r3)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "mmol/L"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "mmol/L",
"code" : "mmol/L",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code" : "IMP",
"display" : "inpatient encounter"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "inpatient encounter",
"code" : "IMP",
"system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"code" : "HTEST",
"display" : "test health data"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "test health data",
"code" : "HTEST",
"system" : "http://terminology.hl7.org/CodeSystem/v3-ActReason"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,62 @@
{
"resourceType" : "CapabilityStatement",
"id" : "FhirServer",
"meta" : {
"tag" : [{
"system" : "http://hl7.org/fhir/v3/ObservationValue",
"code" : "SUBSETTED",
"display" : "Subsetted"
}]
},
"url" : "http://fhir.healthintersections.com.au/open/metadata",
"version" : "4.0.1-2.0.12-SNAPSHOT",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-01-10T11:07:19.254Z",
"contact" : [{
"telecom" : [{
"system" : "other",
"value" : "http://healthintersections.com.au/"
}]
}],
"kind" : "instance",
"instantiates" : ["http://hl7.org/fhir/CapabilityStatement/terminology-server"],
"software" : {
"name" : "Reference Server",
"version" : "2.0.12-SNAPSHOT",
"releaseDate" : "2021-12-20T02:28:03.769Z"
},
"fhirVersion" : "4.0.1",
"format" : ["application/fhir+xml",
"application/fhir+json"],
"rest" : [{
"mode" : "server",
"security" : {
"cors" : true
},
"operation" : [{
"name" : "expand",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand"
},
{
"name" : "lookup",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-lookup"
},
{
"name" : "validate-code",
"definition" : "http://hl7.org/fhir/OperationDefinition/Resource-validate"
},
{
"name" : "translate",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-translate"
},
{
"name" : "closure",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-closure"
},
{
"name" : "versions",
"definition" : "/OperationDefinition/fso-versions"
}]
}]
}

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "Location",
"code" : "Location"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"severity" : "error",
"error" : "The code system 'Location' is not known (encountered paired with code = 'Location'); The code provided (Location#Location) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,54 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/cvx",
"code" : "207",
"display" : "SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 100 mcg/0.5mL dose"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 100 mcg/0.5mL dose",
"code" : "207",
"system" : "http://hl7.org/fhir/sid/cvx"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/cvx",
"code" : "207",
"display" : "X SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 100 mcg/0.5mL dose"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 100 mcg/0.5mL dose",
"code" : "207",
"system" : "http://hl7.org/fhir/sid/cvx",
"severity" : "warning",
"error" : "The display \"X SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 100 mcg/0.5mL dose\" is not a valid display for the code {http://hl7.org/fhir/sid/cvx}207 - should be one of ['SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 100 mcg/0.5mL dose', 'COVID-19, mRNA, LNP-S, PF, 100 mcg/0.5 mL dose' (en)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/cvx",
"code" : "208"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 30 mcg/0.3mL dose",
"code" : "208",
"system" : "http://hl7.org/fhir/sid/cvx"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/cvx",
"code" : "208"
}, "url": "http://hl7.org/fhir/uv/shc-vaccination/ValueSet/vaccine-cvx", "version": "0.6.2", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"CHECK_MEMERSHIP_ONLY", "versionFlexible":"false"}####
v: {
"display" : "SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 30 mcg/0.3mL dose",
"code" : "208",
"system" : "http://hl7.org/fhir/sid/cvx"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/cvx",
"code" : "209"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code \"209\" is not valid in the system http://hl7.org/fhir/sid/cvx; The code provided (http://hl7.org/fhir/sid/cvx#209) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://fkcfhir.org/fhir/CodeSystem/FMCOrderSchedule",
"code" : "Every 4 weeks"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"severity" : "error",
"error" : "The code system 'http://fkcfhir.org/fhir/CodeSystem/FMCOrderSchedule' is not known (encountered paired with code = 'Every 4 weeks'); The code provided (http://fkcfhir.org/fhir/CodeSystem/FMCOrderSchedule#Every 4 weeks) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode",
"code" : "urn:ihe:iti:xds:2017:mimeTypeSufficient",
"display" : "MimeType sufficient"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "mimeType Sufficient",
"code" : "urn:ihe:iti:xds:2017:mimeTypeSufficient",
"system" : "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,70 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://nucc.org/provider-taxonomy",
"code" : "208D00000X",
"display" : "General Practice"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "General Practice Physician",
"code" : "208D00000X",
"system" : "http://nucc.org/provider-taxonomy",
"severity" : "warning",
"error" : "The display \"General Practice\" is not a valid display for the code {http://nucc.org/provider-taxonomy}208D00000X - should be one of ['General Practice Physician'] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://nucc.org/provider-taxonomy",
"code" : "208D00000X"
}, "url": "http://hl7.org/fhir/us/core/ValueSet/us-core-provider-role--0", "version": "3.1.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "General Practice",
"code" : "208D00000X",
"system" : "http://nucc.org/provider-taxonomy"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://nucc.org/provider-taxonomy",
"code" : "208D00000X",
"display" : "General Practice"
}, "url": "http://hl7.org/fhir/us/core/ValueSet/us-core-provider-role", "version": "3.1.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "General Practice Physician",
"code" : "208D00000X",
"system" : "http://nucc.org/provider-taxonomy",
"severity" : "warning",
"error" : "The display \"General Practice\" is not a valid display for the code {http://nucc.org/provider-taxonomy}208D00000X - should be one of ['General Practice Physician'] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://nucc.org/provider-taxonomy",
"code" : "208D00000X"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "General Practice Physician",
"code" : "208D00000X",
"system" : "http://nucc.org/provider-taxonomy"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://nucc.org/provider-taxonomy",
"code" : "208D00000X"
}, "url": "http://hl7.org/fhir/us/core/ValueSet/us-core-provider-specialty--0", "version": "3.1.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "General Practice Physician",
"code" : "208D00000X",
"system" : "http://nucc.org/provider-taxonomy"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://nucc.org/provider-taxonomy",
"code" : "208D00000X",
"display" : "General Practice"
}, "url": "http://hl7.org/fhir/us/core/ValueSet/us-core-provider-specialty", "version": "3.1.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "General Practice Physician",
"code" : "208D00000X",
"system" : "http://nucc.org/provider-taxonomy",
"severity" : "warning",
"error" : "The display \"General Practice\" is not a valid display for the code {http://nucc.org/provider-taxonomy}208D00000X - should be one of ['General Practice Physician'] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://something/something",
"code" : "something"
}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"severity" : "error",
"error" : "The code system 'http://something/something' is not known (encountered paired with code = 'something'); The code provided (http://something/something#something) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,68 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://varnomen.hgvs.org",
"code" : "NC_000019.8:g.1171707G>A"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "NC_000019.8:g.1171707G>A",
"code" : "NC_000019.8:g.1171707G>A",
"system" : "http://varnomen.hgvs.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://varnomen.hgvs.org",
"code" : "NC_000019.8:g.1171707G>A"
}, "url": "http://hl7.org/fhir/us/mcode/ValueSet/mcode-hgvs-vs--0", "version": "1.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "NC_000019.8:g.1171707G>A",
"code" : "NC_000019.8:g.1171707G>A",
"system" : "http://varnomen.hgvs.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://varnomen.hgvs.org",
"code" : "NC_000019.8:g.1171707G>A"
}, "url": "http://hl7.org/fhir/us/mcode/ValueSet/mcode-hgvs-vs", "version": "1.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "NC_000019.8:g.1171707G>A",
"code" : "NC_000019.8:g.1171707G>A",
"system" : "http://varnomen.hgvs.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://varnomen.hgvs.org",
"code" : "NC_000019.8:g.1171707G>A"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "NC_000019.8:g.1171707G>A",
"code" : "NC_000019.8:g.1171707G>A",
"system" : "http://varnomen.hgvs.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://varnomen.hgvs.org",
"code" : "NC_000019.8:g.1171707G>AXXX"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Expected end of text (at char 24), (line:1, col:25); The code \"NC_000019.8:g.1171707G>AXXX\" is not valid in the system http://varnomen.hgvs.org; The code provided (http://varnomen.hgvs.org#NC_000019.8:g.1171707G>AXXX) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://varnomen.hgvs.org",
"code" : "NC_000019.8:g.1171707G>AXXX"
}, "url": "http://hl7.org/fhir/us/mcode/ValueSet/mcode-hgvs-vs--0", "version": "1.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Expected end of text (at char 24), (line:1, col:25); The code \"NC_000019.8:g.1171707G>AXXX\" is not valid in the system http://varnomen.hgvs.org; The code provided (http://varnomen.hgvs.org#NC_000019.8:g.1171707G>AXXX) is not valid (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://varnomen.hgvs.org",
"code" : "NC_000019.8:g.1171707G>AXXX"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"severity" : "error",
"error" : "Expected end of text (at char 24), (line:1, col:25); The code \"NC_000019.8:g.1171707G>AXXX\" is not valid in the system http://varnomen.hgvs.org; The code provided (http://varnomen.hgvs.org#NC_000019.8:g.1171707G>AXXX) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://www.genenames.org/geneId",
"code" : "HGNC:11389"
}, "url": "http://hl7.org/fhir/us/mcode/ValueSet/mcode-hgnc-vs--0", "version": "1.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code system \"http://www.genenames.org/geneId\" in the include in \"http://hl7.org/fhir/us/mcode/ValueSet/mcode-hgnc-vs--0\" is not known; The code system 'http://www.genenames.org/geneId' is not known (encountered paired with code = 'HGNC:11389'); The code provided (http://www.genenames.org/geneId#HGNC:11389) is not valid (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://www.ncbi.nlm.nih.gov/clinvar",
"code" : "619728"
}, "url": "http://hl7.org/fhir/us/mcode/ValueSet/mcode-clinvar-vs--0", "version": "1.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code system \"http://www.ncbi.nlm.nih.gov/clinvar\" in the include in \"http://hl7.org/fhir/us/mcode/ValueSet/mcode-clinvar-vs--0\" is not known; The code system 'http://www.ncbi.nlm.nih.gov/clinvar' is not known (encountered paired with code = '619728'); The code provided (http://www.ncbi.nlm.nih.gov/clinvar#619728) is not valid (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats",
"code" : "COVAST"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "COVID-19 Vaccine AstraZeneca",
"code" : "COVAST",
"system" : "https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,10 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/icd-10-cm",
"code" : "E10.3211+TT1.2"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code \"E10.3211+TT1.2\" is not valid in the system http://hl7.org/fhir/sid/icd-10-cm; The code provided (http://hl7.org/fhir/sid/icd-10-cm#E10.3211+TT1.2) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,25 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/icd-10",
"code" : "C18.0",
"display" : "Malignant neoplasm: Caecum"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Caecum",
"code" : "C18.0",
"system" : "http://hl7.org/fhir/sid/icd-10"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/icd-10",
"code" : "C12",
"display" : "Malignant neoplasm of pyriform sinus"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Malignant neoplasm of piriform sinus",
"code" : "C12",
"system" : "http://hl7.org/fhir/sid/icd-10",
"severity" : "warning",
"error" : "The display \"Malignant neoplasm of pyriform sinus\" is not a valid display for the code {http://hl7.org/fhir/sid/icd-10}C12 - should be one of ['Malignant neoplasm of piriform sinus'] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,41 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "US"
}, "url": "http://hl7.org/fhir/ValueSet/jurisdiction--0", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "United States of America",
"code" : "US",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "US"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "United States of America",
"code" : "US",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "NO"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Norway",
"code" : "NO",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "US"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "United States of America",
"code" : "US",
"system" : "urn:iso:std:iso:3166"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,94 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "de-CH"
}, "url": "http://hl7.org/fhir/ValueSet/languages--0", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "German (Switzerland)",
"code" : "de-CH",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "de-CH",
"display" : "German (Region=Switzerland)"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "German (Region=Switzerland)",
"code" : "de-CH",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "de-CH"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "German (Region=Switzerland)",
"code" : "de-CH",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "fr"
}, "url": "http://hl7.org/fhir/ValueSet/languages--0", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "French",
"code" : "fr",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "fr",
"display" : "French"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "French",
"code" : "fr",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "fr"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "French",
"code" : "fr",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "en"
}, "url": "http://hl7.org/fhir/ValueSet/languages--0", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "English",
"code" : "en",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "en",
"display" : "English"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "English",
"code" : "en",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "en"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "English",
"code" : "en",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
-------------------------------------------------------------------------------------
{"code" : {
"coding" : [{
"code" : "numerator",
"display" : "Numerator"
}]
}, "url": "http://hl7.org/fhir/ValueSet/measure-population", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"CHECK_MEMERSHIP_ONLY", "versionFlexible":"false"+}####
v: {
"severity" : "error",
"error" : "The code system '' is not known (encountered paired with code = 'numerator'); The code provided (#numerator) is not valid in the value set 'MeasurePopulationType' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------
{"code" : {
"coding" : [{
"code" : "denominator",
"display" : "Denominator"
}]
}, "url": "http://hl7.org/fhir/ValueSet/measure-population", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"CHECK_MEMERSHIP_ONLY", "versionFlexible":"false"+}####
v: {
"severity" : "error",
"error" : "The code system '' is not known (encountered paired with code = 'denominator'); The code provided (#denominator) is not valid in the value set 'MeasurePopulationType' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,25 @@
-------------------------------------------------------------------------------------
{"code" : {
"coding" : [{
"code" : "continuous-variable",
"display" : "Continuous Variable"
}]
}, "url": "http://hl7.org/fhir/ValueSet/measure-scoring", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"CHECK_MEMERSHIP_ONLY", "versionFlexible":"false"+}####
v: {
"severity" : "error",
"error" : "The code system '' is not known (encountered paired with code = 'continuous-variable'); The code provided (#continuous-variable) is not valid in the value set 'MeasureScoring' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------
{"code" : {
"coding" : [{
"code" : "proportion",
"display" : "Proportion"
}]
}, "url": "http://hl7.org/fhir/ValueSet/measure-scoring", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"CHECK_MEMERSHIP_ONLY", "versionFlexible":"false"+}####
v: {
"severity" : "error",
"error" : "The code system '' is not known (encountered paired with code = 'proportion'); The code provided (#proportion) is not valid in the value set 'MeasureScoring' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm",
"code" : "1591957"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Mircera",
"code" : "1591957",
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm"
}
-------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,178 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "cm"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "cm",
"code" : "cm",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "cm"
}, "url": "https://bb/ValueSet/BBDemographicAgeUnit--0", "version": "20190731", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code provided (http://unitsofmeasure.org#cm) is not valid (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "min"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "min",
"code" : "min",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "mmol/L"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "mmol/L",
"code" : "mmol/L",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "%"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "%",
"code" : "%",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "kg"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "kg",
"code" : "kg",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "kg/m2"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "kg/m2",
"code" : "kg/m2",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "mm[Hg]"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "mm[Hg]",
"code" : "mm[Hg]",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "wk"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "wk",
"code" : "wk",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "m"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "m",
"code" : "m",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "m"
}, "url": "http://hl7.org/fhir/ValueSet/age-units--0", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code provided (http://unitsofmeasure.org#m) is not valid (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "mg"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "mg",
"code" : "mg",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "mm"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "mm",
"code" : "mm",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "Cel"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Cel",
"code" : "Cel",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "g"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "g",
"code" : "g",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "mm[Hg]{hg}"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "mm[Hg]{hg}",
"code" : "mm[Hg]{hg}",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "fmm[Hg]"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Error processing Unit: 'fmm[Hg]': The unit \"fmm[Hg]\" is unknown at character 1; The code \"fmm[Hg]\" is not valid in the system http://unitsofmeasure.org; The code provided (http://unitsofmeasure.org#fmm[Hg]) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "J/C"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "J/C",
"code" : "J/C",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"code" : "Not-at-all"
}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"severity" : "error",
"error" : "The code system 'http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9' is not known (encountered paired with code = 'Not-at-all'); The code provided (http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9#Not-at-all) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,62 @@
{
"resourceType" : "CapabilityStatement",
"id" : "FhirServer",
"meta" : {
"tag" : [{
"system" : "http://hl7.org/fhir/v3/ObservationValue",
"code" : "SUBSETTED",
"display" : "Subsetted"
}]
},
"url" : "http://fhir.healthintersections.com.au/open/metadata",
"version" : "4.0.1-2.0.12-SNAPSHOT",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-01-10T11:07:19.254Z",
"contact" : [{
"telecom" : [{
"system" : "other",
"value" : "http://healthintersections.com.au/"
}]
}],
"kind" : "instance",
"instantiates" : ["http://hl7.org/fhir/CapabilityStatement/terminology-server"],
"software" : {
"name" : "Reference Server",
"version" : "2.0.12-SNAPSHOT",
"releaseDate" : "2021-12-20T02:28:03.769Z"
},
"fhirVersion" : "4.0.1",
"format" : ["application/fhir+xml",
"application/fhir+json"],
"rest" : [{
"mode" : "server",
"security" : {
"cors" : true
},
"operation" : [{
"name" : "expand",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand"
},
{
"name" : "lookup",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-lookup"
},
{
"name" : "validate-code",
"definition" : "http://hl7.org/fhir/OperationDefinition/Resource-validate"
},
{
"name" : "translate",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-translate"
},
{
"name" : "closure",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-closure"
},
{
"name" : "versions",
"definition" : "/OperationDefinition/fso-versions"
}]
}]
}

View File

@ -0,0 +1,62 @@
{
"resourceType" : "CapabilityStatement",
"id" : "FhirServer",
"meta" : {
"tag" : [{
"system" : "http://hl7.org/fhir/v3/ObservationValue",
"code" : "SUBSETTED",
"display" : "Subsetted"
}]
},
"url" : "http://fhir.healthintersections.com.au/open/metadata",
"version" : "4.0.1-2.0.12-SNAPSHOT",
"name" : "FHIR Reference Server Conformance Statement",
"status" : "active",
"date" : "2022-01-10T11:07:19.254Z",
"contact" : [{
"telecom" : [{
"system" : "other",
"value" : "http://healthintersections.com.au/"
}]
}],
"kind" : "instance",
"instantiates" : ["http://hl7.org/fhir/CapabilityStatement/terminology-server"],
"software" : {
"name" : "Reference Server",
"version" : "2.0.12-SNAPSHOT",
"releaseDate" : "2021-12-20T02:28:03.769Z"
},
"fhirVersion" : "4.0.1",
"format" : ["application/fhir+xml",
"application/fhir+json"],
"rest" : [{
"mode" : "server",
"security" : {
"cors" : true
},
"operation" : [{
"name" : "expand",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand"
},
{
"name" : "lookup",
"definition" : "http://hl7.org/fhir/OperationDefinition/ValueSet-lookup"
},
{
"name" : "validate-code",
"definition" : "http://hl7.org/fhir/OperationDefinition/Resource-validate"
},
{
"name" : "translate",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-translate"
},
{
"name" : "closure",
"definition" : "http://hl7.org/fhir/OperationDefinition/ConceptMap-closure"
},
{
"name" : "versions",
"definition" : "/OperationDefinition/fso-versions"
}]
}]
}

View File

@ -0,0 +1,84 @@
-------------------------------------------------------------------------------------
{"code" : {
"code" : "text/plain"
}, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "text/plain",
"code" : "text/plain",
"system" : "urn:ietf:bcp:13"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "271649006",
"display" : "Systolic blood pressure"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "271649006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "SYL"
}, "url": "http://hl7.org/fhir/ValueSet/name-v3-representation", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Syllabic",
"code" : "SYL",
"system" : "http://terminology.hl7.org/CodeSystem/v3-EntityNameUse"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "IDE"
}, "url": "http://hl7.org/fhir/ValueSet/name-v3-representation", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Ideographic",
"code" : "IDE",
"system" : "http://terminology.hl7.org/CodeSystem/v3-EntityNameUse"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "nl-NL"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "4.5.0", "lang":"nl-NL", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Nederlands (Nederland)",
"code" : "nl-NL",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "text/cql"
}, "url": "http://hl7.org/fhir/ValueSet/expression-language", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "CQL",
"code" : "text/cql",
"system" : "urn:ietf:bcp:13"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "text/fhirpath"
}, "url": "http://hl7.org/fhir/ValueSet/expression-language", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "FHIRPath",
"code" : "text/fhirpath",
"system" : "urn:ietf:bcp:13"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "en-AU"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "4.5.0", "lang":"en-AU", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "English (Australia)",
"code" : "en-AU",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "en"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "English",
"code" : "en",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,14 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://www.whocc.no/atc",
"code" : "N02AA",
"display" : "Barbiturates and derivatives"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Natural opium alkaloids",
"code" : "N02AA",
"system" : "http://www.whocc.no/atc",
"severity" : "warning",
"error" : "The display \"Barbiturates and derivatives\" is not a valid display for the code {http://www.whocc.no/atc}N02AA - should be one of ['Natural opium alkaloids'] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/sid/icd-9-cm",
"code" : "99.00"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Perioperative autologous transfusion of whole blood or blood components",
"code" : "99.00",
"system" : "http://hl7.org/fhir/sid/icd-9-cm"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,506 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "85354-9",
"display" : "Blood pressure panel with all children optional"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Blood pressure panel with all children optional",
"code" : "85354-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8480-6",
"display" : "Systolic blood pressure"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "8480-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8462-4",
"display" : "Diastolic blood pressure"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Diastolic blood pressure",
"code" : "8462-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "85354-9"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Blood pressure panel with all children optional",
"code" : "85354-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "85354-9",
"display" : "Blood pressure panel with all children optional"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Blood pressure panel with all children optional",
"code" : "85354-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "85354-9"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Blood pressure panel with all children optional",
"code" : "85354-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8480-6"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "8480-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8480-6",
"display" : "Systolic blood pressure"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "8480-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8480-6"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "8480-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8462-4"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Diastolic blood pressure",
"code" : "8462-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8462-4",
"display" : "Diastolic blood pressure"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Diastolic blood pressure",
"code" : "8462-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8462-4"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Diastolic blood pressure",
"code" : "8462-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "56445-0"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "current",
"code" : "56445-0",
"display" : "Medication summary Doc"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Version 'current' of the code system 'http://loinc.org' is not known (encountered paired with code = '56445-0'). ValidVersions = [2.71]; The code provided (http://loinc.org#56445-0) is not valid in the value set 'FHIRDocumentTypeCodes' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "current",
"code" : "56445-0"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Version 'current' of the code system 'http://loinc.org' is not known (encountered paired with code = '56445-0'). ValidVersions = [2.71]; The code provided (http://loinc.org#56445-0) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "current",
"code" : "48765-2",
"display" : "Allergies and adverse reactions"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Version 'current' of the code system 'http://loinc.org' is not known (encountered paired with code = '48765-2'). ValidVersions = [2.71]; The code provided (http://loinc.org#48765-2) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "2.71",
"code" : "56445-0",
"display" : "Medication summary Doc"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "2.71",
"code" : "56445-0"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "2.71",
"code" : "48765-2",
"display" : "Allergies and adverse reactions"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Allergies and adverse reactions Document",
"code" : "48765-2",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Allergies and adverse reactions\" is not a valid display for the code {http://loinc.org}48765-2 - should be one of ['Allergies and adverse reactions Document', 'Allergies &or adverse reactions Doc', '临床文档型' (zh-CN), '临床文档' (zh-CN), '文档' (zh-CN), '文书' (zh-CN), '医疗文书' (zh-CN), '临床医疗文书 医疗服务对象' (zh-CN), '客户' (zh-CN), '病人' (zh-CN), '病患' (zh-CN), '病号' (zh-CN), '超系统 - 病人 发现是一个原子型临床观察指标,并不是作为印象的概括陈述。体格检查、病史、系统检查及其他此类观察指标的属性均为发现。它们的标尺对于编码型发现可能是名义型,而对于叙述型文本之中所报告的发现,则可能是叙述型。' (zh-CN), '发现物' (zh-CN), '所见' (zh-CN), '结果' (zh-CN), '结论 变态反应与不良反应 文档.其他' (zh-CN), '杂项类文档' (zh-CN), '其他文档 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 杂项' (zh-CN), '杂项类' (zh-CN), '杂项试验 过敏反应' (zh-CN), '过敏' (zh-CN), '' (zh-CN), 'Allergie e reazioni avverse Documentazione miscellanea Miscellanea Osservazione paziente Punto nel tempo (episodio)' (it-IT), 'Документ Точка во времени' (ru-RU), 'Момент' (ru-RU)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "56445-0"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "current",
"code" : "56445-0",
"display" : "Medication summary Doc"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "current",
"code" : "56445-0"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "current",
"code" : "48765-2",
"display" : "Allergies and adverse reactions"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Allergies and adverse reactions Document",
"code" : "48765-2",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Allergies and adverse reactions\" is not a valid display for the code {http://loinc.org}48765-2 - should be one of ['Allergies and adverse reactions Document', 'Allergies &or adverse reactions Doc', '临床文档型' (zh-CN), '临床文档' (zh-CN), '文档' (zh-CN), '文书' (zh-CN), '医疗文书' (zh-CN), '临床医疗文书 医疗服务对象' (zh-CN), '客户' (zh-CN), '病人' (zh-CN), '病患' (zh-CN), '病号' (zh-CN), '超系统 - 病人 发现是一个原子型临床观察指标,并不是作为印象的概括陈述。体格检查、病史、系统检查及其他此类观察指标的属性均为发现。它们的标尺对于编码型发现可能是名义型,而对于叙述型文本之中所报告的发现,则可能是叙述型。' (zh-CN), '发现物' (zh-CN), '所见' (zh-CN), '结果' (zh-CN), '结论 变态反应与不良反应 文档.其他' (zh-CN), '杂项类文档' (zh-CN), '其他文档 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 杂项' (zh-CN), '杂项类' (zh-CN), '杂项试验 过敏反应' (zh-CN), '过敏' (zh-CN), '' (zh-CN), 'Allergie e reazioni avverse Documentazione miscellanea Miscellanea Osservazione paziente Punto nel tempo (episodio)' (it-IT), 'Документ Точка во времени' (ru-RU), 'Момент' (ru-RU)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18842-5"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Discharge summary",
"code" : "18842-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18842-5",
"display" : "Discharge Summary"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Discharge summary",
"code" : "18842-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18842-5"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Discharge summary",
"code" : "18842-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "29299-5"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Reason for visit Narrative",
"code" : "29299-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "<22>g<EFBFBD><67>",
"display" : "8302-2"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code \"<22>g<EFBFBD><67>\" is not valid in the system http://loinc.org; The code provided (http://loinc.org#<23>g<EFBFBD><67>) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8867-4",
"display" : "Heart rate"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Heart rate",
"code" : "8867-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "883-9",
"display" : "ABO group [Type] in Blood"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "ABO group [Type] in Blood",
"code" : "883-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "10331-7",
"display" : "Rh [Type] in Blood"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Rh [Type] in Blood",
"code" : "10331-7",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "18684-1",
"display" : "<22><><EFBFBD><EFBFBD>"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "First Blood pressure Set",
"code" : "18684-1",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"<22><><EFBFBD><EFBFBD>\" is not a valid display for the code {http://loinc.org}18684-1 - should be one of ['First Blood pressure Set', '', 'ED Health Insurance Portability and Accountability Act of 1996' (zh-CN), 'HIPAA' (zh-CN), '健康保險可攜與責任法' (zh-CN), 'HIPAA法案' (zh-CN), '健康保险可移植性和问责法1996年' (zh-CN), '美国健康保险携带和责任法案' (zh-CN), '医疗保险便携性和责任法案' (zh-CN), '医疗保险便携性与责任法案' (zh-CN), '醫療保險可攜性與責任法' (zh-CN), 'HIPAA 信息附件.急诊' (zh-CN), 'HIPAA 信息附件.急诊科' (zh-CN), 'HIPAA 信息附件.急诊科就医' (zh-CN), 'HIPAA 信息附件.急诊科就诊' (zh-CN), '健康保险便携与责任法案信息附件.急诊' (zh-CN), '健康保险便携与责任法案信息附件.急诊 临床信息附件集' (zh-CN), '临床信息附件集合' (zh-CN), '集' (zh-CN), '集合 信息附件' (zh-CN), '健康保险便携与责任法案信息附件' (zh-CN), '附件 医疗服务对象' (zh-CN), '客户' (zh-CN), '病人' (zh-CN), '病患' (zh-CN), '病号' (zh-CN), '超系统 - 病人 压强 复合属性' (zh-CN), '复杂型属性' (zh-CN), '复杂属性 就医' (zh-CN), '就医过程 急诊科 急诊科DEEDS变量' (zh-CN), 'DEEDS 变量' (zh-CN), '急诊' (zh-CN), '急诊科' (zh-CN), 'Emergency Department' (zh-CN), 'ED' (zh-CN), '急诊科(急诊科系统代码之数据元素)变量' (zh-CN), '急诊科(急诊科系统代码之数据元素)指标' (zh-CN), '急诊科美国CDC急诊科系统代码之数据元素指标' (zh-CN), '急诊科指标 急诊科Emergency DepartmentED 急诊部 第一个' (zh-CN), '第一次' (zh-CN), '首个' (zh-CN), '首次 血' (zh-CN), '全血' (zh-CN), 'Allegato Allegato di reparto di emergenza (pronto soccorso) Complesso Emergenza (DEEDS - Data Elements for Emergency Dep Incontro' (it-IT), 'Appuntamento paziente Stabilito' (it-IT), 'Fissato' (it-IT), 'Встреча Комплекс' (ru-RU)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8480-6",
"display" : "<22><><EFBFBD>k<EFBFBD><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "8480-6",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"<22><><EFBFBD>k<EFBFBD><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\" is not a valid display for the code {http://loinc.org}8480-6 - should be one of ['Systolic blood pressure', 'BP sys', '一般血压' (zh-CN), '血压.原子型' (zh-CN), '血压指标.原子型 压力' (zh-CN), '压强 可用数量表示的' (zh-CN), '定量性' (zh-CN), '数值型' (zh-CN), '数量型' (zh-CN), '连续数值型标尺 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 血管内收缩期' (zh-CN), '血管内心缩期 血管内的' (zh-CN), '' (zh-CN), 'Pressure' (pt-BR), 'Point in time' (pt-BR), 'Random' (pt-BR), 'Art sys' (pt-BR), 'Quantitative' (pt-BR), 'QNT' (pt-BR), 'Quant' (pt-BR), 'Quan' (pt-BR), 'IV' (pt-BR), 'Intravenous' (pt-BR), 'BLOOD PRESSURE MEASUREMENTS.ATOM' (pt-BR), 'BP systolic' (pt-BR), 'Blood pressure systolic' (pt-BR), 'Sys BP' (pt-BR), 'SBP' (pt-BR), 'Pressione Pressione arteriosa - atomica Punto nel tempo (episodio)' (it-IT), 'Давление Количественный Точка во времени' (ru-RU), 'Момент' (ru-RU), 'Blutdruck systolisch' (de-AT)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8462-4",
"display" : "<22>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Diastolic blood pressure",
"code" : "8462-4",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"<22>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\" is not a valid display for the code {http://loinc.org}8462-4 - should be one of ['Diastolic blood pressure', 'BP dias', '一般血压' (zh-CN), '血压.原子型' (zh-CN), '血压指标.原子型 压力' (zh-CN), '压强 可用数量表示的' (zh-CN), '定量性' (zh-CN), '数值型' (zh-CN), '数量型' (zh-CN), '连续数值型标尺 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 血管内心舒期' (zh-CN), '血管内舒张期 血管内的' (zh-CN), '' (zh-CN), 'Dias' (pt-BR), 'Diast' (pt-BR), 'Pressure' (pt-BR), 'Point in time' (pt-BR), 'Random' (pt-BR), 'Art sys' (pt-BR), 'Quantitative' (pt-BR), 'QNT' (pt-BR), 'Quant' (pt-BR), 'Quan' (pt-BR), 'IV' (pt-BR), 'Intravenous' (pt-BR), 'Diastoli' (pt-BR), 'BLOOD PRESSURE MEASUREMENTS.ATOM' (pt-BR), 'Blood pressure diastolic' (pt-BR), 'BP diastolic' (pt-BR), 'Dias BP' (pt-BR), 'DBP' (pt-BR), 'Pressione Pressione arteriosa - atomica Punto nel tempo (episodio)' (it-IT), 'Внутрисосудистый диастолический Давление Количественный Точка во времени' (ru-RU), 'Момент' (ru-RU), 'Blutdruck diastolisch' (de-AT)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "718-7",
"display" : "Hemoglobin [Mass/volume] in Blood"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Hemoglobin [Mass/volume] in Blood",
"code" : "718-7",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "38483-4",
"display" : "Creat Bld-mCnc"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Creatinine [Mass/volume] in Blood",
"code" : "38483-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "2093-3",
"display" : "Cholesterol [Mass/volume] in Serum or Plasma"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Cholesterol [Mass/volume] in Serum or Plasma",
"code" : "2093-3",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "3151-8",
"display" : "ingeademde O2"
}, "valueSet" :null, "lang":"en", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Inhaled oxygen flow rate",
"code" : "3151-8",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"ingeademde O2\" is not a valid display for the code {http://loinc.org}3151-8 - should be one of ['Inhaled oxygen flow rate', 'Inhaled O2 flow rate', 'O2' (zh-CN), 'tO2' (zh-CN), '总氧' (zh-CN), '氧气 体积速率(单位时间)' (zh-CN), '单位时间内体积的变化速率' (zh-CN), '流量 可用数量表示的' (zh-CN), '定量性' (zh-CN), '数值型' (zh-CN), '数量型' (zh-CN), '连续数值型标尺 吸入气' (zh-CN), '吸入气体' (zh-CN), '吸入的空气 所吸入的氧' (zh-CN), '已吸入的氧气 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 气 气体类 空气' (zh-CN), '' (zh-CN), 'Inhaled O2' (pt-BR), 'vRate' (pt-BR), 'Volume rate' (pt-BR), 'Flow' (pt-BR), 'Point in time' (pt-BR), 'Random' (pt-BR), 'IhG' (pt-BR), 'Inhaled Gas' (pt-BR), 'Inspired' (pt-BR), 'Quantitative' (pt-BR), 'QNT' (pt-BR), 'Quant' (pt-BR), 'Quan' (pt-BR), 'Gases' (pt-BR), 'Clinico Gas inalati Punto nel tempo (episodio) Tasso di Volume' (it-IT), 'Количественный Объемная скорость Точка во времени' (ru-RU), 'Момент' (ru-RU), 'ingeademde O2' (nl-NL), 'O2-Zufuhr' (de-AT)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "3151-8",
"display" : "ingeademde O2"
}, "valueSet" :null, "lang":"nl-NL", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "ingeademde O2",
"code" : "3151-8",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "35200-5",
"display" : "Cholesterol [Moles/volume] in Serum or Plasma"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Cholesterol [Mass or Moles/volume] in Serum or Plasma",
"code" : "35200-5",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Cholesterol [Moles/volume] in Serum or Plasma\" is not a valid display for the code {http://loinc.org}35200-5 - should be one of ['Cholesterol [Mass or Moles/volume] in Serum or Plasma', 'Cholest SerPl-msCnc', '化学' (zh-CN), '化学检验项目' (zh-CN), '化学检验项目类' (zh-CN), '化学类' (zh-CN), '化学试验' (zh-CN), '非刺激耐受型化学检验项目' (zh-CN), '非刺激耐受型化学检验项目类' (zh-CN), '非刺激耐受型化学试验' (zh-CN), '非刺激耐受型化学试验类 可用数量表示的' (zh-CN), '定量性' (zh-CN), '数值型' (zh-CN), '数量型' (zh-CN), '连续数值型标尺 总胆固醇' (zh-CN), '胆固醇总计' (zh-CN), '胆甾醇' (zh-CN), '脂类' (zh-CN), '脂质 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 血清或血浆 质量或摩尔浓度' (zh-CN), '质量或摩尔浓度(单位体积)' (zh-CN), '质量或物质的量浓度(单位体积)' (zh-CN), '' (zh-CN), 'Juhuslik Kvantitatiivne Plasma Seerum Seerum või plasma' (et-EE), 'Cholest' (pt-BR), 'Chol' (pt-BR), 'Choles' (pt-BR), 'Lipid' (pt-BR), 'Cholesterol total' (pt-BR), 'Cholesterols' (pt-BR), 'Level' (pt-BR), 'Point in time' (pt-BR), 'Random' (pt-BR), 'SerPl' (pt-BR), 'SerPlas' (pt-BR), 'SerP' (pt-BR), 'Serum' (pt-BR), 'SR' (pt-BR), 'Plasma' (pt-BR), 'Pl' (pt-BR), 'Plsm' (pt-BR), 'Quantitative' (pt-BR), 'QNT' (pt-BR), 'Quant' (pt-BR), 'Quan' (pt-BR), 'Chemistry' (pt-BR), 'Chimica Concentrazione Sostanza o Massa Plasma Punto nel tempo (episodio) Siero Siero o Plasma' (it-IT), 'Количественный Массовая или Молярная Концентрация Плазма Сыворотка Сыворотка или Плазма Точка во времени' (ru-RU), 'Момент Холестерин' (ru-RU)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "13457-7",
"display" : "Cholesterol in LDL [Mass/volume] in Serum or Plasma by calculation"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Cholesterol in LDL [Mass/volume] in Serum or Plasma by calculation",
"code" : "13457-7",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "29463-7",
"display" : "Body Weight"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Body weight",
"code" : "29463-7",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "29463-7",
"display" : "Body Weight"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Body weight",
"code" : "29463-7",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "35200-5",
"display" : "Cholest SerPl-msCnc"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Cholesterol [Mass or Moles/volume] in Serum or Plasma",
"code" : "35200-5",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "35217-9",
"display" : "Triglyceride [Moles/volume] in Serum or Plasma"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Triglyceride [Mass or Moles/volume] in Serum or Plasma",
"code" : "35217-9",
"system" : "http://loinc.org",
"severity" : "warning",
"error" : "The display \"Triglyceride [Moles/volume] in Serum or Plasma\" is not a valid display for the code {http://loinc.org}35217-9 - should be one of ['Triglyceride [Mass or Moles/volume] in Serum or Plasma', 'Trigl SerPl-msCnc', 'TG' (zh-CN), 'Trigly' (zh-CN), '甘油三脂' (zh-CN), '甘油三酸酯' (zh-CN), '三酸甘油酯' (zh-CN), '甘油三酸脂' (zh-CN), '三酸甘油脂 化学' (zh-CN), '化学检验项目' (zh-CN), '化学检验项目类' (zh-CN), '化学类' (zh-CN), '化学试验' (zh-CN), '非刺激耐受型化学检验项目' (zh-CN), '非刺激耐受型化学检验项目类' (zh-CN), '非刺激耐受型化学试验' (zh-CN), '非刺激耐受型化学试验类 可用数量表示的' (zh-CN), '定量性' (zh-CN), '数值型' (zh-CN), '数量型' (zh-CN), '连续数值型标尺 时刻' (zh-CN), '随机' (zh-CN), '随意' (zh-CN), '瞬间 血清或血浆 质量或摩尔浓度' (zh-CN), '质量或摩尔浓度(单位体积)' (zh-CN), '质量或物质的量浓度(单位体积)' (zh-CN), '' (zh-CN), 'Juhuslik Kvantitatiivne Plasma Seerum Seerum või plasma' (et-EE), 'Trigl' (pt-BR), 'Triglycrides' (pt-BR), 'Trig' (pt-BR), 'Triglycerides' (pt-BR), 'Level' (pt-BR), 'Point in time' (pt-BR), 'Random' (pt-BR), 'SerPl' (pt-BR), 'SerPlas' (pt-BR), 'SerP' (pt-BR), 'Serum' (pt-BR), 'SR' (pt-BR), 'Plasma' (pt-BR), 'Pl' (pt-BR), 'Plsm' (pt-BR), 'Quantitative' (pt-BR), 'QNT' (pt-BR), 'Quant' (pt-BR), 'Quan' (pt-BR), 'Chemistry' (pt-BR), 'Chimica Concentrazione Sostanza o Massa Plasma Punto nel tempo (episodio) Siero Siero o Plasma' (it-IT), 'Количественный Массовая или Молярная Концентрация Плазма Сыворотка Сыворотка или Плазма Точка во времени' (ru-RU), 'Момент' (ru-RU)] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------------------------
{"code" : {
"coding" : [{
"code" : "initial-population"
}]
}, "url": "http://hl7.org/fhir/ValueSet/measure-population", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"CHECK_MEMERSHIP_ONLY", "versionFlexible":"false"+}####
v: {
"severity" : "error",
"error" : "The code system '' is not known (encountered paired with code = 'initial-population'); The code provided (#initial-population) is not valid in the value set 'MeasurePopulationType' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,32 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://terminology.hl7.org/CodeSystem/observation-category",
"code" : "vital-signs"
}, "url": "http://hl7.org/fhir/ValueSet/observation-category--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Vital Signs",
"code" : "vital-signs",
"system" : "http://terminology.hl7.org/CodeSystem/observation-category"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://terminology.hl7.org/CodeSystem/observation-category",
"code" : "vital-signs",
"display" : "Vital Signs"
}, "url": "http://hl7.org/fhir/ValueSet/observation-category", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Vital Signs",
"code" : "vital-signs",
"system" : "http://terminology.hl7.org/CodeSystem/observation-category"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://terminology.hl7.org/CodeSystem/observation-category",
"code" : "vital-signs"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Vital Signs",
"code" : "vital-signs",
"system" : "http://terminology.hl7.org/CodeSystem/observation-category"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm",
"code" : "1049640",
"display" : "Acetaminophen 325 MG / Oxycodone Hydrochloride 5 MG Oral Tablet [Percocet]"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "acetaminophen 325 MG / oxycodone hydrochloride 5 MG Oral Tablet [Percocet]",
"code" : "1049640",
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm"
}
-------------------------------------------------------------------------------------

View File

@ -0,0 +1,205 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "368209003",
"display" : "Right arm"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Right upper arm",
"code" : "368209003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "271649006",
"display" : "Systolic blood pressure"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "271649006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "271649006"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "271649006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/731000124108/version/20210201",
"code" : "132037003",
"display" : "Pineywoods pig breed"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "Version 'http://snomed.info/sct/731000124108/version/20210201' of the code system 'http://snomed.info/sct' is not known (encountered paired with code = '132037003'). ValidVersions = [http://snomed.info/sct/11000146104/version/20210930,http://snomed.info/sct/11000172109/version/20210915,http://snomed.info/sct/20611000087101/version/20210930,http://snomed.info/sct/32506021000036107/version/20210630,http://snomed.info/sct/45991000052106/version/20210531,http://snomed.info/sct/554471000005108/version/20210930,http://snomed.info/sct/731000124108/version/20210901,http://snomed.info/sct/900000000000207008/version/20190731,http://snomed.info/sct/900000000000207008/version/20200131,http://snomed.info/sct/900000000000207008/version/20200731,http://snomed.info/sct/900000000000207008/version/20210731]; The code provided (http://snomed.info/sct#132037003) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4)",
"class" : "CODESYSTEM_UNSUPPORTED"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/731000124108/version/20210201",
"code" : "132037003",
"display" : "Pineywoods pig breed"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Pineywoods pig",
"code" : "132037003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/731000124108/version/20210901",
"code" : "132037003",
"display" : "Pineywoods pig breed. Not."
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Pineywoods pig",
"code" : "132037003",
"system" : "http://snomed.info/sct",
"severity" : "warning",
"error" : "The display \"Pineywoods pig breed. Not.\" is not a valid display for the code {http://snomed.info/sct}132037003 - should be one of ['Pineywoods pig', 'Pineywoods pig breed (organism)', 'Pineywoods pig breed'] (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "112144000",
"display" : "Blood group A (finding)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Blood group A",
"code" : "112144000",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "10828004",
"display" : "Positive (qualifier value)"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Positive",
"code" : "10828004",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "233588003",
"display" : "Continuous hemodiafiltration"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Continuous hemodiafiltration",
"code" : "233588003",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "109006",
"display" : "Anxiety disorder of childhood OR adolescence"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Anxiety disorder of childhood OR adolescence",
"code" : "109006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "109006"
}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Anxiety disorder of childhood OR adolescence",
"code" : "109006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "109006",
"display" : "Anxiety disorder of childhood OR adolescence"
}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Anxiety disorder of childhood OR adolescence",
"code" : "109006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "109006"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Anxiety disorder of childhood OR adolescence",
"code" : "109006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "106004",
"display" : "Posterior carpal region"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Posterior carpal region",
"code" : "106004",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "106004"
}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings--0", "version": "4.5.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code provided (http://snomed.info/sct#106004) is not valid (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "106004",
"display" : "Posterior carpal region"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Posterior carpal region",
"code" : "106004",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "106004"
}, "valueSet" :{
"resourceType" : "ValueSet",
"compose" : {
"include" : [{
"system" : "http://snomed.info/sct"
}]
}
}, "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Posterior carpal region",
"code" : "106004",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "85600001",
"display" : "Triacylglycerol"
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Triacylglycerol",
"code" : "85600001",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show More