{"info":{"_postman_id":"cb0b10fa-7823-403f-9396-06d9f9e651cd","name":"🏥 Coalition Technologies Patient Data API for FED Skills Test","description":"<html><head></head><body><p>Welcome to the Postman documentation for the Coalition Technologies Patient Data API used for the FED skills test. This API is designed to provide front-end developers with a realistic scenario for integrating a web API. Below you'll find detailed information on how to authenticate and retrieve sample patient data.</p>\n<h2 id=\"notes-for-fed-skills-test-participants\">Notes for FED Skills Test Participants</h2>\n<ul>\n<li>The data is not real, it was generated using a custom created script.</li>\n<li>The API provides static data designed for testing front-end implementations - it is not uniquely generated on each API call.</li>\n<li>Display information only for Jessica Taylor; displaying other patients' data is unnecessary and will not yield extra points in the skills test.</li>\n<li>In some instances, data will need to be manipulated to match the design mockups accurately. This manipulation is crucial, so please pay close attention to the mockups.<ul>\n<li>The data in the API for <strong>Diagnosis History</strong>, <strong>Diagnostic List</strong> and <strong>Lab Results</strong> will not match the designs exactly. This <strong>will not</strong> be counted against you.</li>\n</ul>\n</li>\n<li>Hard coding the encrypted Basic Auth <i><b>will be counted against you</b></i>, we expect that you encrypt the key yourself using the proper methods.<ul>\n<li>You can refer to this article to help you get started with how to make an API call using Basic Auth if you need it: <a href=\"https://gomakethings.com/sending-credentials-with-javascript/\">https://gomakethings.com/sending-credentials-with-javascript/</a>.</li>\n</ul>\n</li>\n</ul>\n<p>Below you will find all the API information you need to get started.</p>\n<p>Happy coding! 👩‍💻👨‍💻</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"11861104","collectionId":"cb0b10fa-7823-403f-9396-06d9f9e651cd","publishedId":"2sA35G42ve","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"006AAC"},"publishDate":"2024-03-30T09:43:11.000Z"},"item":[{"name":"Get All Patients","id":"e841b49f-dd8f-4d79-8306-2fa1f1d29fb9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://fedskillstest.coalitiontechnologies.workers.dev","description":"<p>The endpoint makes an HTTP GET request to retrieve data related to a person's medical information. The response is in JSON format and includes fields such as name, gender, age, profile picture, date of birth, phone number, emergency contact, insurance type, diagnosis history, diagnostic list, and lab results.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"coalition"},{"key":"password","value":"skills-test"}]},"isInherited":true,"source":{"_postman_id":"cb0b10fa-7823-403f-9396-06d9f9e651cd","id":"cb0b10fa-7823-403f-9396-06d9f9e651cd","name":"🏥 Coalition Technologies Patient Data API for FED Skills Test","type":"collection"}},"urlObject":{"protocol":"https","host":["fedskillstest","coalitiontechnologies","workers","dev"],"query":[],"variable":[]}},"response":[{"id":"49033d68-2323-4679-b604-4cc1bab8b72d","name":"Successful Response","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic [ENCRYPTED AUTH KEY GOES HERE]","type":"text"}],"url":"https://fedskillstest.coalitiontechnologies.workers.dev"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"[\n\t{\n\t\t\"name\": \"Jessica Taylor\",\n\t\t\"gender\": \"Female\",\n\t\t\"age\": 28,\n\t\t\"profile_picture\": \"https://fedskillstest.ct.digital/4.png\",\n\t\t\"date_of_birth\": \"1996-08-23\",\n\t\t\"phone_number\": \"(415) 555-1234\",\n\t\t\"emergency_contact\": \"(415) 555-5678\",\n\t\t\"insurance_type\": \"Sunrise Health Assurance\",\n\t\t\"diagnosis_history\": [\n\t\t\t{\n\t\t\t\t\"month\": \"March\",\n\t\t\t\t\"year\": 2024,\n\t\t\t\t\"blood_pressure\": {\n\t\t\t\t\t\"systolic\": {\n\t\t\t\t\t\t\"value\": 160,\n\t\t\t\t\t\t\"levels\": \"Higher than Average\"\n\t\t\t\t\t},\n\t\t\t\t\t\"diastolic\": {\n\t\t\t\t\t\t\"value\": 78,\n\t\t\t\t\t\t\"levels\": \"Lower than Average\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"heart_rate\": {\n\t\t\t\t\t\"value\": 78,\n\t\t\t\t\t\"levels\": \"Lower than Average\"\n\t\t\t\t},\n\t\t\t\t\"respiratory_rate\": {\n\t\t\t\t\t\"value\": 20,\n\t\t\t\t\t\"levels\": \"Normal\"\n\t\t\t\t},\n\t\t\t\t\"temperature\": {\n\t\t\t\t\t\"value\": 98.6,\n\t\t\t\t\t\"levels\": \"Normal\"\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Additional months of diagnostic history\n\t\t],\n\t\t\"diagnostic_list\": [\n\t\t\t{\n\t\t\t\t\"name\": \"Hypertension\",\n\t\t\t\t\"description\": \"Chronic high blood pressure\",\n\t\t\t\t\"status\": \"Under Observation\"\n\t\t\t}\n\t\t\t// Additional diagnostics\n\t\t],\n\t\t\"lab_results\": [\n\t\t\t\"Blood Tests\",\n\t\t\t\"CT Scans\"\n\t\t\t// More lab results\n\t\t]\n\t}\n]\n"},{"id":"bdcd967d-319a-431c-a2d1-f5601a027a94","name":"Missing or Incorrect Auth Creds","originalRequest":{"method":"GET","header":[],"url":"https://fedskillstest.coalitiontechnologies.workers.dev"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": true,\n    \"error_message\": \"You need to be authenticated.\"\n}"},{"id":"cf87d6c4-d3ef-45a8-bd92-7b431e7fef72","name":"Wrong Authentication Type","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer examplekey","type":"text"}],"url":"https://fedskillstest.coalitiontechnologies.workers.dev"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": true,\n    \"error_message\": \"Malformed authorization header.\"\n}"},{"id":"f68aade0-a22a-4977-8ef7-5bc0f54c35c3","name":"Wrong Method","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Basic [ENCRYPTED AUTH KEY GOES HERE]","type":"text"}],"url":{"raw":"https://fedskillstest.coalitiontechnologies.workers.dev","protocol":"https","host":["fedskillstest","coalitiontechnologies","workers","dev"],"query":[{"key":"","value":"","disabled":true}]}},"status":"Method Not Allowed","code":405,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": true,\n    \"error_message\": \"Method Not Allowed.\"\n}"}],"_postman_id":"e841b49f-dd8f-4d79-8306-2fa1f1d29fb9"}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"coalition"},{"key":"password","value":"skills-test"}]}},"event":[{"listen":"prerequest","script":{"id":"4a81af26-9c68-411e-832f-dce0d69d4aad","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"1fdf601e-c889-4b99-91f7-1a87ca57bcae","type":"text/javascript","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Response header Content-Type is application/json\", function() {","    pm.expect(pm.response.headers.get('Content-Type')).to.include('application/json');","});","","pm.test(\"Response body is in correct format\", function() {","    let jsonData = pm.response.json();","    pm.expect(jsonData).to.be.an('array');","    pm.expect(jsonData.length).to.eql(20); // Assuming the API returns 20 patients","","    // Validate the structure of the first patient record (can expand to more or all records)","    const patient = jsonData[0];","    pm.expect(patient).to.have.property('name').that.is.a('string');","    pm.expect(patient).to.have.property('gender').that.is.a('string');","    pm.expect(patient).to.have.property('age').that.is.a('number');","    pm.expect(patient).to.have.property('profile_picture').that.is.a('string');","    pm.expect(patient).to.have.property('date_of_birth').that.is.a('string');","    pm.expect(patient).to.have.property('phone_number').that.is.a('string');","    pm.expect(patient).to.have.property('emergency_contact').that.is.a('string');","    pm.expect(patient).to.have.property('insurance_type').that.is.a('string');","","    // Validate nested structures for diagnosis_history, diagnostic_list, and lab_results","    pm.expect(patient).to.have.property('diagnosis_history').that.is.an('array');","    pm.expect(patient.diagnosis_history[0]).to.be.an('object').that.includes.keys('month', 'year', 'blood_pressure');","","    pm.expect(patient).to.have.property('diagnostic_list').that.is.an('array');","    pm.expect(patient.diagnostic_list[0]).to.be.an('object').that.includes.keys('name', 'description', 'status');","","    pm.expect(patient).to.have.property('lab_results').that.is.an('array');","    pm.expect(patient.lab_results[0]).to.be.a('string'); // Assuming lab_results are strings","});",""]}}],"variable":[{"key":"userrname","value":"coalition","type":"string"},{"key":"password","value":"skills-test","type":"string"}]}