public org.hl7.fhir.instance.model.BooleanType convertBoolean(org.hl7.fhir.dstu3.model.BooleanType src) throws FHIRException { org.hl7.fhir.instance.model.BooleanType tgt = new org.hl7.fhir.instance.model.BooleanType(src.getValue()); copyElement(src, tgt); return tgt; }
public static org.hl7.fhir.dstu3.model.BooleanType convertBoolean(org.hl7.fhir.dstu2016may.model.BooleanType src) throws FHIRException { org.hl7.fhir.dstu3.model.BooleanType tgt = new org.hl7.fhir.dstu3.model.BooleanType(); if (src.hasValue()) tgt.setValue(src.getValue()); copyElement(src, tgt); return tgt; }
public static org.hl7.fhir.dstu2016may.model.BooleanType convertBoolean(org.hl7.fhir.dstu3.model.BooleanType src) throws FHIRException { org.hl7.fhir.dstu2016may.model.BooleanType tgt = new org.hl7.fhir.dstu2016may.model.BooleanType(); if (src.hasValue()) tgt.setValue(src.getValue()); copyElement(src, tgt); return tgt; }
public static void main(String[] theArgs) { DateTimeType effective = new DateTimeType(); effective.setValue(new Date()); effective.setValue(new Date(), TemporalPrecisionEnum.MINUTE); effective.setValueAsString("2017-09-11T14:35:00-07:00"); BooleanType active = new BooleanType(); active.setValue(true); active.setValueAsString("true"); DecimalType value = new DecimalType(); value.setValue(1.2d); value.setValueAsString("1.20000"); Observation obs = new Observation(); // These are equivalent obs.setComment("This is a comment"); obs.setCommentElement(new StringType("This is a comment")); // Get the primitive or get the FHIR type String comment = obs.getComment(); StringType commentElement = obs.getCommentElement(); }
public org.hl7.fhir.dstu3.model.BooleanType convertBoolean(org.hl7.fhir.instance.model.BooleanType src) throws FHIRException { org.hl7.fhir.dstu3.model.BooleanType tgt = new org.hl7.fhir.dstu3.model.BooleanType(src.getValue()); copyElement(src, tgt); return tgt; }
result.add(new BooleanType(all)); 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)); return result;
expression = expression + ((IntegerType)fixed).asStringValue(); } else if (fixed instanceof BooleanType) { expression = expression + ((BooleanType)fixed).asStringValue(); } else throw new DefinitionException("Unsupported fixed value type for discriminator(" + discriminator + ") for slice " + ed.getId() + ": " + fixed.getClass().getName());
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 (!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 BooleanType(String value) { super(); setValueAsString(value); }
private boolean isBoolean(List<Base> list, boolean b) { return list.size() == 1 && list.get(0) instanceof BooleanType && ((BooleanType) list.get(0)).booleanValue() == b; }
ValidateCodeResult result = dao.validateCode(url, theId, theCode, theSystem, theDisplay, theCoding, theCodeableConcept, theRequestDetails); Parameters retVal = new Parameters(); retVal.addParameter().setName("result").setValue(new BooleanType(result.isResult())); if (isNotBlank(result.getMessage())) { retVal.addParameter().setName("message").setValue(new StringType(result.getMessage()));
String value = focus.primitiveValue(); if (fixed instanceof org.hl7.fhir.dstu3.model.BooleanType) rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, check(((org.hl7.fhir.dstu3.model.BooleanType) fixed).asStringValue(), value), "Value is '" + value + "' but must be '" + ((org.hl7.fhir.dstu3.model.BooleanType) fixed).asStringValue() + "'"); else if (fixed instanceof org.hl7.fhir.dstu3.model.IntegerType) rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, check(((org.hl7.fhir.dstu3.model.IntegerType) fixed).asStringValue(), value),
/** * @param value Indicates whether the asserted set of linkages are considered to be "in effect". */ public Linkage setActive(boolean value) { if (this.active == null) this.active = new BooleanType(); this.active.setValue(value); return this; }
if (Boolean.TRUE.equals(theQuestion.getRequiredElement().getValue())) { rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] has no value but this item is required", linkId);
private String summariseSlicing(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(); }
/** * @param value A flag that indicates that the server supports conditional create. */ public CapabilityStatementRestResourceComponent setConditionalCreate(boolean value) { if (this.conditionalCreate == null) this.conditionalCreate = new BooleanType(); this.conditionalCreate.setValue(value); return this; }