Fix value set validation to validate codes in example code systems

This commit is contained in:
Grahame Grieve 2024-03-20 20:59:41 +11:00
parent 99ea673b91
commit 8f2f414c78
8 changed files with 467 additions and 38 deletions

View File

@ -590,13 +590,14 @@ public class ValueSetValidator extends ValueSetProcessBase {
break; break;
} }
warningMessage = warningMessage + ", so the code has not been validated"; warningMessage = warningMessage + ", so the code has not been validated";
if (!inExpansion && cs.getContent() != CodeSystemContentMode.FRAGMENT) { // we're going to give it a go if it's a fragment if (!options.isExampleOK() && !inExpansion && cs.getContent() != CodeSystemContentMode.FRAGMENT) { // we're going to give it a go if it's a fragment
throw new VSCheckerException(warningMessage, null, true); throw new VSCheckerException(warningMessage, null, true);
} }
} }
if (cs != null /*&& (cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == CodeSystemContentMode.FRAGMENT)*/) { if (cs != null /*&& (cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == CodeSystemContentMode.FRAGMENT)*/) {
if (!(cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == CodeSystemContentMode.FRAGMENT)) { if (!(cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == CodeSystemContentMode.FRAGMENT ||
(options.isExampleOK() && cs.getContent() == CodeSystemContentMode.EXAMPLE))) {
if (inInclude) { if (inInclude) {
ConceptReferenceComponent cc = findInInclude(code); ConceptReferenceComponent cc = findInInclude(code);
if (cc != null) { if (cc != null) {
@ -608,7 +609,7 @@ public class ValueSetValidator extends ValueSetProcessBase {
} }
} }
// we can't validate that here. // we can't validate that here.
throw new FHIRException("Unable to evaluate based on empty code system"); throw new FHIRException("Unable to evaluate based on code system with status = "+cs.getContent().toCode());
} }
res = validateCode(path, code, cs, null, info); res = validateCode(path, code, cs, null, info);
res.setIssues(issues); res.setIssues(issues);

View File

@ -22,6 +22,7 @@ public class ValidationOptions {
private boolean useValueSetDisplays; private boolean useValueSetDisplays;
private boolean englishOk = true; private boolean englishOk = true;
private boolean activeOnly = false; private boolean activeOnly = false;
private boolean exampleOK = false;
private FhirPublication fhirVersion; private FhirPublication fhirVersion;
public ValidationOptions(FhirPublication fhirVersion) { public ValidationOptions(FhirPublication fhirVersion) {
@ -270,6 +271,19 @@ public class ValidationOptions {
return this; return this;
} }
public boolean isExampleOK() {
return exampleOK;
}
public ValidationOptions setExampleOK(boolean exampleOK) {
this.exampleOK = exampleOK;
return this;
}
public ValidationOptions withExampleOK() {
return setExampleOK(true);
}
public ValidationOptions copy() { public ValidationOptions copy() {
ValidationOptions n = new ValidationOptions(fhirVersion); ValidationOptions n = new ValidationOptions(fhirVersion);
n.langs = langs == null ? null : langs.copy(); n.langs = langs == null ? null : langs.copy();
@ -282,13 +296,14 @@ public class ValidationOptions {
n.membershipOnly = membershipOnly; n.membershipOnly = membershipOnly;
n.useValueSetDisplays = useValueSetDisplays; n.useValueSetDisplays = useValueSetDisplays;
n.displayWarningMode = displayWarningMode; n.displayWarningMode = displayWarningMode;
n.exampleOK = exampleOK;
return n; return n;
} }
public String toJson() { public String toJson() {
return "\"langs\":\""+( langs == null ? "" : langs.toString())+"\", \"useServer\":\""+Boolean.toString(useServer)+"\", \"useClient\":\""+Boolean.toString(useClient)+"\", "+ return "\"langs\":\""+( langs == null ? "" : langs.toString())+"\", \"useServer\":\""+Boolean.toString(useServer)+"\", \"useClient\":\""+Boolean.toString(useClient)+"\", "+
"\"guessSystem\":\""+Boolean.toString(guessSystem)+"\", \"activeOnly\":\""+Boolean.toString(activeOnly)+"\", \"membershipOnly\":\""+Boolean.toString(membershipOnly)+"\", \"displayWarningMode\":\""+Boolean.toString(displayWarningMode)+"\", \"versionFlexible\":\""+Boolean.toString(versionFlexible)+"\""; "\"guessSystem\":\""+Boolean.toString(guessSystem)+"\", \"activeOnly\":\""+Boolean.toString(activeOnly)+(exampleOK ? "\", \"exampleOK\":\""+Boolean.toString(exampleOK) : "")+"\", \"membershipOnly\":\""+Boolean.toString(membershipOnly)+"\", \"displayWarningMode\":\""+Boolean.toString(displayWarningMode)+"\", \"versionFlexible\":\""+Boolean.toString(versionFlexible)+"\"";
} }
public String langSummary() { public String langSummary() {

View File

@ -652,7 +652,7 @@ public class ValidationService {
String dst = cliContext.getOutput(); String dst = cliContext.getOutput();
Utilities.createDirectory(dst); Utilities.createDirectory(dst);
Set<TranslationUnit> translations = new HashSet<>(); List<TranslationUnit> translations = new ArrayList<>();
for (String input : cliContext.getInputs()) { for (String input : cliContext.getInputs()) {
loadTranslationSource(translations, input); loadTranslationSource(translations, input);
} }
@ -671,7 +671,7 @@ public class ValidationService {
System.out.println("Done - imported "+t+" translations into "+refs.size()+ " in "+dst); System.out.println("Done - imported "+t+" translations into "+refs.size()+ " in "+dst);
} }
private void loadTranslationSource(Set<TranslationUnit> translations, String input) { private void loadTranslationSource(List<TranslationUnit> translations, String input) {
File f = new File(input); File f = new File(input);
if (f.exists()) { if (f.exists()) {
if (f.isDirectory()) { if (f.isDirectory()) {

View File

@ -295,15 +295,15 @@ public class ValueSetValidator extends BaseValidator {
System.out.println(" : Validate "+batch.size()+" codes from "+system+" for "+vsid); System.out.println(" : Validate "+batch.size()+" codes from "+system+" for "+vsid);
} }
try { try {
context.validateCodeBatch(ValidationOptions.defaults(), batch, null); context.validateCodeBatch(ValidationOptions.defaults().withExampleOK(), batch, null);
if (parent.isDebug()) { if (parent.isDebug()) {
System.out.println(" : .. "+(System.currentTimeMillis()-t)+"ms"); System.out.println(" : .. "+(System.currentTimeMillis()-t)+"ms");
} }
for (VSCodingValidationRequest cv : batch) { for (VSCodingValidationRequest cv : batch) {
if (version == null) { if (version == null) {
warningOrHint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, cv.getStack().getLiteralPath(), cv.getResult().isOk(), !retired, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE, system, cv.getCoding().getCode()); warningOrHint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, cv.getStack().getLiteralPath(), cv.getResult().isOk(), !retired, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE, system, cv.getCoding().getCode(), cv.getResult().getMessage());
} else { } else {
warningOrHint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, cv.getStack().getLiteralPath(), cv.getResult().isOk(), !retired, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE_VER, system, version, cv.getCoding().getCode()); warningOrHint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, cv.getStack().getLiteralPath(), cv.getResult().isOk(), !retired, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE_VER, system, version, cv.getCoding().getCode(), cv.getResult().getMessage());
} }
} }
} catch (Exception e) { } catch (Exception e) {
@ -333,7 +333,7 @@ public class ValueSetValidator extends BaseValidator {
slv.checkConcept(code, display); slv.checkConcept(code, display);
if (version == null) { if (version == null) {
ValidationResult vv = context.validateCode(ValidationOptions.defaults(), new Coding(system, code, null), null); ValidationResult vv = context.validateCode(ValidationOptions.defaults().withExampleOK(), new Coding(system, code, null), null);
if (vv.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED) { if (vv.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED) {
if (isExampleUrl(system)) { if (isExampleUrl(system)) {
if (isAllowExamples()) { if (isAllowExamples()) {
@ -347,19 +347,19 @@ public class ValueSetValidator extends BaseValidator {
return false; return false;
} else { } else {
boolean ok = vv.isOk(); boolean ok = vv.isOk();
warning(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, ok, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE, system, code); warning(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, ok, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE, system, code, vv.getMessage());
if (vv.getMessage() != null) { if (vv.getMessage() != null) {
hint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, false, vv.getMessage()); hint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, false, vv.getMessage());
} }
} }
} else { } else {
ValidationResult vv = context.validateCode(ValidationOptions.defaults(), new Coding(system, code, null).setVersion(version), null); ValidationResult vv = context.validateCode(ValidationOptions.defaults().withExampleOK(), new Coding(system, code, null).setVersion(version), null);
if (vv.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED) { if (vv.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED) {
warning(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stackInc.getLiteralPath(), false, I18nConstants.VALUESET_UNC_SYSTEM_WARNING_VER, system+"#"+version, vv.getMessage()); warning(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stackInc.getLiteralPath(), false, I18nConstants.VALUESET_UNC_SYSTEM_WARNING_VER, system+"#"+version, vv.getMessage());
return false; return false;
} else { } else {
boolean ok = vv.isOk(); boolean ok = vv.isOk();
warning(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, ok, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE_VER, system, version, code); warning(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, ok, I18nConstants.VALUESET_INCLUDE_INVALID_CONCEPT_CODE_VER, system, version, code, vv.getMessage());
if (vv.getMessage() != null) { if (vv.getMessage() != null) {
hint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, false, vv.getMessage()); hint(errors, NO_RULE_DATE, IssueType.BUSINESSRULE, stack, false, vv.getMessage());
} }

View File

@ -19,3 +19,23 @@ v: {
} }
------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------
{"code" : {
"system" : "http://something/something",
"code" : "something"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"severity" : "error",
"error" : "A definition for CodeSystem 'http://something/something' could not be found, so the code cannot be validated",
"class" : "CODESYSTEM_UNSUPPORTED",
"issues" : {
"resourceType" : "OperationOutcome"
}
}
-------------------------------------------------------------------------------------

View File

@ -443,6 +443,23 @@ v: {
"location" : ["CodeableConcept.coding[0].code"], "location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"] "expression" : ["CodeableConcept.coding[0].code"]
}, },
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "code-rule"
}],
"text" : "The code '1419004' is valid but is not active"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
},
{ {
"extension" : [{ "extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server", "url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
@ -731,6 +748,23 @@ v: {
"location" : ["CodeableConcept.coding[0].code"], "location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"] "expression" : ["CodeableConcept.coding[0].code"]
}, },
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "code-rule"
}],
"text" : "The code '324252006' is valid but is not active"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
},
{ {
"extension" : [{ "extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server", "url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
@ -922,6 +956,23 @@ v: {
"location" : ["CodeableConcept.coding[0].code"], "location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"] "expression" : ["CodeableConcept.coding[0].code"]
}, },
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "code-rule"
}],
"text" : "The code '602001' is valid but is not active"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
},
{ {
"extension" : [{ "extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server", "url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
@ -1452,6 +1503,23 @@ v: {
"location" : ["CodeableConcept.coding[0].code"], "location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"] "expression" : ["CodeableConcept.coding[0].code"]
}, },
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "code-rule"
}],
"text" : "The code '1419004' is valid but is not active"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
},
{ {
"extension" : [{ "extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server", "url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
@ -6589,6 +6657,23 @@ v: {
"location" : ["CodeableConcept.coding[0].code"], "location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"] "expression" : ["CodeableConcept.coding[0].code"]
}, },
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "code-rule"
}],
"text" : "The code '58108001' is valid but is not active"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
},
{ {
"extension" : [{ "extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server", "url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
@ -7136,7 +7221,6 @@ v: {
"error" : "Unknown code 'something' in the CodeSystem 'http://snomed.info/sct' version 'http://snomed.info/sct/900000000000207008/version/20240201'", "error" : "Unknown code 'something' in the CodeSystem 'http://snomed.info/sct' version 'http://snomed.info/sct/900000000000207008/version/20240201'",
"class" : "UNKNOWN", "class" : "UNKNOWN",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome", "resourceType" : "OperationOutcome",
"issue" : [{ "issue" : [{
@ -7193,10 +7277,89 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
} }
------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "1"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"code" : "1",
"severity" : "error",
"error" : "Unknown code '1' in the CodeSystem 'http://snomed.info/sct' version 'http://snomed.info/sct/900000000000207008/version/20240201'",
"class" : "UNKNOWN",
"server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "error",
"code" : "code-invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "invalid-code"
}],
"text" : "Unknown code '1' in the CodeSystem 'http://snomed.info/sct' version 'http://snomed.info/sct/900000000000207008/version/20240201'"
},
"location" : ["Coding.code"],
"expression" : ["Coding.code"]
}]
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "2"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"code" : "2",
"severity" : "error",
"error" : "Unknown code '2' in the CodeSystem 'http://snomed.info/sct' version 'http://snomed.info/sct/900000000000207008/version/20240201'",
"class" : "UNKNOWN",
"server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "error",
"code" : "code-invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "invalid-code"
}],
"text" : "Unknown code '2' in the CodeSystem 'http://snomed.info/sct' version 'http://snomed.info/sct/900000000000207008/version/20240201'"
},
"location" : ["Coding.code"],
"expression" : ["Coding.code"]
}]
}
}
-------------------------------------------------------------------------------------

View File

@ -15,7 +15,6 @@ v: {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9", "system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"version" : "3.0.0", "version" : "3.0.0",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome", "resourceType" : "OperationOutcome",
"issue" : [{ "issue" : [{
@ -53,7 +52,6 @@ v: {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9", "system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"version" : "3.0.0", "version" : "3.0.0",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome", "resourceType" : "OperationOutcome",
"issue" : [{ "issue" : [{
@ -91,7 +89,6 @@ v: {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9", "system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"version" : "3.0.0", "version" : "3.0.0",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome", "resourceType" : "OperationOutcome",
"issue" : [{ "issue" : [{
@ -123,6 +120,157 @@ v: {
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891" "valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}] }]
}}#### }}####
v: {
"display" : "Nearly every day",
"code" : "Nearly every day",
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"version" : "3.0.0",
"server" : "http://tx-dev.fhir.org/r4",
"issues" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "business-rule",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to draft CodeSystem http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9|3.0.0"
}
}]
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"code" : "Not-at-all"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"display" : "Not at all",
"code" : "Not-at-all",
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"version" : "3.0.0",
"server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "business-rule",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to draft CodeSystem http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9|3.0.0"
}
}]
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"code" : "Several-days"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"display" : "Several days",
"code" : "Several-days",
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"version" : "3.0.0",
"server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "business-rule",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to draft CodeSystem http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9|3.0.0"
}
}]
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"code" : "More than half the days"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"display" : "More than half the days",
"code" : "More than half the days",
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"version" : "3.0.0",
"server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "business-rule",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to draft CodeSystem http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9|3.0.0"
}
}]
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://hl7.org/fhir/uv/sdc/CodeSystem/CSPHQ9",
"code" : "Nearly every day"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: { v: {
"display" : "Nearly every day", "display" : "Nearly every day",
"code" : "Nearly every day", "code" : "Nearly every day",

View File

@ -469,7 +469,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -493,7 +492,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -561,7 +559,6 @@ v: {
"version" : "http://snomed.info/sct/731000124108/version/20230901", "version" : "http://snomed.info/sct/731000124108/version/20230901",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"inactive" : true, "inactive" : true,
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome", "resourceType" : "OperationOutcome",
"issue" : [{ "issue" : [{
@ -580,6 +577,23 @@ v: {
}, },
"location" : ["CodeableConcept.coding[0].code"], "location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"] "expression" : ["CodeableConcept.coding[0].code"]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "code-rule"
}],
"text" : "The code '132037003' is valid but is not active"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
}] }]
} }
@ -644,7 +658,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -667,7 +680,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -691,7 +703,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -715,7 +726,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -739,7 +749,6 @@ v: {
"error" : "The provided code 'http://snomed.info/sct#106004' was not found in the value set 'http://hl7.org/fhir/ValueSet/clinical-findings--0|5.0.0'", "error" : "The provided code 'http://snomed.info/sct#106004' was not found in the value set 'http://hl7.org/fhir/ValueSet/clinical-findings--0|5.0.0'",
"class" : "UNKNOWN", "class" : "UNKNOWN",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome", "resourceType" : "OperationOutcome",
"issue" : [{ "issue" : [{
@ -786,7 +795,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -810,7 +818,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -835,7 +842,6 @@ v: {
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"inactive" : true, "inactive" : true,
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome", "resourceType" : "OperationOutcome",
"issue" : [{ "issue" : [{
@ -854,6 +860,23 @@ v: {
}, },
"location" : ["CodeableConcept.coding[0].code"], "location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"] "expression" : ["CodeableConcept.coding[0].code"]
},
{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-server",
"valueUrl" : "http://tx-dev.fhir.org/r4"
}],
"severity" : "information",
"code" : "invalid",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "code-rule"
}],
"text" : "The code '58108001' is valid but is not active"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
}] }]
} }
@ -876,7 +899,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -900,7 +922,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -924,7 +945,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -948,7 +968,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -972,7 +991,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -996,7 +1014,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -1020,7 +1037,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -1043,7 +1059,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -1066,7 +1081,6 @@ v: {
"system" : "http://snomed.info/sct", "system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201", "version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4", "server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : { "issues" : {
"resourceType" : "OperationOutcome" "resourceType" : "OperationOutcome"
} }
@ -1083,6 +1097,74 @@ v: {
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891" "valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}] }]
}}#### }}####
v: {
"display" : "No status change",
"code" : "260388006",
"system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4",
"issues" : {
"resourceType" : "OperationOutcome"
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "230993007"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"display" : "Worsening",
"code" : "230993007",
"system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome"
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "385633008"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"display" : "Improving (qualifier value)",
"code" : "385633008",
"system" : "http://snomed.info/sct",
"version" : "http://snomed.info/sct/900000000000207008/version/20240201",
"server" : "http://tx-dev.fhir.org/r4",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome"
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "260388006"
}, "valueSet" :null, "langs":"en, en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "activeOnly":"false", "exampleOK":"true", "membershipOnly":"false", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: { v: {
"display" : "No status change", "display" : "No status change",
"code" : "260388006", "code" : "260388006",