NHSDigital / DataDictionaryPublication

Apache License 2.0
7 stars 1 forks source link

Labels on Class Relationships #395

Open AngelaFaulding opened 2 years ago

AngelaFaulding commented 2 years ago

It is not currently possible to add labels to add relationships between classes. James is looking into this. image

jamesrwelch commented 2 years ago

It is possible, it's just that the system will refuse if you've already created one with the same name. We've a plan to simplify the interface

jamesrwelch commented 2 years ago

I've solved this confusion with a new, simplified interface for creating data elements and associations within Data Classes Screenshot 2022-07-06 at 23 38 07 Screenshot 2022-07-06 at 23 38 25 .

AngelaFaulding commented 2 years ago

@jamesrwelch - I successfully added a link to an existing Class on my new Class. As discussed this morning, I have now added the link to the new Class on the existing Data Class but got this:

image

jamesrwelch commented 2 years ago

Moving this back into 'for discussion'. Although the original cause of confusion is now fixed, it is still not possible in Mauro to add two relationships with the same name. (This will be true of most other modelling tools too, because of navigability). For example, the class 'ACTIVITY' has many relationships called 'located at'. A work-around is required. In the Metadata Catalogue implementation, duplicate relationships have an index suffix - e.g. 'located at (1)'. The index is not output as part of the website. An alternative that would be easier for editing might be to use the name of the subject class - e.g. 'located at (Address)'. Before implementing, we'd need to check that this removed all ambiguity.

AngelaFaulding commented 6 months ago

@jamesrwelch - I have tried this again with different labels and still get: image

The two labels are different:

Is this something that will be fixed part of the System C work?

AngelaFaulding commented 4 months ago

16/07/2024 - James suggests adding a number in brackets and the number shouldn't appear on the website.

AngelaFaulding commented 4 months ago

The workaround will be added to the instructions. Relationship mainly have unique names but there are a few that don't, e.g. https://www.datadictionary.nhs.uk/classes/category_valued_person_observation.html

AngelaFaulding commented 4 months ago

Moving this back to "For Discussion" I have got to (10) and still get the same error. How do I know what to put in the brackets? We do add new Classes to link to CATEGORY VALUED PERSON OBSERVATION so we need to understand what we need to put in the brackets.

image

AngelaFaulding commented 4 months ago

Peter explained that we have to find the next unused number to add to the relationship. In this example, it is 25.

AngelaFaulding commented 4 months ago

I have tried 25 and 26 and still get an error message. What do I try next please?

image

image

pjmonks commented 4 months ago

Please provide the steps you did to get to this error. From the screenshots alone, I cannot follow what is happening or which dictionary item you are creating/modifying.

AngelaFaulding commented 4 months ago

@pjmonks - attached are the instructions I was using. The issue is when trying to add the relationship to CATEGORY VALUED PERSON OBSERVATION Create+Class+Relationships.docx

pjmonks commented 4 months ago

I've tested this and found the reason why the relationship wasn't being created. The error message isn't clear, it means that a Mauro data type could not be created because one for the reference to PERSON STATE EYE COLOUR already existed.

These are the steps I did:

  1. Navigate to CATEGORY VALUED PERSON OBSERVATION
  2. Click on the "Contents" tab
  3. Click on the "Add Data Element" button
  4. Select "Create a new Data Element" and click "Next Step"
  5. Enter "categorised by (24)" as the label - since this was not used before
  6. Under "Data Type", instead of creating a new type, start searching for an existing type. I typed "PERSON STATE EYE COLOUR" and found some matches to select from:

image

I was then able to click "Submit Data Element" and create the class relationship.

AngelaFaulding commented 4 months ago

Thanks @pjmonks . I'll put this on the list to discuss on Monday as you had previously told us that we used "Search" (for a relationship TO AN EXISTING Class) or "Create a new Data Type" (for a relationship TO A NEW CLASS).

This is to a new Class. We need to ensure we have the correct information.

AngelaFaulding commented 3 months ago

Peter has now confirmed that "Create a new Data Type" is used for all relationships. This can be tested when #507 is confirmed.