Slide 1

Slide 1 text

Questions at menti.com 8937 4165 Crafting Your Digital Confidence

Slide 2

Slide 2 text

Multiple Models with Multiple Perspectives in a Cross-Functional Team Case Study From Healthcare KanDDDinsky 2023 Mufrid Krilic, Domain-Driven Design Coach, CoWork, Norway

Slide 3

Slide 3 text

About myself…. • Developer, architect, agile and technical coach • Healthcare, Telecom, Insurance • “Domain-Driven Design enthusiast” • Feel free to reach out! • www.linkedin.com/in/mufrid/ • [email protected] Crafting Your Digital Confidence

Slide 4

Slide 4 text

CoWork - something to inspire you • Trust-Based Leadership in Practice Tight-Loose-Tight - TLT Crafting Your Digital Confidence

Slide 5

Slide 5 text

Some light reading

Slide 6

Slide 6 text

Why this talk…. «At times, it is bewildering to read all of the material on #DomainDrivenDesign posted here. Close to zero talk about the actual models being fleshed out or related breakthroughs, which, let's face it, are at the heart of it.» - Yves Reynhout on LinkedIn

Slide 7

Slide 7 text

The topics to be covered • Strategies to learn complex domains • Domain problem decomposition • Aligning different perspectives in a cross-functional team • Delivering value in legacy constrained environments • Modeling breakthrough

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Let’s start with the story….

Slide 10

Slide 10 text

Questions at menti.com 8937 4165 ▪ For patients with identical diagnoses sometimes the treatment has the best effect when done in a group of patients ▪ Examples from different subdomains in healthcare: • Conversation therapy groups in psychiatry • Training sessions post-injury Domain: Healthcare - Group Treatment

Slide 11

Slide 11 text

The Team ….and the constraints

Slide 12

Slide 12 text

Questions at menti.com 8937 4165 The business goal constraint • “Replace the legacy system” • It must work “everywhere” and for “everyone” • Is this really a business goal? • However, reality in many organizations

Slide 13

Slide 13 text

Questions at menti.com 8937 4165 Legacy system constraint • ….or the opportunity? • Works “everywhere” and for “everyone” • Why are we replacing it? • “Complex systems run as broken systems.” • Quote from “How Complex Systems Fail” by Richard I. Cook

Slide 14

Slide 14 text

Questions at menti.com 8937 4165 The team and the knowledge constraint • No prior/limited knowledge of the domain • Developers • Tester • Product Owner • Very knowledgeable in the domain • Very good overview of customer’s organization and history • Apprehensive that the customers might be using the legacy system in “unpredictable” ways • 4 developers • 1 QA • 1 Product owner

Slide 15

Slide 15 text

Strategies to Learn Complex Domains Tight-Loose-Tight

Slide 16

Slide 16 text

We deal with complexity by incentivize learning!

Slide 17

Slide 17 text

Questions at menti.com 8937 4165 Two Mindsets • What kind of problems are you working on? • Simple • Complicated • or Complex Problems

Slide 18

Slide 18 text

Simple problems -> no need for TLT! Simple Problems Best Practice Rational Decision Making Standards 5. Our Mission 4. Our Users 3. Our Plans 2. My Role 1. My Expertise Automate! Outer Alignment Inner Alignment

Slide 19

Slide 19 text

If you have previous experience, stick to the plan! Complicated Problems We have previous experience We can trust the plan We can trust our judgement to guide the decisions 5. Our Mission 4. Our Users 3. Our Plans 2. My Role 1. My Expertise Outer Alignment Inner Alignment

Slide 20

Slide 20 text

Hypothesis-driven development for complex problems Complex Problems Never done before Learn from Failure Challenge your assumptions We lack experience 5. Our Mission 4. Our Users 3. Our Plans 2. My Role 1. My Expertise Outer Alignment Inner Alignment

Slide 21

Slide 21 text

Questions at menti.com 8937 4165 Combining leadership approach with strategic design • Tight-Loose-Tight • Discover purpose and needs (T) • Evaluating multiple models (L) • Challenge your assumptions (T)

Slide 22

Slide 22 text

Questions at menti.com 8937 4165 TLT argues for Collaborative Modeling • Collaborative Modeling workshops • Discovering purpose and needs • All the right people in the same room • Different perspectives! • End-users and stakeholders from different departments • To challenge our assumptions

Slide 23

Slide 23 text

Learning New Domain Healthcare – Group Treatment

Slide 24

Slide 24 text

How to learn a new domain? 1.Discover Use Cases 2.Drill into scenarios using collaborative modeling techniques • Ask a bunch of questions 3.Listen! 4.Repeat step 2 on different or same(!) scenarios • Ask (hopefully) the right questions ☺

Slide 25

Slide 25 text

Questions at menti.com 8937 4165 Use-Case Approach • Pre-workshop conversations • Identify the most common use cases • or the ones with most “pain”

Slide 26

Slide 26 text

Questions at menti.com 8937 4165 ▪ Setting up a group • Planning ▪ Conducting group appointments • Check-in process Group Treatment Use Cases

Slide 27

Slide 27 text

Collaborative Modeling in Practice

Slide 28

Slide 28 text

Group Treatment Planning Somatic Department Rehabilitation after lifestyle affected diagnosis

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Group Treatment Check-In Somatic Department Rehabilitation after lifestyle affected diagnosis

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

Group Treatment Planning Psychiatric Department Adult Psychiatry

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

Group Treatment Check-In Psychiatric Department Adult Psychiatry

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Domain Problem Decomposition Validating different models using data ownership

Slide 55

Slide 55 text

Questions at menti.com 8937 4165 Data Ownership • A business term is defined as a set of data properties

Slide 56

Slide 56 text

Questions at menti.com 8937 4165 Functional Decomposition • Boundaries in the system follow the function that a user needs to do hers/his job • Classic approach • Subdomain = Function

Slide 57

Slide 57 text

Group Treatment in Healthcare

Slide 58

Slide 58 text

Domain Model

Slide 59

Slide 59 text

Data Ownership in Domain Model – Functional Decomposition • One single “Group” for different functions • Physician and specialists • Patients • Appointments • Location/Venue • Patient attendance, including no-show • Patients exempted from payment • Invoice – preferred method • Diagnosis-based patient fee • Reference to § in law for compulsory interventions in psychiatry

Slide 60

Slide 60 text

Questions at menti.com 8937 4165 Role-based decomposition • Boundaries in the system based on which roles perform different functions • Leads to more task-oriented model • Subdomain = Role based function

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Data Ownership in Domain Model – role-based decomposition “Group” planning context • Specialists • Patients • Appointments • Location • Reference to § in law for psychiatry “Group” check-in context • Patient attendance incl. no-show • Cancelled appointments • Patients exempted from payment • Invoice – preferred method • Diagnosis-based patient fee

Slide 64

Slide 64 text

Questions at menti.com 8937 4165 Time- and role-based decomposition • Boundaries in the system based on which roles perform different function at different times • Supports context-oriented systems • Subdomain = Role-based function in a user context

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

Data Ownership in Domain Model – time- and role-based decomposition “Group” planning context • Specialists • Patients • Appointments • Location • Reference to § in law for psychiatry “Group” check-in context • Patients exempted from payment • Invoice preferred method • Diagnosis-based patient fee “Group” billing context • Patient attendance, incl. no-show • Cancelled appointments

Slide 68

Slide 68 text

Questions at menti.com 8937 4165 About Functional Decomposition • Customer/end-user needs are hidden behind functions! • No incentives to decompose • Pull towards canonical domain model

Slide 69

Slide 69 text

Decision Time

Slide 70

Slide 70 text

Questions at menti.com 8937 4165 End-users need flexibility • Somatic Rehabilitation • Different courses • Different diagnosis • Psychiatric Therapy • Adult groups • Pediatric groups • Different Locations

Slide 71

Slide 71 text

Questions at menti.com 8937 4165 Flexibility and complexity • Allowing flexibility everywhere calls for highly customizable systems • Works for “everyone” and “everywhere” • High level of customization => high complexity • Configuration permutations

Slide 72

Slide 72 text

Questions at menti.com 8937 4165 Flexibility within a Bounded Context • Different bounded contexts for different end-user needs • The degree of customization in a system is constrained to bounded contexts

Slide 73

Slide 73 text

What did we do?

Slide 74

Slide 74 text

Questions at menti.com 8937 4165 Role-based decomposition • Boundaries in the system based on which roles perform different functions • Leads to more task-oriented model • Subdomain = Role based function

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

Questions at menti.com 8937 4165 Why? • The time perspective separates the models • Group Checkin is about confirming what happened in an appointment • Group Planning is about how appointments are going to happen

Slide 77

Slide 77 text

Decomposition approach with respect to the problem we are facing Complex Problems Never done before Learn from Failure Challenge your assumptions We lack experience 5. Our Mission 4. Our Users 3. Our Plans 2. My Role 1. My Expertise Outer Alignment Inner Alignment

Slide 78

Slide 78 text

Team Maturity by Levels of Alignment Organization Steering Write unit tests Become better developer Deliver new feature Clinically effective group treatment for diverse patient needs Different user needs in group treatment in somatic and psychiatry Outer Alignment Inner Alignment 5. Mission 4. User 3. Project 2. Role and process 1. Expertise Developers, Product Owner, Tester Product Owner, Tester Using appropriate decomposition approach to reach higher Level of Alignment

Slide 79

Slide 79 text

Multiple Models Reflected in Code Structure

Slide 80

Slide 80 text

Questions at menti.com 8937 4165 Boundaries by Abstractions Use appropriate abstraction: • Repository • Namespaces • Whatever might be available in your programming environment

Slide 81

Slide 81 text

Questions at menti.com 8937 4165 Bounded Models • Patient attendance incl. no-show • Cancelled appointments • Patients exempted from payment • Specialists • Patients • Appointments • Location • Reference to § in law for psychiatry

Slide 82

Slide 82 text

Context Maps and discovering value chains Delivering value early

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

