{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/hint-health/main/json-schema/hint-health-interaction-lab-sanitizer-schema.json", "title": "Interaction.LabSanitizer", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/hint-health-labinteraction-api-openapi.yml#/components/schemas/Interaction.LabSanitizer", "type": "object", "properties": { "status": { "type": "string", "description": "The status of the interaction. Defaults to \"SENT\"", "enum": [ "sent", "fulfilled" ] }, "vendor_order_id": { "type": "string", "description": "External vendor order ID (used for idempotency)" }, "event_timestamp": { "type": "string", "format": "date-time", "description": "Defaults to current time" }, "order": { "$ref": "#/$defs/Interaction.LabSanitizer.OrderSanitizer", "description": "Lab order details" }, "report": { "$ref": "#/$defs/Interaction.LabSanitizer.ReportSanitizer", "description": "Diagnostic report details" }, "results": { "type": "array", "items": { "$ref": "#/$defs/Interaction.LabSanitizer.ResultSanitizer" }, "description": "Lab result observations" }, "integration_record_id": { "type": "string" }, "integration_error_message": { "type": "string" }, "integration_web_link": { "type": "string" } }, "$defs": { "Interaction.LabSanitizer.ActionSanitizer": { "type": "object", "properties": { "reference": { "type": "string", "description": "Reference code for the test" }, "display": { "type": "string", "description": "Human-readable test name" } }, "required": [ "reference", "display" ] }, "Interaction.LabSanitizer.OrderSanitizer": { "type": "object", "properties": { "lab_reference_id": { "type": "string", "description": "External reference ID for the lab order" }, "ordered_from": { "type": "string", "description": "Lab provider name (e.g., \"LabCorp\")" }, "authored_on": { "type": "string", "description": "When the order was authored" }, "collected_at": { "type": "string", "format": "date-time", "description": "When the specimen was collected" }, "author": { "type": "string", "description": "Name or ID of the ordering provider" }, "author_reference": { "type": "string", "description": "Reference identifier for the author" }, "actions": { "type": "array", "items": { "$ref": "#/$defs/Interaction.LabSanitizer.ActionSanitizer" }, "description": "Ordered tests/panels" }, "intent": { "type": "string", "description": "Order intent" }, "subject": { "$ref": "#/$defs/Interaction.LabSanitizer.SubjectSanitizer", "description": "Subject of the lab order" }, "lab_account_id": { "type": "string", "description": "Lab account identifier" } } }, "Interaction.LabSanitizer.ReportSanitizer": { "type": "object", "properties": { "issued": { "type": "string", "format": "date-time", "description": "When the report was issued" }, "status": { "type": "string", "description": "Report status (e.g., \"final\", \"preliminary\")" }, "lab_reference_id": { "type": "string", "description": "External lab reference ID" }, "order_reference": { "type": "string", "description": "Reference to the originating order" } }, "required": [ "issued", "status" ] }, "Interaction.LabSanitizer.ResultCodeSanitizer": { "type": "object", "properties": { "code": { "type": "string", "description": "LOINC code value (only LOINC is supported)" }, "display": { "type": "string", "description": "Human-readable name" } }, "required": [ "code", "display" ] }, "Interaction.LabSanitizer.ResultQuantitySanitizer": { "type": "object", "properties": { "value": { "type": "integer", "format": "int32", "description": "The measured value" }, "unit": { "type": "string", "description": "Unit of measure (e.g., \"mg/dL\")" } }, "required": [ "value", "unit" ] }, "Interaction.LabSanitizer.ResultRangeSanitizer": { "type": "object", "properties": { "low": { "$ref": "#/$defs/Interaction.LabSanitizer.ResultQuantitySanitizer", "description": "Lower bound of range" }, "high": { "$ref": "#/$defs/Interaction.LabSanitizer.ResultQuantitySanitizer", "description": "Upper bound of range" }, "text": { "type": "string", "description": "Textual range description" } } }, "Interaction.LabSanitizer.ResultSanitizer": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique result identifier" }, "code": { "type": "array", "items": { "$ref": "#/$defs/Interaction.LabSanitizer.ResultCodeSanitizer" }, "description": "At least one coding entry (min 1)" }, "code_text": { "type": "string", "description": "Human-readable name for the result" }, "issued": { "type": "string", "format": "date-time", "description": "When the result was issued" }, "value_quantity": { "$ref": "#/$defs/Interaction.LabSanitizer.ResultQuantitySanitizer", "description": "Numeric result value with unit" }, "value_string": { "type": "string", "description": "String result value" }, "text": { "type": "string", "description": "Additional narrative text" }, "interpretation": { "type": "array", "items": { "type": "string" }, "description": "Interpretation codes (e.g., [\"normal\"])" }, "ranges": { "type": "array", "items": { "$ref": "#/$defs/Interaction.LabSanitizer.ResultRangeSanitizer" }, "description": "Reference ranges" }, "subject": { "type": "string", "description": "Subject reference" } }, "required": [ "id", "code", "code_text", "issued" ] }, "Interaction.LabSanitizer.SubjectSanitizer": { "type": "object", "properties": { "reference": { "type": "string", "description": "Subject reference ID" }, "display": { "type": "string", "description": "Subject display name" } } } } }