Detor will validate both orders and results and alert the Public Health Laboratory (PHL) of any errors or warnings. The PHL will need to establish a process for managing these errors and warnings.
Errors occur when a message does not pass structural validation. For example, an HL7 format is expected but a CSV is received.
Warnings occur if data that has been deemed required is missing or invalid. For example, ‘Collection Facility’ is missing from the order message.
Note this validation occurs after APHL receives, transforms and translates the message to the middle-ground format.
See APHL Detor Message Validation Rules for more details.
S3 Bucket
The PHL S3 Bucket is organized to “alert” on:
receipt of a new order;
receipt of an error/warning message related to an order;
receipt of an error/warning message related to a result.
The S3 bucket will be organized in a standard way for each use case, the example to the left depicts a Newborn Screening (NBS) example.
Within the NBS parent folder, there will be a child folder for:
📁 Order: this folder contains all received order messages
📁 Error: this folder contains warning and error messages related to both:
📁 Order: Warning, Error and Message files related to received Orders
In the event of an Error, the associated Order Message received (but not processed) by AIMS will be provided.
📁 Result: Warning, Error and Message files related to delivered Results
In the event of an Error, the associated Result Message received (but not processed) by AIMS will be provided.
The PHL is advised to develop and execute a daily process for managing warnings and errors…?
Sample Order .err message:
{
"errorName": "JavaException",
"errorMessage": "java.net.SocketTimeoutException: Read timed out",
"stackTrace": "\tat 4cbace1a-e827-455f-846a-1e189c11291f_JavaScript_Writer_2:4916 (GetTranscodings)\n\tat 4cbace1a-e827-455f-846a-1e189c11291f_JavaScript_Writer_2:4966 (PerformTranscoding)\n\tat 4cbace1a-e827-455f-846a-1e189c11291f_JavaScript_Writer_2:1548 (ChannelOperations_InOrderMapRequest)\n\tat 4cbace1a-e827-455f-846a-1e189c11291f_JavaScript_Writer_2:6022 (doScript)\n\tat 4cbace1a-e827-455f-846a-1e189c11291f_JavaScript_Writer_2:6024\n"
}
Sample Order .warn message:
{"validation_status":"INVALID","message":["$.sample.provider: object found, array expected","$.sample.placerOrderIdentifier.id.assigningAuthority: is missing but it is required","$.sample.subjectHumanClinical.address: is missing but it is required","$.sample.subjectHumanClinical.externalID: array found, object expected","$.sample.subjectHumanClinical.dateOfBirth: does not match the regex pattern [0-9]{4}(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])","$.sample.subjectHumanClinical.internalID.assigningAuthority: is missing but it is required","$.sample.subjectHumanClinical.timeOfBirth: does not match the regex pattern ((2[0-3]|[01][0-9])([0-5][0-9])([0-5][0-9])?+-([0-5][0-9])?)|((2[0-3]|[01][0-9])([0-5][0-9])([0-5][0-9])?)","$.sample.facility.address: is missing but it is required","$.sample.facility.organizationFacilityName: is missing but it is required","$.sample.sampleItem[0].collectionTime: is missing but it is required","$.sample.sampleItem[0].sampleItemID: is missing but it is required","$.sample.sampleItem[0].testOrdered[0].auxData[3].answerNumeric.lowerNumber: integer found, string expected","$.sample.sampleItem[0].testOrdered[0].auxData[4].answerNumeric.lowerNumber: integer found, string expected","$.sample.sampleItem[0].testOrdered[0].auxData[6].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[7].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[7].answerType: does not have a value in the enumeration [code, str, num, per, phn, email, addr, date, id]","$.sample.sampleItem[0].testOrdered[0].auxData[8].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[8].answerNumeric.lowerNumber: integer found, string expected","$.sample.sampleItem[0].testOrdered[0].auxData[16].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[17].answerNumeric.lowerNumber: integer found, string expected","$.sample.sampleItem[0].testOrdered[0].auxData[18].answerNumeric.lowerNumber: integer found, string expected","$.sample.sampleItem[0].testOrdered[0].auxData[19].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[20].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[22].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[24].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[28].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[31].question.codeSystem: must be at least 1 characters long","$.sample.sampleItem[0].testOrdered[0].auxData[31].answerType: does not have a value in the enumeration [code, str, num, per, phn, email, addr, date, id]","$.sample.sampleItem[0].testOrdered[0].dateOrdered: is missing but it is required","$.sample.sampleItem[0].testOrdered[0].orderStatus: is missing but it is required","$.sample.sampleItem[0].testOrdered[0].placerOrderNumber.assigningAuthority: is missing but it is required"]}