Skip to content

Commit 11e414d

Browse files
author
Pooja Adhikari
committed
Pushed new changes
1 parent e5a5b53 commit 11e414d

File tree

1 file changed

+50
-13
lines changed

1 file changed

+50
-13
lines changed

articles/healthcare-apis/dicom/dicom-proxy-url-support.md

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,89 @@ ms.author: buchvarun
1212
# What is URL manipulation
1313
URl manipulation allows customizing the url of the image location that is in response object.
1414

15-
The Dicom service returns the fully qualified url of the imae location in the response object in the dicom tag (UR) for following operations:
15+
The Dicom service returns the fully qualified url of the imae location in the response object in the dicom tag (UR) in following api resonse:
1616
1. Retrieve Instance
1717
2. Retrieve WorkItems
1818
3. Retrieve OperationStatus
1919
4. Resolve QueryTag
2020
5. Resolve QueryTagError
2121

2222
An example of a standard response for a stow operatoin is as below:
23-
![alt text](image.png)
24-
25-
Here, the url in the response contains a dicom tag "UR" with the value represents the location of the image.
2623

2724
`https://localhost:63838/v2/partitions/foo/studies/1.2.826.0.1.3680043.8.498.13230779778012324449356534479549187420/series/1.2.826.0.1.3680043.8.498.77033797676425927098669402985243398207/instances/1.2.826.0.1.3680043.8.498.13273713909719068980354078852867170114`
2825

26+
Here, the url in the response contains a dicom tag "UR" with the value represents the location of the image.
27+
2928
The hostname of this Url represents the dicom service that is being used.
3029

3130
To breakdown the structure of the above urlm it consists of
32-
1. hostname -> https://localhost:63838
33-
2. path -> v2/partitions/foo
34-
3. Dicom web standard path -> studies/1.2.826.0.1.3680043.8.498.13230779778012324449356534479549187420/series/1.2.826.0.1.3680043.8.498.77033797676425927098669402985243398207/instances/1.2.826.0.1.3680043.8.498.13273713909719068980354078852867170114
31+
1. hostname -> `https://localhost:63838`
32+
2. path -> `v2/partitions/foo`
33+
3. Dicom web standard path -> `studies/1.2.826.0.1.3680043.8.498.13230779778012324449356534479549187420/series/1.2.826.0.1.3680043.8.498.77033797676425927098669402985243398207/instances/1.2.826.0.1.3680043.8.498.13273713909719068980354078852867170114`
3534

3635
The feature allows to manipuate the hostname and the path of the response object if needed.
3736

3837
# How it works
3938
This feature will allow modify the path of response url if directed by client based on the request headers they provided.
4039
The modified header will be based on following two headers:
41-
1. x-Forwarded-Host
42-
2. x-Forwarded-Prefix
40+
1. X-Forwarded-Host: This represents the domain name of the original host (the one the client requested before the proxy or load balancer handled the request). Example: `X-Forwarded-Host: www.example.com`
41+
42+
2. X-Forwarded-Prefix: This represents the original URL path or prefix that was part of the client’s request before the proxy forwarded or changed the request.
43+
Example:
44+
`X-Forwarded-Prefix: /prefix`
45+
4346

4447
These headers are a part of [.net core standard forwarded headers](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-8.0#forwarded-headers).
4548

4649
If x-forwarded-host header is present in the request object, it would replace the host name with the value provided.
4750

4851
if x-forwarded-prefix header is present in the request object, it would replace the path with the value provided.
4952

53+
# List of API that can use forwarded headers for url manipulation
54+
55+
### STOW, WADO, worklist, operation status, querytag and querytagerror APIs
56+
57+
Details of a request header for a stow operation with the forwarded headers:
58+
59+
* Path: ../studies/{study}
60+
* Method: POST
61+
* Headers:
62+
* Accept: application/dicom+json
63+
* Content-Type: multipart/related; type="application/dicom"
64+
* Authorization: Bearer {token value}
65+
* X-Forwarded-Host: {Domain name of the original host}
66+
* X-Forwarded-Prefix: {the original url path}
67+
* Body:
68+
* Content-Type: application/dicom for each file uploaded, separated by a boundary value
69+
5070
## Example:
51-
### Response of stow operation of dicom service when the above headers are not provided:
71+
### Value of dicom tag with VR = UR for a stow operation when the above headers are not provided:
5272
`https://localhost:63838/v2/partitions/foo/studies/1.2.826.0.1.3680043.8.498.13230779778012324449356534479549187420/series/1.2.826.0.1.3680043.8.498.77033797676425927098669402985243398207/instances/1.2.826.0.1.3680043.8.498.13273713909719068980354078852867170114`
5373

54-
### Response of stow operation of dicom service when the above headers are provided:
74+
### Value of dicom tag with VR = UR for a stow operation when the above headers are provided:
5575

56-
![alt text](image-1.png)
76+
Sample Request object:
77+
* Path: https://localhost:63838/v2/partitions/foo/studies/studies/{study}
78+
* Method: POST
79+
* Headers:
80+
* Accept: application/dicom+json
81+
* Content-Type: multipart/related; type="application/dicom"
82+
* Authorization: Bearer {token value}
83+
* X-Forwarded-Host: api.powershare.com
84+
* X-Forwarded-Prefix: /newbasePath
85+
* Body:
86+
* Content-Type: application/dicom for each file uploaded, separated by a boundary value
5787

88+
89+
Url of image:
5890
`https://api.powershare.com/newbasePath/studies/1.2.826.0.1.3680043.8.498.13230779778012324449356534479549187420/series/1.2.826.0.1.3680043.8.498.45787841905473114233124723359129632652/instances/1.2.826.0.1.3680043.8.498.12714725698140337137334606354172323212`
5991

92+
6093
# Things to remember
6194
1. Forwarded headers donot have to be used together. If there is a need to just replace hostname and not path, only forwarded host header can be used. Similarly, if there is a need to just replace path, only forwared prefix header can be used.
6295

63-
2. These headers follow the standard .netcore structure.
96+
2. This is only url manipulation. Client is responsible for mapping the headers and path provided in forwarded headers with the actual dicom service hostname and pathbase.
97+
98+
99+
100+
[!INCLUDE [DICOM trademark statement](../includes/healthcare-apis-dicom-trademark.md)]

0 commit comments

Comments
 (0)