Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Routes
- Rols
- '1', 'Doctor'
- '2', 'Patient'
- Signin
- /signin POST
- {
- "email": "",
- "password": ""
- }
- Medical Records
- /medical_records/:id GET (id: medical_record_id)
- {
- "id": 1,
- "user_id": 1,
- "birthday": "1995-09-30",
- "height": "1.70",
- "weight": "72.00",
- "notes": "some notes for Daniela"
- }
- /medical_records POST
- {
- "birthday": "1995-09-30",
- "height": "1.70",
- "weight": "72.0",
- "notes": "some notes for Daniela",
- "user_id": 1
- }
- Patients
- /patients GET
- [{
- "id": 1,
- "first_name": "Daniela",
- "last_name": "Fuller",
- "email": "danibu@gmail.com",
- "rol_id": 2,
- "medical_record": {
- "id": 1,
- "user_id": 1,
- "birthday": "1995-09-30",
- "height": "1.70",
- "weight": "72.00",
- "notes": "some notes for Daniela"
- },
- "appointments": [
- {
- "id": 2,
- "patient_id": 1,
- "doctor_id": 2,
- "height": null,
- "weight": null,
- "glucotest": null,
- "scheduled": "2018-07-03T00:00:00.000Z",
- "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
- "treatment": {
- "id": 3,
- "appointment_id": 2,
- "notes": "Some notes for appointment_id: 2",
- "treatment_details": [
- {
- "id": 1,
- "task": "Take 5 pills weekly in 2 weeks",
- "compliance": "0000000000",
- "frequency_id": 2,
- "treatment_id": 3,
- "frequency": {
- "id": 2,
- "frequency": "Weekly"
- }
- },
- {
- "id": 2,
- "task": "Take 10 pills weekly in 2 weeks",
- "compliance": "00000000000000000000",
- "frequency_id": 2,
- "treatment_id": 3,
- "frequency": {
- "id": 2,
- "frequency": "Weekly"
- }
- }
- ]
- }
- },
- {
- "id": 1,
- "patient_id": 1,
- "doctor_id": 2,
- "height": null,
- "weight": null,
- "glucotest": null,
- "scheduled": "2018-05-30T00:00:00.000Z",
- "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
- "treatment": {
- "id": 1,
- "appointment_id": 1,
- "notes": "Some notes for appointment_id: 1",
- "treatment_details": []
- }
- }
- ]
- }]
- /patients/:id GET (id: user_id)
- {
- "id": 1,
- "first_name": "Daniela",
- "last_name": "Fuller",
- "email": "danibu@gmail.com",
- "rol_id": 2,
- "medical_record": {
- "id": 1,
- "user_id": 1,
- "birthday": "1995-09-30",
- "height": "1.70",
- "weight": "72.00",
- "notes": "some notes for Daniela"
- },
- "appointments": [
- {
- "id": 2,
- "patient_id": 1,
- "doctor_id": 2,
- "height": null,
- "weight": null,
- "glucotest": null,
- "scheduled": "2018-07-03T00:00:00.000Z",
- "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
- "treatment": {
- "id": 3,
- "appointment_id": 2,
- "notes": "Some notes for appointment_id: 2",
- "treatment_details": [
- {
- "id": 1,
- "task": "Take 5 pills weekly in 2 weeks",
- "compliance": "0000000000",
- "frequency_id": 2,
- "treatment_id": 3,
- "frequency": {
- "id": 2,
- "frequency": "Weekly"
- }
- },
- {
- "id": 2,
- "task": "Take 10 pills weekly in 2 weeks",
- "compliance": "00000000000000000000",
- "frequency_id": 2,
- "treatment_id": 3,
- "frequency": {
- "id": 2,
- "frequency": "Weekly"
- }
- }
- ]
- }
- },
- {
- "id": 1,
- "patient_id": 1,
- "doctor_id": 2,
- "height": null,
- "weight": null,
- "glucotest": null,
- "scheduled": "2018-05-30T00:00:00.000Z",
- "notes": "Some notes for appointment with patient_id =1, doctor_id=2",
- "treatment": {
- "id": 1,
- "appointment_id": 1,
- "notes": "Some notes for appointment_id: 1",
- "treatment_details": []
- }
- }
- ]
- }
- Doctors
- /doctors GET
- [
- {
- "first_name": "Javier",
- "last_name": "Sotomayor",
- "email": "jsotomayor@gmail.com",
- "profession": null
- }
- ]
- /doctors/:id GET (id: user_id)
- {
- "first_name": "Javier",
- "last_name": "Sotomayor",
- "email": "jsotomayor@gmail.com",
- "profession": null
- }
- Appointments
- /appointments/:id GET (id: appointment_id)
- {
- "id": 1,
- "patient_id": 1,
- "doctor_id": 2,
- "height": null,
- "weight": null,
- "glucotest": null,
- "scheduled": "2018-05-30T00:00:00.000Z",
- "notes": "Some notes for appointment with patient_id =1, doctor_id=2"
- }
- /appointments POST
- {
- "patient_id": 1,
- "doctor_id": 2,
- "height": null,
- "weight": null,
- "glucotest": null,
- "scheduled": "2018-07-03",
- "notes": "Some notes for appointment with patient_id =1, doctor_id=2"
- }
- Treatments
- /treatments POST
- {
- "appointment_id": 2,
- "notes": "Some notes for appointment_id: 2",
- "treatment_details": [
- {
- "task": "Take 5 pills weekly in 2 weeks",
- "frequency_id": 2
- },
- {
- "task": "Take 10 pills weekly in 2 weeks",
- "frequency_id": 2
- }
- ]
- }
- /treatments/:id GET (id: treatments_id)
- {
- "id": 3,
- "appointment_id": 2,
- "notes": "Some notes for appointment_id: 2",
- "treatment_details": [
- {
- "id": 1,
- "task": "Take 5 pills weekly in 2 weeks",
- "compliance": "0000000000",
- "frequency_id": 2,
- "treatment_id": 3,
- "frequency": {
- "id": 2,
- "frequency": "Weekly"
- }
- },
- {
- "id": 2,
- "task": "Take 10 pills weekly in 2 weeks",
- "compliance": "00000000000000000000",
- "frequency_id": 2,
- "treatment_id": 3,
- "frequency": {
- "id": 2,
- "frequency": "Weekly"
- }
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement