View Javadoc
1   package ca.uhn.fhir.jpa.provider.r4;
2   
3   /*-
4    * #%L
5    * HAPI FHIR JPA Server
6    * %%
7    * Copyright (C) 2014 - 2018 University Health Network
8    * %%
9    * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   * 
13   *      http://www.apache.org/licenses/LICENSE-2.0
14   * 
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * #L%
21   */
22  
23  import ca.uhn.fhir.jpa.provider.BaseTerminologyUploaderProvider;
24  import ca.uhn.fhir.rest.annotation.Operation;
25  import ca.uhn.fhir.rest.annotation.OperationParam;
26  import ca.uhn.fhir.rest.api.server.RequestDetails;
27  import ca.uhn.fhir.rest.param.StringParam;
28  import org.hl7.fhir.r4.model.Attachment;
29  import org.hl7.fhir.r4.model.IntegerType;
30  import org.hl7.fhir.r4.model.Parameters;
31  import org.hl7.fhir.r4.model.StringType;
32  
33  import javax.servlet.http.HttpServletRequest;
34  import java.util.List;
35  
36  public class TerminologyUploaderProviderR4 extends BaseTerminologyUploaderProvider {
37  
38  	@Operation(name = UPLOAD_EXTERNAL_CODE_SYSTEM, idempotent = false, returnParameters = {
39  		@OperationParam(name = "conceptCount", type = IntegerType.class, min = 1)
40  	})
41  	public Parameters uploadExternalCodeSystem(
42  		HttpServletRequest theServletRequest,
43  		@OperationParam(name = "url", min = 1) StringParam theCodeSystemUrl,
44  		@OperationParam(name = "localfile", min = 1, max = OperationParam.MAX_UNLIMITED) List<StringType> theLocalFile,
45  		@OperationParam(name = "package", min = 0, max = OperationParam.MAX_UNLIMITED) List<Attachment> thePackage,
46  		RequestDetails theRequestDetails
47  	) {
48  		return handleUploadExternalCodeSystem(theServletRequest, theCodeSystemUrl, theLocalFile, thePackage, theRequestDetails);
49  	}
50  }