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