User:Ttenbergen/Relationship Diagram: Difference between revisions
Ttenbergen (talk | contribs) mNo edit summary |
Ttenbergen (talk | contribs) mNo edit summary |
||
(40 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]]. | |||
== Mermaid with Cargo | == 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 == | |||
=== Mermaid ER diagram === | |||
xxx | |||
{{#mermaid: | |||
erDiagram | |||
L_LOG ||--o{ LICD10 : allows | |||
}}yyy | |||
"L_Log ||--o{ L_ICD10: D_ID to D_ID | |||
click L_Log "https://ccmdb.kuality.ca/index.php?title=L_Log_table" "Tooltip L_Log" | |||
L_Log||--o{ L_ICD10: D_ID to D_ID | |||
L_Log||--o{ L_CCI_Picklist: D_ID to D_ID | |||
L_Log||--|| Service/Location: s_dispo_ID" to s_Dispo | |||
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" | |||
=== Mermaid graph === | |||
{{#mermaid: | {{#mermaid: | ||
graph LR | |||
L_Log -->|"1 D_ID to #8734; D_ID"| L_ICD10 | |||
L_Log -->|"1 D_ID to #8734; D_ID"| L_CCI | |||
L_Log -->|"#8734; Service/Location to #8734; s_dispo_ID" | s_Dispo | |||
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" | |||
}} | |||
== Why are we not doing this data driven == | |||
Frankly because Tina could not get it to work. | |||
=== Mermaid with Cargo Query Input === | |||
#mermaid: | |||
graph LR | graph LR | ||
{{#cargo_query: | {{#cargo_query: | ||
tables=ToDo | tables=ToDo | ||
|fields=CONCAT('L_Log -->{{!}} | |fields=CONCAT('L_Log -->{{!}}"1 D_ID to ∞ D_ID"{{!}} L_ICD10') | ||
|where=_pageName="Service/Location field" | |where=_pageName="Service/Location field" | ||
}} | }} | ||
Line 13: | 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" | ||
== Cargo query to generate a line== | |||
<!-- --> | |||
=== Cargo query to generate a line === | |||
{{#cargo_query: | {{#cargo_query: | ||
tables=ToDo | tables=ToDo | ||
Line 21: | Line 108: | ||
|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 |