Skip to content

Commit

Permalink
FM2-631: HumanName.text should use the NameTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Jan 12, 2024
1 parent b4dcbe2 commit cd74bb9
Show file tree
Hide file tree
Showing 2 changed files with 282 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import org.hl7.fhir.r4.model.HumanName;
import org.hl7.fhir.r4.model.StringType;
import org.openmrs.PersonName;
import org.openmrs.layout.name.NameSupport;
import org.openmrs.layout.name.NameTemplate;
import org.openmrs.module.fhir2.FhirConstants;
import org.openmrs.module.fhir2.api.translators.PersonNameTranslator;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -50,6 +52,8 @@ public HumanName toFhirResource(@Nonnull PersonName name) {
addNameExtension(humanName, "familyName2", name.getFamilyName2());
addNameExtension(humanName, "familyNameSuffix", name.getFamilyNameSuffix());
addNameExtension(humanName, "degree", name.getDegree());

humanName.setText(name.getFullName());

return humanName;
}
Expand Down
Loading

0 comments on commit cd74bb9

Please sign in to comment.