Skip to content

Commit

Permalink
fix(fhir): load only the mandatory resource fields when translating...
Browse files Browse the repository at this point in the history
...concepts betwen codesystems using concept maps
  • Loading branch information
cmark committed Jun 19, 2023
1 parent 0728b78 commit a3abfd4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 B2i Healthcare Pte Ltd, http://b2i.sg
* Copyright 2021-2023 B2i Healthcare Pte Ltd, http://b2i.sg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,6 +15,8 @@
*/
package com.b2international.snowowl.fhir.core.request.conceptmap;

import org.elasticsearch.core.List;

import com.b2international.snowowl.core.RepositoryManager;
import com.b2international.snowowl.core.ServiceProvider;
import com.b2international.snowowl.core.events.Request;
Expand All @@ -38,7 +40,9 @@ public FhirConceptMapTranslateRequest(TranslateRequest request) {

@Override
public TranslateResult execute(ServiceProvider context) {
ConceptMap conceptMap = FhirRequests.conceptMaps().prepareGet(request.getUrlValue()).buildAsync().execute(context);
ConceptMap conceptMap = FhirRequests.conceptMaps().prepareGet(request.getUrlValue())
.setElements(List.copyOf(ConceptMap.Fields.MANDATORY))
.buildAsync().execute(context);
return context.service(RepositoryManager.class)
.get(conceptMap.getToolingId())
.optionalService(FhirConceptMapTranslator.class)
Expand Down

0 comments on commit a3abfd4

Please sign in to comment.