From 78d35ca8c1c05af870147736f6575ad0d192e0a4 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 13 Mar 2020 12:49:27 +1100 Subject: [PATCH] put a status on transient value sets --- .../org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java | 2 ++ .../java/org/hl7/fhir/r5/terminologies/ValueSetUtilities.java | 1 + 2 files changed, 3 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java index f3bcb334b..ef7cbc985 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java @@ -35,6 +35,7 @@ import org.hl7.fhir.r5.model.CodeSystem; import org.hl7.fhir.r5.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent; +import org.hl7.fhir.r5.model.Enumerations.PublicationStatus; import org.hl7.fhir.r5.model.CodeableConcept; import org.hl7.fhir.r5.model.Coding; import org.hl7.fhir.r5.model.UriType; @@ -363,6 +364,7 @@ public class ValueSetCheckerSimple implements ValueSetChecker { if (cs == null || cs.getContent() != CodeSystemContentMode.COMPLETE) { // make up a transient value set with ValueSet vs = new ValueSet(); + vs.setStatus(PublicationStatus.ACTIVE); vs.setUrl(Utilities.makeUuidUrn()); vs.getCompose().addInclude(vsi); ValidationResult res = context.validateCode(options.noClient(), new Coding(system, code, null), vs); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetUtilities.java index abe2a3278..7d57781ab 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetUtilities.java @@ -153,6 +153,7 @@ public class ValueSetUtilities { private static ValueSet generateImplicitMimetypesValueSet(String theUri) { ValueSet valueSet = new ValueSet(); + valueSet.setStatus(PublicationStatus.ACTIVE); valueSet.setUrl(theUri); valueSet.setDescription("This value set includes all possible codes from BCP-13 (http://tools.ietf.org/html/bcp13)"); valueSet.getCompose()