// Job ID: #69cda3f84642fb1a71f63211
using OI.Service.HangfireTask;
var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
"65f2569216f53f0d606afc0d",
FromJson<Drug>("{\"DrugName\":\"DITHIAZIDE 25mg TAB\",\"DrugCode\":\"DITH7\",\"Austr\":\"92060\",\"Supplier\":\"PHEBRA PTY LTD\",\"Type\":\"Tablet\",\"Color\":\"light orange\",\"Shape\":\"round\",\"Marking\":\"Z 2083\",\"Warning\":\"PDL Warn: Similar Names*Avoid excessive exposure to sunlight and sunlamps*May cause dizziness when standing up quicklyC/I IN PTS WITH SULPHA ALLERGYS/Care - High Blood PressureS/Care - Exercise & HeartS/Care - Reducing Fat/Cholest\",\"Direction\":\"\",\"GenericCode\":\"HYD9\",\"GenericName\":\"HYDROCHLOROTHIAZIDE\",\"Presentation\":\"\",\"ImageId\":\"5f3a2da3a0ba5d7c5079603b\",\"ImageSmallSizeId\":\"68f598715a506b941b5c7f7b\",\"ImageName\":\"92060-C01-01-BL600.jpg\",\"AltBrand\":\"DICHLOTRIDE, DITHIAZIDE\",\"DoNotCrush\":false,\"TradeName\":\"DITHIAZIDE\",\"Formulation\":\"TAB\",\"Strength\":\"25mg\",\"Schedule\":\"4\",\"PackSize\":100,\"IsCytotoxic\":false,\"Authorized\":0,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"light orange round \\"TEVA 2083\\"\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"65f2569216f53f0d606afc0d\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"ShelfLife\\":0,\\"Description\\":\\"light orange round Z 2083\\",\\"Route\\":null}\",\"Usage\":3,\"DrugFullName\":\"DITHIAZIDE 25mg TAB\",\"MedicationFullDetails\":\"DITHIAZIDE 25mg TAB - HYDROCHLOROTHIAZIDE (DITH7)\",\"Id\":\"5f0e69e0a0ba5db368a15a1c\",\"CreatedDate\":\"2020-07-15T02:28:41.049Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"66024f2ca5ab8f030cc8a61f\",\"LastUpdateDate\":\"2026-04-01T23:02:16.8237795Z\",\"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 IsWarfarin property of class OI.Domain.Prescription: Exception of type 'System.OutOfMemoryException' was thrown.
MongoDB.Bson.BsonSerializationException: An error occurred while serializing the IsWarfarin 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