{"info":{"_postman_id":"48d3faac-72f3-4f31-bd75-7b0ef9a97ab2","name":"SH Medical Lab API","description":"<html><head></head><body><p>Complete API documentation for SH Medical Lab — a laboratory management system supporting patient registration, lab request lifecycle, test management, result reporting with PDF export, and push notifications.</p>\n<p><strong>Base URL:</strong> <code>https://sh-medecial-lab-api.vercel.app</code></p>\n<p><strong>Authentication:</strong> All protected routes require a <code>token</code> header (JWT access token). Refresh tokens are passed via the <code>refreshtoken</code> header.</p>\n<p><strong>Roles:</strong></p>\n<ul>\n<li><code>PATIENT</code> — can register, book requests, view own results, manage notifications</li>\n<li><code>SPECIALIST</code> — manages tests, requests workflow, creates and locks results</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"49715513","collectionId":"48d3faac-72f3-4f31-bd75-7b0ef9a97ab2","publishedId":"2sBYArSrcC","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-08-18T18:13:46.000Z"},"item":[{"name":"Auth","item":[{"name":"Register","id":"27b4ab87-b6a4-4b7a-920e-63b4b65c0d3f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Eldeen\",\n  \"phone\": \"01278396490\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"Password@123\",\n  \"rePassword\": \"Password@123\",\n  \"dateOfBirth\": \"2003-01-07\",\n  \"gender\": \"MALE\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/register","description":"<p>Register a new user account. The <code>email</code> field is optional. Passwords must match and be at least 8 characters. Phone number must be unique.</p>\n<p><strong>Access:</strong> Public</p>\n","urlObject":{"path":["auth","register"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"05d2d872-185f-454c-b123-bcd0f0582744","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Eldeen\",\n  \"phone\": \"01278396490\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"Password@123\",\n  \"rePassword\": \"Password@123\",\n  \"dateOfBirth\": \"2003-01-07\",\n  \"gender\": \"MALE\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/register","description":"Register a new user account. The `email` field is optional. Passwords must match and be at least 8 characters. Phone number must be unique.\n\n**Access:** Public"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Registration Successful\",\n  \"data\": {\n    \"id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n    \"name\": \"Diaa Eldeen\",\n    \"phone\": \"01278396490\",\n    \"email\": \"diaaelseady@gmail.com\",\n    \"dateOfBirth\": \"2003-01-07T00:00:00.000Z\",\n    \"gender\": \"MALE\",\n    \"role\": \"PATIENT\"\n  }\n}"},{"id":"8ad5368e-cb7c-4211-8e30-8374a153936c","name":"409 Phone Already Exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Eldeen\",\n  \"phone\": \"01278396490\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"Password@123\",\n  \"rePassword\": \"Password@123\",\n  \"dateOfBirth\": \"2003-01-07\",\n  \"gender\": \"MALE\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/register","description":"Register a new user account. The `email` field is optional. Passwords must match and be at least 8 characters. Phone number must be unique.\n\n**Access:** Public"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Phone Number Already Exist\",\n  \"status\": 409\n}"},{"id":"d9683c1a-b4fe-4497-a74d-57aa414191c6","name":"400 Validation Error","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Eldeen\",\n  \"phone\": \"01278396490\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"Password@123\",\n  \"rePassword\": \"Password@123\",\n  \"dateOfBirth\": \"2003-01-07\",\n  \"gender\": \"MALE\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/register","description":"Register a new user account. The `email` field is optional. Passwords must match and be at least 8 characters. Phone number must be unique.\n\n**Access:** Public"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": {\n    \"message\": \"Validation Error\",\n    \"errors\": [\n      { \"field\": \"rePassword\", \"message\": \"Passwords do not match\" }\n    ]\n  },\n  \"status\": 400\n}"}],"_postman_id":"27b4ab87-b6a4-4b7a-920e-63b4b65c0d3f"},{"name":"Login","id":"4e54d05a-a155-4891-bb2a-50291d407544","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"phone\": \"01278396490\",\n  \"password\": \"Diaa12345\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/login","description":"<p>Authenticate a user and receive a JWT access token (1 hour) and refresh token (1 year). The <code>fcmToken</code> field is optional and used for push notifications.</p>\n<p><strong>Access:</strong> Public</p>\n","urlObject":{"path":["auth","login"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"d537aa7c-7315-4da6-9c1c-067d0907f04c","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"phone\": \"01278396490\",\n  \"password\": \"Diaa12345\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/login","description":"Authenticate a user and receive a JWT access token (1 hour) and refresh token (1 year). The `fcmToken` field is optional and used for push notifications.\n\n**Access:** Public"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Login Successfully\",\n  \"data\": {\n    \"token\": \"{{supabase_service_role_api_key_0hsq}}...\",\n    \"refreshToken\": \"{{supabase_service_role_api_key_0hsq}}...\"\n  }\n}"},{"id":"5ad6d246-6373-4c46-bfeb-f7d77b9e95f8","name":"401 Invalid Credentials","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"phone\": \"01278396490\",\n  \"password\": \"Diaa12345\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/login","description":"Authenticate a user and receive a JWT access token (1 hour) and refresh token (1 year). The `fcmToken` field is optional and used for push notifications.\n\n**Access:** Public"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Invalid Phone Number Or Password\",\n  \"status\": 401\n}"}],"_postman_id":"4e54d05a-a155-4891-bb2a-50291d407544"},{"name":"Refresh Token","id":"302edab8-a709-4759-84f7-5b3a7aa86a75","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"refreshtoken","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/auth/refresh-token","description":"<p>Issue a new access token using a valid refresh token. Pass the refresh token in the <code>refreshtoken</code> request header.</p>\n<p><strong>Access:</strong> Public (requires valid refresh token)</p>\n","urlObject":{"path":["auth","refresh-token"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"8735ff51-9a96-44da-b040-6567749ea632","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"refreshtoken","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/auth/refresh-token","description":"Issue a new access token using a valid refresh token. Pass the refresh token in the `refreshtoken` request header.\n\n**Access:** Public (requires valid refresh token)"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Token Refreshed Successfully\",\n  \"data\": {\n    \"token\": \"{{supabase_service_role_api_key_0hsq}}...\"\n  }\n}"},{"id":"c894bb53-f5d2-4eb3-a7be-624df4199826","name":"401 Expired Refresh Token","originalRequest":{"method":"GET","header":[{"key":"refreshtoken","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/auth/refresh-token","description":"Issue a new access token using a valid refresh token. Pass the refresh token in the `refreshtoken` request header.\n\n**Access:** Public (requires valid refresh token)"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Refresh Token Expired\",\n  \"status\": 401\n}"}],"_postman_id":"302edab8-a709-4759-84f7-5b3a7aa86a75"},{"name":"Get Profile","id":"2c8a48e6-f239-4d79-9e09-f9b6672f76bb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/auth/profile","description":"<p>Retrieve the authenticated user's profile information.</p>\n<p><strong>Access:</strong> PATIENT, SPECIALIST</p>\n","urlObject":{"path":["auth","profile"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"fadd9ff6-4a86-47fc-83c9-c6fd31c40184","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/auth/profile","description":"Retrieve the authenticated user's profile information.\n\n**Access:** PATIENT, SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Profile Fetched Successfully\",\n  \"data\": {\n    \"id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n    \"name\": \"Diaa Eldeen\",\n    \"phone\": \"01278396490\",\n    \"email\": \"diaaelseady@gmail.com\",\n    \"dateOfBirth\": \"2003-01-07T00:00:00.000Z\",\n    \"gender\": \"MALE\",\n    \"role\": \"PATIENT\"\n  }\n}"}],"_postman_id":"2c8a48e6-f239-4d79-9e09-f9b6672f76bb"},{"name":"Change Password","id":"286fca69-6c8f-4d98-bab5-18a31f2fd687","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"Password@123\",\n  \"newPassword\": \"NewPassword@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/change-password","description":"<p>Change the authenticated user's password. The new password must differ from the old one and be at least 8 characters.</p>\n<p><strong>Access:</strong> PATIENT, SPECIALIST</p>\n","urlObject":{"path":["auth","change-password"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"02b74e00-760d-4032-bc54-5d6abe63fc23","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"Password@123\",\n  \"newPassword\": \"NewPassword@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/change-password","description":"Change the authenticated user's password. The new password must differ from the old one and be at least 8 characters.\n\n**Access:** PATIENT, SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Password Changed Successfully\",\n  \"data\": null\n}"},{"id":"48fbcf2e-9b49-45bc-babe-24b614bfa05d","name":"400 Incorrect Old Password","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"Password@123\",\n  \"newPassword\": \"NewPassword@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/auth/change-password","description":"Change the authenticated user's password. The new password must differ from the old one and be at least 8 characters.\n\n**Access:** PATIENT, SPECIALIST"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Incorrect Old Password\",\n  \"status\": 400\n}"}],"_postman_id":"286fca69-6c8f-4d98-bab5-18a31f2fd687"}],"id":"45f5566b-5a01-48db-92e5-a1173df44735","description":"<p>Endpoints for user registration, authentication, profile management, and password changes.</p>\n","_postman_id":"45f5566b-5a01-48db-92e5-a1173df44735"},{"name":"Tests","item":[{"name":"Create Test","id":"ebbf66b0-3115-466d-b35b-12438b21a1c8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"nameAr\": \"تحليل الدم الكامل\",\n  \"medicalName\": \"Complete Blood Count\",\n  \"code\": \"CBC\",\n  \"category\": \"Hematology\",\n  \"price\": 150,\n  \"sampleType\": \"Blood\",\n  \"parameters\": [\n    {\n      \"name\": \"Hemoglobin\",\n      \"type\": \"number\",\n      \"unit\": \"g/dL\",\n      \"evaluationLogic\": {\n        \"type\": \"range\"\n      },\n      \"referenceRanges\": [\n        {\n          \"gender\": \"MALE\",\n          \"minAge\": 18,\n          \"maxAge\": 65,\n          \"min\": 13.5,\n          \"max\": 17.5\n        }\n      ]\n    },\n    {\n      \"name\": \"Blood Type\",\n      \"type\": \"select\",\n      \"options\": [\"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\", \"O+\", \"O-\"],\n      \"evaluationLogic\": {\n        \"type\": \"normal-values\",\n        \"normalValues\": [\"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\", \"O+\", \"O-\"]\n      }\n    },\n    {\n      \"name\": \"Notes\",\n      \"type\": \"text\"\n    },\n    {\n      \"name\": \"Malaria\",\n      \"type\": \"positive-negative\",\n      \"options\": [\"Positive\", \"Negative\"],\n      \"evaluationLogic\": {\n        \"type\": \"normal-values\",\n        \"normalValues\": [\"Negative\"]\n      }\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/test","description":"<p>Create a new laboratory test with its parameters. Each parameter must include a <code>name</code> and <code>type</code>.</p>\n<p><strong>Parameter types:</strong></p>\n<ul>\n<li><code>number</code> — requires <code>evaluationLogic</code>; if evaluation type is <code>range</code>, requires <code>referenceRanges</code></li>\n<li><code>text</code> — free text, no options or reference ranges allowed</li>\n<li><code>select</code> — requires <code>options</code> array</li>\n<li><code>positive-negative</code> — requires <code>options</code> array</li>\n</ul>\n<p><strong>Evaluation types:</strong></p>\n<ul>\n<li><code>range</code> — numeric comparison against <code>referenceRanges</code></li>\n<li><code>normal-values</code> — exact string match against <code>normalValues</code></li>\n</ul>\n<p><strong>Sample types:</strong> <code>Blood</code>, <code>Urine</code></p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["test"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"157308d5-bc8d-4e09-b02a-f34455648821","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"nameAr\": \"تحليل الدم الكامل\",\n  \"medicalName\": \"Complete Blood Count\",\n  \"code\": \"CBC\",\n  \"category\": \"Hematology\",\n  \"price\": 150,\n  \"sampleType\": \"Blood\",\n  \"parameters\": [\n    {\n      \"name\": \"Hemoglobin\",\n      \"type\": \"number\",\n      \"unit\": \"g/dL\",\n      \"evaluationLogic\": {\n        \"type\": \"range\"\n      },\n      \"referenceRanges\": [\n        {\n          \"gender\": \"MALE\",\n          \"minAge\": 18,\n          \"maxAge\": 65,\n          \"min\": 13.5,\n          \"max\": 17.5\n        }\n      ]\n    },\n    {\n      \"name\": \"Blood Type\",\n      \"type\": \"select\",\n      \"options\": [\"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\", \"O+\", \"O-\"],\n      \"evaluationLogic\": {\n        \"type\": \"normal-values\",\n        \"normalValues\": [\"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\", \"O+\", \"O-\"]\n      }\n    },\n    {\n      \"name\": \"Notes\",\n      \"type\": \"text\"\n    },\n    {\n      \"name\": \"Malaria\",\n      \"type\": \"positive-negative\",\n      \"options\": [\"Positive\", \"Negative\"],\n      \"evaluationLogic\": {\n        \"type\": \"normal-values\",\n        \"normalValues\": [\"Negative\"]\n      }\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/test","description":"Create a new laboratory test with its parameters. Each parameter must include a `name` and `type`.\n\n**Parameter types:**\n- `number` — requires `evaluationLogic`; if evaluation type is `range`, requires `referenceRanges`\n- `text` — free text, no options or reference ranges allowed\n- `select` — requires `options` array\n- `positive-negative` — requires `options` array\n\n**Evaluation types:**\n- `range` — numeric comparison against `referenceRanges`\n- `normal-values` — exact string match against `normalValues`\n\n**Sample types:** `Blood`, `Urine`\n\n**Access:** SPECIALIST"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Created Successfully\",\n  \"data\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d2\",\n    \"nameAr\": \"تحليل الدم الكامل\",\n    \"medicalName\": \"Complete Blood Count\",\n    \"code\": \"CBC\",\n    \"category\": \"Hematology\",\n    \"price\": 150,\n    \"sampleType\": \"Blood\",\n    \"parameters\": [...],\n    \"isDeleted\": false,\n    \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n    \"updatedAt\": \"2024-01-01T00:00:00.000Z\"\n  }\n}"},{"id":"b00e08c2-d9c8-459d-909f-570c7b4126a7","name":"409 Duplicate Code or Name","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"nameAr\": \"تحليل الدم الكامل\",\n  \"medicalName\": \"Complete Blood Count\",\n  \"code\": \"CBC\",\n  \"category\": \"Hematology\",\n  \"price\": 150,\n  \"sampleType\": \"Blood\",\n  \"parameters\": [\n    {\n      \"name\": \"Hemoglobin\",\n      \"type\": \"number\",\n      \"unit\": \"g/dL\",\n      \"evaluationLogic\": {\n        \"type\": \"range\"\n      },\n      \"referenceRanges\": [\n        {\n          \"gender\": \"MALE\",\n          \"minAge\": 18,\n          \"maxAge\": 65,\n          \"min\": 13.5,\n          \"max\": 17.5\n        }\n      ]\n    },\n    {\n      \"name\": \"Blood Type\",\n      \"type\": \"select\",\n      \"options\": [\"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\", \"O+\", \"O-\"],\n      \"evaluationLogic\": {\n        \"type\": \"normal-values\",\n        \"normalValues\": [\"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\", \"O+\", \"O-\"]\n      }\n    },\n    {\n      \"name\": \"Notes\",\n      \"type\": \"text\"\n    },\n    {\n      \"name\": \"Malaria\",\n      \"type\": \"positive-negative\",\n      \"options\": [\"Positive\", \"Negative\"],\n      \"evaluationLogic\": {\n        \"type\": \"normal-values\",\n        \"normalValues\": [\"Negative\"]\n      }\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/test","description":"Create a new laboratory test with its parameters. Each parameter must include a `name` and `type`.\n\n**Parameter types:**\n- `number` — requires `evaluationLogic`; if evaluation type is `range`, requires `referenceRanges`\n- `text` — free text, no options or reference ranges allowed\n- `select` — requires `options` array\n- `positive-negative` — requires `options` array\n\n**Evaluation types:**\n- `range` — numeric comparison against `referenceRanges`\n- `normal-values` — exact string match against `normalValues`\n\n**Sample types:** `Blood`, `Urine`\n\n**Access:** SPECIALIST"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test With Same Code Or Name Already Exists\",\n  \"status\": 409\n}"}],"_postman_id":"ebbf66b0-3115-466d-b35b-12438b21a1c8"},{"name":"Get All Tests","id":"69fa0f08-60b4-4d0c-ab0d-67f93e9b8653","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://sh-medecial-lab-api.vercel.app/test?page=1&limit=10&search=blood&category=Hematology","description":"<p>Retrieve a paginated list of all active (non-deleted) tests. Supports search by name or code and filtering by category.</p>\n<p><strong>Access:</strong> Public</p>\n","urlObject":{"path":["test"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[{"description":{"content":"<p>Page number (default: 1)</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Results per page (default: 10)</p>\n","type":"text/plain"},"key":"limit","value":"10"},{"description":{"content":"<p>Search by Arabic name, medical name, or code</p>\n","type":"text/plain"},"key":"search","value":"blood"},{"description":{"content":"<p>Filter by category</p>\n","type":"text/plain"},"key":"category","value":"Hematology"}],"variable":[]}},"response":[{"id":"17e06d2f-136b-4c8d-a81a-d637f2812163","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/test?page=1&limit=10&search=blood&category=Hematology","host":["https://sh-medecial-lab-api.vercel.app"],"path":["test"],"query":[{"key":"page","value":"1","description":"Page number (default: 1)"},{"key":"limit","value":"10","description":"Results per page (default: 10)"},{"key":"search","value":"blood","description":"Search by Arabic name, medical name, or code"},{"key":"category","value":"Hematology","description":"Filter by category"}]},"description":"Retrieve a paginated list of all active (non-deleted) tests. Supports search by name or code and filtering by category.\n\n**Access:** Public"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Tests Fetched Successfully\",\n  \"data\": {\n    \"meta\": {\n      \"currentPage\": 1,\n      \"totalPages\": 5,\n      \"limit\": 10,\n      \"totalDocs\": 47\n    },\n    \"data\": [...]\n  }\n}"}],"_postman_id":"69fa0f08-60b4-4d0c-ab0d-67f93e9b8653"},{"name":"Get Test By ID","id":"88aff2ca-078e-4eaa-b2ea-089b5b0d929b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/test/:testId","description":"<p>Retrieve full details of a single test by its ID.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["test",":testId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"description":{"content":"<p>MongoDB ObjectId of the test</p>\n","type":"text/plain"},"type":"any","value":"6a848aef42502565bb5009d3","key":"testId"}]}},"response":[{"id":"68b4cbf5-b8b0-44cd-814d-355db34425e9","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/test/:testId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["test",":testId"],"variable":[{"key":"testId","value":"6a848aef42502565bb5009d3","description":"MongoDB ObjectId of the test"}]},"description":"Retrieve full details of a single test by its ID.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Fetched Successfully\",\n  \"data\": { ... }\n}"},{"id":"666d59f0-049e-47ce-88a1-5ae9fadc9303","name":"404 Not Found","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/test/:testId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["test",":testId"],"variable":[{"key":"testId","value":"6a848aef42502565bb5009d3","description":"MongoDB ObjectId of the test"}]},"description":"Retrieve full details of a single test by its ID.\n\n**Access:** SPECIALIST"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Not Found\",\n  \"status\": 404\n}"}],"_postman_id":"88aff2ca-078e-4eaa-b2ea-089b5b0d929b"},{"name":"Update Test","id":"2de710b6-1e8a-4b5f-b096-185c9807522d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"price\": 200,\n  \"category\": \"Hematology\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/test/:testId","description":"<p>Partially update a test. All fields from <code>createTest</code> are accepted but all are optional. Duplicate code, Arabic name, or medical name across other tests is rejected.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["test",":testId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"d8f646f0-e10c-48bd-ba3e-136bc6df1720","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"testId"}]}},"response":[{"id":"cc58164f-c3a9-416e-a4f0-d20dbc72e725","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"price\": 200,\n  \"category\": \"Hematology\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/test/:testId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["test",":testId"],"variable":[{"id":"d8f646f0-e10c-48bd-ba3e-136bc6df1720","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Partially update a test. All fields from `createTest` are accepted but all are optional. Duplicate code, Arabic name, or medical name across other tests is rejected.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Updated Successfully\",\n  \"data\": { ... }\n}"}],"_postman_id":"2de710b6-1e8a-4b5f-b096-185c9807522d"},{"name":"Delete Test","id":"1f186979-5e3e-433b-bb52-8a19d45c4019","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/test/:testId","description":"<p>Soft-delete a test by marking it as <code>isDeleted: true</code>. Deleted tests are excluded from all queries.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["test",":testId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"9ddab71a-ce8c-4c46-bbeb-5047630d4cea","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"testId"}]}},"response":[{"id":"203db383-7368-4597-a513-e0e5ba66f210","name":"200 OK","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/test/:testId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["test",":testId"],"variable":[{"id":"9ddab71a-ce8c-4c46-bbeb-5047630d4cea","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Soft-delete a test by marking it as `isDeleted: true`. Deleted tests are excluded from all queries.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Deleted Successfully\",\n  \"data\": {}\n}"}],"_postman_id":"1f186979-5e3e-433b-bb52-8a19d45c4019"}],"id":"6119f1df-8608-4ec6-80fd-ea3d9563e320","description":"<p>Manage laboratory tests. Each test has a set of parameters with types, evaluation logic, and reference ranges.</p>\n","_postman_id":"6119f1df-8608-4ec6-80fd-ea3d9563e320"},{"name":"Lab Requests","item":[{"name":"Create Lab Request","id":"848a6f1e-6f61-44f5-8076-c8ddd6985347","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"tests\": [\n    \"64f1a2b3c4d5e6f7a8b9c0d2\",\n    \"64f1a2b3c4d5e6f7a8b9c0d3\"\n  ],\n  \"appointment\": {\n    \"appointmentDate\": \"2024-06-15\",\n    \"appointmentTime\": \"10:30 AM\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/request","description":"<p>Create a new lab request for the authenticated patient. Duplicate test IDs in the same request are not allowed. All provided test IDs must exist and not be deleted.</p>\n<p><strong>Access:</strong> PATIENT</p>\n","urlObject":{"path":["request"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"813fb4d9-5387-4f54-a086-57597fe90887","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"tests\": [\n    \"64f1a2b3c4d5e6f7a8b9c0d2\",\n    \"64f1a2b3c4d5e6f7a8b9c0d3\"\n  ],\n  \"appointment\": {\n    \"appointmentDate\": \"2024-06-15\",\n    \"appointmentTime\": \"10:30 AM\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/request","description":"Create a new lab request for the authenticated patient. Duplicate test IDs in the same request are not allowed. All provided test IDs must exist and not be deleted.\n\n**Access:** PATIENT"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Lab Request Created Successfully\",\n  \"data\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n    \"requestNumber\": \"REQ-1718000000000-4521\",\n    \"patient\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n    \"tests\": [\n      { \"testId\": \"64f1a2b3c4d5e6f7a8b9c0d2\", \"testName\": \"تحليل الدم الكامل\", \"status\": \"PENDING\" }\n    ],\n    \"appointment\": {\n      \"appointmentDate\": \"2024-06-15T00:00:00.000Z\",\n      \"appointmentTime\": \"10:30 AM\"\n    },\n    \"status\": \"PENDING\",\n    \"samples\": []\n  }\n}"},{"id":"f735849d-da83-483d-8757-5f93d2506b23","name":"400 Duplicate Tests","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"tests\": [\n    \"64f1a2b3c4d5e6f7a8b9c0d2\",\n    \"64f1a2b3c4d5e6f7a8b9c0d3\"\n  ],\n  \"appointment\": {\n    \"appointmentDate\": \"2024-06-15\",\n    \"appointmentTime\": \"10:30 AM\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/request","description":"Create a new lab request for the authenticated patient. Duplicate test IDs in the same request are not allowed. All provided test IDs must exist and not be deleted.\n\n**Access:** PATIENT"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Duplicate Tests Are Not Allowed\",\n  \"status\": 400\n}"},{"id":"1b719225-effb-40ab-8344-38483626e582","name":"404 Test Not Found","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"tests\": [\n    \"64f1a2b3c4d5e6f7a8b9c0d2\",\n    \"64f1a2b3c4d5e6f7a8b9c0d3\"\n  ],\n  \"appointment\": {\n    \"appointmentDate\": \"2024-06-15\",\n    \"appointmentTime\": \"10:30 AM\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/request","description":"Create a new lab request for the authenticated patient. Duplicate test IDs in the same request are not allowed. All provided test IDs must exist and not be deleted.\n\n**Access:** PATIENT"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"One Or More Tests Not Found Or No Longer Available\",\n  \"status\": 404\n}"}],"_postman_id":"848a6f1e-6f61-44f5-8076-c8ddd6985347"},{"name":"Get All Requests","id":"101ecacc-926b-4d85-a97b-96f69de40ce1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request?page=1&limit=10&status=PENDING&searchKey=REQ-&startDate=2024-01-01&endDate=2024-12-31","description":"<p>Retrieve a paginated list of all lab requests across all patients, with patient info populated. Supports filtering by status, request number, and date range.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["request"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"},{"description":{"content":"<p>Filter by status: PENDING | ATTENDED | SAMPLE_COLLECTED | IN_PROGRESS | COMPLETED | CANCELLED</p>\n","type":"text/plain"},"key":"status","value":"PENDING"},{"description":{"content":"<p>Search by request number</p>\n","type":"text/plain"},"key":"searchKey","value":"REQ-"},{"description":{"content":"<p>Filter requests created on or after this date</p>\n","type":"text/plain"},"key":"startDate","value":"2024-01-01"},{"description":{"content":"<p>Filter requests created on or before this date (inclusive, until 23:59:59)</p>\n","type":"text/plain"},"key":"endDate","value":"2024-12-31"}],"variable":[]}},"response":[{"id":"e76c4303-9fac-4126-9024-048bf3dade81","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request?page=1&limit=10&status=PENDING&searchKey=REQ-&startDate=2024-01-01&endDate=2024-12-31","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"},{"key":"status","value":"PENDING","description":"Filter by status: PENDING | ATTENDED | SAMPLE_COLLECTED | IN_PROGRESS | COMPLETED | CANCELLED"},{"key":"searchKey","value":"REQ-","description":"Search by request number"},{"key":"startDate","value":"2024-01-01","description":"Filter requests created on or after this date"},{"key":"endDate","value":"2024-12-31","description":"Filter requests created on or before this date (inclusive, until 23:59:59)"}]},"description":"Retrieve a paginated list of all lab requests across all patients, with patient info populated. Supports filtering by status, request number, and date range.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"All Lab Requests Fetched Successfully\",\n  \"data\": {\n    \"meta\": { \"currentPage\": 1, \"totalPages\": 10, \"limit\": 10, \"totalDocs\": 98 },\n    \"data\": [\n      {\n        \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n        \"requestNumber\": \"REQ-1718000000000-4521\",\n        \"patient\": { \"name\": \"Diaa Eldeen\", \"phone\": \"01278396490\", \"email\": \"diaaelseady@gmail.com\" },\n        \"status\": \"PENDING\"\n      }\n    ]\n  }\n}"}],"_postman_id":"101ecacc-926b-4d85-a97b-96f69de40ce1"},{"name":"Get My Requests","id":"6727009e-199c-4ca1-9ac2-95b251c29d51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request/my?page=1&limit=10","description":"<p>Retrieve a paginated list of lab requests belonging to the authenticated patient, sorted by creation date (newest first).</p>\n<p><strong>Access:</strong> PATIENT</p>\n","urlObject":{"path":["request","my"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[{"id":"bda7acac-8d5f-4d09-8407-101b2b079486","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/my?page=1&limit=10","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request","my"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}]},"description":"Retrieve a paginated list of lab requests belonging to the authenticated patient, sorted by creation date (newest first).\n\n**Access:** PATIENT"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Lab Requests Fetched Successfully\",\n  \"data\": {\n    \"meta\": { \"currentPage\": 1, \"totalPages\": 2, \"limit\": 10, \"totalDocs\": 12 },\n    \"data\": [...]\n  }\n}"}],"_postman_id":"6727009e-199c-4ca1-9ac2-95b251c29d51"},{"name":"Get Request By ID","id":"77cc443d-c492-4031-b0c8-823694e6edd4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId","description":"<p>Retrieve a single lab request by ID. Patients can only access their own requests. Specialists can access any request.</p>\n<p><strong>Access:</strong> PATIENT (own only), SPECIALIST</p>\n","urlObject":{"path":["request",":requestId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"805a8095-47e3-49cc-accd-0308dfb47ad8","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"}]}},"response":[{"id":"571ee4c7-6a57-4b61-bf17-ba292be76930","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId"],"variable":[{"id":"805a8095-47e3-49cc-accd-0308dfb47ad8","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Retrieve a single lab request by ID. Patients can only access their own requests. Specialists can access any request.\n\n**Access:** PATIENT (own only), SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Lab Request Fetched Successfully\",\n  \"data\": { ... }\n}"}],"_postman_id":"77cc443d-c492-4031-b0c8-823694e6edd4"},{"name":"Update Appointment","id":"36d5d63f-1e0e-4841-be62-ca0facd89c5a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"appointmentDate\": \"2024-06-20\",\n  \"appointmentTime\": \"02:00 PM\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId/appointment","description":"<p>Update the appointment date and/or time for a <code>PENDING</code> request. Both fields are optional (partial update). The request must belong to the authenticated patient.</p>\n<p><strong>Access:</strong> PATIENT</p>\n","urlObject":{"path":["request",":requestId","appointment"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"type":"any","value":"6a932aca5a8e904d7d32015b","key":"requestId"}]}},"response":[{"id":"eafeef67-2659-47f3-9030-9128c4f3b968","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"appointmentDate\": \"2024-06-20\",\n  \"appointmentTime\": \"02:00 PM\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/appointment","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","appointment"],"variable":[{"key":"requestId","value":"6a932aca5a8e904d7d32015b"}]},"description":"Update the appointment date and/or time for a `PENDING` request. Both fields are optional (partial update). The request must belong to the authenticated patient.\n\n**Access:** PATIENT"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Appointment Updated Successfully\",\n  \"data\": { ... }\n}"},{"id":"9e22d988-c49c-452b-b0e0-c4340aadfaab","name":"400 Not Pending","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"appointmentDate\": \"2024-06-20\",\n  \"appointmentTime\": \"02:00 PM\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/appointment","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","appointment"],"variable":[{"key":"requestId","value":"6a932aca5a8e904d7d32015b"}]},"description":"Update the appointment date and/or time for a `PENDING` request. Both fields are optional (partial update). The request must belong to the authenticated patient.\n\n**Access:** PATIENT"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Appointment Can Only Be Updated While Request Is Pending\",\n  \"status\": 400\n}"}],"_postman_id":"36d5d63f-1e0e-4841-be62-ca0facd89c5a"},{"name":"Cancel Request","id":"661f9b72-bd12-4128-a642-1bf1254ad786","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId/cancel","description":"<p>Cancel a lab request. Only allowed when status is <code>PENDING</code> or <code>ATTENDED</code>. The request must belong to the authenticated patient.</p>\n<p><strong>Access:</strong> PATIENT</p>\n","urlObject":{"path":["request",":requestId","cancel"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"55b0f31b-047f-44ab-bf26-b7d07ecaccb0","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"}]}},"response":[{"id":"fc41be64-439d-49fd-b32c-bcb58ed2e0d9","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/cancel","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","cancel"],"variable":[{"id":"55b0f31b-047f-44ab-bf26-b7d07ecaccb0","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Cancel a lab request. Only allowed when status is `PENDING` or `ATTENDED`. The request must belong to the authenticated patient.\n\n**Access:** PATIENT"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Lab Request Cancelled Successfully\",\n  \"data\": { ... }\n}"},{"id":"9cfa100b-6432-4e46-968e-25c629150af4","name":"400 Cannot Cancel","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/cancel","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","cancel"],"variable":[{"id":"55b0f31b-047f-44ab-bf26-b7d07ecaccb0","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Cancel a lab request. Only allowed when status is `PENDING` or `ATTENDED`. The request must belong to the authenticated patient.\n\n**Access:** PATIENT"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Request Not Found Or Cannot Be Cancelled\",\n  \"status\": 400\n}"}],"_postman_id":"661f9b72-bd12-4128-a642-1bf1254ad786"},{"name":"Attend Request","id":"14b38942-1671-47bc-91bd-43f8afaa4370","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId/attend","description":"<p>Mark a <code>PENDING</code> request as <code>ATTENDED</code> when the patient arrives at the lab.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["request",":requestId","attend"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"553ab7c6-2d79-4af4-b3c0-7af198d052f1","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"}]}},"response":[{"id":"9f3b4058-14bb-4677-b80c-7bda039026a4","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/attend","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","attend"],"variable":[{"id":"553ab7c6-2d79-4af4-b3c0-7af198d052f1","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Mark a `PENDING` request as `ATTENDED` when the patient arrives at the lab.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Request Attended Successfully\",\n  \"data\": { ... }\n}"}],"_postman_id":"14b38942-1671-47bc-91bd-43f8afaa4370"},{"name":"Collect Sample","id":"db89d98a-2bfe-4b82-b230-e4c433a65550","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId/sample","description":"<p>Record sample collection for an <code>ATTENDED</code> request. Automatically detects and records all unique sample types (Blood, Urine) required by the tests, each with a <code>collectedAt</code> timestamp. Status moves to <code>SAMPLE_COLLECTED</code>.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["request",":requestId","sample"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"fa1f8c4a-cf37-40ad-b661-91035605224b","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"}]}},"response":[{"id":"7cd74b08-68cb-46ca-808b-b37b6e365edf","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/sample","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","sample"],"variable":[{"id":"fa1f8c4a-cf37-40ad-b661-91035605224b","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Record sample collection for an `ATTENDED` request. Automatically detects and records all unique sample types (Blood, Urine) required by the tests, each with a `collectedAt` timestamp. Status moves to `SAMPLE_COLLECTED`.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Sample Collected Successfully\",\n  \"data\": {\n    \"status\": \"SAMPLE_COLLECTED\",\n    \"samples\": [\n      { \"sampleType\": \"Blood\", \"collectedAt\": \"2024-06-15T10:35:00.000Z\" }\n    ]\n  }\n}"}],"_postman_id":"db89d98a-2bfe-4b82-b230-e4c433a65550"},{"name":"Start Processing","id":"32dd1886-8d3d-45ac-979a-6858bda5abe2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId/start","description":"<p>Move a <code>SAMPLE_COLLECTED</code> request to <code>IN_PROGRESS</code>, indicating that the lab has started analyzing the samples.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["request",":requestId","start"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"8d142f13-ce2e-4c60-96e1-63901370e229","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"}]}},"response":[{"id":"7db12bc9-89da-4e8d-931a-3eed52f55679","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/start","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","start"],"variable":[{"id":"8d142f13-ce2e-4c60-96e1-63901370e229","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Move a `SAMPLE_COLLECTED` request to `IN_PROGRESS`, indicating that the lab has started analyzing the samples.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Request Processing Started Successfully\",\n  \"data\": { ... }\n}"}],"_postman_id":"32dd1886-8d3d-45ac-979a-6858bda5abe2"},{"name":"Update Test Status","id":"36b11074-fe17-445b-a385-2f063734c6d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"status\": \"IN_PROGRESS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId/tests/:testId/status","description":"<p>Update the status of a specific test within an <code>IN_PROGRESS</code> request. Follows a strict one-way flow:</p>\n<ul>\n<li><code>PENDING → IN_PROGRESS</code></li>\n<li><code>IN_PROGRESS → COMPLETED</code></li>\n</ul>\n<p>Completed tests cannot be reverted.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["request",":requestId","tests",":testId","status"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"e4f0357c-0bbc-47ff-8d13-ffb56256d90e","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"},{"id":"234f2cae-9791-43cc-9cf4-b722a82b958d","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"testId"}]}},"response":[{"id":"001ae248-8d12-4c4a-a1d4-581c945b0ff2","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"status\": \"IN_PROGRESS\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/tests/:testId/status","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","tests",":testId","status"],"variable":[{"id":"e4f0357c-0bbc-47ff-8d13-ffb56256d90e","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"id":"234f2cae-9791-43cc-9cf4-b722a82b958d","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Update the status of a specific test within an `IN_PROGRESS` request. Follows a strict one-way flow:\n- `PENDING → IN_PROGRESS`\n- `IN_PROGRESS → COMPLETED`\n\nCompleted tests cannot be reverted.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Status Updated Successfully\",\n  \"data\": { ... }\n}"},{"id":"07cc6ebd-552d-47ab-ad52-d47d66e28dce","name":"400 Invalid Transition","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"status\": \"IN_PROGRESS\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/tests/:testId/status","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","tests",":testId","status"],"variable":[{"id":"e4f0357c-0bbc-47ff-8d13-ffb56256d90e","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"id":"234f2cae-9791-43cc-9cf4-b722a82b958d","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Update the status of a specific test within an `IN_PROGRESS` request. Follows a strict one-way flow:\n- `PENDING → IN_PROGRESS`\n- `IN_PROGRESS → COMPLETED`\n\nCompleted tests cannot be reverted.\n\n**Access:** SPECIALIST"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Can Only Move From Pending To In Progress\",\n  \"status\": 400\n}"}],"_postman_id":"36b11074-fe17-445b-a385-2f063734c6d6"},{"name":"Complete Request","id":"e6aabefc-64b2-46c5-86fb-3c07e7dd03c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/request/:requestId/complete","description":"<p>Mark an <code>IN_PROGRESS</code> request as <code>COMPLETED</code>. All tests must be <code>COMPLETED</code> and all result documents must be created before this is allowed.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["request",":requestId","complete"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"47a08661-84c4-46b3-85d5-4a9c9d330d19","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"}]}},"response":[{"id":"8dc2f018-4cf7-449f-83ea-c2c5ee2bf429","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/complete","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","complete"],"variable":[{"id":"47a08661-84c4-46b3-85d5-4a9c9d330d19","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Mark an `IN_PROGRESS` request as `COMPLETED`. All tests must be `COMPLETED` and all result documents must be created before this is allowed.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Lab Request Completed Successfully\",\n  \"data\": { ... }\n}"},{"id":"31687f00-e897-4a67-ba89-7cf880b0b597","name":"400 Tests Not Completed","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/complete","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","complete"],"variable":[{"id":"47a08661-84c4-46b3-85d5-4a9c9d330d19","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Mark an `IN_PROGRESS` request as `COMPLETED`. All tests must be `COMPLETED` and all result documents must be created before this is allowed.\n\n**Access:** SPECIALIST"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"All Tests Must Be Completed Before Completing The Request\",\n  \"status\": 400\n}"},{"id":"ef3f939f-689d-43ab-9235-a18f0815a2b0","name":"400 Results Missing","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/request/:requestId/complete","host":["https://sh-medecial-lab-api.vercel.app"],"path":["request",":requestId","complete"],"variable":[{"id":"47a08661-84c4-46b3-85d5-4a9c9d330d19","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"}]},"description":"Mark an `IN_PROGRESS` request as `COMPLETED`. All tests must be `COMPLETED` and all result documents must be created before this is allowed.\n\n**Access:** SPECIALIST"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"All Test Results Must Be Created Before Completing The Request\",\n  \"status\": 400\n}"}],"_postman_id":"e6aabefc-64b2-46c5-86fb-3c07e7dd03c6"}],"id":"6cad105e-551c-453b-80a7-6f6641e15bf7","description":"<p>Manage the full lifecycle of a lab request: creation → attend → sample collection → processing → test status updates → completion.</p>\n<p><strong>Status flow:</strong> <code>PENDING → ATTENDED → SAMPLE_COLLECTED → IN_PROGRESS → COMPLETED</code></p>\n<p>Cancellation is only available to patients while status is <code>PENDING</code> or <code>ATTENDED</code>.</p>\n","_postman_id":"6cad105e-551c-453b-80a7-6f6641e15bf7"},{"name":"Results","item":[{"name":"Create Result","id":"ffcac7ba-db31-45a1-ae47-b9a36fa05329","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"parameters\": [\n    {\n      \"parameter\": \"Hemoglobin\",\n      \"value\": 14.5\n    },\n    {\n      \"parameter\": \"Blood Type\",\n      \"value\": \"A+\"\n    },\n    {\n      \"parameter\": \"Notes\",\n      \"value\": \"Sample quality was excellent.\"\n    },\n    {\n      \"parameter\": \"Malaria\",\n      \"value\": \"Negative\"\n    }\n  ],\n  \"note\": \"Patient fasted for 8 hours prior to sample collection.\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId/tests/:testId","description":"<p>Create a result for a specific test within an <code>IN_PROGRESS</code> request. The test must be in <code>COMPLETED</code> status. Parameter names must exactly match those defined in the test. Values are automatically evaluated against the test's evaluation logic to determine <code>NORMAL</code>, <code>HIGH</code>, or <code>LOW</code> status.</p>\n<p>Only one result is allowed per test per request.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["result","requests",":requestId","tests",":testId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"ca25fe65-68c2-4ff1-9933-85e72f53fc2e","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"},{"id":"3602d72a-ace7-483c-8bd4-78e3df5cf307","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"testId"}]}},"response":[{"id":"7b301a38-e4df-4310-b8ab-7904168d31b2","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"parameters\": [\n    {\n      \"parameter\": \"Hemoglobin\",\n      \"value\": 14.5\n    },\n    {\n      \"parameter\": \"Blood Type\",\n      \"value\": \"A+\"\n    },\n    {\n      \"parameter\": \"Notes\",\n      \"value\": \"Sample quality was excellent.\"\n    },\n    {\n      \"parameter\": \"Malaria\",\n      \"value\": \"Negative\"\n    }\n  ],\n  \"note\": \"Patient fasted for 8 hours prior to sample collection.\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId/tests/:testId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result","requests",":requestId","tests",":testId"],"variable":[{"id":"ca25fe65-68c2-4ff1-9933-85e72f53fc2e","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"id":"3602d72a-ace7-483c-8bd4-78e3df5cf307","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Create a result for a specific test within an `IN_PROGRESS` request. The test must be in `COMPLETED` status. Parameter names must exactly match those defined in the test. Values are automatically evaluated against the test's evaluation logic to determine `NORMAL`, `HIGH`, or `LOW` status.\n\nOnly one result is allowed per test per request.\n\n**Access:** SPECIALIST"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Result Created Successfully\",\n  \"data\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d5\",\n    \"request\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n    \"test\": \"64f1a2b3c4d5e6f7a8b9c0d2\",\n    \"testName\": \"تحليل الدم الكامل\",\n    \"parameters\": [\n      {\n        \"parameter\": \"Hemoglobin\",\n        \"value\": 14.5,\n        \"unit\": \"g/dL\",\n        \"normalRange\": \"13.5 - 17.5\",\n        \"status\": \"NORMAL\"\n      },\n      {\n        \"parameter\": \"Blood Type\",\n        \"value\": \"A+\",\n        \"normalRange\": \"A+ / A- / B+ / B- / AB+ / AB- / O+ / O-\",\n        \"status\": \"NORMAL\"\n      }\n    ],\n    \"note\": \"Patient fasted for 8 hours prior to sample collection.\",\n    \"isLocked\": false\n  }\n}"},{"id":"2ba49749-7a48-4a57-9966-c8eaf07c6580","name":"409 Result Already Exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"parameters\": [\n    {\n      \"parameter\": \"Hemoglobin\",\n      \"value\": 14.5\n    },\n    {\n      \"parameter\": \"Blood Type\",\n      \"value\": \"A+\"\n    },\n    {\n      \"parameter\": \"Notes\",\n      \"value\": \"Sample quality was excellent.\"\n    },\n    {\n      \"parameter\": \"Malaria\",\n      \"value\": \"Negative\"\n    }\n  ],\n  \"note\": \"Patient fasted for 8 hours prior to sample collection.\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId/tests/:testId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result","requests",":requestId","tests",":testId"],"variable":[{"id":"ca25fe65-68c2-4ff1-9933-85e72f53fc2e","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"id":"3602d72a-ace7-483c-8bd4-78e3df5cf307","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Create a result for a specific test within an `IN_PROGRESS` request. The test must be in `COMPLETED` status. Parameter names must exactly match those defined in the test. Values are automatically evaluated against the test's evaluation logic to determine `NORMAL`, `HIGH`, or `LOW` status.\n\nOnly one result is allowed per test per request.\n\n**Access:** SPECIALIST"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Result Already Exists For This Test\",\n  \"status\": 409\n}"},{"id":"33f38c1f-d639-4b0f-bc0d-48eba67dc81f","name":"400 Test Not Completed","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"parameters\": [\n    {\n      \"parameter\": \"Hemoglobin\",\n      \"value\": 14.5\n    },\n    {\n      \"parameter\": \"Blood Type\",\n      \"value\": \"A+\"\n    },\n    {\n      \"parameter\": \"Notes\",\n      \"value\": \"Sample quality was excellent.\"\n    },\n    {\n      \"parameter\": \"Malaria\",\n      \"value\": \"Negative\"\n    }\n  ],\n  \"note\": \"Patient fasted for 8 hours prior to sample collection.\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId/tests/:testId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result","requests",":requestId","tests",":testId"],"variable":[{"id":"ca25fe65-68c2-4ff1-9933-85e72f53fc2e","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"id":"3602d72a-ace7-483c-8bd4-78e3df5cf307","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Create a result for a specific test within an `IN_PROGRESS` request. The test must be in `COMPLETED` status. Parameter names must exactly match those defined in the test. Values are automatically evaluated against the test's evaluation logic to determine `NORMAL`, `HIGH`, or `LOW` status.\n\nOnly one result is allowed per test per request.\n\n**Access:** SPECIALIST"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Test Must Be Completed Before Creating Result\",\n  \"status\": 400\n}"}],"_postman_id":"ffcac7ba-db31-45a1-ae47-b9a36fa05329"},{"name":"Get All Results","id":"47906ff5-cf3f-4e99-a41d-4dd7662fc5d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/result?page=1&limit=10&requestId=64f1a2b3c4d5e6f7a8b9c0d4&testId=64f1a2b3c4d5e6f7a8b9c0d2","description":"<p>Retrieve a paginated list of all results. Populates request number, patient info, and the creator's name.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["result"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"},{"description":{"content":"<p>Filter by request ID</p>\n","type":"text/plain"},"key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"description":{"content":"<p>Filter by test ID</p>\n","type":"text/plain"},"key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}],"variable":[]}},"response":[{"id":"6c8e2008-5b20-4520-b99c-521c01d07e7a","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result?page=1&limit=10&requestId=64f1a2b3c4d5e6f7a8b9c0d4&testId=64f1a2b3c4d5e6f7a8b9c0d2","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"},{"key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4","description":"Filter by request ID"},{"key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Filter by test ID"}]},"description":"Retrieve a paginated list of all results. Populates request number, patient info, and the creator's name.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Results Fetched Successfully\",\n  \"data\": {\n    \"meta\": { \"currentPage\": 1, \"totalPages\": 3, \"limit\": 10, \"totalDocs\": 28 },\n    \"data\": [...]\n  }\n}"}],"_postman_id":"47906ff5-cf3f-4e99-a41d-4dd7662fc5d7"},{"name":"Get Results By Request","id":"91ef86fa-b314-4423-a630-d5513c7596eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId","description":"<p>Retrieve all results for a specific lab request. Patients can only access results linked to their own requests.</p>\n<p><strong>Access:</strong> PATIENT (own only), SPECIALIST</p>\n","urlObject":{"path":["result","requests",":requestId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"type":"any","value":"6a932aca5a8e904d7d32015b","key":"requestId"}]}},"response":[{"id":"39952302-3391-4d2e-aa3d-d031ffe4e1e9","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result","requests",":requestId"],"variable":[{"key":"requestId","value":"6a932aca5a8e904d7d32015b"}]},"description":"Retrieve all results for a specific lab request. Patients can only access results linked to their own requests.\n\n**Access:** PATIENT (own only), SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Results Fetched Successfully\",\n  \"data\": [...]\n}"}],"_postman_id":"91ef86fa-b314-4423-a630-d5513c7596eb"},{"name":"Get Result By ID","id":"a0f40997-21db-4faa-a5d8-d0712f125b22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/result/:resultId","description":"<p>Retrieve a single result by ID with full patient and creator details populated. Patients can only access their own results.</p>\n<p><strong>Access:</strong> PATIENT (own only), SPECIALIST</p>\n","urlObject":{"path":["result",":resultId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"f4ba612b-98cc-4401-929e-74c3c100b863","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d5","key":"resultId"}]}},"response":[{"id":"f13c938b-0eeb-45cf-ba37-4a18d1538d70","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/:resultId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result",":resultId"],"variable":[{"id":"f4ba612b-98cc-4401-929e-74c3c100b863","key":"resultId","value":"64f1a2b3c4d5e6f7a8b9c0d5"}]},"description":"Retrieve a single result by ID with full patient and creator details populated. Patients can only access their own results.\n\n**Access:** PATIENT (own only), SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Result Fetched Successfully\",\n  \"data\": { ... }\n}"}],"_postman_id":"a0f40997-21db-4faa-a5d8-d0712f125b22"},{"name":"Update Result","id":"5cdd12ae-db38-4aa5-ac3b-3b407467c319","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"parameters\": [\n    {\n      \"parameter\": \"Hemoglobin\",\n      \"value\": 12.0\n    }\n  ],\n  \"note\": \"Re-analyzed after equipment calibration.\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sh-medecial-lab-api.vercel.app/result/:resultId","description":"<p>Update the parameter values and/or note of an unlocked result. Parameter statuses are recalculated automatically on update. Both <code>parameters</code> and <code>note</code> are optional.</p>\n<p>Locked results cannot be updated.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["result",":resultId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"8606a222-f4db-4aa3-a9cc-30097451a4bc","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d5","key":"resultId"}]}},"response":[{"id":"cff80281-ce05-450c-8775-3980164eacfa","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"parameters\": [\n    {\n      \"parameter\": \"Hemoglobin\",\n      \"value\": 12.0\n    }\n  ],\n  \"note\": \"Re-analyzed after equipment calibration.\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/:resultId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result",":resultId"],"variable":[{"id":"8606a222-f4db-4aa3-a9cc-30097451a4bc","key":"resultId","value":"64f1a2b3c4d5e6f7a8b9c0d5"}]},"description":"Update the parameter values and/or note of an unlocked result. Parameter statuses are recalculated automatically on update. Both `parameters` and `note` are optional.\n\nLocked results cannot be updated.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Result Updated Successfully\",\n  \"data\": { ... }\n}"},{"id":"b191c896-1635-43ca-bf4c-d43574639d1a","name":"403 Result Locked","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"token","value":""}],"body":{"mode":"raw","raw":"{\n  \"parameters\": [\n    {\n      \"parameter\": \"Hemoglobin\",\n      \"value\": 12.0\n    }\n  ],\n  \"note\": \"Re-analyzed after equipment calibration.\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/:resultId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result",":resultId"],"variable":[{"id":"8606a222-f4db-4aa3-a9cc-30097451a4bc","key":"resultId","value":"64f1a2b3c4d5e6f7a8b9c0d5"}]},"description":"Update the parameter values and/or note of an unlocked result. Parameter statuses are recalculated automatically on update. Both `parameters` and `note` are optional.\n\nLocked results cannot be updated.\n\n**Access:** SPECIALIST"},"status":"Forbidden","code":403,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Cannot update a locked result\",\n  \"status\": 403\n}"}],"_postman_id":"5cdd12ae-db38-4aa5-ac3b-3b407467c319"},{"name":"Lock Result","id":"90cfa858-6da8-44b9-9c54-90f12bda194f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/result/:resultId/lock","description":"<p>Lock a result to prevent further edits or deletion. Locking is irreversible. A result must be locked before its PDF can be generated.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["result",":resultId","lock"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"18aad8ae-5634-4ad9-9603-8893a1069489","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d5","key":"resultId"}]}},"response":[{"id":"0c2fb94f-655f-4140-9b72-0e78634ecf98","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/:resultId/lock","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result",":resultId","lock"],"variable":[{"id":"18aad8ae-5634-4ad9-9603-8893a1069489","key":"resultId","value":"64f1a2b3c4d5e6f7a8b9c0d5"}]},"description":"Lock a result to prevent further edits or deletion. Locking is irreversible. A result must be locked before its PDF can be generated.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Result Locked Successfully\",\n  \"data\": { ... }\n}"},{"id":"ac813f62-b677-483a-b1b7-a5285d80ae8f","name":"400 Already Locked","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/:resultId/lock","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result",":resultId","lock"],"variable":[{"id":"18aad8ae-5634-4ad9-9603-8893a1069489","key":"resultId","value":"64f1a2b3c4d5e6f7a8b9c0d5"}]},"description":"Lock a result to prevent further edits or deletion. Locking is irreversible. A result must be locked before its PDF can be generated.\n\n**Access:** SPECIALIST"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Result is already locked\",\n  \"status\": 400\n}"}],"_postman_id":"90cfa858-6da8-44b9-9c54-90f12bda194f"},{"name":"Delete Result","id":"2d94484f-ebd9-47b9-827b-2b688e52aed2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/result/:resultId","description":"<p>Soft-delete a result by marking it as <code>isDeleted: true</code>. Locked results cannot be deleted.</p>\n<p><strong>Access:</strong> SPECIALIST</p>\n","urlObject":{"path":["result",":resultId"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"ccfa148a-e4e4-48b5-9aa1-d2d857c80a76","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d5","key":"resultId"}]}},"response":[{"id":"1ea6f7ab-618d-4bbd-a0de-91d5ec7f5bc7","name":"200 OK","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/:resultId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result",":resultId"],"variable":[{"id":"ccfa148a-e4e4-48b5-9aa1-d2d857c80a76","key":"resultId","value":"64f1a2b3c4d5e6f7a8b9c0d5"}]},"description":"Soft-delete a result by marking it as `isDeleted: true`. Locked results cannot be deleted.\n\n**Access:** SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Result Deleted Successfully\",\n  \"data\": { ... }\n}"},{"id":"9a5fb1e9-6252-43e5-9268-615eb48ddf39","name":"403 Result Locked","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/:resultId","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result",":resultId"],"variable":[{"id":"ccfa148a-e4e4-48b5-9aa1-d2d857c80a76","key":"resultId","value":"64f1a2b3c4d5e6f7a8b9c0d5"}]},"description":"Soft-delete a result by marking it as `isDeleted: true`. Locked results cannot be deleted.\n\n**Access:** SPECIALIST"},"status":"Forbidden","code":403,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Cannot delete a locked result\",\n  \"status\": 403\n}"}],"_postman_id":"2d94484f-ebd9-47b9-827b-2b688e52aed2"},{"name":"Download Result PDF","id":"949d437e-95b8-4535-9f87-ede05030da90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId/tests/:testId/pdf","description":"<p>Download a lab result as a professionally formatted A4 PDF report. The result must be locked before generating the PDF. The response streams the PDF file directly with <code>Content-Disposition: attachment</code>.</p>\n<p>Patients can only download their own results.</p>\n<p><strong>Access:</strong> PATIENT (own only), SPECIALIST</p>\n","urlObject":{"path":["result","requests",":requestId","tests",":testId","pdf"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"b522c70f-bf32-48af-a753-1a33ab83628e","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d4","key":"requestId"},{"id":"9fc71553-7ea5-4ee9-85a9-e03b6f35075b","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"testId"}]}},"response":[{"id":"eaefdb21-40c9-4941-9f13-2b16390f0c56","name":"200 PDF Stream","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId/tests/:testId/pdf","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result","requests",":requestId","tests",":testId","pdf"],"variable":[{"id":"b522c70f-bf32-48af-a753-1a33ab83628e","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"id":"9fc71553-7ea5-4ee9-85a9-e03b6f35075b","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Download a lab result as a professionally formatted A4 PDF report. The result must be locked before generating the PDF. The response streams the PDF file directly with `Content-Disposition: attachment`.\n\nPatients can only download their own results.\n\n**Access:** PATIENT (own only), SPECIALIST"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/pdf"},{"key":"Content-Disposition","value":"attachment; filename=\"SHL-64f1a2b3c4d5e6f7a8b9c0d5.pdf\""}],"cookie":[],"responseTime":null,"body":"(Binary PDF stream)"},{"id":"b943cbf2-af06-41c1-9640-c25c5a56f3c5","name":"400 Result Not Locked","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/result/requests/:requestId/tests/:testId/pdf","host":["https://sh-medecial-lab-api.vercel.app"],"path":["result","requests",":requestId","tests",":testId","pdf"],"variable":[{"id":"b522c70f-bf32-48af-a753-1a33ab83628e","key":"requestId","value":"64f1a2b3c4d5e6f7a8b9c0d4"},{"id":"9fc71553-7ea5-4ee9-85a9-e03b6f35075b","key":"testId","value":"64f1a2b3c4d5e6f7a8b9c0d2"}]},"description":"Download a lab result as a professionally formatted A4 PDF report. The result must be locked before generating the PDF. The response streams the PDF file directly with `Content-Disposition: attachment`.\n\nPatients can only download their own results.\n\n**Access:** PATIENT (own only), SPECIALIST"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Result Must Be Locked Before Generating PDF\",\n  \"status\": 400\n}"}],"_postman_id":"949d437e-95b8-4535-9f87-ede05030da90"}],"id":"1837d711-92f2-4977-9347-b7761c061629","description":"<p>Manage test results for lab requests. Results can be created once per test per request, edited while unlocked, then locked to prevent changes. Locked results can be exported as PDF.</p>\n<p>When a result is created, the patient receives a push notification. When all results for a request are created, an additional \"all results ready\" notification is sent.</p>\n","_postman_id":"1837d711-92f2-4977-9347-b7761c061629"},{"name":"Notifications","item":[{"name":"Get My Notifications","id":"c9976057-14c4-4a16-a13e-3a4b3c0097f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/notifications?page=1&limit=10","description":"<p>Retrieve a paginated list of notifications for the authenticated patient, sorted by creation date (newest first).</p>\n<p><strong>Access:</strong> PATIENT</p>\n","urlObject":{"path":["notifications"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[{"id":"e38b4831-4a3f-4909-b574-8a791d27c746","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/notifications?page=1&limit=10","host":["https://sh-medecial-lab-api.vercel.app"],"path":["notifications"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}]},"description":"Retrieve a paginated list of notifications for the authenticated patient, sorted by creation date (newest first).\n\n**Access:** PATIENT"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Notifications Fetched Successfully\",\n  \"data\": {\n    \"meta\": { \"currentPage\": 1, \"totalPages\": 1, \"limit\": 10, \"totalDocs\": 3 },\n    \"data\": [\n      {\n        \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n        \"user\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n        \"type\": \"TEST_RESULT\",\n        \"title\": \"نتيجة تحليل جديدة\",\n        \"message\": \"تم ظهور نتيجة تحليل (تحليل الدم الكامل) الخاصة بك.\",\n        \"isRead\": false,\n        \"createdAt\": \"2024-06-15T11:00:00.000Z\"\n      }\n    ]\n  }\n}"}],"_postman_id":"c9976057-14c4-4a16-a13e-3a4b3c0097f5"},{"name":"Mark Notification As Read","id":"a5aa1515-c2bb-422a-9d39-00d93f24f25e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/notifications/:notificationId/read","description":"<p>Mark a single notification as read. The notification must belong to the authenticated patient.</p>\n<p><strong>Access:</strong> PATIENT</p>\n","urlObject":{"path":["notifications",":notificationId","read"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[{"id":"5ed5cb9f-bad5-4a6a-8b75-241b405658f1","type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d6","key":"notificationId"}]}},"response":[{"id":"4bc06ded-dcaf-4117-9ce1-300a098aac6a","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/notifications/:notificationId/read","host":["https://sh-medecial-lab-api.vercel.app"],"path":["notifications",":notificationId","read"],"variable":[{"id":"5ed5cb9f-bad5-4a6a-8b75-241b405658f1","key":"notificationId","value":"64f1a2b3c4d5e6f7a8b9c0d6"}]},"description":"Mark a single notification as read. The notification must belong to the authenticated patient.\n\n**Access:** PATIENT"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Notification Marked As Read\",\n  \"data\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n    \"isRead\": true\n  }\n}"},{"id":"864b8803-b51f-4764-9f54-69f74e2275d5","name":"404 Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":{"raw":"https://sh-medecial-lab-api.vercel.app/notifications/:notificationId/read","host":["https://sh-medecial-lab-api.vercel.app"],"path":["notifications",":notificationId","read"],"variable":[{"id":"5ed5cb9f-bad5-4a6a-8b75-241b405658f1","key":"notificationId","value":"64f1a2b3c4d5e6f7a8b9c0d6"}]},"description":"Mark a single notification as read. The notification must belong to the authenticated patient.\n\n**Access:** PATIENT"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Notification Not Found\",\n  \"status\": 404\n}"}],"_postman_id":"a5aa1515-c2bb-422a-9d39-00d93f24f25e"},{"name":"Mark All Notifications As Read","id":"bffafd4f-0560-46bf-be60-f8a93671a6ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/notifications/read-all","description":"<p>Mark all unread notifications for the authenticated patient as read in a single operation.</p>\n<p><strong>Access:</strong> PATIENT</p>\n","urlObject":{"path":["notifications","read-all"],"host":["https://sh-medecial-lab-api.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"3d7f2bdd-9f4c-4992-ace0-2871ac99f827","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""}],"url":"https://sh-medecial-lab-api.vercel.app/notifications/read-all","description":"Mark all unread notifications for the authenticated patient as read in a single operation.\n\n**Access:** PATIENT"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"All Notifications Marked As Read\",\n  \"data\": null\n}"}],"_postman_id":"bffafd4f-0560-46bf-be60-f8a93671a6ff"}],"id":"2387707e-d175-4eca-aeb1-9113dea94366","description":"<p>Patient notification management. Notifications are created automatically when test results are added. Push notifications are sent via Firebase Cloud Messaging (FCM) to all registered device tokens.</p>\n","_postman_id":"2387707e-d175-4eca-aeb1-9113dea94366"}],"variable":[{"key":"baseUrl","value":"https://sh-medecial-lab-api.vercel.app"},{"key":"token","value":"","description":"JWT access token — obtained from Login or Refresh Token"},{"key":"refreshToken","value":"","description":"JWT refresh token — obtained from Login"},{"key":"supabase_service_role_api_key_0hsq","secret":true}]}