FHIR Chat · UML View · implementers

Stream: implementers

Topic: UML View


view this post on Zulip Ramandeep Dhanoa (Jul 10 2019 at 21:50):

Which library FHIR is using to create UML view?

Capture.PNG

view this post on Zulip Grahame Grieve (Jul 10 2019 at 22:56):

I wrote it myself. Initially we tried to use some other java library who's name escapes me (@Jose Costa Teixeira ?) but it had license problems, dependency problems, and I thought I could do a better job (which has been the case, - the specific solution was better than re-using the general solution here)

view this post on Zulip Jose Costa Teixeira (Jul 10 2019 at 22:58):

PlantUML - which btw is now apparently available in Maven under an Apache license
https://mvnrepository.com/artifact/com.credibledoc/plantuml-core

view this post on Zulip Ramandeep Dhanoa (Jul 11 2019 at 17:59):

Thanks @Grahame Grieve and @Jose Costa Teixeira . I did look at PlantUML library and I am thinking to integrate this into our IG Template to get UML View (I am using one of the IG template @Eric Haas has built, but the template doesn't support UML view). What are your thoughts on this? Also, my goal out of the UML view is to see how resources are connected to each other (for example, in immunization UML view - intent is to see how immunization is linked to other resources).

view this post on Zulip Jose Costa Teixeira (Jul 11 2019 at 18:54):

Hi @Ramandeep Dhanoa
Yes, we will add some rendering to the IGs. We have had the idea to use PlantUML (now that it is in Maven, if Grahame agrees that PlantUML is ok) in the official build and in the IG build.

view this post on Zulip Jose Costa Teixeira (Jul 11 2019 at 18:56):

about PlantUML (Object diagram?) to display resources and connections - can you make an example of how it would look like? In a realistic scenario, would it still be "readable" with many resources? But I would encourage to experiment (that is what I did)

view this post on Zulip Jose Costa Teixeira (Jul 11 2019 at 18:57):

formerly we experimented with vis.js to display the resource connections in a dynamic manner, but this would be cumbersome and not good for "printable" documentation

view this post on Zulip Jose Costa Teixeira (Jul 11 2019 at 18:57):

I am using PlantUML to display exampleScenarios as sequence diagrams. it requires pre-processing (i changed Lloyd's Ant file to achieve that), but it works:
http://blog.zeora.net/mma/examplescenario-mma1-scenario.html

view this post on Zulip Jose Costa Teixeira (Jul 11 2019 at 18:59):

I am using @Lloyd McKenzie 's template but this is temporary, we are waiting for Lloyd and Eric to come up with a standard, clean IG template.

view this post on Zulip John Silva (Jul 11 2019 at 19:10):

@Jose Costa Teixeira -- that sequence diagram is REALLY nice! is that all generated from your IG; wow!

view this post on Zulip Jose Costa Teixeira (Jul 11 2019 at 19:12):

yep. generated from one exampleScenario resource. When we have the new template, I will work to add this as a template

view this post on Zulip Ramandeep Dhanoa (Jul 12 2019 at 17:06):

Thanks @Jose Costa Teixeira As I don't have source code for the template, I am post-processing the JSON file to read and generate the UML (shown in the picture). I am using plantUML library and realized that the JS function is generating the diagram by making call to the website.
$(this).attr("src", "http://www.plantuml.com/plantuml/img/"+encode64(e.data));
Is it possible to avoid this call (if the web-site is down for some reason, UML diagram won't be portrayed)? Capture.PNG

view this post on Zulip Jose Costa Teixeira (Jul 12 2019 at 17:11):

You can run plantuml locally, no need to call remote service

view this post on Zulip Jose Costa Teixeira (Jul 12 2019 at 17:13):

What i used was 1. an xslt to get the resource and generate the plantuml syntax, 2. Run plantuml 3. Take the output of plantuml and compose the page with it

view this post on Zulip Ramandeep Dhanoa (Jul 12 2019 at 17:16):

do you know of any documentation of how to run it locally?

view this post on Zulip Jose Costa Teixeira (Jul 12 2019 at 17:42):

I don't understand the question. Plantuml is a jar (check downloads page on plantuml.com). Just run it with Java -jar and your input file

view this post on Zulip Ramandeep Dhanoa (Jul 29 2019 at 19:40):

@Jose Costa Teixeira Capture.PNG I have tried integrating plantUML into the template, and It looks something like this:
It still have few glitches, as in it is not distinguishing between parent and child relationship yet (for example 'Actor' is a child of 'Performer' element). Once UML is refined, I will update the code to make the calls locally. This is what I could achieved so far...

view this post on Zulip Jose Costa Teixeira (Jul 29 2019 at 19:50):

Ok, here are a few thoughts:
0. Is this for IGs? If so, we should discuss with @Grahame Grieve to see if the use of plantUML vs the use of the existing rendering for that case.
1 using hyperlinks in the object names to link to those definitions?
2 why not using object diagrams instead of class diagrams?
3 you can easily name the relations besides cardinality
4. How are you rendering this ? I have an XSLT to generate the plantUML source
5. not sure how you would want to get rid if that parent/child issue, unless you would want to render all attributes. Or you can put the parent in the name as in 3 above. (e.g. call the arrow "performer.actor"

view this post on Zulip Jose Costa Teixeira (Jul 29 2019 at 19:52):

in any case, it would be good to see how this survives a more complex case and see how to "cluster" the relation when a reference can be to different types of resources

view this post on Zulip Grahame Grieve (Jul 29 2019 at 19:54):

profiles are neither class or object diagrams. they are constraints, and OMG never saw fit to define a diagram for that (for good reason)

view this post on Zulip Jose Costa Teixeira (Aug 27 2019 at 16:29):

I would like to help build this up. I think a graphical representation like we have for resources could be useful for a few things

view this post on Zulip Lloyd McKenzie (Aug 27 2019 at 16:39):

How would you represent slices in UML?

view this post on Zulip Grahame Grieve (Aug 27 2019 at 22:04):

there is no standard UML profile, but @Dave Carlson might be able to suggest some ideas

view this post on Zulip Grahame Grieve (Aug 28 2019 at 05:30):

wrong David (oops - sorry) - @Dave Carlson

view this post on Zulip Jose Costa Teixeira (Aug 28 2019 at 07:13):

How would you represent slices in UML?

I meant the uml diagram, so not at the level of slicing, but at the level of 'this resource type refers to that resource type'

view this post on Zulip Grahame Grieve (Aug 28 2019 at 08:53):

I used to maintain one like by hand early on... but it rapidly turned into a spaghetti nightmare

view this post on Zulip Jose Costa Teixeira (Aug 28 2019 at 10:08):

I can imagine. I think this could be relevant for profiles where editors can have more control of which part of the spaghetti they really need.
Something between what Ramandeep shows and ClinFHIR's rendering...?


Last updated: Apr 12 2022 at 19:14 UTC