CheckPrescriptionChangeTask.CheckPrescriptionChange

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

var checkPrescriptionChangeTask = Activate<CheckPrescriptionChangeTask>();
await checkPrescriptionChangeTask.CheckPrescriptionChange(
    "657f8abb117b5203884cd4d5",
    FromJson<Prescription>("{\"PackType\":0,\"Dose\":[1.0],\"ShortCourseTimeslot\":[],\"PatientId\":\"66bbf8a18222d30f9c69f441\",\"Direction\":\"Take ONE tablet three times weekly\",\"FoilId\":\"66bbf8a18222d30f9c69f447\",\"FoilLabel\":\"Blister Pack 1\",\"DateDispensed\":\"2024-07-05T14:00:00Z\",\"ScriptNum\":\"1223261\",\"QtyDispense\":0.0,\"DateExpiry\":\"0001-01-01T00:00:00\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"IsStandard\":true,\"IsShortCourse\":false,\"IsSinemet\":false,\"IsWarfarin\":false,\"IsInsulin\":false,\"IsS8Drug\":false,\"IsCytotoxic\":false,\"IsS4N\":false,\"StartDate\":\"2024-08-14T02:00:00Z\",\"EndDate\":\"0001-01-01T00:00:00Z\",\"Frequency\":6,\"PackedWeekDay\":[false,false,true,false,true,false,true],\"FreqXDay\":0,\"OnDays\":0,\"OffDays\":0,\"IsDoNotCrush\":false,\"FontColor\":\"\",\"PrintIt\":true,\"State\":1,\"DateCeased\":\"0001-01-01T00:00:00\",\"TempSubstitution\":false,\"IsHandPacked\":false,\"IsNoEndDate\":true,\"Unit\":\"\",\"PharmacyId\":\"657f8abb117b5203884cd4d5\",\"SyncDate\":\"0001-01-01T00:00:00\",\"IsSyncImported\":false,\"Drug\":{\"DrugName\":\"MEGAFOL 5 5mg TAB\",\"DrugCode\":\"MEG6\",\"Austr\":\"17706\",\"Supplier\":\"ALPHAPHARM PTY LTD\",\"Type\":\"Tablet\",\"Color\":\"yellow\",\"Shape\":\"round\",\"Marking\":\"\",\"Warning\":\"*SOME CODES PBS RESTRICTED TOABORIGINAL & TORRES STRT ONLY\",\"Direction\":\"\",\"GenericCode\":\"FOL2\",\"GenericName\":\"FOLIC ACID\",\"Presentation\":\"Used to treat or prevent low folate levels. Low folate levels can lead to certain types of anemia.\",\"ImageId\":\"5f3a2f26a0ba5d7c507978b8\",\"ImageName\":\"17706-C01-01-BL600.jpg\",\"AltBrand\":\"FOLASIC, FOLIC ACID, FOLICID, MEGAFOL 5\",\"DoNotCrush\":false,\"TradeName\":\"MEGAFOL 5\",\"Formulation\":\"TAB\",\"Strength\":\"5mg\",\"Schedule\":\"3\",\"PackSize\":100,\"IsCytotoxic\":false,\"Authorized\":0,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":0,\"Description\":\"round yellow\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"657f8abb117b5203884cd4d5\",\"Usage\":3,\"DrugFullName\":\"MEGAFOL 5 5mg TAB\",\"MedicationFullDetails\":\"MEGAFOL 5 5mg TAB - FOLIC ACID (MEG6)\",\"Id\":\"5f0e69e0a0ba5db368a1479c\",\"CreatedDate\":\"2020-07-15T02:28:36.814Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"\",\"LastUpdateDate\":\"2024-06-14T06:47:19.597Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false},\"IsPreventBrandswap\":false,\"Swapped\":false,\"FreqXWeek\":0,\"PatientDocumentIds\":[],\"Id\":\"66bbf8a18222d30f9c69f474\",\"CreatedDate\":\"2024-01-10T04:52:16.645Z\",\"CreatedUserId\":\"657f8abb117b5203884cd53a\",\"LastUpdateUserId\":\"659e064716f53f0fecb70c67\",\"LastUpdateUserName\":\"SarahRichardson\",\"LastUpdateDate\":\"2024-08-14T00:30:07.8586426Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"),
    "66bbf8a18222d30f9c69f441",
    "");
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

8/14/2024 12:36:07 AM (+37.476s) Failed

An exception occurred during performance of the job.

MongoDB.Driver.MongoConnectionException

An exception occurred while opening a connection to the server.

MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.TimeoutException: Timed out connecting to Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025. Timeout was 00:00:30.
   at MongoDB.Driver.Core.Connections.TcpStreamFactory.<ConnectAsync>d__7.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.Connections.TcpStreamFactory.<CreateStreamAsync>d__4.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.Connections.SslStreamFactory.<CreateStreamAsync>d__4.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.Connections.BinaryConnection.<OpenHelperAsync>d__48.MoveNext()
   --- End of inner exception stack trace ---
   at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d__48.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.<GetChannelAsync>d__30.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

+5m 22.431s Processing

Server:
ip-0a00067f:3084
Worker:
04c9c051

+8ms Enqueued

Queue:
default

8/14/2024 12:30:07 AM Created