
001/* 002 * #%L 003 * HAPI FHIR Storage api 004 * %% 005 * Copyright (C) 2014 - 2025 Smile CDR, Inc. 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package ca.uhn.fhir.jpa.api.dao; 021 022import ca.uhn.fhir.context.support.TranslateConceptResults; 023import ca.uhn.fhir.jpa.api.model.TranslationRequest; 024import ca.uhn.fhir.rest.api.server.RequestDetails; 025import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; 026import org.hl7.fhir.instance.model.api.IBaseResource; 027 028public interface IFhirResourceDaoConceptMap<T extends IBaseResource> extends IFhirResourceDao<T> { 029 TranslateConceptResults translate(TranslationRequest theTranslationRequest, RequestDetails theRequestDetails); 030 031 /** 032 * Operation: <code>ConceptMap/$hapi.fhir.add-mapping</code> 033 * 034 * @since 8.6.0 035 */ 036 IBaseOperationOutcome addMapping(AddMappingRequest theRequest, RequestDetails theRequestDetails); 037 038 /** 039 * Operation: <code>ConceptMap/$hapi.fhir.remove-mapping</code> 040 * 041 * @since 8.6.0 042 */ 043 IBaseOperationOutcome removeMapping(RemoveMappingRequest theRequest, RequestDetails theRequestDetails); 044 045 class RemoveMappingRequest { 046 private String myConceptMapUri; 047 private String myConceptMapVersion; 048 private String mySourceSystem; 049 private String mySourceCode; 050 private String myTargetSystem; 051 private String myTargetCode; 052 private String mySourceSystemVersion; 053 private String myTargetSystemVersion; 054 055 public String getConceptMapUri() { 056 return myConceptMapUri; 057 } 058 059 public void setConceptMapUri(String theConceptMapUri) { 060 myConceptMapUri = theConceptMapUri; 061 } 062 063 public void setConceptMapVersion(String theConceptMapVersion) { 064 myConceptMapVersion = theConceptMapVersion; 065 } 066 067 public String getConceptMapVersion() { 068 return myConceptMapVersion; 069 } 070 071 public String getSourceSystem() { 072 return mySourceSystem; 073 } 074 075 public void setSourceSystem(String theSourceSystem) { 076 mySourceSystem = theSourceSystem; 077 } 078 079 public String getSourceCode() { 080 return mySourceCode; 081 } 082 083 public void setSourceCode(String theSourceCode) { 084 mySourceCode = theSourceCode; 085 } 086 087 public String getTargetSystem() { 088 return myTargetSystem; 089 } 090 091 public void setTargetSystem(String theTargetSystem) { 092 myTargetSystem = theTargetSystem; 093 } 094 095 public String getTargetCode() { 096 return myTargetCode; 097 } 098 099 public void setTargetCode(String theTargetCode) { 100 myTargetCode = theTargetCode; 101 } 102 103 public void setSourceSystemVersion(String theSourceSystemVersion) { 104 mySourceSystemVersion = theSourceSystemVersion; 105 } 106 107 public String getSourceSystemVersion() { 108 return mySourceSystemVersion; 109 } 110 111 public void setTargetSystemVersion(String theTargetSystemVersion) { 112 myTargetSystemVersion = theTargetSystemVersion; 113 } 114 115 public String getTargetSystemVersion() { 116 return myTargetSystemVersion; 117 } 118 } 119 120 class AddMappingRequest extends RemoveMappingRequest { 121 private String mySourceDisplay; 122 private String myTargetDisplay; 123 private String myEquivalence; 124 125 public String getTargetDisplay() { 126 return myTargetDisplay; 127 } 128 129 public void setTargetDisplay(String theTargetDisplay) { 130 myTargetDisplay = theTargetDisplay; 131 } 132 133 public String getSourceDisplay() { 134 return mySourceDisplay; 135 } 136 137 public void setSourceDisplay(String theSourceDisplay) { 138 mySourceDisplay = theSourceDisplay; 139 } 140 141 public String getEquivalence() { 142 return myEquivalence; 143 } 144 145 public void setEquivalence(String theEquivalence) { 146 myEquivalence = theEquivalence; 147 } 148 } 149}