62 lines
1.6 KiB
HTTP
62 lines
1.6 KiB
HTTP
# pydicom-upload.http
|
|
# This file can be used with REST Client extension in VS Code to test the PYDICOM upload endpoint
|
|
|
|
@baseUrl = http://localhost:5555
|
|
@pydicomApiKey=2f0ff447b2c3aeef2004e83a750ded97e29ba8c0ccc70053d5e26f5d715e42ff
|
|
|
|
### Test the PYDICOM upload endpoint
|
|
POST {{baseUrl}}/uploaded-dicom
|
|
X-PYDICOM-API-KEY: {{pydicomApiKey}}
|
|
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"
|
|
}
|
|
]
|
|
}
|
|
|
|
### Expected Response:
|
|
# {
|
|
# "short_token": "LDYZX",
|
|
# "full_url": "http://localhost:3333/short-auth?short=LDYZX",
|
|
# "expires_at": "2025-05-18T02:04:46Z",
|
|
# "is_existing": true
|
|
# }
|
|
|
|
POST {{baseUrl}}/uploaded_dicom
|
|
X-PYDICOM-API-KEY: {{pydicomApiKey}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"email": "randomuser@example.com",
|
|
"password": "securepassword456",
|
|
"name": "John Doe",
|
|
"role": "patient",
|
|
"patient": {
|
|
"patient_id": "MR00000789",
|
|
"patient_name": "John Doe",
|
|
"date_of_birth": "1990-07-15"
|
|
},
|
|
"studies": [
|
|
{
|
|
"study_instance_uid": "1.2.826.0.1.3680043.9.1234.1.202507151234.01",
|
|
"accession_number": "CR.150720.1234.01",
|
|
"study_date": "2025-07-15",
|
|
"study_description": "CT Scan"
|
|
}
|
|
]
|
|
} |