Skip to content

Commit

Permalink
Model drafts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusfearnett-nhsdigital committed May 20, 2024
1 parent 106e166 commit 22e12a0
Showing 1 changed file with 122 additions and 1 deletion.
123 changes: 122 additions & 1 deletion input/pagecontent/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The RA record is made up of Consent, Condition, Flag and Provenances resources.

### Data Model

#### Mermaid

Data model in Mermaid

<div class="mermaid">
erDiagram
Patient {
Expand Down Expand Up @@ -46,4 +50,121 @@ erDiagram
Condition ||--|| Provenance : contains
PatientFlag ||--|| Provenance : contains
ProgrammeFlag ||--|| Provenance : contains
</div>
</div>

#### PlantUML

Data model in PlantUML backtick

```plantuml
@startuml
skinparam linetype ortho
entity "Patient" as pat {
*NHS Number : number <<generated>>
}
Package "Patient Flags API" {
entity "Consent" as con {
*patient : Patient
*category : CodeableConcept
*contained : Provenance (Contained)
}
entity "Condition" as cod {
*patient : Patient
*code : CodeableConcept
*category : CodeableConcept
*contained : Provenance (Contained)
}
entity "Patient Flag" as pfg {
*patient : Patient
*code : CodeableConcept
*category : CodeableConcept
*contained : Provenance (Contained)
}
entity "Adjustment Flag" as adj {
*patient : Patient
*code : CodeableConcept
*category : CodeableConcept
*contained : Provenance (Contained)
}
entity "Provenance" as pro {
*recorded : Date
*agent : Agent (backbone)
}}
pat ||..|| con : provides
pat ||--o{ cod : has
pat ||--o| pfg : "has"
pat ||--o{ adj : has
con ||--|| pro : contains
cod ||--|| pro : contains
pfg ||--|| pro : contains
adj ||--|| pro : contains
@enduml
```

Data model in PlantUML div

<div class="mermaid">
@startuml

skinparam linetype ortho

entity "Patient" as pat {
*NHS Number : number <<generated>>
}

Package "Patient Flags API" {
entity "Consent" as con {
*patient : Patient
*category : CodeableConcept
*contained : Provenance (Contained)
}

entity "Condition" as cod {
*patient : Patient
*code : CodeableConcept
*category : CodeableConcept
*contained : Provenance (Contained)
}

entity "Patient Flag" as pfg {
*patient : Patient
*code : CodeableConcept
*category : CodeableConcept
*contained : Provenance (Contained)
}

entity "Adjustment Flag" as adj {
*patient : Patient
*code : CodeableConcept
*category : CodeableConcept
*contained : Provenance (Contained)
}

entity "Provenance" as pro {
*recorded : Date
*agent : Agent (backbone)
}
}
pat ||..|| con : provides
pat ||--o{ cod : has
pat ||--o| pfg : "has"
pat ||--o{ adj : has
con ||--|| pro : contains
cod ||--|| pro : contains
pfg ||--|| pro : contains
adj ||--|| pro : contains


@enduml

</div>

0 comments on commit 22e12a0

Please sign in to comment.