Adds a DateAdjustment attribute to a domain query, shifting the event's effective start and/or end date relative to a reference anchor (START_DATE or END_DATE) and an offset in days. Used in Circe wherever DateAdjustment is supported.

dateAdjustment(
  startWith = "START_DATE",
  startOffset = 0L,
  endWith = "END_DATE",
  endOffset = 0L
)

Arguments

startWith

character; anchor for the adjusted start date, either "START_DATE" (default) or "END_DATE".

startOffset

integer offset in days added to the startWith anchor. Default 0.

endWith

character; anchor for the adjusted end date, either "END_DATE" (default) or "START_DATE".

endOffset

integer offset in days added to the endWith anchor. Default 0.

Value

A dateAdjustmentAttribute for use in any domain query constructor.

Details

For observationPeriod() and payerPlanPeriod(), dateAdjustment() also fulfils the role of Circe's UserDefinedPeriod: when a dateAdjustmentAttribute with name = "DateAdjustment" is present on an ObservationPeriod or PayerPlanPeriod query, Capr serializes it as UserDefinedPeriod { StartDate, EndDate } in the Circe JSON, which constrains the period to a caller-specified date window.