public org.hl7.fhir.r4.model.Duration convertDuration(org.hl7.fhir.instance.model.Duration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Duration tgt = new org.hl7.fhir.r4.model.Duration(); copyElement(src, tgt); tgt.setValue(src.getValue()); tgt.setComparator(convertQuantityComparator(src.getComparator())); tgt.setUnit(src.getUnit()); tgt.setSystem(src.getSystem()); tgt.setCode(src.getCode()); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Duration tgt = new org.hl7.fhir.dstu2016may.model.Duration(); copyElement(src, tgt); if (src.hasValue()) tgt.setValue(src.getValue()); tgt.setComparator(convertQuantityComparator(src.getComparator())); if (src.hasUnit()) tgt.setUnit(src.getUnit()); if (src.hasSystem()) tgt.setSystem(src.getSystem()); if (src.hasCode()) tgt.setCode(src.getCode()); return tgt; }
protected Duration typedCopy() { return copy(); }
public Duration copy() { Duration dst = new Duration(); copyValues(dst); return dst; }
/** * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.) */ public Duration getDueDuration() throws FHIRException { if (this.due == null) this.due = new Duration(); if (!(this.due instanceof Duration)) throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.due.getClass().getName()+" was encountered"); return (Duration) this.due; }
if (nextValue.getValueElement().isEmpty()) { continue; if (SearchParamConstants.UCUM_NS.equals(nextValue.getSystem())) { if (isNotBlank(nextValue.getCode())) { Unit<? extends javax.measure.quantity.Quantity> unit = Unit.valueOf(nextValue.getCode()); javax.measure.converter.UnitConverter dayConverter = unit.getConverterTo(NonSI.DAY); double dayValue = dayConverter.convert(nextValue.getValue().doubleValue()); Duration newValue = new Duration(); newValue.setSystem(SearchParamConstants.UCUM_NS); newValue.setCode(NonSI.DAY.toString()); newValue.setValue(dayValue); nextValue = newValue; ResourceIndexedSearchParamNumber nextEntity = new ResourceIndexedSearchParamNumber(resourceName, nextValue.getValue()); nextEntity.setResource(theEntity); retVal.add(nextEntity);
public org.hl7.fhir.instance.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Duration tgt = new org.hl7.fhir.instance.model.Duration(); copyElement(src, tgt); tgt.setValue(src.getValue()); tgt.setComparator(convertQuantityComparator(src.getComparator())); tgt.setUnit(src.getUnit()); tgt.setSystem(src.getSystem()); tgt.setCode(src.getCode()); return tgt; }
/** * @param value {@link #length} (Quantity of time the encounter lasted. This excludes the time during leaves of absence.) */ public Encounter setLength(Duration value) {
/** * @return {@link #fastingStatus} (Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.) */ public Duration getFastingStatusDuration() throws FHIRException { if (this.fastingStatus == null) this.fastingStatus = new Duration(); if (!(this.fastingStatus instanceof Duration)) throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.fastingStatus.getClass().getName()+" was encountered"); return (Duration) this.fastingStatus; }
public org.hl7.fhir.instance.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Duration tgt = new org.hl7.fhir.instance.model.Duration(); copyElement(src, tgt); tgt.setValue(src.getValue()); tgt.setComparator(convertQuantityComparator(src.getComparator())); tgt.setUnit(src.getUnit()); tgt.setSystem(src.getSystem()); tgt.setCode(src.getCode()); return tgt; }
public boolean hasStudyEffectiveTimeFromStart() { return this.studyEffectiveTimeFromStart != null && !this.studyEffectiveTimeFromStart.isEmpty(); }
public static org.hl7.fhir.r4.model.Duration convertDuration(org.hl7.fhir.dstu2016may.model.Duration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Duration tgt = new org.hl7.fhir.r4.model.Duration(); copyElement(src, tgt); if (src.hasValue()) tgt.setValue(src.getValue()); tgt.setComparator(convertQuantityComparator(src.getComparator())); if (src.hasUnit()) tgt.setUnit(src.getUnit()); if (src.hasSystem()) tgt.setSystem(src.getSystem()); if (src.hasCode()) tgt.setCode(src.getCode()); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Duration convertDuration(org.hl7.fhir.r4.model.Duration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Duration tgt = new org.hl7.fhir.dstu2016may.model.Duration(); copyElement(src, tgt); if (src.hasValue()) tgt.setValue(src.getValue()); tgt.setComparator(convertQuantityComparator(src.getComparator())); if (src.hasUnit()) tgt.setUnit(src.getUnit()); if (src.hasSystem()) tgt.setSystem(src.getSystem()); if (src.hasCode()) tgt.setCode(src.getCode()); return tgt; }
/** * @return {@link #timing} (An optional value describing when the action should be performed.) */ public Duration getTimingDuration() throws FHIRException { if (this.timing == null) this.timing = new Duration(); if (!(this.timing instanceof Duration)) throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.timing.getClass().getName()+" was encountered"); return (Duration) this.timing; }
public boolean hasParticipantEffectiveTimeFromStart() { return this.participantEffectiveTimeFromStart != null && !this.participantEffectiveTimeFromStart.isEmpty(); }
public MedicationKnowledgeKineticsComponent copy() { MedicationKnowledgeKineticsComponent dst = new MedicationKnowledgeKineticsComponent(); copyValues(dst); if (areaUnderCurve != null) { dst.areaUnderCurve = new ArrayList<Quantity>(); for (Quantity i : areaUnderCurve) dst.areaUnderCurve.add(i.copy()); }; if (lethalDose50 != null) { dst.lethalDose50 = new ArrayList<Quantity>(); for (Quantity i : lethalDose50) dst.lethalDose50.add(i.copy()); }; dst.halfLifePeriod = halfLifePeriod == null ? null : halfLifePeriod.copy(); return dst; }
public org.hl7.fhir.r4.model.Duration convertDuration(org.hl7.fhir.instance.model.Duration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Duration tgt = new org.hl7.fhir.r4.model.Duration(); copyElement(src, tgt); tgt.setValue(src.getValue()); tgt.setComparator(convertQuantityComparator(src.getComparator())); tgt.setUnit(src.getUnit()); tgt.setSystem(src.getSystem()); tgt.setCode(src.getCode()); return tgt; }
/** * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) */ public Duration getOffsetDuration() throws FHIRException { if (this.offset == null) this.offset = new Duration(); if (!(this.offset instanceof Duration)) throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered"); return (Duration) this.offset; }
public boolean hasRetentionTime() { return this.retentionTime != null && !this.retentionTime.isEmpty(); }
public MedicationRequestDispenseRequestInitialFillComponent copy() { MedicationRequestDispenseRequestInitialFillComponent dst = new MedicationRequestDispenseRequestInitialFillComponent(); copyValues(dst); dst.quantity = quantity == null ? null : quantity.copy(); dst.duration = duration == null ? null : duration.copy(); return dst; }