Sending Data/Documents Back to SmartAdvocate

Sending documents (records) to SmartAdvocate (POST request from Retrieval service)

Documents that a client needs to receive as a result of an order should be send in POST request to endpoint.

This is an example URL: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/Documents
Note that it will be generally different for different clients (SaaS clients can share the same URL).

If you are using Push API, documents that a client needs to receive as a result of an order should be send to the URL which been in the field CallbackURL.

JSON structure:

{ "RecordID": "473", "SACaseNumber": "Y6009938", "Comments": "", "Documents": [ { "ICDCodes": [ { "PageNumber": "3", "Confidence": "97.94", "ICDCode": "V7643", "ICDCodeFormatted": "V76.43", "Format": "ICD9", "Description": "Screening for malignant neoplasms of skin", "Type": "diagnosis" }, { "PageNumber": "3", "Confidence": "99.58", "ICDCode": "70219", "ICDCodeFormatted": "702.19", "Format": "ICD9", "Description": "Other seborrheic keratosis", "Type": "diagnosis" } ], "DocumentType": "Medical Document", "DocumentName": "Dermatology Associates of Virginia - Reynolds Crossing MED Davis.pdf", "SADocumentSubcategoryTypeID": 20, "Document": "JVBERi0xLjYNJeLjz9MNCjk...", "Comments": "", "Description": "Dermatology Associates of Virginia - records" } ] }



Fields description:

RecordID – Record retrieval order id
SACaseNumber – SmartAdvocate case number
Comments – Comments added to an order
Documents (list of documents):

ICDCodes – if you do not support ICD codes recognition then you don't need to include this part into Json request.

PageNumber – page where ICD code identified
Confidence – Confidence percentage
ICDCode – ICD code
ICDCodeFormatted – formatted ICD code
Format – format of ICD code
Description – description of ICD Code
Type – type of ICD code

DocumentType – Document type
SADocumentSubcategoryTypeID – Smart advocate Document subcategory ID
DocumentName – Document name
Document - The base64 encoded binary data for the file.
Comments – Comments added to a Document.
Description- The text that will be displayed in the description field in the SmartAdvocate.

Large binary documents can be sent to URL: https://yourdomain.com/sasvc/SAWebService.svc/Retrieval/UploadDocument?filename={filename}&RecordID={RecordID}&SACaseNumber={SACaseNumber}&SADocumentSubcategoryTypeID={SADocumentSubcategoryTypeID}&TypeName={TypeName}

Parameters:

Filename – a name of an uploaded file
RecordID – SA record ID
SACaseNumber – SmartAdvocate case number

SADocumentSubcategoryTypeID - Document Subcategory Type ID

TypeName - Document Type Name

Update Status of Requests

PUT request should be send to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/StatusUpdate

[ { "RecordId": 30983, "Status": "Progress" }, { "RecordId": 473, "Status": "Completed" }, { "RecordId": 655, "Status": "Canceled" }, { "RecordId": 98547, "Status": "No Records" }, { "RecordId": 98547, "Status": "Rejected" } ]

Fields description:
RecordID(integer) – SA record ID (Record have to marked as Read.)
Status(string)   – Status of request. Request in SA will update depends of settings. 

Response:

if you submit two records in one request and one of those records fails, you will only receive one successfully recorded entry in the response and Status Code 200.

If you submit only one record and the record fails then you will get Status Code 500.

Sending Invoices (costs) to SmartAdvocate (POST request from Retrieval service)

Invoice for service should be send in POST request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/Invoice

It will create a records in case Disbursements (costs) section.

JSON structure:

[{ "RecordID": 30969, "Type": "Medical Records", "InvoiceNo": "123456P", "InvoiceDate": "2020-05-26T00:00:00", "Amount": 1235.99, "Comments": "test comment", "DueDate" : "2020-05-26T00:00:00", "Description": "Smithtown hospital X-Ray", "PayeeName": "Best Retrieval Provider", "CheckNumber": "35648", "DocumentID": 9876543 }]


Fields description:
RecordID(integer) – SA record ID
Type(string(100)) – Type of record (should match with client's record otherwise default parameter will be used)
InvoiceNo(string(20)) – Invoice number
InvoiceDate(date) – Invoice date
Amount(decimal) – Invoice amount
Comments(string) – text comments if need to be added to invoice record

DueDate(date) – Invoice due date
Description(string(255)) – Invoice description (for example medical provider name)
PayeeName(string(500)) – Name of payee (should exact match with contact name in SmartAdvocate) CheckNumber(string(255)) – Check number

DocumentID (int) - ID of the uploaded document that needs to be linked to the invoice

 

Response:

if you submit two records in one request and one of those records fails, you will only receive one successfully recorded entry in the response and Status Code 200.

If you submit only one record and the record fails then you will get Status Code 500.

Sending Invoices (costs) to SmartAdvocate (Alternative Interface without RecordID)

https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/Invoice

JSON structure:


Fields description:
CaseNumber(string) – SA Case number
CaseID(decimal) – SA Case ID (You can pass either Case Number or Case ID. If Case Number is present Case ID will be ignored).
Type(string) – Type of record (should match with client's record otherwise default parameter will be used)
InvoiceNo(string) – Invoice number
InvoiceDate(date) – Invoice date
Amount(decimal) – Invoice amount
Comments(string) – text comments if need to be added to invoice record

DueDate(date) – Invoice due date
Description(string(255)) – Invoice description (for example medical provider name)
PayeeName(string(500)) – Name of payee (should exact match with contact name in SmartAdvocate)

Sending message from retrieval service (POST request from Retrieval service)

Passed text will be added to the case in the Notes section.

Message should be send in POST request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/Message

JSON structure:


Fields description:
RecordID(integer) – SA record ID
Message (string) – message

Response:

if you submit two records in one request and one of those records fails, you will only receive one successfully recorded entry in the response and Status Code 200.

If you submit only one record and the record fails then you will get Status Code 500.

Add retrieval service Note to Medical request (POST request from Retrieval service)

Text will be added to Retrieval Provider Notes of Medical request.

Message should be send in POST request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/RequestNote

JSON structure:


Fields description:
RecordID(integer) – SA record ID
Message (string) – message

Response:

 

Update retrieval service Note in Medical request (PUT request from Retrieval service)

Text will replace Retrieval Provider Notes of Medical request.

Message should be send in PUT request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/RequestNote

JSON structure:


Fields description:
RecordID (integer) – SA record ID
Message (string) – message

Response:

Add Retrieval Service Order Id(Number) to Medical request (POST request from Retrieval service)

Retrieval service Order Id (number) should be send in POST request to the endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/InsertOrderID

JSON structure:


Fields description:
RecordID (integer) – SA record ID
OrderID (string) – Retrieval Order ID (Number)

Create a copy of Medical Request (POST request from Retrieval service)

Medical request will be copied. Usually this request is needed when the Retrieval Service has to split the request into 2

POST request should be send to the endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/Copy

JSON structure:


Fields description:
RecordID (integer) – SA record ID of the Medical Request to be copied.

Following parameters will be used to update the new (copy) Medical Records Request.
OrderID (string) – Retrieval Order ID
Message (string) – Comments to be added to Retrieval Provider Notes of the Medical Records Request
Status (string)  – Status of the request.

Response:

 

Visit smartadvocate.com/support for other help options including how to access our Support Tracker and Daily Office Hours sessions.