|
| 1 | +--- |
| 2 | +title: Support for url manipulation for the DICOM service in Azure Health Data Services |
| 3 | +description: Learn how to customize or manipulate the url of the image location that is in response object. |
| 4 | +author: varunbms |
| 5 | +ms.service: azure-health-data-services |
| 6 | +ms.subservice: fhir |
| 7 | +ms.topic: overview |
| 8 | +ms.date: 03/26/2024 |
| 9 | +ms.author: buchvarun |
| 10 | +--- |
| 11 | + |
| 12 | +# What is URL manipulation |
| 13 | +URl manipulation allows customizing the url of the image location that is in response object. |
| 14 | + |
| 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: |
| 16 | +1. Retrieve Instance |
| 17 | +2. Retrieve WorkItems |
| 18 | +3. Retrieve OperationStatus |
| 19 | +4. Resolve QueryTag |
| 20 | +5. Resolve QueryTagError |
| 21 | + |
| 22 | +An example of a standard response for a stow operatoin is as below: |
| 23 | + |
| 24 | + |
| 25 | +Here, the url in the response contains a dicom tag "UR" with the value represents the location of the image. |
| 26 | + |
| 27 | +`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` |
| 28 | + |
| 29 | + The hostname of this Url represents the dicom service that is being used. |
| 30 | + |
| 31 | + 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 |
| 35 | + |
| 36 | + The feature allows to manipuate the hostname and the path of the response object if needed. |
| 37 | + |
| 38 | + # How it works |
| 39 | + This feature will allow modify the path of response url if directed by client based on the request headers they provided. |
| 40 | +The modified header will be based on following two headers: |
| 41 | +1. x-Forwarded-Host |
| 42 | +2. x-Forwarded-Prefix |
| 43 | + |
| 44 | +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). |
| 45 | + |
| 46 | +If x-forwarded-host header is present in the request object, it would replace the host name with the value provided. |
| 47 | + |
| 48 | +if x-forwarded-prefix header is present in the request object, it would replace the path with the value provided. |
| 49 | + |
| 50 | +## Example: |
| 51 | +### Response of stow operation of dicom service when the above headers are not provided: |
| 52 | +`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` |
| 53 | + |
| 54 | +### Response of stow operation of dicom service when the above headers are provided: |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + `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` |
| 59 | + |
| 60 | + # Things to remember |
| 61 | + 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. |
| 62 | + |
| 63 | + 2. These headers follow the standard .netcore structure. |
0 commit comments