/**
 * iCure Data Stack API Documentation
 * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { CodeStub } from './CodeStub';
import { Delegation } from './Delegation';
import { DataAttachment } from './DataAttachment';
import { DeletedAttachment } from './DeletedAttachment';
import { SecurityMetadata } from './SecurityMetadata';
export declare class Document {
    constructor(json: JSON | any);
    /**
     * The Id of the document. We encourage using either a v4 UUID or a HL7 Id.
     */
    id?: string;
    /**
     * The revision of the document in the database, used for conflict management / optimistic locking.
     */
    rev?: string;
    /**
     * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.
     */
    created?: number;
    /**
     * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.
     */
    modified?: number;
    /**
     * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.
     */
    author?: string;
    /**
     * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.
     */
    responsible?: string;
    /**
     * The id of the medical location where this entity was created.
     */
    medicalLocationId?: string;
    /**
     * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.
     */
    tags?: Array<CodeStub>;
    /**
     * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes
     */
    codes?: Array<CodeStub>;
    /**
     * Soft delete (unix epoch in ms) timestamp of the object.
     */
    endOfLife?: number;
    /**
     * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.
     */
    deletionDate?: number;
    /**
     * Location of the document
     */
    documentLocation?: Document.DocumentLocationEnum;
    /**
     * The type of document, ex: admission, clinical path, document report,invoice, etc.
     */
    documentType?: Document.DocumentTypeEnum;
    /**
     * The status of the development of the document. Ex: Draft, finalized, reviewed, signed, etc.
     */
    documentStatus?: Document.DocumentStatusEnum;
    /**
     * When the document is stored in an external repository, this is the uri of the document in that repository
     */
    externalUri?: string;
    /**
     * Name of the document
     */
    name?: string;
    /**
     * The document version
     */
    version?: string;
    /**
     * The ICureDocument (Form, Contact, ...) that has been used to generate the document
     */
    storedICureDocumentId?: string;
    /**
     * A unique external id (from another external source).
     */
    externalUuid?: string;
    /**
     * Size of the document file
     */
    size?: number;
    /**
     * Hashed version of the document
     */
    hash?: string;
    /**
     * Id of the contact during which the document was created
     */
    openingContactId?: string;
    /**
     * Id of the main attachment of this document, if stored as a couchdb attachment
     */
    attachmentId?: string;
    /**
     * Id of the main attachment of this document, if stored using the object storage service
     */
    objectStoreReference?: string;
    /**
     * The main Uniform Type Identifier for the main attachment (https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE)
     */
    mainUti?: string;
    /**
     * Extra Uniform Type Identifiers for the main attachment
     */
    otherUtis?: Array<string>;
    mainAttachmentStoredDataSize?: number;
    extraMainAttachmentInfo?: {
        compressionAlgorithm?: string;
        triedCompressionAlgorithmsVersion?: string;
        realDataSize?: number;
    };
    /**
     * Secondary attachments for this document
     */
    secondaryAttachments?: {
        [key: string]: DataAttachment;
    };
    /**
     * Information on past attachments for this document
     */
    deletedAttachments?: Array<DeletedAttachment>;
    encryptedAttachment?: ArrayBuffer;
    decryptedAttachment?: ArrayBuffer;
    /**
     * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.
     */
    secretForeignKeys?: Array<string>;
    /**
     * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.
     */
    cryptedForeignKeys?: {
        [key: string]: Array<Delegation>;
    };
    /**
     * When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well
     */
    delegations?: {
        [key: string]: Array<Delegation>;
    };
    /**
     * When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation
     */
    encryptionKeys?: {
        [key: string]: Array<Delegation>;
    };
    /**
     * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.
     */
    encryptedSelf?: string;
    securityMetadata?: SecurityMetadata;
}
export declare namespace Document {
    type DocumentLocationEnum = 'annex' | 'body';
    const DocumentLocationEnum: {
        Annex: DocumentLocationEnum;
        Body: DocumentLocationEnum;
    };
    type DocumentTypeEnum = 'admission' | 'alert' | 'bvt_sample' | 'clinicalpath' | 'clinicalsummary' | 'contactreport' | 'quote' | 'invoice' | 'death' | 'discharge' | 'dischargereport' | 'ebirth_baby_medicalform' | 'ebirth_baby_notification' | 'ebirth_mother_medicalform' | 'ebirth_mother_notification' | 'ecare_safe_consultation' | 'epidemiology' | 'intervention' | 'labrequest' | 'labresult' | 'medicaladvisoragreement' | 'medicationschemeelement' | 'note' | 'notification' | 'pharmaceuticalprescription' | 'prescription' | 'productdelivery' | 'quickdischargereport' | 'radiationexposuremonitoring' | 'referral' | 'report' | 'request' | 'result' | 'sumehr' | 'telemonitoring' | 'template' | 'template_admin' | 'treatmentsuspension' | 'vaccination';
    const DocumentTypeEnum: {
        Admission: DocumentTypeEnum;
        Alert: DocumentTypeEnum;
        BvtSample: DocumentTypeEnum;
        Clinicalpath: DocumentTypeEnum;
        Clinicalsummary: DocumentTypeEnum;
        Contactreport: DocumentTypeEnum;
        Quote: DocumentTypeEnum;
        Invoice: DocumentTypeEnum;
        Death: DocumentTypeEnum;
        Discharge: DocumentTypeEnum;
        Dischargereport: DocumentTypeEnum;
        EbirthBabyMedicalform: DocumentTypeEnum;
        EbirthBabyNotification: DocumentTypeEnum;
        EbirthMotherMedicalform: DocumentTypeEnum;
        EbirthMotherNotification: DocumentTypeEnum;
        EcareSafeConsultation: DocumentTypeEnum;
        Epidemiology: DocumentTypeEnum;
        Intervention: DocumentTypeEnum;
        Labrequest: DocumentTypeEnum;
        Labresult: DocumentTypeEnum;
        Medicaladvisoragreement: DocumentTypeEnum;
        Medicationschemeelement: DocumentTypeEnum;
        Note: DocumentTypeEnum;
        Notification: DocumentTypeEnum;
        Pharmaceuticalprescription: DocumentTypeEnum;
        Prescription: DocumentTypeEnum;
        Productdelivery: DocumentTypeEnum;
        Quickdischargereport: DocumentTypeEnum;
        Radiationexposuremonitoring: DocumentTypeEnum;
        Referral: DocumentTypeEnum;
        Report: DocumentTypeEnum;
        Request: DocumentTypeEnum;
        Result: DocumentTypeEnum;
        Sumehr: DocumentTypeEnum;
        Telemonitoring: DocumentTypeEnum;
        Template: DocumentTypeEnum;
        TemplateAdmin: DocumentTypeEnum;
        Treatmentsuspension: DocumentTypeEnum;
        Vaccination: DocumentTypeEnum;
    };
    type DocumentStatusEnum = 'draft' | 'finalized' | 'pending_review' | 'reviewed' | 'pending_signature' | 'signed' | 'canceled' | 'sent' | 'delivered';
    const DocumentStatusEnum: {
        Draft: DocumentStatusEnum;
        Finalized: DocumentStatusEnum;
        PendingReview: DocumentStatusEnum;
        Reviewed: DocumentStatusEnum;
        PendingSignature: DocumentStatusEnum;
        Signed: DocumentStatusEnum;
        Canceled: DocumentStatusEnum;
        Sent: DocumentStatusEnum;
        Delivered: DocumentStatusEnum;
    };
}
