import { BaseFilterOptions, BaseSortableFilterOptions, FilterOptions, SortableFilterOptions } from '../cardinal-sdk-ts.mjs'; import { Document } from '../model/Document.mjs'; import { EntityReferenceInGroup } from '../model/EntityReferenceInGroup.mjs'; import { GroupScoped } from '../model/GroupScoped.mjs'; import { Message } from '../model/Message.mjs'; import { Patient } from '../model/Patient.mjs'; import { DocumentType } from '../model/embed/DocumentType.mjs'; interface DocumentFiltersFactory { /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with a specific data owner * that are linked with one of the provided patients. * This Options also allows to restrict the documents based on [Document.created]: * - if the [from] is not null, only the documents where [Document.created] is greater than or equal to [from] will be returned. * - if the [to] is not null, only the documents where [Document.created] is less than or equal to [to] will be returned. * * When using these options the sdk will automatically extract the secret ids from the provided patients and use * those for filtering. * If you already have the secret ids of the patient you may instead use [byOwningEntitySecretIdsCreatedForDataOwner]. * If the current data owner does not have access to any secret id of one of the provide patients the patient will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * These options are sortable. When sorting using these options the documents will be sorted by [Document.created] in ascending or * descending order according to the value of the [descending] parameter. * * @param dataOwnerId a data owner id * @param patients a list of patients. * @param from the minimum value for [Document.created] (default: no limit). * @param to the maximum value for [Document.created] (default: no limit). * @param descending whether to sort the result in descending or ascending order by [Document.created] (default: ascending). */ byPatientsCreatedForDataOwner(dataOwnerId: string, patients: Array, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): SortableFilterOptions; /** * * In group version of [byPatientsCreatedForDataOwner]. */ byPatientsCreatedForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, patients: Array>, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): SortableFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with a specific data owner * that are linked with one of the provided messages. * This Options also allows to restrict the documents based on [Document.created]: * - if the [from] is not null, only the documents where [Document.created] is greater than or equal to [from] will be returned. * - if the [to] is not null, only the documents where [Document.created] is less than or equal to [to] will be returned. * * When using these options the sdk will automatically extract the secret ids from the provided patients and use * those for filtering. * If you already have the secret ids of the message you may instead use [byOwningEntitySecretIdsCreatedForDataOwner]. * If the current data owner does not have access to any secret id of one of the provided messages the message will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * These options are sortable. When sorting using these options the documents will be sorted by [Document.created] in ascending or * descending order according to the value of the [descending] parameter. * * @param dataOwnerId a data owner id * @param messages a list of messages. * @param from the minimum value for [Document.created] (default: no limit). * @param to the maximum value for [Document.created] (default: no limit). * @param descending whether to sort the result in descending or ascending order by [Document.created] (default: ascending). */ byMessagesCreatedForDataOwner(dataOwnerId: string, messages: Array, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): SortableFilterOptions; /** * * In group version of [byMessagesCreatedForDataOwner]. */ byMessagesCreatedForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, messages: Array>, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): SortableFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with the current data owner * that are linked with one of the provided patients. * This Options also allows to restrict the documents based on [Document.created]: * - if the [from] is not null, only the documents where [Document.created] is greater than or equal to [from] will be returned. * - if the [to] is not null, only the documents where [Document.created] is less than or equal to [to] will be returned. * * When using these options the sdk will automatically extract the secret ids from the provided patients and use * those for filtering. * If you already have the secret ids of the patient you may instead use [byOwningEntitySecretIdsCreatedForSelf]. * If the current data owner does not have access to any secret id of one of the provide patients the patient will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * These options are sortable. When sorting using these options the documents will be sorted by [Document.created] in ascending or * descending order according to the value of the [descending] parameter. * * @param patients a list of patients. * @param from the minimum value for [Document.created] (default: no limit). * @param to the maximum value for [Document.created] (default: no limit). * @param descending whether to sort the result in descending or ascending order by [Document.created] (default: ascending). */ byPatientsCreatedForSelf(patients: Array, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): SortableFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with the current data owner * that are linked with one of the provided messages. * This Options also allows to restrict the documents based on [Document.created]: * - if the [from] is not null, only the documents where [Document.created] is greater than or equal to [from] will be returned. * - if the [to] is not null, only the documents where [Document.created] is less than or equal to [to] will be returned. * * When using these options the sdk will automatically extract the secret ids from the provided messages and use * those for filtering. * If you already have the secret ids of the message you may instead use [byOwningEntitySecretIdsCreatedForSelf]. * If the current data owner does not have access to any secret id of one of the provided messages the message will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * These options are sortable. When sorting using these options the documents will be sorted by [Document.created] in ascending or * descending order according to the value of the [descending] parameter. * * @param messages a list of messages. * @param from the minimum value for [Document.created] (default: no limit). * @param to the maximum value for [Document.created] (default: no limit). * @param descending whether to sort the result in descending or ascending order by [Document.created] (default: ascending). */ byMessagesCreatedForSelf(messages: Array, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): SortableFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with a specific owner * that are linked with one of the provided patients through one of the provided secret ids. * This Options also allows to restrict the documents based on [Document.created]: * - if the [from] is not null, only the documents where [Document.created] is greater than or equal to [from] will be returned. * - if the [to] is not null, only the documents where [Document.created] is less than or equal to [to] will be returned. * * If the current data owner does not have access to any secret id of one of the provide patients the patient will * simply be ignored. * * These options are sortable. When sorting using these options the documents will be sorted by [Document.created] in ascending or * descending order according to the value of the [descending] parameter. * * @param dataOwnerId the id of a data owner. * @param secretIds a list of patient secret ids. * @param from the minimum value for [Document.created] (default: no limit). * @param to the maximum value for [Document.created] (default: no limit). * @param descending whether to sort the result in descending or ascending order by [Document.created] (default: ascending). */ byOwningEntitySecretIdsCreatedForDataOwner(dataOwnerId: string, secretIds: Array, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): BaseSortableFilterOptions; byOwningEntitySecretIdsCreatedForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, secretIds: Array, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): BaseSortableFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with the current data owner * that are linked with one of the provided owning entities through one of the provided secret ids. * This Options also allows to restrict the documents based on [Document.created]: * - if the [from] is not null, only the documents where [Document.created] is greater than or equal to [from] will be returned. * - if the [to] is not null, only the documents where [Document.created] is less than or equal to [to] will be returned. * * If the current data owner does not have access to any secret id of one of the provide owning entities the owning entity will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * These options are sortable. When sorting using these options the documents will be sorted by [Document.created] in ascending or * descending order according to the value of the [descending] parameter. * * @param secretIds a list of owning entity secret ids. * @param from the minimum value for [Document.created] (default: no limit). * @param to the maximum value for [Document.created] (default: no limit). * @param descending whether to sort the result in descending or ascending order by [Document.created] (default: ascending). */ byOwningEntitySecretIdsCreatedForSelf(secretIds: Array, options?: { from?: number | undefined; to?: number | undefined; descending?: boolean; }): SortableFilterOptions; /** * * Options for document filter which match all the documents shared directly (i.e. ignoring hierarchies) with a specific data owner * that are linked with of the provided patients and where [Document.documentType] is equal to [documentType]. * * When using these options the sdk will automatically extract the secret ids from the provided patients and use * those for filtering. * If you already have the secret ids of the patient you may instead use [byOwningEntitySecretIdsAndTypeForDataOwner]. * If the current data owner does not have access to any secret id of one of the provided patients the patient will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * @param dataOwnerId the id of a data owner. * @param documentType the document type to search. * @param patients a list of patients. */ byPatientsAndTypeForDataOwner(dataOwnerId: string, documentType: DocumentType, patients: Array): FilterOptions; /** * * In group version of [byPatientsAndTypeForDataOwner]. */ byPatientsAndTypeForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, documentType: DocumentType, patients: Array>): FilterOptions; /** * * Options for document filter which match all the documents shared directly (i.e. ignoring hierarchies) with a specific data owner * that are linked with of the provided messages and where [Document.documentType] is equal to [documentType]. * * When using these options the sdk will automatically extract the secret ids from the provided messages and use * those for filtering. * If you already have the secret ids of the message you may instead use [byOwningEntitySecretIdsAndTypeForDataOwner]. * If the current data owner does not have access to any secret id of one of the provided messages the message will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * @param dataOwnerId the id of a data owner. * @param documentType the document type to search. * @param messages a list of messages. */ byMessagesAndTypeForDataOwner(dataOwnerId: string, documentType: DocumentType, messages: Array): FilterOptions; /** * * In group version of [byMessagesAndTypeForDataOwner]. */ byMessagesAndTypeForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, documentType: DocumentType, messages: Array>): FilterOptions; /** * * Options for document filter which match all the documents shared directly (i.e. ignoring hierarchies) with the current data owner * that are linked with of the provided patients and where [Document.documentType] is equal to [documentType]. * * When using these options the sdk will automatically extract the secret ids from the provided patients and use * those for filtering. * If you already have the secret ids of the patient you may instead use [byOwningEntitySecretIdsAndTypeForSelf]. * If the current data owner does not have access to any secret id of one of the provide patients the patient will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * @param documentType the document type to search. * @param patients a list of patients. */ byPatientsAndTypeForSelf(documentType: DocumentType, patients: Array): FilterOptions; /** * * Options for document filter which match all the documents shared directly (i.e. ignoring hierarchies) with the current data owner * that are linked with of the provided messages and where [Document.documentType] is equal to [documentType]. * * When using these options the sdk will automatically extract the secret ids from the provided messages and use * those for filtering. * If you already have the secret ids of the message you may instead use [byOwningEntitySecretIdsAndTypeForSelf]. * If the current data owner does not have access to any secret id of one of the provide messages the message will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * @param documentType the document type to search. * @param messages a list of messages. */ byMessagesAndTypeForSelf(documentType: DocumentType, messages: Array): FilterOptions; /** * * Options for document filter which match all the documents shared directly (i.e. ignoring hierarchies) with a specific data owner * that are linked with of the provided owning entities through one of the provided secret ids and where [Document.documentType] is equal * to [documentType]. * * If the current data owner does not have access to any secret id of one of the provided owning entities the owning entity will * simply be ignored. * * @param dataOwnerId the id of a data owner. * @param documentType the document type to search. * @param secretIds a list of patient secret ids. */ byOwningEntitySecretIdsAndTypeForDataOwner(dataOwnerId: string, documentType: DocumentType, secretIds: Array): FilterOptions; /** * * In group version of [byOwningEntitySecretIdsAndTypeForDataOwner]. */ byOwningEntitySecretIdsAndTypeForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, documentType: DocumentType, secretIds: Array): FilterOptions; /** * * Options for document filter which match all the documents shared directly (i.e. ignoring hierarchies) with the current data owner * that are linked with of the provided owning entities through one of the provided secret ids and where [Document.documentType] is equal * to [documentType]. * * If the current data owner does not have access to any secret id of one of the provide owning entities the owning entity will * simply be ignored. * Note that these may not be used in methods of apis from [CardinalBaseApis]. * * @param documentType the document type to search. * @param secretIds a list of patient secret ids. */ byOwningEntitySecretIdsAndTypeForSelf(documentType: DocumentType, secretIds: Array): FilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with a specific data owner that have a certain code. * If you specify only the [codeType] you will get all entities that have at least a code of that type. * * @param dataOwnerId a data owner id * @param codeType a code type * @param codeCode a code for the provided code type, or null if you want the filter to accept any entity * with a code of the provided type. */ byCodeForDataOwner(dataOwnerId: string, codeType: string, options?: { codeCode?: string | undefined; }): BaseFilterOptions; /** * * In group version of [byCodeForDataOwner]. */ byCodeForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, codeType: string, options?: { codeCode?: string | undefined; }): BaseFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with the current data owner that have a certain code. * If you specify only the [codeType] you will get all entities that have at least a code of that type. * * These options are sortable. When sorting using these options the documents will be sorted by [codeCode]. * * @param codeType a code type * @param codeCode a code for the provided code type, or null if you want the filter to accept any entity * with a code of the provided type. */ byCodeForSelf(codeType: string, options?: { codeCode?: string | undefined; }): SortableFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with a specific data owner that have a certain tag. * If you specify only the [tagType] you will get all entities that have at least a tag of that type. * * @param dataOwnerId a data owner id * @param tagType a tag type * @param tagCode a code for the provided tag type, or null if you want the filter to accept any entity * with a tag of the provided type. */ byTagForDataOwner(dataOwnerId: string, tagType: string, options?: { tagCode?: string | undefined; }): BaseFilterOptions; /** * * In group version of [byTagForDataOwner]. */ byTagForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, tagType: string, options?: { tagCode?: string | undefined; }): BaseFilterOptions; /** * * Options for document filtering which match all documents shared directly (i.e. ignoring hierarchies) with the current data owner that have a certain tag. * If you specify only the [tagType] you will get all entities that have at least a tag of that type. * * @param tagType a tag type * @param tagCode a code for the provided tag type, or null if you want the filter to accept any entity * with a tag of the provided type. */ byTagForSelf(tagType: string, options?: { tagCode?: string | undefined; }): FilterOptions; } export declare const DocumentFilters: DocumentFiltersFactory; export {};