{"info":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"7357882","collectionId":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","publishedId":"TzJx9GoU","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-04-24T10:12:24.000Z"},"item":[{"name":"patient signup","id":"32538d66-4e99-426a-ab95-7b75bd29d0eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"fawas\",\n    \"lastname\": \"kareem\",\n    \"email\": \"phawazzzy132@gmail.com\",\n    \"phone\": \"08162816543\",\n    \"country\": \"Nigeria\",\n    \"password\": \"Password21;\",\n    \"dob\": \"29-05-2005\",\n    \"address\": \"lagos\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patients/signup","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","patients","signup"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"40d317f8-eeab-4dd2-b109-54fbf3a925a3","name":"successfully signed up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"fawas\",\n    \"lastname\": \"kareem\",\n    \"email\": \"phawazzzy.me2@gmail.com\",\n    \"phone\": \"08162816543\",\n    \"country\": \"Nigeria\",\n    \"password\": \"Hardemola29;\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/api/v1/auth/signup"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"617"},{"key":"ETag","value":"W/\"269-vPZu3YsJXKfQslB8PynAzX3zaM8\""},{"key":"Date","value":"Fri, 23 Apr 2021 10:08:29 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"User registrattion completed\",\n    \"data\": {\n        \"PatientData\": {\n            \"_id\": \"60829c9c9f6ea0140772b3b2\",\n            \"firstname\": \"fawas\",\n            \"lastname\": \"kareem\",\n            \"email\": \"phawazzzy.me2@gmail.com\",\n            \"phone\": \"08162816543\",\n            \"country\": \"Nigeria\",\n            \"password\": \"$2b$10$wvAdTZ7O4RevRBNuda3yDOJ3g1nd0yYFetmSBUoYSGZR7bL2bxWr.\",\n            \"createdAt\": \"2021-04-23T10:08:28.870Z\",\n            \"updatedAt\": \"2021-04-23T10:08:28.870Z\",\n            \"__v\": 0\n        },\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InBoYXdhenp6eS5tZTJAZ21haWwuY29tIiwiaWQiOiI2MDgyOWM5YzlmNmVhMDE0MDc3MmIzYjIiLCJpYXQiOjE2MTkxNzI1MDksImV4cCI6MTYxOTE5NDEwOX0.h-XcY-W1NVn4ry2C1Mns-zqFSrxTy-hvEVk34QrlC9s\"\n    }\n}"}],"_postman_id":"32538d66-4e99-426a-ab95-7b75bd29d0eb"},{"name":"verify account","id":"20244c41-9281-4e3b-a6b2-c144f8b0ccdf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"verificationCode\": \"8559\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/api/v1/patients/verify","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"port":"5000","path":["api","v1","patients","verify"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0d82bf91-2d36-44fe-84fa-df86832e0b2f","name":"verify account success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"verificationCode\": \"8559\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/api/v1/patients/verify"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"295"},{"key":"ETag","value":"W/\"127-u8GmIMqlDsfMaVaJtVQdY/UX6bI\""},{"key":"Date","value":"Fri, 23 Apr 2021 12:42:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Account Verification successfull\",\n    \"data\": {\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InBoYXdhenp6eTEzMkBnbWFpbC5jb20iLCJpZCI6IjYwODJjMDdiMmY3ZmVlMWMwYzllMTM0ZiIsImlhdCI6MTYxOTE4MTcxOSwiZXhwIjoxNjE5MjAzMzE5fQ.4s0hyfqHBZMyErAOAkGOw9tX_ZSaTwZnHEpS1cYOkhE\"\n    }\n}"},{"id":"091d8685-d714-4201-8c75-46b142da9066","name":"verify account invalid","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"verificationCode\": \"8559\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/api/v1/patients/verify"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"49"},{"key":"ETag","value":"W/\"31-QFYJbBhTfaYBZN0GU58zwoSwZpw\""},{"key":"Date","value":"Fri, 23 Apr 2021 12:42:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": false,\n    \"message\": \"This code is invalid\"\n}"}],"_postman_id":"20244c41-9281-4e3b-a6b2-c144f8b0ccdf"},{"name":"create diseases","id":"796f0399-9a40-47f9-ab1f-3e7107641df6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/diseases/create","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"port":"8080","path":["api","v1","diseases","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"cb27d97e-5991-4089-8f5a-3d3050b8ccea","name":"create diseases::: Empty payloads","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"\",\n    \"description\": \"\",\n    \"symptoms\": \"\",\n    \"causes\":\"\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/diseases/create"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"116"},{"key":"ETag","value":"W/\"74-oHSuFta0OYj16F5leU8FSVb2UjU\""},{"key":"Date","value":"Sat, 24 Apr 2021 10:56:52 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": [\n        \"\\\"name\\\" is required\",\n        \"\\\"description\\\" is required\",\n        \"\\\"symptoms\\\" is required\",\n        \"\\\"causes\\\" is required\"\n    ]\n}"},{"id":"20e54d66-c390-4fb9-be6f-b5e3408c7146","name":"create diseases:::: successful","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"maleria\",\n    \"description\": \"maleria disease is a kind of disease common in africa\",\n    \"symptoms\": \"The symptoms of maleria are headache, high tempeature\",\n    \"causes\":\"mosquitoes\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/diseases/create"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"361"},{"key":"ETag","value":"W/\"169-NdDax/Zw/x+I5aSMmW8zzliXwc4\""},{"key":"Date","value":"Sat, 24 Apr 2021 11:01:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Disease created\",\n    \"data\": {\n        \"synonyms\": [],\n        \"_id\": \"6083faa14e32f71d14f211eb\",\n        \"name\": \"maleria\",\n        \"description\": \"maleria disease is a kind of disease common in africa\",\n        \"symptoms\": \"The symptoms of maleria are headache, high tempeature\",\n        \"causes\": \"mosquitoes\",\n        \"createdAt\": \"2021-04-24T11:01:53.959Z\",\n        \"updatedAt\": \"2021-04-24T11:01:53.959Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"796f0399-9a40-47f9-ab1f-3e7107641df6"},{"name":"Patient login","id":"95e8147a-4069-43bb-9525-40c224bbfd4e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"phawazzzy132@gmail.com\",\n    \"password\": \"Password21;\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patients/login","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","patients","login"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"33d7081a-7ff3-4f52-b083-13231d017beb","name":"Patient login:::: empty payload","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"\",\n    \"password\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patients/login"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"92"},{"key":"ETag","value":"W/\"5c-6ppGOfHO0lWsx0vrxFygi4l7y0I\""},{"key":"Date","value":"Sat, 24 Apr 2021 10:49:52 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": [\n        \"\\\"email\\\" is not allowed to be empty\",\n        \"\\\"password\\\" is not allowed to be empty\"\n    ]\n}"},{"id":"c7b9b4d3-034d-401e-9236-1f52dc9f3cc6","name":"Patient login:::: successfull","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"phawazzzy132@gmail.com\",\n    \"password\": \"Password21;\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patients/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"569"},{"key":"ETag","value":"W/\"239-ITxUqK95tDAFghjYHNCS96Dkz4Y\""},{"key":"Date","value":"Sat, 24 Apr 2021 10:54:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Login was Succesfull\",\n    \"data\": {\n        \"patient\": {\n            \"_id\": \"6082c07b2f7fee1c0c9e134f\",\n            \"firstname\": \"fawas\",\n            \"lastname\": \"kareem\",\n            \"email\": \"phawazzzy132@gmail.com\",\n            \"phone\": \"08162816543\",\n            \"country\": \"Nigeria\",\n            \"password\": null,\n            \"verificationCode\": null,\n            \"createdAt\": \"2021-04-23T12:41:31.830Z\",\n            \"updatedAt\": \"2021-04-23T12:41:59.977Z\",\n            \"__v\": 0\n        },\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InBoYXdhenp6eTEzMkBnbWFpbC5jb20iLCJpZCI6IjYwODJjMDdiMmY3ZmVlMWMwYzllMTM0ZiIsImlhdCI6MTYxOTI2MTY2NSwiZXhwIjoxNjE5MjgzMjY1fQ.95vh_oa2DP7Ey37UWwsTQZ7_-M9e0vAy-yhyy6AQ5U0\"\n    }\n}"}],"_postman_id":"95e8147a-4069-43bb-9525-40c224bbfd4e"},{"name":"admin/researcher signup","id":"270b70a4-0cc1-4ca9-92cf-d84d70832cb9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"admin1\",\n    \"lastname\": \"super\",\n    \"email\": \"researcher@gmail.com\",\n    \"password\": \"Adminsuper1;\",\n    \"role\": \"researcher\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/admins/signup","description":"<p>This endpoint is only for admin/researchers</p>\n<p>To distinguish this role, we have only 2 acceptable roles which are</p>\n<ul>\n<li>admin</li>\n<li>researcher</li>\n</ul>\n<p>Any other role other than this two above mentioned will result to an error.\ncheck the response in the list errors</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","admins","signup"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"4c87581e-9b55-4e5c-8362-a87767d8dfb8","name":"admin/researcher signup::: error response for available role","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"admin1\",\n    \"lastname\": \"super\",\n    \"email\": \"admin1@gmail.com\",\n    \"password\": \"Adminsuper1;\",\n    \"role\": \"admin2\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/admins/signup"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"111"},{"key":"ETag","value":"W/\"6f-VetFI/4nAhVqxpkR0uwvy0sGWls\""},{"key":"Date","value":"Sat, 24 Apr 2021 12:52:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": false,\n    \"message\": \"Admin validation failed: role: `admin2` is not a valid enum value for path `role`.\"\n}"},{"id":"ff39d3eb-a5f9-484b-8844-54cda4da2a9b","name":"admin/researcher signup::: succesfully creates account for researcher/admin","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"admin1\",\n    \"lastname\": \"super\",\n    \"email\": \"researcher@gmail.com\",\n    \"password\": \"Adminsuper1;\",\n    \"role\": \"researcher\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/admins/signup"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"349"},{"key":"ETag","value":"W/\"15d-m/y0xScY59wWn5fwNjnbqaexM00\""},{"key":"Date","value":"Sat, 24 Apr 2021 12:54:01 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"User registrattion completed\",\n    \"data\": {\n        \"_id\": \"608414e9a339cc27cc83fb4c\",\n        \"email\": \"researcher@gmail.com\",\n        \"password\": \"$2b$10$zAPL5Syrx.voS5yelaan5.xJWPZadW67aJkIFdNj19QTX/3evoDc6\",\n        \"role\": \"researcher\",\n        \"firstname\": \"admin1\",\n        \"lastname\": \"super\",\n        \"createdAt\": \"2021-04-24T12:54:01.128Z\",\n        \"updatedAt\": \"2021-04-24T12:54:01.128Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"270b70a4-0cc1-4ca9-92cf-d84d70832cb9"},{"name":"Admin/ reseachers login","id":"b6576551-de57-4e50-b456-7f3441855720","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"researcher@gmail.com\",\n    \"password\": \"Adminsuper1;\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/admins/login","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","admins","login"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"0722c1d4-89ba-45f3-8428-44f3c76cb644","name":"Admin/ reseachers login::: succssfull","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"researcher@gmail.com\",\n    \"password\": \"Adminsuper1;\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/admins/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"543"},{"key":"ETag","value":"W/\"21f-uPnOf8PJuiKSDno0v1pn3qTK2OY\""},{"key":"Date","value":"Sat, 24 Apr 2021 13:04:50 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Login was Succesfull\",\n    \"data\": {\n        \"admin\": {\n            \"_id\": \"608414e9a339cc27cc83fb4c\",\n            \"email\": \"researcher@gmail.com\",\n            \"password\": null,\n            \"role\": \"researcher\",\n            \"firstname\": \"admin1\",\n            \"lastname\": \"super\",\n            \"createdAt\": \"2021-04-24T12:54:01.128Z\",\n            \"updatedAt\": \"2021-04-24T12:54:01.128Z\",\n            \"__v\": 0\n        },\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJlc2VhcmNoZXJAZ21haWwuY29tIiwiaWQiOiI2MDg0MTRlOWEzMzljYzI3Y2M4M2ZiNGMiLCJyb2xlIjoicmVzZWFyY2hlciIsImlhdCI6MTYxOTI2OTQ5MCwiZXhwIjoxNjE5MjkxMDkwfQ.ZVJYwgtNLYXXi-QOM6q909BkOQBzoutG-369xEUE7f4\"\n    }\n}"}],"_postman_id":"b6576551-de57-4e50-b456-7f3441855720"},{"name":"get all diseases","id":"e0d2e165-0fcd-41c7-943e-9064acbc3cde","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/diseases/all","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","diseases","all"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"e0d2e165-0fcd-41c7-943e-9064acbc3cde"},{"name":"get one disease","id":"e4ec67f6-7faf-4941-98fa-651da838ca7f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/v1/diseases/6083e246238b0a8469a06066","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","diseases","6083e246238b0a8469a06066"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"e4ec67f6-7faf-4941-98fa-651da838ca7f"},{"name":"CHOOSE DISEASES","id":"27fc4750-d346-4145-b53a-40547090df26","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"diseaseId\": \"6083e246238b0a8469a06066\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/registry/choose","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","registry","choose"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"8400f2b6-01ae-4f6e-a95c-a6e8a9d5a1fc","name":"CHOOSE DISEASES","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"diseaseId\": \"6083e246238b0a8469a06066\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/registry/choose"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"175"},{"key":"ETag","value":"W/\"af-65TwCGNNco1UbHxALXpiNE7yUlA\""},{"key":"Date","value":"Sun, 25 Apr 2021 09:47:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Data successfully saved\",\n    \"data\": {\n        \"_id\": \"60853ac060bdbd95fb91c461\",\n        \"disease\": \"6083e246238b0a8469a06066\",\n        \"patient\": \"6082c07b2f7fee1c0c9e134f\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"27fc4750-d346-4145-b53a-40547090df26"},{"name":"Join a group","id":"bf133d7d-25da-4d01-bbe6-2bd0511d3cec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"localhost:8080/api/v1/groups/join/608515c1bc0c3921152622c9","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","groups","join","608515c1bc0c3921152622c9"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"c3749ec6-4a48-4493-9a33-5164f3395a5d","name":"Join a group","originalRequest":{"method":"POST","header":[],"url":"localhost:8080/api/v1/groups/join/608515c1bc0c3921152622c9"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"63"},{"key":"ETag","value":"W/\"3f-z33b0d29EvolnzHz9wi7FGkGDXg\""},{"key":"Date","value":"Sun, 25 Apr 2021 10:12:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"patient successfully joined a group\"\n}"}],"_postman_id":"bf133d7d-25da-4d01-bbe6-2bd0511d3cec"},{"name":"Get all groups","id":"541e738c-9419-46ca-98d7-6aab2ce48c54","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/v1/groups/all","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","groups","all"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"1c3a400a-992c-4a22-ae48-182918bf9d73","name":"Get all groups","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/groups/all"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"414"},{"key":"ETag","value":"W/\"19e-/Gv6A6HqygJ74nEFz+A3nURWSjA\""},{"key":"Date","value":"Sun, 25 Apr 2021 10:11:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"groups\": [\n            {\n                \"members\": [],\n                \"_id\": \"608515c1bc0c3921152622c9\",\n                \"name\": \"Achalasia\",\n                \"createdAt\": \"2021-04-25T07:09:53.849Z\",\n                \"updatedAt\": \"2021-04-25T07:09:53.849Z\",\n                \"__v\": 0\n            },\n            {\n                \"members\": [],\n                \"_id\": \"608515fdbc0c3921152622ca\",\n                \"name\": \"Aarskog Syndrome\",\n                \"createdAt\": \"2021-04-25T07:10:53.301Z\",\n                \"updatedAt\": \"2021-04-25T07:10:53.301Z\",\n                \"__v\": 0\n            }\n        ],\n        \"page\": 1,\n        \"perPage\": 50,\n        \"groupCount\": 2\n    },\n    \"message\": \"Groups retrived\"\n}"}],"_postman_id":"541e738c-9419-46ca-98d7-6aab2ce48c54"},{"name":"user profile","id":"2c47994b-7c45-41f0-bcd1-fede4f1fe9fa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/v1/users/me","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","users","me"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"2c47994b-7c45-41f0-bcd1-fede4f1fe9fa"},{"name":"check user if in group","id":"3b7e30a8-c7bb-4c03-a395-4a00d0af0bdd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/v1/groups/608515fdbc0c3921152622ca/user","description":"<p>This endpoint will check if the user belongs to a group.</p>\n<p>Please pass in the group id in the query paramater it is important</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"path":["api","v1","groups","608515fdbc0c3921152622ca","user"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"e586f6a2-4991-444c-b669-2d24be649597","name":"check user if in group :::  user doesnt belong to group","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/groups/608515fdbc0c3921152622ca/user"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"67"},{"key":"ETag","value":"W/\"43-cu84tefHvBGDiK0bezIWFxrVNtE\""},{"key":"Date","value":"Sun, 25 Apr 2021 12:03:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": false,\n    \"message\": \"User does not belong to the group chat\"\n}"},{"id":"b8fd5aa8-af51-4d03-aa44-8d0894a1a642","name":"check user if in group:: user belongs to group","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/groups/608515c1bc0c3921152622c9/user"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"*"},{"key":"Access-Control-Allow-Headers","value":"Origin, X-Requested-With, Content-Type, Accept"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"49"},{"key":"ETag","value":"W/\"31-8Yd6MIreebSVpbReNYkHCAgwvtk\""},{"key":"Date","value":"Sun, 25 Apr 2021 12:08:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"user belongs to group\"\n}"}],"_postman_id":"3b7e30a8-c7bb-4c03-a395-4a00d0af0bdd"},{"name":"get patients with disease","id":"b1ee48f4-28ab-4185-88d8-ca29aa6ed1fe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"b1ee48f4-28ab-4185-88d8-ca29aa6ed1fe"},{"name":"admin signup","id":"d9eb89bf-1af2-4dd4-af7d-885564c42f0d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","id":"e4bdf80e-a41b-404e-8f2a-e820eeb4008f","name":"Patient registry","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"d9eb89bf-1af2-4dd4-af7d-885564c42f0d"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]}},"event":[{"listen":"prerequest","script":{"id":"05febe09-573a-4ed8-9fa6-d66f0e632b69","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e1a49bf0-0e30-4e17-a598-c4d352c2c6eb","type":"text/javascript","exec":[""]}}],"variable":[{"key":"LBASE_URL","value":"localhost:8080"},{"key":"BASE_URL","value":"http://ec2-18-130-101-49.eu-west-2.compute.amazonaws.com:8080"}]}