FHIR Chat · plantUML · IG creation

Stream: IG creation

Topic: plantUML


view this post on Zulip John Moehrke (Jul 08 2020 at 20:04):

I see during an IG build a "onGenerate.plantUml"... does that mean that the IG build can now convert uml code into diagrams?

view this post on Zulip Grahame Grieve (Jul 08 2020 at 20:05):

not in the general case, no. It produces graphical output for example scenarios

view this post on Zulip John Moehrke (Jul 08 2020 at 20:06):

drat. I have UML in many places.

view this post on Zulip John Moehrke (Jul 08 2020 at 20:08):

fortunately UML diagrams don't actually change much, so I save the UML source code and manually export svg. will like that to be included in the build

view this post on Zulip Rik Smithies (Jul 08 2020 at 20:17):

has anyone considered UML diagrams of resource profiles? I realise that some things like slices are hard, but many basic things could be shown well.

view this post on Zulip Rik Smithies (Jul 08 2020 at 20:20):

I have considered converting a profile to excel and running it through a local build to generate a modified UML version of the resource. But there must be a direct way.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 20:40):

I haven't done so because of slicing.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 20:42):

profiles are not class diagrams, in spite of some people wishing to think about them that way. UML offers either class diagrams or instance diagrams. A profile is a specification for a set of instances of a class model, and UML has never specified anything like that. I did speak to the OMG people about this, but they didn't find it a compelling use case

view this post on Zulip Grahame Grieve (Jul 08 2020 at 20:42):

and you'll find that the fhir spec build won't generate what you want either

view this post on Zulip Rik Smithies (Jul 08 2020 at 21:00):

I think if I edited the excel to change the cardinalities, perhaps removing the ones that were 0..0 (and backbone elements I don't need), and added some dummy elements e.g. prefixed with "Extension-" clients would like it, and won't care if its not proper UML or not properly inherited.

view this post on Zulip Rik Smithies (Jul 08 2020 at 21:02):

I don't think it matters, but I don't see why it isn't a class diagram. Isn't any class a specification for a set of instances?

view this post on Zulip Rik Smithies (Jul 08 2020 at 21:15):

I would think that there are two things and both can be represented by UML class diagrams.
What you can't do perhaps is show that one is a constraint of the other (by our profile methodology).
That is a shame and not totally pure, but maybe it doesn't matter if you get a nice clickable diagram.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 21:19):

Isn't any class a specification for a set of instances?

perhaps in your intent, but it says additional things that are not true and that will confuse users greatly if they actually understand UML properly

view this post on Zulip Rik Smithies (Jul 08 2020 at 21:26):

Help me understand what is misleading. If I take a resource (a class) and remove (hide) one element, it is a profile. And I could draw that as a UML class diagram pretty easily. How is it wrong? Could it be fixed? It's no longer a DomainResource technically I suppose, and it needs the name changing.
If I just sketched the tree view of a profile with some more boxes instead of lines and a more compact notation per element, it would be a UML-like diagram and would fit on one page better sometimes.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 21:28):

a UML class diagram is a MOF statement that describes a set of classes with attributes and associations. Instances of the class diagram conform to the class - that is, the instance is of type "class". It has only those properties defined by the MOF definition.

Profiles are not like this. A profile doesn't assign a class to the instance. e.g. xsi:type or whatever. It's a just a set of rules that applies, and it doesn't say anything about things it doesn't mention.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 21:29):

it's the assigning a class thing that bites deeply when you are implementing, and mapping from what you see to what you are doing. You mightn't care about that, but misusing UML's MOF declarations will bite other implementers very deeply

view this post on Zulip Rik Smithies (Jul 08 2020 at 21:31):

ok fair enough, but you can still draw a diagram of a profile? After all the tree view is a sort of diagram. We could still generate a set of linked boxes with a compact element notation, that describes the profile. It's just not UML, I don't mind. We can change the shape of the boxes and lines.

view this post on Zulip Rik Smithies (Jul 08 2020 at 22:02):

There is a relationship between the tree of the resource and the tree of the profile. And all the rules of not saying anything about things it doesn't mention do apply. But people don't say, oh I get it it's OO inheritance (rather than design by constraint or whatever). Because it doesn't look like UML so there is no baggage.
But if the resource and profile are show looking like UML then people assume the wrong methodology and might go off in the wrong direction. I suppose that is the concern.

view this post on Zulip Lloyd McKenzie (Jul 08 2020 at 22:05):

The intention is that the build process will automatically render plantUML files and allow referencing the resulting SVG files as includes, but it's not working yet. Hopefully by next week.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 22:52):

well, I could consider putting generating diagrams based on the code in the main build on my todo list.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 22:53):

my todo list is simple and short ;-)

view this post on Zulip Rik Smithies (Jul 08 2020 at 22:55):

do you mean for profiles?

view this post on Zulip Grahame Grieve (Jul 08 2020 at 23:13):

yes

view this post on Zulip Jose Costa Teixeira (Jul 09 2020 at 06:35):

Grahame Grieve said:

my todo list is simple and short ;-)

Your todo list - THAT would be an interesting challenge to render as a graph :dizzy:

view this post on Zulip David Pyke (Jul 10 2020 at 02:01):

How do you graph an infinite value usefully?

view this post on Zulip Grahame Grieve (Jul 10 2020 at 03:17):

I don't know? google says: https://www.youtube.com/watch?v=Mkaq3B-TCmg


Last updated: Apr 12 2022 at 19:14 UTC