/** * @param value Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included). */ public ValueSetComposeComponent setInactive(boolean value) { if (this.inactive == null) this.inactive = new BooleanType(); this.inactive.setValue(value); return this; }
public BooleanType copy() { BooleanType ret = new BooleanType(getValue()); copyValues(ret); return ret; }
private boolean isBoolean(List<Base> list, boolean b) { return list.size() == 1 && list.get(0) instanceof BooleanType && ((BooleanType) list.get(0)).booleanValue() == b; }
result.add(new BooleanType(all).noExtensions()); return result; } else {// (exp.getParameters().size() == 0) { boolean v = false; if (item instanceof BooleanType) { v = ((BooleanType) item).booleanValue(); } else v = item != null; result.add(new BooleanType(all).noExtensions()); return result;
private void buildFixedExpression(ElementDefinition ed, StringBuilder expression, String discriminator, ElementDefinition criteriaElement) throws DefinitionException { Type fixed = criteriaElement.getFixed(); if (fixed instanceof CodeableConcept) { CodeableConcept cc = (CodeableConcept) fixed; buildCodeableConceptExpression(ed, expression, discriminator, cc); } else { expression.append(" and (" + discriminator + " = "); if (fixed instanceof StringType) { Gson gson = new Gson(); String json = gson.toJson((StringType)fixed); String escapedString = json.substring(json.indexOf(":")+2); escapedString = escapedString.substring(0, escapedString.indexOf(",\"myStringValue")-1); expression.append("'" + escapedString + "'"); } else if (fixed instanceof UriType) { expression.append("'" + ((UriType)fixed).asStringValue() + "'"); } else if (fixed instanceof IntegerType) { expression.append(((IntegerType)fixed).asStringValue()); } else if (fixed instanceof DecimalType) { expression.append(((IntegerType)fixed).asStringValue()); } else if (fixed instanceof BooleanType) { expression.append(((BooleanType)fixed).asStringValue()); } else throw new DefinitionException("Unsupported fixed value type for discriminator(" + discriminator + ") for slice " + ed.getId() + ": " + fixed.getClass().getName()); expression.append(")"); } }
base.setMustSupportElement(derived.getMustSupportElement().copy()); else if (trimDifferential) derived.setMustSupportElement(null); else derived.getMustSupportElement().setUserData(DERIVATION_EQUALS, true); base.setIsModifierElement(derived.getIsModifierElement().copy()); else if (trimDifferential) derived.setIsModifierElement(null); else if (derived.hasIsModifierElement()) derived.getIsModifierElement().setUserData(DERIVATION_EQUALS, true); if (derived.hasIsModifierReasonElement() && !(base.hasIsModifierReasonElement() && Base.compareDeep(derived.getIsModifierReasonElement(), base.getIsModifierReasonElement(), false))) base.setIsModifierReasonElement(derived.getIsModifierReasonElement().copy()); if (!Base.compareDeep(derived.getIsSummaryElement(), base.getIsSummaryElement(), false)) { if (base.hasIsSummary()) throw new Error("Error in profile "+pn+" at "+derived.getPath()+": Base isSummary = "+base.getIsSummaryElement().asStringValue()+", derived isSummary = "+derived.getIsSummaryElement().asStringValue()); base.setIsSummaryElement(derived.getIsSummaryElement().copy()); } else if (trimDifferential) derived.setIsSummaryElement(null); else derived.getIsSummaryElement().setUserData(DERIVATION_EQUALS, true);
public DeviceDefinitionMaterialComponent copy() { DeviceDefinitionMaterialComponent dst = new DeviceDefinitionMaterialComponent(); copyValues(dst); dst.substance = substance == null ? null : substance.copy(); dst.alternate = alternate == null ? null : alternate.copy(); dst.allergenicIndicator = allergenicIndicator == null ? null : allergenicIndicator.copy(); return dst; }
public static Boolean readBooleanExtension(Element c, String uri) { Extension ex = ExtensionHelper.getExtension(c, uri); if (ex == null) return null; if (!(ex.getValue() instanceof BooleanType)) return null; return ((BooleanType) ex.getValue()).getValue(); }
public boolean getReverseAsBoolean() { if (hasReverse()) { return myReverse.booleanValue(); } return false; }
result.add(new BooleanType(all).noExtensions()); return result; } else {// (exp.getParameters().size() == 0) { boolean v = false; if (item instanceof BooleanType) { v = ((BooleanType) item).booleanValue(); } else v = item != null; result.add(new BooleanType(all).noExtensions()); return result;
private String summarizeSlicing(ElementDefinitionSlicingComponent slice) { StringBuilder b = new StringBuilder(); boolean first = true; for (ElementDefinitionSlicingDiscriminatorComponent d : slice.getDiscriminator()) { if (first) first = false; else b.append(", "); b.append(d); } b.append("("); if (slice.hasOrdered()) b.append(slice.getOrderedElement().asStringValue()); b.append("/"); if (slice.hasRules()) b.append(slice.getRules().toCode()); b.append(")"); if (slice.hasDescription()) { b.append(" \""); b.append(slice.getDescription()); b.append("\""); } return b.toString(); }
base.setMustSupportElement(derived.getMustSupportElement().copy()); else if (trimDifferential) derived.setMustSupportElement(null); else derived.getMustSupportElement().setUserData(DERIVATION_EQUALS, true); base.setIsModifierElement(derived.getIsModifierElement().copy()); else if (trimDifferential) derived.setIsModifierElement(null); else if (derived.hasIsModifierElement()) derived.getIsModifierElement().setUserData(DERIVATION_EQUALS, true); if (derived.hasIsModifierReasonElement() && !(base.hasIsModifierReasonElement() && Base.compareDeep(derived.getIsModifierReasonElement(), base.getIsModifierReasonElement(), false))) base.setIsModifierReasonElement(derived.getIsModifierReasonElement().copy()); if (!Base.compareDeep(derived.getIsSummaryElement(), base.getIsSummaryElement(), false)) { if (base.hasIsSummary()) throw new Error("Error in profile "+pn+" at "+derived.getPath()+": Base isSummary = "+base.getIsSummaryElement().asStringValue()+", derived isSummary = "+derived.getIsSummaryElement().asStringValue()); base.setIsSummaryElement(derived.getIsSummaryElement().copy()); } else if (trimDifferential) derived.setIsSummaryElement(null); else derived.getIsSummaryElement().setUserData(DERIVATION_EQUALS, true);
public TestScriptFixtureComponent copy() { TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); copyValues(dst); dst.autocreate = autocreate == null ? null : autocreate.copy(); dst.autodelete = autodelete == null ? null : autodelete.copy(); dst.resource = resource == null ? null : resource.copy(); return dst; }
public static boolean isNotSelectable(CodeSystem cs, ConceptDefinitionComponent def) { for (ConceptPropertyComponent p : def.getProperty()) { if (p.getCode().equals("notSelectable") && p.hasValue() && p.getValue() instanceof BooleanType) return ((BooleanType) p.getValue()).getValue(); } return false; }
/** * @param value True if the dispenser dispensed a different drug or product from what was prescribed. */ public MedicationDispenseSubstitutionComponent setWasSubstituted(boolean value) { if (this.wasSubstituted == null) this.wasSubstituted = new BooleanType(); this.wasSubstituted.setValue(value); return this; }
/** * @return A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. */ public boolean getExperimental() { return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); }
public boolean getParameterBool(String name) { for (ParametersParameterComponent p : getParameter()) { if (p.getName().equals(name)) { if (p.getValue() instanceof BooleanType) return ((BooleanType) p.getValue()).booleanValue(); boolean ok = Boolean.getBoolean(p.getValue().primitiveValue()); return ok; } } return false; }
public BooleanType copy() { BooleanType ret = new BooleanType(getValue()); copyValues(ret); return ret; }
private static void renderTransformParam(StringBuilder b, StructureMapGroupRuleTargetParameterComponent rtp) { try { if (rtp.hasValueBooleanType()) b.append(rtp.getValueBooleanType().asStringValue()); else if (rtp.hasValueDecimalType()) b.append(rtp.getValueDecimalType().asStringValue()); else if (rtp.hasValueIdType()) b.append(rtp.getValueIdType().asStringValue()); else if (rtp.hasValueDecimalType()) b.append(rtp.getValueDecimalType().asStringValue()); else if (rtp.hasValueIntegerType()) b.append(rtp.getValueIntegerType().asStringValue()); else b.append("'"+Utilities.escapeJava(rtp.getValueStringType().asStringValue())+"'"); } catch (FHIRException e) { e.printStackTrace(); b.append("error!"); } }