Create an Order
To create a new order, your client application will issue a POST
request to the following endpoint,
https://prodapi.arlims.com/api/orders
Your request must contain a JSON-encoded instance of the Requisition model, shown here:
{
"reorder": null,
"labelOrigin": null,
"sampleLabel": null,
"sampleType": null,
"sampleCollectionDate": null,
"sampleCollectionInitials": null,
"collectorCode": null,
"billToOption": null,
"facilityCode": null,
"organizationCode": null,
"organizationNPI": null,
"providerNPI": null,
"providerName": null,
"providerPhone": null,
"providerOther": null,
"firstName": null,
"lastName": null,
"middleInitial": null,
"dateOfBirth": null,
"sex": null,
"ethnicity": null,
"raceOther": null,
"addressLine1": null,
"addressLine2": null,
"city": null,
"cityQuadrant": null,
"countyOrParish": null,
"state": null,
"postalCode": null,
"country": null,
"emailAddress": null,
"phone": null,
"alternatePhone": null,
"height": null,
"weight": null,
"medicalRecordNumber": null,
"prisonerIdentification": null,
"ssNorITIN": null,
"identificationNumber": null,
"identificationState": null,
"acknowledgementReceived": null,
"dateAcknowledgementReceived": null,
"acknowledgementText": null,
"races": [],
"diagnosisCodes": [],
"medicationsPrescribed": [],
"medicationsToEvaluate": [],
"testPanels": [],
"policies": [],
"questions": [],
"attachments": []
}
The following is an example of a valid request object.
{
"reorder": "false",
"labelOrigin": "ARL",
"sampleLabel": "173340598",
"sampleType": "NSL",
"sampleCollectionDate": "08/18/2021",
"sampleCollectionInitials": null,
"collectorCode": null,
"billToOption": "FP",
"facilityCode": "Test",
"organizationCode": "CITYH01",
"organizationNPI": "1285605444",
"providerNPI": "1487966412",
"firstName": "Carl",
"lastName": "Sagan",
"middleInitial": null,
"dateOfBirth": "06/01/1970",
"sex": "M",
"ethnicity": "N",
"raceOther": null,
"addressLine1": "123 Example Drive",
"addressLine2": null,
"city": "Examplesville",
"cityQuadrant": "NE",
"countyOrParish": null,
"state": "WA",
"postalCode": "12345",
"country": "USA",
"emailAddress": "carl.sagan@example.com",
"phone": "123-123-1234",
"alternatePhone": null,
"height": "73",
"weight": "215",
"medicalRecordNumber": "CS123123123",
"prisonerIdentification": null,
"ssNorITIN": null,
"identificationNumber": null,
"identificationState": null,
"acknowledgementReceived": null,
"dateAcknowledgementReceived": null,
"acknowledgementText": null,
"races": ["2106-3"],
"diagnosisCodes": [],
"medicationsPrescribed": ["Tylenol"],
"medicationsToEvaluate": ["aspirin"],
"testPanels": ["TESTONE"],
"policies": [],
"attachments": []
}
The following is a very basic example of using cURL to create an order, using the above example:
curl --request POST \
--url 'https://prodapi.arlims.com/api/orders' \
--header 'authorization: Bearer ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{ "reorder": "false", "labelOrigin": "ARL", "sampleLabel": "173340598", "sampleType": "NSL", "sampleCollectionDate": "08/18/2021", "sampleCollectionInitials": null, "collectorCode": null, "billToOption": "FP", "facilityCode": "Test", "organizationNPI": "1285605444", "providerNPI": "1487966412", "firstName": "Carl", "lastName": "Sagan", "middleInitial": null, "dateOfBirth": "06/01/1970", "sex": "M", "ethnicity": "N", "raceOther": null, "addressLine1": "123 Example Drive", "addressLine2": null, "city": "Examplesville", "cityQuadrant": "NE", "countyOrParish": null, "state": "WA", "postalCode": "12345", "country": "USA", "emailAddress": "carl.sagan@example.com", "phone": "123-123-1234", "alternatePhone": null, "height": "73", "weight": "215", "medicalRecordNumber": "CS123123123", "prisonerIdentification": null, "ssNorITIN": null, "identificationNumber": null, "identificationState": null, "races": ["2106-3"], "diagnosisCodes": [], "medicationsPrescribed": ["Tylenol"], "medicationsToEvaluate": ["aspirin"], "testPanels": ["TESTONE"], "policies": [], "attachments": [] }' \
For the above example, substitute your access token for ACCESS_TOKEN
.
A successful response will be very similar to the following:
{
"transactionCode": "ebc6e80d-8bed-4c5a-b511-b7e3729a3240",
"status": "Received"
}
A failed response will contain a list of error messages in the errors
property:
{
"errors": [{
"code": "ERR",
"message": "Sample label is invalid"
}]
}