if (patient.getLanguages() != null) {
for (LanguageCommunication language : patient.getLanguages()) {
if (language.getPreferenceInd() != null && language.getPreferenceInd().equals("true")) {
// This one is a bit more awkward to turn back into an enum because we only have the code and no OID
HumanLanguage languageCode = (HumanLanguage)HelperUtils.safelyMapCodedValueToVocabEntry(
new CodedValue(language.getLanguage(), "", HumanLanguage._en.getOID()), HumanLanguage._English,
"PreferredSpokenLanguage", parseExceptions, false);
fields.setPatientPreferredSpokenLanguage(languageCode);
}
// Interpreter needed (for English)
if (language.getLanguage().equals(HumanLanguage._en.code)) {