Advertisement
Guest User

Untitled

a guest
May 25th, 2018
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 KB | None | 0 0
  1. Routes
  2.  
  3. Rols
  4. '1', 'Doctor'
  5. '2', 'Patient'
  6. Signin
  7. /signin POST
  8.  
  9.  
  10. {
  11. "email": "",
  12. "password": ""
  13. }
  14.  
  15. Medical Records
  16. /medical_records/:id GET (id: medical_record_id)
  17.  
  18.  
  19. {
  20. "id": 1,
  21. "user_id": 1,
  22. "birthday": "1995-09-30",
  23. "height": "1.70",
  24. "weight": "72.00",
  25. "notes": "some notes for Daniela"
  26. }
  27. /medical_records POST
  28.  
  29.  
  30. {
  31. "birthday": "1995-09-30",
  32. "height": "1.70",
  33. "weight": "72.0",
  34. "notes": "some notes for Daniela",
  35. "user_id": 1
  36. }
  37.  
  38. Patients
  39. /patients GET
  40.  
  41.  
  42. [{
  43. "id": 1,
  44. "first_name": "Daniela",
  45. "last_name": "Fuller",
  46. "email": "danibu@gmail.com",
  47. "rol_id": 2,
  48. "medical_record": {
  49. "id": 1,
  50. "user_id": 1,
  51. "birthday": "1995-09-30",
  52. "height": "1.70",
  53. "weight": "72.00",
  54. "notes": "some notes for Daniela"
  55. },
  56. "appointments": [
  57. {
  58. "id": 2,
  59. "patient_id": 1,
  60. "doctor_id": 2,
  61. "height": null,
  62. "weight": null,
  63. "glucotest": null,
  64. "scheduled": "2018-07-03T00:00:00.000Z",
  65. "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
  66. "treatment": {
  67. "id": 3,
  68. "appointment_id": 2,
  69. "notes": "Some notes for appointment_id: 2",
  70. "treatment_details": [
  71. {
  72. "id": 1,
  73. "task": "Take 5 pills weekly in 2 weeks",
  74. "compliance": "0000000000",
  75. "frequency_id": 2,
  76. "treatment_id": 3,
  77. "frequency": {
  78. "id": 2,
  79. "frequency": "Weekly"
  80. }
  81. },
  82. {
  83. "id": 2,
  84. "task": "Take 10 pills weekly in 2 weeks",
  85. "compliance": "00000000000000000000",
  86. "frequency_id": 2,
  87. "treatment_id": 3,
  88. "frequency": {
  89. "id": 2,
  90. "frequency": "Weekly"
  91. }
  92. }
  93. ]
  94. }
  95. },
  96. {
  97. "id": 1,
  98. "patient_id": 1,
  99. "doctor_id": 2,
  100. "height": null,
  101. "weight": null,
  102. "glucotest": null,
  103. "scheduled": "2018-05-30T00:00:00.000Z",
  104. "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
  105. "treatment": {
  106. "id": 1,
  107. "appointment_id": 1,
  108. "notes": "Some notes for appointment_id: 1",
  109. "treatment_details": []
  110. }
  111. }
  112. ]
  113. }]
  114. /patients/:id GET (id: user_id)
  115.  
  116.  
  117. {
  118. "id": 1,
  119. "first_name": "Daniela",
  120. "last_name": "Fuller",
  121. "email": "danibu@gmail.com",
  122. "rol_id": 2,
  123. "medical_record": {
  124. "id": 1,
  125. "user_id": 1,
  126. "birthday": "1995-09-30",
  127. "height": "1.70",
  128. "weight": "72.00",
  129. "notes": "some notes for Daniela"
  130. },
  131. "appointments": [
  132. {
  133. "id": 2,
  134. "patient_id": 1,
  135. "doctor_id": 2,
  136. "height": null,
  137. "weight": null,
  138. "glucotest": null,
  139. "scheduled": "2018-07-03T00:00:00.000Z",
  140. "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
  141. "treatment": {
  142. "id": 3,
  143. "appointment_id": 2,
  144. "notes": "Some notes for appointment_id: 2",
  145. "treatment_details": [
  146. {
  147. "id": 1,
  148. "task": "Take 5 pills weekly in 2 weeks",
  149. "compliance": "0000000000",
  150. "frequency_id": 2,
  151. "treatment_id": 3,
  152. "frequency": {
  153. "id": 2,
  154. "frequency": "Weekly"
  155. }
  156. },
  157. {
  158. "id": 2,
  159. "task": "Take 10 pills weekly in 2 weeks",
  160. "compliance": "00000000000000000000",
  161. "frequency_id": 2,
  162. "treatment_id": 3,
  163. "frequency": {
  164. "id": 2,
  165. "frequency": "Weekly"
  166. }
  167. }
  168. ]
  169. }
  170. },
  171. {
  172. "id": 1,
  173. "patient_id": 1,
  174. "doctor_id": 2,
  175. "height": null,
  176. "weight": null,
  177. "glucotest": null,
  178. "scheduled": "2018-05-30T00:00:00.000Z",
  179. "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
  180. "treatment": {
  181. "id": 1,
  182. "appointment_id": 1,
  183. "notes": "Some notes for appointment_id: 1",
  184. "treatment_details": []
  185. }
  186. }
  187. ]
  188. }
  189.  
  190. Doctors
  191. /doctors GET
  192.  
  193.  
  194. [
  195. {
  196. "first_name": "Javier",
  197. "last_name": "Sotomayor",
  198. "email": "jsotomayor@gmail.com",
  199. "profession": null
  200. }
  201. ]
  202.  
  203. /doctors/:id GET (id: user_id)
  204.  
  205.  
  206. {
  207. "first_name": "Javier",
  208. "last_name": "Sotomayor",
  209. "email": "jsotomayor@gmail.com",
  210. "profession": null
  211. }
  212.  
  213. Appointments
  214. /appointments/:id GET (id: appointment_id)
  215.  
  216.  
  217. {
  218. "id": 1,
  219. "patient_id": 1,
  220. "doctor_id": 2,
  221. "height": null,
  222. "weight": null,
  223. "glucotest": null,
  224. "scheduled": "2018-05-30T00:00:00.000Z",
  225. "notes": "Some notes for appointment with patient_id =1, doctor_id=2"
  226. }
  227.  
  228. /appointments POST
  229.  
  230.  
  231. {
  232. "patient_id": 1,
  233. "doctor_id": 2,
  234. "height": null,
  235. "weight": null,
  236. "glucotest": null,
  237. "scheduled": "2018-07-03",
  238. "notes": "Some notes for appointment with patient_id =1, doctor_id=2"
  239. }
  240.  
  241. Treatments
  242. /treatments POST
  243.  
  244.  
  245. {
  246. "appointment_id": 2,
  247. "notes": "Some notes for appointment_id: 2",
  248. "treatment_details": [
  249. {
  250. "task": "Take 5 pills weekly in 2 weeks",
  251. "frequency_id": 2
  252. },
  253. {
  254. "task": "Take 10 pills weekly in 2 weeks",
  255. "frequency_id": 2
  256. }
  257. ]
  258. }
  259.  
  260. /treatments/:id GET (id: treatments_id)
  261.  
  262.  
  263. {
  264. "id": 3,
  265. "appointment_id": 2,
  266. "notes": "Some notes for appointment_id: 2",
  267. "treatment_details": [
  268. {
  269. "id": 1,
  270. "task": "Take 5 pills weekly in 2 weeks",
  271. "compliance": "0000000000",
  272. "frequency_id": 2,
  273. "treatment_id": 3,
  274. "frequency": {
  275. "id": 2,
  276. "frequency": "Weekly"
  277. }
  278. },
  279. {
  280. "id": 2,
  281. "task": "Take 10 pills weekly in 2 weeks",
  282. "compliance": "00000000000000000000",
  283. "frequency_id": 2,
  284. "treatment_id": 3,
  285. "frequency": {
  286. "id": 2,
  287. "frequency": "Weekly"
  288. }
  289. }
  290. ]
  291. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement