001/*-
002 * #%L
003 * Smile CDR - CDR
004 * %%
005 * Copyright (C) 2016 - 2025 Smile CDR, Inc.
006 * %%
007 * All rights reserved.
008 * #L%
009 */
010package ca.cdr.api.fhirgw.model;
011
012import ca.uhn.fhir.rest.param.DateRangeParam;
013import org.hl7.fhir.instance.model.api.IIdType;
014
015import java.util.Date;
016
017/**
018 * This class represents a FHIR Gateway History request
019 */
020public class HistoryRequest extends BaseRequest<HistoryRequest> {
021        private Integer myOffset;
022        private IIdType myId;
023        private Date myDateSince;
024        private DateRangeParam myDateAt;
025        private Integer myCount;
026
027        public HistoryRequest() {}
028
029        /**
030         * Copy constructor
031         */
032        public HistoryRequest(HistoryRequest theRequest) {
033                super(theRequest);
034                myOffset = theRequest.getOffset();
035                myId = theRequest.getId();
036                myDateSince = theRequest.getDateSince();
037                myDateAt = theRequest.getDateAt();
038                myCount = theRequest.getCount();
039        }
040
041        /**
042         *
043         * @param theOffset Used to indicate the starting position of the queried results
044         */
045        public void setOffSet(Integer theOffset) {
046                myOffset = theOffset;
047        }
048
049        /**
050         *
051         * @param theId Used to set the ID of the specified resource
052         */
053        public void setId(IIdType theId) {
054                myId = theId;
055        }
056
057        /**
058         * @param theDateSince Used to include resource versions that were created at or after the specified date
059         */
060        public void setDateSince(Date theDateSince) {
061                myDateSince = theDateSince;
062        }
063
064        /**
065         * @param theDateAt Used to include resource versions that were created at the specified date
066         */
067        public void setDateAt(DateRangeParam theDateAt) {
068                myDateAt = theDateAt;
069        }
070
071        public void setCount(Integer theCount) {
072                myCount = theCount;
073        }
074
075        public IIdType getId() {
076                return myId;
077        }
078
079        public Integer getOffset() {
080                return myOffset;
081        }
082
083        public Date getDateSince() {
084                return myDateSince;
085        }
086
087        public DateRangeParam getDateAt() {
088                return myDateAt;
089        }
090
091        public Integer getCount() {
092                return myCount;
093        }
094}