The literature and resources on DDD, or software-related in general, are mostly in English. Even the domain-specific discussions are presented in English.
However, many of you design software for users whose native language is not English. In such cases when going through the knowledge-crunching process with the domain experts there are no English terms mentioned and both the model and the Ubiquitous Language are expressed in the native language. Then you try to implement the model and suddenly there is a dilemma whether or not to continue using non-English domain terms in code or do we try to translate them? How do you bridge the two worlds? Ignoring the issue may lead to discrepancy of Ubiquitous Language applied in code vs. oral communication and documentation.
This talk will present the challenges the teams have encountered while developing patient record systems for Norwegian hospitals, trying to code in English and communicating with users and domain experts in Norwegian. Takeaways are the lessons learned and suggested approaches on improving the model while lowering the language barrier.
XpertSolvers: Your Partner in Building Innovative Software Solutions
Domain model in Multi-language Environment With Examples from Healthcare
1. E N A B L I N G E F F I C I E N T H E A L T H C A R E
Domain Model in Multi-Language
Environment
Mufrid Krilic, Senior Software Developer/Coach DIPS AS, Norway
@mufridk
with examples from healthcare
2. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Main features:
– Native domain language is not English
– Programming language based on English
– Discussions with domain experts in the native language
Multi-Language Environment
@mufridk
3. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Dilemma:
– Translate to English or keep the business rules in native language
Challenges of a Multi-Language Environment
@mufridk
4. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Translation impedes development of the Ubiquitous Language
– Front-end and documentation is preferably in the native language
– «Isn’t translation a technical concern?»
@mufridk
5. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Challenges of keeping business rules in native language
– Non-native speaking developers coming in
– Integration challenges with application logic
– Integration with external systems
• Anti-Corruption Layer definitely becomes a translation layer
@mufridk
6. E N A B L I N G E F F I C I E N T H E A L T H C A R E
@mufridk
7. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Well-established legacy system leaves a legacy of terms that have
become a part of Ubiquitous Language
– E.g. originally introduced by developers then adopted by users
– With proprietary semantics that is difficult to translate
Legacy of the Legacy System
@mufridk
8. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ The business rules coded in Norwegian
– Leaving us with very few leads on well-proven translation suggestions
▪ In retrospect
– Definitely something to consider, however
Legacy of the Legacy System
@mufridk
9. E N A B L I N G E F F I C I E N T H E A L T H C A R E
Team
Bounded
Context
Subdomain
Translation Introduced Context Mapping Challenges
@mufridk
Team needs to integrate with a Bounded Context
Based on a domain term from
the subdomain
Which translation was used?
What team owns the context?
10. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Relational database translation views
– Database table with column names in Norwegian
– Each table has a “translation view” that maps Norwegian column names to
English
– Issue:
• Too tech, too far from the domain experts
Documenting Translations – First Iteration
@mufridk
11. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Translations exclusively based on healthcare standards
– Issues:
• Difficult to enforce
• Everybody is confused as to what term to use as standards are not dictionary
– Unlooked-for side-effect:
• Rigorous formal terms enter the Ubiquitous Language:
– “Health Care Provider” and “Health Care Party”, not Doctor or Physician
Documenting Translations – Second Iteration
@mufridk
12. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Evolving in-house Wiki dictionary based on applied translations
– Each Norwegian term is mapped to its English translation and the Bounded
Context where the domain term is applied
– Issues:
• Domain expert friendly but too far from code.
• Maintenance is left to a couple of enthusiasts
Documenting Translations – Third Iteration
@mufridk
13. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Global model thinking in enterprise environment
– The firm belief that concepts can be represented outside of individual
subjects and in a single coherent manner
• by a single authority
• then shared by everyone to implement universal interoperability
▪ As opposed to DDD and Bounded Contexts
▪ Could we learn something here?
Every approach was attempted at enterprise-wide scale
@mufridk
14. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Dedicated Slack-channel #domainlanguage
– For discussions on semantics of domain terms and possible translations
– Without explicit mentioning of DDD or bounded contexts
Documenting Translations – Fourth Iteration
@mufridk
15. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Discussions offer historical perspective on legacy domain terms by
people involved in creating the terms
▪ Positive side-effects:
– Revealing hard-to-find domain expert!
Enterprise-wide Slack discussions #domainlanguage
@mufridk
16. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Inconsistencies in domain language are highlighted
– Could the obvious inconsistencies challenge global model thinking?
– Thus paving the path for DDD-mindset?
– The effects on this approach are still under observation
Enterprise-wide Slack discussions #domainlanguage
@mufridk
17. E N A B L I N G E F F I C I E N T H E A L T H C A R E
Story of a team working in multi-language environment:
Discovering Ubiquitous Language
@mufridk
18. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Finding the name for a process of referring a patient, currently being
under treatment in a hospital, to another hospital for more
specialized or extensive care.
Story: Discovering “Inter-Hospital Referral”
@mufridk
19. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Domain term in Norwegian: “Viderehenvisning”
▪ Initial suggestion by the team: Referral Forwarding
– Because: “Henvisning” ~ Referral and “Videresende e-post” ~ E-mail
forwarding.
▪ The team opted to challenge in-house domain experts
The Story Continues
@mufridk
20. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Please suggest the translation
– and how does Referral Forwarding sound like?
▪ We got the answer….
– Referral Forwarding is ok
– …. And no other suggestions!
▪ I guess that’s what happens when trying to introduce the terms in
the Ubiquitous Language by ourselves
– You run into confirmation bias
The Story Continues
@mufridk
21. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Starting to pay more attention to the language of domain experts
– Repeatedly discussing that the primary use case is to create a new referral
– Users will not be forwarding a referral to another hospital
– Users will be referring a patient to another hospital
The Story Continues
@mufridk
22. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Challenging the customer
– Please suggest a translation ☺
– We got confirmation that, from a user’s perspective, the process is about
referring a patient to another hospital
– i.e. creating a new referral to be evaluated at another hospital
– “Hence it is just another Referral but if you want an alternative suggestion
you could go with Inter-Hospital Referral”
The Story Continues
@mufridk
23. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Recognizing the need to have efficient translations that are as close
as semantically possible to domain terms in the native language
▪ Documenting the translations is worth a try
▪ Involve the domain expert closely in the translation process
▪ If we could turn back time…..
– Reconsidering use of native language in domain model
Lessons Learned
@mufridk
24. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Global model thinking is tempting
– Vision of a concise definitions that apply everywhere which everybody agrees
on thus solving many communication issues in the organization
• Acknowledging that it is an attractive option for many
▪ DDD bounded contexts approach perhaps not intuitive to everyone
– Difficult to visualize the contexts while discussing them
– Need to address global model thinking with new perspectives
Deeper Lessons Learned
@mufridk
25. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ Advantages of Multi-language environment
– Cultural context is there by default
– Synonyms and subtle semantic differences forces teams to focus on language
Domain Model in Multi-Language Environments
@mufridk
26. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ https://www.webfactory.de/blog/ubiquitous-language-in-a-non-
english-domain
▪ Community discussion:
– https://softwareengineering.stackexchange.com/questions/41160/programm
ing-and-ubiquitous-language-ddd-in-a-non-english-domain
Related Discussions
@mufridk
27. E N A B L I N G E F F I C I E N T H E A L T H C A R E
▪ This presentation will be soon available on the muCon London
website at the following link
– https://skillsmatter.com/conferences/11982-con-london-2019-the-
conference-on-microservices-ddd-and-software-architecture#skillscasts
▪ Announced on Twitter @mufridk
Video
@mufridk