Slide 1

Slide 1 text

Practical Domain-Driven Design Modeling Exercise NDC Oslo 2025 Mufrid Krilic, Domain-Driven Design Coach CoWork, Norway

Slide 2

Slide 2 text

What is the problem we are trying to solve?

Slide 3

Slide 3 text

We all do modeling…. We have no choice! A model is an abstraction of reality where we choose to keep the most relevant elements • The challenge is to be as explicit as possible about modeling • “the most relevant elements”

Slide 4

Slide 4 text

What will we cover in next 2 hours?

Slide 5

Slide 5 text

What can you expect to learn in next 2 hours? Get encouraged to practice modeling (even more) in your context Do not settle at the first model!

Slide 6

Slide 6 text

Storytelling with Models «All Models are Wrong but Some are Useful» - George Box

Slide 7

Slide 7 text

How does a model look like? • Conceptual model used for: • Product architecture • Domain model • System decomposition • User Journeys • Modeling language used for: • IT architecture • Code • User interface

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

13

Slide 13

Slide 13 text

Agenda When What 1020 About Modeling  You are Here Part 1 Modeling by Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Part 4 Modeling by Capabilities 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1230 What happened in real-life story? Wrap-up

Slide 14

Slide 14 text

The real-life story…. The backdrop for the exercise

Slide 15

Slide 15 text

▪ For patients with identical diagnoses sometimes the treatment has the best effect when done in a group of patients ▪ Examples: • Conversation therapy groups in psychiatry • Training sessions post-injury Domain: Healthcare - Group Therapy

Slide 16

Slide 16 text

Your role today: Product team! • Model a product/system that can help your client support group therapy in a better way than with the existing system • Client: • Head of a moderate-size hospital in Norway • 14000 employees • 1 million patient appointments per year

Slide 17

Slide 17 text

What is the current status at our hospital? • Legacy patient record system in production for many years • Group therapy functionality • Many manual routines added to “keep the system afloat”

Slide 18

Slide 18 text

▪ Group Therapy: Setting up a group • Planning ▪ Group Therapy: Conducting group appointments • Check-in process Domain use-cases

Slide 19

Slide 19 text

Group Therapy Planning Somatic Department Rehabilitation after lifestyle affected diagnosis

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Wait a minute! • Didn’t we just model something? • Yes! • Proving that modeling can be done in many ways

Slide 27

Slide 27 text

domainstorytelling.org domainstorytelling.org

Slide 28

Slide 28 text

Different kinds of models • Model of the existing socio- technical process for the group therapy As-Is • We want a new model for improved product/system support To-Be This was “As-Is” domain story This is the goal for today!

Slide 29

Slide 29 text

Modeling by Functions/Tasks Exercise 1

Slide 30

Slide 30 text

Functional Decomposition • Boundaries in the system follow the function that a user needs to do hers/his job • Classic approach • Boundary = Function

Slide 31

Slide 31 text

Model a product/system for Group Therapy thus far • Build a model based on functions/tasks in the domain story • Example of a function/task: Sending a letter to patient • Be clear about boundaries in the product/system • Model boundaries around functions

Slide 32

Slide 32 text

Agenda When What 1020 About Modeling Part 1 Modeling by Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles  You are Here 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Learn from each other – visit other groups Part 4 Modeling by Capabilities 15 minutes Exercise/Skill Builder 1230 What happened in real-life story? Wrap-up

Slide 33

Slide 33 text

▪ Group Therapy: Setting up a group • Planning ▪ Group Therapy: Conducting group appointments • Check-in process Domain use-cases

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

No content

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

Modeling by Roles Exercise 2

Slide 41

Slide 41 text

Role-based decomposition • Boundaries in the system based on which roles perform different functions • Leads to more task-oriented model • Boundary = Role based function

Slide 42

Slide 42 text

Model a product/system for Group Therapy thus far • Build a model based on roles in the domain story • Example of a role: human and system actors • Be clear about boundaries in the product/system • Model boundaries around which roles perform different functions

Slide 43

Slide 43 text

Learn from each other! Visit other groups and exchange modeling approaches

Slide 44

Slide 44 text

Break 20 minutes! Product Development Coaching

Slide 45

Slide 45 text

