CheckPrescriptionChangeTask.CheckPrescriptionChange

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

var checkPrescriptionChangeTask = Activate<CheckPrescriptionChangeTask>();
await checkPrescriptionChangeTask.CheckPrescriptionChange(
    "64b9f8d2f65a88129087a8f4",
    FromJson<Prescription>("{\"PackType\":0,\"Dose\":[0.5,0.0,0.0,0.5,0.0,0.0,0.0,0.0],\"ShortCourseTimeslot\":[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],\"PatientId\":\"64f66594f65a8812205acf47\",\"Direction\":\"1/2 2xDAILY\",\"FoilId\":\"66e4d5ad8222d30ef835c1ad\",\"FoilLabel\":\"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-09-14T02: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\":\"\",\"PharmacyId\":\"64b9f8d2f65a88129087a8f4\",\"SyncDate\":\"0001-01-01T00:00:00\",\"IsSyncImported\":false,\"Drug\":{\"DrugName\":\"ATENOLOL (APX) 50mg TAB\",\"DrugCode\":\"ATEN19\",\"Austr\":\"\",\"Supplier\":\"APOTEX PTY LTD\",\"Type\":\"Tablet\",\"Color\":\"\",\"Shape\":\"\",\"Marking\":\"\",\"Warning\":\"*Do NOT stop taking this medication abruptly*May affect alertness and/or co-ordination. If affected, do not drive or operate machinery*May cause dizziness when standing up quickly*Certain foods should be avoided\",\"Direction\":\"\",\"GenericCode\":\"ATE1\",\"GenericName\":\"ATENOLOL\",\"Presentation\":\"Used to treat various types of heart conditions as well as some other illnesses.\",\"AltBrand\":\"NOTEN, TENORMIN, ANSELOL, TENLOL 50, TENSIG, ATENOLOL (SANDOZ), ATENOLOL (SBPA), ATENOLOL (DBL), ATENOLOL (CHEM-MART), ATENOLOL (HEALTHSENSE), ATENOLOL (TW), ATENOLOL GENRX, ATENOLOL-BC, ATENOLOL-BC, NOTEN, ATENOLOL (GA), ATENOLOL (APO), ATENOLOL (APO), ATENOLOL (GA), ATENOLOL (GEN HLTH), ATENOLOL (PS), TENOLTEN, ATENOLOL (GH), ATENOLOL (AN), ATENOLOL (RBX), ATENOLOL (AMNEAL), ATENOLOL (AMNEAL), TENSIG, ATENOLOL (APX), ATENOLOL (APX), ATENOLOL (BLOOMS)\",\"DoNotCrush\":false,\"TradeName\":\"ATENOLOL (APX)\",\"Formulation\":\"TAB\",\"Strength\":\"50mg\",\"Schedule\":\"4\",\"PackSize\":30,\"IsCytotoxic\":false,\"Authorized\":0,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":0,\"Description\":\"\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"64b9f8d2f65a88129087a8f4\",\"Usage\":1,\"DrugFullName\":\"ATENOLOL (APX) 50mg TAB\",\"MedicationFullDetails\":\"ATENOLOL (APX) 50mg TAB - ATENOLOL (ATEN19)\",\"Id\":\"611a6347a6b66b123c8c85d8\",\"CreatedDate\":\"2021-08-16T13:08:23.878Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"\",\"LastUpdateDate\":\"2024-06-14T06:44:47.263Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false},\"IsPreventBrandswap\":false,\"Swapped\":false,\"FreqXWeek\":0,\"PatientDocumentIds\":[],\"Id\":\"66e4d5ddd222d903ac2c00d2\",\"CreatedDate\":\"2024-09-14T00:16:29.0869966Z\",\"CreatedUserName\":\"pimpama\",\"CreatedUserId\":\"64ed4434f65a880db07d5cba\",\"LastUpdateDate\":\"2024-09-14T00:16:29.0869966Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"),
    "64f66594f65a8812205acf47",
    "");
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

9/14/2024 12:26:48 AM (+34.028s) Failed

An exception occurred during performance of the job.

System.TimeoutException

A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "2", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Connected", Servers : [{ ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ provider : AWS, availabilityZone : apse2-az3, region : AP_SOUTHEAST_2, workloadType : OPERATIONAL, diskState : READY, nodeType : ELECTABLE }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ region : AP_SOUTHEAST_2, nodeType : ELECTABLE, provider : AWS, availabilityZone : apse2-az1, diskState : READY, workloadType : OPERATIONAL }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026", State: "Disconnected", Type: "Unknown" }] }.

System.TimeoutException: A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "2", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Connected", Servers : [{ ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ provider : AWS, availabilityZone : apse2-az3, region : AP_SOUTHEAST_2, workloadType : OPERATIONAL, diskState : READY, nodeType : ELECTABLE }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ region : AP_SOUTHEAST_2, nodeType : ELECTABLE, provider : AWS, availabilityZone : apse2-az1, diskState : READY, workloadType : OPERATIONAL }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026", State: "Disconnected", Type: "Unknown" }] }.
   at MongoDB.Driver.Core.Clusters.Cluster.ThrowTimeoutException(IServerSelector selector, ClusterDescription description)
   at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task completedTask)
   at MongoDB.Driver.Core.Clusters.Cluster.<WaitForDescriptionChangedAsync>d__53.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.Clusters.Cluster.<SelectServerAsync>d__45.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.Bindings.ReadPreferenceBinding.<GetReadChannelSourceAsync>d__11.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

+9m 45.292s Processing

Server:
ip-0a00067f:3536
Worker:
14f9f327

+7ms Enqueued

Queue:
default

9/14/2024 12:16:29 AM Created