@Override public ValueSet expandByIdentifier(String theUri, String theFilter) { if (isBlank(theUri)) { throw new InvalidRequestException("URI must not be blank or missing"); } ValueSet source = new ValueSet(); source.getCompose().addInclude().addValueSet(theUri); if (isNotBlank(theFilter)) { ConceptSetComponent include = source.getCompose().addInclude(); ConceptSetFilterComponent filter = include.addFilter(); filter.setProperty("display"); filter.setOp(FilterOperator.EQUAL); filter.setValue(theFilter); } ValueSet retVal = doExpand(source); return retVal; // if (defaultValueSet != null) { // source = getContext().newJsonParser().parseResource(ValueSet.class, getContext().newJsonParser().encodeResourceToString(defaultValueSet)); // } else { // IBundleProvider ids = search(ValueSet.SP_URL, new UriParam(theUri)); // if (ids.size() == 0) { // throw new InvalidRequestException("Unknown ValueSet URI: " + theUri); // } // source = (ValueSet) ids.getResources(0, 1).get(0); // } // // return expand(defaultValueSet, theFilter); }
@Override public ValueSet expandByIdentifier(String theUri, String theFilter) { if (isBlank(theUri)) { throw new InvalidRequestException("URI must not be blank or missing"); } ValueSet source = new ValueSet(); source.getCompose().addInclude().addValueSet(theUri); if (isNotBlank(theFilter)) { ConceptSetComponent include = source.getCompose().addInclude(); ConceptSetFilterComponent filter = include.addFilter(); filter.setProperty("display"); filter.setOp(FilterOperator.EQUAL); filter.setValue(theFilter); } ValueSet retVal = doExpand(source); return retVal; // if (defaultValueSet != null) { // source = getContext().newJsonParser().parseResource(ValueSet.class, getContext().newJsonParser().encodeResourceToString(defaultValueSet)); // } else { // IBundleProvider ids = search(ValueSet.SP_URL, new UriParam(theUri)); // if (ids.size() == 0) { // throw new InvalidRequestException("Unknown ValueSet URI: " + theUri); // } // source = (ValueSet) ids.getResources(0, 1).get(0); // } // // return expand(defaultValueSet, theFilter); }
public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent(); copyElement(src, tgt); for (org.hl7.fhir.dstu2016may.model.UriType t : src.getImport()) tgt.addInclude().addValueSet(t.getValue()); for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t)); return tgt; }
public org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.UriType t : src.getImport()) tgt.addInclude().addValueSet(t.getValue()); for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t)); return tgt; }
public org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.UriType t : src.getImport()) tgt.addInclude().addValueSet(t.getValue()); for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); for (org.hl7.fhir.instance.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t)); return tgt; }
public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent(); copyElement(src, tgt); for (org.hl7.fhir.dstu2016may.model.UriType t : src.getImport()) tgt.addInclude().addValueSet(t.getValue()); for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent t : src.getInclude()) tgt.addInclude(convertConceptSetComponent(t)); for (org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent t : src.getExclude()) tgt.addExclude(convertConceptSetComponent(t)); return tgt; }