// Job ID: #69c0754fc20a3af6bed832a7
using OI.Service.HangfireTask;
var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
"65f2569216f53f0d606afc0d",
FromJson<Drug>("{\"DrugName\":\"RIVARELTO 20mg TAB\",\"DrugCode\":\"RIVA64\",\"Austr\":\"333058\",\"Supplier\":\"ARROTEX PHARMACEUTICALS P\",\"Type\":\"Tablet\",\"Color\":\"\",\"Shape\":\"\",\"Marking\":\"\",\"Warning\":\"with or soon after food.*Do not take ASPIRIN or ANTI-INFLAMMATORY medicines unless advised by your DoctorHIC-NO INCREASE IN QTY & RPTS ALLOWED\",\"Direction\":\"\",\"GenericCode\":\"RIVA18\",\"GenericName\":\"RIVAROXABAN\",\"Presentation\":\"Are anticoagulants that block the activity of clotting factor Xa and prevents blood clots developing or getting worse.\",\"AltBrand\":\"XARELTO, IXAROLA, RIVAROXABAN (TEVA), RIVAROXABAN (TEVA), RIVAROXABAN (SANDOZ), RIVOXA, RIVAROXABAN (ARX), RIVAROXABAN (DR REDDY'S), RIVAROXABAN (LUPIN), RIVAXIB, RIVARELTO, RIVAROXABAN (APO), RELABAN\",\"DoNotCrush\":false,\"TradeName\":\"RIVARELTO\",\"Formulation\":\"TAB\",\"Strength\":\"20mg\",\"Schedule\":\"4\",\"PackSize\":28,\"IsCytotoxic\":false,\"Authorized\":2,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"red round \\"IL3\\"\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"65f2569216f53f0d606afc0d\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"Authorized\\":0,\\"ShelfLife\\":0,\\"Description\\":\\"\\",\\"Route\\":null}\",\"Usage\":3,\"DrugFullName\":\"RIVARELTO 20mg TAB\",\"MedicationFullDetails\":\"RIVARELTO 20mg TAB - RIVAROXABAN (RIVA64)\",\"Id\":\"68933963d608d9e2843a2ba5\",\"CreatedDate\":\"2025-08-06T11:15:47.232Z\",\"CreatedUserId\":\"\",\"LastUpdateUserId\":\"66024f2ca5ab8f030cc8a61f\",\"LastUpdateDate\":\"2026-03-22T23:03:43.0192791Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"));
"en-US""en-US"An exception occurred during performance of the job.
An error occurred while serializing the DateCeased property of class OI.Domain.Prescription: Exception of type 'System.OutOfMemoryException' was thrown.
MongoDB.Bson.BsonSerializationException: An error occurred while serializing the DateCeased property of class OI.Domain.Prescription: Exception of type 'System.OutOfMemoryException' was thrown. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at lambda_method(Closure , Object ) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeNormalMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) --- End of inner exception stack trace --- at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeClass(BsonSerializationContext context, BsonSerializationArgs args, TClass document) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Serialize(BsonSerializationContext context, BsonSerializationArgs args, TClass value) at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Serialize[TValue](IBsonSerializer`1 serializer, BsonSerializationContext context, TValue value) at MongoDB.Bson.Serialization.Serializers.EnumerableSerializerBase`2.Serialize(BsonSerializationContext context, BsonSerializationArgs args, TValue value) at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Serialize[TValue](IBsonSerializer`1 serializer, BsonSerializationContext context, TValue value) at MongoDB.Driver.OperatorUpdateDefinition`2.Render(IBsonSerializer`1 documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider) at MongoDB.Driver.MongoCollectionImpl`1.ConvertWriteModelToWriteRequest(WriteModel`1 model, Int32 index) at System.Linq.Enumerable.<SelectIterator>d__5`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at MongoDB.Driver.Core.Operations.BulkMixedWriteOperation..ctor(CollectionNamespace collectionNamespace, IEnumerable`1 requests, MessageEncoderSettings messageEncoderSettings) at MongoDB.Driver.MongoCollectionImpl`1.CreateBulkWriteOperation(IClientSessionHandle session, IEnumerable`1 requests, BulkWriteOptions options) at MongoDB.Driver.MongoCollectionImpl`1.<BulkWriteAsync>d__31.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__107`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.<BulkWriteAsync>d__15.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 166 --- 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.GetResult() at OI.Service.HangfireTask.PackingFoilTask.<BulkUpdate>d__7.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\PackingFoil\PackingFoilTask.cs:line 89 --- 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.GetResult() at OI.Service.HangfireTask.PackingFoilTask.<ExecuteUpdateDrug>d__6.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\PackingFoil\PackingFoilTask.cs:line 69