Pull API for Medical Record Requests
Header
All request must contains "X-ApiKey" header with ClientKey in there
ClientKey example: "0d4852a98cbf4c8csb0cdee1b6f31e95f"
Note that you will need to get a client key specific for your company (and for specific SmartAdvocate client) once you start developing an integration
Getting a List of Record Requests
GET request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/Get
This is a test endpoint. Real system endpoint will be different. It can also be different for different clients.
You will get a list of records which are marked as "Ready to pickup" for Retrieval service.
Also you can add parameter "MarkAsRead", so you won’t need to send additional request to mark records as read.
https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/Get?MarkAsRead=true
{
"id": 24634,
"saCaseNo": "1017260",
"saCaseName": "Melissa v. Doe",
"office": "New York",
"recordType": "Pharmacy Records",
"requestStatus": "ReadyToPickup",
"comments": " Response: 0",
"notesToProvider": "",
"caseType": "Auto MUN Bus",
"caseStage": "Closed",
"rushOrder": false,
"dateFrom": "2013-04-01T00:00:00",
"dateTo": "2015-03-26T00:00:00",
"allDates": false,
"orderAffidavit": false,
"patient": {
"id": 1478444,
"firstName": "Melissa",
"lastName": "Gome",
"middleName": "H",
"dateOfBirth": "2015-03-26T00:00:00",
"deceased": false,
"ssn": "535-43-4444",
"address": {
"address1": "1 Main St",
"address2": "appt 1",
"address3": "",
"city": "Townville",
"state": "NY",
"zip_code": "11050"
},
"phone": "(222) 222-2222 x123",
"email": "test@mail.com",
"gender": "F"
},
"provider": {
"id":254658
"name": "Sunegova, Iva",
"address": {
"address1": "2412 21st Avenue",
"address2": "",
"address3": "",
"city": "Astoria",
"state": "NY",
"zip_code": "11105"
},
"phone": "(718) 777-1079",
"fax": ""
},
"documents": [
{
"description": "(PDF version of) ",
"category": "Appeals",
"subCategory": "Memo of Law",
"id": 2179923,
"name": "Advise of Defendant Physical Exam Date.pdf",
"mimeType": "application/pdf"
}],
"user": {
"id": 125,
"name": "Cicali, Joseph M.",
"email": "Joseph@zzsmartadvocate.com"
},
"injury": "8/6/2014 Shoulder\nSevere Neck Pain \nMuscle Deterioration \n\nAnterior cruciate Sprain and/or Strain Magnetic resonance imaging, Open Arthrotomy and Arthroscopy Grinding/Clicking, Lateral Deviation Head, Neck & Back Pain Back Pain Ankle Arthrotomy and Arthroscopy Grinding/Clicking, Lateral Deviation Head, Neck & Back Pain Back Pain Ankle Arthrotomy and Arthroscopy Grinding/Clicking, Lateral Deviation Head, Neck & Back Pain Back Pain Ankle Arthrotomy and Arthroscopy Grinding/Clicking, Lateral Deviation Head, Neck & Back Pain Back Pain Ankle 123\n",
"incident": {
"date": "2020-03-08T12:01:00",
"state": "WY"
}
}
Fields descriptions
Id(int) – (RecordID) medical request record id
saCaseNo(string) – Case number in SmartAdvocate (users can identify the case by this number). One case in SmartAdvocate may have multiple medical requests.
saCaseName(string) – Case name in SmartAdvocate
office(string) - law firm office name
requestStatus (string)– status of medical request
recordType (string)– type of medical request
comments(string) – comments left by user
notesToProvider(string) – comments left by user to retrieval service
caseType(string) – type of case in SmartAdvocate
caseStage(string) – case stage in SmartAdvocate
rushOrder(boolean) – if this is rush order
dateFrom(date) – medical visits from that date
dateTo (date)– medical visits to that date
allDates (boolean) – if there is no date and user need to get all medical records, regardless of the date
orderAffidavit(boolean) – Affidavit requested for records
patient – patient info
id (int)– id number of contact in SmartAdvocate
firstName (string) – patient first name
lastName(string) – patient last name
middleName(string) – patient middle name
dateOfBirth(string) – patient Date of birth
deceased (boolean) – true – if patient deceased
ssn (string) – patient Social Security Number
address – patient address
phone (string) – patient phone
email(string) – patient email addressphone
gender(string) – patient gender (M or F)
provider – provider info
id (int)– id number of contact in SmartAdvocate
name (string)– name of provider
address – address of provider
phone – phone of provider
fax – fax of provider
documentID (array)– document id's list – documents could be downloaded with different request
user – info about user who sent a request (name and email)
injury (string) – injury information
incident – incident information (date and state)
Getting documents from SmartAdvocate
GET request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/Documents?DocumentID={DocumentID}&RecordID={RecordID}
You get stream of document. (base64 encoded)
Marking a record as read
Marking a records a read will prevent it from being returned in the next request results.
PUT request to endpoint:
https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/MarkRead
Request body:
{
"RecordID":[24563, 24564]
}
Get a List of Document Types
GET request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/Documents/Type
You will get a list of Document types where you can get data for parameters SADocumentSubcategoryTypeID
or DocumentType
.
[
{
"CategoryID": 21,
"CategoryName": "Medical",
"SubcategoryTypeID": 80,
"TypeName": "Billing"
},
{
"CategoryID": 21,
"CategoryName": "Medical",
"SubcategoryTypeID": 396,
"TypeName": "Disability Letter"
},
{
"CategoryID": 21,
"CategoryName": "Medical",
"SubcategoryTypeID": 405,
"TypeName": "Invoice"
}
]
Get a List of cancelation requests
GET request to endpoint: https://api.smartadvocate.com/sasvc/SAWebService.svc/Retrieval/MedicalRequests/Cancelation/Get
You will receive a list of requests that should be canceled on the Retrieval service side.
[
{
"RecordId": 30983,
"OrderId": "12345"
},
{
"RecordId": 45968,
"OrderId": "3332Y"
},
]
Visit smartadvocate.com/support for other help options including how to access our Support Tracker and Daily Office Hours sessions.