diff --git a/pixm-connector-service/src/main/java/net/ihe/gazelle/adapter/connector/GazelleRegistryToFhirConverter.java b/pixm-connector-service/src/main/java/net/ihe/gazelle/adapter/connector/GazelleRegistryToFhirConverter.java index 9d7b1a29871788406f3a230678ad32ede2181437..8fc58b4e37311d35cf8a90a88ada6b4701c3d610 100644 --- a/pixm-connector-service/src/main/java/net/ihe/gazelle/adapter/connector/GazelleRegistryToFhirConverter.java +++ b/pixm-connector-service/src/main/java/net/ihe/gazelle/adapter/connector/GazelleRegistryToFhirConverter.java @@ -53,7 +53,10 @@ public class GazelleRegistryToFhirConverter { fhirName.addGiven(given); } try { - fhirName.setUse(HumanName.NameUse.fromCode(registryName.getUse())); + String use = registryName.getUse() != null ? registryName.getUse():""; + if (!use.isBlank()){ + fhirName.setUse(HumanName.NameUse.fromCode(registryName.getUse().toLowerCase())); + } } catch (FHIRException e) { throw new ConversionException(String.format("Cannot convert PersonName use : %s", registryName.getUse()), e); }