put a status on transient value sets

This commit is contained in:
Grahame Grieve 2020-03-13 12:49:27 +11:00
parent 672d458537
commit 78d35ca8c1
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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()