https://immunizationtracker-bw.herokuapp.com/
--
https://immunizationtracker-bw.herokuapp.com/api/auth/user-register
Client sends:
{ "userEmail": "ladygaga@gmail.com", "userPassword": "pokerface", "userName": "Lady Gaga" }
Server returns:
{ id: "5" }
https://immunizationtracker-bw.herokuapp.com/api/auth/user-login
Client sends:
{ "userEmail": "ladygaga@gmail.com", "userPassword": "pokerface", }
Server returns: { "message": "Welcome Lady Gaga", "token": "super-long-string-from-hashed-token" }
https://immunizationtracker-bw.herokuapp.com/api/auth/med-register
Client sends:
{ "medicEmail": "selena@gmail.com", "medicPassword": "gomez", "company": "Disney", "position": "RN" }
Server returns:
{ id: "5" }
https://immunizationtracker-bw.herokuapp.com/api/auth/med-login
Client sends:
{ "medicEmail": "selena@gmail.com", "medicPassword": "gomez" }
Server returns: { "message": "Welcome, RN", "medtoken": "the-super-long-hashed-token" }
https://immunizationtracker-bw.herokuapp.com/api/user/:id
**Note: "id" on URL refers to the USER ID, which is also stored in the token. One user may have multiple patients due to having kids profile
Server returns: [ { "id": 1, "firstName": "Karl", "lastName": "Mozart", "age": 10, "gender": "male", "weight": "80lb", "height": "4'11", "patientEmail": "mozart@gmail.com", "patientPhone": "123-345-5678", "isChild": 1, "userId": 1 }, { "id": 2, "firstName": "Wolfgang", "lastName": "Mozart", "age": 45, "gender": "male", "weight": "150lb", "height": "5'5", "patientEmail": "mozart@gmail.com", "patientPhone": "123-345-5678", "isChild": 0, "userId": 1 } ]
https://immunizationtracker-bw.herokuapp.com/api/user/patient/:id
**Note: "id" refers to the "patient Id" that is created when the patient is created, NOT USER ID.
Server returns: { "id": 6, "firstName": "Alois", "lastName": "Polzelli", "age": 10, "gender": "male", "weight": "90lb", "height": "5'2", "patientEmail": "haydn@gmail.com", "patientPhone": "123-345-5678", "isChild": 1, "userId": 5 }
https://immunizationtracker-bw.herokuapp.com/api/user/addpatient
Client sends: {"firstName":"Jennifer", "lastName":"Lopez", "age": 40,"gender": "female", "weight": "140lb","height": "5'7","patientEmail": "jlopez@gmail.com","patientPhone": "123-345-5678","isChild": false,"userId": 2}
**Note: "userId" refers to the "id" of the user that is adding the patient
Server returns: { "message": "New patient created", "patient": { "id": 7 } }
https://immunizationtracker-bw.herokuapp.com/api/user/patient/:id
**Note: "Id" on URL refers to the patient id
Client sends:
{"firstName":"Jennifer", "lastName":"Lopez", "age": 40,"gender": "female", "weight": "150lb","height": "5'7","patientEmail": "jlopez@gmail.com","patientPhone": "123-345-5678","isChild": false,"userId": 2}
Server returns:
{ "message": "Patient information updated" }
https://immunizationtracker-bw.herokuapp.com/api/user/patient/7
**Note: "Id" on URL refers to patient id
Server returns: { "message": "Patient deleted" }
https://immunizationtracker-bw.herokuapp.com/api/perm/add
Client sends:
Server returns:
{ "message": "New permission request posted" }
https://immunizationtracker-bw.herokuapp.com/api/perm/update/:id
**Note: "id" refers to the permission id Client sends:
{"permission": true, "patientId":6, "medproId":1}
Server returns:
{ "message": "Permission status changed" }
https://immunizationtracker-bw.herokuapp.com/api/perm/patient/:id
**Note: "id" on URL refers to patient ID
Server returns:
[ { "permission": false, "patientId": 1, "medproId": 1, "id": 1, "firstName": "Karl", "lastName": "Mozart", "age": 10, "gender": "male", "weight": "80lb", "height": "4'11", "patientEmail": "mozart@gmail.com", "patientPhone": "123-345-5678", "isChild": 1, "userId": 1 }, { "permission": false, "patientId": 1, "medproId": 2, "id": 1, "firstName": "Karl", "lastName": "Mozart", "age": 10, "gender": "male", "weight": "80lb", "height": "4'11", "patientEmail": "mozart@gmail.com", "patientPhone": "123-345-5678", "isChild": 1, "userId": 1 } ]
https://immunizationtracker-bw.herokuapp.com/api/perm/:id
**Note: "Id" on URL refers to medical professional ID
Server returns: [ { "permission": 1, "patientId": 5, "medproId": 1, "id": 1, "firstName": "Alois", "lastName": "Polzelli", "age": 10, "gender": "male", "weight": "90lb", "height": "5'2", "patientEmail": "haydn@gmail.com", "patientPhone": "123-345-5678", "isChild": 1, "userId": 5, "medicEmail": "marie@gmail.com", "medicPassword": "curie", "company": "MedFirst", "position": "OBGYN" } ]
**Note: The server will only show the information of patients who granted permission to medical professional.
#Immunization Records
https://immunizationtracker-bw.herokuapp.com/api/record/addImmunization
Client sends:
{"vaccineName": "TDap", "vaccineDate": "2000-10-12", "vaccineLocation": "Houston", "patientId":1}
Server returns:
{ "message": "New immunization record added", "record": [ 3 ] }
https://immunizationtracker-bw.herokuapp.com/api/record/vaccine/:id
**Note: "id" in URL refers to the id from "immunization record"
Server returns:
{ "message": "Immunization Record deleted" }
https://immunizationtracker-bw.herokuapp.com/api/record/:id
**Note: "id" refers to patient ID
Server returns:
[ { "id": 1, "vaccineName": "flu", "vaccineDate": "2010-12-19", "vaccineLocation": "New York City", "patientId": 1 }, { "id": 2, "vaccineName": "HPV", "vaccineDate": "2000-10-12", "vaccineLocation": "Houston", "patientId": 1 } ]