Questions at menti.com 8937 4165 Context Mapping • Group Check-in has relation to three other contexts • Patient Visit • Patient Billing • Scheduling

Slide 85

Slide 85 text

Questions at menti.com 8937 4165 Which relation describes our situation best? • “upstream-downstream relationship […]” • "the upstream team may succeed independently of the fate of the downstream team, [...] • Establish a clear customer/supplier relationship between the two teams • Negotiate and budget tasks for downstream requirements • (Source: DDD Reference by Eric Evans)

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

Questions at menti.com 8937 4165 Using dependencies to our advantage • It turned out that dependencies were working in our favor • Other teams could help us achieve the goal with relatively little work on their side

Slide 88

Slide 88 text

Questions at menti.com 8937 4165 Solved by navigating to other contexts using IDs patientID appointmentID UI Composition

Slide 89

Slide 89 text

Questions at menti.com 8937 4165 UI Composition • Works well as context integration pattern in a multi-team distributed environment • Possible in most scenarios • Legacy systems “compliant”

Slide 90

Slide 90 text

Questions at menti.com 8937 4165 Context Maps revealing possibility for early release • Achieving full autonomy could mean we need to do all the work ourselves • Group Planning • Negotiating deliveries with other teams to release early • Group Check-In

Slide 91

Slide 91 text

Modeling Breakthrough Finally, Understanding the Business!

Slide 92

Slide 92 text

Questions at menti.com 8937 4165 The Business and the Legacy System • The more complex the legacy system…. • ….and the longer the system is in production • ….the more likely that the domain language will be affected …. by the language of the legacy system!

Slide 93

Slide 93 text

Questions at menti.com 8937 4165 Distilling the Domain with Pure Domain Stories • Capturing the very essence of the business processes Questions to ask: • How would you do your work without the software system? • What are you trying to achieve? • Why are you doing this?

Slide 94

Slide 94 text

Group Planning Somatic Department

Slide 95

Slide 95 text

Group Planning Psychiatric Department

Slide 96

Slide 96 text

Departments •Accident and Emergency Department •Anaesthesia and Surgical Services •Cancer Treatment and Medical Physics •Children and Youth Clinic •Clinical Nutrition •Communication •Department of Occupational Therapy •Dermatology •Emergency Clinic •Emergency Department Short Stay Unit •Finance •Haukeland hotel •Heart Disease •Human Resources •Internal Medicine •International Collaboration •Laboratory Medicine and Pathology •Maternity Ward •Medical Biochemistry and Pharmacology MBF •Medical Genetics •Neurology •Neurosurgery •Occupational Medicine •Occupational Outpatient Clinic •Ophthalmology •Oral Surgery •Orthopedic Clinic •Physiotherapy •Psychiatry •Radiology department •Recruitment and Temporary Staffing Office •Regional Centre for Asthma, Allergy and Other Hypersensitivity illnesses in Western Norway •Research and Development •Rheumatology •Secretariat for hospital management •Surgical Clinic •The Cancer Center for Education and rehabilitation- CCER •The Norwegian Arthritis Registry - NorArthritis •The Norwegian Porphyria Centre NAPOS •Thoracic Medicine •Treatment abroad •Tuberculosis clinic •Women's Clinic

Slide 97

Slide 97 text

Questions at menti.com 8937 4165 Decompositions by business capabilities • Boundaries in the system follow the capabilities that the business offers its’ customers • Subdomain = Business Capability • Subdomain ≠ Function • Foundation for the product architecture

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

No content

Slide 100

Slide 100 text

Data Ownership – Decomposition by Business Capabilities “Group” – psychiatry capability • Psychologist • Psychiatrist • Diagnosis • Reference to § in law • Patients • Appointments • Location for appointment outside hospital premises “Group” – medical clinical services • Physician • Diagnosis • Patients • Appointments

Slide 101

Slide 101 text

Questions at menti.com 8937 4165 So…. Did we do anything about it? • Nothing ☺ • This insight came at slightly inconvenient time • How committed are you to the model you have chosen? • What is your TLT “mandate”?

Slide 102

Slide 102 text

Questions at menti.com 8937 4165 Product architecture • There are some product related decisions to be made. • Which users are we tailoring our products for? • What is the cost of customizing the product for diverse user groups? • What is the cost of developing separate products for separate user groups?

Slide 103

Slide 103 text

Wrapping up

Slide 104

Slide 104 text

Questions at menti.com 8937 4165 So…. what have we learned? • Collaborative Learning by asking the right questions and listening • Legacy Systems constrains your thinking • Levels of Alignment helps you respect different perspectives • There is always another model • ….but modeling insights might come at most “inconvenient” times • Data Ownership as a tool to validate the model • Context Mapping as a tool to discover value chains

Slide 105

Slide 105 text

No content

Slide 106

Slide 106 text

No content

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

Team Ultimum Follow us on GitHub!

Slide 109

Slide 109 text

No content

Slide 110

Slide 110 text

Questions at menti.com 8937 4165 Photos • https://unsplash.com/@ratushny • https://unsplash.com/@jeshoots • https://unsplash.com/@mango_quan • www.vecteezy.com