{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/elation-health/main/json-schema/elation-health-paginated-report-list-schema.json", "title": "PaginatedReportList", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/elation-health-reports-api-openapi.yml#/components/schemas/PaginatedReportList", "properties": { "count": { "type": "integer" }, "next": { "format": "uri", "type": [ "string", "null" ] }, "previous": { "format": "uri", "type": [ "string", "null" ] }, "results": { "items": { "$ref": "#/$defs/Report" }, "type": "array" } }, "required": [ "results" ], "type": "object", "$defs": { "AbnormalFlagEnum": { "enum": [ "Abnormal", "Abnormal (applies to non-numeric results)", "Above high normal", "Alert high", "Alert low", "Below low normal", "Beta-lactamase Pos (B-lactamase antibiotic resistant).", "Better-use when direction not relevant", "Critical", "Critical abnormal", "Intermediate result", "Intermediate. Indicates for microbiology susceptibilities only.", "Moderately susceptible. Indicates for microbiology susceptibilities only.", "Negative", "Negative result", "Normal (applies to non-numeric results)", "Not Applicable", "Panic high", "Panic low", "Positive result", "Resistant. Indicates for microbiology susceptibilities only.", "Significant change down", "Significant change up", "Susceptible. Indicates for microbiology susceptibilities only.", "Very High", "Very susceptible. Indicates for microbiology susceptibilities only.", "Worse-use when direction not relevant" ], "type": "string" }, "LabResult": { "properties": { "abnormal_flag": { "$ref": "#/$defs/AbnormalFlagEnum" }, "is_abnormal": { "type": "boolean" }, "note": { "type": [ "string", "null" ] }, "reference_max": { "type": [ "string", "null" ] }, "reference_min": { "type": [ "string", "null" ] }, "status": { "$ref": "#/$defs/LabResultStatus" }, "test": { "$ref": "#/$defs/LabTest" }, "test_category": { "$ref": "#/$defs/LabTestCategory" }, "text": { "type": [ "string", "null" ] }, "units": { "maxLength": 20, "type": [ "string", "null" ] }, "value": { "maxLength": 500, "type": "string" }, "value_type": { "oneOf": [ { "$ref": "#/$defs/ValueTypeEnum" }, { "$ref": "#/$defs/NullEnum" } ] } }, "required": [ "abnormal_flag", "is_abnormal", "note", "reference_max", "reference_min", "status", "test", "test_category", "text", "value" ], "type": "object" }, "LabResultStatus": { "enum": [ "AMENDED", "CORRECTED", "DELETED", "ERROR", "FINAL", "PARTIAL", "PENDING", "PRELIMINARY", "RESULT CANCELED DUE TO NON-PERFORMANCE", "RESULTS ENTERED -- NOT VERIFIED", "RESULTS STATUS CHANGE TO FINAL. RESULTS DID NOT CHANGE ( DONT TRANSMIT TEST)." ], "type": "string" }, "LabResultsGrid": { "properties": { "accession_number": { "type": "string" }, "collected_date": { "description": "The datetime the specimens for this grid of data was collected from the patient.", "format": "date-time", "type": "string" }, "note": { "type": [ "string", "null" ] }, "resulted_date": { "description": "The datetime this grid of data was calculated and resulted by the lab.", "format": "date-time", "type": "string" }, "results": { "items": { "$ref": "#/$defs/LabResult" }, "type": "array" }, "status": { "$ref": "#/$defs/LabResultStatus" } }, "required": [ "accession_number", "collected_date", "note", "resulted_date", "results", "status" ], "type": "object" }, "LabTest": { "properties": { "code": { "maxLength": 50, "type": "string" }, "loinc": { "type": [ "string", "null" ] }, "name": { "maxLength": 255, "type": "string" } }, "required": [ "code", "loinc", "name" ], "type": "object" }, "LabTestCategory": { "properties": { "description": { "maxLength": 200, "type": "string" }, "value": { "maxLength": 50, "type": "string" } }, "required": [ "description", "value" ], "type": "object" }, "NullEnum": { "type": "null" }, "OrderStatusEnum": { "enum": [ "CANCELED", "COMPLETED", "DISCONTINUED", "ERROR, ORDER NOT FOUND", "IN PROCESS", "ON HOLD", "REPLACED", "SCHEDULED" ], "type": "string" }, "Report": { "properties": { "chart_date": { "description": "The date used for chart chronology and ordering. May differ from document_date.", "format": "date-time", "type": "string" }, "created_date": { "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "custom_title": { "maxLength": 255, "type": [ "string", "null" ] }, "deleted_date": { "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "document_date": { "description": "The date when the report was created.", "format": "date-time", "type": "string" }, "files": { "description": "Files and photos to attach. Two modes: (1) External JSON metadata: set content_type='application/json; schema=el8_external_content_report' and provide 'external_content' JSON that includes a 'referenced_url' (and optional metadata). The JSON is stored and used to reference the external file; file bytes are not uploaded. (2) Binary upload: set content_type='application/octet-stream' and provide 'base64_content' (and optional 'original_filename'). When any file uses base64, all files in the same request must use base64. On GET, returns file references; download via the files retrieval endpoint. For JSON content, the retrieval endpoint returns the stored JSON metadata.", "items": { "$ref": "#/$defs/S3RetrievingDocumentFile" }, "type": [ "array", "null" ] }, "grids": { "description": "Structured lab results grids. Each grid groups results by accession number and collection/resulted timestamps.", "items": { "$ref": "#/$defs/LabResultsGrid" }, "type": "array" }, "id": { "readOnly": true, "type": "integer" }, "images": { "description": "Read-only. Images derived from uploaded files. Upload using the 'files' field; retrieve specific images via the images endpoint.", "items": { "$ref": "#/$defs/ReportImage" }, "readOnly": true, "type": [ "array", "null" ] }, "is_urgent": { "default": false, "type": "boolean" }, "order_status": { "description": "Status of a linked order, when applicable.", "oneOf": [ { "$ref": "#/$defs/OrderStatusEnum" }, { "$ref": "#/$defs/NullEnum" } ] }, "patient": { "description": "The patient this report belongs to. The patient must belong to the specified practice.", "format": "int64", "type": "integer" }, "physician": { "format": "int64", "type": "integer" }, "practice": { "description": "The authoring practice for this report. Required on create.", "format": "int64", "type": "integer" }, "printable_view": { "description": "URL to a printable PDF view of the report. You may pass the optional 'print_header' query param to select a header.", "format": "uri", "type": "string" }, "report_type": { "allOf": [ { "$ref": "#/$defs/ReportTypeEnum" } ], "description": "The type of report. For laboratory reports, use 'Lab'." }, "reported_date": { "description": "The timestamp when the report was created by an external system, usually the same as \"document_date\".", "format": "date-time", "type": "string" }, "requisition_number": { "maxLength": 100, "type": [ "string", "null" ] }, "routed_document_delegates": { "description": "Read-only. Users and groups that have been delegated to review this report.", "items": { "$ref": "#/$defs/RoutedDocumentDelegate" }, "readOnly": true, "type": "array" }, "signed_by": { "format": "int64", "type": [ "integer", "null" ] }, "signed_date": { "format": "date-time", "type": [ "string", "null" ] }, "tags": { "description": "Practice-scoped document tags.", "items": { "format": "int64", "type": "integer" }, "type": "array" }, "vendor": { "description": "Optional vendor for this report.", "format": "int64", "type": [ "integer", "null" ] } }, "required": [ "chart_date", "document_date", "patient", "physician", "practice", "report_type" ], "type": "object" }, "ReportImage": { "properties": { "document": { "format": "uri", "type": "string" }, "id": { "readOnly": true, "type": "integer" } }, "required": [ "document" ], "type": "object" }, "ReportTypeEnum": { "enum": [ "Allergist", "Audiology", "Billing", "Business", "Cardiac", "CarePlan", "Consent", "Consultation", "Correspondence", "Cosmetic", "DME", "Dermatology", "Diabetes", "Directives", "EKG", "ENT", "Endocrinology", "Exams", "EyeVision", "Forms", "GI", "History", "Home", "Hospice", "Hospital", "Imaging", "Incoming", "Injection", "Insurance", "Intake", "Lab", "Legal", "Misc", "Neuro", "Nursing", "OBGYN", "OT", "OldRecord", "Oncology", "Ophth", "Ortho", "Outgoing", "PT", "PaperRx", "Pathology", "PatientForm", "Pediatric", "Pharmacy", "Preop", "PriorAuth", "Procedures", "Psych", "Pulmonary", "Quality", "Radiology", "SNF", "Screening", "Sleep", "Surgery", "Testing", "Therapy", "Ultrasound", "UrgentCare", "Urology", "Women" ], "type": "string" }, "RoutedDocumentDelegate": { "description": "Nested serializer for RoutedDocumentDelegate.\n\nReturns delegation information for users and groups assigned to review a report.\nEither user or group will be populated, but not both.", "properties": { "created_date": { "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "deleted_date": { "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "group": { "description": "ID of the delegated group. Null if this is a user delegation.", "type": [ "integer", "null" ] }, "id": { "readOnly": true, "type": "integer" }, "user": { "description": "ID of the delegated user. Null if this is a group delegation.", "type": [ "integer", "null" ] } }, "type": "object" }, "S3RetrievingDocumentFile": { "properties": { "base64_content": { "type": "string" }, "content_type": { "type": "string" }, "document": { "description": "URL to retrieve the document", "format": "uri", "type": "string" }, "external_content": {}, "id": { "readOnly": true, "type": "integer" }, "original_filename": { "type": "string" } }, "type": "object" }, "ValueTypeEnum": { "enum": [ "Coded Entry", "Encapsulated Data", "Numeric", "String Data", "Text" ], "type": "string" } } }