Agenda When What 1020 About Modeling Part 1 Modeling by Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story?  You are Here Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Learn from each other – visit other groups Part 4 Modeling by Capabilities 15 minutes Exercise/Skill Builder 1230 What happened in real-life story? Wrap-up

Slide 46

Slide 46 text

Review Exercise 1 and 2 What happened in real-life story?

Slide 47

Slide 47 text

Group Therapy Functions

Slide 48

Slide 48 text

Domain Model

Slide 49

Slide 49 text

Model of a “Group” • “Group” is defined as a set of properties needed to perform all the functions

Slide 50

Slide 50 text

Definition of a “Group” model • 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 51

Slide 51 text

No content

Slide 52

Slide 52 text

Who is the user?

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Role-based model “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 55

Slide 55 text

Modeling by Roles and Time Exercise 3

Slide 56

Slide 56 text

Time- and role-based decomposition • Boundaries in the system based on which roles perform different function at different times • Supports context-oriented systems • Boundary = Role-based function in a user context

Slide 57

Slide 57 text

Model a product/system for Group Therapy thus far • Build a model based on roles and time in the domain story • Can you model Time explicitly? • Hint: Can activity ordering in domain story help? • Be clear about boundaries in the product/system • Model boundaries around which roles perform different functions at different times

Slide 58

Slide 58 text

Learn from each other! Visit other groups and exchange modeling approaches

Slide 59

Slide 59 text

Review Exercise 3 What happened in real-life story?

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

Who is the user?

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Time- and role-based model “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 64

Slide 64 text

Agenda When What 1020 About Modeling Part 1 Modeling by Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1120-1140 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Learn from each other – visit other groups Part 4 Modeling by Capabilities  You are Here 15 minutes Exercise/Skill Builder 1230 What happened in real-life story? Wrap-up

Slide 65

Slide 65 text

Agenda When What 1050 About Modeling Part 1 Modeling by Functions/Tasks 15 minutes Exercise/Skill Builder Part 2 Modeling by Roles 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1150-1210 Break What happened in real-life story? Part 3 Modeling by Roles and Time 15 minutes Exercise/Skill Builder Part 4 Modeling by Capabilities  You are Here 15 minutes Exercise/Skill Builder Learn from each other – visit other groups 1300 What happened in real-life story? Wrap-up

Slide 66

Slide 66 text

Group Therapy Planning Psychiatric Department Adult Psychiatry

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

Modeling by Capabilities Exercise 4

Slide 73

Slide 73 text

Group Planning Somatic Department

Slide 74

Slide 74 text

Group Planning Psychiatric Department

Slide 75

Slide 75 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 76

Slide 76 text

Decompositions by business capabilities • Boundaries in the system follow the capabilities that the business offers its’ customers • Boundary = Business Capability • Boundary ≠ Function • Model around the way the business is organized!

Slide 77

Slide 77 text

Model a product/system for Group Therapy thus far • Build a model based on capabilities in the hospital • Hint: Look out for the differences in the working process • Hint: Look out how the hospital is organized • Be clear about boundaries in the product/system • Model boundaries around the purpose for the hospital

Slide 78

Slide 78 text

Review Exercise 4 What happened in real-life story?

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

Model by 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 82

Slide 82 text

Wrap-up Where to go from here?

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

Core Domain • The thing that distinguishes you from the competitors • “Not every part of the system will be well-designed” • Generic subdomain • Supporting subdomain

Slide 85

Slide 85 text

Product Architecture Which users are we tailoring our products for? The cost of customizing the product for diverse user groups The cost of developing separate products for separate user groups

Slide 86

Slide 86 text

Software Architecture Aligning system boundaries with business intent Re-usable generic domain model that can be adapted to serve needs of multiple user groups Specific domain model highly aligned with needs of specific user groups

Slide 87

Slide 87 text

Do not settle at the first model!

Slide 88

Slide 88 text

Practice! Start on Monday! Somewhere in safe environments then improve!

Slide 89

Slide 89 text

Thank You! Get in touch for further study and more hints! • [email protected] Helping Build Domain-Driven Product Organizations

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

Images • Vecteezy.com • Tim Hüfner • https://unsplash.com/@joshua_hoehne • https://unsplash.com/@kattyukawa • https://unsplash.com/@brett_jordan