Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

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://sa.yourlawyer.com:4430/sasvcdev/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://sa.yourlawyer.com:4430/sasvcdev/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://sa.yourlawyer.com:4430/sasvcdev/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. 

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

Invoice for service should be send in POST request to endpoint: https://sa.yourlawyer.com:4430/sasvcdev/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"
}]


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(50)) – 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 Invoices (costs) to SmartAdvocate (Alternative Interface without RecordID)

https://sa.yourlawyer.com:4430/sasvcdev/SAWebService.svc/Retrieval/MedicalRequests/Invoice

JSON structure:

[{
	"CaseNumber": "9000002",
	"Type": "Medical Records",
	"InvoiceNo": "123456P",
	"InvoiceDate": "2020-05-26T00:00:00",
	"Amount": 1235.99,
	"Comments": "test",
	"DueDate" : "2020-05-26T00:00:00",
    "Description": "Smithtown hospital X-Ray",
    "PayeeName": "Best Retrieval Provider"
}]


Fields description:
CaseNumber(string) – SA Case number
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://sa.yourlawyer.com:4430/sasvcdev/SAWebService.svc/Retrieval/MedicalRequests/Message

JSON structure:

[
    {
        "RecordID": 123465,
        "Message": "test"
    }
]


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

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://sa.yourlawyer.com:4430/sasvcdev/SAWebService.svc/Retrieval/MedicalRequests/RequestNote

JSON structure:

[
    {
        "RecordID": 123465,
        "Message": "test"
    }
]


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

Response:

[
  {
    "ID": null,
    "RecordId": 30983,
    "Message": "test123/r/ntest"
  }
]

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://sa.yourlawyer.com:4430/sasvcdev/SAWebService.svc/Retrieval/MedicalRequests/RequestNote

JSON structure:

[
    {
        "RecordID": 123465,
        "Message": "test"
    }
]


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

Response:

[
  {
    "ID": null,
    "RecordId": 30983,
    "Message": "test"
  }
]

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://sa.yourlawyer.com:4430/sasvcdev/SAWebService.svc/Retrieval/MedicalRequests/InsertOrderID

JSON structure:

[
    {
        "RecordId": 11585,
        "OrderId": "123xyz"
    }
]


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://sa.yourlawyer.com:4430/sasvcdev/SAWebService.svc/Retrieval/MedicalRequests/Copy

JSON structure:

{
    "RecordId":11585,
    "OrderId":"123xyz3",
    "Message":"test copy",
    "Status":"Completed"
}


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:

{
  "RecordId":11586
}

  • No labels