### Register new user, patient, and doctor tests # Base URL for the API @baseUrl = http://localhost:5555 ### Register an admin user POST {{baseUrl}}/auth/register Content-Type: application/json { "email": "admin@example.com", "password": "password123", "name": "Admin User", "role": "admin" } ### Register a new patient with multiple studies POST {{baseUrl}}/auth/register Content-Type: application/json { "email": "patient1@example.com", "password": "password123", "name": "DIDIT SUYATNA^R.10049.18", "role": "patient", "patient": { "patient_id": "00211622", "patient_name": "DIDIT SUYATNA^R.10049.18", "date_of_birth": "1980-01-01" }, "studies": [ { "study_instance_uid": "1.2.826.0.1.3680043.9.7307.1.20180530066", "accession_number": "CR.180530.066", "study_date": "2018-05-30", "study_description": "Chest X-Ray" } ] } ### POST {{baseUrl}}/auth/register Content-Type: application/json { "email": "patient1@example.com", "password": "password123", "name": "DIDIT SUYATNA^R.10049.18", "role": "patient", "patient": { "patient_id": "00211622", "patient_name": "DIDIT SUYATNA^R.10049.18", "date_of_birth": "1980-01-01" }, "studies": [ { "study_instance_uid": "1.2.826.0.1.3680043.9.7307.1.20180713036", "accession_number": "CR.180713.036", "study_date": "2018-07-13", "study_description": "Follow-up X-Ray" } ] } ### Register another patient with one study POST {{baseUrl}}/auth/register Content-Type: application/json { "email": "patient2@example.com", "password": "password123", "name": "Bobon Santoso", "role": "patient", "patient": { "patient_id": "MR00000359", "patient_name": "Bobon Santoso", "date_of_birth": "1985-01-01" }, "studies": [ { "study_instance_uid": "1.2.826.0.1.3680043.9.7307.1.202503196393.01", "accession_number": "CR.250319.6393.01", "study_date": "2025-03-19", "study_description": "MRI Scan" } ] } ### Register another referring doctor POST {{baseUrl}}/auth/register Content-Type: application/json { "email": "doctor@example.com", "password": "password123", "name": "DR. HERWINDO RIDWAN, SP.OT", "role": "ref_doctor", "doctor": { "doctor_id": "DOC002", "doctor_name": "DR. HERWINDO RIDWAN, SP.OT" } } ### Register another referring doctor POST {{baseUrl}}/auth/register Content-Type: application/json { "email": "doctor2@example.com", "password": "password123", "name": "Referring^Physician", "role": "ref_doctor", "doctor": { "doctor_id": "DOC003", "doctor_name": "Referring^Physician" } } ### Register a new expertise doctor POST {{baseUrl}}/auth/register Content-Type: application/json { "email": "expert@example.com", "password": "password123", "name": "Dr. Expertise", "role": "expertise_doctor", "doctor": { "doctor_id": "EX456", "doctor_name": "Dr. Expertise" } } ### Login with registered user POST {{baseUrl}}/auth/login Content-Type: application/json { "email": "patient1@example.com", "password": "password123" } ### Login with admin user POST {{baseUrl}}/auth/login Content-Type: application/json { "email": "admin@example.com", "password": "password123" } ### Login with patient user POST {{baseUrl}}/auth/login Content-Type: application/json { "email": "patient2@example.com", "password": "password123" } ### Login with doctor user POST {{baseUrl}}/auth/login Content-Type: application/json { "email": "doctor@example.com", "password": "password123" } @refresh_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiNCIsImVtYWlsIjoiZG9jdG9yQGV4YW1wbGUuY29tIiwicm9sZSI6InJlZl9kb2N0b3IiLCJ1c2VyX25hbWUiOiJEUi4gSEVSV0lORE8gUklEV0FOLCBTUC5PVCIsInRva2VuX3R5cGUiOiJyZWZyZXNoIiwiaG9tZV91cmwiOiIvIiwic3R1ZHlfbGlzdCI6ImVuYWJsZWQiLCJmaWx0ZXJfdXJsIjoic3R1ZGllcz9saW1pdD0xMDFcdTAwMjZvZmZzZXQ9MFx1MDAyNmZ1enp5bWF0Y2hpbmc9ZmFsc2VcdTAwMjZpbmNsdWRlZmllbGQ9MDAwODEwMzAsMDAwODAwNjAsMDAwODAwOTBcdTAwMjYwMDA4MDA5MD1EUi4rSEVSV0lORE8rUklEV0FOJTJDK1NQLk9UIiwiZXhwIjoxNzQ3OTAxMzI5LCJpYXQiOjE3NDcyOTY1Mjl9.M7khgg8eZHk20qGsdPDmUojdBvItXOE-834R6t_AF9Q" ### Refresh TOken POST {{baseUrl}}/auth/refresh Content-Type: application/json { "refresh_token" : {{refresh_token}} }