diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-15 16:33:00 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-03-15 16:33:00 -0600 |
| commit | 9610ebd6111de5fc02d95974b5c6c822cc14c1f2 (patch) | |
| tree | a0230a08c986b970b189bb724ca5f2e1b894cde7 /rvh/erd.dot | |
| parent | 0a46c6a0b45ae53ddd748be9fb8032d329d6f2c2 (diff) | |
Generate Rails ERD
Diffstat (limited to 'rvh/erd.dot')
| -rw-r--r-- | rvh/erd.dot | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/rvh/erd.dot b/rvh/erd.dot new file mode 100644 index 0000000..22fe494 --- /dev/null +++ b/rvh/erd.dot @@ -0,0 +1,161 @@ +digraph Rvh { +rankdir = "LR"; +ranksep = "0.5"; +nodesep = "0.4"; +pad = "0.4,0.4"; +margin = "0,0"; +concentrate = "true"; +labelloc = "t"; +fontsize = "13"; +fontname = "Arial Bold"; +splines = "spline"; +node[ shape = "Mrecord" , fontsize = "10" , fontname = "Arial" , margin = "0.07,0.05" , penwidth = "1.0"]; +edge[ fontname = "Arial" , fontsize = "7" , dir = "both" , arrowsize = "0.9" , penwidth = "1.0" , labelangle = "32" , labeldistance = "1.8"]; +rankdir = "LR"; +label = "RVH ERD\n\n"; +m_Account [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Account</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="address">address <font face="Arial Italic" color="grey60">string ∗</font></td></tr> + <tr><td align="left" width="130" port="birth_date">birth_date <font face="Arial Italic" color="grey60">datetime ∗</font></td></tr> + <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">string ∗</font></td></tr> + <tr><td align="left" width="130" port="pager_number">pager_number <font face="Arial Italic" color="grey60">string</font></td></tr> + <tr><td align="left" width="130" port="phone_number">phone_number <font face="Arial Italic" color="grey60">string</font></td></tr> +</table> +>]; +m_Bed [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Bed</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="bed_number">bed_number <font face="Arial Italic" color="grey60">string</font></td></tr> + <tr><td align="left" width="130" port="room_number">room_number <font face="Arial Italic" color="grey60">string</font></td></tr> +</table> +>]; +m_CareCentre [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">CareCentre</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="location">location <font face="Arial Italic" color="grey60">string</font></td></tr> + <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">string</font></td></tr> + <tr><td align="left" width="130" port="nurse_id">nurse_id <font face="Arial Italic" color="grey60">integer ∗</font></td></tr> +</table> +>]; +m_Consumption [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Consumption</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="consumed_at">consumed_at <font face="Arial Italic" color="grey60">datetime ∗</font></td></tr> + <tr><td align="left" width="130" port="physician_id">physician_id <font face="Arial Italic" color="grey60">integer ∗</font></td></tr> + <tr><td align="left" width="130" port="quantity">quantity <font face="Arial Italic" color="grey60">integer ∗</font></td></tr> + <tr><td align="left" width="130" port="total_cost">total_cost <font face="Arial Italic" color="grey60">decimal ∗</font></td></tr> +</table> +>]; +m_Item [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Item</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="description">description <font face="Arial Italic" color="grey60">text</font></td></tr> + <tr><td align="left" width="130" port="sku">sku <font face="Arial Italic" color="grey60">string ∗</font></td></tr> + <tr><td align="left" width="130" port="unit_cost">unit_cost <font face="Arial Italic" color="grey60">decimal ∗</font></td></tr> +</table> +>]; +m_Laboratory [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Laboratory</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="location">location <font face="Arial Italic" color="grey60">string</font></td></tr> + <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">string</font></td></tr> +</table> +>]; +m_Nurse [color = "grey60", fontcolor = "grey60", label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Nurse</font></td></tr> +</table> +>]; +m_Patient [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Patient</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="contacted_at">contacted_at <font face="Arial Italic" color="grey60">datetime ∗</font></td></tr> + <tr><td align="left" width="130" port="physician_id">physician_id <font face="Arial Italic" color="grey60">integer ∗</font></td></tr> + <tr><td align="left" width="130" port="referring_physician_id">referring_physician_id <font face="Arial Italic" color="grey60">integer ∗</font></td></tr> +</table> +>]; +m_Physician [color = "grey60", fontcolor = "grey60", label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Physician</font></td></tr> +</table> +>]; +m_Shift [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Shift</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="employee_id">employee_id <font face="Arial Italic" color="grey60">integer ∗</font></td></tr> + <tr><td align="left" width="130" port="ended_at">ended_at <font face="Arial Italic" color="grey60">datetime</font></td></tr> + <tr><td align="left" width="130" port="started_at">started_at <font face="Arial Italic" color="grey60">datetime ∗</font></td></tr> +</table> +>]; +m_Staff [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Staff</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="hired_at">hired_at <font face="Arial Italic" color="grey60">datetime</font></td></tr> + <tr><td align="left" width="130" port="qualifications">qualifications <font face="Arial Italic" color="grey60">text</font></td></tr> +</table> +>]; +m_Technician [color = "grey60", fontcolor = "grey60", label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Technician</font></td></tr> +</table> +>]; +m_Treatment [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Treatment</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="name">name <font face="Arial Italic" color="grey60">string ∗</font></td></tr> + <tr><td align="left" width="130" port="number">number <font face="Arial Italic" color="grey60">string ∗</font></td></tr> + <tr><td align="left" width="130" port="occurred_at">occurred_at <font face="Arial Italic" color="grey60">datetime ∗</font></td></tr> + <tr><td align="left" width="130" port="results">results <font face="Arial Italic" color="grey60">text</font></td></tr> +</table> +>]; +m_Visit [label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Visit</font></td></tr> +</table> +| +<table border="0" align="left" cellspacing="2" cellpadding="0" width="134"> + <tr><td align="left" width="130" port="comments">comments <font face="Arial Italic" color="grey60">text</font></td></tr> + <tr><td align="left" width="130" port="scheduled_at">scheduled_at <font face="Arial Italic" color="grey60">datetime ∗</font></td></tr> +</table> +>]; +m_Volunteer [color = "grey60", fontcolor = "grey60", label = <<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="134"> + <tr><td align="center" valign="bottom" width="130"><font face="Arial Bold" point-size="11">Volunteer</font></td></tr> +</table> +>]; + m_Staff -> m_Nurse [color = "grey60", arrowtail = "onormal", arrowhead = "none", arrowsize = "1.2"]; + m_Staff -> m_Physician [color = "grey60", arrowtail = "onormal", arrowhead = "none", arrowsize = "1.2"]; + m_Staff -> m_Technician [color = "grey60", arrowtail = "onormal", arrowhead = "none", arrowsize = "1.2"]; + m_Staff -> m_Volunteer [color = "grey60", arrowtail = "onormal", arrowhead = "none", arrowsize = "1.2"]; + m_Account -> m_Staff [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "5"]; + m_Laboratory -> m_Staff [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "5"]; + m_Staff -> m_Treatment [arrowsize = "0.6", arrowhead = "odotnormal", arrowtail = "odot", weight = "5"]; + m_CareCentre -> m_Shift [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "1"]; + m_Patient -> m_Consumption [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "1"]; + m_Item -> m_Consumption [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "2"]; + m_Physician -> m_Consumption [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "1"]; + m_Physician -> m_Treatment [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "1"]; + m_Patient -> m_Treatment [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "2"]; + m_CareCentre -> m_Bed [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "2"]; + m_Patient -> m_Bed [arrowsize = "0.6", arrowhead = "odot", arrowtail = "odot", weight = "2"]; + m_Patient -> m_Visit [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "1"]; + m_Account -> m_Patient [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "1"]; + m_Physician -> m_Patient [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "2"]; + m_Nurse -> m_CareCentre [arrowsize = "0.6", arrowhead = "dotnormal", arrowtail = "odot", weight = "1"]; +} |
