Advertisement
Guest User

model

a guest
Oct 18th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace org.acme.model
  2. //Utilisateur
  3. abstract participant User identified by idUser {
  4.   o String idUser
  5.   o String firstName
  6.   o String lastName
  7.   o String birthDate
  8.   o Address address
  9.   o String phone
  10.   o String mail optional
  11. }
  12. //Docteur
  13. participant Doctor extends User{
  14.   o Boolean isAllowedToPrescribe
  15.   o Boolean isAllowedToVaccine
  16. }
  17. //Pharmacien
  18. participant Pharmacist extends User{
  19.   o Boolean canDeliverVaccine
  20.   --> Storage storage
  21. }
  22. //Compagnie de stockage des vaccins
  23. participant StorageCompany extends User{
  24.   o String siretNumber
  25.   --> Storage[] storages
  26. }
  27. //Patient
  28. participant Patient identified by id{
  29.   o String id
  30.   o String firstName
  31.   o String lastName
  32.   o String bloodGroup
  33.   o String birthDate
  34.   o Address address
  35.   o String phone
  36.   o VaccineType[] alreadyDone
  37. }
  38. //Storage = stock (CSV)
  39.  asset Storage identified by idStorage{
  40.  o String idStorage
  41.  o String name
  42.  o Address adress
  43.  o String description
  44.  --> Vaccine[] vaccines
  45. }
  46. //Vaccin
  47. asset Vaccine identified by idVaccine{
  48.  o String idVaccine
  49.  o VaccinState vaccinState
  50.  o VaccineType vaccineType
  51.  o Double price optional
  52.  o Address location optional
  53. }
  54. //Prescription = ordonnance médicale
  55. asset Prescription identified by idPrescription{
  56.   o String idPrescription
  57.   o Boolean isValid default = true
  58.   o VaccineType VaccineType
  59.   --> Doctor doctor
  60.   --> Patient patient
  61. }
  62. //OrderVacc = bon de commande pour un vaccin
  63. asset OrderVacc identified by idOrderVacc{
  64.   o String idOrderVacc
  65.   --> Pharmacist pharmacist
  66.   --> StorageCompany storageCompany
  67.   --> Vaccine vaccine
  68. }
  69. //Adresse
  70. concept Address {
  71.   o Integer zipCode optional
  72.   o String street optional
  73.   o String city default ="Montpellier"
  74.   o String country default = "FR"
  75. }
  76. //Type vaccin
  77. // asset VaccineType identified by idVaccineType{
  78. //   o String idVaccineType
  79. //   o String name
  80. //   o String description
  81. // }
  82. asset VaccineType identified by name{
  83.   o String name
  84.   o String description
  85. }
  86. //Etat du vaccin (stocké, en déplacement, commandé)
  87. enum VaccinState {
  88. o STORED
  89. o DELIVERED
  90. o RESERVED
  91. }
  92. //Requirement = une ordonnance
  93. transaction Prescribe{
  94.   o String idPrescription
  95.   o VaccineType vaccineType
  96.   --> Doctor doctor
  97.   --> Patient patient
  98. }
  99. //Savoir si le stock du pharmacien contient un vaccin de ce type
  100. transaction DeliverVaccine{
  101.   --> Patient patient
  102.   --> Prescription prescription
  103.   --> Pharmacist pharmacist
  104. }
  105. //Order = une commande
  106. transaction OrderVaccine{
  107.   o VaccineType vaccineType
  108.   o String idOrderVacc
  109.   --> Pharmacist orderer
  110.   --> StorageCompany storageCompany
  111. }
  112. //Transport
  113. transaction Transportation{
  114.   --> Vaccine vaccine
  115.   --> Pharmacist pharmacist
  116.   o DateTime arrival
  117. }
  118. //Vaccination
  119. transaction Vaccination{
  120.  --> Patient patient
  121.  --> Doctor doctor
  122.  --> Vaccine vaccine
  123.  o String suivi // doit devenir un asset suivivaccin si on a le temps :d
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement