double dayValue = dayConverter.convert(nextValue.getValue().doubleValue()); Duration newValue = new Duration(); newValue.setSystem(SearchParamConstants.UCUM_NS); newValue.setCode(NonSI.DAY.toString()); newValue.setValue(dayValue);
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.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 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.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; }