Skip to content

Commit

Permalink
Fix on service
Browse files Browse the repository at this point in the history
  • Loading branch information
TestaDiRapa committed Jan 30, 2025
1 parent 4cc68e5 commit 527b406
Showing 1 changed file with 123 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,126 +23,128 @@ import org.taktik.icure.pagination.PaginationElement

@Service
class InvoiceServiceImpl(
private val invoiceLogic: InvoiceLogic
private val invoiceLogic: InvoiceLogic
) : InvoiceService {
override suspend fun createInvoice(invoice: Invoice): Invoice? = invoiceLogic.createInvoice(invoice)

override suspend fun getInvoice(invoiceId: String): Invoice? = invoiceLogic.getInvoice(invoiceId)

override fun getInvoices(ids: List<String>): Flow<Invoice> = invoiceLogic.getInvoices(ids)

override suspend fun modifyInvoice(invoice: Invoice): Invoice? = invoiceLogic.modifyInvoice(invoice)

override fun modifyInvoices(invoices: List<Invoice>): Flow<Invoice> = invoiceLogic.modifyEntities(invoices)

override suspend fun addDelegation(invoiceId: String, delegation: Delegation): Invoice? = invoiceLogic.addDelegation(invoiceId, delegation)
override fun findInvoicesByAuthor(
hcPartyId: String,
fromDate: Long?,
toDate: Long?,
paginationOffset: PaginationOffset<ComplexKey>
): Flow<PaginationElement> = invoiceLogic.findInvoicesByAuthor(hcPartyId, fromDate, toDate, paginationOffset)
override fun listInvoicesByHcPartyContacts(hcPartyId: String, contactIds: Set<String>): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyContacts(hcPartyId, contactIds)

override fun listInvoicesByHcPartyAndRecipientIds(hcPartyId: String, recipientIds: Set<String?>): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndRecipientIds(hcPartyId, recipientIds)
@Suppress("DEPRECATION")
@Deprecated("This method cannot include results with secure delegations, use listInvoiceIdsByDataOwnerPatientInvoiceDate instead")
override fun listInvoicesByHcPartyAndPatientSfks(hcPartyId: String, secretPatientKeys: Set<String>): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndPatientSfks(hcPartyId, secretPatientKeys)
override fun listInvoiceIdsByDataOwnerPatientInvoiceDate(
dataOwnerId: String,
secretForeignKeys: Set<String>,
startDate: Long?,
endDate: Long?,
descending: Boolean
): Flow<String> = invoiceLogic.listInvoiceIdsByDataOwnerPatientInvoiceDate(dataOwnerId, secretForeignKeys, startDate, endDate, descending)
override fun listInvoicesByHcPartySentMediumTypeInvoiceTypeSentDate(
hcPartyId: String,
sentMediumType: MediumType,
invoiceType: InvoiceType,
sent: Boolean,
fromDate: Long?,
toDate: Long?
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartySentMediumTypeInvoiceTypeSentDate(hcPartyId, sentMediumType, invoiceType, sent, fromDate, toDate)

override fun listInvoicesByHcPartySendingModeStatus(
hcPartyId: String,
sendingMode: String?,
status: String?,
fromDate: Long?,
toDate: Long?
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartySendingModeStatus(hcPartyId, sendingMode, status, fromDate, toDate)

override fun listInvoicesByHcPartyAndGroupId(hcPartyId: String, inputGroupId: String): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndGroupId(hcPartyId, inputGroupId)

override fun listInvoicesByHcPartyAndRecipientIdsUnsent(
hcPartyId: String,
recipientIds: Set<String?>
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndRecipientIdsUnsent(hcPartyId, recipientIds)

override fun listInvoicesByHcPartyAndPatientSksUnsent(
hcPartyId: String,
secretPatientKeys: Set<String>
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndPatientSksUnsent(hcPartyId, secretPatientKeys)

override fun listInvoicesByServiceIds(serviceIds: Set<String>): Flow<Invoice> = invoiceLogic.listInvoicesByServiceIds(serviceIds)

override suspend fun mergeInvoices(hcPartyId: String, invoicesIds: List<String>, destination: Invoice?): Invoice? = invoiceLogic.mergeInvoices(hcPartyId, getInvoices(invoicesIds).toList(), destination)

override suspend fun validateInvoice(
hcPartyId: String,
invoice: Invoice,
refScheme: String,
forcedValue: String?
): Invoice? = invoiceLogic.validateInvoice(hcPartyId, invoice, refScheme, forcedValue)

override fun appendCodes(
hcPartyId: String,
userId: String,
insuranceId: String?,
secretPatientKeys: Set<String>,
type: InvoiceType,
sentMediumType: MediumType,
invoicingCodes: List<InvoicingCode>,
invoiceId: String?,
invoiceGraceTime: Int?
): Flow<Invoice> = invoiceLogic.appendCodes(hcPartyId, userId, insuranceId, secretPatientKeys, type, sentMediumType, invoicingCodes, invoiceId, invoiceGraceTime)

override suspend fun addDelegations(invoiceId: String, delegations: List<Delegation>): Invoice? = invoiceLogic.addDelegations(invoiceId, delegations)

override fun removeCodes(
userId: String,
secretPatientKeys: Set<String>,
serviceId: String,
inputTarificationIds: List<String>
): Flow<Invoice> = invoiceLogic.removeCodes(userId, secretPatientKeys, serviceId, inputTarificationIds)

override fun listInvoicesHcpsByStatus(status: String, from: Long?, to: Long?, hcpIds: List<String>): Flow<Invoice> = invoiceLogic.listInvoicesHcpsByStatus(status, from, to, hcpIds)

override fun solveConflicts(limit: Int?, ids: List<String>?) = invoiceLogic.solveConflicts(limit, ids)

override suspend fun getTarificationsCodesOccurrences(
hcPartyId: String,
minOccurrences: Long
): List<LabelledOccurence> = invoiceLogic.getTarificationsCodesOccurrences(hcPartyId, minOccurrences)

override fun listInvoicesIdsByTarificationsByCode(
hcPartyId: String,
codeCode: String,
startValueDate: Long,
endValueDate: Long
): Flow<String> = invoiceLogic.listInvoicesIdsByTarificationsByCode(hcPartyId, codeCode, startValueDate, endValueDate)

override fun filter(filter: FilterChain<Invoice>): Flow<Invoice> = invoiceLogic.filter(filter)

override fun getInvoicesForUsersAndInsuranceIds(userIds: List<String>?): Flow<Invoice> = invoiceLogic.getInvoicesForUsersAndInsuranceIds(userIds)

override fun getUnsentInvoicesForUsersAndInsuranceIds(userIds: List<String>?): Flow<Invoice> = invoiceLogic.getUnsentInvoicesForUsersAndInsuranceIds(userIds)

override fun createInvoices(invoices: Collection<Invoice>): Flow<Invoice> = invoiceLogic.createEntities(invoices)
override fun matchInvoicesBy(filter: AbstractFilter<Invoice>): Flow<String> = invoiceLogic.matchEntitiesBy(filter)
override fun deleteInvoices(ids: List<IdAndRev>): Flow<DocIdentifier> = invoiceLogic.deleteEntities(ids)
override suspend fun deleteInvoice(id: String, rev: String?): DocIdentifier = invoiceLogic.deleteEntity(id, rev)
override suspend fun purgeInvoice(id: String, rev: String): DocIdentifier = invoiceLogic.purgeEntity(id, rev)
override suspend fun undeleteInvoice(id: String, rev: String): Invoice = invoiceLogic.undeleteEntity(id, rev)
override fun bulkShareOrUpdateMetadata(requests: BulkShareOrUpdateMetadataParams): Flow<EntityBulkShareResult<Invoice>> = invoiceLogic.bulkShareOrUpdateMetadata(requests)
override suspend fun createInvoice(invoice: Invoice): Invoice? = invoiceLogic.createInvoice(invoice)

override suspend fun getInvoice(invoiceId: String): Invoice? = invoiceLogic.getInvoice(invoiceId)

override fun getInvoices(ids: List<String>): Flow<Invoice> = invoiceLogic.getInvoices(ids)

override suspend fun modifyInvoice(invoice: Invoice): Invoice? = invoiceLogic.modifyInvoice(invoice)

override fun modifyInvoices(invoices: List<Invoice>): Flow<Invoice> = invoiceLogic.modifyEntities(invoices)

override suspend fun addDelegation(invoiceId: String, delegation: Delegation): Invoice? = invoiceLogic.addDelegation(invoiceId, delegation)
override fun findInvoicesByAuthor(
hcPartyId: String,
fromDate: Long?,
toDate: Long?,
paginationOffset: PaginationOffset<ComplexKey>
): Flow<PaginationElement> = invoiceLogic.findInvoicesByAuthor(hcPartyId, fromDate, toDate, paginationOffset)
override fun listInvoicesByHcPartyContacts(hcPartyId: String, contactIds: Set<String>): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyContacts(hcPartyId, contactIds)

override fun listInvoicesByHcPartyAndRecipientIds(hcPartyId: String, recipientIds: Set<String?>): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndRecipientIds(hcPartyId, recipientIds)
@Suppress("DEPRECATION")
@Deprecated("This method cannot include results with secure delegations, use listInvoiceIdsByDataOwnerPatientInvoiceDate instead")
override fun listInvoicesByHcPartyAndPatientSfks(hcPartyId: String, secretPatientKeys: Set<String>): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndPatientSfks(hcPartyId, secretPatientKeys)
override fun listInvoiceIdsByDataOwnerDecisionReference(dataOwnerId: String, decisionReference: String): Flow<String> = invoiceLogic.listInvoiceIdsByDataOwnerDecisionReference(dataOwnerId, decisionReference)

override fun listInvoiceIdsByDataOwnerPatientInvoiceDate(
dataOwnerId: String,
secretForeignKeys: Set<String>,
startDate: Long?,
endDate: Long?,
descending: Boolean
): Flow<String> = invoiceLogic.listInvoiceIdsByDataOwnerPatientInvoiceDate(dataOwnerId, secretForeignKeys, startDate, endDate, descending)
override fun listInvoicesByHcPartySentMediumTypeInvoiceTypeSentDate(
hcPartyId: String,
sentMediumType: MediumType,
invoiceType: InvoiceType,
sent: Boolean,
fromDate: Long?,
toDate: Long?
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartySentMediumTypeInvoiceTypeSentDate(hcPartyId, sentMediumType, invoiceType, sent, fromDate, toDate)

override fun listInvoicesByHcPartySendingModeStatus(
hcPartyId: String,
sendingMode: String?,
status: String?,
fromDate: Long?,
toDate: Long?
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartySendingModeStatus(hcPartyId, sendingMode, status, fromDate, toDate)

override fun listInvoicesByHcPartyAndGroupId(hcPartyId: String, inputGroupId: String): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndGroupId(hcPartyId, inputGroupId)

override fun listInvoicesByHcPartyAndRecipientIdsUnsent(
hcPartyId: String,
recipientIds: Set<String?>
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndRecipientIdsUnsent(hcPartyId, recipientIds)

override fun listInvoicesByHcPartyAndPatientSksUnsent(
hcPartyId: String,
secretPatientKeys: Set<String>
): Flow<Invoice> = invoiceLogic.listInvoicesByHcPartyAndPatientSksUnsent(hcPartyId, secretPatientKeys)

override fun listInvoicesByServiceIds(serviceIds: Set<String>): Flow<Invoice> = invoiceLogic.listInvoicesByServiceIds(serviceIds)

override suspend fun mergeInvoices(hcPartyId: String, invoicesIds: List<String>, destination: Invoice?): Invoice? = invoiceLogic.mergeInvoices(hcPartyId, getInvoices(invoicesIds).toList(), destination)

override suspend fun validateInvoice(
hcPartyId: String,
invoice: Invoice,
refScheme: String,
forcedValue: String?
): Invoice? = invoiceLogic.validateInvoice(hcPartyId, invoice, refScheme, forcedValue)

override fun appendCodes(
hcPartyId: String,
userId: String,
insuranceId: String?,
secretPatientKeys: Set<String>,
type: InvoiceType,
sentMediumType: MediumType,
invoicingCodes: List<InvoicingCode>,
invoiceId: String?,
invoiceGraceTime: Int?
): Flow<Invoice> = invoiceLogic.appendCodes(hcPartyId, userId, insuranceId, secretPatientKeys, type, sentMediumType, invoicingCodes, invoiceId, invoiceGraceTime)

override suspend fun addDelegations(invoiceId: String, delegations: List<Delegation>): Invoice? = invoiceLogic.addDelegations(invoiceId, delegations)

override fun removeCodes(
userId: String,
secretPatientKeys: Set<String>,
serviceId: String,
inputTarificationIds: List<String>
): Flow<Invoice> = invoiceLogic.removeCodes(userId, secretPatientKeys, serviceId, inputTarificationIds)

override fun listInvoicesHcpsByStatus(status: String, from: Long?, to: Long?, hcpIds: List<String>): Flow<Invoice> = invoiceLogic.listInvoicesHcpsByStatus(status, from, to, hcpIds)

override fun solveConflicts(limit: Int?, ids: List<String>?) = invoiceLogic.solveConflicts(limit, ids)

override suspend fun getTarificationsCodesOccurrences(
hcPartyId: String,
minOccurrences: Long
): List<LabelledOccurence> = invoiceLogic.getTarificationsCodesOccurrences(hcPartyId, minOccurrences)

override fun listInvoicesIdsByTarificationsByCode(
hcPartyId: String,
codeCode: String,
startValueDate: Long,
endValueDate: Long
): Flow<String> = invoiceLogic.listInvoicesIdsByTarificationsByCode(hcPartyId, codeCode, startValueDate, endValueDate)

override fun filter(filter: FilterChain<Invoice>): Flow<Invoice> = invoiceLogic.filter(filter)

override fun getInvoicesForUsersAndInsuranceIds(userIds: List<String>?): Flow<Invoice> = invoiceLogic.getInvoicesForUsersAndInsuranceIds(userIds)

override fun getUnsentInvoicesForUsersAndInsuranceIds(userIds: List<String>?): Flow<Invoice> = invoiceLogic.getUnsentInvoicesForUsersAndInsuranceIds(userIds)

override fun createInvoices(invoices: Collection<Invoice>): Flow<Invoice> = invoiceLogic.createEntities(invoices)
override fun matchInvoicesBy(filter: AbstractFilter<Invoice>): Flow<String> = invoiceLogic.matchEntitiesBy(filter)
override fun deleteInvoices(ids: List<IdAndRev>): Flow<DocIdentifier> = invoiceLogic.deleteEntities(ids)
override suspend fun deleteInvoice(id: String, rev: String?): DocIdentifier = invoiceLogic.deleteEntity(id, rev)
override suspend fun purgeInvoice(id: String, rev: String): DocIdentifier = invoiceLogic.purgeEntity(id, rev)
override suspend fun undeleteInvoice(id: String, rev: String): Invoice = invoiceLogic.undeleteEntity(id, rev)
override fun bulkShareOrUpdateMetadata(requests: BulkShareOrUpdateMetadataParams): Flow<EntityBulkShareResult<Invoice>> = invoiceLogic.bulkShareOrUpdateMetadata(requests)
}

0 comments on commit 527b406

Please sign in to comment.