CheckPrescriptionChangeTask.CheckPrescriptionChange

// Job ID: #66ac8f918222d3112cdd781b
using OI.Service.HangfireTask.CheckPrescriptionChangeTask;

var checkPrescriptionChangeTask = Activate<CheckPrescriptionChangeTask>();
await checkPrescriptionChangeTask.CheckPrescriptionChange(
    "649923d0f65a8813a473b052",
    FromJson<Prescription>("{\"PackType\":0,\"Dose\":[0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0],\"ShortCourseTimeslot\":[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],\"PatientId\":\"64efd62ff65a8808881e170f\",\"Direction\":\"1 LUNCH\",\"FoilId\":\"64efd62ff65a8808881e1722\",\"FoilLabel\":\"Blister Pack 1\",\"DateDispensed\":\"0001-01-01T00:00:00\",\"QtyDispense\":0.0,\"DateExpiry\":\"0001-01-01T00:00:00\",\"Route\":{\"Code\":\"PO\"},\"IsStandard\":true,\"IsShortCourse\":false,\"IsSinemet\":false,\"IsWarfarin\":false,\"IsInsulin\":false,\"IsS8Drug\":false,\"IsCytotoxic\":false,\"IsS4N\":false,\"StartDate\":\"2024-08-02T02:00:00Z\",\"EndDate\":\"0001-01-01T00:00:00Z\",\"Frequency\":0,\"PackedWeekDay\":[],\"FreqXDay\":0,\"OnDays\":0,\"OffDays\":0,\"IsDoNotCrush\":true,\"FontColor\":\"\",\"SameAs\":\"\",\"PrintIt\":true,\"State\":0,\"DateCeased\":\"0001-01-01T00:00:00\",\"TempSubstitution\":false,\"Note\":\"\",\"IsHandPacked\":false,\"IsNoEndDate\":true,\"Indication\":\"\",\"Unit\":\"\",\"PharmacyId\":\"649923d0f65a8813a473b052\",\"SyncDate\":\"0001-01-01T00:00:00\",\"IsSyncImported\":false,\"Drug\":{\"DrugName\":\"METFORMIN XR (PHARMACOR) 500mg ER-TAB\",\"DrugCode\":\"METF65\",\"Austr\":\"\",\"Supplier\":\"PHARMACOR PTY LIMITED\",\"Type\":\"ER-Tablet\",\"Color\":\"\",\"Shape\":\"\",\"Marking\":\"\",\"Warning\":\"swallowed wholewith or soon after food.*Do not exceed one Aspirin tablet or capsule per day\",\"Direction\":\"\",\"GenericCode\":\"METF29\",\"GenericName\":\"METFORMIN HCL\",\"Presentation\":\"Used in the treatment of diabetes. Controlling high blood sugar helps prevent heart disease, strokes, kidney disease, circulation problems, and blindness.\",\"AltBrand\":\"DIABEX XR 500, DIAFORMIN XR, METEX XR, METFORMIN XR 500 (APO), METFORMIN XR 500 (CHEM MART), METFORMIN XR 500 (TW), METFORMIN XR 500 (APO), METFORMIN XR 500 (APOTEX), METFORMIN XR 500 (BLOOMS), METFORMIN (MEDSURGE), METFORMIN XR (PHARMACOR), METFORMIN XR (PHARMACOR)\",\"DoNotCrush\":true,\"TradeName\":\"METFORMIN XR (PHARMACOR)\",\"Formulation\":\"ER-TAB\",\"Strength\":\"500mg\",\"Schedule\":\"4\",\"PackSize\":120,\"IsCytotoxic\":false,\"Authorized\":2,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"649923d0f65a8813a473b052\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"Authorized\\":0,\\"ShelfLife\\":0,\\"Route\\":null}\",\"Usage\":2,\"DrugFullName\":\"METFORMIN XR (PHARMACOR) 500mg ER-TAB\",\"MedicationFullDetails\":\"METFORMIN XR (PHARMACOR) 500mg ER-TAB - METFORMIN HCL (METF65)\",\"Id\":\"6102d274a6b66b27b8110238\",\"CreatedDate\":\"2021-07-29T16:08:20.17Z\",\"CreatedUserId\":\"5fa24cab89e48b3a6ef44ad0\",\"LastUpdateUserId\":\"\",\"LastUpdateDate\":\"2024-06-14T06:44:30.748Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false},\"IsPreventBrandswap\":false,\"Swapped\":false,\"FreqXWeek\":0,\"PatientDocumentIds\":[],\"Id\":\"66ac8f8c8222d3112cdd7692\",\"CreatedDate\":\"2024-08-02T07:49:32.3320707Z\",\"CreatedUserName\":\"elijahrose\",\"CreatedUserId\":\"649b993bf65a880cdc97d8fe\",\"LastUpdateDate\":\"2024-08-02T07:49:32.3320707Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"),
    "64efd62ff65a8808881e170f",
    "");
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

8/2/2024 8:00:10 AM (+7m 19.114s) Failed

An exception occurred during performance of the job.

MongoDB.Driver.MongoCommandException

Command find failed: query plan killed :: index 'JobNumber_1_PharmacyId_1_IsDeleted_1' for collection 'myPakLive.PackJob' dropped.

MongoDB.Driver.MongoCommandException: Command find failed: query plan killed :: index 'JobNumber_1_PharmacyId_1_IsDeleted_1' for collection 'myPakLive.PackJob' dropped.
   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ProcessResponse(ConnectionId connectionId, CommandMessage responseMessage)
   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.<ExecuteAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.Core.Servers.Server.ServerChannel.<ExecuteProtocolAsync>d__29`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.Core.Operations.CommandOperationBase`1.<ExecuteProtocolAsync>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.Core.Operations.ReadCommandOperation`1.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.Core.Operations.FindCommandOperation`1.<ExecuteAsync>d__111.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.Core.Operations.FindOperation`1.<ExecuteAsync>d__111.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.OperationExecutor.<ExecuteReadOperationAsync>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.MongoCollectionImpl`1.<ExecuteReadOperationAsync>d__93`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.MongoCollectionImpl`1.<UsingImplicitSessionAsync>d__101`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at OI.Data.MongoDBRepository`1.<>c__DisplayClass21_0.<<FindAsync>b__0>d.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 219
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at OI.Data.MongoDBRepository`1.<FindAsync>d__21.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 216
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at OI.Service.PackJobService.PackJobService.<GetByPatientIdAndFoilIdsAndStatus>d__24.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\PackJobService\PackJobService.cs:line 719
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at OI.Service.HangfireTask.CheckPrescriptionChangeTask.CheckPrescriptionChangeTask.<CheckPrescriptionChange>d__23.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\Prescription\CheckPrescriptionChangeTask.cs:line 120

+3m 14.226s Processing

Server:
ip-0a0008b4:744
Worker:
bfc92b45

+95ms Enqueued

Queue:
default

8/2/2024 7:49:37 AM Created