View Javadoc
1   
2   package ca.uhn.fhir.jpa.rp.dstu3;
3   
4   import java.util.*;
5   
6   import org.apache.commons.lang3.StringUtils;
7   
8   import ca.uhn.fhir.jpa.provider.dstu3.*;
9   import ca.uhn.fhir.jpa.dao.SearchParameterMap;
10  import ca.uhn.fhir.model.api.Include;
11  import ca.uhn.fhir.model.api.annotation.*;
12  import org.hl7.fhir.dstu3.model.*;
13  import ca.uhn.fhir.rest.annotation.*;
14  import ca.uhn.fhir.rest.param.*;
15  import ca.uhn.fhir.rest.api.SortSpec;
16  import ca.uhn.fhir.rest.api.SummaryEnum;
17  import ca.uhn.fhir.rest.api.SearchTotalModeEnum;
18  
19  public class ConceptMapResourceProvider extends 
20  	BaseJpaResourceProviderConceptMapDstu3
21  	{
22  
23  	@Override
24  	public Class<ConceptMap> getResourceType() {
25  		return ConceptMap.class;
26  	}
27  
28  	@Search(allowUnknownParams=true)
29  	public ca.uhn.fhir.rest.api.server.IBundleProvider search(
30  			javax.servlet.http.HttpServletRequest theServletRequest,
31  			javax.servlet.http.HttpServletResponse theServletResponse,
32  
33  			ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails,
34  			
35  			@Description(shortDefinition="Search the contents of the resource's data using a fulltext search")
36  			@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_CONTENT)
37  			StringAndListParam theFtContent, 
38  
39  			@Description(shortDefinition="Search the contents of the resource's narrative using a fulltext search")
40  			@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_TEXT)
41  			StringAndListParam theFtText, 
42  
43  			@Description(shortDefinition="Search for resources which have the given tag")
44  			@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_TAG)
45  			TokenAndListParam theSearchForTag, 
46  
47  			@Description(shortDefinition="Search for resources which have the given security labels")
48  			@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_SECURITY)
49  			TokenAndListParam theSearchForSecurity, 
50    
51  			@Description(shortDefinition="Search for resources which have the given profile")
52  			@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_PROFILE)
53  			UriAndListParam theSearchForProfile, 
54  
55  			@Description(shortDefinition="Return resources linked to by the given target")
56  			@OptionalParam(name="_has")
57  			HasAndListParam theHas, 
58  
59    
60  			@Description(shortDefinition="The ID of the resource")
61  			@OptionalParam(name="_id")
62  			TokenAndListParam the_id,
63    
64  			@Description(shortDefinition="The language of the resource")
65  			@OptionalParam(name="_language")
66  			StringAndListParam the_language, 
67    
68  			@Description(shortDefinition="The concept map publication date")
69  			@OptionalParam(name="date")
70  			DateRangeParam theDate, 
71    
72  			@Description(shortDefinition="Reference to property mapping depends on")
73  			@OptionalParam(name="dependson")
74  			UriAndListParam theDependson, 
75    
76  			@Description(shortDefinition="The description of the concept map")
77  			@OptionalParam(name="description")
78  			StringAndListParam theDescription, 
79    
80  			@Description(shortDefinition="External identifier for the concept map")
81  			@OptionalParam(name="identifier")
82  			TokenAndListParam theIdentifier,
83    
84  			@Description(shortDefinition="Intended jurisdiction for the concept map")
85  			@OptionalParam(name="jurisdiction")
86  			TokenAndListParam theJurisdiction,
87    
88  			@Description(shortDefinition="Computationally friendly name of the concept map")
89  			@OptionalParam(name="name")
90  			StringAndListParam theName, 
91    
92  			@Description(shortDefinition="Canonical URL for other concept map")
93  			@OptionalParam(name="other")
94  			UriAndListParam theOther, 
95    
96  			@Description(shortDefinition="Reference to property mapping depends on")
97  			@OptionalParam(name="product")
98  			UriAndListParam theProduct, 
99    
100 			@Description(shortDefinition="Name of the publisher of the concept map")
101 			@OptionalParam(name="publisher")
102 			StringAndListParam thePublisher, 
103   
104 			@Description(shortDefinition="Identifies the source of the concepts which are being mapped")
105 			@OptionalParam(name="source", targetTypes={  } )
106 			ReferenceAndListParam theSource, 
107   
108 			@Description(shortDefinition="Identifies element being mapped")
109 			@OptionalParam(name="source-code")
110 			TokenAndListParam theSource_code,
111   
112 			@Description(shortDefinition="Code System (if value set crosses code systems)")
113 			@OptionalParam(name="source-system")
114 			UriAndListParam theSource_system, 
115   
116 			@Description(shortDefinition="Identifies the source of the concepts which are being mapped")
117 			@OptionalParam(name="source-uri", targetTypes={  } )
118 			ReferenceAndListParam theSource_uri, 
119   
120 			@Description(shortDefinition="The current status of the concept map")
121 			@OptionalParam(name="status")
122 			TokenAndListParam theStatus,
123   
124 			@Description(shortDefinition="Provides context to the mappings")
125 			@OptionalParam(name="target", targetTypes={  } )
126 			ReferenceAndListParam theTarget, 
127   
128 			@Description(shortDefinition="Code that identifies the target element")
129 			@OptionalParam(name="target-code")
130 			TokenAndListParam theTarget_code,
131   
132 			@Description(shortDefinition="System of the target (if necessary)")
133 			@OptionalParam(name="target-system")
134 			UriAndListParam theTarget_system, 
135   
136 			@Description(shortDefinition="Provides context to the mappings")
137 			@OptionalParam(name="target-uri", targetTypes={  } )
138 			ReferenceAndListParam theTarget_uri, 
139   
140 			@Description(shortDefinition="The human-friendly name of the concept map")
141 			@OptionalParam(name="title")
142 			StringAndListParam theTitle, 
143   
144 			@Description(shortDefinition="The uri that identifies the concept map")
145 			@OptionalParam(name="url")
146 			UriAndListParam theUrl, 
147   
148 			@Description(shortDefinition="The business version of the concept map")
149 			@OptionalParam(name="version")
150 			TokenAndListParam theVersion,
151 
152 			@RawParam
153 			Map<String, List<String>> theAdditionalRawParams,
154 
155 			@IncludeParam(reverse=true)
156 			Set<Include> theRevIncludes,
157 			@Description(shortDefinition="Only return resources which were last updated as specified by the given range")
158 			@OptionalParam(name="_lastUpdated")
159 			DateRangeParam theLastUpdated, 
160 
161 			@IncludeParam(allow= {
162 					"ConceptMap:source" , 					"ConceptMap:source-uri" , 					"ConceptMap:target" , 					"ConceptMap:target-uri" , 						"ConceptMap:source" , 					"ConceptMap:source-uri" , 					"ConceptMap:target" , 					"ConceptMap:target-uri" , 						"ConceptMap:source" , 					"ConceptMap:source-uri" , 					"ConceptMap:target" , 					"ConceptMap:target-uri" , 						"ConceptMap:source" , 					"ConceptMap:source-uri" , 					"ConceptMap:target" , 					"ConceptMap:target-uri" 					, "*"
163 			}) 
164 			Set<Include> theIncludes,
165 			
166 			@Sort 
167 			SortSpec theSort,
168 			
169 			@ca.uhn.fhir.rest.annotation.Count
170 			Integer theCount,
171 
172 			SummaryEnum theSummaryMode,
173 
174 			SearchTotalModeEnum theSearchTotalMode
175 
176 			) {
177 		startRequest(theServletRequest);
178 		try {
179 			SearchParameterMap paramMap = new SearchParameterMap();
180 			paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_CONTENT, theFtContent);
181 			paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_TEXT, theFtText);
182 			paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_TAG, theSearchForTag);
183 			paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_SECURITY, theSearchForSecurity);
184 			paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_PROFILE, theSearchForProfile);
185 			paramMap.add("_has", theHas);
186 			paramMap.add("_id", the_id);
187 			paramMap.add("_language", the_language);
188 			paramMap.add("date", theDate);
189 			paramMap.add("dependson", theDependson);
190 			paramMap.add("description", theDescription);
191 			paramMap.add("identifier", theIdentifier);
192 			paramMap.add("jurisdiction", theJurisdiction);
193 			paramMap.add("name", theName);
194 			paramMap.add("other", theOther);
195 			paramMap.add("product", theProduct);
196 			paramMap.add("publisher", thePublisher);
197 			paramMap.add("source", theSource);
198 			paramMap.add("source-code", theSource_code);
199 			paramMap.add("source-system", theSource_system);
200 			paramMap.add("source-uri", theSource_uri);
201 			paramMap.add("status", theStatus);
202 			paramMap.add("target", theTarget);
203 			paramMap.add("target-code", theTarget_code);
204 			paramMap.add("target-system", theTarget_system);
205 			paramMap.add("target-uri", theTarget_uri);
206 			paramMap.add("title", theTitle);
207 			paramMap.add("url", theUrl);
208 			paramMap.add("version", theVersion);
209 			paramMap.setRevIncludes(theRevIncludes);
210 			paramMap.setLastUpdated(theLastUpdated);
211 			paramMap.setIncludes(theIncludes);
212 			paramMap.setSort(theSort);
213 			paramMap.setCount(theCount);
214 			paramMap.setSummaryMode(theSummaryMode);
215 			paramMap.setSearchTotalMode(theSearchTotalMode);
216 
217 			getDao().translateRawParameters(theAdditionalRawParams, paramMap);
218 
219 			ca.uhn.fhir.rest.api.server.IBundleProvider retVal = getDao().search(paramMap, theRequestDetails, theServletResponse);
220 			return retVal;
221 		} finally {
222 			endRequest(theServletRequest);
223 		}
224 	}
225 
226 }