User:Ttenbergen/Relationship Diagram: Difference between revisions
Ttenbergen (talk | contribs) |
Ttenbergen (talk | contribs) mNo edit summary |
||
(29 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This was testing for [[Entity Relationship Diagram for the Critical Care and Medicine Database]]. | |||
== Approach: FlexDiagrams == | |||
=== Mermaid === | |||
[[Mermaid:Test w explicit]] - works | |||
{{#display_diagram:Mermaid:Test_w_explicit}} | |||
==== Mermaid with Cargo ==== | |||
{{Collapsable|always=see more|full= | |||
[[Mermaid:Test w Cargo]] - doesn't work | |||
===== Cargo query to generate a line ===== | |||
<!--{{#cargo_query: | |||
tables=Data_Element | |||
|fields=tables | |||
|group by=tables | |||
}}--> | |||
{{#cargo_query: | |||
tables=foreign_keys | |||
|fields= CONCAT(foreign_key_table,"[", foreign_key_table," table] -->{{!}}\"",foreign_key_field," to #8734; ", primary_key_field, "\"{{!}} ", primary_key_table) | |||
|delimiter=<br> | |||
}} | |||
{{#cargo_query: | |||
tables=foreign_keys | |||
|fields=CONCAT("click ", foreign_key_table, " \"https://ccmdb.kuality.ca/index.php?title=", foreign_key_table, "\" \"open table page\"<br>") | |||
|group by=foreign_key_table | |||
|delimiter= | |||
}} | |||
{{#cargo_query: | |||
tables=foreign_keys | |||
|fields=CONCAT("click ", primary_key_table, " \"https://ccmdb.kuality.ca/index.php?title=", primary_key_table, "\" \"open table page\"<br>") | |||
|group by=primary_key_table | |||
|delimiter= | |||
}} | |||
}} | |||
=== Other FlexDiagram formats === | |||
{{Collapsable|always=see examples|full= | |||
<!-- [[Drawio:Test]] - code generated not readily used with cargo content --> | |||
[[BPMN:Test]] | |||
{{#display_diagram:BPMN:Test}} | |||
[[Mermaid:Test]] | |||
{{#display_diagram:Mermaid:Test}} | |||
}} | |||
== Approach: Extension Mermaid == | |||
{{Collapsable| always=Mermaid seems unsupported, trying FlexDiagrams instead |full= | |||
Mermaid Documentation: https://github.com/SemanticMediaWiki/Mermaid/blob/master/docs/USAGE.md | |||
==Problems == | |||
** https://github.com/SemanticMediaWiki/Mermaid/issues/79 | |||
** https://github.com/SemanticMediaWiki/Mermaid/issues/78 | |||
== Explicit call == | == Explicit call == | ||
Line 7: | Line 61: | ||
{{#mermaid: | {{#mermaid: | ||
erDiagram | erDiagram | ||
L_LOG ||--o{ LICD10 : allows | |||
}}yyy | }}yyy | ||
Line 44: | Line 98: | ||
click L_Log "https://ccmdb.kuality.ca/index.php?title=L_Log_table" "Tooltip L_Log" | click L_Log "https://ccmdb.kuality.ca/index.php?title=L_Log_table" "Tooltip L_Log" | ||
click s_Dispo "s_Dispo_table" "Tooltip s_Dispo" | click s_Dispo "s_Dispo_table" "Tooltip s_Dispo" | ||
<!-- --> | <!-- --> | ||
Line 53: | Line 107: | ||
|fields=CONCAT('L_Log -->{{!}}\"1 D_ID to ∞ D_ID\"{{!}} L_ICD10') | |fields=CONCAT('L_Log -->{{!}}\"1 D_ID to ∞ D_ID\"{{!}} L_ICD10') | ||
|where=_pageName="Service/Location field" | |where=_pageName="Service/Location field" | ||
}} | |||
}} | }} |
Latest revision as of 17:47, 2023 April 19
This was testing for Entity Relationship Diagram for the Critical Care and Medicine Database.
Approach: FlexDiagrams
Mermaid
Mermaid:Test w explicit - works
Mermaid with Cargo
see more |
Mermaid:Test w Cargo - doesn't work Cargo query to generate a lines_dispo[s_dispo table] -->|"dispo_ID to #8734; Dispo"| L_Log click s_dispo "https://ccmdb.kuality.ca/index.php?title=s_dispo" "open table page" click L_Log "https://ccmdb.kuality.ca/index.php?title=L_Log" "open table page" |
Other FlexDiagram formats
see examples |
Page Mermaid:Test does not exist.
|
Approach: Extension Mermaid
Mermaid seems unsupported, trying FlexDiagrams instead |
Mermaid Documentation: https://github.com/SemanticMediaWiki/Mermaid/blob/master/docs/USAGE.md ProblemsExplicit callMermaid ER diagramxxx yyy
"L_Log |