Skip to content

Commit

Permalink
Update data-model.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyjaiswal0308 authored Apr 26, 2024
1 parent f57845d commit d1504b8
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions input/pagecontent/data-model.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,9 @@
### Summary

The RA record is made up of Consent, Condition, Flag and Provenances resources. The Consent, Condition and Flag resources are linked via a Patient resource. Provenance of all resources that make up an RA record must be stored. This is modelled here as a contained resource, and as such has no lifetime outside of the constituent RA record resources.
The Patient Flag is made up of Patient Flag and Provenances resources. The Flag resources are linked via a Patient resource. This is modelled here as a contained resource, and as such has no lifetime outside of the constituent Patient Flag resources.

### Data Model

<div class="mermaid">
erDiagram
Patient {
NHS-number identifier
}
Consent {
patient Patient
category CodeableConcept
contained Provenance
}
Condition {
patient Patient
code CodeableConcept
category CodeableConcept
contained Provenance
}
PatientFlag {
patient Patient
code CodeableConcept
category CodeableConcept
contained Provenance
}
ProgrammeFlag {
patient Patient
code CodeableConcept
category CodeableConcept
contained Provenance
}
Provenance {
recorded DateTime
agent Agent
}

Patient ||..|| Consent : provides
Patient ||--o{ Condition : has
Patient ||--o| PatientFlag : has
Patient ||--o{ ProgrammeFlag : has

Consent ||--|| Provenance : contains
Condition ||--|| Provenance : contains
PatientFlag ||--|| Provenance : contains
ProgrammeFlag ||--|| Provenance : contains
<div>
<img style="max-width: 70%" alt="Patient Flag Data Model Diagram." src="data-model-PatientFlag.drawio.png"/>
</div>

0 comments on commit d1504b8

Please sign in to comment.