import { Observable } from 'rxjs'; import { ChildService, CRUDChildService, UpdateOptions, CRUDServiceItem } from '../utils'; import { AuthService } from '../auth'; /** ----------- ACCOUNTS ----------- */ export class AccountInvitationService extends CRUDChildService { accept (query: string | object, opts?: UpdateOptions): Promise; } export class AccountTaskService extends CRUDChildService { markDone (query: string | object, opts?: UpdateOptions): Promise; } export interface AccountNamespace { invitations(): AccountInvitationService; tasks(): AccountTaskService; configurations(): CRUDChildService; } /** ----------- APPOINTMENTS ----------- */ export class AppointmentService extends CRUDChildService { markArrival (query: string | object, opts?: UpdateOptions): Promise; cancel (query: string | object, opts?: UpdateOptions): Promise; } /** ----------- BILLING ----------- */ export interface BilInvAnaliticsByCoverage { date?: any; [key: string]: number; } export class BillingInvoiceService extends CRUDChildService { finalize (query: string | object, opts?: UpdateOptions): Promise; analyticsByCoverage (query: object, group?: boolean): Promise; } export interface BilItemAnaliticsByServiceType { date?: any; [key: string]: number; } export class BillingItemService extends CRUDChildService { finalize (query: string | object, opts?: UpdateOptions): Promise; analyticsByServiceType (query: object, group?: boolean): Promise; } export interface BillingNamespace { expenses(): BillingInvoiceService; invoices(): BillingInvoiceService; items(): BillingItemService; payments(): CRUDChildService; promos(): CRUDChildService; soas(): CRUDChildService; } /** ----------- CHAT ----------- */ export interface ChatNamespace { messages(): CRUDChildService; rooms(): CRUDChildService; sessions(): CRUDChildService; } /** ----------- Clock ----------- */ export class ClockService extends CRUDChildService { end (id: string, opts?: UpdateOptions): Promise; } /** ----------- FORMS ----------- */ export interface FormNamespace { templates(): CRUDChildService; } /** ----------- HL7 ----------- */ export interface HL7Namespace { messages(): CRUDChildService; } /** ----------- Insurance ----------- */ export interface InsuranceNamespace { companies(): CRUDChildService; contracts(): CRUDChildService; coverages(): CRUDChildService; } /** ----------- Diagnostic ----------- */ export class DiagnosticOrderService extends CRUDChildService { finalize (query: string | object, opts?: UpdateOptions): Promise; verify (query: string | object, opts?: UpdateOptions): Promise; sendOut (query: string | object, opts?: UpdateOptions): Promise; } export interface DiagnosticNamespace extends CRUDChildService { analyzers(): CRUDChildService; labs(): CRUDChildService; orders(): DiagnosticOrderService; orderTests(): CRUDChildService; orderTestsReports(): CRUDChildService; packages(): CRUDChildService; tests(): CRUDChildService; measures(): CRUDChildService; } /** ----------- MEDICAL FACILITY ----------- */ export interface MFEncAnaliticsByReturnType { date?: any; [key: string]: number; } export class MedicalEncounterService extends CRUDChildService { finish (query: string | object, opts?: UpdateOptions): Promise; analyticsByReturnType (query: object, group?: boolean): Promise; } export class MedicalPatientService extends CRUDChildService { archive (query: string | object, opts?: UpdateOptions): Promise; } export class MedicalRecordService extends CRUDChildService { finalize (query: string | object, opts?: UpdateOptions): Promise; } export interface MedicalNamespace { facilities(): CRUDChildService; encounters(): MedicalEncounterService; patients(): MedicalPatientService; records(): MedicalRecordService; } /** ----------- MEDICINES ----------- */ export interface MedicineNamespace { medicines(): CRUDChildService; configurations(): CRUDChildService; formulations(): CRUDChildService; } /** ----------- NOTIFICATIONS ----------- */ export interface NotificationService extends CRUDChildService { getDeviceToken$(VAPIDKey?: string): Observable; setPublicVAPIDKey(key: string): void; } /** ----------- ORGANIZATIONS ----------- */ export class OrganizationMemberService extends CRUDChildService { transfer (id: string, organization: string, opts?: UpdateOptions): Promise; } export interface OrganizationNamespace { members(): OrganizationMemberService; layouts(): CRUDChildService; partners(): CRUDChildService; } /** ----------- QUEUES ----------- */ export class QueueService extends CRUDChildService { finish (query: string | object, opts?: UpdateOptions): Promise; defer (query: string | object, opts?: UpdateOptions): Promise; } export class QueueItemService extends CRUDChildService { finish (query: string | object, opts?: UpdateOptions): Promise; defer (query: string | object, opts?: UpdateOptions): Promise; requeue (query: string | object, opts?: UpdateOptions): Promise; } export interface QueueNamespace { queues(): QueueService; items(): QueueItemService; } /** ----------- SYSTEM ---s-------- */ export interface ServiceNamespace { services(): CRUDChildService; providers(): CRUDChildService; performed(): CRUDChildService; } /** ----------- SYSTEM ----------- */ export interface SystemNamespace { counters(): CRUDChildService; syncbases(): CRUDChildService; } /** ----------- WARDS ----------- */ export class WardOccupantService extends CRUDChildService { discharge (query: string | object, opts?: UpdateOptions): Promise; } export interface WardNamespace { beds(): CRUDChildService; occupants(): WardOccupantService; rooms(): CRUDChildService; } /** ----------- Inventory ----------- */ export class InventoryWarehouseService extends CRUDChildService { createTaxType (id: string, data: object, opts?: UpdateOptions): Promise; removeTaxType (id: string, code: string, opts?: UpdateOptions): Promise; createPricing (id: string, data: object, opts?: UpdateOptions): Promise; removePricing (id: string, code: string, opts?: UpdateOptions): Promise; createPaymentMethod (id: string, data: object, opts?: UpdateOptions): Promise; removePaymentMethod (id: string, code: string, opts?: UpdateOptions): Promise; createStockAdjustmentReason (id: string, data: string, opts?: UpdateOptions): Promise; removeStockAdjustmentReason (id: string, reason: string, opts?: UpdateOptions): Promise; createProductCategory (id: string, data: string, opts?: UpdateOptions): Promise; removeProductCategory (id: string, category: string, opts?: UpdateOptions): Promise; createProductType (id: string, data: string, opts?: UpdateOptions): Promise; removeProductType (id: string, type: string, opts?: UpdateOptions): Promise; createBrand (id: string, data: string, opts?: UpdateOptions): Promise; createBrand (id: string, brand: string, opts?: UpdateOptions): Promise; } export class InventoryProductService extends CRUDChildService { createProductCategory (id: string, data: string, opts?: UpdateOptions): Promise; removeProductCategory (id: string, category: string, opts?: UpdateOptions): Promise; createProductType (id: string, data: string, opts?: UpdateOptions): Promise; removeProductType (id: string, type: string, opts?: UpdateOptions): Promise; createBrand (id: string, data: string, opts?: UpdateOptions): Promise; removeBrand (id: string, brand: string, opts?: UpdateOptions): Promise; } export class InventoryTransactionService extends CRUDChildService { approve (query: string | object, opts?: UpdateOptions): Promise; ship (query: string | object, opts?: UpdateOptions): Promise; } export class InventoryVariantService extends CRUDChildService { createTaxType (sku: string, data: object, opts?: UpdateOptions): Promise; removeTaxType (sku: string, code: string, opts?: UpdateOptions): Promise; createPricing (sku: string, data: object, opts?: UpdateOptions): Promise; removePricing (sku: string, code: string, opts?: UpdateOptions): Promise; } export interface InventoryNamespace { warehouses(): InventoryWarehouseService; products(): InventoryProductService; suppliers(): CRUDChildService; trackers(): CRUDChildService; transactions(): InventoryTransactionService; variants(): InventoryVariantService; variantReports(): InventoryVariantService; stocks(): CRUDChildService; stockConfigurations(): CRUDChildService; } export interface SubscriptionNamespace { events(): CRUDChildService; products(): CRUDChildService; } export interface PharmacyNamespace { medicationOrders(): CRUDChildService; } export declare abstract class Services { account: AccountNamespace; billing: BillingNamespace; chat: ChatNamespace; diagnostic: DiagnosticNamespace; form: FormNamespace; hl7: HL7Namespace; insurance: InsuranceNamespace; medical: MedicalNamespace; medicine: MedicineNamespace; organization: OrganizationNamespace; queue: QueueNamespace; serv: ServiceNamespace; system: SystemNamespace; ward: WardNamespace; inventory: InventoryNamespace; subscription: SubscriptionNamespace; pharmacy: PharmacyNamespace; auth: () => AuthService; accounts: () => CRUDChildService; actionCodes: () => CRUDChildService; activityLogs: () => CRUDChildService; appointments: () => AppointmentService; clocks: () => ClockService; fixtures(): CRUDChildService; mailer: () => CRUDChildService; reminders: () => CRUDChildService; sms: () => CRUDChildService; notifications: () => NotificationService; organizations: () => CRUDChildService; personalDetails: () => CRUDChildService; subscriptions: () => CRUDChildService; // get/set service service(name: string, service?: ChildService): T; }