View Javadoc
1   package ca.uhn.fhir.jpa.term;
2   
3   import ca.uhn.fhir.jpa.entity.*;
4   import ca.uhn.fhir.rest.api.server.RequestDetails;
5   import org.hl7.fhir.instance.model.api.IIdType;
6   import org.hl7.fhir.r4.model.ConceptMap;
7   import org.hl7.fhir.r4.model.ValueSet;
8   
9   import java.util.List;
10  import java.util.Set;
11  
12  /*
13   * #%L
14   * HAPI FHIR JPA Server
15   * %%
16   * Copyright (C) 2014 - 2018 University Health Network
17   * %%
18   * Licensed under the Apache License, Version 2.0 (the "License");
19   * you may not use this file except in compliance with the License.
20   * You may obtain a copy of the License at
21   * 
22   *      http://www.apache.org/licenses/LICENSE-2.0
23   * 
24   * Unless required by applicable law or agreed to in writing, software
25   * distributed under the License is distributed on an "AS IS" BASIS,
26   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27   * See the License for the specific language governing permissions and
28   * limitations under the License.
29   * #L%
30   */
31  
32  public interface IHapiTerminologySvc {
33  
34  	void deleteCodeSystem(TermCodeSystem thePersCs);
35  
36  	ValueSet expandValueSet(ValueSet theValueSetToExpand);
37  
38  	List<VersionIndependentConcept> expandValueSet(String theValueSet);
39  
40  	TermConcept findCode(String theCodeSystem, String theCode);
41  
42  	List<TermConcept> findCodes(String theSystem);
43  
44  	Set<TermConcept> findCodesAbove(Long theCodeSystemResourcePid, Long theCodeSystemResourceVersionPid, String theCode);
45  
46  	List<VersionIndependentConcept> findCodesAbove(String theSystem, String theCode);
47  
48  	List<VersionIndependentConcept> findCodesAboveUsingBuiltInSystems(String theSystem, String theCode);
49  
50  	Set<TermConcept> findCodesBelow(Long theCodeSystemResourcePid, Long theCodeSystemResourceVersionPid, String theCode);
51  
52  	List<VersionIndependentConcept> findCodesBelow(String theSystem, String theCode);
53  
54  	List<VersionIndependentConcept> findCodesBelowUsingBuiltInSystems(String theSystem, String theCode);
55  
56  	void saveDeferred();
57  
58  	/**
59  	 * This is mostly for unit tests - we can disable processing of deferred concepts
60  	 * by changing this flag
61  	 */
62  	void setProcessDeferred(boolean theProcessDeferred);
63  
64  	void storeNewCodeSystemVersion(Long theCodeSystemResourcePid, String theSystemUri, String theSystemName, TermCodeSystemVersion theCodeSytemVersion);
65  
66  	/**
67  	 * @return Returns the ID of the created/updated code system
68  	 */
69  	IIdType storeNewCodeSystemVersion(org.hl7.fhir.r4.model.CodeSystem theCodeSystemResource, TermCodeSystemVersion theCodeSystemVersion, RequestDetails theRequestDetails, List<org.hl7.fhir.r4.model.ValueSet> theValueSets, List<org.hl7.fhir.r4.model.ConceptMap> theConceptMaps);
70  
71  	void storeTermConceptMapAndChildren(ResourceTable theResourceTable, ConceptMap theConceptMap);
72  
73  	boolean supportsSystem(String theCodeSystem);
74  
75  	List<TermConceptMapGroupElementTarget> translate(TranslationRequest theTranslationRequest);
76  
77  	List<TermConceptMapGroupElement> translateWithReverse(TranslationRequest theTranslationRequest);
78  }