Reference Selectors and Associations in Domain Models

0
I’m designing an electronic health system for a hospice. I’m starting off simply. I have a domain model with the following tables: Patient, Demographics, and Contact. See below for a screenshot.     All of this information needs to be input via Mendix, when you create a new patient. My problem starts after I enter the information in the Patient table (first name, surname, date of birth, etc.) When I want to enter demographic information, I have to use a reference selector to reselect an attribute found in the Patient table in order to tell Mendix that the information I entered under Patient and the information I entered under Demographics are related. For now, the attribute that I’m using is medical record number (see below).   This seems odd. At best, it is going to be annoying to users, having to reselect/reconfirm the medical record number of your patient every time you enter in a new chunk of information. At worst, it will introduce user error – what happens when someone selects the wrong medical record number? I’ve been trying to wrap my head around this, so any plain-spoken advice would be great.
asked
4 answers
2

  Hi Henny, 
     Since your are using the 1-1 association between the Patient and Demographics, better you can have the Before commit event for the Demographics object, by that you can confirm whether the patient is mapped or not, Commit Demographics only when the patient got selected  

answered
2

Hi Henny,

If i correctly understand, you problem is lack automating associating patient with demographic. When you open first step of wizard create not only patient object, but additionaly demographic object, and associate this two entities. After that when you go to second step of wizard you can use as dat asource for data view currently existing association between Patient_Demographic.

answered
0

Thank you for your answers, guys! I figured out how to associate my Patient entity with my Demographics entity. I had to not only create a patient and a demographics object, but I had to double-click on my new demographics object and specify a new member – of type Patient. Then I had to generate a variable. See below for screenshots.

 

 

 

 

answered
0

Whoops – screenshots here. Hope this helps some other noob!

 

answered