/** * Attachment Validator * * Enforces FHIR R4 Attachment invariants that the core structural executor * doesn't catch today: * * - `Attachment.size` (if present) must equal the decoded byte length of * `Attachment.data` (if present). The Java validator flags this as a * structure issue; see fhir-test-cases `attachment-with-wrong-size`. * * The Attachment data type is polymorphic and can appear anywhere in a * resource tree (e.g. `DocumentReference.content.attachment`, * `Patient.photo`, `Media.content`). Rather than enumerate every path, * this validator walks the resource and detects attachment-shaped objects * by duck-typing on the presence of `data` and/or `size`. */ import type { ValidationIssue } from '../types'; export declare class AttachmentValidator { /** * Walk a resource and check every Attachment-shaped sub-object. */ validate(resource: any): ValidationIssue[]; private walk; private looksLikeAttachment; /** * `Attachment.size` must equal decoded byte length of `Attachment.data`. * Only validates when both fields are present. */ private checkDataIntegrity; } //# sourceMappingURL=attachment-validator.d.ts.map