Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: SI: Changes: 1. Set API definitions right 2. Grammar mistakes rectify 3. Added TOC 4. Proper Heading Formatting

openspecimen/rest/ng/visits/{visitId}/spr-file/{file}

Use this resource to upload  surgical pathology report (SPR) for visit. Use

Table of Contents

Summary

This page contains documentation for upload surgical pathology report REST API. Use the HTTP POST method to call this API by passing a file as a path variable. The file can be text or PDF format. In Surgical pathology report we upload report, deidentify report (if deidentifier is configured) and save report content in txt format. 

URL : 

Use following url

In case of PDF format

  • The API will extract the text content from the PDF.
  • Subsequently, only a text format of the report is available (i.e. not PDF).
  • If you want to process the PDF to remove unwanted headers, footers, etc, you will need to write a custom plugin.

De-identify: By default, there is no de-identification support. You can develop and plugin custom deidentifier based on local needs.

Request Details

Use the following URL to upload surgical pathology report (SPR)

http[s]:<host>:<port>/openspecimen/rest/ng/visits/{visitId}/spr-file/{file}

Result :

Response will contain

Parameter
Details
idIdentifier of the visit.
fileReport file to upload

Result

The response will contain the file name of the uploaded report. 

Example

...

URL

http://<host>:<port>/openspecimen/rest/ng/visits/1/spr-file/{fileName:spr.pdf}

MethodPOST
Content-Typemultipart/form-data
Requestapplication/jsonfile: spr.pdf

Response

spr.txt

 

Error

...

Cases 

codeCode
Applies to
Status Message
200All resourcesSurgical Pathology Report (SPR) has been uploaded successfully
400All requestsInvalid parameters
401All requestsAuthorization failed, User doesn’t have Authoritydoes not have sufficient rights to perform this operation
404All requestsVisit not found, Visit with given identifier specified in the requested operation does not exist in the system
500All requestsInternal server error, Encountered server error while performing operationsServer Error. Report this error to the system administrator