CheckPrescriptionChangeTask.CheckPrescriptionChange

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

var checkPrescriptionChangeTask = Activate<CheckPrescriptionChangeTask>();
await checkPrescriptionChangeTask.CheckPrescriptionChange(
    "660cb69a96096609b8b0e593",
    FromJson<Prescription>("{\"PackType\":3,\"Dose\":[1.0],\"ShortCourseTimeslot\":[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],\"PatientId\":\"6632385c960966029c950918\",\"Direction\":\"Take ONE tablet before bed when required\",\"FoilId\":\"6632385c960966029c9509b7\",\"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-14T04:00:00Z\",\"EndDate\":\"0001-01-01T00:00:00Z\",\"Frequency\":0,\"PackedWeekDay\":[],\"FreqXDay\":0,\"OnDays\":0,\"OffDays\":0,\"IsDoNotCrush\":false,\"FontColor\":\"\",\"SameAs\":\"\",\"PrintIt\":true,\"State\":0,\"DateCeased\":\"0001-01-01T00:00:00\",\"TempSubstitution\":false,\"Note\":\"\",\"IsHandPacked\":false,\"IsNoEndDate\":true,\"Indication\":\"\",\"Unit\":\"tablet\",\"PharmacyId\":\"660cb69a96096609b8b0e593\",\"SyncDate\":\"0001-01-01T00:00:00\",\"IsSyncImported\":false,\"Drug\":{\"DrugName\":\"OXAZEPAM (APO) 30mg TAB\",\"DrugCode\":\"APOO3\",\"Austr\":\"163213\",\"Supplier\":\"APOTEX PTY LTD\",\"Type\":\"Tablet\",\"Color\":\"white\",\"Shape\":\"round\",\"Marking\":\"30\",\"Warning\":\"*May cause drowsiness and increase effects of alcohol. If affected do not drive a motor vehicle or operate machinery.This preparation is to aid sleep. Drowsiness may continue - if affected do not drive or operate machinery Avoid alcoholS/Care - Sleeping BadlyS/Care - Driving & MedicationS/Care - Relaxation Techniques*Do NOT stop taking this medication abruptly\",\"Direction\":\"\",\"GenericCode\":\"OXA2\",\"GenericName\":\"OXAZEPAM\",\"Presentation\":\"Used to treat anxiety, insomnia, and a range of other conditions.\",\"ImageId\":\"5f3a2dc8a0ba5d7c50796efa\",\"ImageName\":\"163213-C01-01-BL600.jpg\",\"AltBrand\":\"ALEPAM, MURELAX, SEREPAX, OXAZEPAM (APO), ALEPAM\",\"DoNotCrush\":false,\"TradeName\":\"OXAZEPAM (APO)\",\"Formulation\":\"TAB\",\"Strength\":\"30mg\",\"Schedule\":\"4D\",\"PackSize\":25,\"IsCytotoxic\":false,\"Authorized\":0,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":0,\"Description\":\"round white scored 30 tab\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"660cb69a96096609b8b0e593\",\"Usage\":1,\"DrugFullName\":\"OXAZEPAM (APO) 30mg TAB\",\"MedicationFullDetails\":\"OXAZEPAM (APO) 30mg TAB - OXAZEPAM (APOO3)\",\"Id\":\"5f0e69e0a0ba5db368a1651e\",\"CreatedDate\":\"2020-07-15T02:28:43.395Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"\",\"LastUpdateDate\":\"2024-06-14T06:41:47.007Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false},\"IsPreventBrandswap\":false,\"Swapped\":false,\"FreqXWeek\":0,\"PatientDocumentIds\":[],\"Id\":\"66bbfa915ac25f07bcbabf31\",\"CreatedDate\":\"2024-08-14T00:30:09.663506Z\",\"CreatedUserName\":\"CHUN\",\"CreatedUserId\":\"6638471516f53f1810c65de0\",\"LastUpdateDate\":\"2024-08-14T00:30:09.663506Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"),
    "6632385c960966029c950918",
    "");
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

8/14/2024 12:36:59 AM (+51.728s) 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__DisplayClass23_0.<<GetAsync>b__0>d.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 247
--- 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.<GetAsync>d__23.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 244
--- 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.PackingFoilService.PackingFoilService.<GetByJobId>d__15.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\PackingFoilService\PackingFoilService.cs:line 78
--- 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 124

+5m 58.141s Processing

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

+8ms Enqueued

Queue:
default

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