
001package ca.uhn.fhir.rest.api.server.bulk; 002 003/*- 004 * #%L 005 * HAPI FHIR - Server Framework 006 * %% 007 * Copyright (C) 2014 - 2023 Smile CDR, Inc. 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023import org.hl7.fhir.instance.model.api.IIdType; 024 025import javax.annotation.Nonnull; 026import java.util.Date; 027import java.util.Set; 028 029public class BulkDataExportOptions { 030 031 public enum ExportStyle { 032 PATIENT, 033 GROUP, 034 SYSTEM 035 } 036 037 private String myOutputFormat; 038 private Set<String> myResourceTypes; 039 private Date mySince; 040 private Set<String> myFilters; 041 private ExportStyle myExportStyle; 042 private boolean myExpandMdm; 043 private IIdType myGroupId; 044 private Set<IIdType> myPatientIds; 045 046 public void setOutputFormat(String theOutputFormat) { 047 myOutputFormat = theOutputFormat; 048 } 049 050 public void setResourceTypes(Set<String> theResourceTypes) { 051 myResourceTypes = theResourceTypes; 052 } 053 054 public void setSince(Date theSince) { 055 mySince = theSince; 056 } 057 058 public void setFilters(Set<String> theFilters) { 059 myFilters = theFilters; 060 } 061 062 public ExportStyle getExportStyle() { 063 return myExportStyle; 064 } 065 066 public void setExportStyle(ExportStyle theExportStyle) { 067 myExportStyle = theExportStyle; 068 } 069 070 public String getOutputFormat() { 071 return myOutputFormat; 072 } 073 074 @Nonnull 075 public Set<String> getResourceTypes() { 076 if (myResourceTypes == null) { 077 myResourceTypes = Set.of(); 078 } 079 return myResourceTypes; 080 } 081 082 public Date getSince() { 083 return mySince; 084 } 085 086 @Nonnull 087 public Set<String> getFilters() { 088 if (myFilters == null) { 089 myFilters = Set.of(); 090 } 091 return myFilters; 092 } 093 094 public boolean isExpandMdm() { 095 return myExpandMdm; 096 } 097 098 public void setExpandMdm(boolean theExpandMdm) { 099 myExpandMdm = theExpandMdm; 100 } 101 102 public IIdType getGroupId() { 103 return myGroupId; 104 } 105 106 public void setGroupId(IIdType theGroupId) { 107 myGroupId = theGroupId; 108 } 109 110 public Set<IIdType> getPatientIds() { 111 return myPatientIds; 112 } 113 114 public void setPatientIds(Set<IIdType> thePatientIds) { 115 myPatientIds = thePatientIds; 116 } 117}