Ingest analyzer results
curl --request POST \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/laboratory/integration/results \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message_id": "<string>",
"instrument_code": "<string>",
"specimen_number": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"results": [
{
"analyzer_test_code": "<string>",
"value": "<string>",
"unit": "<string>",
"flag": "<string>",
"observed_at": "2023-11-07T05:31:56Z"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message_id: '<string>',
instrument_code: '<string>',
specimen_number: '<string>',
received_at: '2023-11-07T05:31:56Z',
results: [
{
analyzer_test_code: '<string>',
value: '<string>',
unit: '<string>',
flag: '<string>',
observed_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/laboratory/integration/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/laboratory/integration/results"
payload = {
"message_id": "<string>",
"instrument_code": "<string>",
"specimen_number": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"results": [
{
"analyzer_test_code": "<string>",
"value": "<string>",
"unit": "<string>",
"flag": "<string>",
"observed_at": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "processed",
"message_id": "<string>",
"summary": [
{
"analyzer_test_code": "<string>",
"status": "imported",
"reason": "<string>"
}
],
"error": "<string>"
}{
"status": "processed",
"message_id": "<string>",
"summary": [
{
"analyzer_test_code": "<string>",
"status": "imported",
"reason": "<string>"
}
],
"error": "<string>"
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"status": "processed",
"message_id": "<string>",
"summary": [
{
"analyzer_test_code": "<string>",
"status": "imported",
"reason": "<string>"
}
],
"error": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "Unauthenticated."
}Foundation and integrations
Ingest laboratory results
Submit normalized analyzer results to HMIS.
POST
/
laboratory
/
integration
/
results
Ingest analyzer results
curl --request POST \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/laboratory/integration/results \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message_id": "<string>",
"instrument_code": "<string>",
"specimen_number": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"results": [
{
"analyzer_test_code": "<string>",
"value": "<string>",
"unit": "<string>",
"flag": "<string>",
"observed_at": "2023-11-07T05:31:56Z"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message_id: '<string>',
instrument_code: '<string>',
specimen_number: '<string>',
received_at: '2023-11-07T05:31:56Z',
results: [
{
analyzer_test_code: '<string>',
value: '<string>',
unit: '<string>',
flag: '<string>',
observed_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/laboratory/integration/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/laboratory/integration/results"
payload = {
"message_id": "<string>",
"instrument_code": "<string>",
"specimen_number": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"results": [
{
"analyzer_test_code": "<string>",
"value": "<string>",
"unit": "<string>",
"flag": "<string>",
"observed_at": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "processed",
"message_id": "<string>",
"summary": [
{
"analyzer_test_code": "<string>",
"status": "imported",
"reason": "<string>"
}
],
"error": "<string>"
}{
"status": "processed",
"message_id": "<string>",
"summary": [
{
"analyzer_test_code": "<string>",
"status": "imported",
"reason": "<string>"
}
],
"error": "<string>"
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"status": "processed",
"message_id": "<string>",
"summary": [
{
"analyzer_test_code": "<string>",
"status": "imported",
"reason": "<string>"
}
],
"error": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "Unauthenticated."
}Identical messages are idempotent. Reusing a message identity with a changed payload returns a conflict for reconciliation.
Authorizations
Paste a Sanctum personal access token generated by a HMIS super administrator. Use only a token with the ability required by the selected operation.
Body
application/json