{"version":3,"sources":["webpack:///src/C:/BuildAgent/work/709799f7b218f10/src/services/claims-service.ts"],"names":["ClaimsService","httpClient","_baseUrl","this","_httpClient","newClaim","build","useMethod","useBody","fetch","query","useQueryString","claimId","claim","fetchNoContent","ids","locationIds","fetchBlob","payorId","adjustment","automaticAdjustment"],"mappings":"84CAiCaA,EAAb,WAII,WAAmBC,I,4FAAyB,SAFpC,KAAAC,SAAmB,gBAGvBC,KAAKC,YAAcH,CACtB,C,UANL,O,EAAA,G,EAAA,mCAQ6BI,G,kJACd,O,SAAMF,KAAKC,YAAYE,MAAjB,UAA0BH,KAAKD,WAAYK,UAAU,QAAQC,QAAQH,GAAUI,Q,uFAC/F,GAVL,sCAYiCC,G,kJAClB,O,SAAMP,KAAKC,YAAYE,MAAjB,UAA0BH,KAAKD,WAAYS,eAAeD,GAAOD,Q,uFACjF,GAdL,4CAgBuCG,G,kJACxB,O,SAAMT,KAAKC,YAAYE,MAAjB,UAA0BH,KAAKD,SAA/B,YAA2CU,IAAWH,Q,uFACtE,GAlBL,2CAoBsCG,G,kJACvB,O,SAAMT,KAAKC,YAAYE,MAAjB,UAA0BH,KAAKD,SAA/B,YAA2CU,IAAWH,Q,uFACtE,GAtBL,iCAwB4BG,G,kJACb,O,SAAMT,KAAKC,YAAYE,MAAjB,UAA0BH,KAAKD,SAA/B,YAA2CU,IAAWH,Q,uFACtE,GA1BL,+CA4B0CG,EAAiBF,G,kJAC5C,O,SAAMP,KAAKC,YACbE,MADQ,UACCH,KAAKD,SADN,YACkBU,EADlB,YAERL,UAAU,QACVC,QAAQE,GACRD,Q,uFACR,GAlCL,8CAoCyCG,EAAiBF,G,kJAC3C,O,SAAMP,KAAKC,YACbE,MADQ,UACCH,KAAKD,SADN,YACkBU,EADlB,YAERL,UAAU,QACVC,QAAQE,GACRD,Q,uFACR,GA1CL,oCA4C+BG,EAAiBF,G,kJACjC,O,SAAMP,KAAKC,YACbE,MADQ,UACCH,KAAKD,SADN,YACkBU,EADlB,YAER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BH,KAAKD,SAA/B,uBAA6DS,eAAeD,GAAOO,Y,uFACnG,GAxLL,2CA0LsCL,EAAiBF,G,kJACxC,O,SAAMP,KAAKC,YACbE,MADQ,UACCH,KAAKD,SADN,YACkBU,EADlB,iBAERD,eAAeD,GACfD,Q,uFACR,GA/LL,wCAiMmCG,EAAiBF,G,kJACrC,O,SAAMP,KAAKC,YACbE,MADQ,UACCH,KAAKD,SADN,YACkBU,EADlB,cAERD,eAAeD,GACfD,Q,uFACR,GAtML,wCAwMmCG,EAAiBO,G,kJACrC,O,SAAMhB,KAAKC,YACbE,MADQ,UACCH,KAAKD,SADN,YACkBU,EADlB,iBAERL,UAAU,QACVC,QAAQW,GACRL,iB,uFACR,GA9ML,+CAgN0CM,G,kJAC3B,O,SAAMjB,KAAKC,YACbE,MADQ,UACCH,KAAKD,SADN,yBAERK,UAAU,QACVC,QAAQY,GACRN,iB,uFACR,M,2BAtNL,KAAad,EAAa,GADzB,uB,uBAK+C,mB,OAAA,IAAb,kCAAa,YAJnCA,E","file":"chunk.0fa65a9acbd1cb37ce56.js","sourcesContent":["import { autoinject } from \"aurelia-framework\";\r\n\r\nimport { HospiceClient } from \"../common/hospice-client\";\r\nimport {\r\n IClaimReloadQuery,\r\n IGetClaimsByPageQuery,\r\n IGetClaimsByPageResult,\r\n IGetClaimsReadyForBilling,\r\n ISubmitClaimsQuery,\r\n IValidateClaimResponse,\r\n IGetCollectionsQuery,\r\n IGetCollections,\r\n IGetClaimAdjustmentItems,\r\n IGetClaimPaymentItems,\r\n IGetClaimAdjustmentsQuery,\r\n IGetClaimPaymentsQuery,\r\n ICreateAdjustment,\r\n IVerifyClaimsQuery,\r\n IToggleClaimsQuery,\r\n ICreateAutomaticAdjustment,\r\n IGetClaimBillTypesByLocationRequest\r\n} from \"../interfaces/billing/i-claim\";\r\nimport { IClaimBillTypesQuery } from \"../interfaces/billing/i-professional-claim\";\r\nimport { IGetClaimByPayerQuery, IGetClaimByPayerResult } from \"../interfaces/i-claim-by-payor\";\r\nimport { IClaimStatusCount, IDeleteBillingHistory } from \"./i-billing-service\";\r\nimport { Claim } from \"../models/claim\";\r\nimport { NewClaim } from \"../models/new-claim\";\r\nimport { ProfessionalClaim } from \"../models/professional-claim\";\r\nimport { ICbsaServiceLineQuery, ICbsaServiceLineResponse } from \"./../interfaces/billing/i-claim\";\r\nimport { Invoice } from \"../models/invoice\";\r\nimport { IPaginationNew } from \"../interfaces/i-pagination\";\r\n\r\n@autoinject()\r\nexport class ClaimsService {\r\n private _httpClient: HospiceClient;\r\n private _baseUrl: string = \"/api/v1/claim\";\r\n\r\n public constructor(httpClient: HospiceClient) {\r\n this._httpClient = httpClient;\r\n }\r\n\r\n public async createClaim(newClaim: NewClaim) {\r\n return await this._httpClient.build(`${this._baseUrl}`).useMethod(\"POST\").useBody(newClaim).fetch();\r\n }\r\n\r\n public async getClaimsByPage(query: IGetClaimsByPageQuery) {\r\n return await this._httpClient.build(`${this._baseUrl}`).useQueryString(query).fetch();\r\n }\r\n\r\n public async getInstitutionalClaim(claimId: string) {\r\n return await this._httpClient.build(`${this._baseUrl}/${claimId}`).fetch();\r\n }\r\n\r\n public async getProfessionalClaim(claimId: string) {\r\n return await this._httpClient.build(`${this._baseUrl}/${claimId}`).fetch();\r\n }\r\n\r\n public async getInvoice(claimId: string) {\r\n return await this._httpClient.build(`${this._baseUrl}/${claimId}`).fetch();\r\n }\r\n\r\n public async reloadInstitutionalClaim(claimId: string, query: IClaimReloadQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/reload`)\r\n .useMethod(\"POST\")\r\n .useBody(query)\r\n .fetch();\r\n }\r\n\r\n public async reloadProfessionalClaim(claimId: string, query: IClaimReloadQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/reload`)\r\n .useMethod(\"POST\")\r\n .useBody(query)\r\n .fetch();\r\n }\r\n\r\n public async reloadInvoice(claimId: string, query: IClaimReloadQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/reload`)\r\n .useMethod(\"POST\")\r\n .useBody(query)\r\n .fetch();\r\n }\r\n\r\n public async verifyInstitutionalClaim(claimId: string, claim: Claim) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}`)\r\n .useMethod(\"PUT\")\r\n .useBody(claim)\r\n .fetchNoContent();\r\n }\r\n\r\n public async verifyProfessionalClaim(claimId: string, claim: ProfessionalClaim) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}`)\r\n .useMethod(\"PUT\")\r\n .useBody(claim)\r\n .fetchNoContent();\r\n }\r\n\r\n public async verifyInvoice(claimId: string, claim: Invoice) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}`)\r\n .useMethod(\"PUT\")\r\n .useBody(claim)\r\n .fetchNoContent();\r\n }\r\n\r\n public async submitClaims(ids: ISubmitClaimsQuery) {\r\n return await this._httpClient.build(`${this._baseUrl}/submit`).useMethod(\"PUT\").useBody(ids).fetchNoContent();\r\n }\r\n\r\n public async bulkVerifyClaims(ids: IVerifyClaimsQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/bulk-verify`)\r\n .useMethod(\"PUT\")\r\n .useBody(ids)\r\n .fetchNoContent();\r\n }\r\n\r\n public async toggleHoldClaims(query: IToggleClaimsQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/toggle-hold`)\r\n .useMethod(\"POST\")\r\n .useBody(query)\r\n .fetchNoContent();\r\n }\r\n\r\n public async getClaimsReadyForBilling(locationIds?: string[]) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/readyforbilling`)\r\n .useQueryString({ locationIds })\r\n .fetch();\r\n }\r\n\r\n public async printInstitutionalClaim(claimId: string) {\r\n return await this._httpClient.build(`${this._baseUrl}/${claimId}/institutional/print`).fetchBlob();\r\n }\r\n\r\n public async printProfessionalClaim(claimId: string) {\r\n return await this._httpClient.build(`${this._baseUrl}/${claimId}/professional/print`).fetchBlob();\r\n }\r\n\r\n public async printInvoice(claimId: string) {\r\n return await this._httpClient.build(`${this._baseUrl}/${claimId}/invoice/print`).fetchBlob();\r\n }\r\n\r\n public async deleteClaims(claim: IDeleteBillingHistory) {\r\n return await this._httpClient.build(`${this._baseUrl}`).useMethod(\"DELETE\").useBody(claim).fetchNoContent();\r\n }\r\n\r\n public async getClaimByPayor(query: IGetClaimByPayerQuery, payorId: string) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/payor/${payorId}`)\r\n .useQueryString(query)\r\n .fetch();\r\n }\r\n\r\n public async getClaimSummaryCount(locationIds: string[]) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/claimcountsummary`)\r\n .useQueryString({ locationIds })\r\n .fetch();\r\n }\r\n\r\n public async validateInstitutionalClaim(claimId: string) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/validate`)\r\n .useMethod(\"POST\")\r\n .fetch();\r\n }\r\n\r\n public async validateProfessionalClaim(claimId: string) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/validate`)\r\n .useMethod(\"POST\")\r\n .fetch();\r\n }\r\n\r\n public async validateInvoice(claimId: string) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/validate`)\r\n .useMethod(\"POST\")\r\n .fetch();\r\n }\r\n\r\n public async getCbsaServiceLine(query: ICbsaServiceLineQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/cbsa-service-line`)\r\n .useQueryString(query)\r\n .fetch();\r\n }\r\n\r\n public async getClaimBillTypesByPayer(query: IClaimBillTypesQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/types-of-bill/payer`)\r\n .useQueryString(query)\r\n .fetch();\r\n }\r\n\r\n public async getClaimBillTypesByLocation(query: IGetClaimBillTypesByLocationRequest) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/types-of-bill/location`)\r\n .useQueryString(query)\r\n .fetch();\r\n }\r\n\r\n public async getCollections(query: IGetCollectionsQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/collections`)\r\n .useQueryString(query)\r\n .fetch();\r\n }\r\n\r\n public async exportCollections(query: IGetCollectionsQuery) {\r\n return await this._httpClient.build(`${this._baseUrl}/collections/excel`).useQueryString(query).fetchBlob();\r\n }\r\n\r\n public async getAdjustmentDetails(claimId: string, query: IGetClaimAdjustmentsQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/adjustments`)\r\n .useQueryString(query)\r\n .fetch>();\r\n }\r\n\r\n public async getPaymentDetails(claimId: string, query: IGetClaimPaymentsQuery) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/payments`)\r\n .useQueryString(query)\r\n .fetch>();\r\n }\r\n\r\n public async createAdjustments(claimId: string, adjustment: ICreateAdjustment) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/${claimId}/adjustments`)\r\n .useMethod(\"POST\")\r\n .useBody(adjustment)\r\n .fetchNoContent();\r\n }\r\n\r\n public async createBalanceAdjustments(automaticAdjustment: ICreateAutomaticAdjustment) {\r\n return await this._httpClient\r\n .build(`${this._baseUrl}/balance-adjustments`)\r\n .useMethod(\"POST\")\r\n .useBody(automaticAdjustment)\r\n .fetchNoContent();\r\n }\r\n}\r\n"],"sourceRoot":""}