public org.hl7.fhir.dstu3.model.InstantType convertInstant(org.hl7.fhir.instance.model.InstantType src) throws FHIRException { org.hl7.fhir.dstu3.model.InstantType tgt = new org.hl7.fhir.dstu3.model.InstantType(src.getValue()); copyElement(src, tgt); return tgt; }
ourLog.info("Searching for searches which are before {} - now is {}", new InstantType(cutoff), new InstantType(new Date(now())));
public static org.hl7.fhir.dstu3.model.InstantType convertInstant(org.hl7.fhir.dstu2016may.model.InstantType src) throws FHIRException { org.hl7.fhir.dstu3.model.InstantType tgt = new org.hl7.fhir.dstu3.model.InstantType(); if (src.hasValue()) tgt.setValue(src.getValue()); copyElement(src, tgt); return tgt; }
private void deleteSearch(final Long theSearchPid) { mySearchDao.findById(theSearchPid).ifPresent(searchToDelete -> { mySearchIncludeDao.deleteForSearch(searchToDelete.getId()); /* * Note, we're only deleting up to 500 results in an individual search here. This * is to prevent really long running transactions in cases where there are * huge searches with tons of results in them. By the time we've gotten here * we have marked the parent Search entity as deleted, so it's not such a * huge deal to be only partially deleting search results. They'll get deleted * eventually */ int max = ourMaximumResultsToDeleteInOnePass; Slice<Long> resultPids = mySearchResultDao.findForSearch(PageRequest.of(0, max), searchToDelete.getId()); if (resultPids.hasContent()) { List<List<Long>> partitions = Lists.partition(resultPids.getContent(), ourMaximumResultsToDeleteInOneStatement); for (List<Long> nextPartition : partitions) { mySearchResultDao.deleteByIds(nextPartition); } } // Only delete if we don't have results left in this search if (resultPids.getNumberOfElements() < max) { ourLog.info("Deleting search {}/{} - Created[{}] -- Last returned[{}]", searchToDelete.getId(), searchToDelete.getUuid(), new InstantType(searchToDelete.getCreated()), new InstantType(searchToDelete.getSearchLastReturned())); mySearchDao.deleteByPid(searchToDelete.getId()); } else { ourLog.info("Purged {} search results for deleted search {}/{}", resultPids.getSize(), searchToDelete.getId(), searchToDelete.getUuid()); } }); }
/** * Returns a new instance of DateTimeType with the current system time and MILLI precision and the system local time * zone */ public static InstantType now() { return new InstantType(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); }
/** * Creates a new instance by parsing an HL7 v3 format date time string */ public static InstantType parseV3(String theV3String) { InstantType retVal = new InstantType(); retVal.setValueAsV3String(theV3String); return retVal; }
/** * @param value The time that the message was sent. */ public MessageHeader setTimestamp(Date value) { if (this.timestamp == null) this.timestamp = new InstantType(); this.timestamp.setValue(value); return this; }
/** * @param value The instant of time at which the activity was recorded. */ public Provenance setRecorded(Date value) { if (this.recorded == null) this.recorded = new InstantType(); this.recorded.setValue(value); return this; }
/** * @param value When the digital signature was signed. */ public Signature setWhen(Date value) { if (this.when == null) this.when = new InstantType(); this.when.setValue(value); return this; }
/** * @param value The date and time that this version of the report was released from the source diagnostic service. */ public DiagnosticReport setIssued(Date value) { if (value == null) this.issued = null; else { if (this.issued == null) this.issued = new InstantType(); this.issued.setValue(value); } return this; }
/** * @return {@link #timestamp} (The time that the message was sent.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value */ public InstantType getTimestampElement() { if (this.timestamp == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create MessageHeader.timestamp"); else if (Configuration.doAutoCreate()) this.timestamp = new InstantType(); // bb return this.timestamp; }
/** * @return {@link #start} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value */ public InstantType getStartElement() { if (this.start == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Appointment.start"); else if (Configuration.doAutoCreate()) this.start = new InstantType(); // bb return this.start; }
/** * @return {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value */ public InstantType getIfModifiedSinceElement() { if (this.ifModifiedSince == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifModifiedSince"); else if (Configuration.doAutoCreate()) this.ifModifiedSince = new InstantType(); // bb return this.ifModifiedSince; }
/** * @return {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value */ public InstantType getLastModifiedElement() { if (this.lastModified == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create BundleEntryResponseComponent.lastModified"); else if (Configuration.doAutoCreate()) this.lastModified = new InstantType(); // bb return this.lastModified; }
/** * @return {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value */ public InstantType getEndElement() { if (this.end == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AppointmentResponse.end"); else if (Configuration.doAutoCreate()) this.end = new InstantType(); // bb return this.end; }
/** * @return {@link #when} (When the digital signature was signed.). This is the underlying object with id, value and extensions. The accessor "getWhen" gives direct access to the value */ public InstantType getWhenElement() { if (this.when == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Signature.when"); else if (Configuration.doAutoCreate()) this.when = new InstantType(); // bb return this.when; }
/** * @return {@link #lastUpdated} (When the resource last changed - e.g. when the version changed.). This is the underlying object with id, value and extensions. The accessor "getLastUpdated" gives direct access to the value */ public InstantType getLastUpdatedElement() { if (this.lastUpdated == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Meta.lastUpdated"); else if (Configuration.doAutoCreate()) this.lastUpdated = new InstantType(); // bb return this.lastUpdated; }
/** * @return {@link #recorded} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value */ public InstantType getRecordedElement() { if (this.recorded == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AuditEvent.recorded"); else if (Configuration.doAutoCreate()) this.recorded = new InstantType(); // bb return this.recorded; }
/** * @return {@link #recorded} (The instant of time at which the activity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value */ public InstantType getRecordedElement() { if (this.recorded == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Provenance.recorded"); else if (Configuration.doAutoCreate()) this.recorded = new InstantType(); // bb return this.recorded; }
public org.hl7.fhir.dstu3.model.InstantType convertInstant(org.hl7.fhir.instance.model.InstantType src) throws FHIRException { org.hl7.fhir.dstu3.model.InstantType tgt = new org.hl7.fhir.dstu3.model.InstantType(src.getValue()); copyElement(src, tgt); return tgt; }