Closed Uti404 closed 8 months ago
erDiagram Patient ||--o{ Immunisations : erhaelt Immunisations ||--|{ Encounters : contains Patient ||--o{ Observations : erhaelt Observations ||--|{ Encounters : contains Patient ||--o{ Careplans : erhaelt Careplans ||--|{ Encounters : contains Patient ||--o{ Conditions : erhaelt Conditions ||--|{ Encounters : contains Patient ||--o{ Devices : erhaelt Devices ||--|{ Encounters : contains Patient ||--o{ Procedures : erhaelt Procedures ||--|{ Encounters : contains Patient ||--o{ Medications : erhaelt
---
title: Covid-19
---
erDiagram
Patient ||--o{ Immunisations : erhaelt
Immunisations ||--|{ Encounters : contains
Patient ||--o{ Observations : erhaelt
Observations ||--|{ Encounters : contains
Patient ||--o{ Careplans : erhaelt
Careplans ||--|{ Encounters : contains
Patient ||--o{ Conditions : erhaelt
Conditions ||--|{ Encounters : contains
Patient ||--o{ Devices : erhaelt
Devices ||--|{ Encounters : contains
Patient ||--o{ Procedures : erhaelt
Procedures ||--|{ Encounters : contains
Patient ||--o{ Medications : erhaelt
Patient {
string ID PK
date Birthdate
date Deathdate
string SSN
string Drivers
string Passport
string Prefix
string First
string Last
string Suffix
string Maiden
string Marital
string Race
string Ethnicity
string Gender
string Birthplace
string Address
string City
string State
string County
string ZIP
int LAT
int LON
int healthcare_expense
int healthcare_coverage
}
Conditions {
string Patient PK
date Start
date Stop
string Encounter
string Code
string Desription
}
Medications {
string Patient PK
date Start
date Stop
string Payer
string Encounter
string Code
string Description
int Base_cost
int payer_coverage
int Dispenses
int Total_cost
string Reasoncode
string Reasondescription
}
Careplans {
string Patient
date Start
date Stop
string Patient
string Encounter
string Code
string Description
string Reasoncode
string Reasondescription
}
Immunisations {
date Date
string Patient
string Encounter
string Code
string Decritpion
int Base_cost
}
Observations {
date Date
string Patient
string Encounter
string Code
string Description
string Value
string Units
string Type
}
Devices {
date Start
date Stop
string Patient
string Enounter
string Code
string Description
string UID
}
Procedures {
date Date
string Patient
string Encounter
string Code
string Description
int Base_cost
string Reasoncode
string Reasondescription
}
Encounters {
string ID
date Start
date Stop
string Patient
string Organisations
string Provider
string Payer
string Encounterclass
string Code
string Description
int Base_encounter_cost
int Total_claim_cost
int payer_coverage
string Reasoncode
string Reasondescription
}
Ich hab das ER jetzt mal auch im Wiki gespeichert. Es fehlen noch Markierungen mit primary key, sowie foreign key. Es wäre möglich diese so zu markieren, wie bei der Tabelle Patient in einer extra Spalte jeweils mit PK oder FK.
@Fuenfgeld Wir haben folgende Fragen:
Zum aktuellen Stand unterstützt Mermaid keine direkte Methode, um Primärschlüssel (oder irgendeinen Text) innerhalb eines Diagramms zu unterstreichen oder auf ähnliche Weise speziell zu kennzeichnen. In der Praxis werden Primärschlüssel oft durch Konventionen in der Benennung (wie ein vorangestelltes PK_ oder ähnliches) oder durch Kommentare neben den Schlüsselattributen hervorgehoben.
Versuch mit Mermaid.js ein übersichtliches ER-Modell zu gestalten.